Actions25
- Account Actions
- Token/Asset Actions
- Transaction Actions
- Utility Actions
Overview
This node operation "Issue New Token" allows users to create a new token asset on the DecentralChain blockchain. It constructs and optionally signs a transaction that issues a new token with specified parameters such as name, description, total supply, decimals, and reissuability. The node supports signing the transaction using either a seed phrase, a private key, or creating an unsigned transaction for external signing.
Typical use cases include:
- Launching a new cryptocurrency or utility token on DecentralChain.
- Creating tokens for in-app currencies, loyalty points, or digital collectibles.
- Preparing unsigned token issuance transactions for offline signing or multi-party approval workflows.
Example: A user wants to issue a new token named "MyToken" with a total supply of 1 million units (expressed in smallest units), 8 decimal places, and allow future reissuance. They provide their seed phrase to sign and optionally broadcast the transaction automatically.
Properties
| Name | Meaning |
|---|---|
| Base URL | Base URL of the DecentralChain node API to connect 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 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 when creating unsigned transactions. |
| Chain ID | Network identifier: Mainnet (?) or Testnet (!). |
| Auto Broadcast | Whether to automatically broadcast the signed transaction to the network after creation. |
| Token Name | Name of the new token to be issued (required). |
| Token Description | Description of the new token (required). |
| Total Supply | Total token supply expressed in smallest units (required). |
| Decimal Places | Number of decimal places for the token (0-8). Default is 8. |
| Reissuable | Boolean indicating if the token supply can be increased later. |
Output
The output JSON contains details about the created transaction and its status:
transaction: The full transaction object representing the issued token transaction, including fields like type, version, proofs, signature, and transaction ID.status: Indicates whether the transaction was just created (created) or successfully broadcasted (broadcasted).broadcastResult: Present if auto broadcasting is enabled and successful; contains the response from the blockchain node.broadcastError: Present if broadcasting failed; contains error message details.debug: Contains metadata useful for troubleshooting, such as operation name, chain ID, authentication method, base URL, transaction ID, timestamp, and transaction details like number of proofs and presence of signature.
If the transaction is created unsigned, the output includes the unsigned transaction data for external signing.
Dependencies
- Requires the
@decentralchain/waves-transactionslibrary for transaction construction and signing. - Needs access to a DecentralChain node API endpoint (configurable via Base URL or credentials).
- Requires either a seed phrase or private key credential for signing unless creating unsigned transactions.
- Optional automatic broadcasting requires network connectivity to the specified node API.
Troubleshooting
- Library Loading Failure: If the underlying transaction library fails to load, the node falls back to mock functions and logs errors. Ensure the
@decentralchain/waves-transactionspackage is installed and accessible. - Missing Credentials: Errors occur if required signing credentials (seed phrase or private key) are not provided when needed.
- Broadcast Failures: Network issues or invalid transaction data can cause broadcasting to fail. Error messages include stack traces truncated to first few lines for clarity.
- Invalid Parameters: Providing invalid token parameters (e.g., negative decimals, empty token name) will prevent transaction creation.
- Unsigned Transactions: When creating unsigned transactions, the sender public key must be provided; otherwise, transaction creation fails.
To resolve errors:
- Verify all required input properties are correctly set.
- Confirm network connectivity and correct Base URL.
- Check that credentials are valid and properly configured.
- Review debug information included in the output for detailed error context.