DecentralChain (DCC) icon

DecentralChain (DCC)

Create, sign and broadcast DecentralChain transactions, plus query blockchain data

Overview

This node integrates with the DecentralChain (DCC) blockchain, enabling users to create, sign, and broadcast various types of DCC transactions as well as query blockchain data. It supports operations related to accounts, tokens/assets, transactions, and utility functions such as address generation and validation.

Common scenarios where this node is beneficial include:

  • Automating token transfers or issuing new tokens on the DCC blockchain.
  • Querying account balances or token details for wallet management.
  • Managing leases, aliases, and smart contract interactions programmatically.
  • Validating addresses or generating addresses from public keys for integration workflows.

Practical examples:

  • Automatically transfer DCC tokens to multiple recipients after a trigger event.
  • Retrieve and display token balances for a user’s address in a dashboard.
  • Issue a new token asset with specific supply and decimals via an automated process.
  • Validate user input addresses before processing blockchain transactions.

Properties

Name Meaning
Base URL The base URL of the DecentralChain node API to use if no credential is supplied. Default is https://nodes.decentralchain.io.

(Note: Since the Resource and Operation are "Default" and no other properties were provided, only the Base URL property is listed here.)

Output

The node outputs JSON objects representing the results of the requested blockchain operation. The structure varies depending on the operation:

  • For transaction creation operations (e.g., transfer, issue, burn), the output includes:

    • transaction: The created transaction object with details like type, version, proofs, signature presence, and transaction ID.
    • status: Indicates whether the transaction was just created or successfully broadcasted.
    • broadcastResult (if broadcasted): The response from broadcasting the transaction to the network.
    • broadcastError (if broadcasting failed): Error message describing the failure.
    • debug: Detailed metadata about the operation, parameters, timestamps, and success flags.
  • For query operations (e.g., get account balance, get token details), the output contains the JSON response from the DecentralChain API corresponding to the requested data.

  • For utility operations (e.g., generate address, validate address), the output contains the relevant information returned by the API.

The node does not output binary data.

Dependencies

  • Requires the external library @decentralchain/waves-transactions (or fallback to @waves/waves-transactions) for creating and signing transactions.
  • Uses HTTP requests to interact with the DecentralChain node API at the specified Base URL.
  • Optionally requires credentials containing the API base URL; otherwise, uses the Base URL parameter.
  • For signing transactions, requires either a seed phrase, private key, or sender public key (for unsigned transactions).
  • Network selection via Chain ID (? for mainnet, ! for testnet).

Troubleshooting

  • Library Loading Failure: If the required transaction library fails to load, the node falls back to mock functions and logs errors. This will prevent actual transaction signing and broadcasting. Ensure the library is installed correctly in the n8n environment.
  • Broadcast Failures: Errors during broadcasting transactions are caught and included in the output. Common causes include network issues, invalid transaction data, or insufficient funds. Check the error message and verify transaction parameters.
  • Missing Credentials or Parameters: If required authentication data (seed phrase, private key, or public key) is missing or incorrect, transaction creation will fail.
  • API Endpoint Errors: Query operations depend on the DecentralChain node API availability and correctness of parameters like addresses or asset IDs. Invalid inputs may result in API errors.
  • Unsigned Transactions: When creating unsigned transactions, the sender's public key must be provided; otherwise, transaction creation will fail.

Links and References

Discussion