DecentralChain (DCC)
Actions36
- Account Actions
- Matcher Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node facilitates creating, signing, and optionally broadcasting a "Token Sponsorship" transaction on the DecentralChain blockchain network. Token sponsorship allows enabling or disabling fee sponsorship for a specific token, which means that transaction fees can be paid in that token instead of the native currency.
Typical use cases include:
- Enabling sponsorship for a newly issued token so users can pay fees with it.
- Disabling sponsorship when you want to revert to paying fees in the native token.
- Managing token economics by controlling how transaction fees are handled.
For example, a token issuer might use this node to enable sponsorship after issuing a token, allowing holders to transact using that token to pay fees.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL of the DecentralChain node API to connect to if no credential is supplied. |
| Authentication Method | How the transaction will be signed: Seed Phrase, Private Key, or create an 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 if 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. |
Output
The node outputs a JSON object containing:
transaction: The created transaction object including its details such as type, version, proofs, and signature presence.broadcastResult(optional): The response from the network if auto-broadcasting was enabled and successful.status: Indicates whether the transaction was just created (created), successfully broadcasted (broadcasted), or if broadcasting failed (broadcast_failed).broadcastError(optional): Error message if broadcasting failed.debug: Contains metadata about the operation, including timestamps, chain ID, authentication method, base URL, transaction ID, and transaction details useful for troubleshooting.
No binary data output is produced by this operation.
Dependencies
- Requires access to a DecentralChain node API endpoint (Base URL) to submit transactions.
- Uses an external library for transaction creation and signing (
@decentralchain/waves-transactionsor compatible). - Requires either a seed phrase or private key credential for signing unless creating unsigned transactions.
- Optional automatic broadcasting requires network connectivity to the specified Base URL.
- No special environment variables are needed beyond standard n8n credentials setup.
Troubleshooting
- Library Loading Failure: If the underlying transaction library fails to load, the node falls back to mock functions, which will not produce real transactions. Ensure the library is installed correctly in the n8n environment.
- Invalid Attachment Errors: Attachments must be valid base58 strings or UTF-8 text under 140 bytes. Invalid attachments cause errors.
- Broadcast Failures: Network issues or incorrect Base URL can cause broadcasting to fail. Check connectivity and correct API endpoint.
- Missing Credentials: Signing requires either a seed phrase or private key depending on the chosen authentication method. Missing these will cause errors.
- Unsigned Transactions: When creating unsigned transactions, the sender public key must be provided explicitly.
- Chain ID Mismatch: Using the wrong Chain ID for your network (Mainnet vs Testnet) may cause transaction rejection.
Common error messages:
"Attachment is not valid base58": Fix attachment encoding or switch to plain text mode."Failed to create transaction": Verify all required parameters and credentials."Invalid JSON in Order JSON": Not applicable here but common in matcher operations; ensure JSON inputs are well-formed.
Links and References
- DecentralChain Official Node API (example base URL)
- Waves Transactions Library GitHub (similar library used)
- DecentralChain Documentation (for detailed blockchain concepts and transaction types)
This summary covers the "Token Sponsorship" operation within the Transaction resource, focusing on transaction creation, signing, and optional broadcasting on the DecentralChain network.