Wallet

Operating the local wallet.

The wallet function of the node needs to be enabled to use it normally.

Suggestion: Unless you are very familiar with how to construct and back up a node wallet, do not casually use wallet commands, as there is a risk of losing funds.

You can use mvc-cli help command to view the usage of specific commands. The JsonRpc call method is in the example.

Commands

== Wallet ==
abandontransaction "txid"
addmultisigaddress nrequired ["key",...] ( "account" )
backupwallet "destination"
dumpprivkey "address"
dumpwallet "filename"
encryptwallet "passphrase"
getaccount "address"
getaccountaddress "account"
getaddressesbyaccount "account"
getbalance ( "account" minconf include_watchonly )
getnewaddress ( "account" )
getrawchangeaddress
getreceivedbyaccount "account" ( minconf )
getreceivedbyaddress "address" ( minconf )
gettransaction "txid" ( include_watchonly )
getunconfirmedbalance
getwalletinfo
importaddress "address" ( "label" rescan p2sh )
importmulti "requests" "options"
importprivkey "mvcprivkey" ( "label" ) ( rescan )
importprunedfunds
importpubkey "pubkey" ( "label" rescan )
importwallet "filename"
keypoolrefill ( newsize )
listaccounts ( minconf include_watchonly)
listaddressgroupings
listlockunspent
listreceivedbyaccount ( minconf include_empty include_watchonly)
listreceivedbyaddress ( minconf include_empty include_watchonly)
listsinceblock ( "blockhash" target_confirmations include_watchonly)
listtransactions ( "account" count skip include_watchonly)
listunspent ( minconf maxconf  ["addresses",...] [include_unsafe] )
listwallets
lockunspent unlock ([{"txid":"txid","vout":n},...])
move "fromaccount" "toaccount" amount ( minconf "comment" )
removeprunedfunds "txid"
sendfrom "fromaccount" "toaddress" amount ( minconf "comment" "comment_to" )
sendmany "fromaccount" {"address":amount,...} ( minconf "comment" ["address",...] )
sendtoaddress "address" amount ( "comment" "comment_to" subtractfeefromamount )
setaccount "address" "account"
settxfee amount
signmessage "address" "message"

abandontransaction

Mark in-wallet transaction <txid> as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace "stuck" or evicted transactions.

Param๏ผš

  • txid (string, required)

addmultisigaddress

Add a nrequired-to-sign multisignature address to the wallet.

Param๏ผš

  • nrequired (numeric, required)

  • keys (array, required)

  • account (string, optional)

backupwallet

Safely copies current wallet file to destination, which can be a directory or a path with filename.

Param๏ผš

  • destination (string, required)

dumpprivkey

Reveals the private key corresponding to 'address'. Then the importprivkey can be used with this output

Param๏ผš

  • address (string, required)

dumpwallet

Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.

Param๏ผš

  • filename (string, required)

encryptwallet

Encrypts the wallet with 'passphrase'. This is for first time encryption.

Param๏ผš

  • passphrase (string, required)

getaccount

DEPRECATED. Returns the account associated with the given address.

Param๏ผš

  • address (string, required)

getaccountaddress

DEPRECATED. Returns the current MVC address for receiving payments to this account.

Param๏ผš

  • account (string, required)

getaddressesbyaccount

DEPRECATED. Returns the list of addresses for the given account.

Param๏ผš

  • account (string, required)

getbalance

Get the total balance in the wallet.

Param๏ผš

  • account (string, optional)

  • minconf (numeric, optional, default=1)

  • include_watchonly (bool, optional, default=false)

getnewaddress

Returns a new MVC address for receiving payments.

Param๏ผš

  • account (string, optional)

getrawchangeaddress

Returns a new MVC address, for receiving change.

getreceivedbyaccount

DEPRECATED. Returns the total amount received by addresses with <account> in transactions with at least [minconf] confirmations.

Param๏ผš

  • account (string, required)

  • minconf (numeric, optional, default=1)

getreceivedbyaddress

Returns the total amount received by the given address in transactions with at least minconf confirmations.

Param๏ผš

  • address (string, required)

  • minconf (numeric, optional, default=1)

