consteosTransferTransaction= { actions: [ { account:'eosio.token', name:'transfer', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in to:'ore1tiqqs1kq', quantity:'1.0000 EOS', memo:'Sent using ORE ID' } } ]}
WAX
WAX native token has a precision of 8. Note the use of 8 decimal places in the quantity field.
constwaxTransferTransaction= { actions: [ { account:'eosio.token', name:'transfer', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in to:'ore1tiqqs1kq', quantity:'1.00000000 WAX', memo:'Sent using ORE ID' } }
TELOS
consttlosTransferTransaction= { actions: [ { account:'eosio.token', name:'transfer', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in to:'ore1tiqqs1kq', quantity:'1.0000 TLOS', memo:'Sent using ORE ID' } } ]}
Account Resource Management
Generally, the "eosio" blockchain account is in charge of managing the systems resources. We interact with this account to buy/sell RAM, and stake/unstake the CPU and NET.
Add RAM
constaddRamBytesTransaction= { actions: [ { account:'eosio', name:'buyrambytes', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { payer:'',// use account that was logged in receiver:'',// use account that was logged in bytes:1000, } } ]}
Stake CPU and NET
constaddCpuNetTransaction= { actions: [ { account:'eosio', name:'delegatebw', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in receiver:'',// use account that was logged in stake_net_quantity:'1.0000 SYS', stake_cpu_quantity:'1.0000 SYS', transfer:false, } } ]}
Unstake CPU and NET
constremoveCpuNetTransaction= { actions: [ { account:'eosio', name:'undelegatebw', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in receiver:'',// use account that was logged in unstake_net_quantity:'1.0000 SYS', unstake_cpu_quantity:'1.0000 SYS', transfer:false, } } ]
NFT Examples
WAX Transfer Atomic Asset
consttransferAssetTransaction= { actions: [ { account:'atomicassets', name:'transfer', authorization: [ { actor:'',// use account that was logged in permission:'active' } ], data: { from:'',// use account that was logged in to:'aikontest111', asset_ids: [1099726331175] // Example Atomic Asset Id } } ]}