TronLink's tronWeb and tronLink objects provide APIs for developers to add Tokens to TronLink to be displayed in the TronLink asset list.

Developers can provide a button in the project to add the specified Token directly to the list of assets displayed in the user's TronLink Chrome plugin.

Note:

Currently, only the main network and Nile test network assets are supported to add, not shasta test network assets

The request function and its parameters are described as follows:



The TronWeb request calls a method of the TronLink plugin.

Parameter description request receives one parameter, which is an object containing method and params method: The method of the TronLink plugin to be called, currently wallet_watchAsset is supported. params: The parameters of the method method above. The following is the description of the wallet_watchAsset parameters

Add TRC-10 asset



When the code is executed, TronLink will pop up a window for the user to confirm or cancel the addition of a TRC-10.

1051


Click the "Add" button, the asset will be displayed in the asset list.

357


Add TRC-20 asset



When the code is executed, TronLink will pop up a window for the user to confirm or cancel the addition of a TRC-20.

1231


Click the "Add" button, the asset will be displayed in the asset list.

358


Add TRC-721 asset



When the code is executed, TronLink will pop up a window for the user to confirm or cancel the addition of a TRC-721.

1242


Click the "Add" button, the TRC-721 asset will be displayed in the collectibles list.

357