Actions25
- Account Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node enables users to create, sign, and optionally broadcast a Cancel Lease transaction on the DecentralChain (DCC) blockchain network. The Cancel Lease operation is used to cancel an active lease of DCC tokens that was previously made to another address. This can be useful when you want to stop leasing your tokens for network rewards or other purposes.
Typical use cases include:
- Reclaiming control over leased tokens before the lease period ends.
- Managing token leasing dynamically based on changing network conditions or personal preferences.
- Automating lease cancellations as part of larger workflows involving token management.
For example, if you have leased some DCC tokens to a validator but want to cancel that lease to transfer or use those tokens elsewhere, this node facilitates creating and broadcasting the necessary cancel lease transaction.
Properties
| Name | Meaning |
|---|---|
| Base URL | The base URL of the DCC node API to send requests to, used if no credential base URL is provided. |
| 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 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 if creating an unsigned transaction. |
| Chain ID | Network identifier to create the transaction for: Mainnet (?) or Testnet (!). |
| Auto Broadcast | Whether to automatically broadcast the signed transaction to the network after creation. |
| Lease ID | The unique identifier of the lease transaction that you want to cancel (required). |
Output
The node outputs a JSON object containing details about the created cancel lease transaction and its status:
transaction: The full transaction object representing the cancel lease transaction, including fields like transaction type, version, proofs, and signature presence.broadcastResult(if auto broadcast is enabled and successful): The response from the network after broadcasting the transaction.status: Indicates whether the transaction was just created (created), successfully broadcasted (broadcasted), or if broadcasting failed (broadcast_failed).broadcastError(if broadcasting failed): Contains error message details.debug: Additional debug information such as operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction metadata.
If the transaction is created unsigned, the output notes that auto-broadcast is disabled and provides the unsigned transaction data.
Dependencies
- Requires the external library
@decentralchain/waves-transactions(or compatible alternative) for transaction creation and signing. - Needs access to a DecentralChain node API endpoint (specified by Base URL or credentials) to broadcast transactions.
- Requires either a seed phrase or private key for signing unless creating unsigned transactions.
- Optional: n8n credentials configuration for the DCC API base URL.
Troubleshooting
- Library Loading Failure: If the required transaction library fails to load at runtime, the node falls back to mock functions which do not perform real transactions. Ensure the
@decentralchain/waves-transactionspackage is installed and accessible in the environment. - Missing or Invalid Credentials: Errors occur if the seed phrase or private key is missing or invalid when required for signing. Verify input values and authentication method selection.
- Broadcast Failures: Network errors or invalid transaction data can cause broadcasting to fail. Check the error messages returned in
broadcastErrorfor clues, and verify the Base URL and network connectivity. - Unsigned Transaction Usage: When creating unsigned transactions, remember that auto broadcast is disabled and you must handle signing and broadcasting externally.
- Invalid Lease ID: Providing an incorrect or non-existent lease ID will result in transaction creation failure. Confirm the lease ID corresponds to an active lease transaction.
Links and References
- DecentralChain Documentation – Official docs for understanding transactions and leasing.
- Waves Transactions Library – Underlying library used for transaction creation and signing.
- DecentralChain Node API Reference – API endpoints for broadcasting and querying transactions.