-
-
Notifications
You must be signed in to change notification settings - Fork 50
feat: support multicurve #304
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
base: master
Are you sure you want to change the base?
Changes from all commits
8a4e614
af85c8e
17b4e40
3aa1816
5bb7e6d
c08c487
23f565a
bcc2b42
30ada0c
5a42797
0189290
fc2f298
6ff795d
057f794
e4f22fb
7e75b16
93f266b
f14236c
5187baa
35dc228
3efc4e8
5e037af
a7ecc46
cd4332d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ import BN from "bn.js"; | |
| import stringify from "json-stable-stringify"; | ||
|
|
||
| import CoreError from "./errors"; | ||
| import Metadata from "./metadata"; | ||
| import Metadata, { createMetadataFromJson } from "./metadata"; | ||
|
|
||
| class AuthMetadata implements IAuthMetadata { | ||
| metadata: Metadata; | ||
|
|
@@ -17,10 +17,11 @@ class AuthMetadata implements IAuthMetadata { | |
| } | ||
|
|
||
| static fromJSON(value: StringifiedType): AuthMetadata { | ||
| const { data, sig } = value; | ||
| // need to inject legacyMetadata flag | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this comment a TODO? or can be removed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not a todo.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure what this means. where do you inject the flag?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| const { data, sig, legacyMetadataFlag } = value; | ||
| if (!data) throw CoreError.metadataUndefined(); | ||
|
|
||
| const m = Metadata.fromJSON(data); | ||
| const m = createMetadataFromJson(legacyMetadataFlag, data); | ||
| if (!m.pubKey) throw CoreError.metadataPubKeyUnavailable(); | ||
|
|
||
| const keyPair = secp256k1.keyFromPublic(m.pubKey.toSEC1(secp256k1)); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
I think it would be good if we can provide some comments for the interface fields