> For the complete documentation index, see [llms.txt](https://help.tokenpocket.pro/developer-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.tokenpocket.pro/developer-cn/mobile-wallet/js-sdk.md).

# JS-SDK

### 插件协议支持

TokenPocket移动端App已经兼容了Metamask(ETH)、Unisat(BTC)、 TronLink(TRON)、Phantom(Solana)、Scatter(EOS)、IWallet(IOST)、TonConnect(TON) 协议。

如果你的DApp已经支持了MetaMask, Unisat, TronLink, Phantom, Scatter,  iWallet, TonConnect,这类插件钱包协议，则无需任何修改直接在TokenPocket App的DApp浏览器中运行。

更多细节信息请查看: <https://github.com/TP-Lab/tp-js-sdk>

<mark style="color:orange;">**从Android 2.1.8 、 iOS 2.3.8 开始，TokenPocket支持TonConnect(TON)协议。**</mark>

如何在TokenPocket中使用Nostr相关功能，可以参考:

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

另外，我们也提供了tp-js-sdk。该sdk只在TokenPocket移动端Dapp浏览器中生效，提供了全屏，保存图片，旋转屏幕等接口

在TP钱包中调试Dapp，可以打开开发者模式。打开方式：打开钱包->我的->关于我们->快速点击顶部TP图标多次->底部点击开发者模式->开发者模式

### tp-js-sdk详细文档请参考:<https://github.com/TP-Lab/tp-js-sdk>

### 常用的tp-js-sdk接口

获取app信息

```
tp.getAppInfo()
```

扫码

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

"abcdefg"
```

设置dapp全屏

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

更多接口和实用方式，请查看详细文档:<https://github.com/TP-Lab/tp-js-sdk>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.tokenpocket.pro/developer-cn/mobile-wallet/js-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
