Click or drag to resize

WalletRPCController Class

Wallet Controller RPCs method
Inheritance Hierarchy
Controller
  FeatureController
    Wallet.ControllersWalletRPCController

Namespace:  Wallet.Controllers
Assembly:  Wallet (in Wallet.dll) Version: 1.1.12
Syntax
C#
[ControllerAttribute]
public class WalletRPCController : FeatureController

The WalletRPCController type exposes the following members.

Methods
  NameDescription
Public methodAbortReScan
Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.
Public methodBackupWallet
The destination directory or file.
Public methodDumpPrivKey
Dumps the priv key.

Example:
Set the password for 2 minutes to perform a transaction
walletpassword "my pass phrase" 120

Perform a send(requires password set)
sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0

Clear the password since we are done before 2 minutes is up
walletlock

Public methodDumpWallet
Dumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files. Imported scripts are included in the dumpfile, but corresponding BIP173 addresses, etc.may not be added automatically by importwallet. Note that if your wallet contains keys which are not derived from your HD seed(e.g.imported keys), these are not covered by only backing up the seed itself, and must be backed up too(e.g.ensure you back up the whole dumpfile).
Public methodGenerateNewWallet
Generates the new wallet.
Public methodGenerateNewWalletBase64
Generates the new wallet.
Public methodGetAccount
Gets the account as an wallet combix.
Public methodGetAccountAddress
The getaccountaddress RPC is a DEPRECATED RPC. It is intended to create an "account" and an address in that account if one doesn't exist. It will return the next available address without a balance. Since the original description of this RPC does not take into account HD paths, for this API, it will just default to the 0th account in a wallet. This is being supported only because certain software still expects old-style accounts. This will NOT generate new wallets or accounts. These need to be done SEPARATELY.
Public methodGetAddressesByAccount
The getaddressesbyaccount RPC is a DEPRECATED RPC. This will list ONLY the addresses in the wallet specified under the first derivation path and only the receiving addresses since there is no expectation around this RPC to delineate what each address is.
Public methodGetBalance
Gets account balance.

If [walletName] is not specified, returns the server's total available balance.
If [walletName] is specified, returns the balance in the account.
If [walletName] is "*", get the balance of all accounts.

Public methodGetHistory
Retrieves the history of a wallet.
Public methodGetNewAddress
Returns a new Bitcoin address for receiving payments.
Public methodGetRawChangeAddress
Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.
Public methodGetReceivedByAccount
DEPRECATED RPC. This will only show the balance of the first derivation path.
Public methodGetReceivedByAddress
Returns the total amount received by the given address in transactions with at least minconf confirmations.
Public methodGetUnconfirmedBalance
Returns the server's total unconfirmed balance.
Public methodGetWallet
Gets the wallet.
Public methodGetWalletInfo
Returns an object containing various wallet state info.
Public methodImportAddress
Adds address that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.
Public methodImportPubKey
Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.

This call can take minutes to complete if rescan is true, during that time, other rpc calls may report that the imported pubkey
exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

Public methodKeyPoolReFill
Fills the keypool.
Public methodListAccounts
DEPRECATED RPC.
Public methodListAddressGroupings
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.
Public methodListLockUnspent
Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.
Public methodListReceivedByAddress
List balances by receiving address.
Public methodListSinceBlock
Get all transactions in blocks since block [blockhash], or all transactions if omitted.
Public methodListTransactions
Returns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.
Public methodListUnspent
Returns array of unspent transaction outputs. With between minconf confirmations.
Public methodLockUnspend
Updates list of temporarily unspendable outputs.

Temporarily lock (unlock=false) or unlock(unlock=true) specified transaction outputs.
If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked.
A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.
Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list
is always cleared (by virtue of process exit) when a node stops or fails.
Also see the listunspent call.

Public methodRemoveTransaction
Remove transaction from wallet and sync it again.
Public methodRescanBlockChain
Rescan the local blockchain for wallet related transactions.
Public methodRestore
Restores wallet locally from seed.
Public methodRestoreBase64
Restores wallet locally from seed.
Public methodSendmany
Send to many addresses from a specified hd acccount name. The actual function to process this can take the hdAccountName in different ways: "" = default account and default hd derivation path "name" = uses the wallet name and the default hd derivation path "account 1/name" = custom wallet name and hd derivation path
Public methodSendmanyBase64
Send manies the specified hd acccount name.
Public methodSendmanyFee
Send manies the specified hd acccount name.
Public methodSendmanyFeeBase64
Send manies the specified hd acccount name.
Public methodSendMoney
Sends the money.
Public methodSendMoneyBase64
Sends the money.
Public methodSendMoneyFee
Sends the money.
Public methodSendMoneyFeeBase64
Sends the money.
Public methodSendToAddress
Public methodSendToAddressBase64
Sends some amount to specified address.
Public methodSendToAddressFee
Sends some amount to specified address.
Public methodSendToAddressFeeBase64
Sends some amount to specified address.
Public methodValidateAddress
Returns information about a bitcoin address.
Public methodWalletLock
Lock the wallets.

Example:
Set the password for 2 minutes to perform a transaction
walletpassword "my pass phrase" 120

Perform a send(requires password set)
sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0

Clear the password since we are done before 2 minutes is up
walletlock

Public methodWalletPassphrase
Stores the wallet decryption key in memory for 'timeout' seconds.
Public methodWalletpassword
Wallets the password.

Example:
Set the password for 2 minutes to perform a transaction
walletpassword "my pass phrase" 120

Perform a send(requires password set)
sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0

Clear the password since we are done before 2 minutes is up
walletlock

Public methodWalletpasswordBase64
Wallets the password with unicode support.

Example:
Set the password for 2 minutes to perform a transaction
walletpassword "my pass phrase" 120

Perform a send(requires password set)
sendtoaddress "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd" 1.0

Clear the password since we are done before 2 minutes is up
walletlock

Top
See Also

Reference

FeatureController