Move

Requires wallet support.

The move RPC moves a specified amount from one account in your wallet to another using an off-block-chain transaction.

move will be removed in a later version of Pai Core. Use the RPCs listed in the See Also subsection below instead.

it’s allowed to move more funds than are in an account, giving the sending account a negative balance and giving the receiving account a balance that may exceed the number of pai’s in the wallet (or the number of pai’s in existence).

Parameter #1—from account

Name Type Presence Description
From Account string Required
(exactly 1)
The name of the account to move the funds from

Parameter #2—to account

Name Type Presence Description
To Account string Required
(exactly 1)
The name of the account to move the funds to

Parameter #3—amount to move

Name Type Presence Description
Amount number (pai’s) Required
(exactly 1)
The amount of pai’s to move

Parameter #4—an unused parameter

Name Type Presence Description
Unused number (int) Optional
(0 or 1)
This parameter is no longer used. If parameter #5 needs to be specified, this can be any integer

Parameter #5—a comment

Name Type Presence Description
Comment string Optional
(0 or 1)
A comment to assign to this move payment

Result—true on success

Name Type Presence Description
result bool Required
(exactly 1)
Set to true if the move was successful

Example

Move 0.1 pai’s from “doc test” to “test1”, giving the transaction the comment “Example move”:

pai-cli -testnet move "doc test" "test1" 0.1 0 "Example move"

Result:

true

See also

  • ListAccounts: lists accounts and their balances.
  • SendFrom: spends an amount from a local account to a pai address.
  • SendToAddress: spends an amount to a given address.