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
  1. Extension Wallet
  2. API Reference

Tron Provider API

Detect and connect TokenPocket Tron Wallet

When you have TokenPocket installed, you will have window.tokenpocket in your webview.

We are using TIP-1102 to request user's account.

await window.tokenpocket.tron.request({method: 'eth_requestAccounts'})
// return ['TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9']

After the request, you can use window.tokenpocket.tronWeb as a common tronWeb object.

For example:

SignMessageV2:

tronWeb.trx.signMessageV2('your message')

More about tronWeb please refer: https://github.com/tronprotocol/tronweb/tree/5.x

PreviousEthereum Provider APINextRPC API

Last updated 8 months ago