Skip to content

Spark RPC calls

justanwar edited this page Jan 24, 2024 · 1 revision

Note: In Firo's Spark context, minting refers to the anonymizing/shielding action while spending refers to the private sending (if to a Spark address) or deanonymizing/deshielding action (if to a transparent address).

The wallet can be unlocked with walletpassphrase "YOUR PASSWORD" X where X is the amount of seconds you want to keep it unlocked.

Minting and Spending

mintspark {"address":{amount,memo...}}

Anonymizes the amount to the specified Spark address. The address can be your own or an external one.

Example:

mintspark "{\"st1s9743nwh4vade7t6mztcykgzrs0e7j4rvults9v0pgqc369j2fmvs2hvngnv8k3cfar2glalktgz8253pjac8etjtvqfzn64h5ruvh0f0xz6jcd9fw4s7sxzf0hlnur5htkd9ngyxhrpu\":{\"amount\":10, \"memo\":\"\"}}"

spendspark {"address":{amount,subtractfee...}, "address":{amount,memo,subtractfee...}}

Redeems the amount to the specified Spark or transparent address. Not usable with exchange addresses as they can only accept from a transparent balance.

Example:

spendspark "{\"TABS5HkVo4VEjeWpKTsUFxsvDdxg7U7LEf\":{\"amount\":10, \"memo\":\"\", \"subtractFee\": false}}"

spendspark "{\"st1s9743nwh4vade7t6mztcykgzrs0e7j4rvults9v0pgqc369j2fmvs2hvngnv8k3cfar2glalktgz8253pjac8etjtvqfzn64h5ruvh0f0xz6jcd9fw4s7sxzf0hlnur5htkd9ngyxhrpu\":{\"amount\":10, \"memo\":\"\", \"subtractFee\": false}}"

Spark (Private) Balance

getsparkaddressbalance

Returns the private balance (available, unconfirmed, and full) of the specified Spark address.

getsparkbalance

Returns the wallet's total private balance (Spark only, excluding Lelantus)

Spark addresses

getsparkdefaultaddress

Returns the default Spark address.

getnewsparkaddress

Returns a new Spark address.

getallsparkaddresses

Lists all Spark address.

Miscellaneous

listunspentsparkmints

(Requires wallet unlock)

List all unused Spark mints.

listsparkmints

(Requires wallet unlock)

List all Spark mints, used and unused.

listsparkspends

Lists all Spark spends.

lelantustospark

Migrates any remaining Lelantus mints by spending them to a transparent address, then minting them into Spark. This will take a while if you have a lot of Lelantus mints.

identifysparkcoin "txHash"

Identifies any Spark coins in the transaction and adds them into the wallet if it is yours.

Clone this wiki locally