Android
Wallet SDK - Android
The Wallet SDK provides an easy way to connect to user wallets and manage user sessions.
π‘ROLLUPS THIS SDK SUPPORTS
XpansionChain
β οΈTHIS SDK IS UNSTABLEThis SDK is not yet at v1.0 so its public interface should not be considered final. Future releases may include breaking changes without further notice. We will do our best to keep this documentation updated providing visibility on breaking changes planned.CONTENTS
Setup
Requirements
Install
Connect wallet
Connect via WalletConnect
Handle callbacks
Set callback
Remove callback
Restart existing session
Disconnect wallet
Usage with the Core SDK
Further documentation
πSDK LINKS
SDK reference
Android version 8.1 (API 27) and above
Add Maven Central and JitPack to your repositories
Add dependency to your app
build.gradle
file:
In your
Application
class:
Any wallet that supports WalletConnect v1.0 can be connected
If you want to use your own bridge server instead of the default provide it via bridgeServerUrl
when connecting. For more info on how WalletConnect and the bridge works see here.
All the XpansionChainWallet
methods (connect, disconnect, etc.) are asynchronous, and changes to the status are communicated via the callback.
If a wallet app has been launched to connect or sign and your app has resumed but no result has arrived, PendingConnection
or PendingSignature
will be sent to the callback.
This allows you to handle this scenario flexibly; you could use the provided intent to prompt the user to re-launch their wallet and complete the flow or continue showing a waiting state.
The users previous wallet sessions will be automatically restored once your first activity is launched however it can also be manually triggered.
Wallet SDK Android is designed to be used in tandem with the XpansionChain Core SDK for Kotlin/JVM.
Once you connect a user's wallet with the Wallet SDK you can provide the Signer
and StarkSigner
instances to Core SDK workflows.
Check out the UI guide for implementing user wallet interactions.
See the Developer homepage for general information on building on XpansionChain.
Build on XpansionChain zkEVM:
Documentation
API reference
Support
Build on XpansionChain:
Documentation
API reference
Support
Last updated