This document show the QR code protocol supported by the TokenPocket wallet. Note that there are several QR code entrances in TokenPocket wallet, and the scanning functions of individual entrances are slightly different, which will be explained below.
TokenPocket Android 1.6.7 has already supported new version of the QR code protocol. Watch wallet in 1.6.7 and above versions will use new protocol. For details, please refer to EVMTRONEOSIOSolanaBTC
TokenPocket supports qrcode protocol as follows:
Receipt qrcode
Create Eos Account qrcode
Import BTC watch-wallet qrcode
DApp login qrcode
DApp call wallet to transfer tokens qrcode
DApp call wallet to sign tx qrcode
DApp call wallet to sign message qrcode
WalletConnect
Add DApp to Favorites qrcode
Open DApp qrcode
Receipt qrcode
The EVM network support two kinds of receipt qrcode
BTC, TRON, Cosmos, SOL,IOST,Polkadot, use address or account(IOST) to generate receipt qrcode
Create Eos Account
The qrcode is used to create Eos account
{
"account": "pubyeoaad33k", //the account to be created
//owner to the new account
"owner": "EOS7eZbMjyMxtp35sg6xHcqtEHzEYb7ahzdHRAGcYgcJW8k8V8PnS",
//active to the new account
"active": "EOS7eZbMjyMxtp35sg6xHcqtEHzEYb7ahzdHRAGcYgcJW8k8V8PnS",
"blockchain": "EOS", //network
"action": "createAccount"
}
So far, The watch-wallet and cold-wallet only supported by EVM series networks, EOS, TRX, BTC, SQL
Note: The QR code generated by the watch-wallet can be scanned at the QR code entry on the cold wallet homepage. but signed QR code generated by cold-wallet must b scanned at the QR code entry dialog box that pops up on the wallet-wallet
EVM
watch-wallet qrcode. This qrcode is used to scan by cold-wallet to sign
//rawTransaction from cold-wallet
0xf8ac82062e85013f2ed0c0828cf894eca41281c24451168a37211f0bc2b8645af4509280b844a9059cbb0000000000b79bbc09226198e8d15a05219fdd2a20cba0932621528743459250c016a00fd584c4e7bcfa0667e9f70a2
{
"signType": "tronSignTx",
"useTronHeader": true,
"blockchain": "TRX",
"action": "coldWalletSign",
"sign": "b80514c0a5a9c498a60c8f76cdf45787e9522b16cc1" //data to sign it is the txID of tron tx
}
{
"blockchain": "BTC",
"action": "coldWalletSign",
"sign": "XU\/JbsIwEP2XufQSwI4dx86xKouAA5XoIhUO401BlJIShwZQ\/r2uqq6jmdEs743eXGDzUjWhhuLpAqHdWCjAS+k8WkOJ9TznmCllNTEStWSCEhpzhop5LY2lXGvHspxxLXguZGq0gwQqDGW8tFsNuLpaDchXRI\/bIz43DgraJ8NelkQF1rVQkATCqYpzqM1hU4US6zKCP5tFo2fuNPnAASrKkWRWCk8VyangUgmPXvpU5ZqaVKNnnnBJLZM5dOsE9k34\/hKtPbg61sBGvG7R5WYadsHN7Nw+4sL4ufHn5ZG9if34n1jZJX\/442mbGXtLp7y+pmy0vbnb3U+25+PDeFudlu51\/8OXfcbIL0uHPdGtu3c="
//note that the sign data is compress by zlib and base64 encode, the origin text is:
{
"inputs": [{
"txid": "f88efadc93fb8cd14bbe35734b647682cbe",
"path": "m\/49'\/0'\/0'\/0\/0",
"value": 2.0E-5,
"index": 0,
"type": "scripthash",
"scriptPubKeyHex": "a914a05d86f19071c2baf3f0481d387"
}],
"outputs": [{
"address": "3F4sxae7cJtaPcfLcfzTv3w6oG",
"value": 1.0E-8
}, {
"address": "3GJx5cdQWGkpyTeqo",
"value": 1.330000000000002E-6
}]
}
}
//the data is compress by zlib and base64 encode, decode by base64 and decompress by zlib to get signature
ZZDdbQAgCIRXQn4ExgGB/UcobdomTe9BY8S78wOEHx042fiuseYlFm3KPPwqjSb8ihGce4winyV4iXOw1hyoN2E99mul5+7K0Gp6TPmYHEf3ivfmge7RBEike+/ufAtwW/zR0fDDjvmQyAdP0b3bZjQpkd8oFErYFe+bn0lA/98HSG3KcdhibL4OY4OueR5mDA2wrbUpIO83WQBxm1Rkw4voiqipcQp9RVpe7E3Qz4pjfFieQQknkkxlerxG53UBQSnd2MaQuUqSBNq8JBhV2W4PPZhLOKehRoo21o7u5rPDZ5tgJFBb2Bf7i9nj0ctjcegneNkxEr0tCPe8x4EWwdelESPih8cH
WalletConnect
DApp login, transfer, sign tx, sign message
The DApp qrcode protocol is consistent with DeepLink, for details, please refer to:
Add DApp to Favorites
{
"title": "Etherscan",
"url": "https://etherscan.io/",
"icon_url": "https://etherscan.io/images/logo-ether.png?v=0.0.2",
"protocol": "TIP-001",
"protocol_version": "1.0",
"chain_list": [{
"network": "ethereum",
"chain_id": "1"
}],
"desc": "Etherscan is a Block Explorer and Analytics Platform for Ethereum, a decentralized smart contracts platform",
"full_screen": 0,
"hori_vert": 0,
"title_color": "0xffffff",
"navi_color": "0x2890fe"
}
Add DApp to Favorites use TIP-001 protocol, for more details: