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 transferring DCC tokens or other assets. It supports multiple authentication methods including seed phrase, private key, or creating unsigned transactions for external signing.

Typical use cases include:

  • Sending DCC tokens or custom assets from one address to another.
  • Attaching optional data payloads to transfers (e.g., messages or metadata).
  • Creating unsigned transactions for offline signing workflows.
  • Automatically broadcasting signed transactions to the DCC network.

Practical examples:

  • Transferring 10 DCC tokens to a recipient address with a plain text note attached.
  • Sending a custom asset token to an alias on the mainnet.
  • Generating an unsigned transfer transaction to be signed later by a hardware wallet.
  • Automatically broadcasting a signed transfer using a private key credential.

Properties

Name Meaning
Base URL The base URL of the DCC node API to send requests to if no credential 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 unsigned transactions.
Chain ID Network identifier: Mainnet (?) or Testnet (!).
Auto Broadcast Whether to automatically broadcast the transaction after signing (only valid for Seed Phrase or Private Key).
Recipient Address The DCC address or alias to which tokens will be transferred.
Amount Amount to transfer in smallest units (e.g., 100000000 = 1 DCC).
Asset ID Identifier of the asset/token to transfer; leave empty to transfer native DCC tokens.
Attachment Optional attachment data to include with the transfer transaction. Can be None, Plain Text, or Base58 encoded.

Attachment options details:

  • Mode: None, Plain Text, or Base58.
  • Attachment Text: Plain text to encode as base58 (max 140 bytes UTF-8).
  • Attachment (Base58): Base58-encoded bytes (max 140 bytes decoded).

Output

The node outputs a JSON object per input item containing:

  • transaction: The created transaction object including fields like id, type, proofs, signature, etc.
  • broadcastResult (optional): Result returned from broadcasting the transaction to the network.
  • status: Indicates whether the transaction was "created", "broadcasted", or if broadcasting failed ("broadcast_failed").
  • broadcastError (if any): Error message if broadcasting failed.
  • debug: Detailed debug information including operation name, chain ID, auth method, base URL, transaction ID, timestamp, and transaction details such as type, version, number of proofs, and presence of signature.

If auto-broadcast is disabled or the transaction is unsigned, only the created transaction is output without broadcasting results.

No binary data output is produced by this operation.

Dependencies

  • Requires access to a DecentralChain node API endpoint (configurable via Base URL or credentials).
  • Uses an external library for transaction creation and signing (@decentralchain/waves-transactions or compatible).
  • For broadcasting, requires network connectivity to the specified node URL.
  • If using authentication methods involving keys, appropriate secure storage of seed phrases or private keys is necessary.
  • No internal credential names are exposed; users must supply their own API URLs and keys as needed.

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.
  • Invalid Attachment: Attachments must be valid base58 or plain text under 140 bytes UTF-8. Invalid attachments cause errors.
  • Missing Required Fields: Omitting required parameters like recipient, amount, or keys will cause errors.
  • Broadcast Failures: Network issues or invalid transaction signatures can cause broadcast errors. The error message and stack trace are included in output for diagnosis.
  • Unsigned Transactions: When creating unsigned transactions, the sender public key must be provided; otherwise, transaction creation fails.
  • Auto Broadcast Disabled: If auto broadcast is false, the transaction is created but not sent to the network. Users must handle broadcasting separately.

To resolve common errors:

  • Verify all required inputs are provided and correctly formatted.
  • Ensure the attachment size and encoding meet limits.
  • Confirm network connectivity and correct Base URL.
  • Use valid seed phrase or private key for signing.
  • Check debug output for detailed error context.

Links and References

Discussion