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

Android

Ready to start

dependencies {
    compile(name:'wallet-sdk-release', ext:'aar')
}
  • Deobfuscation

# tokenpocket sdk
-dontwarn com.tokenpocket.opensdk.**
-keep class com.tokenpocket.opensdk.**{*;}
-keep interface com.tokenpocket.opensdk.**{*;}

Note that all SDK methods need to be called on UI thread.

The following SDK methods support EVM series, Tron, EOS, and IOST network. Here take ETH network as an example to introduce how to use it. The parameters of each network maybe different. Please refer to github Demo for details: https://github.com/TP-Lab/Mobile-SDK/tree/master/Android%20SDK/SDK_DEMO

SDK methods

Login authorization

the developer can get the real wallet address by calling this method,

After successful authentication, signed message, wallet address will be returned. Please refer to github document for more details: https://github.com/TP-Lab/Mobile-SDK/tree/master/Android%20SDK#1%E6%8E%88%E6%9D%83%E7%99%BB%E9%99%86--authorize

Transfer

The transfer parameters of each network may be different. Only the methods of the EVM series are shown here. For more details, please refer to the following link:

https://github.com/TP-Lab/Mobile-SDK/tree/master/Android%20SDK#2%E8%BD%AC%E8%B4%A6-token-transfer

After the transfer is completed, the tx hash will be returned to the calling App. Note that completion just means pushing the operation signature. It does not guarantee the success of the operation. Developers need to confirm the final state with the tx hash.

Contract operation

After the transaction is completed, the tx hash will be returned to the calling App. Note that completion just means pushing the operation signature. It does not guarantee the success of the operation. Developers need to confirm the final state with the tx hash.

Please refer to the following for details: https://github.com/TP-Lab/Mobile-SDK/tree/master/Android%20SDK#3pushtransaction

Signature operation

This operation supports EVM related networks, EOS network, Tron network and IOST network

Starting from version 1.6.8, The Evm network support ethPersonalSign ethSignTypedDataLegacy ethSignTypedData ethSignTypedData_v4

This method signs the string and returns the wallet information and the signature result. Details can be found at: https://github.com/TP-Lab/Mobile-SDK/tree/master/Android%20SDK#4%E7%AD%BE%E5%90%8D-sign

Troubleshooting

Can't return to the App after pulling up the wallet?

Please make sure all method called on the UI thread

Parameters error?

Please check the parameters carefully, especially the network type. Each operation needs to specify the network type, otherwise the wallet cannot know which wallet is used for the operation.

How to use SDK in U3D and COCOS?

You can refer to the relevant game development documents, and import aar files

Last updated