@enbox/dwn-sdk-js 0.4.0 → 0.4.1

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 (513) hide show
  1. package/README.md +4 -4
  2. package/dist/browser.mjs +8 -8
  3. package/dist/browser.mjs.map +4 -4
  4. package/dist/esm/generated/precompiled-validators.js +799 -885
  5. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  6. package/dist/esm/src/core/dwn-constant.js +5 -0
  7. package/dist/esm/src/core/dwn-constant.js.map +1 -1
  8. package/dist/esm/src/core/dwn-error.js +12 -4
  9. package/dist/esm/src/core/dwn-error.js.map +1 -1
  10. package/dist/esm/src/core/grant-authorization.js +9 -18
  11. package/dist/esm/src/core/grant-authorization.js.map +1 -1
  12. package/dist/esm/src/core/message-reply.js.map +1 -1
  13. package/dist/esm/src/core/messages-grant-authorization.js +28 -45
  14. package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
  15. package/dist/esm/src/core/protocol-authorization-action.js +25 -27
  16. package/dist/esm/src/core/protocol-authorization-action.js.map +1 -1
  17. package/dist/esm/src/core/protocol-authorization-validation.js +30 -68
  18. package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -1
  19. package/dist/esm/src/core/protocol-authorization.js +44 -118
  20. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  21. package/dist/esm/src/core/protocols-grant-authorization.js +5 -5
  22. package/dist/esm/src/core/protocols-grant-authorization.js.map +1 -1
  23. package/dist/esm/src/core/recording-validation-state-reader.js +84 -0
  24. package/dist/esm/src/core/recording-validation-state-reader.js.map +1 -0
  25. package/dist/esm/src/core/records-grant-authorization.js +11 -11
  26. package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
  27. package/dist/esm/src/core/replication-apply.js +123 -28
  28. package/dist/esm/src/core/replication-apply.js.map +1 -1
  29. package/dist/esm/src/core/resumable-task-manager.js +5 -4
  30. package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
  31. package/dist/esm/src/core/validation-state-reader.js +237 -0
  32. package/dist/esm/src/core/validation-state-reader.js.map +1 -0
  33. package/dist/esm/src/dwn.js +165 -132
  34. package/dist/esm/src/dwn.js.map +1 -1
  35. package/dist/esm/src/enums/dwn-interface-method.js +0 -1
  36. package/dist/esm/src/enums/dwn-interface-method.js.map +1 -1
  37. package/dist/esm/src/event-stream/durable-event-log.js +365 -0
  38. package/dist/esm/src/event-stream/durable-event-log.js.map +1 -0
  39. package/dist/esm/src/event-stream/event-emitter-wake-publisher.js +25 -0
  40. package/dist/esm/src/event-stream/event-emitter-wake-publisher.js.map +1 -0
  41. package/dist/esm/src/handlers/messages-query.js +159 -0
  42. package/dist/esm/src/handlers/messages-query.js.map +1 -0
  43. package/dist/esm/src/handlers/messages-read.js +5 -5
  44. package/dist/esm/src/handlers/messages-read.js.map +1 -1
  45. package/dist/esm/src/handlers/messages-subscribe.js +8 -8
  46. package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
  47. package/dist/esm/src/handlers/protocols-configure.js +30 -49
  48. package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
  49. package/dist/esm/src/handlers/protocols-query.js +1 -1
  50. package/dist/esm/src/handlers/protocols-query.js.map +1 -1
  51. package/dist/esm/src/handlers/records-count.js +20 -11
  52. package/dist/esm/src/handlers/records-count.js.map +1 -1
  53. package/dist/esm/src/handlers/records-delete.js +20 -16
  54. package/dist/esm/src/handlers/records-delete.js.map +1 -1
  55. package/dist/esm/src/handlers/records-query.js +35 -11
  56. package/dist/esm/src/handlers/records-query.js.map +1 -1
  57. package/dist/esm/src/handlers/records-read.js +52 -42
  58. package/dist/esm/src/handlers/records-read.js.map +1 -1
  59. package/dist/esm/src/handlers/records-subscribe.js +107 -11
  60. package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
  61. package/dist/esm/src/handlers/records-write.js +62 -116
  62. package/dist/esm/src/handlers/records-write.js.map +1 -1
  63. package/dist/esm/src/index.js +6 -7
  64. package/dist/esm/src/index.js.map +1 -1
  65. package/dist/esm/src/interfaces/{messages-sync.js → messages-query.js} +21 -15
  66. package/dist/esm/src/interfaces/messages-query.js.map +1 -0
  67. package/dist/esm/src/interfaces/protocols-configure.js +7 -3
  68. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  69. package/dist/esm/src/interfaces/protocols-query.js +3 -4
  70. package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
  71. package/dist/esm/src/interfaces/records-count.js +4 -3
  72. package/dist/esm/src/interfaces/records-count.js.map +1 -1
  73. package/dist/esm/src/interfaces/records-delete.js +21 -4
  74. package/dist/esm/src/interfaces/records-delete.js.map +1 -1
  75. package/dist/esm/src/interfaces/records-query.js +4 -3
  76. package/dist/esm/src/interfaces/records-query.js.map +1 -1
  77. package/dist/esm/src/interfaces/records-read.js +3 -3
  78. package/dist/esm/src/interfaces/records-read.js.map +1 -1
  79. package/dist/esm/src/interfaces/records-subscribe.js +4 -3
  80. package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
  81. package/dist/esm/src/interfaces/records-write.js +27 -13
  82. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  83. package/dist/esm/src/protocols/permissions.js +27 -34
  84. package/dist/esm/src/protocols/permissions.js.map +1 -1
  85. package/dist/esm/src/store/index-level.js +24 -9
  86. package/dist/esm/src/store/index-level.js.map +1 -1
  87. package/dist/esm/src/store/level-wrapper.js +7 -0
  88. package/dist/esm/src/store/level-wrapper.js.map +1 -1
  89. package/dist/esm/src/store/message-store-level.js +536 -42
  90. package/dist/esm/src/store/message-store-level.js.map +1 -1
  91. package/dist/esm/src/store/storage-controller.js +58 -49
  92. package/dist/esm/src/store/storage-controller.js.map +1 -1
  93. package/dist/esm/src/types/message-types.js.map +1 -1
  94. package/dist/esm/src/types/validation-state-reader.js +2 -0
  95. package/dist/esm/src/types/validation-state-reader.js.map +1 -0
  96. package/dist/esm/src/utils/messages.js +17 -0
  97. package/dist/esm/src/utils/messages.js.map +1 -1
  98. package/dist/esm/src/utils/record-limit-occupancy.js +244 -0
  99. package/dist/esm/src/utils/record-limit-occupancy.js.map +1 -0
  100. package/dist/esm/src/utils/records.js +50 -14
  101. package/dist/esm/src/utils/records.js.map +1 -1
  102. package/dist/esm/src/utils/replication.js +85 -0
  103. package/dist/esm/src/utils/replication.js.map +1 -0
  104. package/dist/esm/tests/core/grant-authorization.spec.js +4 -4
  105. package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -1
  106. package/dist/esm/tests/core/process-message-parity.spec.js +222 -0
  107. package/dist/esm/tests/core/process-message-parity.spec.js.map +1 -0
  108. package/dist/esm/tests/core/protocol-authorization.spec.js +5 -2
  109. package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
  110. package/dist/esm/tests/core/records-grant-authorization.spec.js +5 -5
  111. package/dist/esm/tests/core/records-grant-authorization.spec.js.map +1 -1
  112. package/dist/esm/tests/core/replication-apply.spec.js +55 -1
  113. package/dist/esm/tests/core/replication-apply.spec.js.map +1 -1
  114. package/dist/esm/tests/core/replication-replay-property.spec.js +350 -0
  115. package/dist/esm/tests/core/replication-replay-property.spec.js.map +1 -0
  116. package/dist/esm/tests/core/validation-read-closure.spec.js +469 -0
  117. package/dist/esm/tests/core/validation-read-closure.spec.js.map +1 -0
  118. package/dist/esm/tests/core/validation-state-reader.spec.js +716 -0
  119. package/dist/esm/tests/core/validation-state-reader.spec.js.map +1 -0
  120. package/dist/esm/tests/durable-event-log.spec.js +373 -0
  121. package/dist/esm/tests/durable-event-log.spec.js.map +1 -0
  122. package/dist/esm/tests/dwn.spec.js +504 -35
  123. package/dist/esm/tests/dwn.spec.js.map +1 -1
  124. package/dist/esm/tests/features/author-delegated-grant.spec.js +9 -6
  125. package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
  126. package/dist/esm/tests/features/owner-delegated-grant.spec.js +1 -4
  127. package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
  128. package/dist/esm/tests/features/owner-signature.spec.js +1 -4
  129. package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
  130. package/dist/esm/tests/features/permissions.spec.js +165 -4
  131. package/dist/esm/tests/features/permissions.spec.js.map +1 -1
  132. package/dist/esm/tests/features/protocol-composition.spec.js +8 -11
  133. package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
  134. package/dist/esm/tests/features/protocol-create-action.spec.js +1 -4
  135. package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
  136. package/dist/esm/tests/features/protocol-delete-action.spec.js +3 -5
  137. package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
  138. package/dist/esm/tests/features/protocol-update-action.spec.js +3 -6
  139. package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
  140. package/dist/esm/tests/features/records-delivery.spec.js +1 -4
  141. package/dist/esm/tests/features/records-delivery.spec.js.map +1 -1
  142. package/dist/esm/tests/features/records-immutable.spec.js +1 -4
  143. package/dist/esm/tests/features/records-immutable.spec.js.map +1 -1
  144. package/dist/esm/tests/features/records-nested-query-scope.spec.js +281 -0
  145. package/dist/esm/tests/features/records-nested-query-scope.spec.js.map +1 -0
  146. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js +3 -7
  147. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js.map +1 -1
  148. package/dist/esm/tests/features/records-prune.spec.js +11 -22
  149. package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
  150. package/dist/esm/tests/features/records-record-limit.spec.js +441 -231
  151. package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -1
  152. package/dist/esm/tests/features/records-squash.spec.js +6 -4
  153. package/dist/esm/tests/features/records-squash.spec.js.map +1 -1
  154. package/dist/esm/tests/features/records-tags.spec.js +1 -4
  155. package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
  156. package/dist/esm/tests/features/resumable-tasks.spec.js +3 -5
  157. package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
  158. package/dist/esm/tests/fuzz/message-store.fuzz.spec.js +1 -2
  159. package/dist/esm/tests/fuzz/message-store.fuzz.spec.js.map +1 -1
  160. package/dist/esm/tests/fuzz/process-message.fuzz.spec.js +2 -4
  161. package/dist/esm/tests/fuzz/process-message.fuzz.spec.js.map +1 -1
  162. package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js +1 -1
  163. package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js.map +1 -1
  164. package/dist/esm/tests/handlers/messages-query.spec.js +246 -0
  165. package/dist/esm/tests/handlers/messages-query.spec.js.map +1 -0
  166. package/dist/esm/tests/handlers/messages-read.spec.js +2 -5
  167. package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
  168. package/dist/esm/tests/handlers/messages-subscribe.spec.js +3 -14
  169. package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
  170. package/dist/esm/tests/handlers/protocols-configure.spec.js +27 -26
  171. package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
  172. package/dist/esm/tests/handlers/protocols-query.spec.js +1 -4
  173. package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
  174. package/dist/esm/tests/handlers/records-count.spec.js +1 -4
  175. package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
  176. package/dist/esm/tests/handlers/records-delete.spec.js +312 -30
  177. package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
  178. package/dist/esm/tests/handlers/records-query.spec.js +32 -9
  179. package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
  180. package/dist/esm/tests/handlers/records-read.spec.js +4 -4
  181. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  182. package/dist/esm/tests/handlers/records-subscribe.spec.js +33 -14
  183. package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
  184. package/dist/esm/tests/handlers/records-write.spec.js +82 -36
  185. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  186. package/dist/esm/tests/interfaces/records-delete.spec.js +69 -2
  187. package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
  188. package/dist/esm/tests/interfaces/records-write.spec.js +4 -3
  189. package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
  190. package/dist/esm/tests/protocols/permissions.spec.js +55 -6
  191. package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
  192. package/dist/esm/tests/scenarios/aggregator.spec.js +1 -4
  193. package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
  194. package/dist/esm/tests/scenarios/deleted-record.spec.js +1 -4
  195. package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
  196. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +1 -4
  197. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
  198. package/dist/esm/tests/scenarios/nested-roles.spec.js +1 -4
  199. package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
  200. package/dist/esm/tests/scenarios/subscriptions.spec.js +1 -4
  201. package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
  202. package/dist/esm/tests/store/message-store-level.spec.js +361 -5
  203. package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
  204. package/dist/esm/tests/store/message-store.spec.js +60 -0
  205. package/dist/esm/tests/store/message-store.spec.js.map +1 -1
  206. package/dist/esm/tests/test-event-stream.js +7 -3
  207. package/dist/esm/tests/test-event-stream.js.map +1 -1
  208. package/dist/esm/tests/test-stores.js +19 -9
  209. package/dist/esm/tests/test-stores.js.map +1 -1
  210. package/dist/esm/tests/test-suite.js +4 -2
  211. package/dist/esm/tests/test-suite.js.map +1 -1
  212. package/dist/esm/tests/utils/test-data-generator.js +25 -0
  213. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  214. package/dist/esm/tests/utils/test-stub-generator.js.map +1 -1
  215. package/dist/esm/tests/utils/test-validation-state-reader.js +16 -0
  216. package/dist/esm/tests/utils/test-validation-state-reader.js.map +1 -0
  217. package/dist/types/generated/precompiled-validators.d.ts +6 -6
  218. package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
  219. package/dist/types/src/core/core-protocol.d.ts +3 -3
  220. package/dist/types/src/core/core-protocol.d.ts.map +1 -1
  221. package/dist/types/src/core/dwn-constant.d.ts +5 -0
  222. package/dist/types/src/core/dwn-constant.d.ts.map +1 -1
  223. package/dist/types/src/core/dwn-error.d.ts +12 -4
  224. package/dist/types/src/core/dwn-error.d.ts.map +1 -1
  225. package/dist/types/src/core/grant-authorization.d.ts +5 -5
  226. package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
  227. package/dist/types/src/core/message-reply.d.ts +5 -4
  228. package/dist/types/src/core/message-reply.d.ts.map +1 -1
  229. package/dist/types/src/core/messages-grant-authorization.d.ts +12 -14
  230. package/dist/types/src/core/messages-grant-authorization.d.ts.map +1 -1
  231. package/dist/types/src/core/protocol-authorization-action.d.ts +4 -5
  232. package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -1
  233. package/dist/types/src/core/protocol-authorization-validation.d.ts +13 -16
  234. package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -1
  235. package/dist/types/src/core/protocol-authorization.d.ts +8 -33
  236. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  237. package/dist/types/src/core/protocols-grant-authorization.d.ts +4 -4
  238. package/dist/types/src/core/protocols-grant-authorization.d.ts.map +1 -1
  239. package/dist/types/src/core/recording-validation-state-reader.d.ts +75 -0
  240. package/dist/types/src/core/recording-validation-state-reader.d.ts.map +1 -0
  241. package/dist/types/src/core/records-grant-authorization.d.ts +8 -8
  242. package/dist/types/src/core/records-grant-authorization.d.ts.map +1 -1
  243. package/dist/types/src/core/replication-apply.d.ts +36 -0
  244. package/dist/types/src/core/replication-apply.d.ts.map +1 -1
  245. package/dist/types/src/core/resumable-task-manager.d.ts +1 -1
  246. package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
  247. package/dist/types/src/core/validation-state-reader.d.ts +79 -0
  248. package/dist/types/src/core/validation-state-reader.d.ts.map +1 -0
  249. package/dist/types/src/dwn.d.ts +33 -20
  250. package/dist/types/src/dwn.d.ts.map +1 -1
  251. package/dist/types/src/enums/dwn-interface-method.d.ts +0 -1
  252. package/dist/types/src/enums/dwn-interface-method.d.ts.map +1 -1
  253. package/dist/types/src/event-stream/durable-event-log.d.ts +69 -0
  254. package/dist/types/src/event-stream/durable-event-log.d.ts.map +1 -0
  255. package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts +13 -0
  256. package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts.map +1 -0
  257. package/dist/types/src/handlers/messages-query.d.ts +20 -0
  258. package/dist/types/src/handlers/messages-query.d.ts.map +1 -0
  259. package/dist/types/src/handlers/messages-read.d.ts +1 -1
  260. package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
  261. package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
  262. package/dist/types/src/handlers/protocols-configure.d.ts +0 -5
  263. package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
  264. package/dist/types/src/handlers/records-count.d.ts +2 -1
  265. package/dist/types/src/handlers/records-count.d.ts.map +1 -1
  266. package/dist/types/src/handlers/records-delete.d.ts +2 -2
  267. package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
  268. package/dist/types/src/handlers/records-query.d.ts +1 -1
  269. package/dist/types/src/handlers/records-query.d.ts.map +1 -1
  270. package/dist/types/src/handlers/records-read.d.ts +2 -1
  271. package/dist/types/src/handlers/records-read.d.ts.map +1 -1
  272. package/dist/types/src/handlers/records-subscribe.d.ts +4 -5
  273. package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
  274. package/dist/types/src/handlers/records-write.d.ts +3 -11
  275. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  276. package/dist/types/src/index.d.ts +14 -16
  277. package/dist/types/src/index.d.ts.map +1 -1
  278. package/dist/types/src/interfaces/messages-query.d.ts +23 -0
  279. package/dist/types/src/interfaces/messages-query.d.ts.map +1 -0
  280. package/dist/types/src/interfaces/protocols-configure.d.ts +3 -3
  281. package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
  282. package/dist/types/src/interfaces/protocols-query.d.ts +2 -2
  283. package/dist/types/src/interfaces/protocols-query.d.ts.map +1 -1
  284. package/dist/types/src/interfaces/records-count.d.ts +3 -3
  285. package/dist/types/src/interfaces/records-count.d.ts.map +1 -1
  286. package/dist/types/src/interfaces/records-delete.d.ts +11 -3
  287. package/dist/types/src/interfaces/records-delete.d.ts.map +1 -1
  288. package/dist/types/src/interfaces/records-query.d.ts +3 -3
  289. package/dist/types/src/interfaces/records-query.d.ts.map +1 -1
  290. package/dist/types/src/interfaces/records-read.d.ts +3 -3
  291. package/dist/types/src/interfaces/records-read.d.ts.map +1 -1
  292. package/dist/types/src/interfaces/records-subscribe.d.ts +3 -3
  293. package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
  294. package/dist/types/src/interfaces/records-write.d.ts +15 -7
  295. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  296. package/dist/types/src/protocols/permissions.d.ts +9 -12
  297. package/dist/types/src/protocols/permissions.d.ts.map +1 -1
  298. package/dist/types/src/store/index-level.d.ts +10 -1
  299. package/dist/types/src/store/index-level.d.ts.map +1 -1
  300. package/dist/types/src/store/level-wrapper.d.ts +5 -0
  301. package/dist/types/src/store/level-wrapper.d.ts.map +1 -1
  302. package/dist/types/src/store/message-store-level.d.ts +94 -14
  303. package/dist/types/src/store/message-store-level.d.ts.map +1 -1
  304. package/dist/types/src/store/storage-controller.d.ts +17 -14
  305. package/dist/types/src/store/storage-controller.d.ts.map +1 -1
  306. package/dist/types/src/types/message-store.d.ts +29 -1
  307. package/dist/types/src/types/message-store.d.ts.map +1 -1
  308. package/dist/types/src/types/message-types.d.ts +2 -0
  309. package/dist/types/src/types/message-types.d.ts.map +1 -1
  310. package/dist/types/src/types/messages-types.d.ts +21 -37
  311. package/dist/types/src/types/messages-types.d.ts.map +1 -1
  312. package/dist/types/src/types/method-handler.d.ts +2 -2
  313. package/dist/types/src/types/method-handler.d.ts.map +1 -1
  314. package/dist/types/src/types/permission-types.d.ts +1 -1
  315. package/dist/types/src/types/subscriptions.d.ts +50 -39
  316. package/dist/types/src/types/subscriptions.d.ts.map +1 -1
  317. package/dist/types/src/types/validation-state-reader.d.ts +116 -0
  318. package/dist/types/src/types/validation-state-reader.d.ts.map +1 -0
  319. package/dist/types/src/utils/messages.d.ts +10 -0
  320. package/dist/types/src/utils/messages.d.ts.map +1 -1
  321. package/dist/types/src/utils/record-limit-occupancy.d.ts +40 -0
  322. package/dist/types/src/utils/record-limit-occupancy.d.ts.map +1 -0
  323. package/dist/types/src/utils/records.d.ts +25 -3
  324. package/dist/types/src/utils/records.d.ts.map +1 -1
  325. package/dist/types/src/utils/replication.d.ts +22 -0
  326. package/dist/types/src/utils/replication.d.ts.map +1 -0
  327. package/dist/types/tests/core/process-message-parity.spec.d.ts +2 -0
  328. package/dist/types/tests/core/process-message-parity.spec.d.ts.map +1 -0
  329. package/dist/types/tests/core/replication-replay-property.spec.d.ts +2 -0
  330. package/dist/types/tests/core/replication-replay-property.spec.d.ts.map +1 -0
  331. package/dist/types/tests/core/validation-read-closure.spec.d.ts +2 -0
  332. package/dist/types/tests/core/validation-read-closure.spec.d.ts.map +1 -0
  333. package/dist/types/tests/core/validation-state-reader.spec.d.ts +2 -0
  334. package/dist/types/tests/core/validation-state-reader.spec.d.ts.map +1 -0
  335. package/dist/types/tests/durable-event-log.spec.d.ts +2 -0
  336. package/dist/types/tests/durable-event-log.spec.d.ts.map +1 -0
  337. package/dist/types/tests/dwn.spec.d.ts.map +1 -1
  338. package/dist/types/tests/features/author-delegated-grant.spec.d.ts.map +1 -1
  339. package/dist/types/tests/features/owner-delegated-grant.spec.d.ts.map +1 -1
  340. package/dist/types/tests/features/owner-signature.spec.d.ts.map +1 -1
  341. package/dist/types/tests/features/permissions.spec.d.ts.map +1 -1
  342. package/dist/types/tests/features/protocol-composition.spec.d.ts.map +1 -1
  343. package/dist/types/tests/features/protocol-create-action.spec.d.ts.map +1 -1
  344. package/dist/types/tests/features/protocol-delete-action.spec.d.ts.map +1 -1
  345. package/dist/types/tests/features/protocol-update-action.spec.d.ts.map +1 -1
  346. package/dist/types/tests/features/records-delivery.spec.d.ts.map +1 -1
  347. package/dist/types/tests/features/records-immutable.spec.d.ts.map +1 -1
  348. package/dist/types/tests/features/records-nested-query-scope.spec.d.ts +2 -0
  349. package/dist/types/tests/features/records-nested-query-scope.spec.d.ts.map +1 -0
  350. package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts.map +1 -1
  351. package/dist/types/tests/features/records-prune.spec.d.ts.map +1 -1
  352. package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -1
  353. package/dist/types/tests/features/records-squash.spec.d.ts.map +1 -1
  354. package/dist/types/tests/features/records-tags.spec.d.ts.map +1 -1
  355. package/dist/types/tests/features/resumable-tasks.spec.d.ts.map +1 -1
  356. package/dist/types/tests/handlers/messages-query.spec.d.ts +2 -0
  357. package/dist/types/tests/handlers/messages-query.spec.d.ts.map +1 -0
  358. package/dist/types/tests/handlers/messages-read.spec.d.ts.map +1 -1
  359. package/dist/types/tests/handlers/messages-subscribe.spec.d.ts.map +1 -1
  360. package/dist/types/tests/handlers/protocols-configure.spec.d.ts.map +1 -1
  361. package/dist/types/tests/handlers/protocols-query.spec.d.ts.map +1 -1
  362. package/dist/types/tests/handlers/records-count.spec.d.ts.map +1 -1
  363. package/dist/types/tests/handlers/records-delete.spec.d.ts.map +1 -1
  364. package/dist/types/tests/handlers/records-query.spec.d.ts.map +1 -1
  365. package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
  366. package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
  367. package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
  368. package/dist/types/tests/scenarios/deleted-record.spec.d.ts.map +1 -1
  369. package/dist/types/tests/scenarios/end-to-end-tests.spec.d.ts.map +1 -1
  370. package/dist/types/tests/scenarios/nested-roles.spec.d.ts.map +1 -1
  371. package/dist/types/tests/scenarios/subscriptions.spec.d.ts.map +1 -1
  372. package/dist/types/tests/store/message-store.spec.d.ts.map +1 -1
  373. package/dist/types/tests/test-event-stream.d.ts +1 -1
  374. package/dist/types/tests/test-event-stream.d.ts.map +1 -1
  375. package/dist/types/tests/test-stores.d.ts +5 -4
  376. package/dist/types/tests/test-stores.d.ts.map +1 -1
  377. package/dist/types/tests/test-suite.d.ts +1 -2
  378. package/dist/types/tests/test-suite.d.ts.map +1 -1
  379. package/dist/types/tests/utils/test-data-generator.d.ts +20 -1
  380. package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
  381. package/dist/types/tests/utils/test-validation-state-reader.d.ts +15 -0
  382. package/dist/types/tests/utils/test-validation-state-reader.d.ts.map +1 -0
  383. package/package.json +2 -2
  384. package/src/core/core-protocol.ts +3 -3
  385. package/src/core/dwn-constant.ts +7 -1
  386. package/src/core/dwn-error.ts +12 -4
  387. package/src/core/grant-authorization.ts +11 -20
  388. package/src/core/message-reply.ts +6 -5
  389. package/src/core/messages-grant-authorization.ts +37 -70
  390. package/src/core/protocol-authorization-action.ts +29 -38
  391. package/src/core/protocol-authorization-validation.ts +39 -96
  392. package/src/core/protocol-authorization.ts +56 -202
  393. package/src/core/protocols-grant-authorization.ts +9 -9
  394. package/src/core/recording-validation-state-reader.ts +130 -0
  395. package/src/core/records-grant-authorization.ts +16 -16
  396. package/src/core/replication-apply.ts +172 -32
  397. package/src/core/resumable-task-manager.ts +10 -8
  398. package/src/core/validation-state-reader.ts +350 -0
  399. package/src/dwn.ts +285 -192
  400. package/src/enums/dwn-interface-method.ts +0 -1
  401. package/src/event-stream/durable-event-log.ts +509 -0
  402. package/src/event-stream/event-emitter-wake-publisher.ts +34 -0
  403. package/src/handlers/messages-query.ts +203 -0
  404. package/src/handlers/messages-read.ts +9 -10
  405. package/src/handlers/messages-subscribe.ts +12 -13
  406. package/src/handlers/protocols-configure.ts +37 -58
  407. package/src/handlers/protocols-query.ts +1 -1
  408. package/src/handlers/records-count.ts +24 -17
  409. package/src/handlers/records-delete.ts +29 -27
  410. package/src/handlers/records-query.ts +38 -17
  411. package/src/handlers/records-read.ts +63 -50
  412. package/src/handlers/records-subscribe.ts +132 -19
  413. package/src/handlers/records-write.ts +77 -168
  414. package/src/index.ts +14 -17
  415. package/src/interfaces/messages-query.ts +70 -0
  416. package/src/interfaces/protocols-configure.ts +12 -4
  417. package/src/interfaces/protocols-query.ts +4 -5
  418. package/src/interfaces/records-count.ts +9 -4
  419. package/src/interfaces/records-delete.ts +25 -5
  420. package/src/interfaces/records-query.ts +9 -4
  421. package/src/interfaces/records-read.ts +4 -4
  422. package/src/interfaces/records-subscribe.ts +9 -4
  423. package/src/interfaces/records-write.ts +41 -13
  424. package/src/protocols/permissions.ts +32 -52
  425. package/src/store/index-level.ts +30 -9
  426. package/src/store/level-wrapper.ts +9 -1
  427. package/src/store/message-store-level.ts +757 -47
  428. package/src/store/storage-controller.ts +74 -63
  429. package/src/types/message-store.ts +45 -2
  430. package/src/types/message-types.ts +3 -1
  431. package/src/types/messages-types.ts +26 -45
  432. package/src/types/method-handler.ts +3 -3
  433. package/src/types/permission-types.ts +1 -1
  434. package/src/types/subscriptions.ts +53 -42
  435. package/src/types/validation-state-reader.ts +127 -0
  436. package/src/utils/messages.ts +25 -1
  437. package/src/utils/record-limit-occupancy.ts +377 -0
  438. package/src/utils/records.ts +69 -13
  439. package/src/utils/replication.ts +122 -0
  440. package/dist/esm/src/core/record-chain.js +0 -64
  441. package/dist/esm/src/core/record-chain.js.map +0 -1
  442. package/dist/esm/src/event-stream/event-emitter-event-log.js +0 -334
  443. package/dist/esm/src/event-stream/event-emitter-event-log.js.map +0 -1
  444. package/dist/esm/src/handlers/messages-sync.js +0 -278
  445. package/dist/esm/src/handlers/messages-sync.js.map +0 -1
  446. package/dist/esm/src/interfaces/messages-sync.js.map +0 -1
  447. package/dist/esm/src/smt/smt-store-level.js +0 -103
  448. package/dist/esm/src/smt/smt-store-level.js.map +0 -1
  449. package/dist/esm/src/smt/smt-store-memory.js +0 -41
  450. package/dist/esm/src/smt/smt-store-memory.js.map +0 -1
  451. package/dist/esm/src/smt/smt-utils.js +0 -129
  452. package/dist/esm/src/smt/smt-utils.js.map +0 -1
  453. package/dist/esm/src/smt/sparse-merkle-tree.js +0 -577
  454. package/dist/esm/src/smt/sparse-merkle-tree.js.map +0 -1
  455. package/dist/esm/src/state-index/state-index-level.js +0 -191
  456. package/dist/esm/src/state-index/state-index-level.js.map +0 -1
  457. package/dist/esm/src/types/smt-types.js +0 -5
  458. package/dist/esm/src/types/smt-types.js.map +0 -1
  459. package/dist/esm/src/types/state-index.js +0 -2
  460. package/dist/esm/src/types/state-index.js.map +0 -1
  461. package/dist/esm/tests/event-emitter-event-log.spec.js +0 -499
  462. package/dist/esm/tests/event-emitter-event-log.spec.js.map +0 -1
  463. package/dist/esm/tests/handlers/messages-sync.spec.js +0 -1088
  464. package/dist/esm/tests/handlers/messages-sync.spec.js.map +0 -1
  465. package/dist/esm/tests/smt/smt-store-level.spec.js +0 -132
  466. package/dist/esm/tests/smt/smt-store-level.spec.js.map +0 -1
  467. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +0 -732
  468. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +0 -1
  469. package/dist/esm/tests/state-index/state-index-level.spec.js +0 -245
  470. package/dist/esm/tests/state-index/state-index-level.spec.js.map +0 -1
  471. package/dist/types/src/core/record-chain.d.ts +0 -24
  472. package/dist/types/src/core/record-chain.d.ts.map +0 -1
  473. package/dist/types/src/event-stream/event-emitter-event-log.d.ts +0 -80
  474. package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +0 -1
  475. package/dist/types/src/handlers/messages-sync.d.ts +0 -39
  476. package/dist/types/src/handlers/messages-sync.d.ts.map +0 -1
  477. package/dist/types/src/interfaces/messages-sync.d.ts +0 -20
  478. package/dist/types/src/interfaces/messages-sync.d.ts.map +0 -1
  479. package/dist/types/src/smt/smt-store-level.d.ts +0 -32
  480. package/dist/types/src/smt/smt-store-level.d.ts.map +0 -1
  481. package/dist/types/src/smt/smt-store-memory.d.ts +0 -22
  482. package/dist/types/src/smt/smt-store-memory.d.ts.map +0 -1
  483. package/dist/types/src/smt/smt-utils.d.ts +0 -58
  484. package/dist/types/src/smt/smt-utils.d.ts.map +0 -1
  485. package/dist/types/src/smt/sparse-merkle-tree.d.ts +0 -124
  486. package/dist/types/src/smt/sparse-merkle-tree.d.ts.map +0 -1
  487. package/dist/types/src/state-index/state-index-level.d.ts +0 -83
  488. package/dist/types/src/state-index/state-index-level.d.ts.map +0 -1
  489. package/dist/types/src/types/smt-types.d.ts +0 -81
  490. package/dist/types/src/types/smt-types.d.ts.map +0 -1
  491. package/dist/types/src/types/state-index.d.ts +0 -90
  492. package/dist/types/src/types/state-index.d.ts.map +0 -1
  493. package/dist/types/tests/event-emitter-event-log.spec.d.ts +0 -2
  494. package/dist/types/tests/event-emitter-event-log.spec.d.ts.map +0 -1
  495. package/dist/types/tests/handlers/messages-sync.spec.d.ts +0 -2
  496. package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +0 -1
  497. package/dist/types/tests/smt/smt-store-level.spec.d.ts +0 -2
  498. package/dist/types/tests/smt/smt-store-level.spec.d.ts.map +0 -1
  499. package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts +0 -2
  500. package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts.map +0 -1
  501. package/dist/types/tests/state-index/state-index-level.spec.d.ts +0 -2
  502. package/dist/types/tests/state-index/state-index-level.spec.d.ts.map +0 -1
  503. package/src/core/record-chain.ts +0 -99
  504. package/src/event-stream/event-emitter-event-log.ts +0 -430
  505. package/src/handlers/messages-sync.ts +0 -403
  506. package/src/interfaces/messages-sync.ts +0 -69
  507. package/src/smt/smt-store-level.ts +0 -143
  508. package/src/smt/smt-store-memory.ts +0 -53
  509. package/src/smt/smt-utils.ts +0 -149
  510. package/src/smt/sparse-merkle-tree.ts +0 -698
  511. package/src/state-index/state-index-level.ts +0 -239
  512. package/src/types/smt-types.ts +0 -95
  513. package/src/types/state-index.ts +0 -100
@@ -1 +1 @@
1
- {"version":3,"file":"records-query.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-query.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAehH,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACR,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwD9E;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAmBvB;;OAEG;YACW,mBAAmB;IAiBjC;;;;;;;;;;;;;;;;;;OAkBG;YACW,sBAAsB;IA+BpC;;OAEG;YACW,qBAAqB;IASnC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAY1C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,2CAA2C;IAa1D;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,+CAA+C;IAW9D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sDAAsD;IAWrE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0CAA0C;IAazD;;OAEG;mBACkB,qBAAqB;CA+B3C"}
1
+ {"version":3,"file":"records-query.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAehH,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,GACR,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,mBAAmB,CAAA;KAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwD9E;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IAmBvB;;OAEG;YACW,mBAAmB;IAyBjC;;;;;;;;;;;;;;;;;;OAkBG;YACW,sBAAsB;IAuCpC;;OAEG;YACW,qBAAqB;IAiBnC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAY1C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,2CAA2C;IAa1D;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,+CAA+C;IAW9D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sDAAsD;IAWrE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0CAA0C;IAazD;;OAEG;mBACkB,qBAAqB;CA8B3C"}
@@ -3,10 +3,11 @@ import type { RecordsReadMessage, RecordsReadReply } from '../types/records-type
3
3
  export declare class RecordsReadHandler implements MethodHandler {
4
4
  private readonly deps;
5
5
  constructor(deps: HandlerDependencies);
6
- handle({ tenant, message }: {
6
+ handle({ tenant, message, }: {
7
7
  tenant: string;
8
8
  message: RecordsReadMessage;
9
9
  }): Promise<RecordsReadReply>;
10
+ private replyForDeletedRecord;
10
11
  /**
11
12
  * @param messageStore Used to check if the grant has been revoked.
12
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"records-read.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAgD,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAgBpI,qBAAa,kBAAmB,YAAW,aAAa;IAE1C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACR,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkI9E;;OAEG;mBACkB,oBAAoB;CAuC1C"}
1
+ {"version":3,"file":"records-read.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-read.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAgD,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAgBpI,qBAAa,kBAAmB,YAAW,aAAa;IAE1C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,GACR,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,kBAAkB,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;YAwGhE,qBAAqB;IA0CnC;;OAEG;mBACkB,oBAAoB;CAsC1C"}
@@ -1,13 +1,11 @@
1
- import type { CoreProtocolRegistry } from '../core/core-protocol.js';
2
- import type { MessageStore } from '../types//message-store.js';
3
- import type { HandlerDependencies, MethodHandler } from '../types/method-handler.js';
4
1
  import type { SubscriptionListener } from '../types/subscriptions.js';
2
+ import type { HandlerDependencies, MethodHandler } from '../types/method-handler.js';
5
3
  import type { RecordsSubscribeMessage, RecordsSubscribeReply } from '../types/records-types.js';
6
4
  import { RecordsSubscribe } from '../interfaces/records-subscribe.js';
7
5
  export declare class RecordsSubscribeHandler implements MethodHandler {
8
6
  private readonly deps;
9
7
  constructor(deps: HandlerDependencies);
10
- handle({ tenant, message, subscriptionHandler }: {
8
+ handle({ tenant, message, subscriptionHandler, }: {
11
9
  tenant: string;
12
10
  message: RecordsSubscribeMessage;
13
11
  subscriptionHandler: SubscriptionListener;
@@ -17,6 +15,7 @@ export declare class RecordsSubscribeHandler implements MethodHandler {
17
15
  * Defaults to `dateCreated` ascending if no sort is supplied.
18
16
  */
19
17
  private static convertDateSort;
18
+ private static createRecordLimitOccupancyGuard;
20
19
  /**
21
20
  * Build event filters for owner: all matching Write+Delete events.
22
21
  */
@@ -44,6 +43,6 @@ export declare class RecordsSubscribeHandler implements MethodHandler {
44
43
  /**
45
44
  * @param messageStore Used to check if the grant has been revoked.
46
45
  */
47
- static authorizeRecordsSubscribe(tenant: string, recordsSubscribe: RecordsSubscribe, messageStore: MessageStore, coreProtocols?: CoreProtocolRegistry): Promise<void>;
46
+ static authorizeRecordsSubscribe(tenant: string, recordsSubscribe: RecordsSubscribe, deps: HandlerDependencies): Promise<void>;
48
47
  }
49
48
  //# sourceMappingURL=records-subscribe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-subscribe.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAmB,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,KAAK,EAA0B,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAUxH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAMtE,qBAAa,uBAAwB,YAAW,aAAa;IAE/C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACP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,MAAM,CAAC;QACf,OAAO,EAAE,uBAAuB,CAAC;QACjC,mBAAmB,EAAE,oBAAoB,CAAC;KAC3C,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAsIlC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAmB9B,OAAO,CAAC,MAAM,CAAC,+BAA+B;IAoG9C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IASrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAiDxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAcxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAUrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAqDxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAWxC;;OAEG;WACiB,yBAAyB,CAC3C,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,IAAI,CAAC;CA0BjB"}
@@ -9,23 +9,15 @@ type HandlerArgs = {
9
9
  export declare class RecordsWriteHandler implements MethodHandler {
10
10
  private readonly deps;
11
11
  constructor(deps: HandlerDependencies);
12
- handle({ tenant, message, dataStream }: HandlerArgs): Promise<GenericMessageReply>;
12
+ handle({ tenant, message, dataStream, }: HandlerArgs): Promise<GenericMessageReply>;
13
13
  /**
14
14
  * Returns a `RecordsQueryReplyEntry` with a copy of the incoming message and the incoming data encoded to `Base64URL`.
15
15
  */
16
16
  cloneAndAddEncodedData(message: RecordsWriteMessage, dataBytes: Uint8Array): Promise<RecordsQueryReplyEntry>;
17
17
  private processMessageWithDataStream;
18
- private existingInitialWriteLacksData;
18
+ private getInitialWrite;
19
+ private verifyImmutableProperties;
19
20
  private processMessageWithoutDataStream;
20
- /**
21
- * Validates the expected `dataCid` and `dataSize` in the descriptor vs the received data.
22
- *
23
- * @throws {DwnError} with `DwnErrorCode.RecordsWriteDataCidMismatch`
24
- * if the data stream resulted in a data CID that mismatches with `dataCid` in the given message
25
- * @throws {DwnError} with `DwnErrorCode.RecordsWriteDataSizeMismatch`
26
- * if `dataSize` in `descriptor` given mismatches the actual data size
27
- */
28
- private static validateDataIntegrity;
29
21
  /**
30
22
  * Enforces the squash backstop: if the incoming message is at a protocol path with `$squash: true`,
31
23
  * and there exists a squash record at the same protocol path and parent context whose
@@ -1 +1 @@
1
- {"version":3,"file":"records-write.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAqB7F,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAC;IAAC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CAAC,CAAC;AAE5G,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACP,UAAU,EACX,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAoO7C;;OAEG;IACU,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,GAAE,OAAO,CAAC,sBAAsB,CAAC;YAM1G,4BAA4B;YA8C5B,6BAA6B;YA2B7B,+BAA+B;IAyC7C;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAqBpC;;;;;;OAMG;YACW,qBAAqB;YA4ErB,qBAAqB;CAsCpC"}
1
+ {"version":3,"file":"records-write.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAkB7F,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAC;IAAC,UAAU,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;CAAE,CAAC;AAE7G,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACP,UAAU,GACX,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA2L7C;;OAEG;IACU,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,GAAE,OAAO,CAAC,sBAAsB,CAAC;YAM1G,4BAA4B;YA8C5B,eAAe;IAW7B,OAAO,CAAC,yBAAyB;YAkBnB,+BAA+B;IAyC7C;;;;;;OAMG;YACW,qBAAqB;YAyDrB,qBAAqB;CAsCpC"}
@@ -1,9 +1,13 @@
1
1
  export type { DwnConfig } from './dwn.js';
2
- export type { EventListener, EventLog, EventLogEntry, EventLogReadOptions, EventLogReadResult, EventLogSubscribeOptions, EventSubscription, MessageEvent, ProgressGapInfo, ProgressGapReason, ProgressToken, SubscriptionEose, SubscriptionError, SubscriptionEvent, SubscriptionListener, SubscriptionMessage, SubscriptionReply } from './types/subscriptions.js';
2
+ export type { EventLog, EventLogEntry, EventLogReadOptions, EventLogReadResult, EventLogSubscribeOptions, EventSubscription, MessageEvent, ProgressGapInfo, ProgressGapReason, ProgressToken, ReplicationFeedReader, SubscriptionEose, SubscriptionError, SubscriptionEvent, SubscriptionListener, SubscriptionMessage, SubscriptionReply, Wake, WakePublisher, WakeSubscriber } from './types/subscriptions.js';
3
3
  export type { AuthorizationModel, Descriptor, DelegatedGrantRecordsWriteMessage, GenericMessage, GenericMessageReply, GenericSignaturePayload, MessageSort, MessageSubscription, Pagination, QueryResultEntry, Status } from './types/message-types.js';
4
4
  export type { DependencyRef, ReplicationApplyOptions, ReplicationApplyResult, ReplicationApplyResultContext } from './core/replication-apply.js';
5
5
  export { replicationApplyResultFromReply } from './core/replication-apply.js';
6
- export type { MessagesFilter, MessagesReadMessage, MessagesReadReply, MessagesReadReplyEntry, MessagesReadDescriptor, MessagesSubscribeDescriptor, MessagesSubscribeMessage, MessagesSubscribeReply, MessagesSubscribeMessageOptions, MessagesSyncAction, MessagesSyncDescriptor, MessagesSyncDiffEntry, MessagesSyncMessage, MessagesSyncReply } from './types/messages-types.js';
6
+ export type { ValidationStateReader } from './types/validation-state-reader.js';
7
+ export { StoreValidationStateReader } from './core/validation-state-reader.js';
8
+ export type { RecordedValidationRead } from './core/recording-validation-state-reader.js';
9
+ export { RecordingValidationStateReader } from './core/recording-validation-state-reader.js';
10
+ export type { MessagesFilter, MessagesQueryDescriptor, MessagesQueryMessage, MessagesQueryReply, MessagesQueryReplyEntry, MessagesReadMessage, MessagesReadReply, MessagesReadReplyEntry, MessagesReadDescriptor, MessagesSubscribeDescriptor, MessagesSubscribeMessage, MessagesSubscribeReply, MessagesSubscribeMessageOptions } from './types/messages-types.js';
7
11
  export type { GT, LT, Filter, FilterValue, KeyValues, EqualFilter, OneOfFilter, RangeFilter, RangeCriterion, PaginationCursor, QueryOptions, RangeValue, StartsWithFilter } from './types/query-types.js';
8
12
  export type { ProtocolsConfigureDescriptor, ProtocolDefinition, ProtocolTypes, ProtocolRuleSet, ProtocolsQueryFilter, ProtocolsConfigureMessage, ProtocolsQueryMessage, ProtocolsQueryReply, ProtocolActionRule, ProtocolDeliveryStrategy, ProtocolPathEncryption, ProtocolsQueryDescriptor, ProtocolRecordLimitDefinition, ProtocolSizeDefinition, ProtocolTagsDefinition, ProtocolTagSchema, ProtocolType, ProtocolUses } from './types/protocols-types.js';
9
13
  export { ProtocolRecordLimitStrategy } from './types/protocols-types.js';
@@ -43,10 +47,11 @@ export type { KeyMaterial, PrivateKeyJwk, PublicKeyJwk, Jwk } from './types/jose
43
47
  export { Message } from './core/message.js';
44
48
  export { MessagesRead } from './interfaces/messages-read.js';
45
49
  export type { MessagesReadOptions } from './interfaces/messages-read.js';
46
- export { MessagesSync } from './interfaces/messages-sync.js';
47
- export type { MessagesSyncOptions } from './interfaces/messages-sync.js';
50
+ export { MessagesQuery } from './interfaces/messages-query.js';
51
+ export type { MessagesQueryOptions } from './interfaces/messages-query.js';
48
52
  export type { UnionMessageReply } from './core/message-reply.js';
49
- export type { MessageStore, MessageStoreOptions } from './types/message-store.js';
53
+ export type { MessageStore, MessageStoreOptions, MessageStorePutResult } from './types/message-store.js';
54
+ export { Replication } from './utils/replication.js';
50
55
  export type { MessageInterface } from './types/message-interface.js';
51
56
  export { PermissionGrant } from './protocols/permission-grant.js';
52
57
  export { PermissionRequest } from './protocols/permission-request.js';
@@ -90,17 +95,10 @@ export { MessageStoreLevel } from './store/message-store-level.js';
90
95
  export type { MessageStoreLevelConfig } from './store/message-store-level.js';
91
96
  export { ResumableTaskStoreLevel } from './store/resumable-task-store-level.js';
92
97
  export type { ResumableTaskStoreLevelConfig } from './store/resumable-task-store-level.js';
93
- export { EventEmitterEventLog } from './event-stream/event-emitter-event-log.js';
94
- export type { EventEmitterEventLogConfig } from './event-stream/event-emitter-event-log.js';
95
- export type { StateIndex } from './types/state-index.js';
96
- export { StateIndexLevel } from './state-index/state-index-level.js';
97
- export type { StateIndexLevelConfig } from './state-index/state-index-level.js';
98
- export { SparseMerkleTree } from './smt/sparse-merkle-tree.js';
99
- export { SMTStoreLevel } from './smt/smt-store-level.js';
100
- export { SMTStoreMemory } from './smt/smt-store-memory.js';
101
- export type { Hash, SMTNode, SMTInternalNode, SMTLeafNode, SMTProof, SMTDiffResult, SMTNodeStore } from './types/smt-types.js';
102
- export { hashChildren, hashEquals, hashKey, hashLeaf, hashToHex, hexToHash, getBit, initDefaultHashes, getDefaultHashes, SMT_DEPTH, ZERO_HASH } from './smt/smt-utils.js';
103
- export type { GenerateFromRecordsWriteInput, GenerateFromRecordsWriteOut, GenerateGrantCreateInput, GenerateGrantCreateOutput, GenerateMessagesReadInput, GenerateMessagesReadOutput, GenerateMessagesSubscribeInput, GenerateMessagesSubscribeOutput, GenerateProtocolsConfigureInput, GenerateProtocolsConfigureOutput, GenerateProtocolsQueryInput, GenerateProtocolsQueryOutput, GenerateRecordsCountInput, GenerateRecordsCountOutput, GenerateRecordsDeleteInput, GenerateRecordsDeleteOutput, GenerateRecordsQueryInput, GenerateRecordsQueryOutput, GenerateRecordsSubscribeInput, GenerateRecordsSubscribeOutput, GenerateRecordsWriteInput, GenerateRecordsWriteOutput, Persona } from '../tests/utils/test-data-generator.js';
98
+ export { EventEmitterWakePublisher } from './event-stream/event-emitter-wake-publisher.js';
99
+ export { DurableEventLog } from './event-stream/durable-event-log.js';
100
+ export type { DurableEventLogConfig, DurableEventLogStore } from './event-stream/durable-event-log.js';
101
+ export type { GenerateFromRecordsWriteInput, GenerateFromRecordsWriteOut, GenerateGrantCreateInput, GenerateGrantCreateOutput, GenerateMessagesQueryInput, GenerateMessagesQueryOutput, GenerateMessagesReadInput, GenerateMessagesReadOutput, GenerateMessagesSubscribeInput, GenerateMessagesSubscribeOutput, GenerateProtocolsConfigureInput, GenerateProtocolsConfigureOutput, GenerateProtocolsQueryInput, GenerateProtocolsQueryOutput, GenerateRecordsCountInput, GenerateRecordsCountOutput, GenerateRecordsDeleteInput, GenerateRecordsDeleteOutput, GenerateRecordsQueryInput, GenerateRecordsQueryOutput, GenerateRecordsSubscribeInput, GenerateRecordsSubscribeOutput, GenerateRecordsWriteInput, GenerateRecordsWriteOutput, Persona } from '../tests/utils/test-data-generator.js';
104
102
  export { TestDataGenerator } from '../tests/utils/test-data-generator.js';
105
103
  export { Poller } from '../tests/utils/poller.js';
106
104
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACpW,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,iCAAiC,EAAE,cAAc,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACxP,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjJ,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,+BAA+B,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnX,YAAY,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,gBAAgB,EAA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AAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,YAAY,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAGvG,YAAY,EAAE,6BAA6B,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,+BAA+B,EAAE,+BAA+B,EAAE,gCAAgC,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAClwB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { MessageSigner } from '../types/signer.js';
2
+ import type { ProgressToken } from '../types/subscriptions.js';
3
+ import type { MessagesFilter, MessagesQueryMessage } from '../types/messages-types.js';
4
+ import { AbstractMessage } from '../core/abstract-message.js';
5
+ export type MessagesQueryOptions = {
6
+ signer: MessageSigner;
7
+ messageTimestamp?: string;
8
+ filters?: MessagesFilter[];
9
+ permissionGrantIds?: string[];
10
+ cursor?: ProgressToken;
11
+ limit?: number;
12
+ cidsOnly?: boolean;
13
+ };
14
+ export declare class MessagesQuery extends AbstractMessage<MessagesQueryMessage> {
15
+ static parse(message: MessagesQueryMessage): Promise<MessagesQuery>;
16
+ /**
17
+ * Creates a MessagesQuery message.
18
+ *
19
+ * @throws {DwnError} if json schema validation fails.
20
+ */
21
+ static create(options: MessagesQueryOptions): Promise<MessagesQuery>;
22
+ }
23
+ //# sourceMappingURL=messages-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages-query.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/messages-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAA2B,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEhH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAO9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,qBAAa,aAAc,SAAQ,eAAe,CAAC,oBAAoB,CAAC;WAClD,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IAchF;;;;OAIG;WACiB,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;CA4BlF"}
@@ -1,6 +1,6 @@
1
1
  import type { DataEncodedRecordsWriteMessage } from '../types/records-types.js';
2
2
  import type { MessageSigner } from '../types/signer.js';
3
- import type { MessageStore } from '../types/message-store.js';
3
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
4
4
  import type { ProtocolDefinition, ProtocolsConfigureMessage } from '../types/protocols-types.js';
5
5
  import { AbstractMessage } from '../core/abstract-message.js';
6
6
  export type ProtocolsConfigureOptions = {
@@ -18,9 +18,9 @@ export declare class ProtocolsConfigure extends AbstractMessage<ProtocolsConfigu
18
18
  static create(options: ProtocolsConfigureOptions): Promise<ProtocolsConfigure>;
19
19
  /**
20
20
  * Authorizes the author-delegate who signed this message.
21
- * @param messageStore Used to check if the grant has been revoked.
21
+ * @param validationStateReader Used to check if the grant has been revoked.
22
22
  */
23
- authorizeAuthorDelegate(messageStore: MessageStore): Promise<void>;
23
+ authorizeAuthorDelegate(validationStateReader: ValidationStateReader): Promise<void>;
24
24
  /**
25
25
  * Performs validation on the given protocol definition that are not easy to do using a JSON schema.
26
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"protocols-configure.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/protocols-configure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACU,kBAAkB,EACtC,yBAAyB,EAC1B,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAY9D,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,qBAAa,kBAAmB,SAAQ,eAAe,CAAC,yBAAyB,CAAC;WAC5D,KAAK,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CA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B,SAAQ,eAAe,CAAC,yBAAyB,CAAC;WAC5D,KAAK,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC;WAStE,MAAM,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA4B3F;;;OAGG;IACU,uBAAuB,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAWjG;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAuBzC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IA+B3B,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAoBhC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAiC3C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAgSzC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAgC9B;;;;;;;OAOG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IA+BzC,OAAO,CAAC,MAAM,CAAC,mBAAmB;CAmCnC"}
@@ -1,5 +1,5 @@
1
1
  import type { MessageSigner } from '../types/signer.js';
2
- import type { MessageStore } from '../types/message-store.js';
2
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
3
3
  import type { ProtocolsQueryFilter, ProtocolsQueryMessage } from '../types/protocols-types.js';
4
4
  import { AbstractMessage } from '../core/abstract-message.js';
5
5
  export type ProtocolsQueryOptions = {
@@ -12,6 +12,6 @@ export declare class ProtocolsQuery extends AbstractMessage<ProtocolsQueryMessag
12
12
  static parse(message: ProtocolsQueryMessage): Promise<ProtocolsQuery>;
13
13
  static create(options: ProtocolsQueryOptions): Promise<ProtocolsQuery>;
14
14
  static normalizeFilter(filter: ProtocolsQueryFilter): ProtocolsQueryFilter;
15
- authorize(tenant: string, messageStore: MessageStore): Promise<void>;
15
+ authorize(tenant: string, validationStateReader: ValidationStateReader): Promise<void>;
16
16
  }
17
17
  //# sourceMappingURL=protocols-query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocols-query.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/protocols-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAA4B,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAU9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,qBAAa,cAAe,SAAQ,eAAe,CAAC,qBAAqB,CAAC;WAEpD,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;WAa9D,MAAM,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;IAmCnF,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB;IAO7D,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBlF"}
1
+ {"version":3,"file":"protocols-query.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/protocols-query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAA4B,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAS9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,qBAAa,cAAe,SAAQ,eAAe,CAAC,qBAAqB,CAAC;WAEpD,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;WAa9D,MAAM,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC;IAmCnF,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB;IAO7D,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBpG"}
@@ -1,5 +1,5 @@
1
1
  import type { MessageSigner } from '../types/signer.js';
2
- import type { MessageStore } from '../types/message-store.js';
2
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
3
3
  import type { DataEncodedRecordsWriteMessage, RecordsCountMessage, RecordsFilter } from '../types/records-types.js';
4
4
  import { AbstractMessage } from '../core/abstract-message.js';
5
5
  export type RecordsCountOptions = {
@@ -21,8 +21,8 @@ export declare class RecordsCount extends AbstractMessage<RecordsCountMessage> {
21
21
  static create(options: RecordsCountOptions): Promise<RecordsCount>;
22
22
  /**
23
23
  * Authorizes the delegate who signed the message.
24
- * @param messageStore Used to check if the grant has been revoked.
24
+ * @param validationStateReader Used to check if the grant has been revoked.
25
25
  */
26
- authorizeDelegate(messageStore: MessageStore): Promise<void>;
26
+ authorizeDelegate(validationStateReader: ValidationStateReader): Promise<void>;
27
27
  }
28
28
  //# sourceMappingURL=records-count.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-count.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-count.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AAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe,CAAC,mBAAmB,CAAC;WAEhD,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;WAkC1D,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IAoC/E;;;OAGG;IACU,iBAAiB,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAU5F"}
@@ -1,6 +1,6 @@
1
1
  import type { KeyValues } from '../types/query-types.js';
2
2
  import type { MessageSigner } from '../types/signer.js';
3
- import type { MessageStore } from '../types//message-store.js';
3
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
4
4
  import type { DataEncodedRecordsWriteMessage, RecordsDeleteMessage, RecordsWriteMessage } from '../types/records-types.js';
5
5
  import { AbstractMessage } from '../core/abstract-message.js';
6
6
  export type RecordsDeleteOptions = {
@@ -31,8 +31,16 @@ export declare class RecordsDelete extends AbstractMessage<RecordsDeleteMessage>
31
31
  static create(options: RecordsDeleteOptions): Promise<RecordsDelete>;
32
32
  /**
33
33
  * Indexed properties needed for MessageStore indexing.
34
+ *
35
+ * Immutable record facts (`protocol`, `protocolPath`, `recipient`, `schema`, `parentId`,
36
+ * `dateCreated`, `contextId`) come from the initial `RecordsWrite`. Mutable query-visibility
37
+ * facts (flattened `tag.*`, `published`, and `datePublished`) come from the newest retained
38
+ * `RecordsWrite` that existed immediately before this delete, because tombstone visibility must
39
+ * reflect the record state being deleted: without them, tombstones of tagged records never match
40
+ * tag filters (e.g. the permission shadow filters on `tag.protocol`) and tombstones of published
41
+ * records never match `published: true` or `datePublished` queries and subscriptions.
34
42
  */
35
- constructIndexes(initialWrite: RecordsWriteMessage): KeyValues;
36
- authorizeDelegate(recordsWriteToDelete: RecordsWriteMessage, messageStore: MessageStore): Promise<void>;
43
+ constructIndexes(initialWrite: RecordsWriteMessage, visibilitySourceWrite: RecordsWriteMessage): KeyValues;
44
+ authorizeDelegate(recordsWriteToDelete: RecordsWriteMessage, validationStateReader: ValidationStateReader): Promise<void>;
37
45
  }
38
46
  //# sourceMappingURL=records-delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-delete.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,8BAA8B,EAA2B,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEpJ,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAS9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF,qBAAa,aAAc,SAAQ,eAAe,CAAC,oBAAoB,CAAC;WAElD,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IAchF;;;;OAIG;WACiB,M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AAmB,EACjC,qBAAqB,EAAE,mBAAmB,GACzC,SAAS;IAkCC,iBAAiB,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAWvI"}
@@ -1,6 +1,6 @@
1
1
  import type { MessageSigner } from '../types/signer.js';
2
- import type { MessageStore } from '../types//message-store.js';
3
2
  import type { Pagination } from '../types/message-types.js';
3
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
4
4
  import type { DataEncodedRecordsWriteMessage, RecordsFilter, RecordsQueryMessage } from '../types/records-types.js';
5
5
  import { AbstractMessage } from '../core/abstract-message.js';
6
6
  import { DateSort } from '../types/records-types.js';
@@ -25,8 +25,8 @@ export declare class RecordsQuery extends AbstractMessage<RecordsQueryMessage> {
25
25
  static create(options: RecordsQueryOptions): Promise<RecordsQuery>;
26
26
  /**
27
27
  * Authorizes the delegate who signed this message.
28
- * @param messageStore Used to check if the grant has been revoked.
28
+ * @param validationStateReader Used to check if the grant has been revoked.
29
29
  */
30
- authorizeDelegate(messageStore: MessageStore): Promise<void>;
30
+ authorizeDelegate(validationStateReader: ValidationStateReader): Promise<void>;
31
31
  }
32
32
  //# sourceMappingURL=records-query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-query.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-query.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,8BAA8B,EAAE,aAAa,EAA0B,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAE5I,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAW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AC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,SAAQ,eAAe,CAAC,mBAAmB,CAAC;WAEhD,KAAK,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;WA4C1D,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC;IA+C/E;;;OAGG;IACU,iBAAiB,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAU5F"}
@@ -1,5 +1,5 @@
1
1
  import type { MessageSigner } from '../types/signer.js';
2
- import type { MessageStore } from '../types//message-store.js';
2
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
3
3
  import type { DataEncodedRecordsWriteMessage, RecordsFilter, RecordsReadMessage, RecordsWriteMessage } from '../types/records-types.js';
4
4
  import { AbstractMessage } from '../core/abstract-message.js';
5
5
  import { DateSort } from '../types/records-types.js';
@@ -31,8 +31,8 @@ export declare class RecordsRead extends AbstractMessage<RecordsReadMessage> {
31
31
  static create(options: RecordsReadOptions): Promise<RecordsRead>;
32
32
  /**
33
33
  * Authorizes the delegate who signed this message.
34
- * @param messageStore Used to check if the grant has been revoked.
34
+ * @param validationStateReader Used to check if the grant has been revoked.
35
35
  */
36
- authorizeDelegate(matchedRecordsWrite: RecordsWriteMessage, messageStore: MessageStore): Promise<void>;
36
+ authorizeDelegate(matchedRecordsWrite: RecordsWriteMessage, validationStateReader: ValidationStateReader): Promise<void>;
37
37
  }
38
38
  //# sourceMappingURL=records-read.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-read.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-read.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,8BAA8B,EAAE,aAAa,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhK,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAUrD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF,qBAAa,WAAY,SAAQ,eAAe,CAAC,kBAAkB,CAAC;WAE9C,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5E;;;;;;OAMG;WACiB,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IA6C7E;;;OAGG;IACU,iBAAiB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAWpH"}
1
+ {"version":3,"file":"records-read.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-read.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,8BAA8B,EAAE,aAAa,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhK,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAUrD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,aAAa,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF,qBAAa,WAAY,SAAQ,eAAe,CAAC,kBAAkB,CAAC;WAE9C,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IAuB5E;;;;;;OAMG;WACiB,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC;IA6C7E;;;OAGG;IACU,iBAAiB,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAWtI"}
@@ -1,7 +1,7 @@
1
1
  import type { MessageSigner } from '../types/signer.js';
2
- import type { MessageStore } from '../types/message-store.js';
3
2
  import type { Pagination } from '../types/message-types.js';
4
3
  import type { ProgressToken } from '../types/subscriptions.js';
4
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
5
5
  import type { DataEncodedRecordsWriteMessage, DateSort, RecordsFilter, RecordsSubscribeMessage } from '../types/records-types.js';
6
6
  import { AbstractMessage } from '../core/abstract-message.js';
7
7
  export type RecordsSubscribeOptions = {
@@ -30,8 +30,8 @@ export declare class RecordsSubscribe extends AbstractMessage<RecordsSubscribeMe
30
30
  static create(options: RecordsSubscribeOptions): Promise<RecordsSubscribe>;
31
31
  /**
32
32
  * Authorizes the delegate who signed the message.
33
- * @param messageStore Used to check if the grant has been revoked.
33
+ * @param validationStateReader Used to check if the grant has been revoked.
34
34
  */
35
- authorizeDelegate(messageStore: MessageStore): Promise<void>;
35
+ authorizeDelegate(validationStateReader: ValidationStateReader): Promise<void>;
36
36
  }
37
37
  //# sourceMappingURL=records-subscribe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-subscribe.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,8BAA8B,EAAE,QAAQ,EAAE,aAAa,EAA8B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAE9J,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAW9D,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;IAEvB;;OAEG;IACH,cAAc,CAAC,EAAE,8BAA8B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,eAAe,CAAC,uBAAuB,CAAC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AAC,gBAAgB,CAAC;WAgClE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAuCvF;;;KAGC;IACY,iBAAiB,CAAC,qBAAqB,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAU5F"}
@@ -4,6 +4,7 @@ import type { MessageInterface } from '../types/message-interface.js';
4
4
  import type { MessageSigner } from '../types/signer.js';
5
5
  import type { MessageStore } from '../types/message-store.js';
6
6
  import type { PublicKeyJwk } from '../types/jose-types.js';
7
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
7
8
  import type { DataEncodedRecordsWriteMessage, InternalRecordsWriteMessage, RecordsWriteDescriptor, RecordsWriteMessage, RecordsWriteSignaturePayload, RecordsWriteTags } from '../types/records-types.js';
8
9
  import type { EncryptionInput, JweEncryption } from '../utils/encryption.js';
9
10
  import type { GenericMessage, GenericSignaturePayload } from '../types/message-types.js';
@@ -164,6 +165,15 @@ export declare class RecordsWrite implements MessageInterface<RecordsWriteMessag
164
165
  * - will be set to current time (because this is a toggle from unpublished to published)
165
166
  */
166
167
  static createFrom(options: CreateFromOptions): Promise<RecordsWrite>;
168
+ /**
169
+ * Validates the expected `dataCid` and `dataSize` in the descriptor against the actual data.
170
+ *
171
+ * @throws {DwnError} with `DwnErrorCode.RecordsWriteDataCidMismatch`
172
+ * if the actual data CID does not match `dataCid` in the descriptor.
173
+ * @throws {DwnError} with `DwnErrorCode.RecordsWriteDataSizeMismatch`
174
+ * if the actual byte size does not match `dataSize` in the descriptor.
175
+ */
176
+ static validateDataIntegrity(expectedDataCid: string, expectedDataSize: number, actualDataCid: string, actualDataSize: number): void;
167
177
  /**
168
178
  * Called by `JSON.stringify(...)` automatically.
169
179
  */
@@ -173,9 +183,7 @@ export declare class RecordsWrite implements MessageInterface<RecordsWriteMessag
173
183
  *
174
184
  * @param options.append - When `true`, appends new `recipients` entries to the existing
175
185
  * `encryption` property instead of replacing it. Requires `this._message.encryption` to
176
- * already exist (i.e., the record must already be encrypted). This is used for the reactive
177
- * root-record upgrade: adding a ProtocolContext recipient entry alongside an existing
178
- * ProtocolPath entry so both the owner and context key holders can decrypt.
186
+ * already exist (i.e., the record must already be encrypted).
179
187
  */
180
188
  encryptSymmetricEncryptionKey(encryptionInput: EncryptionInput, options?: {
181
189
  append?: boolean;
@@ -225,14 +233,14 @@ export declare class RecordsWrite implements MessageInterface<RecordsWriteMessag
225
233
  constructIndexes(isLatestBaseState: boolean): Promise<KeyValues>;
226
234
  /**
227
235
  * Authorizes the author-delegate who signed this message.
228
- * @param messageStore Used to check if the grant has been revoked.
236
+ * @param validationStateReader Used to check if the grant has been revoked.
229
237
  */
230
- authorizeAuthorDelegate(messageStore: MessageStore): Promise<void>;
238
+ authorizeAuthorDelegate(validationStateReader: ValidationStateReader): Promise<void>;
231
239
  /**
232
240
  * Authorizes the owner-delegate who signed this message.
233
- * @param messageStore Used to check if the grant has been revoked.
241
+ * @param validationStateReader Used to check if the grant has been revoked.
234
242
  */
235
- authorizeOwnerDelegate(messageStore: MessageStore): Promise<void>;
243
+ authorizeOwnerDelegate(validationStateReader: ValidationStateReader): Promise<void>;
236
244
  /**
237
245
  * Checks if the given message is the initial entry of a record.
238
246
  */
@@ -1 +1 @@
1
- {"version":3,"file":"records-write.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/records-write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EACV,8BAA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KACtB,GAAG,OAAO,CAAC,UAAU,CAAC;IAIvB,iEAAiE;WAC7C,eAAe,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI7F,qFAAqF;WACvE,mCAAmC,CAC/C,oBAAoB,EAAE,mBAAmB,EAAE,UAAU,EAAE,mBAAmB,GACzE,OAAO;IAIV,8DAA8D;WAChD,YAAY,CAAC,OAAO,EAAE,2BAA2B,GAAG,MAAM,EAAE;IAI1E,yEAAyE;WACrD,uBAAuB,CACzC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAC3D,OAAO,CAAC,mBAAmB,CAAC;IAI/B,0EAA0E;WACtD,wBAAwB,CAC1C,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAC3D,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAIpC,iFAAiF;WAC7D,+BAA+B,CACjD,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAC3D,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;CAG5C"}
@@ -1,8 +1,8 @@
1
1
  import type { Filter } from '../types/query-types.js';
2
2
  import type { MessagesFilter } from '../types/messages-types.js';
3
3
  import type { MessageSigner } from '../types/signer.js';
4
- import type { MessageStore } from '../types/message-store.js';
5
4
  import type { ProtocolDefinition } from '../types/protocols-types.js';
5
+ import type { ValidationStateReader } from '../types/validation-state-reader.js';
6
6
  import type { CoreProtocol, CoreProtocolStores } from '../core/core-protocol.js';
7
7
  import type { DataEncodedRecordsWriteMessage, RecordsWriteMessage } from '../types/records-types.js';
8
8
  import type { PermissionConditions, PermissionGrantData, PermissionRequestData, PermissionRevocationData, PermissionScope } from '../types/permission-types.js';
@@ -81,6 +81,10 @@ export declare class PermissionsProtocol implements CoreProtocol {
81
81
  * The protocol path of the `revocation` record.
82
82
  */
83
83
  static readonly revocationPath = "grant/revocation";
84
+ /**
85
+ * Canonical store predicate for the latest revocation of a permission grant.
86
+ */
87
+ static grantRevocationFilter(grantId: string): Filter;
84
88
  /**
85
89
  * The definition of the Permissions protocol.
86
90
  */
@@ -95,7 +99,7 @@ export declare class PermissionsProtocol implements CoreProtocol {
95
99
  * Pre-processing hook for permission revocation records.
96
100
  * Validates that the revocation's `tags.protocol` matches the grant's scoped protocol.
97
101
  */
98
- preProcessWrite(tenant: string, message: RecordsWriteMessage, messageStore: MessageStore): Promise<void>;
102
+ preProcessWrite(tenant: string, message: RecordsWriteMessage, validationStateReader: ValidationStateReader): Promise<void>;
99
103
  /**
100
104
  * Post-processing hook for permission revocation records.
101
105
  * When a grant is revoked, all messages authorized by that grant and created
@@ -103,8 +107,7 @@ export declare class PermissionsProtocol implements CoreProtocol {
103
107
  *
104
108
  * Deletion order is deliberate to avoid orphaned data in case of crash:
105
109
  * 1. data store (large blobs first)
106
- * 2. state index (SMT entries)
107
- * 3. message store
110
+ * 2. message store
108
111
  */
109
112
  postProcessWrite(tenant: string, recordsWrite: RecordsWrite, stores: CoreProtocolStores): Promise<void>;
110
113
  /** @inheritdoc */
@@ -147,19 +150,13 @@ export declare class PermissionsProtocol implements CoreProtocol {
147
150
  * Validates the given Permissions protocol RecordsWrite. It can be a request, grant, or revocation.
148
151
  */
149
152
  static validateSchema(recordsWriteMessage: RecordsWriteMessage, dataBytes: Uint8Array): void;
150
- /**
151
- * Fetches PermissionGrant with the specified `recordID`.
152
- * @returns the PermissionGrant matching the `recordId` specified.
153
- * @throws {Error} if PermissionGrant does not exist
154
- */
155
- static fetchGrant(tenant: string, messageStore: MessageStore, permissionGrantId: string): Promise<PermissionGrant>;
156
153
  /**
157
154
  * Gets the scope from the given permission record.
158
155
  * If the record is a revocation, the scope is fetched from the grant that is being revoked.
159
156
  *
160
- * @param messageStore The message store to fetch the grant for a revocation.
157
+ * @param validationStateReader Used to fetch the grant for a revocation.
161
158
  */
162
- static getScopeFromPermissionRecord(tenant: string, messageStore: MessageStore, incomingMessage: DataEncodedRecordsWriteMessage): Promise<PermissionScope>;
159
+ static getScopeFromPermissionRecord(tenant: string, validationStateReader: ValidationStateReader, incomingMessage: DataEncodedRecordsWriteMessage): Promise<PermissionScope>;
163
160
  /**
164
161
  * Normalizes the given permission scope if needed.
165
162
  * @returns The normalized permission scope.