Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update response object for AddressResolution #139

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion SIPS/sip-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The interface for the return value of an `onNameLookup` export is:
type AddressResolution = {
protocol: string;
resolvedAddress: AccountAddress;
domainName: string;
};

type DomainResolution = {
Expand All @@ -148,7 +149,8 @@ type OnNameLookupResponse =
1. The `resolvedDomain` or `resolvedAddress` in a resolution object MUST be the key that the address or domain being queried is indexed by in the protocol that the snap is resolving for. These returned values are un-opinionated at the API layer to allow the client to use them as they see fit.
2. There MUST NOT be duplicate resolutions for the same protocol in either `resolvedAddresses` or `resolvedDomains`.
3. `protocol` refers to the name of the protocol providing resolution for said `resolvedAddress`/`resolvedDomain`.
4. The returned resolution(s) MUST exist on the chain specificed by the `chainId` passed into the handler.
4. For address resolutions, the `domainName` property pertains to the domain that the address was resolved for. In most instances this will be just the `domain` passed into the lookup handler. However, the requirement of this property allows a snap to make fuzzy matches and indicate the domain name that was fuzzy matched in the response.
5. The returned resolution(s) MUST exist on the chain specificed by the `chainId` passed into the handler.

## Copyright

Expand Down
Loading