Resolve ENS and Lens Profiles
Here we learn how to resolve a user's ENS or Lens profile data.
SSX can resolve ENS Names or Lens profiles when signing in with a simple flag. After signing in, the ENS data will be available with all other session data.
Resolving ENS Names
resolveEns
can be a boolean (default: false
) or an object.
Check out the complete resolveEns feature description here.
It's possible to resolve the ENS domain and avatar on the client during the sign-in, as in the example below:
You can also configure what you want to resolve and if you want to resolve it on the client or server during the sign-in, as in the example below:
But if you don't want to resolve the ENS Names during the sign-in or if you want to resolve it for a different address, you can do as in the example below:
Resolving Lens
To retrieve Lens profiles, a similar flag and options are available.
This feature is available for Polygon Mainnet and Mumbai Testnet. Visit the Lens docs for more information.
resolveLens
can be a boolean (default: false
) or a string.
Check out the complete resolveEns feature description here.
It's possible to resolve the Lens profiles on the client during the sign-in, as in the example below:
You can also configure to resolve the Lens profiles on an SSX-powered server, as in the example below:
But if you don't want to resolve the Lens profiles during the sign-in or if you want to resolve it for a different address, you can do as in the example below:
Getting Data from the Session
If you've enabled name resolution, you can access it in the following ways:
This resolveLens feature is available for Polygon Mainnet and Mumbai Testnet. Visit the Lens docs for more information.
Last updated