getGenesisAddress method

Future<Address> getGenesisAddress(
  1. String address
)

Query the network to find the genesis address of a transaction

Implementation

Future<Address> getGenesisAddress(String address) async {
  final body = 'query { genesisAddress (address:"$address") }';

  final result = await _client
      .withLogger(
        'getGenesisAddress',
      )
      .query(
        QueryOptions(
          document: gql(body),
          parserFn: (json) =>
              GenesisAddressResponseData.fromJson(json).address,
        ),
      );
  manageLinkException(result);
  return result.parsedData ?? const Address(address: '');
}