Wallets
RGNCoreBuilder.AddModule(new
WalletsModule());
WalletsModule module = RGNCoreBuilder.I.GetModule<WalletsModule>();
IsUserHavePrimaryWalletResponseData response = await module.IsUserHavePrimaryWallet();
Return IsUserHavePrimaryWalletResponseData object, which contains following fields:
- bool isUserHavePrimaryWallet
WalletsModule module = RGNCoreBuilder.I.GetModule<WalletsModule>();
GetUserWalletsResponseData response = await module.GetUserWallets();
Return GetUserWalletsResponseData object, which contains following fields:
- RGNWallet[] wallets - list of wallet objects
Details of RGNWallet:
- address (string) - unique address of wallet
In order to retrieve user items, it requires to call the following function by passing wallet's address (string) as a parameter.
WalletsModule module = RGNCoreBuilder.I.GetModule<WalletsModule>();
GetUserWalletItemsResponseData response = await module.GetUserWalletItems(walletAddress);
Return GetUserWalletItemsResponseData object, which contains following fields:
- RGNWalletItem[] walletItems - list of wallet items
Details of RGNWalletItem:
- itemId (string) - unique id of item
- quantity (int) - quantity of item
When creating a wallet, you can use a password, leave the field blank if this is not necessary.
WalletsModule module = RGNCoreBuilder.I.GetModule<WalletsModule>();
CreateWalletResponseData response = await module.CreateWallet(password);
Return CreateWalletResponseData object, which contains following fields:
- string address - address of created wallet
- bool wallet_created - is wallet was created
Last modified 8mo ago