Crypto APIs icon

Crypto APIs

Interact with Crypto APIs REST API

Actions113

Overview

This node provides a utility operation to convert Bitcoin Cash addresses between different formats and networks. It is useful when working with Bitcoin Cash wallets or services that require address format conversion, such as converting between legacy, cashaddr, or other Bitcoin Cash address types across mainnet or testnet environments.

Practical examples include:

  • Converting a Bitcoin Cash address from legacy format to the newer cashaddr format.
  • Switching an address from mainnet to testnet representation for testing purposes.
  • Ensuring compatibility of addresses when interacting with various blockchain APIs or wallet software.

Properties

Name Meaning
blockchain The blockchain network to use (e.g., Bitcoin Cash).
network The network type within the blockchain (e.g., mainnet, testnet).
context Optional context parameter to specify additional details or usage context for conversion.
JSON Body A collection of fields for the request body:
- address The Bitcoin Cash address string to be converted.

Output

The node outputs a JSON array where each item corresponds to the result of the address conversion request. The exact structure depends on the API response but generally includes the converted address and related metadata.

If the node supports binary data output, it would represent any returned files or raw data, but in this case, the output is purely JSON-based.

Dependencies

  • Requires an active connection to the Crypto APIs REST API service.
  • Needs an API key credential configured in n8n for authentication.
  • Reads a local OpenAPI specification file (2024-12-12-final.json) bundled with the node for operation definitions.
  • Uses internal helper functions to perform HTTP requests to the Crypto APIs endpoints.

Troubleshooting

  • Operation not found error: If the specified operation is not recognized, ensure the "operation" property is correctly set to "Convert Bitcoin Cash Address".
  • Missing required parameters: The blockchain and network properties are mandatory; missing these will cause errors.
  • API request failures: Network issues or invalid API credentials can cause request failures. Verify API key validity and network connectivity.
  • Invalid address format: Providing an improperly formatted Bitcoin Cash address may lead to conversion errors. Validate the input address before using the node.

Links and References

Discussion