DecentralChain (DCC)
Create, sign and broadcast DecentralChain transactions, plus query blockchain data
Actions36
- Account Actions
- Matcher Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node facilitates creating, signing, and optionally broadcasting a "Set Asset Script" transaction on the DecentralChain (DCC) blockchain network. The operation allows users to attach or update a script associated with a specific asset, enabling custom logic or rules for that asset.
Common scenarios where this node is beneficial include:
- Adding smart contract logic to an existing token/asset.
- Updating asset behavior by setting or changing its script.
- Managing asset permissions or restrictions via scripts.
Practical example:
- A user wants to enforce transfer restrictions on a token they issued by attaching a validation script. They use this node to create and sign a Set Asset Script transaction, then broadcast it to the DCC network.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL of the DCC node API to send requests to if no credential base URL is provided. |
| 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 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: Mainnet (?) or Testnet (!). |
| Auto Broadcast | Whether to automatically broadcast the signed transaction after creation (only for signed tx). |
Output
The node outputs a JSON object containing details about the created transaction and, if enabled, the result of broadcasting it to the network.
Output fields include:
transaction: The full transaction object created by the library, including its ID, type, version, proofs, and signature presence.broadcastResult(optional): The response from the network after broadcasting the transaction.status: Indicates whether the transaction was just created (created), successfully broadcast (broadcasted), or if broadcasting failed (broadcast_failed).broadcastError(if any): Error message returned if broadcasting fails.debug: Contains metadata such as operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details useful for troubleshooting.
No binary data output is produced by this node.
Dependencies
- Requires the external
@decentralchain/waves-transactionslibrary (or compatible alternative) for transaction creation and signing. - Needs access to a DCC node API endpoint (Base URL) to broadcast transactions.
- Requires either a seed phrase or private key credential for signing, unless creating unsigned transactions.
- Optional environment setup for credentials storing API URLs and keys.
- Uses base58 encoding/decoding utilities for attachments (not directly relevant here but part of the bundled code).
Troubleshooting
- Library Loading Failure: If the underlying transaction library fails to load, the node falls back to mock functions which do not perform real transactions. Ensure the
@decentralchain/waves-transactionspackage is installed and accessible in the n8n environment. - Invalid Attachment Errors: Although not directly related to Set Asset Script, other operations may fail if attachments exceed size limits or are invalid base58 strings.
- Broadcast Failures: Common errors during broadcasting include network issues or invalid transaction signatures. Check the error message in
broadcastErrorand verify credentials and network connectivity. - Missing Required Parameters: Ensure all required properties like seed phrase/private key or sender public key (for unsigned) are provided.
- Chain ID Mismatch: Using the wrong chain ID can cause transaction rejection; confirm you select the correct network (Mainnet or Testnet).
- Auto Broadcast Disabled: If auto broadcast is off, remember to manually broadcast the transaction later.