Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node operation prepares a fungible token transfer transaction from a specified address on an EVM-compatible blockchain. It constructs the necessary transaction data, including sender, recipient, amount, contract address, and optional fee and nonce details, to be signed and broadcasted later.

Common scenarios where this node is beneficial include:

  • Preparing token transfers in decentralized applications (dApps) before signing and sending them.
  • Automating token payments or transfers as part of workflows.
  • Integrating with wallets or custodial services that require pre-built transaction payloads.

Practical example:

  • A user wants to send 10 USDT tokens from their Ethereum wallet to another address. This node prepares the transaction data specifying the USDT contract, sender and recipient addresses, and amount, ready for signing.

Properties

Name Meaning
blockchain The blockchain network to use (e.g., Ethereum, Binance Smart Chain).
network The specific network environment (e.g., mainnet, testnet).
context Optional context string to correlate requests or responses.
bodyParameters Collection of JSON fields defining transaction details:
- amount Amount of tokens to transfer.
- contract Address of the token contract.
- nonce Optional nonce value for the transaction.
- recipient Address receiving the tokens.
- sender Address sending the tokens.
- fee Optional fee details (structure not fully detailed here).
- type 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 returned by the Crypto APIs service. This typically includes all necessary fields to sign and broadcast the fungible token transfer transaction on the specified EVM blockchain.

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

Dependencies

  • Requires an API key credential for the Crypto APIs REST API.
  • Uses the Crypto APIs service endpoint defined in a local OpenAPI specification file (2024-12-12-final.json).
  • No additional external dependencies beyond standard Node.js modules and n8n workflow helpers.

Troubleshooting

  • Operation Not Found Error: If the specified operation is not found in the API spec, ensure the correct operation name is selected.
  • Missing Required Parameters: Ensure required properties like blockchain, network, sender, recipient, and amount are provided.
  • API Request Failures: Network issues or invalid API credentials can cause request failures. Verify API key validity and network connectivity.
  • Invalid Transaction Type: Use one of the allowed transaction types (legacy-transaction, access-list-transaction, gas-fee-market-transaction) to avoid errors.

Links and References

Discussion