Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation allows you to list Unspent Transaction Outputs (UTXOs) for HD Wallets identified by extended public keys such as xPub, yPub, or zPub. It interacts with a blockchain data API to retrieve detailed UTXO information associated with hierarchical deterministic wallets. This is useful in scenarios where you want to track spendable outputs for wallet addresses derived from an HD wallet, for example, to monitor available funds, prepare transactions, or audit wallet activity.

Practical examples include:

  • Fetching all UTXOs for a given HD wallet on a specific blockchain and network.
  • Paginating through large sets of UTXOs using limit and offset parameters.
  • Filtering UTXOs by derivation type (e.g., account-level).

Properties

Name Meaning
blockchain The blockchain network to query (e.g., Bitcoin, Ethereum).
extendedPublicKey The extended public key (xPub, yPub, zPub) identifying the HD wallet.
network The specific network within the blockchain (e.g., mainnet, testnet).
context Optional context string to specify additional request context or metadata.
derivation Optional derivation type filter; currently supports "account" to filter by account level.
limit Optional number to limit the maximum number of UTXO records returned.
offset Optional number to skip a certain number of UTXO records for pagination.

Output

The output is a JSON array where each element represents a UTXO related to the specified HD wallet. Each UTXO object typically contains details such as transaction identifiers, output indices, amounts, addresses, and confirmation status. This structured data enables further processing like transaction building or balance calculations.

If binary data were involved (e.g., raw transaction hex), it would be summarized accordingly, but this operation focuses on JSON-formatted UTXO data.

Dependencies

  • Requires an active connection to a Crypto APIs REST service that provides blockchain data.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • Relies on the bundled OpenAPI specification file (2024-12-12-final.json) for endpoint definitions.
  • Uses internal helper functions to perform HTTP requests to the Crypto APIs endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing extended public key will cause the API to return errors or empty results.
    • Incorrect blockchain or network values may lead to no data found or API errors.
    • Pagination parameters (limit, offset) must be valid numbers; otherwise, the API might reject the request.
    • Network connectivity or API quota limits can cause request failures.
  • Error messages:

    • "Operation <operationName> not found": Indicates the requested operation is not defined in the API spec or the node configuration. Verify the operation name and resource selection.
    • API response errors usually include descriptive messages about invalid parameters or authentication issues. Check your API key and parameter correctness.
  • Resolution tips:

    • Double-check the extended public key format and ensure it matches the blockchain/network.
    • Validate that required parameters are provided.
    • Review API key permissions and usage limits.
    • Use smaller limit values when dealing with large datasets to avoid timeouts.

Links and References

Discussion