DecentralChain (DCC) icon

DecentralChain (DCC)

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

Overview

This node facilitates creating, signing, and optionally broadcasting a new token issuance transaction on the DecentralChain blockchain network. It allows users to define the token's properties such as name, description, total supply, decimal precision, and whether the token is reissuable (i.e., if more tokens can be minted later). The node supports multiple authentication methods for signing the transaction, including using a seed phrase, a private key, or creating an unsigned transaction for external signing.

Typical use cases include:

  • Launching a new custom token on the DecentralChain network.
  • Automating token creation workflows within broader blockchain-based applications.
  • Preparing unsigned token issuance transactions for offline signing or multi-party approval processes.

Example: A user wants to create a new utility token named "MyToken" with a fixed supply of 1 million units, 8 decimal places, and no further minting allowed. They provide the token details and their seed phrase to sign and broadcast the issuance transaction automatically.

Properties

Name Meaning
Base URL Base URL of the DecentralChain node API to connect to if no credential base URL is supplied.
Authentication Method How to sign the transaction: Seed Phrase, Private Key, or Create Unsigned Transaction.
Seed Phrase Secret seed phrase used to sign the transaction (required if auth method is Seed Phrase).
Private Key Private key used to sign the transaction (required if auth method is Private Key).
Sender Public Key Public key of the sender, required when creating an unsigned transaction.
Chain ID Network identifier: Mainnet (?) or Testnet (!).
Auto Broadcast Whether to automatically broadcast the signed transaction to the network after creation.
Token Name Name of the new token to be issued.
Token Description Description text describing the new token.
Total Supply Total supply of the token in smallest units (e.g., satoshis).
Decimal Places Number of decimal places the token supports (0 to 8).
Reissuable Boolean indicating if the token supply can be increased later (true/false).

Output

The node outputs a JSON object containing:

  • transaction: The created transaction object representing the token issuance, including fields like transaction type, version, proofs, and signature presence.
  • broadcastResult (optional): If auto-broadcast is enabled and successful, this contains the response from the blockchain network confirming the broadcast.
  • status: Indicates the state of the transaction, e.g., "created", "broadcasted", or "broadcast_failed".
  • broadcastError (optional): Error message if broadcasting failed.
  • debug: Detailed debug information including operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details useful for troubleshooting.

If the transaction is unsigned, the output will contain the unsigned transaction data ready for external signing.

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 unless creating unsigned transactions.
  • Optionally requires network connectivity to broadcast the transaction.
  • Uses the @decentralchain/waves-transactions library (or compatible) for transaction creation and signing.
  • No special environment variables are needed beyond standard n8n credential configuration for API access.

Troubleshooting

  • Library Loading Failure: If the underlying transaction library fails to load, the node falls back to mock functions which do not perform real operations. This results in mock transaction IDs and no actual blockchain interaction. Ensure the @decentralchain/waves-transactions package is installed and accessible in the n8n environment.
  • Invalid Attachment Errors: Although not relevant for token issuance, other transaction types may throw errors if attachments exceed size limits or are invalid base58 strings.
  • Broadcast Failures: Network issues or incorrect Base URL can cause broadcasting to fail. Check connectivity and correct API endpoint configuration.
  • Missing Required Parameters: Omitting required fields like token name, description, quantity, or authentication credentials will cause errors.
  • Unsigned Transactions: When creating unsigned transactions, the sender public key must be provided; otherwise, transaction creation will fail.
  • Decimal Places Range: Decimal places must be between 0 and 8 inclusive; values outside this range will cause validation errors.

Links and References

Discussion