# Tron Provider API

### Detect and connect TokenPocket Tron Wallet

When you have TokenPocket installed, you will have `window.tokenpocket` in your webview.&#x20;

We are using [TIP-1102](https://github.com/tronprotocol/tips/issues/463)  to request user's account.

<pre class="language-javascript"><code class="lang-javascript"><strong>await window.tokenpocket.tron.request({method: 'eth_requestAccounts'})
</strong><strong>// return ['TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9']
</strong></code></pre>

After the request, you can use `window.tokenpocket.tronWeb` as a common tronWeb object.&#x20;

For example:&#x20;

SignMessageV2:&#x20;

`tronWeb.trx.signMessageV2('your message')`

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

>
