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

How to generate a DID document referencing the public key source of the issuing address #246

Open
nayjanta opened this issue Sep 2, 2022 · 1 comment

Comments

@nayjanta
Copy link

nayjanta commented Sep 2, 2022

You explained "generate a DID document referencing the public key source of the issuing address" like this in readme.
I am going to generate DID document using ethereum source public key in nodejs.
I want to know the way.
Please let me know

@lemoustachiste
Copy link
Member

You need to store the secp256k1 key used to derive your ETH address as publicKeyJwk format.

Here is an example of the expected data format: https://www.blockcerts.org/samples/3.0/issuer-blockcerts.json (in verificationMethod, id: https://www.blockcerts.org/samples/3.0/issuer-blockcerts.json#key-1.

So from that, you need to find a library that helps you convert your public key (likely in Hex format) to JWK.

We have this script that helps achieve what you are after so you may find things that will help: https://github.com/blockchain-certificates/did-generator

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