DecentralChain (DCC) icon

DecentralChain (DCC)

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

Overview

This node facilitates creating, signing, and optionally broadcasting DecentralChain (DCC) blockchain transactions specifically for the "Update Asset Info" operation under the "Transaction" resource. It allows users to update metadata such as the name and description of an existing asset on the DCC blockchain.

Typical use cases include:

  • Updating token or asset information after issuance to reflect new branding or corrected details.
  • Managing asset metadata dynamically without issuing a new token.
  • Automating asset info updates as part of larger workflows involving token management.

For example, a user might update the description of a token to provide more accurate or detailed information about its purpose or features.

Properties

Name Meaning
Base URL The base API endpoint URL to connect to the DCC node if no credential is supplied. Default: https://nodes.decentralchain.io
Authentication Method How to sign the transaction. Options: Seed Phrase, Private Key, Create Unsigned Transaction
Seed Phrase Secret seed phrase used to sign the transaction (required if using Seed Phrase authentication)
Private Key Private key used to sign the transaction (required if using Private Key authentication)
Sender Public Key Public key of the sender, required when creating unsigned transactions
Chain ID Network identifier to create the transaction for. Options: Mainnet (?), Testnet (!)
Auto Broadcast Whether to automatically broadcast the signed transaction to the network after signing (boolean)

Output

The node outputs a JSON object containing:

  • transaction: The created transaction object with details such as type, version, proofs, signature presence, and transaction ID.
  • broadcastResult (if auto broadcast is enabled and successful): The response from the network after broadcasting the transaction.
  • status: Indicates whether the transaction was just created (created), successfully broadcasted (broadcasted), or if broadcasting failed (broadcast_failed).
  • broadcastError (if broadcasting fails): Error message describing why broadcasting failed.
  • debug: Contains metadata useful for troubleshooting, including operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details.

If the transaction is unsigned, the output notes that the transaction is unsigned and not broadcasted.

Dependencies

  • Requires the external library @decentralchain/waves-transactions for transaction creation and signing. If this library is unavailable, mock functions are used but real blockchain interaction will not occur.
  • Requires access to a DCC node API endpoint, either via credentials or the specified Base URL.
  • For signing transactions, requires either a seed phrase or private key depending on the chosen authentication method.
  • Network selection via Chain ID must correspond to the target blockchain environment (Mainnet or Testnet).

Troubleshooting

  • Library Loading Failure: If the @decentralchain/waves-transactions library cannot be loaded at runtime, the node falls back to mock implementations which do not perform real transactions. Ensure the library is installed in the n8n environment.
  • Broadcast Failures: Errors during broadcasting may occur due to network issues, invalid transaction data, or incorrect authentication. The error message is included in the output for diagnosis.
  • Missing Required Parameters: Omitting required fields like seed phrase, private key, or sender public key (for unsigned transactions) will cause errors.
  • Incorrect Chain ID: Using the wrong Chain ID for the intended network can lead to transaction rejection.
  • Auto Broadcast Disabled: If auto broadcast is false, the transaction is only created and returned but not sent to the network; users must handle broadcasting separately.

To resolve common errors:

  • Verify credentials and authentication method correctness.
  • Confirm network connectivity to the specified Base URL.
  • Check parameter completeness and validity.
  • Enable auto broadcast if immediate transaction submission is desired.

Links and References


This summary focuses exclusively on the "Update Asset Info" operation within the "Transaction" resource as requested.

Discussion