Token Discovery
Token discovery is the process of identifying and returning information on which supported tokens belong to an address. Several token types exists for several different blockchains.
We use the term token to describe any kind of unit that could be held by an address. One such example would be the native currency on a blockchain (each Bitcoin address has atleast the Bitcoin token). Other chains support more token types, Ethereum addresses for example can contain many different erc20 tokens.
Plugin Input
interface {
/**
* Enum of blockchain identifiers
*/
blockchain: Blockchains,
/**
* Enum of asset or token types
*/
assetType: AssetTypes,
/**
* Address or public key
*/
addrXpub: string,
}
Plugin Output
interface {
/**
* Result is an array
*/
[index: number]: {
/**
* Unique identifier (erc20 contract addr, or '0' for native currency)
*/
assetId: string;
/**
* Enum of asset or token types
*/
assetType: number;
/**
* Amount/value in smallest unit on blockchain (satoshi, wei, etc)
*/
value: string;
/**
* Indicates the address received atleast one transaction
*/
exists: boolean;
}
}