Overview
Testing Guide
Learn how to test your token issuance and operations on Spark
Prerequisites
- Node.js 16+
- Spark CLI tool
Using our Spark CLI tool
We have a CLI tool that allows you to test your wallet operations on Spark. No coding is required!
To install the CLI tool, you can run:
Go to the examples folder:
Install dependencies:
Start the CLI tool:
This will start the CLI tool and you will be able to interact with the wallet. Run help
to see the available commands.
Command Reference
Command | Usage |
---|---|
initwallet | initwallet <mnemonic/seed> - Creates a new wallet instance. If no mnemonic provided, generates one |
getbalance | Gets the current wallet balance as well the token balance |
getsparkaddress | Gets a new Spark Address for receiving transfers |
announcetoken | announcetoken <tokenname> <tokenticker> <decimals> <maxsupply> <isfreezable> - Mint a certain amount of tokens |
minttokens | minttokens <amount> - Mint a certain amount of tokens |
transfertokens | transfertokens <tokenPubKey> <amount> <receiverSparkAddress> - Sends tokens to the given receiver Spark Address |
burntokens | burntokens <amount> - Burns the specified amount of tokens |
freezetokens | freezetokens <sparkaddress> - Freezes tokens at the Spark Address |
unfreezetokens | unfreezetokens <sparkaddress> - Unfreezes tokens at the Spark Address |
tokenactivity | Gets the token activity for the issuer’s token |
tokeninfo | Gets the token info for the issuer’s token |
help | Shows the help menu |
exit | Exits the CLI tool |
Demo application
The fully built Demo Application is available Here
Sample express server project
Clone the SDK repo
Navigate to project directory
Follow the instructions in the README to install dependencies and run the server.