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 "Burn Tokens" transaction on the DecentralChain blockchain network. Burning tokens means permanently destroying a specified amount of a particular asset, effectively reducing its total supply.

Typical use cases include:

  • Token issuers wanting to reduce circulating supply.
  • Users or projects implementing tokenomics that require token burning for deflationary effects.
  • Smart contract interactions where burning tokens is part of business logic.

For example, a project might burn 1000 units of their token to decrease supply and increase scarcity, which can be done by configuring this node with the asset ID and quantity to burn.

Properties

Name Meaning
Base URL The base URL of the DecentralChain node API to connect to if no credential base URL is provided.
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 only when creating an unsigned transaction.
Chain ID Network identifier to create the transaction for: Mainnet (?) or Testnet (!).
Auto Broadcast Whether to automatically broadcast the signed transaction to the network after creation.
Asset ID Identifier of the asset/token to burn (required).
Amount to Burn Quantity of the asset to burn in smallest units (required).

Output

The node outputs a JSON object containing:

  • transaction: The created transaction object including details such as transaction type, version, proofs, signature presence, and transaction ID.
  • broadcastResult (if auto broadcast is enabled and successful): The response from the blockchain 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 about the operation, chain ID, authentication method, base URL, timestamps, and transaction details useful for troubleshooting.

If the transaction is unsigned, the output notes that it is an unsigned transaction and does not broadcast.

Dependencies

  • Requires the external library for DecentralChain transactions (@decentralchain/waves-transactions or compatible).
  • Access to a DecentralChain node API endpoint (configurable via Base URL or credentials).
  • For signing transactions, requires either a seed phrase or private key depending on the chosen authentication method.
  • Optional: Network connectivity to broadcast transactions if auto broadcast is enabled.

Troubleshooting

  • Library Loading Failure: If the underlying transaction library fails to load, the node falls back to mock functions and logs errors. This will prevent actual transaction creation and broadcasting.
  • Missing Credentials: Ensure that the seed phrase or private key is provided when required; otherwise, transaction signing will fail.
  • Broadcast Failures: Errors during broadcasting may occur due to network issues, invalid transaction data, or node API problems. The error message is included in the output for diagnosis.
  • Unsigned Transactions: When creating unsigned transactions, remember that these must be signed and broadcasted externally; the node will not broadcast them automatically.
  • Invalid Asset ID or Quantity: Providing incorrect asset IDs or quantities may cause transaction creation to fail.

Links and References

Discussion