Transfer coins between accounts and repositories.
The native coin can be transferred from one account to another account by creating and sending a
}, user.getKey(accounts, "passphrase"))
lob user send "os1858effdlfecl30hgq0dvpesygp2daf97malemz" \
The code above calls the
user.sendconsole method, passing to it the transaction data and a key from the key store.
In the example above, we unlock Alice’s private key using
user.getKey, set the transfer value to
5000and fee to
tospecifies the recipient of the transaction value. To can be a user address or a repository full address.
nonceis the number of all transactions Alice’s key has sent to the network. The nonce value is used to order Alice’s transactions and prevent a double-spend attack. If not provided, it will be automatically set.
On the console, the
accountsglobal variable contains a list of address of keys on the keystore.
var alicePrivateKey = user.getKey(accounts, "passphrase")
Here we are transferring
5000coins to a repository called
cashmap; We prefixed the repository name with
r/to indicate that the recipient is a repo.