@did-btcr2/kms 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@ export class Signer {
37
37
  * @param {Bytes} hash The hash to sign.
38
38
  * @returns {SignatureBytes} The signature of the hash.
39
39
  */
40
- signEcdsa(hash) {
40
+ sign(hash) {
41
41
  return this.keyPair.secretKey.sign(hash, { scheme: 'ecdsa' });
42
42
  }
43
43
  ;
@@ -46,7 +46,7 @@ export class Signer {
46
46
  * @param {Bytes} hash The hash to sign.
47
47
  * @returns {SignatureBytes} The Schnorr signature of the hash.
48
48
  */
49
- sign(hash) {
49
+ signSchnorr(hash) {
50
50
  return this.keyPair.secretKey.sign(hash);
51
51
  }
52
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signer.js","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,MAAM;IACjB;;;OAGG;IACH,OAAO,CAAiB;IAExB;;;OAGG;IACH,OAAO,CAA0B;IAEjC;;;;;OAKG;IACH,YAAY,MAAsE;QAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAW;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAAA,CAAC;IAEF;;;;OAIG;IACH,IAAI,CAAC,IAAW;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF"}
1
+ {"version":3,"file":"signer.js","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,MAAM;IACjB;;;OAGG;IACH,OAAO,CAAiB;IAExB;;;OAGG;IACH,OAAO,CAA0B;IAEjC;;;;;OAKG;IACH,YAAY,MAAsE;QAChF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,IAAW;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;IAAA,CAAC;IAEF;;;;OAIG;IACH,WAAW,CAAC,IAAW;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -37,7 +37,7 @@ export class Signer {
37
37
  * @param {Bytes} hash The hash to sign.
38
38
  * @returns {SignatureBytes} The signature of the hash.
39
39
  */
40
- signEcdsa(hash) {
40
+ sign(hash) {
41
41
  return this.keyPair.secretKey.sign(hash, { scheme: 'ecdsa' });
42
42
  }
43
43
  ;
@@ -46,7 +46,7 @@ export class Signer {
46
46
  * @param {Bytes} hash The hash to sign.
47
47
  * @returns {SignatureBytes} The Schnorr signature of the hash.
48
48
  */
49
- sign(hash) {
49
+ signSchnorr(hash) {
50
50
  return this.keyPair.secretKey.sign(hash);
51
51
  }
52
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signer.js","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,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C;IAChE,CAAC;IAAA,CAAC;IAEF;;;;OAIG;IACH,WAAW,CAAC,IAAW;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF"}
@@ -38,11 +38,11 @@ export declare class Signer {
38
38
  * @param {Bytes} hash The hash to sign.
39
39
  * @returns {SignatureBytes} The signature of the hash.
40
40
  */
41
- signEcdsa(hash: Bytes): SignatureBytes;
41
+ sign(hash: Bytes): SignatureBytes;
42
42
  /**
43
43
  * Signs the given hash using Schnorr signature.
44
44
  * @param {Bytes} hash The hash to sign.
45
45
  * @returns {SignatureBytes} The Schnorr signature of the hash.
46
46
  */
47
- sign(hash: Bytes): SignatureBytes;
47
+ signSchnorr(hash: Bytes): SignatureBytes;
48
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAG,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;GAKG;AACH,qBAAa,MAAM;IACjB;;;OAGG;IACH,OAAO,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,OAAO,EAAE,MAAM,iBAAiB,CAAC;IAEjC;;;;;OAKG;gBACS,MAAM,EAAE;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,iBAAiB,CAAC;KAAE;IAKlF;;;OAGG;IACH,IAAI,SAAS,IAAI,QAAQ,CAExB;IAED;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,KAAK,GAAG,cAAc;IAItC;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,cAAc;CAGlC"}
1
+ {"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../src/signer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAG,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;GAKG;AACH,qBAAa,MAAM;IACjB;;;OAGG;IACH,OAAO,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,OAAO,EAAE,MAAM,iBAAiB,CAAC;IAEjC;;;;;OAKG;gBACS,MAAM,EAAE;QAAE,OAAO,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,MAAM,iBAAiB,CAAC;KAAE;IAKlF;;;OAGG;IACH,IAAI,SAAS,IAAI,QAAQ,CAExB;IAED;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,cAAc;IAIjC;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,KAAK,GAAG,cAAc;CAGzC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-btcr2/kms",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "Key manager that can be used with the did:btcr2 DID method",
6
6
  "main": "./dist/cjs/index.js",
@@ -56,10 +56,10 @@
56
56
  ],
57
57
  "dependencies": {
58
58
  "@noble/hashes": "^2.0.1",
59
- "@did-btcr2/bitcoin": "0.3.2",
60
- "@did-btcr2/cryptosuite": "3.2.1",
61
- "@did-btcr2/common": "2.2.2",
62
- "@did-btcr2/keypair": "0.7.1"
59
+ "@did-btcr2/bitcoin": "0.3.4",
60
+ "@did-btcr2/common": "3.1.0",
61
+ "@did-btcr2/cryptosuite": "5.0.0",
62
+ "@did-btcr2/keypair": "0.9.0"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@eslint/js": "^9.22.0",
package/src/signer.ts CHANGED
@@ -45,7 +45,7 @@ export class Signer {
45
45
  * @param {Bytes} hash The hash to sign.
46
46
  * @returns {SignatureBytes} The signature of the hash.
47
47
  */
48
- signEcdsa(hash: Bytes): SignatureBytes {
48
+ sign(hash: Bytes): SignatureBytes {
49
49
  return this.keyPair.secretKey.sign(hash, { scheme: 'ecdsa' });
50
50
  };
51
51
 
@@ -54,7 +54,7 @@ export class Signer {
54
54
  * @param {Bytes} hash The hash to sign.
55
55
  * @returns {SignatureBytes} The Schnorr signature of the hash.
56
56
  */
57
- sign(hash: Bytes): SignatureBytes {
57
+ signSchnorr(hash: Bytes): SignatureBytes {
58
58
  return this.keyPair.secretKey.sign(hash);
59
59
  }
60
60
  }