Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation derives multiple cryptocurrency wallet addresses from an extended public key (xPub, yPub, zPub) for a specified blockchain. It supports generating both change and receiving addresses based on hierarchical deterministic (HD) wallet standards. This is useful when you want to generate new wallet addresses programmatically without exposing private keys, for example, to monitor incoming payments or manage change outputs in wallets.

Practical examples include:

  • Generating a batch of receiving addresses for a Bitcoin wallet using an xPub key.
  • Deriving change addresses for Ethereum or other supported blockchains to track change outputs.
  • Supporting different address formats like legacy, SegWit, or cash address formats depending on the blockchain.

Properties

Name Meaning
blockchain The target blockchain network (e.g., Bitcoin, Ethereum) where addresses will be derived.
extendedPublicKey The extended public key (xPub, yPub, zPub) used as the root for deriving child addresses.
network The network type such as mainnet or testnet for the blockchain.
context Optional additional context string for derivation (usage depends on implementation).
addressFormat The format of the derived addresses. Options include: p2pkh, p2sh, p2wpkh, standard, p2sh-cash, p2pkh-cash, classic, base58.
addressesCount Number of addresses to derive starting from the start index.
isChange Boolean flag indicating whether to derive change addresses (true) or receiving addresses (false).
startIndex The starting index for address derivation (default is usually 0).

Output

The output is a JSON array containing the derived addresses. Each item typically includes the derived address string and possibly associated metadata such as the index or path used for derivation.

If binary data output is supported, it would represent raw address data or related cryptographic material, but this operation primarily outputs JSON with address strings.

Dependencies

  • Requires an API key credential for the Crypto APIs REST API service.
  • The node relies on the Crypto APIs backend to perform the actual derivation and address generation.
  • No local cryptographic libraries are used directly; all operations are performed via API calls.
  • Proper configuration of the API key credential in n8n is necessary.

Troubleshooting

  • Common issues:

    • Invalid or malformed extended public key input can cause errors.
    • Unsupported blockchain or network values may result in failed requests.
    • Requesting too many addresses at once might hit API limits or timeouts.
    • Incorrect address format options for the selected blockchain could lead to invalid addresses.
  • Error messages:

    • "Operation ... not found": Indicates the requested operation is not recognized by the node, likely due to misconfiguration.
    • 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 the extended public key is correct and corresponds to the chosen blockchain.
    • Confirm that the blockchain and network parameters match supported values.
    • Reduce the number of addresses requested if hitting rate limits.
    • Ensure the API key credential is valid and has sufficient permissions.

Links and References

Discussion