getWeb3TokensByChainByAddressWithHttpInfo method

Future<Response> getWeb3TokensByChainByAddressWithHttpInfo(
  1. String chain,
  2. String address
)

Reads an address's native balance on a chain.

Reads an address's native balance on a chain. ERC-20 positions are NOT enumerated here: eth_getBalance answers the native one, but "every token this address holds" is an indexer question — there is no RPC call that answers it, and walking a token list would return a number that silently omits whatever the list missed. explorer owns the indexer relationship; this returns the balance the chain itself can prove.

Note: This method returns the HTTP Response.

Parameters:

  • String chain (required): Chain is the registry id.

  • String address (required): Address is the account, 0x-prefixed.

Implementation

Future<Response> getWeb3TokensByChainByAddressWithHttpInfo(String chain, String address,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/web3/tokens/{chain}/{address}'
    .replaceAll('{chain}', chain)
    .replaceAll('{address}', address);

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}