Skip to content

Commit

Permalink
changes per review
Browse files Browse the repository at this point in the history
  • Loading branch information
hmalik88 committed Feb 1, 2024
1 parent 80a53a6 commit d10d902
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions SIPS/sip-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This permission is specified as follows in `snap.manifest.json` files:

2. `schemes` - An optional non-empty array of prefixes that the snap expects for non-tld domain lookup.

**Note:** Tld domains are presumed to end with "." and one of the `tlds`. Non-tld domains are presumed to start with one of the `schemes` followed by ":" then the domain. Respectively, an example of each would be `hassan.lens` and `farcaster:hbm88`.
**Note:** TLD domains are presumed to end with "." and one of the `tlds`. Non-tld domains are presumed to start with one of the `schemes` followed by ":" then the domain. Respectively, an example of each would be `hassan.lens` and `farcaster:hbm88`.

### Snap Implementation

Expand All @@ -83,12 +83,17 @@ export const onNameLookup: OnNameLookupHandler = async ({
domain,
address
}) => {
let resolution;

if (domain) {
return { resolvedAddresses: /* Get domain resolution */ }

resolution = { protocol: /* Domain protocol */ , resolvedAddress: /* Get domain resolution */ };
return { resolvedAddresses: [insight] };
}

if (address) {
return { resolvedDomains: /* Get address resolution */ };
resolution = { protocol: /* Domain protocol */, resolvedDomain: /* Get address resolution */ };
return { resolvedDomains: [insight] };
}

return null;
Expand Down

0 comments on commit d10d902

Please sign in to comment.