getAccountSpecifiedCoinActivity method

Future<List<CoinActivity>> getAccountSpecifiedCoinActivity({
  1. required String coinType,
  2. required String accountAddress,
  3. int? offset,
  4. int? limit,
})

Queries an account specified coin activity

Implementation

Future<List<CoinActivity>> getAccountSpecifiedCoinActivity({
  required String coinType,
  required String accountAddress,
  int? offset,
  int? limit
}) async {
  final address = HexString.ensure(accountAddress).hex();
  IndexerClient.validateAddress(address);
  final variables = {
    "coin": coinType,
    "address": address,
    "offset": offset,
    "limit": limit
  };
  final data = await queryIndexer(document: GetAccountSpecifiedCoinActivity, variables: variables);
  return CoinActivities.fromJson(data).coinActivities;
}