-
Notifications
You must be signed in to change notification settings - Fork 56
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 vc sign #332
update vc sign #332
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
TBDocs Report ✅ No errors or warnings @web5/api
TBDocs Report Updated at 2023-12-06T17:01:20Z |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #332 +/- ##
==========================================
+ Coverage 92.69% 92.71% +0.01%
==========================================
Files 75 75
Lines 16786 16837 +51
Branches 1575 1577 +2
==========================================
+ Hits 15560 15610 +50
- Misses 1200 1201 +1
Partials 26 26
|
@@ -85,6 +122,14 @@ const tbdResolver = new TbdResolver(); | |||
export class VerifiableCredential { | |||
constructor(public vcDataModel: VcDataModel) {} | |||
|
|||
/** supported cryptographic algorithms. keys are `${alg}:${crv}`. */ | |||
static algorithms: { [alg: string]: Signer<Web5Crypto.EcdsaOptions | Web5Crypto.EdDsaOptions> } = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one day this will live somewhere else in a common place I'm sure
} | ||
|
||
const secp256k1Signer: Signer<Web5Crypto.EcdsaOptions> = { | ||
signer : new EcdsaAlgorithm(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes its right my did-ion test confirms it 👍
* update vc sign * fix spec * support signing with secp256k1 and ed25519 keys * remove unused import * add did ion test --------- Co-authored-by: Moe Jangda <moe@tbd.email>
* update vc sign * fix spec * support signing with secp256k1 and ed25519 keys * remove unused import * add did ion test --------- Co-authored-by: Moe Jangda <moe@tbd.email>
* update vc sign * fix spec * support signing with secp256k1 and ed25519 keys * remove unused import * add did ion test --------- Co-authored-by: Moe Jangda <moe@tbd.email>
Fixes - #328
Updating,
vc.sign
to look like this: