@enbox/dids 0.0.4 → 0.0.6

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 (55) hide show
  1. package/dist/browser.mjs +1 -1
  2. package/dist/browser.mjs.map +4 -4
  3. package/dist/esm/methods/did-dht-dns.js +455 -0
  4. package/dist/esm/methods/did-dht-dns.js.map +1 -0
  5. package/dist/esm/methods/did-dht-pkarr.js +168 -0
  6. package/dist/esm/methods/did-dht-pkarr.js.map +1 -0
  7. package/dist/esm/methods/did-dht-types.js +116 -0
  8. package/dist/esm/methods/did-dht-types.js.map +1 -0
  9. package/dist/esm/methods/did-dht-utils.js +143 -0
  10. package/dist/esm/methods/did-dht-utils.js.map +1 -0
  11. package/dist/esm/methods/did-dht.js +65 -842
  12. package/dist/esm/methods/did-dht.js.map +1 -1
  13. package/dist/esm/methods/did-ion-utils.js +161 -0
  14. package/dist/esm/methods/did-ion-utils.js.map +1 -0
  15. package/dist/esm/methods/did-ion.js +4 -151
  16. package/dist/esm/methods/did-ion.js.map +1 -1
  17. package/dist/esm/methods/did-key-utils.js +235 -0
  18. package/dist/esm/methods/did-key-utils.js.map +1 -0
  19. package/dist/esm/methods/did-key.js +6 -222
  20. package/dist/esm/methods/did-key.js.map +1 -1
  21. package/dist/esm/utils.js +15 -19
  22. package/dist/esm/utils.js.map +1 -1
  23. package/dist/types/methods/did-dht-dns.d.ts +114 -0
  24. package/dist/types/methods/did-dht-dns.d.ts.map +1 -0
  25. package/dist/types/methods/did-dht-pkarr.d.ts +56 -0
  26. package/dist/types/methods/did-dht-pkarr.d.ts.map +1 -0
  27. package/dist/types/methods/did-dht-types.d.ts +286 -0
  28. package/dist/types/methods/did-dht-types.d.ts.map +1 -0
  29. package/dist/types/methods/did-dht-utils.d.ts +54 -0
  30. package/dist/types/methods/did-dht-utils.d.ts.map +1 -0
  31. package/dist/types/methods/did-dht.d.ts +42 -457
  32. package/dist/types/methods/did-dht.d.ts.map +1 -1
  33. package/dist/types/methods/did-ion-utils.d.ts +86 -0
  34. package/dist/types/methods/did-ion-utils.d.ts.map +1 -0
  35. package/dist/types/methods/did-ion.d.ts +2 -82
  36. package/dist/types/methods/did-ion.d.ts.map +1 -1
  37. package/dist/types/methods/did-key-utils.d.ts +138 -0
  38. package/dist/types/methods/did-key-utils.d.ts.map +1 -0
  39. package/dist/types/methods/did-key.d.ts +3 -124
  40. package/dist/types/methods/did-key.d.ts.map +1 -1
  41. package/dist/types/utils.d.ts +25 -25
  42. package/dist/types/utils.d.ts.map +1 -1
  43. package/dist/utils.js +1 -1
  44. package/dist/utils.js.map +4 -4
  45. package/package.json +4 -4
  46. package/src/methods/did-dht-dns.ts +516 -0
  47. package/src/methods/did-dht-pkarr.ts +192 -0
  48. package/src/methods/did-dht-types.ts +316 -0
  49. package/src/methods/did-dht-utils.ts +157 -0
  50. package/src/methods/did-dht.ts +122 -1128
  51. package/src/methods/did-ion-utils.ts +186 -0
  52. package/src/methods/did-ion.ts +14 -190
  53. package/src/methods/did-key-utils.ts +258 -0
  54. package/src/methods/did-key.ts +14 -266
  55. package/src/utils.ts +31 -30
@@ -0,0 +1,86 @@
1
+ import type { Jwk } from '@enbox/crypto';
2
+ import type { IonDocumentModel } from '@decentralized-identity/ion-sdk';
3
+ import type { DidService } from '../types/did-core.js';
4
+ import type { DidIonCreateRequest, DidIonVerificationMethod } from './did-ion.js';
5
+ /**
6
+ * The `DidIonUtils` class provides utility functions to support operations in the DID ION method.
7
+ */
8
+ export declare class DidIonUtils {
9
+ /**
10
+ * Appends a specified path to a base URL, ensuring proper formatting of the resulting URL.
11
+ *
12
+ * This method is useful for constructing URLs for accessing various endpoints, such as Sidetree
13
+ * nodes in the ION network. It handles the nuances of URL path concatenation, including the
14
+ * addition or removal of leading/trailing slashes, to create a well-formed URL.
15
+ *
16
+ * @param params - The parameters for URL construction.
17
+ * @param params.baseUrl - The base URL to which the path will be appended.
18
+ * @param params.path - The path to append to the base URL.
19
+ * @returns The fully constructed URL string with the path appended to the base URL.
20
+ */
21
+ static appendPathToUrl({ baseUrl, path }: {
22
+ baseUrl: string;
23
+ path: string;
24
+ }): string;
25
+ /**
26
+ * Computes the Long Form DID URI given an ION DID's recovery key, update key, services, and
27
+ * verification methods.
28
+ *
29
+ * @param params - The parameters for computing the Long Form DID URI.
30
+ * @param params.recoveryKey - The ION Recovery Key.
31
+ * @param params.updateKey - The ION Update Key.
32
+ * @param params.services - An array of services associated with the DID.
33
+ * @param params.verificationMethods - An array of verification methods associated with the DID.
34
+ * @returns A Promise resolving to the Long Form DID URI.
35
+ */
36
+ static computeLongFormDidUri({ recoveryKey, updateKey, services, verificationMethods }: {
37
+ recoveryKey: Jwk;
38
+ updateKey: Jwk;
39
+ services: DidService[];
40
+ verificationMethods: DidIonVerificationMethod[];
41
+ }): Promise<string>;
42
+ /**
43
+ * Constructs a Sidetree Create Operation request for a DID document within the ION network.
44
+ *
45
+ * This method prepares the necessary payload for submitting a Create Operation to a Sidetree
46
+ * node, encapsulating the details of the DID document, recovery key, and update key.
47
+ *
48
+ * @param params - Parameters required to construct the Create Operation request.
49
+ * @param params.ionDocument - The DID document model containing public keys and service endpoints.
50
+ * @param params.recoveryKey - The recovery public key in JWK format.
51
+ * @param params.updateKey - The update public key in JWK format.
52
+ * @returns A promise resolving to the ION Create Operation request model, ready for submission to a Sidetree node.
53
+ */
54
+ static constructCreateRequest({ ionDocument, recoveryKey, updateKey }: {
55
+ ionDocument: IonDocumentModel;
56
+ recoveryKey: Jwk;
57
+ updateKey: Jwk;
58
+ }): Promise<DidIonCreateRequest>;
59
+ /**
60
+ * Assembles an ION document model from provided services and verification methods
61
+ *
62
+ * This model serves as the foundation for a DID document in the ION network, facilitating the
63
+ * creation and management of decentralized identities. It translates service endpoints and
64
+ * public keys into a format compatible with the Sidetree protocol, ensuring the resulting DID
65
+ * document adheres to the required specifications for ION DIDs. This method is essential for
66
+ * constructing the payload needed to register or update DIDs within the ION network.
67
+ *
68
+ * @param params - The parameters containing the services and verification methods to include in the ION document.
69
+ * @param params.services - A list of service endpoints to be included in the DID document, specifying ways to interact with the DID subject.
70
+ * @param params.verificationMethods - A list of verification methods to be included, detailing the
71
+ * cryptographic keys and their intended uses within the DID document.
72
+ * @returns A Promise resolving to an `IonDocumentModel`, ready for use in Sidetree operations like DID creation and updates.
73
+ */
74
+ static createIonDocument({ services, verificationMethods }: {
75
+ services: DidService[];
76
+ verificationMethods: DidIonVerificationMethod[];
77
+ }): Promise<IonDocumentModel>;
78
+ /**
79
+ * Normalize the given JWK to include only specific members and in lexicographic order.
80
+ *
81
+ * @param jwk - The JWK to normalize.
82
+ * @returns The normalized JWK.
83
+ */
84
+ private static normalizeJwk;
85
+ }
86
+ //# sourceMappingURL=did-ion-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-ion-utils.d.ts","sourceRoot":"","sources":["../../../src/methods/did-ion-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAKlF;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;;;;;;;;OAWG;WACW,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/C,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,MAAM;IAQV;;;;;;;;;;OAUG;WACiB,qBAAqB,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE;QACnG,WAAW,EAAE,GAAG,CAAC;QACjB,SAAS,EAAE,GAAG,CAAC;QACf,QAAQ,EAAE,UAAU,EAAE,CAAC;QACvB,mBAAmB,EAAE,wBAAwB,EAAE,CAAC;KACjD,GAAG,OAAO,CAAC,MAAM,CAAC;IAkBnB;;;;;;;;;;;OAWG;WACiB,sBAAsB,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,EAAE;QAClF,WAAW,EAAE,gBAAgB,CAAC;QAC9B,WAAW,EAAE,GAAG,CAAC;QACjB,SAAS,EAAE,GAAG,CAAA;KACf,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAWhC;;;;;;;;;;;;;;OAcG;WACiB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE;QACvE,QAAQ,EAAE,UAAU,EAAE,CAAC;QACvB,mBAAmB,EAAE,wBAAwB,EAAE,CAAA;KAChD,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAyC7B;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;CAkB5B"}
@@ -1,8 +1,8 @@
1
1
  import type { IonDocumentModel } from '@decentralized-identity/ion-sdk';
2
- import type { Jwk, KeyIdentifier, KeyImporterExporter, KeyManager, KmsExportKeyParams, KmsImportKeyParams } from '@enbox/crypto';
3
2
  import type { PortableDid } from '../types/portable-did.js';
4
3
  import type { DidCreateOptions, DidCreateVerificationMethod, DidRegistrationResult } from '../methods/did-method.js';
5
4
  import type { DidDocument, DidResolutionOptions, DidResolutionResult, DidService, DidVerificationMethod, DidVerificationRelationship } from '../types/did-core.js';
5
+ import type { Jwk, KeyIdentifier, KeyImporterExporter, KeyManager, KmsExportKeyParams, KmsImportKeyParams } from '@enbox/crypto';
6
6
  import { BearerDid } from '../bearer-did.js';
7
7
  import { DidMethod } from '../methods/did-method.js';
8
8
  /**
@@ -409,85 +409,5 @@ export declare class DidIon extends DidMethod {
409
409
  */
410
410
  static resolve(didUri: string, options?: DidResolutionOptions): Promise<DidResolutionResult>;
411
411
  }
412
- /**
413
- * The `DidIonUtils` class provides utility functions to support operations in the DID ION method.
414
- */
415
- export declare class DidIonUtils {
416
- /**
417
- * Appends a specified path to a base URL, ensuring proper formatting of the resulting URL.
418
- *
419
- * This method is useful for constructing URLs for accessing various endpoints, such as Sidetree
420
- * nodes in the ION network. It handles the nuances of URL path concatenation, including the
421
- * addition or removal of leading/trailing slashes, to create a well-formed URL.
422
- *
423
- * @param params - The parameters for URL construction.
424
- * @param params.baseUrl - The base URL to which the path will be appended.
425
- * @param params.path - The path to append to the base URL.
426
- * @returns The fully constructed URL string with the path appended to the base URL.
427
- */
428
- static appendPathToUrl({ baseUrl, path }: {
429
- baseUrl: string;
430
- path: string;
431
- }): string;
432
- /**
433
- * Computes the Long Form DID URI given an ION DID's recovery key, update key, services, and
434
- * verification methods.
435
- *
436
- * @param params - The parameters for computing the Long Form DID URI.
437
- * @param params.recoveryKey - The ION Recovery Key.
438
- * @param params.updateKey - The ION Update Key.
439
- * @param params.services - An array of services associated with the DID.
440
- * @param params.verificationMethods - An array of verification methods associated with the DID.
441
- * @returns A Promise resolving to the Long Form DID URI.
442
- */
443
- static computeLongFormDidUri({ recoveryKey, updateKey, services, verificationMethods }: {
444
- recoveryKey: Jwk;
445
- updateKey: Jwk;
446
- services: DidService[];
447
- verificationMethods: DidIonVerificationMethod[];
448
- }): Promise<string>;
449
- /**
450
- * Constructs a Sidetree Create Operation request for a DID document within the ION network.
451
- *
452
- * This method prepares the necessary payload for submitting a Create Operation to a Sidetree
453
- * node, encapsulating the details of the DID document, recovery key, and update key.
454
- *
455
- * @param params - Parameters required to construct the Create Operation request.
456
- * @param params.ionDocument - The DID document model containing public keys and service endpoints.
457
- * @param params.recoveryKey - The recovery public key in JWK format.
458
- * @param params.updateKey - The update public key in JWK format.
459
- * @returns A promise resolving to the ION Create Operation request model, ready for submission to a Sidetree node.
460
- */
461
- static constructCreateRequest({ ionDocument, recoveryKey, updateKey }: {
462
- ionDocument: IonDocumentModel;
463
- recoveryKey: Jwk;
464
- updateKey: Jwk;
465
- }): Promise<DidIonCreateRequest>;
466
- /**
467
- * Assembles an ION document model from provided services and verification methods
468
- *
469
- * This model serves as the foundation for a DID document in the ION network, facilitating the
470
- * creation and management of decentralized identities. It translates service endpoints and
471
- * public keys into a format compatible with the Sidetree protocol, ensuring the resulting DID
472
- * document adheres to the required specifications for ION DIDs. This method is essential for
473
- * constructing the payload needed to register or update DIDs within the ION network.
474
- *
475
- * @param params - The parameters containing the services and verification methods to include in the ION document.
476
- * @param params.services - A list of service endpoints to be included in the DID document, specifying ways to interact with the DID subject.
477
- * @param params.verificationMethods - A list of verification methods to be included, detailing the
478
- * cryptographic keys and their intended uses within the DID document.
479
- * @returns A Promise resolving to an `IonDocumentModel`, ready for use in Sidetree operations like DID creation and updates.
480
- */
481
- static createIonDocument({ services, verificationMethods }: {
482
- services: DidService[];
483
- verificationMethods: DidIonVerificationMethod[];
484
- }): Promise<IonDocumentModel>;
485
- /**
486
- * Normalize the given JWK to include only specific members and in lexicographic order.
487
- *
488
- * @param jwk - The JWK to normalize.
489
- * @returns The normalized JWK.
490
- */
491
- private static normalizeJwk;
492
- }
412
+ export { DidIonUtils } from './did-ion-utils.js';
493
413
  //# sourceMappingURL=did-ion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"did-ion.d.ts","sourceRoot":"","sources":["../../../src/methods/did-ion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,GAAG,EACH,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACrH,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,qBAAqB,EACrB,2BAA2B,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,O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,IAAI,CAAC;QAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC;KAChC,GAAG,OAAO,CAAC,SAAS,CAAC;IAwF3B;;;;;;;;;;OAUG;WACiB,gBAAgB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE;QAC9D,WAAW,EAAE,WAAW,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAmBlC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;WACiB,MAAM,CAAC,EAAE,WAAW,EAAE,UAAkC,EAAE,EAAE;QAC9E,UAAU,CAAC,EAAE,UAAU,GAAG,mBAAmB,CAAC,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,CAAC,CAAC;QACrG,WAAW,EAAE,WAAW,CAAC;KAC1B,GAAG,OAAO,CAAC,SAAS,CAAC;IAYtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;WACiB,OAAO,CAAC,EAAE,GAAG,EAAE,UAAgC,EAAE,EAAE;QACrE,GAAG,EAAE,SAAS,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAgElC;;;;;;;;;;;;;;;;;;;;;OAqBG;WACiB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CA+D9G;AAGD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,138 @@
1
+ import type { AsymmetricKeyConverter, Jwk, KeyCompressor } from '@enbox/crypto';
2
+ import type { MulticodecCode, MulticodecDefinition } from '@enbox/common';
3
+ /**
4
+ * Private helper that maps algorithm identifiers to their corresponding DID Key
5
+ * {@link DidKeyRegisteredKeyType | registered key type}.
6
+ *
7
+ * Note: This is also used by `DidKeyUtils.publicKeyToMultibaseId()` to validate key types.
8
+ */
9
+ export declare const AlgorithmToKeyTypeMap: {
10
+ readonly Ed25519: "Ed25519";
11
+ readonly ES256K: "secp256k1";
12
+ readonly ES256: "secp256r1";
13
+ readonly 'P-256': "secp256r1";
14
+ readonly secp256k1: "secp256k1";
15
+ readonly secp256r1: "secp256r1";
16
+ };
17
+ /**
18
+ * The `DidKeyUtils` class provides utility functions to support operations in the DID Key method.
19
+ */
20
+ export declare class DidKeyUtils {
21
+ /**
22
+ * A mapping from JSON Web Key (JWK) property descriptors to multicodec names.
23
+ *
24
+ * This mapping is used to convert keys in JWK (JSON Web Key) format to multicodec format.
25
+ *
26
+ * @remarks
27
+ * The keys of this object are strings that describe the JOSE key type and usage,
28
+ * such as 'Ed25519:public', 'Ed25519:private', etc. The values are the corresponding multicodec
29
+ * names used to represent these key types.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const multicodecName = JWK_TO_MULTICODEC['Ed25519:public'];
34
+ * // Returns 'ed25519-pub', the multicodec name for an Ed25519 public key
35
+ * ```
36
+ */
37
+ private static JWK_TO_MULTICODEC;
38
+ /**
39
+ * Defines the expected byte lengths for public keys associated with different cryptographic
40
+ * algorithms, indexed by their multicodec code values.
41
+ */
42
+ static MULTICODEC_PUBLIC_KEY_LENGTH: Record<number, number>;
43
+ /**
44
+ * A mapping from multicodec names to their corresponding JOSE (JSON Object Signing and Encryption)
45
+ * representations. This mapping facilitates the conversion of multicodec key formats to
46
+ * JWK (JSON Web Key) formats.
47
+ *
48
+ * @remarks
49
+ * The keys of this object are multicodec names, such as 'ed25519-pub', 'ed25519-priv', etc.
50
+ * The values are objects representing the corresponding JWK properties for that key type.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const joseKey = MULTICODEC_TO_JWK['ed25519-pub'];
55
+ * // Returns a partial JWK for an Ed25519 public key
56
+ * ```
57
+ */
58
+ private static MULTICODEC_TO_JWK;
59
+ /**
60
+ * Converts a JWK (JSON Web Key) to a Multicodec code and name.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const jwk: Jwk = { crv: 'Ed25519', kty: 'OKP', x: '...' };
65
+ * const { code, name } = await DidKeyUtils.jwkToMulticodec({ jwk });
66
+ * ```
67
+ *
68
+ * @param params - The parameters for the conversion.
69
+ * @param params.jwk - The JSON Web Key to be converted.
70
+ * @returns A promise that resolves to a Multicodec definition.
71
+ */
72
+ static jwkToMulticodec({ jwk }: {
73
+ jwk: Jwk;
74
+ }): Promise<MulticodecDefinition<MulticodecCode>>;
75
+ /**
76
+ * Returns the appropriate public key compressor for the specified cryptographic curve.
77
+ *
78
+ * @param curve - The cryptographic curve to use for the key conversion.
79
+ * @returns A public key compressor for the specified curve.
80
+ */
81
+ static keyCompressor(curve: string): KeyCompressor['compressPublicKey'];
82
+ /**
83
+ * Returns the appropriate key converter for the specified cryptographic curve.
84
+ *
85
+ * @param curve - The cryptographic curve to use for the key conversion.
86
+ * @returns An `AsymmetricKeyConverter` for the specified curve.
87
+ */
88
+ static keyConverter(curve: string): AsymmetricKeyConverter;
89
+ /**
90
+ * Converts a Multicodec code or name to parial JWK (JSON Web Key).
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const partialJwk = await DidKeyUtils.multicodecToJwk({ name: 'ed25519-pub' });
95
+ * ```
96
+ *
97
+ * @param params - The parameters for the conversion.
98
+ * @param params.code - Optional Multicodec code to convert.
99
+ * @param params.name - Optional Multicodec name to convert.
100
+ * @returns A promise that resolves to a JOSE format key.
101
+ */
102
+ static multicodecToJwk({ code, name }: {
103
+ code?: MulticodecCode;
104
+ name?: string;
105
+ }): Promise<Jwk>;
106
+ /**
107
+ * Converts a public key in JWK (JSON Web Key) format to a multibase identifier.
108
+ *
109
+ * @remarks
110
+ * Note: All secp public keys are converted to compressed point encoding
111
+ * before the multibase identifier is computed.
112
+ *
113
+ * Per {@link https://github.com/multiformats/multicodec/blob/master/table.csv | Multicodec table}:
114
+ * Public keys for Elliptic Curve cryptography algorithms (e.g., secp256k1,
115
+ * secp256k1r1, secp384r1, etc.) are always represented with compressed point
116
+ * encoding (e.g., secp256k1-pub, p256-pub, p384-pub, etc.).
117
+ *
118
+ * Per {@link https://datatracker.ietf.org/doc/html/rfc8812#name-jose-and-cose-secp256k1-cur | RFC 8812}:
119
+ * "As a compressed point encoding representation is not defined for JWK
120
+ * elliptic curve points, the uncompressed point encoding defined there
121
+ * MUST be used. The x and y values represented MUST both be exactly
122
+ * 256 bits, with any leading zeros preserved."
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * const publicKey = { crv: 'Ed25519', kty: 'OKP', x: '...' };
127
+ * const multibaseId = await DidKeyUtils.publicKeyToMultibaseId({ publicKey });
128
+ * ```
129
+ *
130
+ * @param params - The parameters for the conversion.
131
+ * @param params.publicKey - The public key in JWK format.
132
+ * @returns A promise that resolves to the multibase identifier.
133
+ */
134
+ static publicKeyToMultibaseId({ publicKey }: {
135
+ publicKey: Jwk;
136
+ }): Promise<string>;
137
+ }
138
+ //# sourceMappingURL=did-key-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-key-utils.d.ts","sourceRoot":"","sources":["../../../src/methods/did-key-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAQ1E;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;CAOxB,CAAC;AAEX;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAK9B;IAEF;;;OAGG;IACH,OAAc,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMhE;IAEF;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAK9B;IAEF;;;;;;;;;;;;OAYG;WACiB,eAAe,CAAC,EAAE,GAAG,EAAE,EAAE;QAC3C,GAAG,EAAE,GAAG,CAAA;KACT,GAAG,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IAwBjD;;;;;OAKG;WACW,aAAa,CACzB,KAAK,EAAE,MAAM,GACZ,aAAa,CAAC,mBAAmB,CAAC;IAcrC;;;;;OAKG;WACW,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,sBAAsB;IAcjE;;;;;;;;;;;;OAYG;WACiB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAClD,IAAI,CAAC,EAAE,cAAc,CAAC;QACtB,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,GAAG,OAAO,CAAC,GAAG,CAAC;IAmBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACiB,sBAAsB,CAAC,EAAE,SAAS,EAAE,EAAE;QACxD,SAAS,EAAE,GAAG,CAAA;KACf,GAAG,OAAO,CAAC,MAAM,CAAC;CAwBpB"}
@@ -1,9 +1,8 @@
1
- import type { AsymmetricKeyConverter, InferKeyGeneratorAlgorithm, Jwk, KeyCompressor, KeyIdentifier, KeyImporterExporter, KeyManager, KmsExportKeyParams, KmsImportKeyParams } from '@enbox/crypto';
2
- import type { MulticodecCode, MulticodecDefinition } from '@enbox/common';
3
- import { LocalKeyManager } from '@enbox/crypto';
4
1
  import type { PortableDid } from '../types/portable-did.js';
5
2
  import type { DidCreateOptions, DidCreateVerificationMethod } from './did-method.js';
6
3
  import type { DidDocument, DidResolutionOptions, DidResolutionResult, DidVerificationMethod } from '../types/did-core.js';
4
+ import type { InferKeyGeneratorAlgorithm, KeyIdentifier, KeyImporterExporter, KeyManager, KmsExportKeyParams, KmsImportKeyParams } from '@enbox/crypto';
5
+ import { LocalKeyManager } from '@enbox/crypto';
7
6
  import { BearerDid } from '../bearer-did.js';
8
7
  import { DidMethod } from './did-method.js';
9
8
  /**
@@ -326,125 +325,5 @@ export declare class DidKey extends DidMethod {
326
325
  */
327
326
  private static validateIdentifier;
328
327
  }
329
- /**
330
- * The `DidKeyUtils` class provides utility functions to support operations in the DID Key method.
331
- */
332
- export declare class DidKeyUtils {
333
- /**
334
- * A mapping from JSON Web Key (JWK) property descriptors to multicodec names.
335
- *
336
- * This mapping is used to convert keys in JWK (JSON Web Key) format to multicodec format.
337
- *
338
- * @remarks
339
- * The keys of this object are strings that describe the JOSE key type and usage,
340
- * such as 'Ed25519:public', 'Ed25519:private', etc. The values are the corresponding multicodec
341
- * names used to represent these key types.
342
- *
343
- * @example
344
- * ```ts
345
- * const multicodecName = JWK_TO_MULTICODEC['Ed25519:public'];
346
- * // Returns 'ed25519-pub', the multicodec name for an Ed25519 public key
347
- * ```
348
- */
349
- private static JWK_TO_MULTICODEC;
350
- /**
351
- * Defines the expected byte lengths for public keys associated with different cryptographic
352
- * algorithms, indexed by their multicodec code values.
353
- */
354
- static MULTICODEC_PUBLIC_KEY_LENGTH: Record<number, number>;
355
- /**
356
- * A mapping from multicodec names to their corresponding JOSE (JSON Object Signing and Encryption)
357
- * representations. This mapping facilitates the conversion of multicodec key formats to
358
- * JWK (JSON Web Key) formats.
359
- *
360
- * @remarks
361
- * The keys of this object are multicodec names, such as 'ed25519-pub', 'ed25519-priv', etc.
362
- * The values are objects representing the corresponding JWK properties for that key type.
363
- *
364
- * @example
365
- * ```ts
366
- * const joseKey = MULTICODEC_TO_JWK['ed25519-pub'];
367
- * // Returns a partial JWK for an Ed25519 public key
368
- * ```
369
- */
370
- private static MULTICODEC_TO_JWK;
371
- /**
372
- * Converts a JWK (JSON Web Key) to a Multicodec code and name.
373
- *
374
- * @example
375
- * ```ts
376
- * const jwk: Jwk = { crv: 'Ed25519', kty: 'OKP', x: '...' };
377
- * const { code, name } = await DidKeyUtils.jwkToMulticodec({ jwk });
378
- * ```
379
- *
380
- * @param params - The parameters for the conversion.
381
- * @param params.jwk - The JSON Web Key to be converted.
382
- * @returns A promise that resolves to a Multicodec definition.
383
- */
384
- static jwkToMulticodec({ jwk }: {
385
- jwk: Jwk;
386
- }): Promise<MulticodecDefinition<MulticodecCode>>;
387
- /**
388
- * Returns the appropriate public key compressor for the specified cryptographic curve.
389
- *
390
- * @param curve - The cryptographic curve to use for the key conversion.
391
- * @returns A public key compressor for the specified curve.
392
- */
393
- static keyCompressor(curve: string): KeyCompressor['compressPublicKey'];
394
- /**
395
- * Returns the appropriate key converter for the specified cryptographic curve.
396
- *
397
- * @param curve - The cryptographic curve to use for the key conversion.
398
- * @returns An `AsymmetricKeyConverter` for the specified curve.
399
- */
400
- static keyConverter(curve: string): AsymmetricKeyConverter;
401
- /**
402
- * Converts a Multicodec code or name to parial JWK (JSON Web Key).
403
- *
404
- * @example
405
- * ```ts
406
- * const partialJwk = await DidKeyUtils.multicodecToJwk({ name: 'ed25519-pub' });
407
- * ```
408
- *
409
- * @param params - The parameters for the conversion.
410
- * @param params.code - Optional Multicodec code to convert.
411
- * @param params.name - Optional Multicodec name to convert.
412
- * @returns A promise that resolves to a JOSE format key.
413
- */
414
- static multicodecToJwk({ code, name }: {
415
- code?: MulticodecCode;
416
- name?: string;
417
- }): Promise<Jwk>;
418
- /**
419
- * Converts a public key in JWK (JSON Web Key) format to a multibase identifier.
420
- *
421
- * @remarks
422
- * Note: All secp public keys are converted to compressed point encoding
423
- * before the multibase identifier is computed.
424
- *
425
- * Per {@link https://github.com/multiformats/multicodec/blob/master/table.csv | Multicodec table}:
426
- * Public keys for Elliptic Curve cryptography algorithms (e.g., secp256k1,
427
- * secp256k1r1, secp384r1, etc.) are always represented with compressed point
428
- * encoding (e.g., secp256k1-pub, p256-pub, p384-pub, etc.).
429
- *
430
- * Per {@link https://datatracker.ietf.org/doc/html/rfc8812#name-jose-and-cose-secp256k1-cur | RFC 8812}:
431
- * "As a compressed point encoding representation is not defined for JWK
432
- * elliptic curve points, the uncompressed point encoding defined there
433
- * MUST be used. The x and y values represented MUST both be exactly
434
- * 256 bits, with any leading zeros preserved."
435
- *
436
- * @example
437
- * ```ts
438
- * const publicKey = { crv: 'Ed25519', kty: 'OKP', x: '...' };
439
- * const multibaseId = await DidKeyUtils.publicKeyToMultibaseId({ publicKey });
440
- * ```
441
- *
442
- * @param params - The parameters for the conversion.
443
- * @param params.publicKey - The public key in JWK format.
444
- * @returns A promise that resolves to the multibase identifier.
445
- */
446
- static publicKeyToMultibaseId({ publicKey }: {
447
- publicKey: Jwk;
448
- }): Promise<string>;
449
- }
328
+ export { DidKeyUtils } from './did-key-utils.js';
450
329
  //# sourceMappingURL=did-key.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"did-key.d.ts","sourceRoot":"","sources":["../../../src/methods/did-key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,GAAG,EACH,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAEL,eAAe,EAGhB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,WAAW,mBAAmB,CAAC,IAAI,CAAE,SAAQ,gBAAgB,CAAC,IAAI,CAAC;IACvE;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,SAAS,UAAU,GAC/B,0BAA0B,CAAC,IAAI,C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AC,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA0BzG;;;;;;;OAOG;mBACkB,cAAc;IAsGnC;;;;;OAKG;mBACkB,qBAAqB;IA4H1C;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAoBlC;AAGD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC"}
@@ -8,37 +8,43 @@ import { DidVerificationRelationship } from './types/did-core.js';
8
8
  * Represents a Decentralized Web Node (DWN) service in a DID Document.
9
9
  *
10
10
  * A DWN DID service is a specialized type of DID service with the `type` set to
11
- * `DecentralizedWebNode`. It includes specific properties `enc` and `sig` that are used to identify
12
- * the public keys that can be used to interact with the DID Subject. The values of these properties
13
- * are strings or arrays of strings containing one or more verification method `id` values present in
14
- * the same DID document. If the `enc` and/or `sig` properties are an array of strings, an entity
15
- * interacting with the DID subject is expected to use the verification methods in the order they
16
- * are listed.
11
+ * `DecentralizedWebNode`. Encryption and signing keys are resolved from the DID document's
12
+ * verification methods, not from the service entry.
13
+ *
14
+ * The `enc` and `sig` properties are optional legacy fields that may be present on existing
15
+ * DID documents for backward compatibility. When present, they contain verification method `id`
16
+ * values that hint at which keys to use for encryption and signing. New implementations should
17
+ * resolve keys from the DID document's verification methods by purpose (`keyAgreement` for
18
+ * encryption, `authentication`/`assertionMethod` for signing).
17
19
  *
18
20
  * @example
19
21
  * ```ts
20
22
  * const service: DwnDidService = {
21
23
  * id: 'did:example:123#dwn',
22
24
  * type: 'DecentralizedWebNode',
23
- * serviceEndpoint: 'https://enbox-dwn.fly.dev',
24
- * enc: 'did:example:123#key-1',
25
- * sig: 'did:example:123#key-2'
25
+ * serviceEndpoint: 'https://enbox-dwn.fly.dev'
26
26
  * }
27
27
  * ```
28
28
  *
29
- * @see {@link https://identity.foundation/decentralized-web-node/spec/ | DIF Decentralized Web Node (DWN) Specification}
29
+ * @see {@link https://github.com/enboxorg/dwn-spec | Enbox DWN Specification}
30
30
  */
31
31
  export interface DwnDidService extends DidService {
32
32
  /**
33
+ * @deprecated Optional legacy field. Resolve encryption keys from the DID document's
34
+ * `keyAgreement` verification methods instead.
35
+ *
33
36
  * One or more verification method `id` values that can be used to encrypt information
34
37
  * intended for the DID subject.
35
38
  */
36
39
  enc?: string | string[];
37
40
  /**
41
+ * @deprecated Optional legacy field. Resolve signing keys from the DID document's
42
+ * `authentication` or `assertionMethod` verification methods instead.
43
+ *
38
44
  * One or more verification method `id` values that will be used by the DID subject to sign data
39
45
  * or by another entity to verify signatures created by the DID subject.
40
46
  */
41
- sig: string | string[];
47
+ sig?: string | string[];
42
48
  }
43
49
  /**
44
50
  * Extracts the fragment part of a Decentralized Identifier (DID) verification method identifier.
@@ -265,9 +271,11 @@ export declare function isDidService(obj: unknown): obj is DidService;
265
271
  /**
266
272
  * Checks if a given object is a {@link DwnDidService}.
267
273
  *
268
- * A {@link DwnDidService} is defined as {@link DidService} object with a `type` of
269
- * "DecentralizedWebNode" and `enc` and `sig` properties, where both properties are either strings
270
- * or arrays of strings.
274
+ * A {@link DwnDidService} is defined as a {@link DidService} object with a `type` of
275
+ * `"DecentralizedWebNode"`. The `enc` and `sig` properties are optional they may be present
276
+ * on existing DID documents for backward compatibility, but are not required per the DWN
277
+ * specification. Encryption and signing keys are resolved from the DID document's verification
278
+ * methods, not from the service entry.
271
279
  *
272
280
  * @example
273
281
  * ```ts
@@ -279,33 +287,25 @@ export declare function isDidService(obj: unknown): obj is DidService;
279
287
  * type: 'JsonWebKey2020',
280
288
  * controller: 'did:example:123',
281
289
  * publicKeyJwk: { ... }
282
- * },
283
- * {
284
- * id: 'did:example:123#key-2',
285
- * type: 'JsonWebKey2020',
286
- * controller: 'did:example:123',
287
- * publicKeyJwk: { ... }
288
290
  * }
289
291
  * ],
290
292
  * service: [
291
293
  * {
292
294
  * id: 'did:example:123#dwn',
293
295
  * type: 'DecentralizedWebNode',
294
- * serviceEndpoint: 'https://enbox-dwn.fly.dev',
295
- * enc: 'did:example:123#key-1',
296
- * sig: 'did:example:123#key-2'
296
+ * serviceEndpoint: 'https://enbox-dwn.fly.dev'
297
297
  * }
298
298
  * ]
299
299
  * };
300
300
  *
301
- * if (isDwnService(didDocument.service[0])) {
301
+ * if (isDwnDidService(didDocument.service[0])) {
302
302
  * console.log('The object is a DwnDidService');
303
303
  * } else {
304
304
  * console.log('The object is not a DwnDidService');
305
305
  * }
306
306
  * ```
307
307
  *
308
- * @see {@link https://identity.foundation/decentralized-web-node/spec/ | Decentralized Web Node (DWN) Specification}
308
+ * @see {@link https://github.com/enboxorg/dwn-spec | Enbox DWN Specification}
309
309
  *
310
310
  * @param obj - The object to be checked.
311
311
  * @returns `true` if `obj` is a DwnDidService; otherwise, `false`.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAGlE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIrE;AAED;;;;;;;;;;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