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: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 <tokenIdentifier> <amount> <receiverSparkAddress> - Sends tokens to the given receiver Spark Address using Bech32m token identifier (btkn1…) |
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 |