
2021 Update
Ahoy mateys,
First Mate Kaks has put together some instructions on how to run Pirate using CLI. We hope that you find them useful.
CLI commands
Daemon
To run the daemon for PirateChain (use also the next command if running for the first time):
./pirated
Bootstrap
If you are running the pirate daemon for the first time, to sync faster it is recommended to download the “blockchain files” by using the following command:
./pirated -bootstrap=2
getinfo
The getinfo method returns an object containing various information about the wallet and blockchain info.
./pirate-cli getinfo
getwalletinfo
The getwalletinfo method returns an object containing various information about the wallet info.
./pirate-cli getwalletinfo
Mining
Get mining information
./pirate-cli getmininginfo
z_listaddresses
The z_listaddresses method returns the list of z addresses belonging to the wallet.
./pirate-cli z_listaddresses
z_exportkey
The z_exportkey method reveals the private z_key corresponding to z_address.
./pirate-cli z_exportkey “zs1zdg8uye2f6mzn872nm7ugqkpcuevt7g8wszme5pyv0nfc9c5xhuqezak4q53zmecezgawau7s6w”
z_exportviewingkey
The z_exportviewingkey method reveals the viewing key corresponding to z_address.
./pirate-cli z_exportviewingkey “zs1zdg8uye2f6mzn872nm7ugqkpcuevt7g8wszme5pyv0nfc9c5xhuqezak4q53zmecezgawau7s6w”
z_exportwallet
The z_exportwallet method exports all wallet keys in a human-readable format. Overwriting an existing file is not permitted.
./pirate-cli z_exportwallet “test”
z_getbalance
The z_getbalance method returns the balance belonging to the node’s wallet.
./pirate-cli z_getbalance “zs1zdg8uye2f6mzn872nm7ugqkpcuevt7g8wszme5pyv0nfc9c5xhuqezak4q53zmecezgawau7s6w”
z_getnewaddress
The z_getnewaddress method returns a new z_address for receiving payments.
./pirate-cli z_getnewaddress
z_getoperationresult
The z_getoperationresult method retrieves the result and status of an operation which has finished, and then removes the operation from memory.
./pirate-cli z_getoperationresult
z_getoperationstatus
The z_getoperationstatus message queries the operation status and any associated result or error data of any operationid stored in local memory. The operation will remain in memory (unlike z_getoperationresult, which removes the data from the local memory).
./pirate-cli z_getoperationstatus
z_gettotalbalance
The z_gettotalbalance method returns the total value of funds stored in the node’s wallet.
./pirate-cli z_gettotalbalance
z_importkey
The z_importkey method imports the privatekey to your wallet.
./pirate-cli z_importkey secret-extended-key-main1qw3w3shtqqqqpqyp64gch0f09kjl0k33mnxalrdduuy9mm5sfylugg5pun8q6j3jxqsggdqs55wsw3nts844pfe0rycqzc8h8t28n63qaunumal8ufes9rk9273mzus78xfmxndghxhmz2pcsstfrlhj0x4nsx4fqn8asvqfupjw5hlhlx7x93l78zzk5aefvz70kf2tgw322pgx3jl0k4ac36upqwtqdnccuppdga0rs34wpgasrsgs8947e4vhkqderc39duayhnqqarczk yes
z_importviewingkey
The z_importviewingkey adds a viewing key to your wallet. This method allows you to view the balance in a z address that otherwise does not belong to your wallet.
./pirate-cli z_importviewingkey zxviews1qw3w3shtqqqqpqyp64gch0f09kjl0k33mnxalrdduuy9mm5sfylugg5pun8q6j3jxr7045cac54jsrryu2tdjdynn2npt9zvrvd48nh7zge7jfgvnrg75gpg6m7vsekx6cclfrhtjam5unr39gxg3jserszry2398y0jwzdyupjw5hlhlx7x93l78zzk5aefvz70kf2tgw322pgx3jl0k4ac36upqwtqdnccuppdga0rs34wpgasrsgs8947e4vhkqderc39duayhnqjxdlkx no
z_importwallet
The z_importwallet method imports z address keys from a wallet export file.
./pirate-cli z_importwallet
z_listoperationids
The z_listoperationids method returns the list of operation ids currently known to the wallet.
./pirate-cli z_listoperationids
z_listreceivedbyaddress
The z_listreceivedbyaddress method returns a list of amounts received by a z address belonging to the node’s wallet.
./pirate-cli z_listreceivedbyaddress “zs1wqykmk74mv2ezjscpxsgzrn4fasqwh50tgk0ym64m45c5yw5fjtpkps64gle963veqzuj04872z”
z_listunspent
The z_listunspent method returns an array of unspent shielded notes.
./pirate-cli z_listunspent
z_validateaddress
The z_validateaddress method returns information about the given z address.
./pirate-cli z_validateaddress “zs1zdg8uye2f6mzn872nm7ugqkpcuevt7g8wszme5pyv0nfc9c5xhuqezak4q53zmecezgawau7s6w”
z_sendmany
The z_sendmany method sends one or more transactions at once. It is the principle method for dealing with shielded z transactions.
./pirate-cli z_sendmany “zs1zdg8uye2f6mzn872nm7ugqkpcuevt7g8wszme5pyv0nfc9c5xhuqezak4q53zmecezgawau7s6w” ‘[{“address”:”zs13x6lvn7ah2c28ukzrfaqyd077qszd65uzel47l94yu7hsuktdf986g86mge2vz3rvpx466lpesd”,”amount”:0.01}]’
