Add ENS reverse lookup endpoint and Claim prefill after SIWE#270
Open
GsCommand wants to merge 1 commit into
Open
Add ENS reverse lookup endpoint and Claim prefill after SIWE#270GsCommand wants to merge 1 commit into
GsCommand wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
GET /api/ens/lookup?address=0x...atapi/ens/lookup.jswhich validates the request, acceptsETH_RPC_URLorBASE_RPC_URL, performs a reverse lookup withetherswhen available, and returns{ ok, address, primaryName|null, source: 'reverse_resolution' }or structured errors includingPROVIDER_UNAVAILABLEwhen no RPC is configured.public/claim.htmlto call the lookup after successful SIWE authentication, display status copy, showPrimary ENS detected: name.ethwith aUse this ENS namebutton when found, and provide clear privacy wording that only ENS identity is checked.CommandLayermode suggests a tenant label derived from the primary ENS (stripping.eth),Your ENSandSingle agentmodes prefill the ENS name, and users may always manually override the input.tests/api-ens-lookup.test.jscovering missing address, invalid address, and provider-missing behavior, and made the ENS lookup handler tolerant when theethersdependency is not present (returnsDEPENDENCY_UNAVAILABLE).Testing
npm installandnpm testat repo root, and all tests passed (34/34).npm installandnpm run checkinexamples/webhook-auto-verifywhich completed successfully.npm run buildis not present in this repository and therefore was not run.Codex Task