getAccountNFTs method

Future<List<AccountNFT>> getAccountNFTs({
  1. required String ownerAddress,
  2. int? offset,
  3. int? limit,
})

Implementation

Future<List<AccountNFT>> getAccountNFTs({
  required String ownerAddress,
  int? offset,
  int? limit
}) async {
  final address = HexString.ensure(ownerAddress).hex();
  IndexerClient.validateAddress(address);
  final variables = {
    "address": address,
    "offset": offset,
    "limit": limit
  };
  final data = await queryIndexer(document: GetAccountCurrentTokens, variables: variables);
  return AccountNFTs.fromJson(data).currentTokenOwnerships;
}