Conversation
The pkh-did-resolver package excluded many chains, including solana, which are necessary for an adequate did:pkh offering. This swaps out that package with an internal implementation which was trivial to create because we were already creating did:pkh documents locally
domleboss97
approved these changes
Jul 25, 2025
Collaborator
domleboss97
left a comment
There was a problem hiding this comment.
Some comments here and there but nothing blocking! really nice
| zodv4 | ||
| } | ||
|
|
||
| describe.each(Object.entries(schemas))("CAIP (%s)", (_name, schemas) => { |
| } from "../methods/did-pkh" | ||
| import type { DIDResolutionResult, DIDResolver } from "did-resolver" | ||
|
|
||
| export async function resolve(did: string): Promise<DIDResolutionResult> { |
Collaborator
There was a problem hiding this comment.
love how small this is
| @@ -1,4 +1,7 @@ | |||
| export type DidUri = `did:${string}:${string}` | |||
| export type DidUri< | |||
Collaborator
There was a problem hiding this comment.
do the names have to be all this??
Contributor
Author
There was a problem hiding this comment.
Haha, no they do not, but I had copied over from the did:pkh spec test suite where they had the same convention.
packages/did/src/methods/did-pkh.ts
Outdated
| } | ||
|
|
||
| if (!isDidPkhChainId(`${chainNamespace}:${chainReference}`)) { | ||
| if (!isCaip2ChainId(`${chainNamespace}:${chainReference}`)) { |
Collaborator
There was a problem hiding this comment.
putting this comment here cause it's the only commentable line - can we use caip10Parts utility in this function?
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.
The
pkh-did-resolverpackage excluded many chains, including solana, which are necessary for an adequatedid:pkhoffering. This swaps out that package with an internal implementation which was trivial to create because we were already creatingdid:pkhdocuments internally.Additionally, this adds schemas for CAIP-2, CAIP-10, CAIP-19 to the packages/did package. These will probably evolve to their own package eventually, but CAIP-2, CAIP-10 are used in the did:pkh implementation.
This also increases test coverage around did:pkh, and deprecated types like DidPkhChainId in favor of Caip2ChainId