Step 4 - Assets

Tokens

Both wallet and vault(runner) tokens are available. Supporting real time updates of tokens amount.

// wallet
service.tokens.data.wallet.<raw|fmt>.list.value
service.tokens.data.wallet.<raw|fmt>.map.value
// vault
service.tokens.data.vault.<raw|fmt>.list.value
service.tokens.data.vault.<raw|fmr>.map.value

Token Item

{
    token_address: string,        // the address of the token
    logo: string,                 // URL of token's logo
    amount: string,               // balance of tokens
    decimal: number,              // token's decimal value (taken from contract) 
    name: string,                 // token's name (taken from contract)
    symbol: string,               // token's symbol (taken from contract)
}

NFTs

Both wallet and vault(runner) NFTs are available. Supporting real time updates of NFTs amount.

// wallet
service.nfts.wallet.data.<raw|fmt>.list.value
service.nfts.wallet.data.<raw|fmt>.map.value
// vault
service.nfts.vault.data.<raw|fmt>.list.value
service.nfts.vault.data.<raw|fmt>.map.value

NFT Item

{
    token_address: string,        // address of the nft contract
    token_id: string,             // id of the nft    
    amount: string,               // amount of nfts for 1155, always 1 for 721
    contract_type: 'ERC721' | 'ERC1155' 
    iconUrl: string,              // URL of the nft image
    name: string,                 // collection name (taken from contract)
    symbol: string,               // collection symbol (taken from contract)
}

Last updated