Cli commands

From DeFiChain-Wiki

Accounts

  1. accounthistorycount ( "owner" {"no_rewards":bool,"token":"str","txtype":"str"} )
  2. accounttoaccount "from" {"address":"str"} ( [{"txid":"hex","vout":n},...] )
    1. Explanation: AccountToAccount sends from one account to many accounts. AnyAccountsToAccount can send from many accounts to many accounts
  3. accounttoutxos "from" {"address":"str"} ( [{"txid":"hex","vout":n},...] )
  4. getaccount "owner" ( {"start":"str","including_start":bool,"limit":n} indexed_amounts )
  5. gettokenbalances ( {"start":"str","including_start":bool,"limit":n} indexed_amounts symbol_lookup )
  6. listaccounthistory ( "owner" {"maxBlockHeight":n,"depth":n,"no_rewards":bool,"token":"str","txtype":"str","limit":n} )
  7. listaccounts ( {"start":"str","including_start":bool,"limit":n} verbose indexed_amounts is_mine_only )
  8. listcommunitybalances
  9. sendtokenstoaddress {"address":"str"} {"address":"str"} ( "selectionMode" )
  10. utxostoaccount {"address":"str"} ( [{"txid":"hex","vout":n},...] )

Blockchain

  1. clearmempool
  2. getbestblockhash
  3. getblock "blockhash" ( verbosity )
  4. getblockchaininfo
  5. getblockcount
  6. getblockfilter "blockhash" ( "filtertype" )
  7. getblockhash height
  8. getblockheader "blockhash" ( verbose )
  9. getblockstats hash_or_height ( stats )
  10. getchaintips
  11. getchaintxstats ( nblocks "blockhash" )
  12. getdifficulty
  13. getgov "name"
  14. getmempoolancestors "txid" ( verbose )
  15. getmempooldescendants "txid" ( verbose )
  16. getmempoolentry "txid"
  17. getmempoolinfo
  18. getrawmempool ( verbose )
  19. gettxout "txid" n ( include_mempool )
  20. gettxoutproof ["txid",...] ( "blockhash" )
  21. gettxoutsetinfo
  22. isappliedcustomtx ( "txid" blockHeight )
  23. preciousblock "blockhash"
  24. pruneblockchain height
  25. savemempool
  26. scantxoutset "action" [scanobjects,...]
  27. setgov {"name":"str"} ( [{"txid":"hex","vout":n},...] )
  28. verifychain ( checklevel nblocks )
  29. verifytxoutproof "proof"

Control

  1. getmemoryinfo ( "mode" )
  2. getrpcinfo
  3. help ( "command" )
  4. logging ( ["include_category",...] ["exclude_category",...] )
  5. stop
  6. uptime

Generating

  1. generatetoaddress nblocks "address" ( maxtries )

Masternodes

  1. createmasternode "ownerAddress" ( "operatorAddress" [{"txid":"hex","vout":n},...] )
  2. getanchorteams ( blockHeight )
  3. getmasternode "mn_id"
  4. getmasternodeblocks ( {"id":"hex","ownerAddress":"str","operatorAddress":"str"} depth )
  5. listanchors
  6. listcriminalproofs ( {"start":"hex","including_start":bool,"limit":n} )
  7. listmasternodes ( {"start":"hex","including_start":bool,"limit":n} verbose )
  8. resignmasternode "mn_id" ( [{"txid":"hex","vout":n},...] )

Mining

  1. getblocktemplate ( "template_request" )
  2. getmintinginfo
  3. getnetworkhashps ( nblocks height )
  4. prioritisetransaction "txid" ( dummy ) fee_delta
  5. submitblock "hexdata" ( "dummy" )
  6. submitheader "hexdata"

Network

  1. addnode "node" "command"
  2. clearbanned
  3. disconnectnode ( "address" nodeid )
  4. getaddednodeinfo ( "node" )
  5. getconnectioncount
  6. getnettotals
  7. getnetworkinfo
  8. getnodeaddresses ( count )
  9. getpeerinfo
  10. listbanned
  11. ping
  12. setban "subnet" "command" ( bantime absolute )
  13. setnetworkactive state

Poolpair

  1. addpoolliquidity {"address":"str"} "shareAddress" ( [{"txid":"hex","vout":n},...] )
  2. createpoolpair ( {"tokenA":"str","tokenB":"str","commission":n,"status":bool,"ownerAddress":"str","customRewards":"str","pairSymbol":"str"} [{"txid":"hex","vout":n},...] )
  3. getpoolpair "key" ( verbose )
  4. listpoolpairs ( {"start":n,"including_start":bool,"limit":n} verbose )
  5. listpoolshares ( {"start":n,"including_start":bool,"limit":n} verbose is_mine_only )
  6. poolswap {"from":"str","tokenFrom":"str","amountFrom":n,"to":"str","tokenTo":"str","maxPrice":n} ( [{"txid":"hex","vout":n},...] )
  7. removepoolliquidity "from" "amount" ( [{"txid":"hex","vout":n},...] )
  8. testpoolswap ( {"from":"str","tokenFrom":"str","amountFrom":n,"to":"str","tokenTo":"str","maxPrice":n} )
  9. updatepoolpair ( {"pool":"str","status":bool,"commission":n,"ownerAddress":"str","customRewards":"str"} [{"txid":"hex","vout":n},...] )

