lookupOriginalAddress method

Future<String> lookupOriginalAddress(
  1. String addressOrAuthKey
)

Implementation

Future<String> lookupOriginalAddress(String addressOrAuthKey) async {
  final resource = await getAccountResource("0x1", "0x1::account::OriginatingAddress");
  final handle = resource["data"]["address_map"]["handle"];
  final tableItem = TableItem("address", "address", HexString.ensure(addressOrAuthKey).hex());
  final origAddress = await queryTableItem(handle, tableItem);
  return origAddress.toString();
}