Wallet Manager
The WalletManager classis responsible for managing user wallets within Unity applications using the Xerial services. It provides functionalities to retrieve user data and token balances.
Usage
Example
Properties
userData: An instance of the
UserData
class representing the user's data retrieved from the Xerial services.nativeBalance: A float value representing the user's native token balance.
tokenBalances: An instance of the
TokenBalances
class representing the user's token balances.nativeTokenRequester: An instance of the
RequestTransferNativeToken
class for requesting native token transfers.transferERCTokenRequester: An instance of the
RequestERCTokenTransfer
class for requesting ERC token transfers.
Example
Methods
UpdateWallet(): Initiates the process of updating the user's wallet data.
RequestWalletData(): Coroutine method that requests and updates the user's wallet data, including user data, native token balance, and token balances.
RequestUserData(string accessToken): Coroutine method that requests and updates the user's data.
RequestNativeTokenBalance(): Coroutine method that requests and updates the user's native token balance.
RequestTokenBalances(): Coroutine method that requests and updates the user's token balances.
InitializeWalletServices(): Initializes the necessary wallet-related services and event subscriptions upon instantiation.
Last updated