Example 1: eios
tp.sign({
appid: 'swEmwEQ666'
}).then(console.log)
> {
result: true,
data: {
deviceId: 'EBEFWA-AFEBEf-eeee-aaaaa-eeeeea23d',
appid: 'swEmwEQ666',
timestamp: 1534735280,
sign: '713efewwfegwohvnqooyge38h4n421ll3fwzib9e3q00'
},
msg: 'success'
}
Example 2: eios
tp.getWallets().then(console.log)
> {
result: true,
data: [
{
name: 'itokenpocket',
address: 'EOSaaaaaaaaabbbbbbbb',
blockchain_id: 4
},
{
name: 'ethwallet11',
address: '0x40e5A542087FA4b966209707177b103d158Fd3A4',
blockchain_id: 1
}
],
msg: 'success'
}
Example 3: eios
tp.getDeviceId().then(console.log)
> {
device_id: 'dexa23333'
}
Example 4: eios
tp.authSign({
blockchain: 'bos',
from: 'itokenpocket',
publicKey: 'EOS13we3sbereewwwwww',
signdata: 'something to sign'
}).then(console.log)
> {
result: true,
data: {
signature: 'SIG_EBEFWA-AFEBEf-eeee-aaaaa-eeeeea23d',
timestamp: '1534735280',
ref: 'TokenPocket',
signdata: 'something to sign',
wallet: 'itokenpocket'
},
msg: 'success'
}
Example 5: eios
tp.getWalletList('eth').then(console.log)
> {
wallets: {
'eth': [{
name: 'pk-1',
address: '0xaaaaaaa',
tokens: {'eth': 1000},
...
},
...
]
}
}
Example 6: eios
tp.getBalance({
blockchain: 'eos',
account: 'itokenpocket',
contract: 'eosio.token',
symbol: 'EOS'
}).then(console.log)
> {
result: true,
data:{"symbol":"EOS","balance":"["142.2648 EOS"]","contract":"eosio.token","account":"itokenpocket"},
msg: 'success'
}
Example 7: eios
tp.eosAuthSign({
from: 'itokenpocket',
publicKey: 'EOS13we3sbereewwwwww',
signdata: 'something to sign'
}).then(console.log)
> {
result: true,
data: {
signature: 'SIG_EBEFWA-AFEBEf-eeee-aaaaa-eeeeea23d',
timestamp: '1534735280',
ref: 'TokenPocket',
signdata: 'something to sign',
wallet: 'itokenpocket'
},
msg: 'success'
}
Example 8: eios
tp.pushAction({
blockchain: 'eos',
actions: [
{
account: 'eosio.token',
name: 'transfer',
authorization: [{
actor: 'aaaabbbbcccc',
permission: 'active'
}],
data: {
from: 'aaaabbbbcccc',
to: 'itokenpocket',
quantity: '1.3000 EOS',
memo: 'something to say'
}
},
{
account: "eosio",
name: "delegatebw",
authorization: [
{
actor: 'aaaabbbbcccc',
permission: "active"
}
],
data: {
from: 'aaaabbbbcccc',
receiver: 'itokenpocket',
stake_net_quantity: "0.0100 EOS",
stake_cpu_quantity: "0.0100 EOS",
transfer: 0
}
}
],
address: 'EOS7ds9A9FGDsKrdymQ4ynKbMgbCVaaaaaaaaaaa',
account: 'aaaabbbbcccc'
}).then(console.log)
> {
result: true,
data: {transactionId: 'b428357c7xxxxxxxxxxxxxx'}
}
Example 9: eios
tp.getEosTableRows(params)
Example 10: eios
tp.tokenTransfer({
blockchain: 'eos',
from: 'abcabcabcabc',
to: 'itokenpocket',
amount: '0.0100',
tokenName: 'EOS',
precision: 4,
contract: 'eosio.token',
memo: 'test',
address: 'EOS7ds9A9FGDsKrdymQ4ynKbMgbCVaaaaaaaaaaa'
}).then(console.log)
> {
result: true,
data: {transactionId: 'b428357c7xxxxxxxxxxxxxx'}
}