This project is intended to provide an example of how to integrate the Solar Network Blockchain SDK into a node.js application. It implements a command line interface to perform tasks such as check wallet balance, sign / verify messages, and send transactions.
npm install
In package.json file configure the ip address of your Solar relay node via nodeIP parameter.
In package.json file configure the network(testnet or mainnet) via network parameter.
To get list of commands: solar-cli --help
To get help on each command: solar-cli <command> --help
- solar-cli relay Get status of relay node used for accessing blockchain
- solar-cli validate Validate a wallet address
- solar-cli peers Get list of peers
- solar-cli nonce Get nonce of wallet
- solar-cli balance Get balance of wallet
- solar-cli sign Sign message using Schnorr algorithm
- solar-cli verify Verify Signature using Schnorr algorithm
- solar-cli tx Send transaction with optional memo message
- solar-cli tx-ipfs Send IPFS transaction with optional memo message
- solar-cli vote Send a vote transaction with optional memo message
Description: Get status of relay node used for accessing blockchain
Options: none
Description: Validate a wallet address
Options:
--adr wallet address
Description: Get list of peers
Options: none
Description: Get nonce of a wallet
Options:
--adr wallet address
Description: Get balance of a wallet
Options:
--adr wallet address
Description: Sign message using bip340 Schnorr algorithm
Options:
--msg Message to be signed
--passphrase Your Private Passphrase(12 words)
Description: Verify Signature using bip340 Schnorr algorithm
Options:
--msg Message to be signed
--publicKey Public key of sender
--signature Message signature
Description: Send transaction with optional smartbridge message
Options:
--adr Recipient's Address
--amt Amount of coins to send
--fee Transaction fee amount
--passphrase Your Private Passphrase(12 words)
--memo Message to include with transaction(optional)
Description: Send IFPS transaction with optional memo message
Options:
--hash IPFS Hash
--fee Transaction fee amount
--passphrase Your Private Passphrase(12 words)
--memo Message to include with transaction(optional)
Description: Send a Vote transaction with optional memo message
Options:
--delegate 'JSON encoded Delegate Vote Asset'
--fee Transaction fee amount
--passphrase Your Private Passphrase(12 words)
--memo Message to include with transaction(optional)