Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation retrieves the Unspent Transaction Outputs (UTXOs) for assets associated with a Hierarchical Deterministic (HD) Wallet identified by an extended public key (xPub, yPub, or zPub). It supports multiple blockchains and networks, allowing users to query detailed UTXO data for HD wallets. This is useful in scenarios such as wallet auditing, balance reconciliation, transaction building, or blockchain analytics where understanding the spendable outputs of an HD wallet is necessary.

Practical examples include:

  • Fetching all UTXOs for a Bitcoin HD wallet on the mainnet to prepare inputs for a new transaction.
  • Querying UTXOs on a testnet for development or testing purposes.
  • Auditing asset holdings across different blockchains using their respective extended public keys.

Properties

Name Meaning
blockchain The blockchain network to query (e.g., Bitcoin, Ethereum).
extendedPublicKey The extended public key (xPub, yPub, or zPub) of the HD wallet whose UTXOs are requested.
network The specific network within the blockchain (e.g., mainnet, testnet).
context Optional context parameter for additional request scoping or metadata.
derivation Optional derivation method used; can be either "account" or "bip32".

Output

The output is a JSON array containing the UTXO details for the specified HD wallet. Each item in the array represents an unspent transaction output related to the wallet's assets. The structure typically includes fields such as transaction IDs, output indices, amounts, and possibly script information depending on the blockchain.

If binary data were involved (not indicated here), it would represent raw transaction or blockchain data, but this operation focuses on JSON-formatted UTXO information.

Dependencies

  • Requires an API key credential for authenticating requests to the Crypto APIs REST API service.
  • The node depends on the Crypto APIs service endpoint defined in the bundled OpenAPI specification file (2024-12-12-final.json).
  • No other external dependencies are required beyond standard n8n workflow environment and the Crypto APIs credential.

Troubleshooting

  • Common issues:

    • Invalid or missing extended public key will cause the API request to fail.
    • Incorrect blockchain or network parameters may result in no data or errors.
    • Network connectivity issues or invalid API credentials will prevent successful API calls.
  • Error messages:

    • Operation <operationName> not found: Indicates a misconfiguration or typo in the operation name; ensure the correct operation is selected.
    • API errors returned from the Crypto APIs service will be passed through; check the error message for details such as invalid parameters or authentication failures.
  • Resolutions:

    • Verify that the extended public key is correctly formatted and corresponds to the chosen blockchain.
    • Confirm that the blockchain and network values match supported options.
    • Ensure the API key credential is valid and has appropriate permissions.
    • Use the "Continue On Fail" option in n8n to handle errors gracefully during batch processing.

Links and References

Discussion