Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node allows users to broadcast locally signed cryptocurrency transactions to a specified blockchain network via the Crypto APIs service. It is useful when you have already created and signed a transaction offline or in another system, and now want to submit it to the blockchain for confirmation.

Common scenarios include:

  • Sending a pre-signed Bitcoin or Ethereum transaction from an external wallet or hardware device.
  • Broadcasting transactions generated by custom scripts or third-party services.
  • Integrating with blockchain applications that separate signing and broadcasting steps.

For example, after signing a Bitcoin transaction hex string offline, you can use this node to push that transaction onto the Bitcoin network without exposing private keys to the node environment.

Properties

Name Meaning
blockchain The target blockchain where the transaction will be broadcast (e.g., Bitcoin, Ethereum).
network The specific network of the blockchain (e.g., mainnet, testnet).
context Optional context string to correlate requests and responses.
JSON Body: Collection of optional parameters related to the transaction broadcast:
- callbackSecretKey Secret key used to secure callback notifications (optional).
- callbackUrl URL to receive asynchronous callback notifications about the transaction status (optional).
- signedTransactionHex The hexadecimal string of the locally signed transaction to be broadcasted.

Output

The node outputs a JSON array containing the response from the Crypto APIs service after attempting to broadcast the transaction. This typically includes details such as transaction ID, status, and any relevant metadata returned by the API.

If the broadcast fails, the output may contain an error message describing the failure.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The node reads a local OpenAPI specification file (2024-12-12-final.json) bundled with the node for operation definitions but this is internal and transparent to the user.

Troubleshooting

  • Common issues:

    • Invalid or malformed signed transaction hex string will cause the broadcast to fail.
    • Incorrect blockchain or network selection may result in errors or rejected transactions.
    • Missing or invalid API credentials will prevent successful communication with the Crypto APIs service.
    • Network connectivity problems can cause request timeouts or failures.
  • Error messages:

    • "Operation <name> not found": Indicates an internal misconfiguration or unsupported operation; usually not encountered by end users.
    • API errors returned from Crypto APIs will be passed through, e.g., "Invalid transaction hex" or "Transaction already exists".
  • Resolutions:

    • Verify the signed transaction hex is correctly formatted and valid for the selected blockchain.
    • Double-check blockchain and network parameters.
    • Ensure API credentials are properly set up and have necessary permissions.
    • Check internet connectivity and firewall settings.

Links and References

Discussion