@tearleads/client-sdk 0.1.242 → 0.1.244

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 (137) hide show
  1. package/client/organizations/currentPrincipalMutations.js +1 -0
  2. package/client/organizations/currentPrincipalMutations.js.map +1 -1
  3. package/client/organizations/principalMutations.d.ts +5 -0
  4. package/client/organizations/principalMutations.js +1 -0
  5. package/client/organizations/principalMutations.js.map +1 -1
  6. package/data/containers/shared/mutationAcknowledgement.d.ts +1 -1
  7. package/data/containers/shared/mutationAcknowledgement.js +3 -8
  8. package/data/containers/shared/mutationAcknowledgement.js.map +1 -1
  9. package/data/documents/shared/sync/mutationAcknowledgement.js +11 -2
  10. package/data/documents/shared/sync/mutationAcknowledgement.js.map +1 -1
  11. package/data/keyingProjectionVerification/checkpoints/heldBundleRecovery.d.ts +26 -0
  12. package/data/keyingProjectionVerification/checkpoints/heldBundleRecovery.js +46 -0
  13. package/data/keyingProjectionVerification/checkpoints/heldBundleRecovery.js.map +1 -0
  14. package/data/keyingProjectionVerification/container/containerDestinationVerification.d.ts +7 -4
  15. package/data/keyingProjectionVerification/container/containerDestinationVerification.js +5 -1
  16. package/data/keyingProjectionVerification/container/containerDestinationVerification.js.map +1 -1
  17. package/data/keyingProjectionVerification/container/containerProjectionVerification.js +9 -2
  18. package/data/keyingProjectionVerification/container/containerProjectionVerification.js.map +1 -1
  19. package/data/keyingProjectionVerification/document/documentContainerProjections.js +2 -1
  20. package/data/keyingProjectionVerification/document/documentContainerProjections.js.map +1 -1
  21. package/data/keyingProjectionVerification/document/documentProjectionVerification.js +9 -2
  22. package/data/keyingProjectionVerification/document/documentProjectionVerification.js.map +1 -1
  23. package/data/keyingProjectionVerification/index.d.ts +1 -0
  24. package/data/keyingProjectionVerification/index.js +1 -0
  25. package/data/keyingProjectionVerification/index.js.map +1 -1
  26. package/data/persistence/keyingCheckpoints/keyingCheckpointRepository.js +16 -4
  27. package/data/persistence/keyingCheckpoints/keyingCheckpointRepository.js.map +1 -1
  28. package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.d.ts +13 -0
  29. package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.js +11 -0
  30. package/data/persistence/keyingCheckpoints/locallyAcknowledgedCheckpointPersistence.js.map +1 -1
  31. package/data/persistence/verifiedCitations/authoredBundleCitation.d.ts +20 -0
  32. package/data/persistence/verifiedCitations/authoredBundleCitation.js +32 -0
  33. package/data/persistence/verifiedCitations/authoredBundleCitation.js.map +1 -0
  34. package/data/persistence/verifiedManifestBundlePersistence.d.ts +10 -0
  35. package/data/persistence/verifiedManifestBundlePersistence.js +95 -9
  36. package/data/persistence/verifiedManifestBundlePersistence.js.map +1 -1
  37. package/data/principals/organizationDirectoryKeying.js +136 -0
  38. package/data/principals/organizationDirectoryKeying.js.map +1 -0
  39. package/data/principals/organizationGroupDirectoryRequest.js +17 -11
  40. package/data/principals/organizationGroupDirectoryRequest.js.map +1 -1
  41. package/internal/api-client/ApiClient.d.ts +55 -0
  42. package/internal/api-client/client/containerMutations.d.ts +11 -0
  43. package/internal/api-client/client/documents.d.ts +5 -0
  44. package/internal/api-client/client/organizations.d.ts +20 -0
  45. package/internal/api-client/client/principalPolicies.d.ts +9 -0
  46. package/internal/api-client/client/session.d.ts +10 -0
  47. package/internal/api-client/principalPolicyRequests.d.ts +7 -0
  48. package/internal/api-client/writerProjectionCitations.d.ts +3 -0
  49. package/internal/api-client/writerProjectionCitations.js +12 -0
  50. package/internal/api-client/writerProjectionCitations.js.map +1 -1
  51. package/internal/crypto/index.d.ts +1 -1
  52. package/internal/crypto/index.js +1 -1
  53. package/internal/crypto/index.js.map +1 -1
  54. package/internal/crypto/keying/canonicalJsonGuard.d.ts +13 -0
  55. package/internal/crypto/keying/canonicalJsonGuard.js +23 -0
  56. package/internal/crypto/keying/canonicalJsonGuard.js.map +1 -1
  57. package/internal/crypto/keying/index.d.ts +1 -1
  58. package/internal/crypto/keying/index.js +1 -1
  59. package/internal/crypto/keying/index.js.map +1 -1
  60. package/internal/crypto/keying/keyingHashDomains.d.ts +1 -1
  61. package/internal/crypto/keying/keyingHashDomains.js.map +1 -1
  62. package/internal/validators/operation/auth.d.ts +40 -0
  63. package/internal/validators/operation/containerMutations.d.ts +44 -0
  64. package/internal/validators/operation/documentMutations.d.ts +12 -0
  65. package/internal/validators/operation/organizations.d.ts +48 -0
  66. package/internal/validators/operation/principals.d.ts +16 -0
  67. package/internal/validators/response/areas/containers.d.ts +1 -1
  68. package/internal/validators/response/areas/containers.js +1 -1
  69. package/internal/validators/response/areas/containers.js.map +1 -1
  70. package/internal/validators/response/container.d.ts +16 -0
  71. package/internal/validators/response/container.js +3 -0
  72. package/internal/validators/response/container.js.map +1 -1
  73. package/internal/validators/response/containerMetadata.d.ts +8 -0
  74. package/internal/validators/response/documentMutation.d.ts +8 -0
  75. package/internal/validators/response/documentMutation.js +2 -1
  76. package/internal/validators/response/documentMutation.js.map +1 -1
  77. package/internal/validators/response/organization.d.ts +8 -0
  78. package/internal/validators/response/organizationProvisioning.d.ts +113 -0
  79. package/internal/validators/response/organizationProvisioning.js +2 -1
  80. package/internal/validators/response/organizationProvisioning.js.map +1 -1
  81. package/internal/validators/response/principal.d.ts +16 -0
  82. package/internal/validators/response/registration.d.ts +40 -0
  83. package/internal/validators/response/writerProjectionWire.d.ts +25 -0
  84. package/internal/validators/response/writerProjectionWire.js +109 -3
  85. package/internal/validators/response/writerProjectionWire.js.map +1 -1
  86. package/package.json +1 -1
  87. package/stores/documents/documentStore/rotation/index.js +3 -1
  88. package/stores/documents/documentStore/rotation/index.js.map +1 -1
  89. package/stores/documents/documentStore/sync/syncAttachments.js +4 -1
  90. package/stores/documents/documentStore/sync/syncAttachments.js.map +1 -1
  91. package/stores/documents/documentStore/sync/syncDetachedAttachments.js +3 -1
  92. package/stores/documents/documentStore/sync/syncDetachedAttachments.js.map +1 -1
  93. package/stores/documents/documentStore/sync/syncRequest.js +3 -1
  94. package/stores/documents/documentStore/sync/syncRequest.js.map +1 -1
  95. package/workflows/container-contents/container-state/create/createAdoption.js +11 -3
  96. package/workflows/container-contents/container-state/create/createAdoption.js.map +1 -1
  97. package/workflows/container-contents/container-state/create/createWithMetadata.js +2 -2
  98. package/workflows/container-contents/container-state/create/createWithMetadata.js.map +1 -1
  99. package/workflows/container-contents/container-state/projectionCache.js +3 -0
  100. package/workflows/container-contents/container-state/projectionCache.js.map +1 -1
  101. package/workflows/container-contents/metadata/index.js +5 -2
  102. package/workflows/container-contents/metadata/index.js.map +1 -1
  103. package/workflows/containers/child/recite.js +4 -2
  104. package/workflows/containers/child/recite.js.map +1 -1
  105. package/workflows/documents/create/createAdoption.js +11 -2
  106. package/workflows/documents/create/createAdoption.js.map +1 -1
  107. package/workflows/documents/create/createResponse.js +1 -0
  108. package/workflows/documents/create/createResponse.js.map +1 -1
  109. package/workflows/documents/linkSet/linkSetRemote.js +1 -0
  110. package/workflows/documents/linkSet/linkSetRemote.js.map +1 -1
  111. package/workflows/documents/sync/syncAttemptPlanning.js +8 -2
  112. package/workflows/documents/sync/syncAttemptPlanning.js.map +1 -1
  113. package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js +3 -2
  114. package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js.map +1 -1
  115. package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js +3 -2
  116. package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js.map +1 -1
  117. package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js +1 -0
  118. package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js.map +1 -1
  119. package/workflows/organizations/groupShare/currentShareGrantMutation.js +3 -0
  120. package/workflows/organizations/groupShare/currentShareGrantMutation.js.map +1 -1
  121. package/workflows/organizations/groupShare/shareWithGroup.js +2 -0
  122. package/workflows/organizations/groupShare/shareWithGroup.js.map +1 -1
  123. package/workflows/organizations/groups/createCurrentOrganizationGroup.js +3 -0
  124. package/workflows/organizations/groups/createCurrentOrganizationGroup.js.map +1 -1
  125. package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js +1 -0
  126. package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js.map +1 -1
  127. package/workflows/organizations/groups/deleteOrganizationGroup.d.ts +2 -0
  128. package/workflows/organizations/groups/deleteOrganizationGroup.js +1 -0
  129. package/workflows/organizations/groups/deleteOrganizationGroup.js.map +1 -1
  130. package/workflows/organizations/groups/organizationGroupDirectory.js +1 -0
  131. package/workflows/organizations/groups/organizationGroupDirectory.js.map +1 -1
  132. package/workflows/organizations/principalPolicy/index.d.ts +12 -0
  133. package/workflows/organizations/principalPolicy/index.js +11 -0
  134. package/workflows/organizations/principalPolicy/index.js.map +1 -1
  135. package/workflows/registration/organizationCreation/organizationCreationIntent.d.ts +10 -0
  136. package/workflows/registration/provisioningAcknowledgement.js +16 -11
  137. package/workflows/registration/provisioningAcknowledgement.js.map +1 -1
@@ -359,6 +359,7 @@ export declare class PrincipalPolicyArea {
359
359
  keyTargetHash: string;
360
360
  parentContainerKeyEpochId: string | null;
361
361
  };
362
+ bundleDigest: string;
362
363
  containerId: string;
363
364
  createdAt: string;
364
365
  eventHash: string;
@@ -392,6 +393,7 @@ export declare class PrincipalPolicyArea {
392
393
  keyTargetHash: string;
393
394
  parentContainerKeyEpochId: string | null;
394
395
  };
396
+ bundleDigest: string;
395
397
  containerId: string;
396
398
  createdAt: string;
397
399
  eventHash: string;
@@ -425,6 +427,7 @@ export declare class PrincipalPolicyArea {
425
427
  keyTargetHash: string;
426
428
  parentContainerKeyEpochId: string | null;
427
429
  };
430
+ bundleDigest: string;
428
431
  containerId: string;
429
432
  createdAt: string;
430
433
  eventHash: string;
@@ -457,6 +460,7 @@ export declare class PrincipalPolicyArea {
457
460
  keyTargetHash: string;
458
461
  parentContainerKeyEpochId: string | null;
459
462
  };
463
+ bundleDigest: string;
460
464
  containerId: string;
461
465
  createdAt: string;
462
466
  eventHash: string;
@@ -489,6 +493,7 @@ export declare class PrincipalPolicyArea {
489
493
  keyTargetHash: string;
490
494
  parentContainerKeyEpochId: string | null;
491
495
  };
496
+ bundleDigest: string;
492
497
  containerId: string;
493
498
  createdAt: string;
494
499
  eventHash: string;
@@ -543,6 +548,7 @@ export declare class PrincipalPolicyArea {
543
548
  keyTargetHash: string;
544
549
  parentContainerKeyEpochId: string | null;
545
550
  };
551
+ bundleDigest: string;
546
552
  containerId: string;
547
553
  createdAt: string;
548
554
  eventHash: string;
@@ -590,6 +596,7 @@ export declare class PrincipalPolicyArea {
590
596
  keyTargetHash: string;
591
597
  parentContainerKeyEpochId: string | null;
592
598
  };
599
+ bundleDigest: string;
593
600
  containerId: string;
594
601
  createdAt: string;
595
602
  eventHash: string;
@@ -626,6 +633,7 @@ export declare class PrincipalPolicyArea {
626
633
  keyTargetHash: string;
627
634
  parentContainerKeyEpochId: string | null;
628
635
  };
636
+ bundleDigest: string;
629
637
  containerId: string;
630
638
  createdAt: string;
631
639
  eventHash: string;
@@ -663,6 +671,7 @@ export declare class PrincipalPolicyArea {
663
671
  keyTargetHash: string;
664
672
  parentContainerKeyEpochId: string | null;
665
673
  };
674
+ bundleDigest: string;
666
675
  containerId: string;
667
676
  createdAt: string;
668
677
  eventHash: string;
@@ -48,6 +48,7 @@ export declare class SessionArea {
48
48
  keyTargetHash: string;
49
49
  parentContainerKeyEpochId: string | null;
50
50
  };
51
+ bundleDigest: string;
51
52
  containerId: string;
52
53
  createdAt: string;
53
54
  eventHash: string;
@@ -62,6 +63,7 @@ export declare class SessionArea {
62
63
  };
63
64
  metadataDocument: {
64
65
  createdAt: string;
66
+ bundleDigest: string;
65
67
  contentKeyEpoch: number;
66
68
  eventHash: string;
67
69
  id: string;
@@ -75,11 +77,13 @@ export declare class SessionArea {
75
77
  };
76
78
  };
77
79
  organizationMetadataContainerId: string;
80
+ rootBundleDigest: string;
78
81
  rootContainerId: string;
79
82
  rootMetadataAccessEpoch: number;
80
83
  rootMetadataAccessStateHash: string;
81
84
  rootMetadataDocument: {
82
85
  createdAt: string;
86
+ bundleDigest: string;
83
87
  contentKeyEpoch: number;
84
88
  eventHash: string;
85
89
  id: string;
@@ -102,6 +106,7 @@ export declare class SessionArea {
102
106
  keyTargetHash: string;
103
107
  parentContainerKeyEpochId: string | null;
104
108
  };
109
+ bundleDigest: string;
105
110
  containerId: string;
106
111
  createdAt: string;
107
112
  eventHash: string;
@@ -116,6 +121,7 @@ export declare class SessionArea {
116
121
  };
117
122
  metadataDocument: {
118
123
  createdAt: string;
124
+ bundleDigest: string;
119
125
  contentKeyEpoch: number;
120
126
  eventHash: string;
121
127
  id: string;
@@ -131,6 +137,7 @@ export declare class SessionArea {
131
137
  userId: string;
132
138
  organizationProfileDocument?: {
133
139
  createdAt: string;
140
+ bundleDigest: string;
134
141
  contentKeyEpoch: number;
135
142
  eventHash: string;
136
143
  id: string;
@@ -153,6 +160,7 @@ export declare class SessionArea {
153
160
  keyTargetHash: string;
154
161
  parentContainerKeyEpochId: string | null;
155
162
  };
163
+ bundleDigest: string;
156
164
  containerId: string;
157
165
  createdAt: string;
158
166
  eventHash: string;
@@ -167,6 +175,7 @@ export declare class SessionArea {
167
175
  };
168
176
  metadataDocument: {
169
177
  createdAt: string;
178
+ bundleDigest: string;
170
179
  contentKeyEpoch: number;
171
180
  eventHash: string;
172
181
  id: string;
@@ -182,6 +191,7 @@ export declare class SessionArea {
182
191
  rosterProfileContainerId?: string | undefined;
183
192
  rosterProfileDocument?: {
184
193
  createdAt: string;
194
+ bundleDigest: string;
185
195
  contentKeyEpoch: number;
186
196
  eventHash: string;
187
197
  id: string;
@@ -360,6 +360,7 @@ export declare class PrincipalPolicyRequests {
360
360
  keyTargetHash: string;
361
361
  parentContainerKeyEpochId: string | null;
362
362
  };
363
+ bundleDigest: string;
363
364
  containerId: string;
364
365
  createdAt: string;
365
366
  eventHash: string;
@@ -392,6 +393,7 @@ export declare class PrincipalPolicyRequests {
392
393
  keyTargetHash: string;
393
394
  parentContainerKeyEpochId: string | null;
394
395
  };
396
+ bundleDigest: string;
395
397
  containerId: string;
396
398
  createdAt: string;
397
399
  eventHash: string;
@@ -438,6 +440,7 @@ export declare class PrincipalPolicyRequests {
438
440
  keyTargetHash: string;
439
441
  parentContainerKeyEpochId: string | null;
440
442
  };
443
+ bundleDigest: string;
441
444
  containerId: string;
442
445
  createdAt: string;
443
446
  eventHash: string;
@@ -474,6 +477,7 @@ export declare class PrincipalPolicyRequests {
474
477
  keyTargetHash: string;
475
478
  parentContainerKeyEpochId: string | null;
476
479
  };
480
+ bundleDigest: string;
477
481
  containerId: string;
478
482
  createdAt: string;
479
483
  eventHash: string;
@@ -510,6 +514,7 @@ export declare class PrincipalPolicyRequests {
510
514
  keyTargetHash: string;
511
515
  parentContainerKeyEpochId: string | null;
512
516
  };
517
+ bundleDigest: string;
513
518
  containerId: string;
514
519
  createdAt: string;
515
520
  eventHash: string;
@@ -542,6 +547,7 @@ export declare class PrincipalPolicyRequests {
542
547
  keyTargetHash: string;
543
548
  parentContainerKeyEpochId: string | null;
544
549
  };
550
+ bundleDigest: string;
545
551
  containerId: string;
546
552
  createdAt: string;
547
553
  eventHash: string;
@@ -574,6 +580,7 @@ export declare class PrincipalPolicyRequests {
574
580
  keyTargetHash: string;
575
581
  parentContainerKeyEpochId: string | null;
576
582
  };
583
+ bundleDigest: string;
577
584
  containerId: string;
578
585
  createdAt: string;
579
586
  eventHash: string;
@@ -14,7 +14,10 @@ export declare function writerProjectionCitedContainerIds(projection: unknown):
14
14
  */
15
15
  export declare class CitingProjectionCache<V> extends BoundedCache<Promise<V | null>> {
16
16
  private readonly citations;
17
+ private readonly resolved;
17
18
  set(key: string, value: Promise<V | null>): this;
19
+ /** A projection a verifier refused is never served again: it refetches. */
20
+ get(key: string): Promise<V | null> | undefined;
18
21
  /** Evicts the entries that cite any of the containers or are unresolved. */
19
22
  evictCiting(containerIds: ReadonlySet<string>): void;
20
23
  }
@@ -1,3 +1,4 @@
1
+ import { isRejectedDecodedProjection } from "../validators/response/index.js";
1
2
  import { BoundedCache } from "./ApiCache.js";
2
3
  function collectCitedArrayItems(value, key, cited) {
3
4
  const listsIds = /containerids$/iu.test(key);
@@ -56,14 +57,25 @@ function citesAny(cited, containerIds) {
56
57
  */
57
58
  export class CitingProjectionCache extends BoundedCache {
58
59
  citations = new WeakMap();
60
+ resolved = new WeakMap();
59
61
  set(key, value) {
60
62
  void value.then((projection) => {
61
63
  if (projection !== null) {
64
+ this.resolved.set(value, projection);
62
65
  this.citations.set(value, writerProjectionCitedContainerIds(projection));
63
66
  }
64
67
  }, () => undefined);
65
68
  return super.set(key, value);
66
69
  }
70
+ /** A projection a verifier refused is never served again: it refetches. */
71
+ get(key) {
72
+ const entry = super.get(key);
73
+ if (entry && isRejectedDecodedProjection(this.resolved.get(entry))) {
74
+ this.delete(key);
75
+ return undefined;
76
+ }
77
+ return entry;
78
+ }
67
79
  /** Evicts the entries that cite any of the containers or are unresolved. */
68
80
  evictCiting(containerIds) {
69
81
  for (const key of [...this.keys()]) {
@@ -1 +1 @@
1
- {"version":3,"file":"writerProjectionCitations.js","sourceRoot":"","sources":["writerProjectionCitations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,SAAS,sBAAsB,CAC7B,KAAyB,EACzB,GAAW,EACX,KAAkB;IAElB,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;;YACrD,wBAAwB,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED,SAAS,wBAAwB,CAC/B,KAAc,EACd,GAAW,EACX,KAAkB;IAElB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE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E,CAAC;IACnB,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC","sourcesContent":["import { BoundedCache } from \"./ApiCache\";\n\nfunction collectCitedArrayItems(\n value: readonly unknown[],\n key: string,\n cited: Set<string>,\n): void {\n const listsIds = /containerids$/iu.test(key);\n for (const item of value) {\n if (listsIds && typeof item === \"string\") cited.add(item);\n else collectCitedContainerIds(item, key, cited);\n }\n}\n\nfunction collectCitedContainerIds(\n value: unknown,\n key: string,\n cited: Set<string>,\n): void {\n if (typeof value === \"string\") {\n if (/containerid$/iu.test(key)) cited.add(value);\n return;\n }\n if (Array.isArray(value)) {\n collectCitedArrayItems(value, key, cited);\n return;\n }\n if (value === null || typeof value !== \"object\") return;\n const entries = Object.entries(value);\n // An access event names its container as `objectId` beside `objectKind`.\n if (Reflect.get(value, \"objectKind\") === \"container\") {\n const objectId = Reflect.get(value, \"objectId\");\n if (typeof objectId === \"string\") cited.add(objectId);\n }\n for (const [childKey, child] of entries) {\n collectCitedContainerIds(child, childKey, cited);\n }\n}\n\n/**\n * Every container a writer projection cites: any `…containerId` field, any\n * `…containerIds` list, and the object id of a container access event,\n * wherever they appear. Reading every such field rather than a fixed set errs\n * toward citing too much, which costs only a refetch.\n */\nexport function writerProjectionCitedContainerIds(\n projection: unknown,\n): ReadonlySet<string> {\n const cited = new Set<string>();\n collectCitedContainerIds(projection, \"\", cited);\n return cited;\n}\n\nfunction citesAny(\n cited: ReadonlySet<string>,\n containerIds: ReadonlySet<string>,\n): boolean {\n for (const id of containerIds) if (cited.has(id)) return true;\n return false;\n}\n\n/**\n * A writer projection cache that records which containers each resolved entry\n * cites, so a manifest change to some containers can evict exactly the\n * entries citing them. An entry that has not resolved to a projection has no\n * record and is always evicted.\n */\nexport class CitingProjectionCache<V> extends BoundedCache<Promise<V | null>> {\n private readonly citations = new WeakMap<\n Promise<V | null>,\n ReadonlySet<string>\n >();\n\n override set(key: string, value: Promise<V | null>): this {\n void value.then(\n (projection) => {\n if (projection !== null) {\n this.citations.set(\n value,\n writerProjectionCitedContainerIds(projection),\n );\n }\n },\n () => undefined,\n );\n return super.set(key, value);\n }\n\n /** Evicts the entries that cite any of the containers or are unresolved. */\n evictCiting(containerIds: ReadonlySet<string>): void {\n for (const key of [...this.keys()]) {\n const entry = this.get(key);\n const cited = entry && this.citations.get(entry);\n if (cited && !citesAny(cited, containerIds)) continue;\n this.delete(key);\n }\n }\n}\n\ninterface CitingProjectionCacheWithFetches<V> {\n readonly cache: CitingProjectionCache<V>;\n /** Shared result fetches still in flight, keyed like the cache. */\n readonly inFlight: Map<string, unknown>;\n}\n\n/**\n * Evicts what a manifest change to these containers makes stale: every\n * container or document writer projection citing one of them or not yet\n * resolved, and every fetch still in flight (it may predate the change), which\n * the raised stamp floor keeps from publishing even when no cache slot tracks\n * it. Attachment envelopes wrap to the same KEK targets, so an attachment list\n * stays only while its document's projection does; a list whose document has\n * no cached projection is evicted too.\n */\nexport function evictWriterProjectionsCiting(\n containerIds: ReadonlySet<string>,\n caches: {\n readonly attachmentLists: BoundedCache<unknown>;\n readonly containers: CitingProjectionCacheWithFetches<unknown>;\n readonly documents: CitingProjectionCacheWithFetches<unknown>;\n },\n): void {\n for (const { cache, inFlight } of [caches.containers, caches.documents]) {\n cache.evictCiting(containerIds);\n cache.invalidateInFlight();\n inFlight.clear();\n }\n for (const key of [...caches.attachmentLists.keys()]) {\n if (!caches.documents.cache.has(key)) caches.attachmentLists.delete(key);\n }\n}\n"]}
1
+ {"version":3,"file":"writerProjectionCitations.js","sourceRoot":"","sources":["writerProjectionCitations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EA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AAC;IAC3E,CAAC;AACH,CAAC","sourcesContent":["import { isRejectedDecodedProjection } from \"@tearleads/validators/response\";\nimport { BoundedCache } from \"./ApiCache\";\n\nfunction collectCitedArrayItems(\n value: readonly unknown[],\n key: string,\n cited: Set<string>,\n): void {\n const listsIds = /containerids$/iu.test(key);\n for (const item of value) {\n if (listsIds && typeof item === \"string\") cited.add(item);\n else collectCitedContainerIds(item, key, cited);\n }\n}\n\nfunction collectCitedContainerIds(\n value: unknown,\n key: string,\n cited: Set<string>,\n): void {\n if (typeof value === \"string\") {\n if (/containerid$/iu.test(key)) cited.add(value);\n return;\n }\n if (Array.isArray(value)) {\n collectCitedArrayItems(value, key, cited);\n return;\n }\n if (value === null || typeof value !== \"object\") return;\n const entries = Object.entries(value);\n // An access event names its container as `objectId` beside `objectKind`.\n if (Reflect.get(value, \"objectKind\") === \"container\") {\n const objectId = Reflect.get(value, \"objectId\");\n if (typeof objectId === \"string\") cited.add(objectId);\n }\n for (const [childKey, child] of entries) {\n collectCitedContainerIds(child, childKey, cited);\n }\n}\n\n/**\n * Every container a writer projection cites: any `…containerId` field, any\n * `…containerIds` list, and the object id of a container access event,\n * wherever they appear. Reading every such field rather than a fixed set errs\n * toward citing too much, which costs only a refetch.\n */\nexport function writerProjectionCitedContainerIds(\n projection: unknown,\n): ReadonlySet<string> {\n const cited = new Set<string>();\n collectCitedContainerIds(projection, \"\", cited);\n return cited;\n}\n\nfunction citesAny(\n cited: ReadonlySet<string>,\n containerIds: ReadonlySet<string>,\n): boolean {\n for (const id of containerIds) if (cited.has(id)) return true;\n return false;\n}\n\n/**\n * A writer projection cache that records which containers each resolved entry\n * cites, so a manifest change to some containers can evict exactly the\n * entries citing them. An entry that has not resolved to a projection has no\n * record and is always evicted.\n */\nexport class CitingProjectionCache<V> extends BoundedCache<Promise<V | null>> {\n private readonly citations = new WeakMap<\n Promise<V | null>,\n ReadonlySet<string>\n >();\n private readonly resolved = new WeakMap<Promise<V | null>, V>();\n\n override set(key: string, value: Promise<V | null>): this {\n void value.then(\n (projection) => {\n if (projection !== null) {\n this.resolved.set(value, projection);\n this.citations.set(\n value,\n writerProjectionCitedContainerIds(projection),\n );\n }\n },\n () => undefined,\n );\n return super.set(key, value);\n }\n\n /** A projection a verifier refused is never served again: it refetches. */\n override get(key: string): Promise<V | null> | undefined {\n const entry = super.get(key);\n if (entry && isRejectedDecodedProjection(this.resolved.get(entry))) {\n this.delete(key);\n return undefined;\n }\n return entry;\n }\n\n /** Evicts the entries that cite any of the containers or are unresolved. */\n evictCiting(containerIds: ReadonlySet<string>): void {\n for (const key of [...this.keys()]) {\n const entry = this.get(key);\n const cited = entry && this.citations.get(entry);\n if (cited && !citesAny(cited, containerIds)) continue;\n this.delete(key);\n }\n }\n}\n\ninterface CitingProjectionCacheWithFetches<V> {\n readonly cache: CitingProjectionCache<V>;\n /** Shared result fetches still in flight, keyed like the cache. */\n readonly inFlight: Map<string, unknown>;\n}\n\n/**\n * Evicts what a manifest change to these containers makes stale: every\n * container or document writer projection citing one of them or not yet\n * resolved, and every fetch still in flight (it may predate the change), which\n * the raised stamp floor keeps from publishing even when no cache slot tracks\n * it. Attachment envelopes wrap to the same KEK targets, so an attachment list\n * stays only while its document's projection does; a list whose document has\n * no cached projection is evicted too.\n */\nexport function evictWriterProjectionsCiting(\n containerIds: ReadonlySet<string>,\n caches: {\n readonly attachmentLists: BoundedCache<unknown>;\n readonly containers: CitingProjectionCacheWithFetches<unknown>;\n readonly documents: CitingProjectionCacheWithFetches<unknown>;\n },\n): void {\n for (const { cache, inFlight } of [caches.containers, caches.documents]) {\n cache.evictCiting(containerIds);\n cache.invalidateInFlight();\n inFlight.clear();\n }\n for (const key of [...caches.attachmentLists.keys()]) {\n if (!caches.documents.cache.has(key)) caches.attachmentLists.delete(key);\n }\n}\n"]}
@@ -22,7 +22,7 @@ export { createIdentitySeedPhrase, createIdentitySeedPhraseFromEntropy, generate
22
22
  export { canonicalIdentityTrustDomain } from "./identityTrustDomain.js";
23
23
  export { createIncrementalSha256, type IncrementalSha256, } from "./incrementalSha256.js";
24
24
  export type { AccessEvent, AccessEventType, AccessManifest, AccessManifestCheckpoint, AccessManifestTransparencyLeaf, AccessObjectKind, AnyVerifiedAccessManifest, AnyVerifiedPrincipalPolicy, AttachmentAccessEventBody, AttachmentBindAccessEventBody, AttachmentDetachAccessEventBody, BlobAccessManifest, BlobContentKeyTarget, ContainerAccessEventBody, ContainerAccessKeyState, ContainerAccessLevel, ContainerAccessManifest, ContainerAccessManifestState, ContainerAccessStructural, ContainerCreateAccessEventBody, ContainerDirectGrant, ContainerGrantAccessEventBody, ContainerGrantPrincipalHead, ContainerGrantSubjectType, ContainerKekKeyring, ContainerKekKeyringEntry, ContainerKekParentBinding, ContainerKekPredecessorBridge, ContainerKekRecipientTarget, ContainerKekTarget, ContainerKeyEpoch, ContainerKeyWrap, ContainerMoveAccessEventBody, ContainerReciteAccessEventBody, ContainerRekeyAccessEventBody, ContainerRevokeAccessEventBody, ContainerUserRecipientKey, ContentObjectKind, ContentRecordEncryptionSuite, ContentRecordNonceDomain, DeriveBlobKekTargetsInput, DeriveContainerKekRecipientTargetsInput, DeriveDocumentKekTargetsInput, DocumentAccessEventBody, DocumentContentKeyTarget, DocumentContentRecordMetadataInput, DocumentLinkAccessEventBody, DocumentLinkSetManifestState, DocumentLinkSetStructural, DocumentPurgeAccessEventBody, DocumentUnlinkAccessEventBody, IdentityStateCheckpoint, IdentityStateHead, IdentityStateTransparencyLeaf, KekRecipientKind, KeyingCanonicalJson, KeyingHashDomain, KeyingLocalCheckpointStore, KeyingVerificationCode, KeyingVerificationResult, ManagedPrincipalKind, PrincipalHistoryIndexNode, PrincipalHistorySigner, PrincipalPolicyAuthorization, PrincipalPolicyBundle, PrincipalPolicyCheckpoint, PrincipalPolicyCurrent, PrincipalPolicyExternalAuthority, PrincipalPolicyExternalAuthorityState, PrincipalPolicyHistoryInput, PrincipalPolicyHistoryPage, PrincipalPolicyHistoryProgressOptions, PrincipalPolicyHistoryReferenceProof, PrincipalPolicyHistoryVerifier, PrincipalPolicyMemberEnvelopes, PrincipalPolicyPayload, PrincipalPolicySignedState, PrincipalPolicySignerPublicKey, PrincipalPolicySnapshot, PrincipalPolicyStateChainEntry, PrincipalPolicyTransitionMismatch, PrincipalPolicyTransitionMismatchCode, PrincipalPolicyTransparencyLeaf, ReferencedPrincipalHead, SignedTransparencyTreeHead, TransparencyConsistencyProof, TransparencyInclusionProof, TransparencyLeaf, TransparencyLeafKind, TransparencyTreeCheckpoint, UnsignedAccessEvent, UnsignedTransparencyTreeHead, UnsignedWriteHeader, VerifiedAccessEvent, VerifiedAccessManifest, VerifiedAccessManifestCheckpointEvidence, VerifiedAccessManifestSnapshot, VerifiedAttachmentBinding, VerifiedAttachmentDetach, VerifiedBlobKekTargets, VerifiedContainerAccessManifest, VerifiedContainerKekState, VerifiedContainerParentEdge, VerifiedDocumentKekTargets, VerifiedDocumentLinkSetManifest, VerifiedDocumentLinkSetSnapshot, VerifiedDocumentLinkSetStateEvidence, VerifiedIdentityState, VerifiedPrincipalPolicy, VerifiedPrincipalPolicyCurrent, VerifiedPrincipalPolicyHistory, VerifiedPrincipalPolicySelection, VerifiedPrincipalPolicySnapshot, VerifiedTransparencyProof, VerifiedTransparencyTreeHead, VerifiedWriteHeader, VerifyAccessEventInput, VerifyAccessManifestInput, VerifyAttachmentBindingEventInput, VerifyAttachmentDetachEventInput, VerifyContainerAccessManifestInput, VerifyContainerKekStateInput, VerifyContainerParentEdgeInput, VerifyDocumentLinkSetManifestInput, VerifyDocumentPurgeEventInput, VerifyIdentityStateCheckpointInput, VerifyPrincipalPolicyBundleInput, VerifyPrincipalPolicySnapshotInput, VerifySignedTransparencyTreeHeadInput, VerifyTransparencyConsistencyProofInput, VerifyTransparencyInclusionProofInput, VerifyTransparencyProofInput, VerifyWriteHeaderInput, WriteHeader, } from "./keying.js";
25
- export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekLevelDigest, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingCanonicalJson, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, largestPowerOfTwoLessThan, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, readKeyingCanonicalJson, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, selectPrincipalPolicyCurrentPredecessorReferences, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
25
+ export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestBundleDigest, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekLevelDigest, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingCanonicalJson, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, largestPowerOfTwoLessThan, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, readKeyingCanonicalJson, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, selectPrincipalPolicyCurrentPredecessorReferences, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
26
26
  export { isValidOrganizationLeaveRequest, organizationLeaveRequestSigningBytes, signOrganizationLeaveRequest, } from "./organizationLeaveRequest.js";
27
27
  export { organizationReplacementAuthorizationPayload, organizationReplacementSigningBytes, signOrganizationReplacementAuthorization, type VerifiedOrganizationReplacementAuthorization, verifyOrganizationReplacementAuthorization, } from "./organizationReplacement.js";
28
28
  export { computePrincipalContainerGrantRoot, normalizePrincipalContainerGrants, } from "./principalContainerGrants.js";
@@ -16,7 +16,7 @@ export { bytesToHex, hexToBytes } from "./hex.js";
16
16
  export { createIdentitySeedPhrase, createIdentitySeedPhraseFromEntropy, generateIdentityKeyPairsFromSeedPhrase, IDENTITY_SEED_PHRASE_DERIVATION_SUITE, IDENTITY_SEED_PHRASE_ENTROPY_BYTES, IDENTITY_SEED_PHRASE_STRENGTH_BITS, IDENTITY_SEED_PHRASE_WORDS, normalizeIdentitySeedPhrase, validateIdentitySeedPhrase, } from "./identitySeedPhrase.js";
17
17
  export { canonicalIdentityTrustDomain } from "./identityTrustDomain.js";
18
18
  export { createIncrementalSha256, } from "./incrementalSha256.js";
19
- export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekLevelDigest, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingCanonicalJson, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, largestPowerOfTwoLessThan, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, readKeyingCanonicalJson, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, selectPrincipalPolicyCurrentPredecessorReferences, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
19
+ export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestBundleDigest, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekLevelDigest, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingCanonicalJson, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, largestPowerOfTwoLessThan, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, readKeyingCanonicalJson, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, selectPrincipalPolicyCurrentPredecessorReferences, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
20
20
  export { isValidOrganizationLeaveRequest, organizationLeaveRequestSigningBytes, signOrganizationLeaveRequest, } from "./organizationLeaveRequest.js";
21
21
  export { organizationReplacementAuthorizationPayload, organizationReplacementSigningBytes, signOrganizationReplacementAuthorization, verifyOrganizationReplacementAuthorization, } from "./organizationReplacement.js";
22
22
  export { computePrincipalContainerGrantRoot, normalizePrincipalContainerGrants, } from "./principalContainerGrants.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,qBAAqB,EACrB,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,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AM,sBAAsB,CAAC","sourcesContent":["export { blobContentMetadataHash } from \"./blobContentMetadata\";\nexport { BlobEnvelopeError } from \"./blobEnvelopeError\";\nexport type {\n BlobEnvelopeHeaderRecord,\n BlobEnvelopeRecord,\n} from \"./blobEnvelopeReader\";\nexport {\n MAX_BLOB_ENVELOPE_HEADER_BYTES,\n parseBlobEnvelopeV2,\n parseBlobEnvelopeV2Header,\n readBlobEnvelopeHeaderByteLength,\n} from \"./blobEnvelopeReader\";\nexport type { BlobEnvelopeV2Header } from \"./blobEnvelopeV2\";\nexport {\n BLOB_CHUNK_SIZE_BYTES,\n BLOB_ENCRYPTED_BYTES_FORMAT,\n BLOB_ENCRYPTED_BYTES_VERSION,\n BLOB_ENVELOPE_MAGIC_BYTES,\n BLOB_ENVELOPE_PREFIX_BYTES,\n blobChunkPlaintextByteLength,\n computeBlobChunkCount,\n computeBlobEncryptedByteLength,\n deriveBlobChunkIv,\n encodeBlobEnvelopeV2Header,\n joinBlobPartBytes,\n MAX_BLOB_CHUNK_COUNT,\n normalizeBlobChunkSize,\n} from \"./blobEnvelopeV2\";\nexport { compareCanonicalStrings } from \"./canonicalOrdering\";\nexport {\n AUTH_CHALLENGE_BYTES,\n AUTH_CHALLENGE_HEX_LENGTH,\n authChallengeSigningBytes,\n CHALLENGE_TTL_SECONDS,\n canonicalAuthOrigin,\n generateChallenge,\n} from \"./challenge\";\nexport type {\n ContentKeyEnvelopeKind,\n ContentKeyWrapBinding,\n} from \"./contentKeyEnvelope\";\nexport {\n ContentKeyEnvelopeError,\n decodeContentKeyEnvelope,\n unwrapContentKey,\n wrapContentKey,\n} from \"./contentKeyEnvelope\";\nexport { decryptAsRecipient } from \"./encapsulation/decryptAsRecipient\";\nexport { encryptForRecipients } from \"./encapsulation/encryptForRecipients\";\nexport type { EncapsulationKeyPair } from \"./encapsulation/generateKeyPair\";\nexport {\n generateKemKeyPair,\n generateKemSeedAndKeyPair,\n ML_KEM1024_CIPHERTEXT_BYTES,\n ML_KEM1024_PUBLIC_KEY_BYTES,\n ML_KEM1024_SECRET_KEY_BYTES,\n ML_KEM1024_SEED_BYTES,\n} from \"./encapsulation/generateKeyPair\";\nexport type { EncryptedEnvelope, RecipientEntry } from \"./encapsulation/types\";\nexport { unwrapDek } from \"./encapsulation/unwrapDek\";\nexport { wrapDekForRecipients } from \"./encapsulation/wrapDek\";\nexport { toFingerprint } from \"./fingerprint\";\nexport {\n decryptGroupMetadata,\n encodeBuiltinGroupMetadata,\n encryptGroupMetadata,\n type GroupMetadata,\n type GroupMetadataKey,\n readGroupMetadata,\n} from \"./groupMetadata\";\nexport { bytesToHex, hexToBytes } from \"./hex\";\nexport {\n createIdentitySeedPhrase,\n createIdentitySeedPhraseFromEntropy,\n generateIdentityKeyPairsFromSeedPhrase,\n IDENTITY_SEED_PHRASE_DERIVATION_SUITE,\n IDENTITY_SEED_PHRASE_ENTROPY_BYTES,\n IDENTITY_SEED_PHRASE_STRENGTH_BITS,\n IDENTITY_SEED_PHRASE_WORDS,\n type IdentitySeedPhraseKeyPairs,\n normalizeIdentitySeedPhrase,\n validateIdentitySeedPhrase,\n} from \"./identitySeedPhrase\";\nexport { canonicalIdentityTrustDomain } from \"./identityTrustDomain\";\nexport {\n createIncrementalSha256,\n type IncrementalSha256,\n} from \"./incrementalSha256\";\nexport type {\n AccessEvent,\n AccessEventType,\n AccessManifest,\n AccessManifestCheckpoint,\n AccessManifestTransparencyLeaf,\n AccessObjectKind,\n AnyVerifiedAccessManifest,\n AnyVerifiedPrincipalPolicy,\n AttachmentAccessEventBody,\n AttachmentBindAccessEventBody,\n AttachmentDetachAccessEventBody,\n BlobAccessManifest,\n BlobContentKeyTarget,\n ContainerAccessEventBody,\n ContainerAccessKeyState,\n ContainerAccessLevel,\n ContainerAccessManifest,\n ContainerAccessManifestState,\n ContainerAccessStructural,\n ContainerCreateAccessEventBody,\n ContainerDirectGrant,\n ContainerGrantAccessEventBody,\n ContainerGrantPrincipalHead,\n ContainerGrantSubjectType,\n ContainerKekKeyring,\n ContainerKekKeyringEntry,\n ContainerKekParentBinding,\n ContainerKekPredecessorBridge,\n ContainerKekRecipientTarget,\n ContainerKekTarget,\n ContainerKeyEpoch,\n ContainerKeyWrap,\n ContainerMoveAccessEventBody,\n ContainerReciteAccessEventBody,\n ContainerRekeyAccessEventBody,\n ContainerRevokeAccessEventBody,\n ContainerUserRecipientKey,\n ContentObjectKind,\n ContentRecordEncryptionSuite,\n ContentRecordNonceDomain,\n DeriveBlobKekTargetsInput,\n DeriveContainerKekRecipientTargetsInput,\n DeriveDocumentKekTargetsInput,\n DocumentAccessEventBody,\n DocumentContentKeyTarget,\n DocumentContentRecordMetadataInput,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentLinkSetStructural,\n DocumentPurgeAccessEventBody,\n DocumentUnlinkAccessEventBody,\n IdentityStateCheckpoint,\n IdentityStateHead,\n IdentityStateTransparencyLeaf,\n KekRecipientKind,\n KeyingCanonicalJson,\n KeyingHashDomain,\n KeyingLocalCheckpointStore,\n KeyingVerificationCode,\n KeyingVerificationResult,\n ManagedPrincipalKind,\n PrincipalHistoryIndexNode,\n PrincipalHistorySigner,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyCurrent,\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryReferenceProof,\n PrincipalPolicyHistoryVerifier,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n PrincipalPolicyTransparencyLeaf,\n ReferencedPrincipalHead,\n SignedTransparencyTreeHead,\n TransparencyConsistencyProof,\n TransparencyInclusionProof,\n TransparencyLeaf,\n TransparencyLeafKind,\n TransparencyTreeCheckpoint,\n UnsignedAccessEvent,\n UnsignedTransparencyTreeHead,\n UnsignedWriteHeader,\n VerifiedAccessEvent,\n VerifiedAccessManifest,\n VerifiedAccessManifestCheckpointEvidence,\n VerifiedAccessManifestSnapshot,\n VerifiedAttachmentBinding,\n VerifiedAttachmentDetach,\n VerifiedBlobKekTargets,\n VerifiedContainerAccessManifest,\n VerifiedContainerKekState,\n VerifiedContainerParentEdge,\n VerifiedDocumentKekTargets,\n VerifiedDocumentLinkSetManifest,\n VerifiedDocumentLinkSetSnapshot,\n VerifiedDocumentLinkSetStateEvidence,\n VerifiedIdentityState,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicyCurrent,\n VerifiedPrincipalPolicyHistory,\n VerifiedPrincipalPolicySelection,\n VerifiedPrincipalPolicySnapshot,\n VerifiedTransparencyProof,\n VerifiedTransparencyTreeHead,\n VerifiedWriteHeader,\n VerifyAccessEventInput,\n VerifyAccessManifestInput,\n VerifyAttachmentBindingEventInput,\n VerifyAttachmentDetachEventInput,\n VerifyContainerAccessManifestInput,\n VerifyContainerKekStateInput,\n VerifyContainerParentEdgeInput,\n VerifyDocumentLinkSetManifestInput,\n VerifyDocumentPurgeEventInput,\n VerifyIdentityStateCheckpointInput,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n VerifySignedTransparencyTreeHeadInput,\n VerifyTransparencyConsistencyProofInput,\n VerifyTransparencyInclusionProofInput,\n VerifyTransparencyProofInput,\n VerifyWriteHeaderInput,\n WriteHeader,\n} from \"./keying\";\nexport {\n ACCESS_MANIFEST_VERIFICATION_REVISION,\n accessManifestCheckpointFromManifest,\n accessManifestTransparencyLeaf,\n assertSealedContainerKekKeyringLength,\n BLOB_CONTENT_KEY_WRAP_SUITE,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n CONTAINER_KEK_KEYRING_SEAL_SUITE,\n CONTAINER_KEK_MATERIAL_ID_PREFIX,\n CONTAINER_KEK_PARENT_WRAP_SUITE,\n CONTAINER_KEK_PREDECESSOR_WRAP_SUITE,\n CONTAINER_KEK_USER_WRAP_SUITE,\n CONTENT_RECORD_ENCRYPTION_SUITE,\n computeAccessEventBodyHash,\n computeAccessEventHash,\n computeAccessManifestHash,\n computeBlobAccessManifestHash,\n computeBlobContentKeyTargetHash,\n computeContainerAccessKeyTargetHash,\n computeContainerAccessStructuralHash,\n computeContainerDirectGrantRoot,\n computeContainerKekKeyringHash,\n computeContainerKekLevelDigest,\n computeContainerKekMaterialId,\n computeContainerKekPredecessorBridgeHash,\n computeContainerKekRecipientTargetHash,\n computeContainerKeyEpochHash,\n computeContentRecordNonceDomainHash,\n computeDocumentContentKeyTargetHash,\n computeDocumentContentRecordCiphertextHash,\n computeDocumentContentRecordMetadataHash,\n computeDocumentContentRecordPlaintextHash,\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n computeKeyingDomainHash,\n computeTransparencyLeafHash,\n computeTransparencyMerkleRoot,\n computeWriteHeaderHash,\n createContainerKekPredecessorBridge,\n createPrincipalHistoryIndexProof,\n createPrincipalPolicyHistoryVerifier,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n DOCUMENT_CONTENT_KEY_WRAP_SUITE,\n deriveBlobKekTargets,\n deriveContainerAccessManifest,\n deriveContainerKekRecipientTargets,\n deriveContainerKekWrappingPublicKey,\n deriveDocumentKekTargets,\n deriveDocumentLinkSetManifest,\n derivePrincipalRecipientKeyEpochId,\n documentContentRecordMetadata,\n expectedSealedContainerKekKeyringBytes,\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n identityStateTransparencyLeaf,\n isContainerKekMaterialId,\n isKeyingCanonicalJson,\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n KeyingVerificationError,\n largestPowerOfTwoLessThan,\n MAX_CONTAINER_KEY_EPOCH,\n MAX_CONTAINER_RECITATION_EPOCH,\n makeVerifiedAccessEvent,\n makeVerifiedBlobKekTargets,\n makeVerifiedContainerAccessManifest,\n makeVerifiedContainerKekState,\n makeVerifiedDocumentKekTargets,\n makeVerifiedDocumentLinkSetManifest,\n makeVerifiedDocumentLinkSetSnapshot,\n makeVerifiedPrincipalPolicy,\n normalizeAttachmentAccessEventBody,\n normalizeContainerAccessEventBody,\n normalizeContainerKekKeyring,\n normalizeContainerKekPredecessorBridge,\n normalizeDocumentAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n openContainerKekKeyring,\n PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT,\n PRINCIPAL_HISTORY_VERIFICATION_REVISION,\n principalHistoryIndexLeaf,\n principalPolicyMatchesReference,\n principalPolicyTransparencyLeaf,\n readKeyingCanonicalJson,\n resolveContainerPathUserAccessLevel,\n resolveContainerStatePathUserAccessLevel,\n resolveHistoricalContainerPathUserAccessLevel,\n resolvePrincipalHistoryIndexProof,\n restorePrincipalPolicyHistoryVerifier,\n sealContainerKekKeyring,\n selectPrincipalPolicyAuthorization,\n selectPrincipalPolicyCurrentPredecessorReferences,\n serializeKeyingCanonicalJson,\n signAccessEvent,\n signTransparencyTreeHead,\n signWriteHeader,\n unwrapContainerKekParentWrap,\n unwrapContainerKekPredecessorBridge,\n verifyAccessManifest,\n verifyAccessManifestLocalCheckpoint,\n verifyAccessManifestSnapshot,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n verifyContainerAccessManifest,\n verifyContainerKekKeyringEntry,\n verifyContainerKekState,\n verifyContainerParentEdge,\n verifyDocumentLinkSetManifest,\n verifyDocumentLinkSetSnapshot,\n verifyDocumentPurgeEvent,\n verifyIdentityStateCheckpoint,\n verifyPrincipalPolicyBundle,\n verifyPrincipalPolicyBundleAgainstHistory,\n verifyPrincipalPolicyCheckpoint,\n verifyPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrentMutation,\n verifyPrincipalPolicyCurrentSuccessor,\n verifyPrincipalPolicyHistoryReferences,\n verifyPrincipalPolicySnapshot,\n verifySignedAccessEvent,\n verifySignedTransparencyTreeHead,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n verifyTransparencyProof,\n verifyWriteHeader,\n} from \"./keying\";\nexport {\n isValidOrganizationLeaveRequest,\n organizationLeaveRequestSigningBytes,\n signOrganizationLeaveRequest,\n} from \"./organizationLeaveRequest\";\nexport {\n organizationReplacementAuthorizationPayload,\n organizationReplacementSigningBytes,\n signOrganizationReplacementAuthorization,\n type VerifiedOrganizationReplacementAuthorization,\n verifyOrganizationReplacementAuthorization,\n} from \"./organizationReplacement\";\nexport {\n computePrincipalContainerGrantRoot,\n normalizePrincipalContainerGrants,\n} from \"./principalContainerGrants\";\nexport {\n computePrincipalMemberEnvelopesRoot,\n normalizePrincipalStateMemberEnvelopes,\n PrincipalMemberEnvelopeValidationError,\n} from \"./principalMemberEnvelopes\";\nexport type { PrincipalPolicyValidationErrorCode } from \"./principalPolicyValidationError\";\nexport {\n PrincipalPolicyValidationError,\n throwPrincipalPolicyValidationError,\n} from \"./principalPolicyValidationError\";\nexport type {\n ManagedRecipientPrincipalType,\n PrincipalContainerGrant,\n PrincipalContainerGrantAccessLevel,\n PrincipalProjectionMember,\n PrincipalProjectionRole,\n PrincipalStateExternalAuthority,\n PrincipalStateHeaderInput,\n PrincipalStateMember,\n PrincipalStateMemberEnvelope,\n PrincipalStateMembershipMode,\n PrincipalStatePayloadCipherSuite,\n PrincipalStateSigningInput,\n SignedPrincipalState,\n UnsignedPrincipalState,\n} from \"./principalState\";\nexport {\n buildPrincipalStateSigningInput,\n computePrincipalMembershipRoot,\n computePrincipalProjectionRoot,\n computePrincipalStateHash,\n computePrincipalStatePayloadCiphertextHash,\n derivePrincipalProjectionMembers,\n isManagedRecipientPrincipalType,\n isPrincipalProjectionRole,\n normalizePrincipalProjectionMembers,\n normalizePrincipalStateMembers,\n serializeUnsignedPrincipalState,\n signPrincipalState,\n} from \"./principalState\";\nexport {\n verifySignedPrincipalState,\n verifySignedPrincipalStateResult,\n} from \"./principalStateVerification\";\nexport type { SigningKeyPair } from \"./signing/generateKeyPair\";\nexport {\n generateSigningKeyPair,\n generateSigningSeedAndKeyPair,\n ML_DSA87_PUBLIC_KEY_BYTES,\n ML_DSA87_SECRET_KEY_BYTES,\n ML_DSA87_SIGNATURE_BYTES,\n} from \"./signing/generateKeyPair\";\nexport { sign } from \"./signing/sign\";\nexport { verify } from \"./signing/verify\";\nexport type { SymmetricCiphertext } from \"./symmetric\";\nexport {\n AES_256_KEY_BYTES,\n AES_GCM_IV_BYTES,\n AES_GCM_TAG_BYTES,\n assertAesGcmIv,\n createAesGcmIv,\n decryptWithDek,\n encryptWithDek,\n} from \"./symmetric\";\nexport { computeUserIdentityBundleFingerprint } from \"./userIdentityBundle\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,qBAAqB,EACrB,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,mB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BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["export { blobContentMetadataHash } from \"./blobContentMetadata\";\nexport { BlobEnvelopeError } from \"./blobEnvelopeError\";\nexport type {\n BlobEnvelopeHeaderRecord,\n BlobEnvelopeRecord,\n} from \"./blobEnvelopeReader\";\nexport {\n MAX_BLOB_ENVELOPE_HEADER_BYTES,\n parseBlobEnvelopeV2,\n parseBlobEnvelopeV2Header,\n readBlobEnvelopeHeaderByteLength,\n} from \"./blobEnvelopeReader\";\nexport type { BlobEnvelopeV2Header } from \"./blobEnvelopeV2\";\nexport {\n BLOB_CHUNK_SIZE_BYTES,\n BLOB_ENCRYPTED_BYTES_FORMAT,\n BLOB_ENCRYPTED_BYTES_VERSION,\n BLOB_ENVELOPE_MAGIC_BYTES,\n BLOB_ENVELOPE_PREFIX_BYTES,\n blobChunkPlaintextByteLength,\n computeBlobChunkCount,\n computeBlobEncryptedByteLength,\n deriveBlobChunkIv,\n encodeBlobEnvelopeV2Header,\n joinBlobPartBytes,\n MAX_BLOB_CHUNK_COUNT,\n normalizeBlobChunkSize,\n} from \"./blobEnvelopeV2\";\nexport { compareCanonicalStrings } from \"./canonicalOrdering\";\nexport {\n AUTH_CHALLENGE_BYTES,\n AUTH_CHALLENGE_HEX_LENGTH,\n authChallengeSigningBytes,\n CHALLENGE_TTL_SECONDS,\n canonicalAuthOrigin,\n generateChallenge,\n} from \"./challenge\";\nexport type {\n ContentKeyEnvelopeKind,\n ContentKeyWrapBinding,\n} from \"./contentKeyEnvelope\";\nexport {\n ContentKeyEnvelopeError,\n decodeContentKeyEnvelope,\n unwrapContentKey,\n wrapContentKey,\n} from \"./contentKeyEnvelope\";\nexport { decryptAsRecipient } from \"./encapsulation/decryptAsRecipient\";\nexport { encryptForRecipients } from \"./encapsulation/encryptForRecipients\";\nexport type { EncapsulationKeyPair } from \"./encapsulation/generateKeyPair\";\nexport {\n generateKemKeyPair,\n generateKemSeedAndKeyPair,\n ML_KEM1024_CIPHERTEXT_BYTES,\n ML_KEM1024_PUBLIC_KEY_BYTES,\n ML_KEM1024_SECRET_KEY_BYTES,\n ML_KEM1024_SEED_BYTES,\n} from \"./encapsulation/generateKeyPair\";\nexport type { EncryptedEnvelope, RecipientEntry } from \"./encapsulation/types\";\nexport { unwrapDek } from \"./encapsulation/unwrapDek\";\nexport { wrapDekForRecipients } from \"./encapsulation/wrapDek\";\nexport { toFingerprint } from \"./fingerprint\";\nexport {\n decryptGroupMetadata,\n encodeBuiltinGroupMetadata,\n encryptGroupMetadata,\n type GroupMetadata,\n type GroupMetadataKey,\n readGroupMetadata,\n} from \"./groupMetadata\";\nexport { bytesToHex, hexToBytes } from \"./hex\";\nexport {\n createIdentitySeedPhrase,\n createIdentitySeedPhraseFromEntropy,\n generateIdentityKeyPairsFromSeedPhrase,\n IDENTITY_SEED_PHRASE_DERIVATION_SUITE,\n IDENTITY_SEED_PHRASE_ENTROPY_BYTES,\n IDENTITY_SEED_PHRASE_STRENGTH_BITS,\n IDENTITY_SEED_PHRASE_WORDS,\n type IdentitySeedPhraseKeyPairs,\n normalizeIdentitySeedPhrase,\n validateIdentitySeedPhrase,\n} from \"./identitySeedPhrase\";\nexport { canonicalIdentityTrustDomain } from \"./identityTrustDomain\";\nexport {\n createIncrementalSha256,\n type IncrementalSha256,\n} from \"./incrementalSha256\";\nexport type {\n AccessEvent,\n AccessEventType,\n AccessManifest,\n AccessManifestCheckpoint,\n AccessManifestTransparencyLeaf,\n AccessObjectKind,\n AnyVerifiedAccessManifest,\n AnyVerifiedPrincipalPolicy,\n AttachmentAccessEventBody,\n AttachmentBindAccessEventBody,\n AttachmentDetachAccessEventBody,\n BlobAccessManifest,\n BlobContentKeyTarget,\n ContainerAccessEventBody,\n ContainerAccessKeyState,\n ContainerAccessLevel,\n ContainerAccessManifest,\n ContainerAccessManifestState,\n ContainerAccessStructural,\n ContainerCreateAccessEventBody,\n ContainerDirectGrant,\n ContainerGrantAccessEventBody,\n ContainerGrantPrincipalHead,\n ContainerGrantSubjectType,\n ContainerKekKeyring,\n ContainerKekKeyringEntry,\n ContainerKekParentBinding,\n ContainerKekPredecessorBridge,\n ContainerKekRecipientTarget,\n ContainerKekTarget,\n ContainerKeyEpoch,\n ContainerKeyWrap,\n ContainerMoveAccessEventBody,\n ContainerReciteAccessEventBody,\n ContainerRekeyAccessEventBody,\n ContainerRevokeAccessEventBody,\n ContainerUserRecipientKey,\n ContentObjectKind,\n ContentRecordEncryptionSuite,\n ContentRecordNonceDomain,\n DeriveBlobKekTargetsInput,\n DeriveContainerKekRecipientTargetsInput,\n DeriveDocumentKekTargetsInput,\n DocumentAccessEventBody,\n DocumentContentKeyTarget,\n DocumentContentRecordMetadataInput,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentLinkSetStructural,\n DocumentPurgeAccessEventBody,\n DocumentUnlinkAccessEventBody,\n IdentityStateCheckpoint,\n IdentityStateHead,\n IdentityStateTransparencyLeaf,\n KekRecipientKind,\n KeyingCanonicalJson,\n KeyingHashDomain,\n KeyingLocalCheckpointStore,\n KeyingVerificationCode,\n KeyingVerificationResult,\n ManagedPrincipalKind,\n PrincipalHistoryIndexNode,\n PrincipalHistorySigner,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyCurrent,\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryReferenceProof,\n PrincipalPolicyHistoryVerifier,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n PrincipalPolicyTransparencyLeaf,\n ReferencedPrincipalHead,\n SignedTransparencyTreeHead,\n TransparencyConsistencyProof,\n TransparencyInclusionProof,\n TransparencyLeaf,\n TransparencyLeafKind,\n TransparencyTreeCheckpoint,\n UnsignedAccessEvent,\n UnsignedTransparencyTreeHead,\n UnsignedWriteHeader,\n VerifiedAccessEvent,\n VerifiedAccessManifest,\n VerifiedAccessManifestCheckpointEvidence,\n VerifiedAccessManifestSnapshot,\n VerifiedAttachmentBinding,\n VerifiedAttachmentDetach,\n VerifiedBlobKekTargets,\n VerifiedContainerAccessManifest,\n VerifiedContainerKekState,\n VerifiedContainerParentEdge,\n VerifiedDocumentKekTargets,\n VerifiedDocumentLinkSetManifest,\n VerifiedDocumentLinkSetSnapshot,\n VerifiedDocumentLinkSetStateEvidence,\n VerifiedIdentityState,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicyCurrent,\n VerifiedPrincipalPolicyHistory,\n VerifiedPrincipalPolicySelection,\n VerifiedPrincipalPolicySnapshot,\n VerifiedTransparencyProof,\n VerifiedTransparencyTreeHead,\n VerifiedWriteHeader,\n VerifyAccessEventInput,\n VerifyAccessManifestInput,\n VerifyAttachmentBindingEventInput,\n VerifyAttachmentDetachEventInput,\n VerifyContainerAccessManifestInput,\n VerifyContainerKekStateInput,\n VerifyContainerParentEdgeInput,\n VerifyDocumentLinkSetManifestInput,\n VerifyDocumentPurgeEventInput,\n VerifyIdentityStateCheckpointInput,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n VerifySignedTransparencyTreeHeadInput,\n VerifyTransparencyConsistencyProofInput,\n VerifyTransparencyInclusionProofInput,\n VerifyTransparencyProofInput,\n VerifyWriteHeaderInput,\n WriteHeader,\n} from \"./keying\";\nexport {\n ACCESS_MANIFEST_VERIFICATION_REVISION,\n accessManifestCheckpointFromManifest,\n accessManifestTransparencyLeaf,\n assertSealedContainerKekKeyringLength,\n BLOB_CONTENT_KEY_WRAP_SUITE,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n CONTAINER_KEK_KEYRING_SEAL_SUITE,\n CONTAINER_KEK_MATERIAL_ID_PREFIX,\n CONTAINER_KEK_PARENT_WRAP_SUITE,\n CONTAINER_KEK_PREDECESSOR_WRAP_SUITE,\n CONTAINER_KEK_USER_WRAP_SUITE,\n CONTENT_RECORD_ENCRYPTION_SUITE,\n computeAccessEventBodyHash,\n computeAccessEventHash,\n computeAccessManifestBundleDigest,\n computeAccessManifestHash,\n computeBlobAccessManifestHash,\n computeBlobContentKeyTargetHash,\n computeContainerAccessKeyTargetHash,\n computeContainerAccessStructuralHash,\n computeContainerDirectGrantRoot,\n computeContainerKekKeyringHash,\n computeContainerKekLevelDigest,\n computeContainerKekMaterialId,\n computeContainerKekPredecessorBridgeHash,\n computeContainerKekRecipientTargetHash,\n computeContainerKeyEpochHash,\n computeContentRecordNonceDomainHash,\n computeDocumentContentKeyTargetHash,\n computeDocumentContentRecordCiphertextHash,\n computeDocumentContentRecordMetadataHash,\n computeDocumentContentRecordPlaintextHash,\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n computeKeyingDomainHash,\n computeTransparencyLeafHash,\n computeTransparencyMerkleRoot,\n computeWriteHeaderHash,\n createContainerKekPredecessorBridge,\n createPrincipalHistoryIndexProof,\n createPrincipalPolicyHistoryVerifier,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n DOCUMENT_CONTENT_KEY_WRAP_SUITE,\n deriveBlobKekTargets,\n deriveContainerAccessManifest,\n deriveContainerKekRecipientTargets,\n deriveContainerKekWrappingPublicKey,\n deriveDocumentKekTargets,\n deriveDocumentLinkSetManifest,\n derivePrincipalRecipientKeyEpochId,\n documentContentRecordMetadata,\n expectedSealedContainerKekKeyringBytes,\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n identityStateTransparencyLeaf,\n isContainerKekMaterialId,\n isKeyingCanonicalJson,\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n KeyingVerificationError,\n largestPowerOfTwoLessThan,\n MAX_CONTAINER_KEY_EPOCH,\n MAX_CONTAINER_RECITATION_EPOCH,\n makeVerifiedAccessEvent,\n makeVerifiedBlobKekTargets,\n makeVerifiedContainerAccessManifest,\n makeVerifiedContainerKekState,\n makeVerifiedDocumentKekTargets,\n makeVerifiedDocumentLinkSetManifest,\n makeVerifiedDocumentLinkSetSnapshot,\n makeVerifiedPrincipalPolicy,\n normalizeAttachmentAccessEventBody,\n normalizeContainerAccessEventBody,\n normalizeContainerKekKeyring,\n normalizeContainerKekPredecessorBridge,\n normalizeDocumentAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n openContainerKekKeyring,\n PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT,\n PRINCIPAL_HISTORY_VERIFICATION_REVISION,\n principalHistoryIndexLeaf,\n principalPolicyMatchesReference,\n principalPolicyTransparencyLeaf,\n readKeyingCanonicalJson,\n resolveContainerPathUserAccessLevel,\n resolveContainerStatePathUserAccessLevel,\n resolveHistoricalContainerPathUserAccessLevel,\n resolvePrincipalHistoryIndexProof,\n restorePrincipalPolicyHistoryVerifier,\n sealContainerKekKeyring,\n selectPrincipalPolicyAuthorization,\n selectPrincipalPolicyCurrentPredecessorReferences,\n serializeKeyingCanonicalJson,\n signAccessEvent,\n signTransparencyTreeHead,\n signWriteHeader,\n unwrapContainerKekParentWrap,\n unwrapContainerKekPredecessorBridge,\n verifyAccessManifest,\n verifyAccessManifestLocalCheckpoint,\n verifyAccessManifestSnapshot,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n verifyContainerAccessManifest,\n verifyContainerKekKeyringEntry,\n verifyContainerKekState,\n verifyContainerParentEdge,\n verifyDocumentLinkSetManifest,\n verifyDocumentLinkSetSnapshot,\n verifyDocumentPurgeEvent,\n verifyIdentityStateCheckpoint,\n verifyPrincipalPolicyBundle,\n verifyPrincipalPolicyBundleAgainstHistory,\n verifyPrincipalPolicyCheckpoint,\n verifyPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrentMutation,\n verifyPrincipalPolicyCurrentSuccessor,\n verifyPrincipalPolicyHistoryReferences,\n verifyPrincipalPolicySnapshot,\n verifySignedAccessEvent,\n verifySignedTransparencyTreeHead,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n verifyTransparencyProof,\n verifyWriteHeader,\n} from \"./keying\";\nexport {\n isValidOrganizationLeaveRequest,\n organizationLeaveRequestSigningBytes,\n signOrganizationLeaveRequest,\n} from \"./organizationLeaveRequest\";\nexport {\n organizationReplacementAuthorizationPayload,\n organizationReplacementSigningBytes,\n signOrganizationReplacementAuthorization,\n type VerifiedOrganizationReplacementAuthorization,\n verifyOrganizationReplacementAuthorization,\n} from \"./organizationReplacement\";\nexport {\n computePrincipalContainerGrantRoot,\n normalizePrincipalContainerGrants,\n} from \"./principalContainerGrants\";\nexport {\n computePrincipalMemberEnvelopesRoot,\n normalizePrincipalStateMemberEnvelopes,\n PrincipalMemberEnvelopeValidationError,\n} from \"./principalMemberEnvelopes\";\nexport type { PrincipalPolicyValidationErrorCode } from \"./principalPolicyValidationError\";\nexport {\n PrincipalPolicyValidationError,\n throwPrincipalPolicyValidationError,\n} from \"./principalPolicyValidationError\";\nexport type {\n ManagedRecipientPrincipalType,\n PrincipalContainerGrant,\n PrincipalContainerGrantAccessLevel,\n PrincipalProjectionMember,\n PrincipalProjectionRole,\n PrincipalStateExternalAuthority,\n PrincipalStateHeaderInput,\n PrincipalStateMember,\n PrincipalStateMemberEnvelope,\n PrincipalStateMembershipMode,\n PrincipalStatePayloadCipherSuite,\n PrincipalStateSigningInput,\n SignedPrincipalState,\n UnsignedPrincipalState,\n} from \"./principalState\";\nexport {\n buildPrincipalStateSigningInput,\n computePrincipalMembershipRoot,\n computePrincipalProjectionRoot,\n computePrincipalStateHash,\n computePrincipalStatePayloadCiphertextHash,\n derivePrincipalProjectionMembers,\n isManagedRecipientPrincipalType,\n isPrincipalProjectionRole,\n normalizePrincipalProjectionMembers,\n normalizePrincipalStateMembers,\n serializeUnsignedPrincipalState,\n signPrincipalState,\n} from \"./principalState\";\nexport {\n verifySignedPrincipalState,\n verifySignedPrincipalStateResult,\n} from \"./principalStateVerification\";\nexport type { SigningKeyPair } from \"./signing/generateKeyPair\";\nexport {\n generateSigningKeyPair,\n generateSigningSeedAndKeyPair,\n ML_DSA87_PUBLIC_KEY_BYTES,\n ML_DSA87_SECRET_KEY_BYTES,\n ML_DSA87_SIGNATURE_BYTES,\n} from \"./signing/generateKeyPair\";\nexport { sign } from \"./signing/sign\";\nexport { verify } from \"./signing/verify\";\nexport type { SymmetricCiphertext } from \"./symmetric\";\nexport {\n AES_256_KEY_BYTES,\n AES_GCM_IV_BYTES,\n AES_GCM_TAG_BYTES,\n assertAesGcmIv,\n createAesGcmIv,\n decryptWithDek,\n encryptWithDek,\n} from \"./symmetric\";\nexport { computeUserIdentityBundleFingerprint } from \"./userIdentityBundle\";\n"]}
@@ -10,3 +10,16 @@ export declare function readKeyingCanonicalJson(value: unknown, label: string):
10
10
  * JSON, so it is never cited and always travels.
11
11
  */
12
12
  export declare function computeContainerKekLevelDigest(level: unknown): Promise<string | null>;
13
+ /**
14
+ * Domain-separated SHA-256 hex of an access-manifest bundle exactly as a
15
+ * writer projection serves it (`event`, `manifest`, `manifestHash` and the
16
+ * served `state`). A mutation acknowledgement names it, so the author stores
17
+ * exactly the bytes a later projection would serve, and only when its own
18
+ * plan produces the same digest. Null when the bundle is not canonical JSON.
19
+ */
20
+ export declare function computeAccessManifestBundleDigest(bundle: {
21
+ readonly event: unknown;
22
+ readonly manifest: unknown;
23
+ readonly manifestHash: string;
24
+ readonly state: unknown;
25
+ }): Promise<string | null>;
@@ -76,4 +76,27 @@ export async function computeContainerKekLevelDigest(level) {
76
76
  return null;
77
77
  }
78
78
  }
79
+ /**
80
+ * Domain-separated SHA-256 hex of an access-manifest bundle exactly as a
81
+ * writer projection serves it (`event`, `manifest`, `manifestHash` and the
82
+ * served `state`). A mutation acknowledgement names it, so the author stores
83
+ * exactly the bytes a later projection would serve, and only when its own
84
+ * plan produces the same digest. Null when the bundle is not canonical JSON.
85
+ */
86
+ export async function computeAccessManifestBundleDigest(bundle) {
87
+ const served = {
88
+ event: bundle.event,
89
+ manifest: bundle.manifest,
90
+ manifestHash: bundle.manifestHash,
91
+ state: bundle.state,
92
+ };
93
+ if (!isKeyingCanonicalJson(served))
94
+ return null;
95
+ try {
96
+ return await computeKeyingDomainHash("tearleads.keying.access-manifest-bundle-citation", served);
97
+ }
98
+ catch {
99
+ return null;
100
+ }
101
+ }
79
102
  //# sourceMappingURL=canonicalJsonGuard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"canonicalJsonGuard.js","sourceRoot":"","sources":["canonicalJsonGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAetD,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,CACL,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS;QAC1B,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CACtD,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB,CAChC,KAAc,EACd,MAAuB,EACvB,OAA6B;IAE7B,IAAI,KAAK,CAAC,OAAO,CAAC,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,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM;QACR,CAAC;QAED,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAChB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC3B,SAAS;QACX,CAAC;QAED,IAAI,qBAAqB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YACvC,SAAS;QACX,CAAC;QAED,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;YAC7D,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,KAAc,EACd,KAAa;IAEb,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,yBAAyB,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,KAAc;IAEd,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,CAAC;QACH,OAAO,MAAM,uBAAuB,CAClC,+CAA+C,EAC/C,KAAK,CACN,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import { isPlainObject } from \"@tearleads/validators/isPlainObject\";\nimport { computeKeyingDomainHash } from \"./canonical\";\nimport type { KeyingCanonicalJson } from \"./canonicalJsonTypes\";\n\n/*\n * Shape guard shared by the API and the client SDK for untrusted values that\n * become KeyingCanonicalJson: finite scalars, dense arrays, and plain objects,\n * with no reference cycles. It checks shape only; serializeKeyingCanonicalJson\n * still rejects negative zero, ill-formed Unicode, and undefined properties.\n */\n\ninterface CanonicalJsonFrame {\n readonly leave?: object;\n readonly value?: unknown;\n}\n\nfunction isCanonicalJsonScalar(value: unknown): boolean {\n return (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"boolean\" ||\n (typeof value === \"number\" && Number.isFinite(value))\n );\n}\n\nfunction pushCanonicalJsonChildren(\n value: unknown,\n active: WeakSet<object>,\n pending: CanonicalJsonFrame[],\n): boolean {\n if (Array.isArray(value)) {\n if (active.has(value)) {\n return false;\n }\n active.add(value);\n pending.push({ leave: value });\n for (let index = 0; index < value.length; index += 1) {\n if (!(index in value)) {\n return false;\n }\n pending.push({ value: value[index] });\n }\n return true;\n }\n\n if (!isPlainObject(value) || active.has(value)) {\n return false;\n }\n active.add(value);\n pending.push({ leave: value });\n for (const key of Object.keys(value)) {\n pending.push({ value: Reflect.get(value, key) });\n }\n return true;\n}\n\nexport function isKeyingCanonicalJson(\n value: unknown,\n): value is KeyingCanonicalJson {\n const pending: CanonicalJsonFrame[] = [{ value }];\n const active = new WeakSet<object>();\n\n while (pending.length > 0) {\n const frame = pending.pop();\n if (!frame) {\n break;\n }\n\n if (frame.leave) {\n active.delete(frame.leave);\n continue;\n }\n\n if (isCanonicalJsonScalar(frame.value)) {\n continue;\n }\n\n if (!pushCanonicalJsonChildren(frame.value, active, pending)) {\n return false;\n }\n }\n\n return true;\n}\n\nexport function readKeyingCanonicalJson(\n value: unknown,\n label: string,\n): KeyingCanonicalJson {\n if (!isKeyingCanonicalJson(value)) {\n throw new Error(`${label} must be canonical JSON`);\n }\n\n return value;\n}\n\n/**\n * Domain-separated SHA-256 hex of a container KEK level's canonical wire JSON\n * (`tearleads.keying.container-kek-level-citation`), its manifest history\n * cited by hash: the digest a projection request cites the level by (`k:`\n * hint). The domain keeps it apart from every other keying hash that shares\n * the client's citation cache key space. Null when the level is not canonical\n * JSON, so it is never cited and always travels.\n */\nexport async function computeContainerKekLevelDigest(\n level: unknown,\n): Promise<string | null> {\n if (!isKeyingCanonicalJson(level)) return null;\n try {\n return await computeKeyingDomainHash(\n \"tearleads.keying.container-kek-level-citation\",\n level,\n );\n } catch {\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"canonicalJsonGuard.js","sourceRoot":"","sources":["canonicalJsonGuard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAetD,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,CACL,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS;QAC1B,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CACtD,CAAC;AACJ,CAAC;AAED,SAAS,yBAAyB,CAChC,KAAc,EACd,MAAuB,EACvB,OAA6B;IAE7B,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC/B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;YACrD,IAAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE,CAAC;gBACtB,OAAO,KAAK,CAAC;YACf,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACxC,CAAC;QAC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U,uBAAuB,CACrC,KAAc,EACd,KAAa;IAEb,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,yBAAyB,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAClD,KAAc;IAEd,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,CAAC;QACH,OAAO,MAAM,uBAAuB,CAClC,+CAA+C,EAC/C,KAAK,CACN,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,iCAAiC,CAAC,MAKvD;IACC,MAAM,MAAM,GAAG;QACb,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;IACF,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAChD,IAAI,CAAC;QACH,OAAO,MAAM,uBAAuB,CAClC,kDAAkD,EAClD,MAAM,CACP,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import { isPlainObject } from \"@tearleads/validators/isPlainObject\";\nimport { computeKeyingDomainHash } from \"./canonical\";\nimport type { KeyingCanonicalJson } from \"./canonicalJsonTypes\";\n\n/*\n * Shape guard shared by the API and the client SDK for untrusted values that\n * become KeyingCanonicalJson: finite scalars, dense arrays, and plain objects,\n * with no reference cycles. It checks shape only; serializeKeyingCanonicalJson\n * still rejects negative zero, ill-formed Unicode, and undefined properties.\n */\n\ninterface CanonicalJsonFrame {\n readonly leave?: object;\n readonly value?: unknown;\n}\n\nfunction isCanonicalJsonScalar(value: unknown): boolean {\n return (\n value === null ||\n typeof value === \"string\" ||\n typeof value === \"boolean\" ||\n (typeof value === \"number\" && Number.isFinite(value))\n );\n}\n\nfunction pushCanonicalJsonChildren(\n value: unknown,\n active: WeakSet<object>,\n pending: CanonicalJsonFrame[],\n): boolean {\n if (Array.isArray(value)) {\n if (active.has(value)) {\n return false;\n }\n active.add(value);\n pending.push({ leave: value });\n for (let index = 0; index < value.length; index += 1) {\n if (!(index in value)) {\n return false;\n }\n pending.push({ value: value[index] });\n }\n return true;\n }\n\n if (!isPlainObject(value) || active.has(value)) {\n return false;\n }\n active.add(value);\n pending.push({ leave: value });\n for (const key of Object.keys(value)) {\n pending.push({ value: Reflect.get(value, key) });\n }\n return true;\n}\n\nexport function isKeyingCanonicalJson(\n value: unknown,\n): value is KeyingCanonicalJson {\n const pending: CanonicalJsonFrame[] = [{ value }];\n const active = new WeakSet<object>();\n\n while (pending.length > 0) {\n const frame = pending.pop();\n if (!frame) {\n break;\n }\n\n if (frame.leave) {\n active.delete(frame.leave);\n continue;\n }\n\n if (isCanonicalJsonScalar(frame.value)) {\n continue;\n }\n\n if (!pushCanonicalJsonChildren(frame.value, active, pending)) {\n return false;\n }\n }\n\n return true;\n}\n\nexport function readKeyingCanonicalJson(\n value: unknown,\n label: string,\n): KeyingCanonicalJson {\n if (!isKeyingCanonicalJson(value)) {\n throw new Error(`${label} must be canonical JSON`);\n }\n\n return value;\n}\n\n/**\n * Domain-separated SHA-256 hex of a container KEK level's canonical wire JSON\n * (`tearleads.keying.container-kek-level-citation`), its manifest history\n * cited by hash: the digest a projection request cites the level by (`k:`\n * hint). The domain keeps it apart from every other keying hash that shares\n * the client's citation cache key space. Null when the level is not canonical\n * JSON, so it is never cited and always travels.\n */\nexport async function computeContainerKekLevelDigest(\n level: unknown,\n): Promise<string | null> {\n if (!isKeyingCanonicalJson(level)) return null;\n try {\n return await computeKeyingDomainHash(\n \"tearleads.keying.container-kek-level-citation\",\n level,\n );\n } catch {\n return null;\n }\n}\n\n/**\n * Domain-separated SHA-256 hex of an access-manifest bundle exactly as a\n * writer projection serves it (`event`, `manifest`, `manifestHash` and the\n * served `state`). A mutation acknowledgement names it, so the author stores\n * exactly the bytes a later projection would serve, and only when its own\n * plan produces the same digest. Null when the bundle is not canonical JSON.\n */\nexport async function computeAccessManifestBundleDigest(bundle: {\n readonly event: unknown;\n readonly manifest: unknown;\n readonly manifestHash: string;\n readonly state: unknown;\n}): Promise<string | null> {\n const served = {\n event: bundle.event,\n manifest: bundle.manifest,\n manifestHash: bundle.manifestHash,\n state: bundle.state,\n };\n if (!isKeyingCanonicalJson(served)) return null;\n try {\n return await computeKeyingDomainHash(\n \"tearleads.keying.access-manifest-bundle-citation\",\n served,\n );\n } catch {\n return null;\n }\n}\n"]}
@@ -8,7 +8,7 @@ export * from "./accessManifestVerificationTypes.js";
8
8
  export { normalizeAttachmentAccessEventBody, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, } from "./attachmentAccessEvent.js";
9
9
  export * from "./attachmentAccessTypes.js";
10
10
  export * from "./canonical.js";
11
- export { computeContainerKekLevelDigest, isKeyingCanonicalJson, readKeyingCanonicalJson, } from "./canonicalJsonGuard.js";
11
+ export { computeAccessManifestBundleDigest, computeContainerKekLevelDigest, isKeyingCanonicalJson, readKeyingCanonicalJson, } from "./canonicalJsonGuard.js";
12
12
  export * from "./canonicalJsonTypes.js";
13
13
  export * from "./checkpoints.js";
14
14
  export * from "./checkpointTypes.js";
@@ -13,7 +13,7 @@ export * from "./accessManifestVerificationTypes.js";
13
13
  export { normalizeAttachmentAccessEventBody, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, } from "./attachmentAccessEvent.js";
14
14
  export * from "./attachmentAccessTypes.js";
15
15
  export * from "./canonical.js";
16
- export { computeContainerKekLevelDigest, isKeyingCanonicalJson, readKeyingCanonicalJson, } from "./canonicalJsonGuard.js";
16
+ export { computeAccessManifestBundleDigest, computeContainerKekLevelDigest, isKeyingCanonicalJson, readKeyingCanonicalJson, } from "./canonicalJsonGuard.js";
17
17
  export * from "./canonicalJsonTypes.js";
18
18
  export * from "./checkpoints.js";
19
19
  export * from "./checkpointTypes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,2EAA2E;AAC3E,0EAA0E;AAC1E,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,kCAAkC,EAClC,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,GACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,mCAAmC,EACnC,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,sCAAsC,EACtC,kCAAkC,E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,0BAA0B,CAAC;AAElC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAS5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EACL,kCAAkC,GAEnC,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,oCAAoC,EACpC,0CAA0C,GAC3C,MAAM,6BAA6B,CAAC;AAmBrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EAEzB,uBAAuB,GAExB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC","sourcesContent":["// Write-time sanity cap on lifetime rotations. Sized to be unreachable by\n// legitimate use; it exists to stop runaway rotation loops and to give the\n// keyring length equation a hard ceiling, not to budget rotations. Defined\n// with the wire arithmetic in @tearleads/validators so every layer shares\n// one equation.\nexport { MAX_CONTAINER_KEY_EPOCH } from \"@tearleads/validators/util\";\nexport * from \"./accessEvent\";\nexport * from \"./accessEventTypes\";\nexport * from \"./accessManifestSnapshot\";\nexport * from \"./accessManifestTypes\";\nexport { ACCESS_MANIFEST_VERIFICATION_REVISION } from \"./accessManifestVerificationRevision\";\nexport * from \"./accessManifestVerificationTypes\";\nexport {\n normalizeAttachmentAccessEventBody,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n} from \"./attachmentAccessEvent\";\nexport * from \"./attachmentAccessTypes\";\nexport * from \"./canonical\";\nexport {\n computeContainerKekLevelDigest,\n isKeyingCanonicalJson,\n readKeyingCanonicalJson,\n} from \"./canonicalJsonGuard\";\nexport * from \"./canonicalJsonTypes\";\nexport * from \"./checkpoints\";\nexport * from \"./checkpointTypes\";\nexport * from \"./containerAccess\";\nexport { MAX_CONTAINER_RECITATION_EPOCH } from \"./containerAccessReciteBody\";\nexport * from \"./containerAccessTypes\";\nexport * from \"./containerKek\";\nexport { computeBlobAccessManifestHash } from \"./containerKek/blobAccessManifest\";\nexport {\n computeBlobContentKeyTargetHash,\n deriveBlobKekTargets,\n} from \"./containerKek/blobKeyTargets\";\nexport {\n computeDocumentContentKeyTargetHash,\n deriveDocumentKekTargets,\n} from \"./containerKek/documentKeyTargets\";\nexport {\n computeContainerKekRecipientTargetHash,\n deriveContainerKekRecipientTargets,\n derivePrincipalRecipientKeyEpochId,\n} from \"./containerKek/recipientTargets\";\nexport {\n assertSealedContainerKekKeyringLength,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n computeContainerKekKeyringHash,\n expectedSealedContainerKekKeyringBytes,\n normalizeContainerKekKeyring,\n openContainerKekKeyring,\n sealContainerKekKeyring,\n verifyContainerKekKeyringEntry,\n} from \"./containerKekKeyring\";\nexport {\n computeContainerKekMaterialId,\n isContainerKekMaterialId,\n} from \"./containerKekMaterial\";\nexport {\n computeContainerKekPredecessorBridgeHash,\n createContainerKekPredecessorBridge,\n normalizeContainerKekPredecessorBridge,\n unwrapContainerKekPredecessorBridge,\n} from \"./containerKekPredecessor\";\nexport * from \"./containerKekTypes\";\nexport {\n deriveContainerKekWrappingPublicKey,\n unwrapContainerKekParentWrap,\n} from \"./containerKekWrapping\";\nexport { verifyContainerParentEdge } from \"./containerParentEdge\";\nexport { resolveContainerStatePathUserAccessLevel } from \"./containerPathAccess\";\nexport * from \"./contentKeyTargetTypes\";\nexport * from \"./documentAccess\";\nexport { normalizeDocumentAccessEventBody } from \"./documentAccessBody\";\nexport * from \"./documentAccessTypes\";\nexport {\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n deriveDocumentLinkSetManifest,\n} from \"./documentLinkSetManifest\";\nexport {\n type DocumentPurgeAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n type VerifyDocumentPurgeEventInput,\n verifyDocumentPurgeEvent,\n} from \"./documentPurge\";\nexport type { KeyingHashDomain } from \"./keyingHashDomains\";\nexport * from \"./principalPolicy\";\nexport { verifyPrincipalPolicyBundleAgainstHistory } from \"./principalPolicyBundleHistory\";\nexport {\n type PrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrent,\n} from \"./principalPolicyCurrent\";\nexport { verifyPrincipalPolicyCurrentMutation } from \"./principalPolicyCurrentMutation\";\nexport { selectPrincipalPolicyCurrentPredecessorReferences } from \"./principalPolicyCurrentPredecessorReferences\";\nexport { verifyPrincipalPolicyCurrentSuccessor } from \"./principalPolicyCurrentSuccessor\";\nexport type {\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n} from \"./principalPolicyExternalAuthorityTypes\";\nexport {\n createPrincipalPolicyHistoryVerifier,\n restorePrincipalPolicyHistoryVerifier,\n} from \"./principalPolicyHistory\";\nexport type { PrincipalHistoryIndexNode } from \"./principalPolicyHistoryIndex\";\nexport {\n createPrincipalHistoryIndexProof,\n principalHistoryIndexLeaf,\n resolvePrincipalHistoryIndexProof,\n} from \"./principalPolicyHistoryIndex\";\nexport { PRINCIPAL_HISTORY_VERIFICATION_REVISION } from \"./principalPolicyHistoryPage\";\nexport type { PrincipalPolicyHistoryReferenceProof } from \"./principalPolicyHistoryReferences\";\nexport { verifyPrincipalPolicyHistoryReferences } from \"./principalPolicyHistoryReferences\";\nexport type { PrincipalHistorySigner } from \"./principalPolicyHistorySigners\";\nexport type {\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryVerifier,\n VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nexport { PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT } from \"./principalPolicyHistoryTypes\";\nexport {\n selectPrincipalPolicyAuthorization,\n type VerifiedPrincipalPolicySelection,\n} from \"./principalPolicySelection\";\nexport type {\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n} from \"./principalPolicyTransition\";\nexport {\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n} from \"./principalPolicyTransition\";\nexport type {\n AnyVerifiedPrincipalPolicy,\n ManagedPrincipalKind,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n ReferencedPrincipalHead,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicySnapshot,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n} from \"./principalPolicyTypes\";\nexport { makeVerifiedPrincipalPolicy } from \"./principalPolicyTypes\";\nexport * from \"./transparency\";\nexport {\n accessManifestTransparencyLeaf,\n computeTransparencyLeafHash,\n identityStateTransparencyLeaf,\n principalPolicyTransparencyLeaf,\n} from \"./transparencyLeaf\";\nexport {\n type VerifyTransparencyConsistencyProofInput,\n type VerifyTransparencyInclusionProofInput,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n} from \"./transparencyProofs\";\nexport {\n computeTransparencyMerkleRoot,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n largestPowerOfTwoLessThan,\n} from \"./transparencyTree\";\nexport * from \"./transparencyTypes\";\nexport {\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n type KeyingVerificationCode,\n KeyingVerificationError,\n type KeyingVerificationResult,\n} from \"./verificationError\";\nexport * from \"./writeHeader\";\nexport * from \"./writeHeaderTypes\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,2EAA2E;AAC3E,2EAA2E;AAC3E,0EAA0E;AAC1E,gBAAgB;AAChB,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,cAAc,mCAAmC,CAAC;AAClD,OAAO,EACL,kCAAkC,EAClC,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,yBAAyB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,OAAO,EACL,iCAAiC,EACjC,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,GACrB,MA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,MAAM,+CAA+C,CAAC;AAClH,OAAO,EAAE,qCAAqC,EAAE,MAAM,mCAAmC,CAAC;AAK1F,OAAO,EACL,oCAAoC,EACpC,qCAAqC,GACtC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAS5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EACL,kCAAkC,GAEnC,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,oCAAoC,EACpC,0CAA0C,GAC3C,MAAM,6BAA6B,CAAC;AAmBrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EAEzB,uBAAuB,GAExB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC","sourcesContent":["// Write-time sanity cap on lifetime rotations. Sized to be unreachable by\n// legitimate use; it exists to stop runaway rotation loops and to give the\n// keyring length equation a hard ceiling, not to budget rotations. Defined\n// with the wire arithmetic in @tearleads/validators so every layer shares\n// one equation.\nexport { MAX_CONTAINER_KEY_EPOCH } from \"@tearleads/validators/util\";\nexport * from \"./accessEvent\";\nexport * from \"./accessEventTypes\";\nexport * from \"./accessManifestSnapshot\";\nexport * from \"./accessManifestTypes\";\nexport { ACCESS_MANIFEST_VERIFICATION_REVISION } from \"./accessManifestVerificationRevision\";\nexport * from \"./accessManifestVerificationTypes\";\nexport {\n normalizeAttachmentAccessEventBody,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n} from \"./attachmentAccessEvent\";\nexport * from \"./attachmentAccessTypes\";\nexport * from \"./canonical\";\nexport {\n computeAccessManifestBundleDigest,\n computeContainerKekLevelDigest,\n isKeyingCanonicalJson,\n readKeyingCanonicalJson,\n} from \"./canonicalJsonGuard\";\nexport * from \"./canonicalJsonTypes\";\nexport * from \"./checkpoints\";\nexport * from \"./checkpointTypes\";\nexport * from \"./containerAccess\";\nexport { MAX_CONTAINER_RECITATION_EPOCH } from \"./containerAccessReciteBody\";\nexport * from \"./containerAccessTypes\";\nexport * from \"./containerKek\";\nexport { computeBlobAccessManifestHash } from \"./containerKek/blobAccessManifest\";\nexport {\n computeBlobContentKeyTargetHash,\n deriveBlobKekTargets,\n} from \"./containerKek/blobKeyTargets\";\nexport {\n computeDocumentContentKeyTargetHash,\n deriveDocumentKekTargets,\n} from \"./containerKek/documentKeyTargets\";\nexport {\n computeContainerKekRecipientTargetHash,\n deriveContainerKekRecipientTargets,\n derivePrincipalRecipientKeyEpochId,\n} from \"./containerKek/recipientTargets\";\nexport {\n assertSealedContainerKekKeyringLength,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n computeContainerKekKeyringHash,\n expectedSealedContainerKekKeyringBytes,\n normalizeContainerKekKeyring,\n openContainerKekKeyring,\n sealContainerKekKeyring,\n verifyContainerKekKeyringEntry,\n} from \"./containerKekKeyring\";\nexport {\n computeContainerKekMaterialId,\n isContainerKekMaterialId,\n} from \"./containerKekMaterial\";\nexport {\n computeContainerKekPredecessorBridgeHash,\n createContainerKekPredecessorBridge,\n normalizeContainerKekPredecessorBridge,\n unwrapContainerKekPredecessorBridge,\n} from \"./containerKekPredecessor\";\nexport * from \"./containerKekTypes\";\nexport {\n deriveContainerKekWrappingPublicKey,\n unwrapContainerKekParentWrap,\n} from \"./containerKekWrapping\";\nexport { verifyContainerParentEdge } from \"./containerParentEdge\";\nexport { resolveContainerStatePathUserAccessLevel } from \"./containerPathAccess\";\nexport * from \"./contentKeyTargetTypes\";\nexport * from \"./documentAccess\";\nexport { normalizeDocumentAccessEventBody } from \"./documentAccessBody\";\nexport * from \"./documentAccessTypes\";\nexport {\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n deriveDocumentLinkSetManifest,\n} from \"./documentLinkSetManifest\";\nexport {\n type DocumentPurgeAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n type VerifyDocumentPurgeEventInput,\n verifyDocumentPurgeEvent,\n} from \"./documentPurge\";\nexport type { KeyingHashDomain } from \"./keyingHashDomains\";\nexport * from \"./principalPolicy\";\nexport { verifyPrincipalPolicyBundleAgainstHistory } from \"./principalPolicyBundleHistory\";\nexport {\n type PrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrent,\n} from \"./principalPolicyCurrent\";\nexport { verifyPrincipalPolicyCurrentMutation } from \"./principalPolicyCurrentMutation\";\nexport { selectPrincipalPolicyCurrentPredecessorReferences } from \"./principalPolicyCurrentPredecessorReferences\";\nexport { verifyPrincipalPolicyCurrentSuccessor } from \"./principalPolicyCurrentSuccessor\";\nexport type {\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n} from \"./principalPolicyExternalAuthorityTypes\";\nexport {\n createPrincipalPolicyHistoryVerifier,\n restorePrincipalPolicyHistoryVerifier,\n} from \"./principalPolicyHistory\";\nexport type { PrincipalHistoryIndexNode } from \"./principalPolicyHistoryIndex\";\nexport {\n createPrincipalHistoryIndexProof,\n principalHistoryIndexLeaf,\n resolvePrincipalHistoryIndexProof,\n} from \"./principalPolicyHistoryIndex\";\nexport { PRINCIPAL_HISTORY_VERIFICATION_REVISION } from \"./principalPolicyHistoryPage\";\nexport type { PrincipalPolicyHistoryReferenceProof } from \"./principalPolicyHistoryReferences\";\nexport { verifyPrincipalPolicyHistoryReferences } from \"./principalPolicyHistoryReferences\";\nexport type { PrincipalHistorySigner } from \"./principalPolicyHistorySigners\";\nexport type {\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryVerifier,\n VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nexport { PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT } from \"./principalPolicyHistoryTypes\";\nexport {\n selectPrincipalPolicyAuthorization,\n type VerifiedPrincipalPolicySelection,\n} from \"./principalPolicySelection\";\nexport type {\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n} from \"./principalPolicyTransition\";\nexport {\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n} from \"./principalPolicyTransition\";\nexport type {\n AnyVerifiedPrincipalPolicy,\n ManagedPrincipalKind,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n ReferencedPrincipalHead,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicySnapshot,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n} from \"./principalPolicyTypes\";\nexport { makeVerifiedPrincipalPolicy } from \"./principalPolicyTypes\";\nexport * from \"./transparency\";\nexport {\n accessManifestTransparencyLeaf,\n computeTransparencyLeafHash,\n identityStateTransparencyLeaf,\n principalPolicyTransparencyLeaf,\n} from \"./transparencyLeaf\";\nexport {\n type VerifyTransparencyConsistencyProofInput,\n type VerifyTransparencyInclusionProofInput,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n} from \"./transparencyProofs\";\nexport {\n computeTransparencyMerkleRoot,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n largestPowerOfTwoLessThan,\n} from \"./transparencyTree\";\nexport * from \"./transparencyTypes\";\nexport {\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n type KeyingVerificationCode,\n KeyingVerificationError,\n type KeyingVerificationResult,\n} from \"./verificationError\";\nexport * from \"./writeHeader\";\nexport * from \"./writeHeaderTypes\";\n"]}
@@ -1 +1 @@
1
- export type KeyingHashDomain = "tearleads.document.content-record-ciphertext" | "tearleads.document.content-record-metadata" | "tearleads.keying.access-event-body" | "tearleads.keying.access-event-signing" | "tearleads.keying.access-event" | "tearleads.keying.access-manifest" | "tearleads.keying.blob-access-manifest" | "tearleads.keying.blob-content-key-targets" | "tearleads.keying.content-record-nonce-domain" | "tearleads.keying.container-access-direct-grants" | "tearleads.keying.container-access-key-target" | "tearleads.keying.container-access-structural" | "tearleads.keying.container-key-epoch" | "tearleads.keying.container-kek-public-commitment" | "tearleads.keying.container-kek-keyring" | "tearleads.keying.container-kek-level-citation" | "tearleads.keying.container-kek-predecessor-bridge" | "tearleads.keying.container-kek-recipient-targets" | "tearleads.keying.document-content-key-targets" | "tearleads.keying.document-link-set-grants" | "tearleads.keying.document-link-set-key-target" | "tearleads.keying.document-link-set-structural" | "tearleads.keying.principal-history-leaf" | "tearleads.keying.transparency-empty-tree" | "tearleads.keying.transparency-leaf" | "tearleads.keying.transparency-node" | "tearleads.keying.transparency-tree-head-signing" | "tearleads.keying.write-header-signing" | "tearleads.keying.write-header";
1
+ export type KeyingHashDomain = "tearleads.document.content-record-ciphertext" | "tearleads.document.content-record-metadata" | "tearleads.keying.access-event-body" | "tearleads.keying.access-event-signing" | "tearleads.keying.access-event" | "tearleads.keying.access-manifest" | "tearleads.keying.blob-access-manifest" | "tearleads.keying.blob-content-key-targets" | "tearleads.keying.content-record-nonce-domain" | "tearleads.keying.container-access-direct-grants" | "tearleads.keying.container-access-key-target" | "tearleads.keying.container-access-structural" | "tearleads.keying.container-key-epoch" | "tearleads.keying.container-kek-public-commitment" | "tearleads.keying.container-kek-keyring" | "tearleads.keying.container-kek-level-citation" | "tearleads.keying.access-manifest-bundle-citation" | "tearleads.keying.container-kek-predecessor-bridge" | "tearleads.keying.container-kek-recipient-targets" | "tearleads.keying.document-content-key-targets" | "tearleads.keying.document-link-set-grants" | "tearleads.keying.document-link-set-key-target" | "tearleads.keying.document-link-set-structural" | "tearleads.keying.principal-history-leaf" | "tearleads.keying.transparency-empty-tree" | "tearleads.keying.transparency-leaf" | "tearleads.keying.transparency-node" | "tearleads.keying.transparency-tree-head-signing" | "tearleads.keying.write-header-signing" | "tearleads.keying.write-header";
@@ -1 +1 @@
1
- {"version":3,"file":"keyingHashDomains.js","sourceRoot":"","sources":["keyingHashDomains.ts"],"names":[],"mappings":"","sourcesContent":["export type KeyingHashDomain =\n | \"tearleads.document.content-record-ciphertext\"\n | \"tearleads.document.content-record-metadata\"\n | \"tearleads.keying.access-event-body\"\n | \"tearleads.keying.access-event-signing\"\n | \"tearleads.keying.access-event\"\n | \"tearleads.keying.access-manifest\"\n | \"tearleads.keying.blob-access-manifest\"\n | \"tearleads.keying.blob-content-key-targets\"\n | \"tearleads.keying.content-record-nonce-domain\"\n | \"tearleads.keying.container-access-direct-grants\"\n | \"tearleads.keying.container-access-key-target\"\n | \"tearleads.keying.container-access-structural\"\n | \"tearleads.keying.container-key-epoch\"\n | \"tearleads.keying.container-kek-public-commitment\"\n | \"tearleads.keying.container-kek-keyring\"\n | \"tearleads.keying.container-kek-level-citation\"\n | \"tearleads.keying.container-kek-predecessor-bridge\"\n | \"tearleads.keying.container-kek-recipient-targets\"\n | \"tearleads.keying.document-content-key-targets\"\n | \"tearleads.keying.document-link-set-grants\"\n | \"tearleads.keying.document-link-set-key-target\"\n | \"tearleads.keying.document-link-set-structural\"\n | \"tearleads.keying.principal-history-leaf\"\n | \"tearleads.keying.transparency-empty-tree\"\n | \"tearleads.keying.transparency-leaf\"\n | \"tearleads.keying.transparency-node\"\n | \"tearleads.keying.transparency-tree-head-signing\"\n | \"tearleads.keying.write-header-signing\"\n | \"tearleads.keying.write-header\";\n"]}
1
+ {"version":3,"file":"keyingHashDomains.js","sourceRoot":"","sources":["keyingHashDomains.ts"],"names":[],"mappings":"","sourcesContent":["export type KeyingHashDomain =\n | \"tearleads.document.content-record-ciphertext\"\n | \"tearleads.document.content-record-metadata\"\n | \"tearleads.keying.access-event-body\"\n | \"tearleads.keying.access-event-signing\"\n | \"tearleads.keying.access-event\"\n | \"tearleads.keying.access-manifest\"\n | \"tearleads.keying.blob-access-manifest\"\n | \"tearleads.keying.blob-content-key-targets\"\n | \"tearleads.keying.content-record-nonce-domain\"\n | \"tearleads.keying.container-access-direct-grants\"\n | \"tearleads.keying.container-access-key-target\"\n | \"tearleads.keying.container-access-structural\"\n | \"tearleads.keying.container-key-epoch\"\n | \"tearleads.keying.container-kek-public-commitment\"\n | \"tearleads.keying.container-kek-keyring\"\n | \"tearleads.keying.container-kek-level-citation\"\n | \"tearleads.keying.access-manifest-bundle-citation\"\n | \"tearleads.keying.container-kek-predecessor-bridge\"\n | \"tearleads.keying.container-kek-recipient-targets\"\n | \"tearleads.keying.document-content-key-targets\"\n | \"tearleads.keying.document-link-set-grants\"\n | \"tearleads.keying.document-link-set-key-target\"\n | \"tearleads.keying.document-link-set-structural\"\n | \"tearleads.keying.principal-history-leaf\"\n | \"tearleads.keying.transparency-empty-tree\"\n | \"tearleads.keying.transparency-leaf\"\n | \"tearleads.keying.transparency-node\"\n | \"tearleads.keying.transparency-tree-head-signing\"\n | \"tearleads.keying.write-header-signing\"\n | \"tearleads.keying.write-header\";\n"]}