To transfer an eosio token, submit a transaction to the transfer
action of the account storing the token you wish to transfer.
In the example shown below useraaaaaaaa
transfers 1.0000 EOS token stored in the eosio.token
account from useraaaaaaaa
to userbbbbbbbb
.
(async () => {
await api.transact({
actions: [{
account: 'eosio.token',
name: 'transfer',
authorization: [{
actor: 'useraaaaaaaa',
permission: 'active',
}],
data: {
from: 'useraaaaaaaa',
to: 'userbbbbbbbb',
quantity: '1.0000 EOS',
memo: 'some memo'
}
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
})();