DecentralChain (DCC) icon

DecentralChain (DCC)

Create, sign and broadcast DecentralChain transactions, plus query blockchain data

Overview

This node enables creating, signing, and optionally broadcasting DecentralChain blockchain transactions. Specifically for the Transaction - Create Alias operation, it allows users to create a new alias on the blockchain associated with their address. An alias is a human-readable identifier (4-30 alphanumeric characters) that can be used instead of a complex blockchain address.

Common scenarios where this node is beneficial include:

  • Simplifying user experience by replacing long addresses with easy-to-remember aliases.
  • Managing blockchain identities in decentralized applications.
  • Automating alias creation as part of onboarding or account setup workflows.

Example use case: A dApp wants to assign a unique alias to each user’s wallet address automatically upon registration, making it easier to send tokens or interact with smart contracts using aliases.

Properties

Name Meaning
Base URL The base URL of the DecentralChain node API to connect to if no credential is supplied.
Authentication Method How to sign the transaction. Options: Seed Phrase, Private Key, or Create Unsigned Transaction.
Seed Phrase Secret seed phrase used to sign the transaction (required if "Seed Phrase" auth method selected).
Private Key Private key used to sign the transaction (required if "Private Key" auth method selected).
Sender Public Key Public key of the sender, required when creating an unsigned transaction.
Chain ID Network identifier to create the transaction for. Options: Mainnet (?) or Testnet (!).
Auto Broadcast Whether to automatically broadcast the signed transaction after creation (only for Seed Phrase or Private Key methods).
Alias Name The alias name to create on the blockchain. Must be 4-30 alphanumeric characters.

Output

The node outputs a JSON object containing:

  • transaction: The created transaction object including its ID and type.
  • status: Indicates whether the transaction was just created or successfully broadcasted (created or broadcasted).
  • broadcastResult (if broadcasted): The result returned from the blockchain network after broadcasting.
  • broadcastError (if broadcasting failed): Error message describing why broadcasting failed.
  • debug: Detailed debug information including operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details such as type, version, proofs count, and signature presence.

If the transaction is created unsigned, the output notes that auto-broadcast is disabled and includes the unsigned transaction data.

Dependencies

  • Requires the external library @decentralchain/waves-transactions for transaction creation and signing.
  • Needs access to a DecentralChain node API endpoint (configurable via Base URL or credentials).
  • For signing transactions, requires either a seed phrase or private key credential, or the public key for unsigned transactions.
  • Optional HTTP requests to the blockchain node API for broadcasting transactions.

Troubleshooting

  • Library Loading Failure: If the waves-transactions library fails to load at runtime, the node falls back to mock functions which do not perform real blockchain operations. Ensure the library is installed correctly in the n8n environment.
  • Broadcast Failures: Errors during broadcasting may occur due to network issues, invalid transaction data, or incorrect authentication. Check error messages in the output's broadcastError field for details.
  • Invalid Alias Name: Alias names must be 4-30 characters and alphanumeric. Providing invalid alias names will cause transaction creation to fail.
  • Missing Credentials: Ensure that the appropriate authentication method is selected and corresponding credentials (seed phrase or private key) are provided unless creating unsigned transactions.
  • Unsigned Transactions: When creating unsigned transactions, the sender public key must be provided. Also, auto-broadcasting is not supported for unsigned transactions.

Links and References

Discussion