Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node provides access to various cryptocurrency-related API operations via the Crypto APIs REST API. Specifically, for the Utilities resource and the Encode X-Address operation, it encodes a classic blockchain address into an X-Address format. This is useful in scenarios where you need to convert standard addresses into a more compact or standardized form used by certain blockchains (e.g., Ripple/XRP). Practical applications include preparing addresses for transactions, ensuring compatibility with services requiring X-Address format, or validating address formats programmatically.

Properties

Name Meaning
addressTag A numeric tag associated with the address, often used to identify a specific destination or user within a blockchain network.
blockchain The name of the blockchain network (e.g., XRP Ledger) for which the address encoding applies.
classicAddress The original, standard blockchain address that needs to be encoded into the X-Address format.
network The network type or environment (e.g., mainnet, testnet) relevant to the address encoding.
context Optional additional context information that may influence the encoding process or provide metadata.

Output

The node outputs JSON data representing the result of the Encode X-Address operation. This typically includes the encoded X-Address string corresponding to the input classic address and parameters. The output is structured as an array of JSON objects, each containing the encoded address and possibly related metadata returned from the API.

If binary data were involved, it would represent raw encoded address data, but this operation deals solely with JSON-formatted textual data.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs a valid API authentication token or API key credential configured in n8n to authorize requests.
  • The node reads a local OpenAPI specification file (2024-12-12-final.json) bundled with the node to dynamically configure available operations and parameters.
  • No other external dependencies are required beyond standard Node.js modules and the Crypto APIs service.

Troubleshooting

  • Common issues:

    • Missing or invalid API credentials will cause authentication failures.
    • Providing incorrect or malformed blockchain addresses or tags may result in API errors or invalid responses.
    • Network connectivity problems can prevent successful API calls.
    • Using unsupported blockchain names or network types may lead to "Operation not found" or similar errors.
  • Error messages:

    • Operation <operationName> not found: Indicates the requested operation is not defined in the API spec or was misspelled. Verify the operation name and resource selection.
    • API response errors related to invalid parameters usually indicate incorrect input values; double-check the address, tag, and network inputs.
    • If the node returns { error: "<message>" } in the output JSON, enabling "Continue On Fail" allows processing to continue despite individual item errors.

Links and References

Discussion