Rawtransactions

  1. analyzepsbt "psbt"
  2. combinepsbt ["psbt",...]
  3. combinerawtransaction ["hexstring",...]
  4. converttopsbt "hexstring" ( permitsigdata iswitness )
  5. createpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable)
  6. createrawtransaction [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime replaceable )
  7. decodepsbt "psbt"
  8. decoderawtransaction "hexstring" ( iswitness )
  9. decodescript "hexstring"
  10. finalizepsbt "psbt" ( extract )
  11. fundrawtransaction "hexstring" ( options iswitness )
  12. getrawtransaction "txid" ( verbose "blockhash" )
  13. joinpsbts ["psbt",...]
  14. sendrawtransaction "hexstring" ( maxfeerate )
  15. signrawtransactionwithkey "hexstring" ["privatekey",...] ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
  16. testmempoolaccept ["rawtx",...] ( maxfeerate )
  17. utxoupdatepsbt "psbt" ( ["",{"desc":"str","range":n or [n,n]},...] )

Spv

  1. spv_createanchor ( [{"txid":"hex","vout":n,"amount":n,"privkey":"str"},...] ) "rewardAddress" ( send feerate )
  2. spv_createanchortemplate "rewardAddress"
  3. spv_estimateanchorcost ( feerate )
  4. spv_gettxconfirmations "txhash"
  5. spv_listanchorauths
  6. spv_listanchorrewardconfirms
  7. spv_listanchorrewards
  8. spv_listanchors ( minBtcHeight maxBtcHeight minConfs maxConfs )
  9. spv_listanchorspending
  10. spv_listanchorsunrewarded
  11. spv_rescan ( height )
  12. spv_sendrawtx "rawtx"
  13. spv_splitutxo parts ( amount )
  14. spv_syncstatus

Tokens

  1. createtoken ( {"symbol":"str","name":"str","isDAT":bool,"decimal":n,"limit":n,"mintable":bool,"tradeable":bool,"collateralAddress":"str"} [{"txid":"hex","vout":n},...] )
  2. getcustomtx "txid" ( "blockhash" )
  3. gettoken "key"
  4. listtokens ( {"start":n,"including_start":bool,"limit":n} verbose )
  5. minttokens "amounts" ( [{"txid":"hex","vout":n},...] )
  6. updatetoken "token" ( {"symbol":"str","name":"str","isDAT":bool,"mintable":bool,"tradeable":bool,"finalize":bool} [{"txid":"hex","vout":n},...] )

Util

  1. createmultisig nrequired ["key",...] ( "address_type" )
  2. deriveaddresses "descriptor" ( range )
  3. estimatesmartfee conf_target ( "estimate_mode" )
  4. getdescriptorinfo "descriptor"
  5. signmessagewithprivkey "privkey" "message"
  6. validateaddress "address"
  7. verifymessage "address" "signature" "message"

Wallet

  1. abandontransaction "txid"
  2. abortrescan
  3. addmultisigaddress nrequired ["key",...] ( "label" "address_type" )
  4. backupwallet "destination"
  5. bumpfee "txid" ( options )
  6. createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse )
  7. dumpprivkey "address"
  8. dumpwallet "filename"
  9. encryptwallet "passphrase"
  10. getaddressesbylabel "label"
  11. getaddressinfo "address"
  12. getbalance ( "dummy" minconf include_watchonly avoid_reuse with_tokens )
  13. getbalances ( with_tokens )
  14. getnewaddress ( "label" "address_type" )
  15. getrawchangeaddress ( "address_type" )
  16. getreceivedbyaddress "address" ( minconf )
  17. getreceivedbylabel "label" ( minconf )
  18. gettransaction "txid" ( include_watchonly )
  19. getunconfirmedbalance ( with_tokens )
  20. getwalletinfo ( with_tokens )
  21. importaddress "address" ( "label" rescan p2sh )
  22. importmulti "requests" ( "options" )
  23. importprivkey "privkey" ( "label" rescan )
  24. importprunedfunds "rawtransaction" "txoutproof"
  25. importpubkey "pubkey" ( "label" rescan )
  26. importwallet "filename"
  27. keypoolrefill ( newsize )
  28. listaddressgroupings
  29. listlabels ( "purpose" )
  30. listlockunspent
  31. listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" )
  32. listreceivedbylabel ( minconf include_empty include_watchonly )
  33. listsinceblock ( "blockhash" target_confirmations include_watchonly include_removed )
  34. listtransactions ( "label" count skip include_watchonly exclude_custom_tx )
  35. listunspent ( minconf maxconf ["address",...] include_unsafe query_options )
  36. listwalletdir
  37. listwallets
  38. loadwallet "filename"
  39. lockunspent unlock ( [{"txid":"hex","vout":n},...] )
  40. removeprunedfunds "txid"
  41. rescanblockchain ( start_height stop_height )
  42. sendmany "" {"address":amount} ( minconf "comment" ["address",...] replaceable conf_target "estimate_mode" )
  43. sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount replaceable conf_target "estimate_mode"avoid_reuse )
  44. sethdseed ( newkeypool "seed" )
  45. setlabel "address" "label"
  46. settxfee amount
  47. setwalletflag "flag" ( value )
  48. signmessage "address" "message"
  49. signrawtransactionwithwallet "hexstring" ( [{"txid":"hex","vout":n,"scriptPubKey":"hex","redeemScript":"hex","witnessScript":"hex","amount":amount},...] "sighashtype" )
  50. unloadwallet ( "wallet_name" )
  51. walletcreatefundedpsbt [{"txid":"hex","vout":n,"sequence":n},...] [{"address":amount},{"data":"hex"},...] ( locktime options bip32derivs )
  52. walletlock
  53. walletpassphrase "passphrase" timeout
  54. walletpassphrasechange "oldpassphrase" "newpassphrase"
  55. walletprocesspsbt "psbt" ( sign "sighashtype" bip32derivs )

Zmq

  1. getzmqnotifications