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

No fingerprint function implemented for secp256k1-verification-key-2019 #74

Open
wip-abramson opened this issue Oct 4, 2023 · 6 comments

Comments

@wip-abramson
Copy link

I am attempting to use the secp256k1-verification-key-2019 library with Digital Bazaar's DID Key driver - https://github.com/digitalbazaar/did-method-key

When attempting to covert a generated keypair into a DID Document I run into the following error:

Error: Abstract method, must be implemented in subclass.
    at EcdsaSecp256k1VerificationKey2019.fingerprint

I believe it should be fairly easy to add this function.

Alternatively, could you point to examples that takes a secp key and converts to its did-key based DID doc?

@djvs
Copy link
Contributor

djvs commented Oct 4, 2023

Hi @wip-abramson - not sure this is a covered use case. Our libraries are based on did:elem and I believe the DID document functionality is exposed via the elem-did-legacy-non-anchored library.

@wip-abramson
Copy link
Author

Ah I see, so if I wanted to support this I should fork the repo, add the functionality and create my own library?

@djvs
Copy link
Contributor

djvs commented Oct 6, 2023

I'm not entirely sure what the intended functionality is - you're welcome to submit a PR.

@wip-abramson
Copy link
Author

Thanks, I will have a go. I just want to be able to use this library with the did key driver from digital bazaar.

@djvs
Copy link
Contributor

djvs commented Oct 19, 2023

Also, re: "converting secp key to did-key based DID doc" - the element DID docs we're creating are actually based on multiple keys (a primary and a recovery).

@djvs
Copy link
Contributor

djvs commented Oct 19, 2023

It's very straightforward to actually generate a DID doc if you have two keys. It basically boils down to taking apart the DID document, which is basically recursively nested base64 strings with JSON at different levels, take a look for yourself.

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