@did-btcr2/method 0.17.1 → 0.17.2

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.
package/dist/browser.js CHANGED
@@ -58168,8 +58168,8 @@ var BTCR2 = (() => {
58168
58168
  * @returns {CompressedSecp256k1PublicKey} The initialized CompressedSecp256k1PublicKey object.
58169
58169
  */
58170
58170
  static fromJSON(json) {
58171
- json.x.unshift(json.parity);
58172
- return new _CompressedSecp256k1PublicKey(json.x.toUint8Array());
58171
+ json.point.x.unshift(json.point.parity);
58172
+ return new _CompressedSecp256k1PublicKey(json.point.x.toUint8Array());
58173
58173
  }
58174
58174
  /**
58175
58175
  * Computes the deterministic public key for a given secret key.
@@ -58311,7 +58311,7 @@ var BTCR2 = (() => {
58311
58311
  return publicKey2;
58312
58312
  }
58313
58313
  /**
58314
- * Get the raw bytes of each key in the SchnorrKeyPair.
58314
+ * Get the `raw` bytes of each key in the SchnorrKeyPair.
58315
58315
  * @returns {RawSchnorrKeyPair} JSON object with the SchnorrKeyPair raw bytes.
58316
58316
  */
58317
58317
  get raw() {
@@ -58320,6 +58320,16 @@ var BTCR2 = (() => {
58320
58320
  secret: this.secretKey ? this.secretKey.bytes : void 0
58321
58321
  };
58322
58322
  }
58323
+ /**
58324
+ * Get the Keys in hex format.
58325
+ * @returns {object} The Keys in hex format
58326
+ */
58327
+ get hex() {
58328
+ return {
58329
+ public: this.publicKey.hex,
58330
+ secret: this._secretKey ? this.secretKey.hex : void 0
58331
+ };
58332
+ }
58323
58333
  /**
58324
58334
  * Get the Keys in multibase format.
58325
58335
  * @returns {MultibaseKeys} The Secp256k1SecretKey in multibase format
package/dist/browser.mjs CHANGED
@@ -58140,8 +58140,8 @@ var CompressedSecp256k1PublicKey = class _CompressedSecp256k1PublicKey {
58140
58140
  * @returns {CompressedSecp256k1PublicKey} The initialized CompressedSecp256k1PublicKey object.
58141
58141
  */
58142
58142
  static fromJSON(json) {
58143
- json.x.unshift(json.parity);
58144
- return new _CompressedSecp256k1PublicKey(json.x.toUint8Array());
58143
+ json.point.x.unshift(json.point.parity);
58144
+ return new _CompressedSecp256k1PublicKey(json.point.x.toUint8Array());
58145
58145
  }
58146
58146
  /**
58147
58147
  * Computes the deterministic public key for a given secret key.
@@ -58283,7 +58283,7 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
58283
58283
  return publicKey2;
58284
58284
  }
58285
58285
  /**
58286
- * Get the raw bytes of each key in the SchnorrKeyPair.
58286
+ * Get the `raw` bytes of each key in the SchnorrKeyPair.
58287
58287
  * @returns {RawSchnorrKeyPair} JSON object with the SchnorrKeyPair raw bytes.
58288
58288
  */
58289
58289
  get raw() {
@@ -58292,6 +58292,16 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
58292
58292
  secret: this.secretKey ? this.secretKey.bytes : void 0
58293
58293
  };
58294
58294
  }
58295
+ /**
58296
+ * Get the Keys in hex format.
58297
+ * @returns {object} The Keys in hex format
58298
+ */
58299
+ get hex() {
58300
+ return {
58301
+ public: this.publicKey.hex,
58302
+ secret: this._secretKey ? this.secretKey.hex : void 0
58303
+ };
58304
+ }
58295
58305
  /**
58296
58306
  * Get the Keys in multibase format.
58297
58307
  * @returns {MultibaseKeys} The Secp256k1SecretKey in multibase format
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-btcr2/method",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "type": "module",
5
5
  "description": "Javascript/TypeScript reference implementation of did:btcr2 method, a censorship resistant DID Method using the Bitcoin blockchain as a Verifiable Data Registry to announce changes to the DID document. Core package of the did-btcr2-js monorepo.",
6
6
  "main": "./dist/cjs/index.js",
@@ -86,7 +86,7 @@
86
86
  "@did-btcr2/bitcoin": "0.3.1",
87
87
  "@did-btcr2/cryptosuite": "3.2.1",
88
88
  "@did-btcr2/common": "2.2.1",
89
- "@did-btcr2/keypair": "0.7.0"
89
+ "@did-btcr2/keypair": "0.7.1"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@eslint/js": "^9.22.0",
@@ -139,8 +139,6 @@
139
139
  "prepublish": "pnpm build",
140
140
  "do": "pnpm tsx",
141
141
  "do:lib": "${PWD}/lib/run-lib.sh",
142
- "do:lib:btc": "${PWD}/lib/do-lib.sh bitcoin",
143
- "do:lib:btcr2": "${PWD}/lib/do-lib.sh btcr2",
144
142
  "pack:local": "pnpm pack && mv *.tgz ./release"
145
143
  }
146
144
  }