# JS-SDK

### Extension Protocol Support

TokenPocket mobile app is already compatible with Metamask(ETH), Unisat(BTC), TronLink(TRON), Phantom(Solana), Scatter(EOS) , iWallet(IOST)  and TonConnect(TON) protocols.

If your DApp already supports extension wallet protocols such as MetaMask, TronLink, Phantom, Scatter, iWallet,and TonConnect, you can run it directly in the DApp browser of TokenPocket without any modification.

For details please refer to: <https://github.com/TP-Lab/tp-js-sdk>

<mark style="color:orange;">**From Android 2.1.8 and  iOS 2.3.8 ，TokenPocket mobile app is already compatible with TonConnect(TON).**</mark>

How to use Nostr DAPP in TokenPocket, Please refer to:

{% embed url="<https://help.tokenpocket.pro/en/wallet-operation/protocol/nostr>" %}

In addition, we also provide tp-js-sdk. The SDK only takes effect in the TokenPocket mobile Dapp browser, and provides interfaces such as full-screen display, saving pictures, and rotating the screen.

To debug Dapp in the TP wallet, you can turn on the developer mode. How to open: Open Wallet -> My -> About Us -> Quickly tap the TP icon at the top for 8 times -> Click on the developer mode at the bottom -> Developer mode

### For detailed document of tp-js-sdk, please refer to: <https://github.com/TP-Lab/tp-js-sdk>

### Commonly used tp-js-sdk interface

Get app information

```
tp.getAppInfo()
```

Scan code

```
tp.invokeQRScanner().then(console.log)

"abcdefg"
```

Set DApp to full screen display

```
tp.fullScreen({
   fullScreen: 0
})
```

For more interfaces, please check the detailed document: <https://github.com/TP-Lab/tp-js-sdk>
