This snap demonstrates how to use the onNameLookup
handler.
Note: Using name lookup requires the
endowment:name-lookup
permission. Refer to the documentation for more information.
The manifest of this snap includes the endowment:name-lookup
permission:
{
"initialPermissions": {
"endowment:name-lookup": ["eip155:1"]
}
}
This snap exposes the onNameLookup
handler. This is called when a MetaMask client
requests the resolution of a domain or address, and cannot be called manually.