Quick Example
Intro
Creating a MetaID Account With SDK
import { MetaletWalletForBtc, btcConnect } from '@metaid/metaid';
const _btcConnector: BtcConnector = await btcConnect(_wallet);
const handleCreateMetaid = async (userInfo) => {
const userInfo = {name:'Bob', bio:'Success needs time.', avatar:'imageUrl'}
if (!_btcConnector.hasMetaid()) {
const createRes = await btcConnector.createMetaid({ ...userInfo, network });
} else {
const resUser = await _btcConnector.getUser();
}
};Connecting to BTC Blockchain
Define the required entities
Send data to the blockchain with Entity
Send multiple entities’ data to the blockchain
Build relationships between different user’s data
Live Example
Last updated