Skip to content

Spark RPC Commands

justanwar edited this page Mar 20, 2024 · 1 revision

Accounting

Command Parameters Description
getbalance Returns the wallet's transparent balance.
getprivatebalance Returns the wallet's private balance for all types of private protocols (Sigma/Lelantus/Spark).
getsparkaddressbalance address Returns the Spark address balance in JSON format.
getsparkbalance Returns the wallet's Spark balance only.
gettotalbalance Returns the wallet's total private and transparent balance.

Addresses

Command Parameters Description
getallsparkaddresses Returns an array of Spark addresses and their diversifiers.
getnewsparkaddress Returns a new Spark address.
getsparkdefaultaddress Returns the wallet's default Spark address.

The returned address will always be the same.

Payment

Command Parameters Description
automintspark Wallet must be unlocked.

Automatically anomyizes (mints) all unspent transparent balance.
listsparkmints Wallet must be unlocked.

List all spent and unspent Spark mints.
listsparkspends List all Spark spends.
listunspentsparkmints Wallet must be unlocked.

List only unspent Spark mints.
mintspark {"address":{amount,memo...}} Wallet must be unlocked.

Anonymizes (mints) transparent balance to a Spark address.

The Spark address can be your own or a third-party's.
spendspark {"address":{amount,subtractfee...}} Wallet must be unlocked.

Sends privately if to a Spark address, or deshields if to a transparent address.

Others

Command Parameters Description
getsparkcoinaddr "txHash" Returns an array of Spark address, address memo, and amount if the transaction is to you.
identifysparkcoins "txHash" Identifies Spark in the transaction and adds it into the wallet if it belongs to you.
Clone this wiki locally