Skip to content

Instantly share code, notes, and snippets.

@drwasho
Last active October 27, 2016 13:19
Show Gist options
  • Save drwasho/8f9c8a4487f43f805f255598fe4ac826 to your computer and use it in GitHub Desktop.
Save drwasho/8f9c8a4487f43f805f255598fe4ac826 to your computer and use it in GitHub Desktop.

Zcash RPC Commands

Base command: ./src/zcash-cli [command]

Raw Transactions

  • createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...}
  • decoderawtransaction "hexstring"
  • decodescript "hex"
  • getrawtransaction "txid" ( verbose )
  • sendrawtransaction "hexstring" ( allowhighfees )
  • signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

Utilities

  • createmultisig nrequired ["key",...]
  • estimatefee nblocks
  • estimatepriority nblocks
  • validateaddress "bitcoinaddress"
  • verifymessage "bitcoinaddress" "signature" "message"

Wallet

  • addmultisigaddress nrequired ["key",...] ( "account" )
  • backupwallet "destination"
  • dumpprivkey "zcashaddress"
  • dumpwallet "filename"
  • encryptwallet "passphrase"
  • getaccount "zcashaddress"
  • getaccountaddress "account"
  • getaddressesbyaccount "account"
  • getbalance ( "account" minconf includeWatchonly )
  • getnewaddress ( "account" )
  • getrawchangeaddress
  • getreceivedbyaccount "account" ( minconf )
  • getreceivedbyaddress "zcashaddress" ( minconf )
  • gettransaction "txid" ( includeWatchonly )
  • getunconfirmedbalance
  • getwalletinfo
  • importaddress "address" ( "label" rescan )
  • importprivkey "zcashprivkey" ( "label" rescan )
  • importwallet "filename"
  • keypoolrefill ( newsize )
  • listaccounts ( minconf includeWatchonly)
  • listaddressgroupings
  • listlockunspent
  • listreceivedbyaccount ( minconf includeempty includeWatchonly)
  • listreceivedbyaddress ( minconf includeempty includeWatchonly)
  • listsinceblock ( "blockhash" target-confirmations includeWatchonly)
  • listtransactions ( "account" count from includeWatchonly)
  • listunspent ( minconf maxconf ["address",...] )
  • lockunspent unlock [{"txid":"txid","vout":n},...]
  • move "fromaccount" "toaccount" amount ( minconf "comment" )
  • sendfrom "fromaccount" "tozcashaddress" amount ( minconf "comment" "comment-to" )
  • sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] )
  • sendtoaddress "zcashaddress" amount ( "comment" "comment-to" subtractfeefromamount )
  • setaccount "zcashaddress" "account"
  • settxfee amount
  • signmessage "zcashaddress" "message"
  • z_exportkey "zaddr"
  • z_exportwallet "filename"
  • z_getbalance "address" ( minconf )
  • z_getnewaddress
  • z_getoperationresult (["operationid", ... ])
  • z_getoperationstatus (["operationid", ... ])
  • z_gettotalbalance ( minconf )
  • z_importkey "zkey" ( rescan )
  • z_importwallet "filename"
  • z_listaddresses
  • z_listoperationids
  • z_listreceivedbyaddress "address" ( minconf )
  • z_sendmany "fromaddress" [{"address":... ,"amount":...},...] ( minconf )
  • zcbenchmark benchmarktype samplecount
  • zcrawjoinsplit rawtx inputs outputs vpub_old vpub_new
  • zcrawkeygen
  • zcrawreceive zcsecretkey encryptednote
  • zcsamplejoinsplit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment