@did-btcr2/method 0.16.0 → 0.17.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.
Files changed (41) hide show
  1. package/dist/browser.js +101 -121
  2. package/dist/browser.mjs +101 -121
  3. package/dist/cjs/core/beacon/aggregation/protocol/nostr.js +1 -1
  4. package/dist/cjs/core/beacon/aggregation/protocol/nostr.js.map +1 -1
  5. package/dist/cjs/core/crud/update.js.map +1 -1
  6. package/dist/cjs/did-btcr2.js +7 -19
  7. package/dist/cjs/did-btcr2.js.map +1 -1
  8. package/dist/cjs/index.js +0 -1
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/cjs/utils/did-document.js +61 -13
  11. package/dist/cjs/utils/did-document.js.map +1 -1
  12. package/dist/esm/core/beacon/aggregation/protocol/nostr.js +1 -1
  13. package/dist/esm/core/beacon/aggregation/protocol/nostr.js.map +1 -1
  14. package/dist/esm/core/crud/update.js.map +1 -1
  15. package/dist/esm/did-btcr2.js +7 -19
  16. package/dist/esm/did-btcr2.js.map +1 -1
  17. package/dist/esm/index.js +0 -1
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/esm/utils/did-document.js +61 -13
  20. package/dist/esm/utils/did-document.js.map +1 -1
  21. package/dist/types/core/crud/update.d.ts +10 -0
  22. package/dist/types/core/crud/update.d.ts.map +1 -1
  23. package/dist/types/did-btcr2.d.ts +14 -4
  24. package/dist/types/did-btcr2.d.ts.map +1 -1
  25. package/dist/types/index.d.ts +0 -1
  26. package/dist/types/index.d.ts.map +1 -1
  27. package/dist/types/utils/did-document.d.ts +25 -10
  28. package/dist/types/utils/did-document.d.ts.map +1 -1
  29. package/package.json +3 -3
  30. package/src/core/beacon/aggregation/protocol/nostr.ts +1 -1
  31. package/src/core/crud/update.ts +12 -0
  32. package/src/did-btcr2.ts +23 -24
  33. package/src/index.ts +0 -1
  34. package/src/utils/did-document.ts +72 -16
  35. package/dist/cjs/core/crud/create.js +0 -102
  36. package/dist/cjs/core/crud/create.js.map +0 -1
  37. package/dist/esm/core/crud/create.js +0 -102
  38. package/dist/esm/core/crud/create.js.map +0 -1
  39. package/dist/types/core/crud/create.d.ts +0 -92
  40. package/dist/types/core/crud/create.d.ts.map +0 -1
  41. package/src/core/crud/create.ts +0 -160
package/dist/browser.mjs CHANGED
@@ -45001,11 +45001,11 @@ var require_Reflect = __commonJS({
45001
45001
  };
45002
45002
  metadataRegistry.registerProvider(provider);
45003
45003
  return provider;
45004
- function GetOrCreateMetadataMap(O, P3, Create2) {
45004
+ function GetOrCreateMetadataMap(O, P3, Create) {
45005
45005
  var targetMetadata = metadata2.get(O);
45006
45006
  var createdTargetMetadata = false;
45007
45007
  if (IsUndefined(targetMetadata)) {
45008
- if (!Create2)
45008
+ if (!Create)
45009
45009
  return void 0;
45010
45010
  targetMetadata = new _Map();
45011
45011
  metadata2.set(O, targetMetadata);
@@ -45013,7 +45013,7 @@ var require_Reflect = __commonJS({
45013
45013
  }
45014
45014
  var metadataMap = targetMetadata.get(P3);
45015
45015
  if (IsUndefined(metadataMap)) {
45016
- if (!Create2)
45016
+ if (!Create)
45017
45017
  return void 0;
45018
45018
  metadataMap = new _Map();
45019
45019
  targetMetadata.set(P3, metadataMap);
@@ -45140,12 +45140,12 @@ var require_Reflect = __commonJS({
45140
45140
  };
45141
45141
  return provider;
45142
45142
  }
45143
- function GetMetadataProvider(O, P3, Create2) {
45143
+ function GetMetadataProvider(O, P3, Create) {
45144
45144
  var registeredProvider = metadataRegistry.getProvider(O, P3);
45145
45145
  if (!IsUndefined(registeredProvider)) {
45146
45146
  return registeredProvider;
45147
45147
  }
45148
- if (Create2) {
45148
+ if (Create) {
45149
45149
  if (metadataRegistry.setProvider(O, P3, metadataProvider)) {
45150
45150
  return metadataProvider;
45151
45151
  }
@@ -48685,21 +48685,21 @@ init_shim();
48685
48685
  var TXIN_WITNESS_COINBASE = "0000000000000000000000000000000000000000000000000000000000000000";
48686
48686
  var GENESIS_TX_ID = "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b";
48687
48687
  var DEFAULT_BITCOIN_NETWORK_CONFIG = {
48688
- mainnet: {
48688
+ bitcoin: {
48689
48689
  rpc: void 0,
48690
- rest: { host: "https://mempool.space/api" }
48690
+ rest: { host: "https://mempool.holdings/api" }
48691
48691
  },
48692
48692
  testnet3: {
48693
48693
  rpc: void 0,
48694
- rest: { host: "https://mempool.space/testnet/api" }
48694
+ rest: { host: "https://mempool.holdings/testnet/api" }
48695
48695
  },
48696
48696
  testnet4: {
48697
48697
  rpc: void 0,
48698
- rest: { host: "https://mempool.space/testnet4/api" }
48698
+ rest: { host: "https://mempool.holdings/testnet4/api" }
48699
48699
  },
48700
48700
  signet: {
48701
48701
  rpc: void 0,
48702
- rest: { host: "https://mempool.space/signet/api" }
48702
+ rest: { host: "https://mempool.holdings/signet/api" }
48703
48703
  },
48704
48704
  mutinynet: {
48705
48705
  rpc: void 0,
@@ -48835,7 +48835,7 @@ var BitcoinRpcClientConfig = class _BitcoinRpcClientConfig {
48835
48835
  allowDefaultWallet;
48836
48836
  constructor(options2 = {
48837
48837
  headers: {},
48838
- host: "localhost",
48838
+ host: "http://localhost",
48839
48839
  logger: console,
48840
48840
  password: "",
48841
48841
  timeout: 3e4,
@@ -48904,8 +48904,8 @@ var JsonRpcTransport = class {
48904
48904
  u.password = "";
48905
48905
  this.url = u.toString().replace(/\/+$/, "");
48906
48906
  }
48907
- } catch {
48908
- console.error("Invalid URL in Bitcoin RPC config");
48907
+ } catch (error) {
48908
+ console.error(`Invalid URL in Bitcoin RPC config: ${this.url}`, error);
48909
48909
  }
48910
48910
  }
48911
48911
  }
@@ -57816,7 +57816,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
57816
57816
  }
57817
57817
  /**
57818
57818
  * Computes the public key from the secret key bytes.
57819
- * @returns {KeyBytes} The computed public key
57819
+ * @returns {CompressedSecp256k1PublicKey} The computed public key
57820
57820
  */
57821
57821
  computePublicKey() {
57822
57822
  const publicKeyBytes = tinysecp.pointFromScalar(this.bytes, true);
@@ -57826,7 +57826,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
57826
57826
  if (publicKeyBytes.length !== 33) {
57827
57827
  throw new SecretKeyError("Invalid compute: public key not compressed format", "COMPUTE_PUBLIC_KEY_ERROR");
57828
57828
  }
57829
- return publicKeyBytes;
57829
+ return new CompressedSecp256k1PublicKey(publicKeyBytes);
57830
57830
  }
57831
57831
  /**
57832
57832
  * Converts the secret key to a JSON object.
@@ -57848,15 +57848,14 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
57848
57848
  }
57849
57849
  /**
57850
57850
  * Checks if the public key is a valid secp256k1 point.
57851
- * @param {CompressedSecp256k1PublicKey} pk The public key to validate
57852
57851
  * @returns {boolean} True if the public key is valid, false otherwise
57853
57852
  */
57854
- hasValidPublicKey(pk) {
57853
+ hasValidPublicKey() {
57854
+ const pk = this.computePublicKey();
57855
57855
  if (!tinysecp.isPoint(pk.compressed)) {
57856
57856
  return false;
57857
57857
  }
57858
- const computed = new CompressedSecp256k1PublicKey(this.computePublicKey());
57859
- return computed.equals(pk);
57858
+ return true;
57860
57859
  }
57861
57860
  /**
57862
57861
  * Decodes the multibase string to the 34-byte secret key (2 byte prefix + 32 byte key).
@@ -57943,7 +57942,7 @@ var Secp256k1SecretKey = class _Secp256k1SecretKey {
57943
57942
  /**
57944
57943
  * Generates a public key from the given secret key bytes.
57945
57944
  * @param {KeyBytes} bytes The secret key bytes
57946
- * @returns {KeyBytes} The computed public key bytes
57945
+ * @returns {CompressedSecp256k1PublicKey} The computed public key bytes
57947
57946
  */
57948
57947
  static getPublicKey(bytes3) {
57949
57948
  return new _Secp256k1SecretKey(bytes3).computePublicKey();
@@ -58000,10 +57999,15 @@ var CompressedSecp256k1PublicKey = class _CompressedSecp256k1PublicKey {
58000
57999
  }
58001
58000
  /**
58002
58001
  * Parity of the SEC compressed public key.
58003
- * @returns {0 | 1} The parity of the public key. 0 = even (0x02), 1 = odd (0x03).
58002
+ * @returns {0x02 | 0x03} The parity byte (0x02 if even, 0x03 if odd).
58003
+ * @throws {PublicKeyError} If the parity byte is not 0x02 or 0x03.
58004
58004
  */
58005
58005
  get parity() {
58006
- return this._bytes[0] & 1;
58006
+ const parity = this._bytes[0];
58007
+ if (![2, 3].includes(parity)) {
58008
+ throw new PublicKeyError("Invalid state: parity byte must be 2 or 3", "PARITY_ERROR", { parity });
58009
+ }
58010
+ return parity;
58007
58011
  }
58008
58012
  /**
58009
58013
  * Whether the SEC compressed public key has even Y.
@@ -58150,7 +58154,7 @@ var CompressedSecp256k1PublicKey = class _CompressedSecp256k1PublicKey {
58150
58154
  throw new PublicKeyError("Invalid arg: must be 32 byte secret key", "FROM_SECRET_KEY_ERROR");
58151
58155
  }
58152
58156
  const secret = sk instanceof Secp256k1SecretKey ? sk : new Secp256k1SecretKey(sk);
58153
- return new _CompressedSecp256k1PublicKey(secret.computePublicKey());
58157
+ return secret.computePublicKey();
58154
58158
  }
58155
58159
  /**
58156
58160
  * Computes modular exponentiation: (base^exp) % mod.
@@ -58232,7 +58236,7 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
58232
58236
  } else if (params.publicKey instanceof Uint8Array) {
58233
58237
  this._publicKey = new CompressedSecp256k1PublicKey(params.publicKey);
58234
58238
  } else {
58235
- this._publicKey = new CompressedSecp256k1PublicKey(this._secretKey.computePublicKey());
58239
+ this._publicKey = this._secretKey.computePublicKey();
58236
58240
  }
58237
58241
  this._publicKeyMultibase = this._publicKey.multibase.encoded;
58238
58242
  this._secretKeyMultibase = this._secretKey ? this._secretKey.multibase : "";
@@ -58258,8 +58262,13 @@ var SchnorrKeyPair = class _SchnorrKeyPair {
58258
58262
  * @throws {KeyPairError} If the public key is not a valid pair with the secret key.
58259
58263
  */
58260
58264
  set publicKey(publicKey2) {
58261
- if (this.secretKey && !this.secretKey.hasValidPublicKey(publicKey2)) {
58262
- throw new KeyPairError("Public key is not a valid pair with the secret key", "PUBLIC_KEY_ERROR");
58265
+ if (this.secretKey) {
58266
+ if (!this.secretKey.hasValidPublicKey()) {
58267
+ throw new KeyPairError("Secret key is not valid", "SECRET_KEY_ERROR");
58268
+ }
58269
+ const cPk = this.secretKey.computePublicKey();
58270
+ if (!publicKey2.equals(cPk))
58271
+ throw new KeyPairError("Public key is not a valid pair with the secret key", "PUBLIC_KEY_ERROR");
58263
58272
  }
58264
58273
  this._publicKey = publicKey2;
58265
58274
  this._publicKeyMultibase = publicKey2.multibase.encoded;
@@ -146346,7 +146355,14 @@ var BeaconFactory = class {
146346
146355
  }
146347
146356
  };
146348
146357
 
146349
- // src/core/crud/create.ts
146358
+ // src/core/crud/deactivate.ts
146359
+ init_shim();
146360
+
146361
+ // src/did-btcr2.ts
146362
+ init_shim();
146363
+ var tinysecp4 = __toESM(require_dist2(), 1);
146364
+
146365
+ // src/core/crud/read.ts
146350
146366
  init_shim();
146351
146367
 
146352
146368
  // src/utils/beacons.ts
@@ -147114,6 +147130,7 @@ var DidDocument2 = class _DidDocument {
147114
147130
  capabilityDelegation;
147115
147131
  service;
147116
147132
  constructor(document2) {
147133
+ console.log("Constructing DidDocument with document:", document2);
147117
147134
  const idType = document2.id.includes("k1") ? IdentifierTypes.KEY : IdentifierTypes.EXTERNAL;
147118
147135
  const isIntermediate = document2.id === ID_PLACEHOLDER_VALUE;
147119
147136
  const { id, controller, verificationMethod: vm, service } = document2;
@@ -147353,6 +147370,7 @@ var DidDocument2 = class _DidDocument {
147353
147370
  if (!_DidDocument.isValidVerificationRelationships(this)) {
147354
147371
  throw new DidDocumentError("Invalid IntermediateDidDocument assertionMethod", INVALID_DID_DOCUMENT, this);
147355
147372
  }
147373
+ return true;
147356
147374
  }
147357
147375
  /**
147358
147376
  * Convert the DidDocument to an IntermediateDidDocument.
@@ -147367,19 +147385,7 @@ var DidDocument2 = class _DidDocument {
147367
147385
  };
147368
147386
  var IntermediateDidDocument = class _IntermediateDidDocument extends DidDocument2 {
147369
147387
  constructor(document2) {
147370
- const intermediateDocument = JSON.cloneReplace(document2, DID_REGEX, ID_PLACEHOLDER_VALUE);
147371
- super(intermediateDocument);
147372
- }
147373
- /**
147374
- * Create a minimal IntermediateDidDocument with a placeholder ID.
147375
- * @param {Array<DidVerificationMethod>} verificationMethod The public key in multibase format.
147376
- * @param {VerificationRelationships} relationships The public key in multibase format.
147377
- * @param {Array<BeaconService>} service The service to be included in the document.
147378
- * @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
147379
- */
147380
- static create(verificationMethod, relationships, service) {
147381
- const id = ID_PLACEHOLDER_VALUE;
147382
- return new _IntermediateDidDocument({ id, ...relationships, verificationMethod, service });
147388
+ super(document2);
147383
147389
  }
147384
147390
  /**
147385
147391
  * Convert the IntermediateDidDocument to a DidDocument by replacing the placeholder value with the provided DID.
@@ -147392,92 +147398,72 @@ var IntermediateDidDocument = class _IntermediateDidDocument extends DidDocument
147392
147398
  return new DidDocument2(parseThis);
147393
147399
  }
147394
147400
  /**
147395
- * Create a DidDocument from a JSON object.
147396
- * @param {JSONObject} object The JSON object to convert.
147397
- * @returns {DidDocument} The created DidDocument.
147401
+ * Create an IntermediateDidDocument from a DidDocument by replacing the DID with a placeholder value.
147402
+ * @param {DidDocument} didDocument The DidDocument to convert.
147403
+ * @returns {IntermediateDidDocument} The IntermediateDidDocument representation of the DidDocument.
147398
147404
  */
147399
- static from(object2) {
147400
- return new _IntermediateDidDocument(object2).toDidDocument(object2.id);
147405
+ static fromDidDocument(didDocument) {
147406
+ const intermediateDocument = JSON.cloneReplace(didDocument, DID_REGEX, ID_PLACEHOLDER_VALUE);
147407
+ return new _IntermediateDidDocument(intermediateDocument);
147401
147408
  }
147402
- };
147403
-
147404
- // src/core/crud/create.ts
147405
- var Create = class {
147406
147409
  /**
147407
- * Implements {@link https://dcdpr.github.io/did-btcr2/#deterministic-key-based-creation | 4.1.1 Deterministic Key-Based Creation}.
147408
- *
147409
- * For deterministic key-based creation, the did:btcr2 identifier encodes a secp256k1 public key. The key is then used
147410
- * to deterministically generate the initial DID document.
147411
- *
147412
- * @param {CreateKeyParams} params See {@link CreateKeyParams} for details.
147413
- * @param {number} params.version did-btcr2 identifier version.
147414
- * @param {string} params.network did-btcr2 bitcoin network.
147415
- * @param {KeyBytes} params.pubKeyBytes public key bytes for id creation.
147416
- * @returns {CreateResponse} A response object of type {@link CreateResponse}.
147417
- * @throws {DidError} if the public key is missing or invalid.
147410
+ * Create a minimal IntermediateDidDocument with a placeholder ID.
147411
+ * @param {Array<DidVerificationMethod>} verificationMethod The public key in multibase format.
147412
+ * @param {VerificationRelationships} relationships The public key in multibase format.
147413
+ * @param {Array<BeaconService>} service The service to be included in the document.
147414
+ * @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
147418
147415
  */
147419
- static deterministic({ pubKeyBytes, options: options2 }) {
147420
- const { version: version3 = 1, network = "bitcoin" } = options2;
147421
- const idType = IdentifierTypes.KEY;
147422
- const identifier = Identifier.encode({ version: version3, network, idType, genesisBytes: pubKeyBytes });
147423
- const { compressed: publicKey2, multibase: publicKeyMultibase } = new CompressedSecp256k1PublicKey(pubKeyBytes);
147424
- const service = BeaconUtils.generateBeaconServices({
147425
- identifier,
147426
- publicKey: publicKey2,
147416
+ static create(verificationMethod, relationships, service) {
147417
+ const id = ID_PLACEHOLDER_VALUE;
147418
+ return new _IntermediateDidDocument({ id, ...relationships, verificationMethod, service });
147419
+ }
147420
+ /**
147421
+ * Create a minimal IntermediateDidDocument from a public key.
147422
+ * @param {KeyBytes} publicKey The public key in bytes format.
147423
+ * @returns {IntermediateDidDocument} A new IntermediateDidDocument with the placeholder ID.
147424
+ */
147425
+ static fromPublicKey(publicKey2, network) {
147426
+ const pk = new CompressedSecp256k1PublicKey(publicKey2);
147427
+ const id = ID_PLACEHOLDER_VALUE;
147428
+ const service = BeaconUtils.generateBeaconService({
147429
+ id: `${id}#key-0`,
147430
+ publicKey: pk.compressed,
147427
147431
  network: getNetwork(network),
147432
+ addressType: "p2pkh",
147428
147433
  type: "SingletonBeacon"
147429
147434
  });
147430
- const initialDocument = new DidDocument2({
147431
- id: identifier,
147432
- controller: [identifier],
147433
- verificationMethod: [{
147434
- id: `${identifier}#initialKey`,
147435
+ const relationships = {
147436
+ authentication: [`${id}#key-0`],
147437
+ assertionMethod: [`${id}#key-0`],
147438
+ capabilityInvocation: [`${id}#key-0`],
147439
+ capabilityDelegation: [`${id}#key-0`]
147440
+ };
147441
+ const verificationMethod = [
147442
+ {
147443
+ id: `${id}#key-0`,
147435
147444
  type: "Multikey",
147436
- controller: identifier,
147437
- publicKeyMultibase: publicKeyMultibase.encoded
147438
- }],
147439
- service
147440
- });
147441
- return { did: identifier, initialDocument };
147445
+ controller: id,
147446
+ publicKeyMultibase: pk.multibase.encoded
147447
+ }
147448
+ ];
147449
+ return _IntermediateDidDocument.create(verificationMethod, relationships, [service]);
147442
147450
  }
147443
147451
  /**
147444
- * Implements {@link https://dcdpr.github.io/did-btcr2/#external-initial-document-creation | 4.1.2 External Initial Document Creation}.
147445
- *
147446
- * Creates a did:btcr2 identifier from some initiating arbitrary DID document. This allows for more complex
147447
- * initial DID documents, including the ability to include Service Endpoints and Beacons that support aggregation.
147448
- * Inputs include `intermediateDocument`, optional version and network returning initialDidDocument. The
147449
- * intermediateDocument should be a valid DID document except all places where the DID document requires the use of
147450
- * the identifier (e.g. the id field). These fields should use placeholder value
147451
- * `did:btcr2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`. The intermediateDocument should include at
147452
- * least one verificationMethod and service of the type SingletonBeacon.
147453
- *
147454
- * @param {CreateExternalParams} params See {@link CreateExternalParams} for details.
147455
- * @param {number} params.version Identifier version.
147456
- * @param {string} params.network Identifier network name.
147457
- * @param {string} params.documentBytes Intermediate DID Document bytes.
147458
- * @returns {CreateResponse} A Promise resolving to {@link CreateResponses}.
147459
- * @throws {DidError} if the verificationMethod or service objects are missing required properties
147452
+ * Taken an object, convert it to an IntermediateDocuemnt and then to a DidDocument.
147453
+ * @param {JSONObject} object The JSON object to convert.
147454
+ * @returns {DidDocument} The created DidDocument.
147460
147455
  */
147461
- static async external({ intermediateDocument, options: options2 }) {
147462
- const idType = IdentifierTypes.EXTERNAL;
147463
- const { version: version3 = 1, network = "bitcoin" } = options2;
147464
- intermediateDocument.validateIntermediate();
147465
- const genesisBytes = await JSON.canonicalization.canonicalhash(intermediateDocument);
147466
- const did = Identifier.encode({ idType, genesisBytes, version: version3, network });
147467
- const initialDocument = intermediateDocument.toDidDocument(did);
147468
- return { did, initialDocument };
147456
+ static fromJSON(object2) {
147457
+ return new _IntermediateDidDocument(object2);
147458
+ }
147459
+ };
147460
+ var Document = class {
147461
+ static isValid(didDocument) {
147462
+ return new DidDocument2(didDocument).validateIntermediate();
147469
147463
  }
147470
147464
  };
147471
-
147472
- // src/core/crud/deactivate.ts
147473
- init_shim();
147474
-
147475
- // src/did-btcr2.ts
147476
- init_shim();
147477
- var tinysecp4 = __toESM(require_dist2(), 1);
147478
147465
 
147479
147466
  // src/core/crud/read.ts
147480
- init_shim();
147481
147467
  var bitcoin4 = new BitcoinNetworkConnection();
147482
147468
  var Resolve = class {
147483
147469
  /**
@@ -148176,15 +148162,9 @@ var DidBtcr2 = class {
148176
148162
  */
148177
148163
  static async create(params) {
148178
148164
  const { idType, options: options2 = {} } = params;
148179
- if (idType === IdentifierTypes.KEY) {
148180
- const { pubKeyBytes } = params;
148181
- return Create.deterministic({ pubKeyBytes, options: options2 });
148182
- }
148183
- if (idType === IdentifierTypes.EXTERNAL) {
148184
- const { intermediateDocument } = params;
148185
- return await Create.external({ intermediateDocument, options: options2 });
148186
- }
148187
- throw new MethodError('Invalid idType: expected "KEY" or "EXTERNAL"', INVALID_DID, params);
148165
+ const { version: version3 = 1, network = "bitcoin" } = options2;
148166
+ const genesisBytes = params.genesisBytes;
148167
+ return Identifier.encode({ idType, genesisBytes, version: version3, network });
148188
148168
  }
148189
148169
  /**
148190
148170
  * Entry point for section {@link https://dcdpr.github.io/did-btcr2/#read | 7.2 Read}.
@@ -150912,13 +150892,13 @@ export {
150912
150892
  BeaconFactory,
150913
150893
  BeaconUtils,
150914
150894
  CIDAggregateBeacon,
150915
- Create,
150916
150895
  DID_REGEX,
150917
150896
  Deactivate,
150918
150897
  DidBtcr2,
150919
150898
  DidDocument2 as DidDocument,
150920
150899
  DidDocumentBuilder,
150921
150900
  DidVerificationMethod,
150901
+ Document,
150922
150902
  GeneralUtils,
150923
150903
  Identifier,
150924
150904
  IntermediateDidDocument,
@@ -44,7 +44,7 @@ export class NostrAdapter {
44
44
  */
45
45
  generateIdentity() {
46
46
  this.config.keys.secret = Secp256k1SecretKey.random();
47
- this.config.keys.public = Secp256k1SecretKey.getPublicKey(this.config.keys.secret);
47
+ this.config.keys.public = Secp256k1SecretKey.getPublicKey(this.config.keys.secret).compressed;
48
48
  this.config.did = Identifier.encode({
49
49
  idType: this.config.components.idType || 'KEY',
50
50
  version: this.config.components.version || 1,
@@ -1 +1 @@
1
- {"version":3,"file":"nostr.js","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/protocol/nostr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,UAAU,GAAG,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAkB7D,MAAM,OAAO,YAAY;IAChB,IAAI,GAAW,OAAO,CAAC;IACtB,MAAM,CAAqB;IAC3B,QAAQ,GAA6C,IAAI,GAAG,EAAE,CAAC;IAEvE,YAAY,SAA6B,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,sBAAsB,CAAC,EAAE;QACrG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM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ACxD,4GAA4G;YAC5G,+DAA+D;YAC/D,YAAY;YACZ,2CAA2C;YAC3C,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YACtD,eAAe,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;QACtE,CAAC;QACD,IAAG,CAAC,eAAe,EAAE,CAAC;YACpB,MAAM,IAAI,WAAW,CACnB,0CAA0C,EAC1C,oBAAoB,EAAE,EAAE,cAAc,EAAE,CACzC,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;QACjD,6BAA6B;QAC7B,OAAO,eAAe,CAAC;IACzB,CAAC;CACF"}
@@ -1,8 +1,7 @@
1
- import { MethodError, IdentifierTypes, INVALID_DID, INVALID_DID_DOCUMENT, METHOD_NOT_SUPPORTED, W3C_DID_RESOLUTION_V1 } from '@did-btcr2/common';
1
+ import { INVALID_DID_DOCUMENT, METHOD_NOT_SUPPORTED, MethodError, W3C_DID_RESOLUTION_V1 } from '@did-btcr2/common';
2
2
  import { Did, DidError, DidErrorCode, EMPTY_DID_RESOLUTION_RESULT } from '@web5/dids';
3
3
  import { initEccLib } from 'bitcoinjs-lib';
4
4
  import * as tinysecp from 'tiny-secp256k1';
5
- import { Create } from './core/crud/create.js';
6
5
  import { Resolve } from './core/crud/read.js';
7
6
  import { Update } from './core/crud/update.js';
8
7
  import { Appendix } from './utils/appendix.js';
@@ -18,7 +17,7 @@ initEccLib(tinysecp);
18
17
  *
19
18
  * @class DidBtcr2
20
19
  * @type {DidBtcr2}
21
- *
20
+ * @implements {DidMethod}
22
21
  */
23
22
  export class DidBtcr2 {
24
23
  /** @type {string} Name of the DID method, as defined in the DID BTCR2 specification */
@@ -44,22 +43,11 @@ export class DidBtcr2 {
44
43
  static async create(params) {
45
44
  // Deconstruct the idType and options from the params
46
45
  const { idType, options = {} } = params;
47
- // If idType is key, call Create.deterministic
48
- if (idType === IdentifierTypes.KEY) {
49
- // Deconstruct the pubKeyBytes from the params
50
- const { pubKeyBytes } = params;
51
- // Return call to Create.deterministic
52
- return Create.deterministic({ pubKeyBytes, options });
53
- }
54
- // If idType is external, call Create.external
55
- if (idType === IdentifierTypes.EXTERNAL) {
56
- // Deconstruct the intermediateDocument from the params
57
- const { intermediateDocument } = params;
58
- // Return call to Create.external
59
- return await Create.external({ intermediateDocument, options });
60
- }
61
- // Throw error if idType is not key or external
62
- throw new MethodError('Invalid idType: expected "KEY" or "EXTERNAL"', INVALID_DID, params);
46
+ // Deconstruct the version and network from the options, setting defaults if not given
47
+ const { version = 1, network = 'bitcoin' } = options;
48
+ // Set the genesisBytes from the params
49
+ const genesisBytes = params.genesisBytes;
50
+ return Identifier.encode({ idType, genesisBytes, version, network });
63
51
  }
64
52
  /**
65
53
  * Entry point for section {@link https://dcdpr.github.io/did-btcr2/#read | 7.2 Read}.
@@ -1 +1 @@
1
- {"version":3,"file":"did-btcr2.js","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EAEpB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,GAAG,EACH,QAAQ,EACR,YAAY,EAEZ,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAgC,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,gCAAg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IACI,MAAM,CAAC,gBAAgB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAGrD;QACC,qEAAqE;QACrE,QAAQ,KAAK,aAAa,CAAC;QAE3B,sCAAsC;QACtC,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC5C,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;YACtD,MAAM,IAAI,WAAW,CAAC,yBAAyB,SAAS,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3H,CAAC;QAED,2FAA2F;QAC3F,kEAAkE;QAClE,MAAM,kBAAkB,GAAG,WAAW,CAAC,kBAAkB,EAAE,IAAI,CAC7D,CAAC,EAAyB,EAAE,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC;eACvG,QAAQ,CAAC,kBAAkB,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CACpE,CAAC;QAEF,qDAAqD;QACrD,IAAI,CAAC,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,QAAQ,CAChB,YAAY,CAAC,aAAa,EAC1B,0FAA0F,CAC3F,CAAC;QACJ,CAAC;QACD,OAAO,kBAA2C,CAAC;IACrD,CAAC"}
package/dist/cjs/index.js CHANGED
@@ -2,7 +2,6 @@ export * from './core/beacon/cid-aggregate.js';
2
2
  export * from './core/beacon/factory.js';
3
3
  export * from './core/beacon/singleton.js';
4
4
  export * from './core/beacon/smt-aggregate.js';
5
- export * from './core/crud/create.js';
6
5
  export * from './core/crud/deactivate.js';
7
6
  export * from './core/crud/read.js';
8
7
  export * from './core/crud/update.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAEhD,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AAExC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAE/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAEhD,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AAExC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,gBAAgB,CAAC"}