This the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Balance Lookup

Look up the current balance for a token on a blockchain network.

Plugin Input

Please see heat-server-common/src/constants.ts for type definitions

interface {
  /**
   * Enum of blockchain identifiers
   */   
  blockchain: Blockchains,

  /**
   * Enum of asset or token types
   */   
  assetType: AssetTypes,

  /**
    * Unique identifier (erc20 contract addr, or '0' for native currency)
    */
  assetId: string;

  /**
   * Address or public key
   */   
  addrXpub: string,
}

Plugin Output

interface {
  /**
    * Amount/value in smallest unit on blockchain (satoshi, wei, etc)
    */  
  value: string;

  /**
    * Indicates the address received atleast one transaction
    */
  exists: boolean;
}