Developer (English)
  • Get Started
  • Wallet
    • ​Ready to start
    • Mobile SDK
      • iOS
      • Android
    • EOS MiniWallet SDK
      • iOS
      • Android
    • ​Pull up wallet with DeepLink
    • JS-SDK
    • EOS resource payment
    • Debug DApp
    • Clear Cache
  • Extension Wallet
    • Guide
      • Introduction
      • Getting Started
      • Common Terms
      • Initialize the DApp
      • Access account
      • Send transaction
    • API Reference
      • Ethereum Provider API
      • Tron Provider API
      • RPC API
      • Signing Data
  • QRCode Protocol
    • Dynamic QRCode
    • EVM network
    • TRON
    • EOSIO
    • Solana
    • BTC
  • TIP Protocol
  • Wallet Connect
  • Token
    • Token price display support
    • How to submit token
    • How to Submit a Token Logo
    • FAQ
  • DApp
    • How to Submit DApps
    • FAQ
  • Network
    • Blockchain Unique Identifier
    • Supported Chains
      • Transaction Data
    • New Blockchains
      • Lite add blockchain
      • Basic support introduction and demonstration
      • Adding Advanced blockchain
      • Adding custom blockchain
  • FAQ
Powered by GitBook
On this page
  • Sign transaction
  • Sign and send transaction
  1. QRCode Protocol

BTC

This document show bitcoin network qrcode protocol in TokenPocket. The TokenPocket Android version supports this protocol from 1.6.7, and bitcoin 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

bitcoin:signTransaction-version=1.0&protocol=TokenPocket&network=bitcoin&chain_id=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f&data=
{
    "tx": {
        "inputs": [{
            "txid": "66eabb2801bd31854e3b66f893e4b5a609de56a507496e26c591d2660e6e7569",
            "path": "m\/49'\/0'\/0'\/0\/0",
            "value": 3.8741E-4,
            "index": 1,
            "type": "scripthash",
            "scriptPubKeyHex": "a9144a982ec12f8bd9fd76f908229c8f11a79fcb6e2487"
        }],
        "outputs": [{
            "address": "xxx",
            "value": 1.0E-4
        }, {
            "address": "xxx",
            "value": 2.8575E-4
        }]
    },
    "address": "xxx" //necessary app will use the wallet with this address to sign transaction
}


bitcoin:signTransactionSignature-version=1.0&protocol=TokenPocket&network=bitcoin&chain_id=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f&data={
   "signature":"xxxx"
}

Sign and send transaction

bitcoin:signAndSendTransaction-version=1.0&protocol=TokenPocket&network=bitcoin&chain_id=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f&data=
{
    "tx": {
        "inputs": [{
            "txid": "66eabb2801bd31854e3b66f893e4b5a609de56a507496e26c591d2660e6e7569",
            "path": "m\/49'\/0'\/0'\/0\/0",
            "value": 3.8741E-4,
            "index": 1,
            "type": "scripthash",
            "scriptPubKeyHex": "a9144a982ec12f8bd9fd76f908229c8f11a79fcb6e2487"
        }],
        "outputs": [{
            "address": "xxx",
            "value": 1.0E-4
        }, {
            "address": "xxx",
            "value": 2.8575E-4
        }]
    },
    "address": "xxx" //necessary app will use the wallet with this address to sign transaction
}
PreviousSolanaNextTIP Protocol

Last updated 2 months ago