For the complete documentation index, see llms.txt. This page is also available as Markdown.

​Pull up wallet with DeepLink

Introduction

This document describes use deeplink to pull up the TokenPocket app for authorization, transfer, signature, signing to send transaction, string signature, opening DApp and other operations.

This method is suitable for html5 applications running on the mobile browser.

Html5 applications cannot receive callbacks like native app. so if you want to get the operation result,, you need to provide the callback url, and then the wallet sends the result to the URL. The operation flow chart is as follows:

Note: This method is limited to pulling up the wallet in the mobile phone system browser. If your application runs in the wallet's Dapp browser, please refer to the document JS-SDK

The following operations support EVM related network, Tron network, EOS network and IOST network. Here we only take ETH as an example to introduce.The parameters of each network are different, and the detailed document of the fields can be found at: https://github.com/TP-Lab/tp-wallet-sdk

Instructions

Pull up the wallet to authorize login

<a href='tpoutside://pull.activity?param={}'>Open TokenPocket to authorize</a><br/>

param example content is as follows

param should be encode with encodeURIComponent

{
	"callbackUrl": "http://115.205.0.178:9011/taaBizApi/taaInitData",
	"memo": "demo",
	"action": "login",
	"actionId": "1647604216423",
	"blockchains": [{
		"chainId": "1",
		"network": "ethereum"
	}],
	"dappIcon": "https://eosknights.io/img/icon.png",
	"dappName": "zs",
	"expired": 1602,
	"protocol": "TokenPocket",
	"version": "v1.0"
}

Pull up the wallet to transfer

param example content is as follows

Pull up the wallet to sign

param example content is as follows

About "txData": DEMO

Pull up the wallet to sign string

param example content is as follows

How to return to H5 from TP wallet

Using callbackSchema. After completing the operation, TP wallet will launch the H5 application through callbackSchema and return the results.

Pull up the wallet and open the link with the Dapp browser

param example is as follows

Note that the param parameter needs to be encoded: URLEncoder.encode(param, "utf-8")

Last updated