EOSIO
This document show eosio network qrcode protocol in TokenPocket. The TokenPocket Android version supports this protocol from 1.6.7, and eosio network watch-wallet uses this protocol interact with cold wallet, also the new version of the app will compatible with old version qrcode protocol.
Sign transaction
eosio:signTransaction-version=1.0&protocol=TokenPocket&network=eosio&chain_id=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906&data=
{
"tx": {
"expiration": "2023-02-18T08:23:17",
"ref_block_num": 9494,
"ref_block_prefix": 640410476,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"actions": [{
"account": "eosio.token",
"name": "transfer",
"authorization": [{
"actor": "uv4a2wxeliep",
"permission": "active"
}],
"data": "50958BAA7361C8D6602483A5C79A9F98010000000000000004454F530000000000"
}],
"context_free_actions": [],
"transaction_extensions": []
},
//app can get sign wallet by use account and publicKey
"account": "uv4a2wxeliep",//neccessary
"publicKey": "EOS5xkSgDHsN3YjzbJHghtHCwbz5ScnDgTMNWvTGNJF3wQmqzFDPm"//necessary
}
//sign result
eosio:signTransactionSignature-version=1.0&protocol=TokenPocket&network=ethereum&chain_id=1&data=
{
"expiration": "2023-02-21T13:35:35",
"ref_block_num": 40998,
"ref_block_prefix": 926319420,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"actions": [{
"account": "eosio.token",
"name": "transfer",
"authorization": [{
"actor": "qn1ux1bd1t2x",
"permission": "active"
}],
"data": "D0450EE984AEC3B4602483A5C79A9F98010000000000000004454F530000000000"
}],
"context_free_actions": [],
"transaction_extensions": [],
"signatures": ["SIG_K1_K6XBBChkuYkmkRYw9ePKKJbFF5aTAmmU6CnbHPRnbbGzxkRHwb88E6uBCTVxubX1PjCzyZzuH93FQYsBYcU58BvLSpQuCM"]
}
Sign and send transaction
eosio:signAndSendTransaction-version=1.0&protocol=TokenPocket&network=eosio&chain_id=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906&data=
{
"tx": {
"expiration": "2023-02-18T08:23:17",
"ref_block_num": 9494,
"ref_block_prefix": 640410476,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"actions": [{
"account": "eosio.token",
"name": "transfer",
"authorization": [{
"actor": "uv4a2wxeliep",
"permission": "active"
}],
"data": "50958BAA7361C8D6602483A5C79A9F98010000000000000004454F530000000000"
}],
"context_free_actions": [],
"transaction_extensions": []
},
//app can get sign wallet by use account and publicKey
"account": "uv4a2wxeliep",//neccessary
"publicKey": "EOS5xkSgDHsN3YjzbJHghtHCwbz5ScnDgTMNWvTGNJF3wQmqzFDPm"//necessary
}
Sign message
eosio:signMessage-version=1.0&protocol=TokenPocket&network=eosio&chain_id=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906&data=
{
"message":"0xabcd",
"isHash":true, //if isHash is true, use ecc.Signature.signHash to sign message , or use ecc.sign to sign message
//app can get sign wallet by use account and publicKey
"account": "uv4a2wxeliep" //optional
"publicKey": "EOS5xkSgDHsN3YjzbJHghtHCwbz5ScnDgTMNWvTGNJF3wQmqzFDPm" //optional
}
//sign result
eosio:signMessage-version=1.0&protocol=TokenPocket&network=eosio&chain_id=aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906&data=
{
"signature":"xxx",
//sign wallet info
"account": "uv4a2wxeliep",
"publicKey": "EOS5xkSgDHsN3YjzbJHghtHCwbz5ScnDgTMNWvTGNJF3wQmqzFDPm"
}
Last updated