Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation prepares a transaction from an address in an HD Wallet (using extended public keys like xPub, yPub, zPub) on EVM-compatible blockchains. It allows users to construct the necessary transaction data without exposing private keys, enabling secure transaction preparation for Ethereum and similar networks.

Common scenarios include:

  • Preparing unsigned transactions for hardware wallets or external signing.
  • Constructing transactions programmatically for smart contract interactions or token transfers.
  • Integrating with wallet management systems that use extended public keys to derive addresses and prepare transactions.

Practical example:
A user wants to send tokens from an Ethereum address derived from their HD wallet's xPub key. They specify the blockchain (Ethereum), network (e.g., mainnet), recipient address, amount, and optionally fee parameters. The node returns the prepared transaction data ready for signing and broadcasting.

Properties

Name Meaning
blockchain The target blockchain network (e.g., Ethereum, Binance Smart Chain).
network Specific network within the blockchain (e.g., mainnet, testnet).
extendedPublicKey The HD wallet extended public key (xPub, yPub, zPub) used to derive addresses.
type The type of transaction or asset involved (specific meaning depends on API context).
context Optional context string for correlating requests or tracking.
JSON Body (bodyParameters) Collection of additional transaction details:
- additionalData Extra data to include in the transaction (e.g., calldata for contracts).
- amount Amount of cryptocurrency or tokens to send.
- nonce Transaction nonce to ensure uniqueness.
- recipient Address receiving the funds.
- sender Address sending the funds (derived from extended public key).
- fee Fee parameters collection (structure depends on blockchain specifics).
- transactionType Type of transaction; options are: legacy-transaction, access-list-transaction, gas-fee-market-transaction.

Output

The node outputs a JSON array where each item contains the prepared transaction data as returned by the Crypto APIs service. This typically includes all necessary fields to sign and broadcast the transaction externally, such as raw transaction hex, gas limits, fees, nonce, and other blockchain-specific details.

If binary data were involved (not indicated here), it would represent encoded transaction payloads or signatures, but this node focuses on JSON transaction preparation output.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • No additional environment variables are explicitly required beyond standard API credential setup.

Troubleshooting

  • Operation not found error: Occurs if the specified operation is incorrect or missing. Ensure the operation name matches exactly "Prepare A Transaction From an Address in HD Wallet (xPub, yPub, zPub) EVM".
  • Invalid or missing parameters: The node requires certain mandatory inputs like blockchain, network, and extended public key. Missing these will cause errors.
  • API request failures: Network issues or invalid API credentials can cause request errors. Verify API key validity and network connectivity.
  • Incorrect fee or transaction type: Providing unsupported fee structures or transaction types may result in API rejections. Use only supported options listed in properties.
  • To resolve errors, check input parameters carefully, confirm API credentials, and consult Crypto APIs documentation for valid values.

Links and References

Discussion