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

Return to the regular view of this page.

Utxo Lookup

Only for Utxo based blockchains, the Utxo lookup exists. The goal is to return unspent outputs for an address.

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,    
}

Publin Output

interface {

  /**
   * Result is an array
   */
  [index: number]: {

    /**
     * The utxo value in satoshi
     */
    value: string;

    /**
     * Transaction id
     */
    txid: string;

    /**
     * Utxo index
     */
    vout: number;

    /**
     * Number of confirmations
     */
    confirmations: number;

    /**
     * Utxo locktime (or 0 if none)
     */
    lockTime: number;

    /**
     * For unconfirmed transactions this will return 0
     */
    height: number;  
  }
}