Actions25
- Account Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node enables users to create, sign, and optionally broadcast DecentralChain (DCC) blockchain transactions specifically for transferring DCC tokens or other assets. It supports multiple authentication methods for signing transactions, 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 messages to transfers.
- Automating token transfers within workflows that interact with the DecentralChain blockchain.
For example, a user can automate payments by specifying recipient addresses and amounts, then either sign and broadcast the transaction immediately or generate an unsigned transaction for manual review and signing.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base API URL of the DecentralChain node to connect 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 using Seed Phrase method). |
| Private Key | Private key used to sign the transaction (required if using Private Key method). |
| 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 signed transaction after creation (only applies to signed txns). |
| Recipient Address | The DCC address or alias to send tokens to (format: alias:?:myalias for mainnet). |
| 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 message attached to the transaction, base58 encoded. |
Output
The node outputs a JSON object containing details about the created transaction and its status:
transaction: The full transaction object created by the library, including fields like transaction type, version, proofs, signature, and transaction ID.status: Indicates whether the transaction was just created (created), successfully broadcasted (broadcasted), or if broadcasting failed (broadcast_failed).broadcastResult: Present if broadcasting succeeded, contains the response from the blockchain node.broadcastError: Present if broadcasting failed, contains the error message.debug: Contains metadata useful for troubleshooting, such as operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details summary.
If the transaction is unsigned, the output will contain the unsigned transaction data without signatures.
No binary data output is produced by this node.
Dependencies
- Requires the
@decentralchain/waves-transactionslibrary (or compatible alternative) for transaction creation and signing. - Access to a DecentralChain node API endpoint (specified by Base URL or credentials) to broadcast transactions.
- If broadcasting is enabled, network connectivity to the specified DecentralChain node is necessary.
- Credentials or parameters must provide either a seed phrase or private key for signing unless creating unsigned transactions.
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 real transactions from being created or broadcasted. Ensure the library is installed correctly in the n8n environment.
- Missing Required Parameters: Errors occur if required fields like recipient address, amount, or signing keys are missing. Verify all mandatory inputs are provided.
- Broadcast Failures: Network issues, invalid transaction data, or node API errors can cause broadcast failures. The node returns detailed error messages in
broadcastError. Check network connectivity and validity of transaction parameters. - Unsigned Transactions: When creating unsigned transactions, ensure the sender public key is provided. These transactions cannot be broadcasted automatically.
- Incorrect Chain ID: Using the wrong chain ID may cause transactions to be rejected by the network. Confirm the correct network (Mainnet or Testnet) is selected.
Links and References
This summary covers the "Transaction" resource with the "Transfer DCC/tokens" operation based on the provided source code and property definitions.