gettransaction

Get detailed information about in-wallet transaction <txid>

Param๏ผš

  • txid (string, required)

  • include_watchonly (bool, optional, default=false)

getunconfirmedbalance

Returns the server's total unconfirmed balance

getwalletinfo

Returns an object containing various wallet state info.

importaddress

Adds a script (in hex) or address that can be watched as if it were in your wallet but cannot be used to spend.

Param๏ผš

  • address (string, required)

  • label (string, optional)

  • rescan (bool, optional, default=true)

  • p2sh (bool, optional, default=false)

importmulti

Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options).

Param๏ผš

  • requests (array, required)

  • options (object, optional)

importprivkey

Adds a private key (as returned by dumpprivkey) to your wallet.

Param๏ผš

  • mvcprivkey (string, required)

  • label (string, optional)

  • rescan (bool, optional, default=true)

importprunedfunds

Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

Param๏ผš

  • rawtransaction (string, required)

  • txoutproof (string, required)

importpubkey

Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend.

Param๏ผš

  • pubkey (string, required)

  • label (string, optional)

  • rescan (bool, optional, default=true)

importwallet

Imports keys from a wallet dump file (see dumpwallet).

Param๏ผš

  • filename (string, required)

keypoolrefill

Fills the keypool.

Param๏ผš

  • newsize (numeric, optional)

listaddressgroupings

Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions

listlockunspent

Returns list of temporarily unspendable outputs.

listreceivedbyaccount

DEPRECATED. List balances by account.

Param๏ผš

  • minconf (numeric, optional, default=1)

  • includeempty (bool, optional, default=false)

listreceivedbyaddress

List balances by receiving address.

Param๏ผš

  • minconf (numeric, optional, default=1)

  • includeempty (bool, optional, default=false)

  • include_watchonly (bool, optional, default=false)

listsinceblock

Get all transactions in blocks since block [blockhash], or all transactions if omitted

Param๏ผš

  • blockhash (string, required)

  • target_confirmations (numeric, optional, default=1)

  • include_watchonly (bool, optional, default=false)

listtransactions

Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.

Param๏ผš

  • account (string, optional)

  • count (numeric, optional, default=10)

  • skip (numeric, optional, default=0)

  • include_watchonly (bool, optional, default=false)

listunspent

Returns array of unspent transaction outputs

Param๏ผš

  • minconf (numeric, optional, default=1)

  • maxconf (numeric, optional, default=9999999)

  • addresses (array, optional)

  • include_unsafe (bool, optional, default=false)

lockunspent

Updates list of temporarily unspendable outputs.

Param๏ผš

  • unlock (bool, required)

  • transactions (array, required)

move

DEPRECATED. Move a specified amount from one account in your wallet to another.

Param๏ผš

  • fromaccount (string, required)

  • toaccount (string, required)

  • amount (numeric, required)

  • minconf (numeric, optional, default=1)

  • comment (string, optional)

sendfrom

DEPRECATED (use sendtoaddress). Sent an amount from an account to a mvc address.

Param๏ผš

  • fromaccount (string, required)

  • toaddress (string, required)

  • amount (numeric, required)

  • minconf (numeric, optional, default=1)

  • comment (string, optional)

  • comment_to (string, optional)

sendmany

Send multiple times. Amounts are double-precision floating point numbers.

Param๏ผš

  • fromaccount (string, required)

  • amounts (json, required)

  • minconf (numeric, optional, default=1)

  • comment (string, optional)

sendtoaddress

Send an amount to a given address.

Param๏ผš

  • address (string, required)

  • amount (numeric, required)

  • comment (string, optional)

  • comment_to (string, optional)

  • subtractfeefromamount (bool, optional, default=false)

setaccount

DEPRECATED. Sets the account associated with the given address.

Param๏ผš

  • address (string, required)

  • account (string, required)

settxfee

Set the transaction fee per kB. Overwrites the paytxfee parameter.

Param๏ผš

  • amount (numeric, required)

signmessage

Sign a message with the private key of an address

Param๏ผš

  • address (string, required)

  • message (string, required)