Wallets
All methods imply that you've called updateToken method
Wallets
Wallet object needs to be obtained first to get any info about wallets of user:
val mercuryo = Mercuryo.create(...)
val wallet = mercuryo.walletvar mercuryoSDK: IMercuryo = IMercuryo(isDebug: true, baseHost: "HOST_HERE")
var wallet = mercuryoSDK.walletAvailable balances
wallet.getWallets(): List<Wallet>wallet.getWallets { wallets, error in
// do some magic here...
}
Getting address of wallet
Let user top up specific wallet providing an address.
wallet.getWalletsAddress(crypto: String): Stringwallet.getWalletAddress(crypto: "BTC") { address, error in
//do some magic here
}Getting transactions of wallet
wallet.getTransactions(type: TransactionType?, limit: Int, offset: Int, currency: String?): List<Transaction> wallet.getTransactions(type: <TransactionType?>, limit: <Int>, offset: <Int>, currency: <String>) { transactions, error in
//do some magic here
}
Filters are available for the wallet:
type-TransactionType, iftype == nullis passed then transactions of all available types are returned;limit- max amount of transations, default is 20;offset- offset from the start;currency- filter by crypto, the following choices are available: (BTC,ETH,BAT,USDT,ALGO,TRX,OKB,BCH,DAI), ifcurrency == nullis passed then transactions of all currencies are returned.
Last updated
Was this helpful?