DecentralChain (DCC) icon

DecentralChain (DCC)

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

Overview

This node enables users to create, sign, and optionally broadcast a transaction on the DecentralChain (DCC) blockchain network specifically for updating asset information. The "Update Asset Info" operation allows modifying metadata such as the name or description of an existing token/asset on the blockchain.

Typical use cases include:

  • Renaming an existing token.
  • Updating the description or other informational fields of a token.
  • Managing token metadata without issuing a new token.

For example, a user who manages a token might want to update its description to reflect new features or changes in the project.

Properties

Name Meaning
Base URL The base URL of the DCC node API to connect to if no credential is supplied.
Authentication Method How the transaction will be signed: Seed Phrase, Private Key, or 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 an unsigned transaction.
Chain ID Network identifier to create the transaction for: Mainnet (?) or Testnet (!).
Auto Broadcast Whether to automatically broadcast the transaction after signing (only applicable for signed tx).

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 (optional): The response from broadcasting the transaction to the blockchain network if auto-broadcast is enabled.
  • status: Indicates whether the transaction was just created (created), successfully broadcasted (broadcasted), or if broadcasting failed (broadcast_failed).
  • broadcastError (optional): Error message if broadcasting failed.
  • debug: Contains detailed debug information including operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details like type and signature status.

If the transaction is created but not broadcasted (e.g., unsigned or auto-broadcast disabled), only the transaction and status are included.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a DecentralChain node API endpoint (Base URL).
  • Needs either a seed phrase or private key credential for signing transactions unless creating unsigned transactions.
  • Optionally requires network connectivity to broadcast the transaction.
  • Uses the external @decentralchain/waves-transactions library for transaction creation and signing. If unavailable, mock functions are used (for testing).

Troubleshooting

  • Library Loading Failure: If the external transaction library fails to load, the node falls back to mock implementations which do not perform real blockchain operations. Ensure the library is installed and accessible in the environment.
  • Invalid Attachment Errors: Although not directly relevant to updateAssetInfo, other transaction types validate attachments for base58 encoding and size limits. Similar validation errors may occur if inputs are malformed.
  • Broadcast Failures: Errors during broadcasting (e.g., network issues, invalid signatures) will be reported in the output under broadcastError. Verify credentials and network connectivity.
  • Missing Required Parameters: The node requires certain parameters depending on the authentication method. For example, seed phrase or private key must be provided for signing; sender public key is mandatory for unsigned transactions.
  • Chain ID Mismatch: Using incorrect chain ID can cause transaction rejection on the network. Confirm the correct network (Mainnet or Testnet) is selected.

Links and References


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

Discussion