blockchain-api icon indicating copy to clipboard operation
blockchain-api copied to clipboard

feat(identity): forward-lookup & optionally return avatar and/or return other fields

Open chris13524 opened this issue 2 years ago • 1 comments

Support forward lookup (name -> address).

Some clients might not need the avatar and not looking this up can save latency. We can gate via query param. What do we do by default?

Optional fields need special consideration for caching, if e.g. if only the address is requested first, then the second time we would want to bypass the cache.

Similar cache considerations for forward lookup. For example, since the lookup_address ethers function needs to lookup the name internally, we can improve efficiency of looking up the avatar by using the cached address -> name value to lookup the avatar.

Possibly to reduce latency further, we need to access the underlying methods inside of ethers.

This will likely need a /v2 endpoint to avoid breaking compatibility with existing Web3Modal versions in the wild.

chris13524 avatar Jul 13 '23 18:07 chris13524

We may want forward lookup, but optionally returning avatar may be an unnecessary optimization.

chris13524 avatar Jul 22 '23 15:07 chris13524