-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from docknetwork/issuing-signature-update
Remove temp-signatures, use forked repo for fix Secp256k1KeyPair
- Loading branch information
Showing
5 changed files
with
48 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import Secp256k1KeyPair from 'secp256k1-key-pair'; | ||
import {suites} from 'jsonld-signatures'; | ||
|
||
// TODO: use this package https://github.com/digitalbazaar/ecdsa-secp256k1-signature-2019 | ||
// once this PR is merged: https://github.com/digitalbazaar/secp256k1-key-pair/pull/8 | ||
export class EcdsaSepc256k1Signature2019 extends suites.JwsLinkedDataSignature { | ||
/** | ||
* @param type {string} Provided by subclass. | ||
* | ||
* One of these parameters is required to use a suite for signing: | ||
* | ||
* @param [creator] {string} A key id URL to the paired public key. | ||
* @param [verificationMethod] {string} A key id URL to the paired public key. | ||
* | ||
* This parameter is required for signing: | ||
* | ||
* @param [signer] {function} an optional signer. | ||
* | ||
* Advanced optional parameters and overrides: | ||
* | ||
* @param [proof] {object} a JSON-LD document with options to use for | ||
* the `proof` node (e.g. any other custom fields can be provided here | ||
* using a context different from security-v2). | ||
* @param [date] {string|Date} signing date to use if not passed. | ||
* @param [key] {LDKeyPair} an optional crypto-ld KeyPair. | ||
* @param [useNativeCanonize] {boolean} true to use a native canonize | ||
* algorithm. | ||
*/ | ||
constructor({ | ||
signer, key, creator, verificationMethod, proof, date, useNativeCanonize | ||
} = {}) { | ||
super({ | ||
type: 'EcdsaSecp256k1Signature2019', alg: 'ES256K', | ||
LDKeyClass: Secp256k1KeyPair, creator, verificationMethod, signer, key, | ||
proof, date, useNativeCanonize}); | ||
this.requiredKeyType = 'EcdsaSecp256k1VerificationKey2019'; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters