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

Default schema of Verification Method in did document is using publicKeyBase58 #1995

Open
Patrik-Stas opened this issue Aug 14, 2024 · 1 comment

Comments

@Patrik-Stas
Copy link

Hi folks,
I have noticed that when I create did:key as

await this.agent.dids.create<KeyDidCreateOptions>({
      method: 'key',
      options: { keyType: KeyType.Ed25519 },
      secret: { privateKey: TypedArrayEncoder.fromString(secretPrivateKey) },
    })

and have a look at the result, it includes resolved DID Document of created DID. That did document includes verification method such as

"verificationMethod": [
        {
          "id": "did:key:z6MkpGR4gs4Rc3Zph4vj8wRnjnAxgAPSxcR8MAVKutWspQzc#z6MkpGR4gs4Rc3Zph4vj8wRnjnAxgAPSxcR8MAVKutWspQzc",
          "type": "Ed25519VerificationKey2018",
          "controller": "did:key:z6MkpGR4gs4Rc3Zph4vj8wRnjnAxgAPSxcR8MAVKutWspQzc",
          "publicKeyBase58": "ApA26cozGW5Maa62TNTwtgcxrb7bYjAmf9aQ5cYruCDE"
        }
      ],

but per https://www.w3.org/TR/did-core/

Changes since the First Candidate Recommendation include:
Replacement of publicKeyBase58 with publicKeyMultibase.
....

I assume this might be the case for backwards compatibility, nevertheless, I am wondering if there is a way I can tell credo to encode public keys in DID Documents differently?

Thank you.

@TimoGlastra
Copy link
Contributor

We can change it to a multikey?

Especially as did:key documents are mostly handled by our agent and not shared we shouldn't have too much interop issues for it.

Would be good to move away from the ed25519/x25519 specific keys anyway so we can fully use jwk and multikey key types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants