@enbox/dwn-sdk-js 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (522) hide show
  1. package/README.md +4 -4
  2. package/dist/browser.mjs +3 -10
  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 +34 -89
  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 +12 -9
  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/protocol-tags.js +262 -0
  99. package/dist/esm/src/utils/protocol-tags.js.map +1 -0
  100. package/dist/esm/src/utils/record-limit-occupancy.js +244 -0
  101. package/dist/esm/src/utils/record-limit-occupancy.js.map +1 -0
  102. package/dist/esm/src/utils/records.js +50 -14
  103. package/dist/esm/src/utils/records.js.map +1 -1
  104. package/dist/esm/src/utils/replication.js +85 -0
  105. package/dist/esm/src/utils/replication.js.map +1 -0
  106. package/dist/esm/tests/core/grant-authorization.spec.js +4 -4
  107. package/dist/esm/tests/core/grant-authorization.spec.js.map +1 -1
  108. package/dist/esm/tests/core/process-message-parity.spec.js +222 -0
  109. package/dist/esm/tests/core/process-message-parity.spec.js.map +1 -0
  110. package/dist/esm/tests/core/protocol-authorization.spec.js +5 -2
  111. package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
  112. package/dist/esm/tests/core/records-grant-authorization.spec.js +5 -5
  113. package/dist/esm/tests/core/records-grant-authorization.spec.js.map +1 -1
  114. package/dist/esm/tests/core/replication-apply.spec.js +55 -1
  115. package/dist/esm/tests/core/replication-apply.spec.js.map +1 -1
  116. package/dist/esm/tests/core/replication-replay-property.spec.js +350 -0
  117. package/dist/esm/tests/core/replication-replay-property.spec.js.map +1 -0
  118. package/dist/esm/tests/core/validation-read-closure.spec.js +469 -0
  119. package/dist/esm/tests/core/validation-read-closure.spec.js.map +1 -0
  120. package/dist/esm/tests/core/validation-state-reader.spec.js +716 -0
  121. package/dist/esm/tests/core/validation-state-reader.spec.js.map +1 -0
  122. package/dist/esm/tests/durable-event-log.spec.js +373 -0
  123. package/dist/esm/tests/durable-event-log.spec.js.map +1 -0
  124. package/dist/esm/tests/dwn.spec.js +504 -35
  125. package/dist/esm/tests/dwn.spec.js.map +1 -1
  126. package/dist/esm/tests/features/author-delegated-grant.spec.js +9 -6
  127. package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
  128. package/dist/esm/tests/features/owner-delegated-grant.spec.js +1 -4
  129. package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
  130. package/dist/esm/tests/features/owner-signature.spec.js +1 -4
  131. package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
  132. package/dist/esm/tests/features/permissions.spec.js +165 -4
  133. package/dist/esm/tests/features/permissions.spec.js.map +1 -1
  134. package/dist/esm/tests/features/protocol-composition.spec.js +8 -11
  135. package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
  136. package/dist/esm/tests/features/protocol-create-action.spec.js +1 -4
  137. package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
  138. package/dist/esm/tests/features/protocol-delete-action.spec.js +3 -5
  139. package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
  140. package/dist/esm/tests/features/protocol-update-action.spec.js +3 -6
  141. package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
  142. package/dist/esm/tests/features/records-delivery.spec.js +1 -4
  143. package/dist/esm/tests/features/records-delivery.spec.js.map +1 -1
  144. package/dist/esm/tests/features/records-immutable.spec.js +1 -4
  145. package/dist/esm/tests/features/records-immutable.spec.js.map +1 -1
  146. package/dist/esm/tests/features/records-nested-query-scope.spec.js +281 -0
  147. package/dist/esm/tests/features/records-nested-query-scope.spec.js.map +1 -0
  148. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js +3 -7
  149. package/dist/esm/tests/features/records-prune-cross-protocol.spec.js.map +1 -1
  150. package/dist/esm/tests/features/records-prune.spec.js +11 -22
  151. package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
  152. package/dist/esm/tests/features/records-record-limit.spec.js +441 -231
  153. package/dist/esm/tests/features/records-record-limit.spec.js.map +1 -1
  154. package/dist/esm/tests/features/records-squash.spec.js +6 -4
  155. package/dist/esm/tests/features/records-squash.spec.js.map +1 -1
  156. package/dist/esm/tests/features/records-tags.spec.js +1 -4
  157. package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
  158. package/dist/esm/tests/features/resumable-tasks.spec.js +3 -5
  159. package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
  160. package/dist/esm/tests/fuzz/message-store.fuzz.spec.js +1 -2
  161. package/dist/esm/tests/fuzz/message-store.fuzz.spec.js.map +1 -1
  162. package/dist/esm/tests/fuzz/process-message.fuzz.spec.js +2 -4
  163. package/dist/esm/tests/fuzz/process-message.fuzz.spec.js.map +1 -1
  164. package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js +1 -1
  165. package/dist/esm/tests/fuzz/schema-validation.fuzz.spec.js.map +1 -1
  166. package/dist/esm/tests/handlers/messages-query.spec.js +246 -0
  167. package/dist/esm/tests/handlers/messages-query.spec.js.map +1 -0
  168. package/dist/esm/tests/handlers/messages-read.spec.js +2 -5
  169. package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
  170. package/dist/esm/tests/handlers/messages-subscribe.spec.js +3 -14
  171. package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
  172. package/dist/esm/tests/handlers/protocols-configure.spec.js +27 -26
  173. package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
  174. package/dist/esm/tests/handlers/protocols-query.spec.js +1 -4
  175. package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
  176. package/dist/esm/tests/handlers/records-count.spec.js +1 -4
  177. package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
  178. package/dist/esm/tests/handlers/records-delete.spec.js +312 -30
  179. package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
  180. package/dist/esm/tests/handlers/records-query.spec.js +32 -9
  181. package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
  182. package/dist/esm/tests/handlers/records-read.spec.js +4 -4
  183. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  184. package/dist/esm/tests/handlers/records-subscribe.spec.js +33 -14
  185. package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
  186. package/dist/esm/tests/handlers/records-write.spec.js +82 -36
  187. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  188. package/dist/esm/tests/interfaces/records-delete.spec.js +69 -2
  189. package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
  190. package/dist/esm/tests/interfaces/records-write.spec.js +4 -3
  191. package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
  192. package/dist/esm/tests/protocols/permissions.spec.js +55 -6
  193. package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
  194. package/dist/esm/tests/scenarios/aggregator.spec.js +1 -4
  195. package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
  196. package/dist/esm/tests/scenarios/deleted-record.spec.js +1 -4
  197. package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
  198. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +1 -4
  199. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
  200. package/dist/esm/tests/scenarios/nested-roles.spec.js +1 -4
  201. package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
  202. package/dist/esm/tests/scenarios/subscriptions.spec.js +1 -4
  203. package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
  204. package/dist/esm/tests/store/message-store-level.spec.js +361 -5
  205. package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
  206. package/dist/esm/tests/store/message-store.spec.js +60 -0
  207. package/dist/esm/tests/store/message-store.spec.js.map +1 -1
  208. package/dist/esm/tests/test-event-stream.js +7 -3
  209. package/dist/esm/tests/test-event-stream.js.map +1 -1
  210. package/dist/esm/tests/test-stores.js +19 -9
  211. package/dist/esm/tests/test-stores.js.map +1 -1
  212. package/dist/esm/tests/test-suite.js +4 -2
  213. package/dist/esm/tests/test-suite.js.map +1 -1
  214. package/dist/esm/tests/utils/protocol-tags.spec.js +96 -0
  215. package/dist/esm/tests/utils/protocol-tags.spec.js.map +1 -0
  216. package/dist/esm/tests/utils/test-data-generator.js +25 -0
  217. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  218. package/dist/esm/tests/utils/test-stub-generator.js.map +1 -1
  219. package/dist/esm/tests/utils/test-validation-state-reader.js +16 -0
  220. package/dist/esm/tests/utils/test-validation-state-reader.js.map +1 -0
  221. package/dist/types/generated/precompiled-validators.d.ts +6 -6
  222. package/dist/types/generated/precompiled-validators.d.ts.map +1 -1
  223. package/dist/types/src/core/core-protocol.d.ts +3 -3
  224. package/dist/types/src/core/core-protocol.d.ts.map +1 -1
  225. package/dist/types/src/core/dwn-constant.d.ts +5 -0
  226. package/dist/types/src/core/dwn-constant.d.ts.map +1 -1
  227. package/dist/types/src/core/dwn-error.d.ts +12 -4
  228. package/dist/types/src/core/dwn-error.d.ts.map +1 -1
  229. package/dist/types/src/core/grant-authorization.d.ts +5 -5
  230. package/dist/types/src/core/grant-authorization.d.ts.map +1 -1
  231. package/dist/types/src/core/message-reply.d.ts +5 -4
  232. package/dist/types/src/core/message-reply.d.ts.map +1 -1
  233. package/dist/types/src/core/messages-grant-authorization.d.ts +12 -14
  234. package/dist/types/src/core/messages-grant-authorization.d.ts.map +1 -1
  235. package/dist/types/src/core/protocol-authorization-action.d.ts +4 -5
  236. package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -1
  237. package/dist/types/src/core/protocol-authorization-validation.d.ts +14 -17
  238. package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -1
  239. package/dist/types/src/core/protocol-authorization.d.ts +8 -33
  240. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  241. package/dist/types/src/core/protocols-grant-authorization.d.ts +4 -4
  242. package/dist/types/src/core/protocols-grant-authorization.d.ts.map +1 -1
  243. package/dist/types/src/core/recording-validation-state-reader.d.ts +75 -0
  244. package/dist/types/src/core/recording-validation-state-reader.d.ts.map +1 -0
  245. package/dist/types/src/core/records-grant-authorization.d.ts +8 -8
  246. package/dist/types/src/core/records-grant-authorization.d.ts.map +1 -1
  247. package/dist/types/src/core/replication-apply.d.ts +36 -0
  248. package/dist/types/src/core/replication-apply.d.ts.map +1 -1
  249. package/dist/types/src/core/resumable-task-manager.d.ts +1 -1
  250. package/dist/types/src/core/resumable-task-manager.d.ts.map +1 -1
  251. package/dist/types/src/core/validation-state-reader.d.ts +79 -0
  252. package/dist/types/src/core/validation-state-reader.d.ts.map +1 -0
  253. package/dist/types/src/dwn.d.ts +33 -20
  254. package/dist/types/src/dwn.d.ts.map +1 -1
  255. package/dist/types/src/enums/dwn-interface-method.d.ts +0 -1
  256. package/dist/types/src/enums/dwn-interface-method.d.ts.map +1 -1
  257. package/dist/types/src/event-stream/durable-event-log.d.ts +69 -0
  258. package/dist/types/src/event-stream/durable-event-log.d.ts.map +1 -0
  259. package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts +13 -0
  260. package/dist/types/src/event-stream/event-emitter-wake-publisher.d.ts.map +1 -0
  261. package/dist/types/src/handlers/messages-query.d.ts +20 -0
  262. package/dist/types/src/handlers/messages-query.d.ts.map +1 -0
  263. package/dist/types/src/handlers/messages-read.d.ts +1 -1
  264. package/dist/types/src/handlers/messages-read.d.ts.map +1 -1
  265. package/dist/types/src/handlers/messages-subscribe.d.ts.map +1 -1
  266. package/dist/types/src/handlers/protocols-configure.d.ts +0 -5
  267. package/dist/types/src/handlers/protocols-configure.d.ts.map +1 -1
  268. package/dist/types/src/handlers/records-count.d.ts +2 -1
  269. package/dist/types/src/handlers/records-count.d.ts.map +1 -1
  270. package/dist/types/src/handlers/records-delete.d.ts +2 -2
  271. package/dist/types/src/handlers/records-delete.d.ts.map +1 -1
  272. package/dist/types/src/handlers/records-query.d.ts +1 -1
  273. package/dist/types/src/handlers/records-query.d.ts.map +1 -1
  274. package/dist/types/src/handlers/records-read.d.ts +2 -1
  275. package/dist/types/src/handlers/records-read.d.ts.map +1 -1
  276. package/dist/types/src/handlers/records-subscribe.d.ts +4 -5
  277. package/dist/types/src/handlers/records-subscribe.d.ts.map +1 -1
  278. package/dist/types/src/handlers/records-write.d.ts +3 -11
  279. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  280. package/dist/types/src/index.d.ts +14 -16
  281. package/dist/types/src/index.d.ts.map +1 -1
  282. package/dist/types/src/interfaces/messages-query.d.ts +23 -0
  283. package/dist/types/src/interfaces/messages-query.d.ts.map +1 -0
  284. package/dist/types/src/interfaces/protocols-configure.d.ts +3 -3
  285. package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
  286. package/dist/types/src/interfaces/protocols-query.d.ts +2 -2
  287. package/dist/types/src/interfaces/protocols-query.d.ts.map +1 -1
  288. package/dist/types/src/interfaces/records-count.d.ts +3 -3
  289. package/dist/types/src/interfaces/records-count.d.ts.map +1 -1
  290. package/dist/types/src/interfaces/records-delete.d.ts +11 -3
  291. package/dist/types/src/interfaces/records-delete.d.ts.map +1 -1
  292. package/dist/types/src/interfaces/records-query.d.ts +3 -3
  293. package/dist/types/src/interfaces/records-query.d.ts.map +1 -1
  294. package/dist/types/src/interfaces/records-read.d.ts +3 -3
  295. package/dist/types/src/interfaces/records-read.d.ts.map +1 -1
  296. package/dist/types/src/interfaces/records-subscribe.d.ts +3 -3
  297. package/dist/types/src/interfaces/records-subscribe.d.ts.map +1 -1
  298. package/dist/types/src/interfaces/records-write.d.ts +15 -7
  299. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  300. package/dist/types/src/protocols/permissions.d.ts +9 -12
  301. package/dist/types/src/protocols/permissions.d.ts.map +1 -1
  302. package/dist/types/src/store/index-level.d.ts +10 -1
  303. package/dist/types/src/store/index-level.d.ts.map +1 -1
  304. package/dist/types/src/store/level-wrapper.d.ts +5 -0
  305. package/dist/types/src/store/level-wrapper.d.ts.map +1 -1
  306. package/dist/types/src/store/message-store-level.d.ts +94 -14
  307. package/dist/types/src/store/message-store-level.d.ts.map +1 -1
  308. package/dist/types/src/store/storage-controller.d.ts +17 -14
  309. package/dist/types/src/store/storage-controller.d.ts.map +1 -1
  310. package/dist/types/src/types/message-store.d.ts +29 -1
  311. package/dist/types/src/types/message-store.d.ts.map +1 -1
  312. package/dist/types/src/types/message-types.d.ts +2 -0
  313. package/dist/types/src/types/message-types.d.ts.map +1 -1
  314. package/dist/types/src/types/messages-types.d.ts +21 -37
  315. package/dist/types/src/types/messages-types.d.ts.map +1 -1
  316. package/dist/types/src/types/method-handler.d.ts +2 -2
  317. package/dist/types/src/types/method-handler.d.ts.map +1 -1
  318. package/dist/types/src/types/permission-types.d.ts +1 -1
  319. package/dist/types/src/types/subscriptions.d.ts +50 -39
  320. package/dist/types/src/types/subscriptions.d.ts.map +1 -1
  321. package/dist/types/src/types/validation-state-reader.d.ts +116 -0
  322. package/dist/types/src/types/validation-state-reader.d.ts.map +1 -0
  323. package/dist/types/src/utils/messages.d.ts +10 -0
  324. package/dist/types/src/utils/messages.d.ts.map +1 -1
  325. package/dist/types/src/utils/protocol-tags.d.ts +15 -0
  326. package/dist/types/src/utils/protocol-tags.d.ts.map +1 -0
  327. package/dist/types/src/utils/record-limit-occupancy.d.ts +40 -0
  328. package/dist/types/src/utils/record-limit-occupancy.d.ts.map +1 -0
  329. package/dist/types/src/utils/records.d.ts +25 -3
  330. package/dist/types/src/utils/records.d.ts.map +1 -1
  331. package/dist/types/src/utils/replication.d.ts +22 -0
  332. package/dist/types/src/utils/replication.d.ts.map +1 -0
  333. package/dist/types/tests/core/process-message-parity.spec.d.ts +2 -0
  334. package/dist/types/tests/core/process-message-parity.spec.d.ts.map +1 -0
  335. package/dist/types/tests/core/replication-replay-property.spec.d.ts +2 -0
  336. package/dist/types/tests/core/replication-replay-property.spec.d.ts.map +1 -0
  337. package/dist/types/tests/core/validation-read-closure.spec.d.ts +2 -0
  338. package/dist/types/tests/core/validation-read-closure.spec.d.ts.map +1 -0
  339. package/dist/types/tests/core/validation-state-reader.spec.d.ts +2 -0
  340. package/dist/types/tests/core/validation-state-reader.spec.d.ts.map +1 -0
  341. package/dist/types/tests/durable-event-log.spec.d.ts +2 -0
  342. package/dist/types/tests/durable-event-log.spec.d.ts.map +1 -0
  343. package/dist/types/tests/dwn.spec.d.ts.map +1 -1
  344. package/dist/types/tests/features/author-delegated-grant.spec.d.ts.map +1 -1
  345. package/dist/types/tests/features/owner-delegated-grant.spec.d.ts.map +1 -1
  346. package/dist/types/tests/features/owner-signature.spec.d.ts.map +1 -1
  347. package/dist/types/tests/features/permissions.spec.d.ts.map +1 -1
  348. package/dist/types/tests/features/protocol-composition.spec.d.ts.map +1 -1
  349. package/dist/types/tests/features/protocol-create-action.spec.d.ts.map +1 -1
  350. package/dist/types/tests/features/protocol-delete-action.spec.d.ts.map +1 -1
  351. package/dist/types/tests/features/protocol-update-action.spec.d.ts.map +1 -1
  352. package/dist/types/tests/features/records-delivery.spec.d.ts.map +1 -1
  353. package/dist/types/tests/features/records-immutable.spec.d.ts.map +1 -1
  354. package/dist/types/tests/features/records-nested-query-scope.spec.d.ts +2 -0
  355. package/dist/types/tests/features/records-nested-query-scope.spec.d.ts.map +1 -0
  356. package/dist/types/tests/features/records-prune-cross-protocol.spec.d.ts.map +1 -1
  357. package/dist/types/tests/features/records-prune.spec.d.ts.map +1 -1
  358. package/dist/types/tests/features/records-record-limit.spec.d.ts.map +1 -1
  359. package/dist/types/tests/features/records-squash.spec.d.ts.map +1 -1
  360. package/dist/types/tests/features/records-tags.spec.d.ts.map +1 -1
  361. package/dist/types/tests/features/resumable-tasks.spec.d.ts.map +1 -1
  362. package/dist/types/tests/handlers/messages-query.spec.d.ts +2 -0
  363. package/dist/types/tests/handlers/messages-query.spec.d.ts.map +1 -0
  364. package/dist/types/tests/handlers/messages-read.spec.d.ts.map +1 -1
  365. package/dist/types/tests/handlers/messages-subscribe.spec.d.ts.map +1 -1
  366. package/dist/types/tests/handlers/protocols-configure.spec.d.ts.map +1 -1
  367. package/dist/types/tests/handlers/protocols-query.spec.d.ts.map +1 -1
  368. package/dist/types/tests/handlers/records-count.spec.d.ts.map +1 -1
  369. package/dist/types/tests/handlers/records-delete.spec.d.ts.map +1 -1
  370. package/dist/types/tests/handlers/records-query.spec.d.ts.map +1 -1
  371. package/dist/types/tests/handlers/records-read.spec.d.ts.map +1 -1
  372. package/dist/types/tests/handlers/records-subscribe.spec.d.ts.map +1 -1
  373. package/dist/types/tests/handlers/records-write.spec.d.ts.map +1 -1
  374. package/dist/types/tests/scenarios/deleted-record.spec.d.ts.map +1 -1
  375. package/dist/types/tests/scenarios/end-to-end-tests.spec.d.ts.map +1 -1
  376. package/dist/types/tests/scenarios/nested-roles.spec.d.ts.map +1 -1
  377. package/dist/types/tests/scenarios/subscriptions.spec.d.ts.map +1 -1
  378. package/dist/types/tests/store/message-store.spec.d.ts.map +1 -1
  379. package/dist/types/tests/test-event-stream.d.ts +1 -1
  380. package/dist/types/tests/test-event-stream.d.ts.map +1 -1
  381. package/dist/types/tests/test-stores.d.ts +5 -4
  382. package/dist/types/tests/test-stores.d.ts.map +1 -1
  383. package/dist/types/tests/test-suite.d.ts +1 -2
  384. package/dist/types/tests/test-suite.d.ts.map +1 -1
  385. package/dist/types/tests/utils/protocol-tags.spec.d.ts +2 -0
  386. package/dist/types/tests/utils/protocol-tags.spec.d.ts.map +1 -0
  387. package/dist/types/tests/utils/test-data-generator.d.ts +20 -1
  388. package/dist/types/tests/utils/test-data-generator.d.ts.map +1 -1
  389. package/dist/types/tests/utils/test-validation-state-reader.d.ts +15 -0
  390. package/dist/types/tests/utils/test-validation-state-reader.d.ts.map +1 -0
  391. package/package.json +2 -2
  392. package/src/core/core-protocol.ts +3 -3
  393. package/src/core/dwn-constant.ts +7 -1
  394. package/src/core/dwn-error.ts +12 -4
  395. package/src/core/grant-authorization.ts +11 -20
  396. package/src/core/message-reply.ts +6 -5
  397. package/src/core/messages-grant-authorization.ts +37 -70
  398. package/src/core/protocol-authorization-action.ts +29 -38
  399. package/src/core/protocol-authorization-validation.ts +47 -121
  400. package/src/core/protocol-authorization.ts +56 -202
  401. package/src/core/protocols-grant-authorization.ts +9 -9
  402. package/src/core/recording-validation-state-reader.ts +130 -0
  403. package/src/core/records-grant-authorization.ts +16 -16
  404. package/src/core/replication-apply.ts +172 -32
  405. package/src/core/resumable-task-manager.ts +10 -8
  406. package/src/core/validation-state-reader.ts +350 -0
  407. package/src/dwn.ts +285 -192
  408. package/src/enums/dwn-interface-method.ts +0 -1
  409. package/src/event-stream/durable-event-log.ts +509 -0
  410. package/src/event-stream/event-emitter-wake-publisher.ts +34 -0
  411. package/src/handlers/messages-query.ts +203 -0
  412. package/src/handlers/messages-read.ts +9 -10
  413. package/src/handlers/messages-subscribe.ts +12 -13
  414. package/src/handlers/protocols-configure.ts +37 -58
  415. package/src/handlers/protocols-query.ts +1 -1
  416. package/src/handlers/records-count.ts +24 -17
  417. package/src/handlers/records-delete.ts +29 -27
  418. package/src/handlers/records-query.ts +38 -17
  419. package/src/handlers/records-read.ts +63 -50
  420. package/src/handlers/records-subscribe.ts +132 -19
  421. package/src/handlers/records-write.ts +77 -168
  422. package/src/index.ts +14 -17
  423. package/src/interfaces/messages-query.ts +70 -0
  424. package/src/interfaces/protocols-configure.ts +20 -10
  425. package/src/interfaces/protocols-query.ts +4 -5
  426. package/src/interfaces/records-count.ts +9 -4
  427. package/src/interfaces/records-delete.ts +25 -5
  428. package/src/interfaces/records-query.ts +9 -4
  429. package/src/interfaces/records-read.ts +4 -4
  430. package/src/interfaces/records-subscribe.ts +9 -4
  431. package/src/interfaces/records-write.ts +41 -13
  432. package/src/protocols/permissions.ts +32 -52
  433. package/src/store/index-level.ts +30 -9
  434. package/src/store/level-wrapper.ts +9 -1
  435. package/src/store/message-store-level.ts +757 -47
  436. package/src/store/storage-controller.ts +74 -63
  437. package/src/types/message-store.ts +45 -2
  438. package/src/types/message-types.ts +3 -1
  439. package/src/types/messages-types.ts +26 -45
  440. package/src/types/method-handler.ts +3 -3
  441. package/src/types/permission-types.ts +1 -1
  442. package/src/types/subscriptions.ts +53 -42
  443. package/src/types/validation-state-reader.ts +127 -0
  444. package/src/utils/messages.ts +25 -1
  445. package/src/utils/protocol-tags.ts +366 -0
  446. package/src/utils/record-limit-occupancy.ts +377 -0
  447. package/src/utils/records.ts +69 -13
  448. package/src/utils/replication.ts +122 -0
  449. package/dist/esm/src/core/record-chain.js +0 -64
  450. package/dist/esm/src/core/record-chain.js.map +0 -1
  451. package/dist/esm/src/event-stream/event-emitter-event-log.js +0 -334
  452. package/dist/esm/src/event-stream/event-emitter-event-log.js.map +0 -1
  453. package/dist/esm/src/handlers/messages-sync.js +0 -278
  454. package/dist/esm/src/handlers/messages-sync.js.map +0 -1
  455. package/dist/esm/src/interfaces/messages-sync.js.map +0 -1
  456. package/dist/esm/src/smt/smt-store-level.js +0 -103
  457. package/dist/esm/src/smt/smt-store-level.js.map +0 -1
  458. package/dist/esm/src/smt/smt-store-memory.js +0 -41
  459. package/dist/esm/src/smt/smt-store-memory.js.map +0 -1
  460. package/dist/esm/src/smt/smt-utils.js +0 -129
  461. package/dist/esm/src/smt/smt-utils.js.map +0 -1
  462. package/dist/esm/src/smt/sparse-merkle-tree.js +0 -577
  463. package/dist/esm/src/smt/sparse-merkle-tree.js.map +0 -1
  464. package/dist/esm/src/state-index/state-index-level.js +0 -191
  465. package/dist/esm/src/state-index/state-index-level.js.map +0 -1
  466. package/dist/esm/src/types/smt-types.js +0 -5
  467. package/dist/esm/src/types/smt-types.js.map +0 -1
  468. package/dist/esm/src/types/state-index.js +0 -2
  469. package/dist/esm/src/types/state-index.js.map +0 -1
  470. package/dist/esm/tests/event-emitter-event-log.spec.js +0 -499
  471. package/dist/esm/tests/event-emitter-event-log.spec.js.map +0 -1
  472. package/dist/esm/tests/handlers/messages-sync.spec.js +0 -1088
  473. package/dist/esm/tests/handlers/messages-sync.spec.js.map +0 -1
  474. package/dist/esm/tests/smt/smt-store-level.spec.js +0 -132
  475. package/dist/esm/tests/smt/smt-store-level.spec.js.map +0 -1
  476. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +0 -732
  477. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +0 -1
  478. package/dist/esm/tests/state-index/state-index-level.spec.js +0 -245
  479. package/dist/esm/tests/state-index/state-index-level.spec.js.map +0 -1
  480. package/dist/types/src/core/record-chain.d.ts +0 -24
  481. package/dist/types/src/core/record-chain.d.ts.map +0 -1
  482. package/dist/types/src/event-stream/event-emitter-event-log.d.ts +0 -80
  483. package/dist/types/src/event-stream/event-emitter-event-log.d.ts.map +0 -1
  484. package/dist/types/src/handlers/messages-sync.d.ts +0 -39
  485. package/dist/types/src/handlers/messages-sync.d.ts.map +0 -1
  486. package/dist/types/src/interfaces/messages-sync.d.ts +0 -20
  487. package/dist/types/src/interfaces/messages-sync.d.ts.map +0 -1
  488. package/dist/types/src/smt/smt-store-level.d.ts +0 -32
  489. package/dist/types/src/smt/smt-store-level.d.ts.map +0 -1
  490. package/dist/types/src/smt/smt-store-memory.d.ts +0 -22
  491. package/dist/types/src/smt/smt-store-memory.d.ts.map +0 -1
  492. package/dist/types/src/smt/smt-utils.d.ts +0 -58
  493. package/dist/types/src/smt/smt-utils.d.ts.map +0 -1
  494. package/dist/types/src/smt/sparse-merkle-tree.d.ts +0 -124
  495. package/dist/types/src/smt/sparse-merkle-tree.d.ts.map +0 -1
  496. package/dist/types/src/state-index/state-index-level.d.ts +0 -83
  497. package/dist/types/src/state-index/state-index-level.d.ts.map +0 -1
  498. package/dist/types/src/types/smt-types.d.ts +0 -81
  499. package/dist/types/src/types/smt-types.d.ts.map +0 -1
  500. package/dist/types/src/types/state-index.d.ts +0 -90
  501. package/dist/types/src/types/state-index.d.ts.map +0 -1
  502. package/dist/types/tests/event-emitter-event-log.spec.d.ts +0 -2
  503. package/dist/types/tests/event-emitter-event-log.spec.d.ts.map +0 -1
  504. package/dist/types/tests/handlers/messages-sync.spec.d.ts +0 -2
  505. package/dist/types/tests/handlers/messages-sync.spec.d.ts.map +0 -1
  506. package/dist/types/tests/smt/smt-store-level.spec.d.ts +0 -2
  507. package/dist/types/tests/smt/smt-store-level.spec.d.ts.map +0 -1
  508. package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts +0 -2
  509. package/dist/types/tests/smt/sparse-merkle-tree.spec.d.ts.map +0 -1
  510. package/dist/types/tests/state-index/state-index-level.spec.d.ts +0 -2
  511. package/dist/types/tests/state-index/state-index-level.spec.d.ts.map +0 -1
  512. package/src/core/record-chain.ts +0 -99
  513. package/src/event-stream/event-emitter-event-log.ts +0 -430
  514. package/src/handlers/messages-sync.ts +0 -403
  515. package/src/interfaces/messages-sync.ts +0 -69
  516. package/src/smt/smt-store-level.ts +0 -143
  517. package/src/smt/smt-store-memory.ts +0 -53
  518. package/src/smt/smt-utils.ts +0 -149
  519. package/src/smt/sparse-merkle-tree.ts +0 -698
  520. package/src/state-index/state-index-level.ts +0 -239
  521. package/src/types/smt-types.ts +0 -95
  522. package/src/types/state-index.ts +0 -100
@@ -0,0 +1,20 @@
1
+ import type { HandlerDependencies, MethodHandler } from '../types/method-handler.js';
2
+ import type { MessagesQueryMessage, MessagesQueryReply } from '../types/messages-types.js';
3
+ export declare class MessagesQueryHandler implements MethodHandler {
4
+ private readonly deps;
5
+ constructor(deps: HandlerDependencies);
6
+ handle({ tenant, message }: {
7
+ tenant: string;
8
+ message: MessagesQueryMessage;
9
+ }): Promise<MessagesQueryReply>;
10
+ private authorizeMessagesQuery;
11
+ private static asReplicationFeedReader;
12
+ private static convertFilters;
13
+ private static buildEntries;
14
+ private static buildEntry;
15
+ private static getStringIndex;
16
+ private static isLatestBaseState;
17
+ private static computeFingerprintScopes;
18
+ private static getProgressGapInfo;
19
+ }
20
+ //# sourceMappingURL=messages-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages-query.d.ts","sourceRoot":"","sources":["../../../../src/handlers/messages-query.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAkB,oBAAoB,EAAE,kBAAkB,EAA2B,MAAM,4BAA4B,CAAC;AAYpI,qBAAa,oBAAqB,YAAW,aAAa;IAE5C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,oBAAoB,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC;YA2D1G,sBAAsB;IA4BpC,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAYtC,OAAO,CAAC,MAAM,CAAC,cAAc;mBAQR,YAAY;mBAaZ,UAAU;IA0B/B,OAAO,CAAC,MAAM,CAAC,cAAc;IAK7B,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAIhC,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAwBvC,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAIlC"}
@@ -9,7 +9,7 @@ export declare class MessagesReadHandler implements MethodHandler {
9
9
  constructor(deps: HandlerDependencies);
10
10
  handle({ tenant, message }: HandleArgs): Promise<MessagesReadReply>;
11
11
  /**
12
- * @param messageStore Used to fetch related permission grant, permission revocation, and/or RecordsWrites for permission scope validation.
12
+ * @param deps Used to fetch related permission grant, permission revocation, and/or RecordsWrites for permission scope validation.
13
13
  */
14
14
  private static authorizeMessagesRead;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"messages-read.d.ts","sourceRoot":"","sources":["../../../../src/handlers/messages-read.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAA0B,MAAM,4BAA4B,CAAC;AAYjH,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAEnE,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmDhF;;OAEG;mBACkB,qBAAqB;CA2B3C"}
1
+ {"version":3,"file":"messages-read.d.ts","sourceRoot":"","sources":["../../../../src/handlers/messages-read.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAA0B,MAAM,4BAA4B,CAAC;AAYjH,KAAK,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAEnE,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmDhF;;OAEG;mBACkB,qBAAqB;CA2B3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"messages-subscribe.d.ts","sourceRoot":"","sources":["../../../../src/handlers/messages-subscribe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAyD,oBAAoB,EAAuB,MAAM,2BAA2B,CAAC;AAClJ,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAyBnG,qBAAa,wBAAyB,YAAW,aAAa;IAEhD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACP,mBAAmB,EACpB,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,wBAAwB,CAAC;QAClC,mBAAmB,EAAE,oBAAoB,CAAC;KAC3C,GAAG,OAAO,CAAC,sBAAsB,CAAC;mBAyDd,0BAA0B;IA+B/C,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAsGxC"}
1
+ {"version":3,"file":"messages-subscribe.d.ts","sourceRoot":"","sources":["../../../../src/handlers/messages-subscribe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyD,oBAAoB,EAAuB,MAAM,2BAA2B,CAAC;AAClJ,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAyBnG,qBAAa,wBAAyB,YAAW,aAAa;IAEhD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,mBAAmB;IAEzC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,EACP,mBAAmB,EACpB,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,wBAAwB,CAAC;QAClC,mBAAmB,EAAE,oBAAoB,CAAC;KAC3C,GAAG,OAAO,CAAC,sBAAsB,CAAC;mBAyDd,0BAA0B;IA+B/C,OAAO,CAAC,MAAM,CAAC,wBAAwB;CAsGxC"}
@@ -25,11 +25,6 @@ export declare class ProtocolsConfigureHandler implements MethodHandler {
25
25
  * This is a no-op if the protocol definition has no `uses` map.
26
26
  */
27
27
  private static validateCompositionDependencies;
28
- /**
29
- * Fetches the latest installed protocol definition for the given protocol URI.
30
- * @returns The protocol definition, or `undefined` if not installed.
31
- */
32
- private static fetchInstalledProtocolDefinition;
33
28
  /**
34
29
  * Recursively walks the structure tree to validate:
35
30
  * - `$ref` type paths exist in the referenced protocol's structure
@@ -1 +1 @@
1
- {"version":3,"file":"protocols-configure.d.ts","sourceRoot":"","sources":["../../../../src/handlers/protocols-configure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGrE,OAAO,KAAK,EAAE,mBAAmB,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zC,MAAM,CAAC,EAClB,MAAM,EACN,OAAO,GACR,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,yBAAyB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAgGxF,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,OAAO,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KAAE;mBAgB3G,2BAA2B;YAuBlC,uCAAuC;YAiDvC,mCAAmC;IAqBjD,OAAO,CAAC,MAAM,CAAC,sCAAsC;IAIrD;;;;;;;OAOG;mBACkB,+BAA+B;IAkCpD;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,+BAA+B;CAsH/C"}
@@ -3,7 +3,7 @@ import type { RecordsCountMessage, RecordsCountReply } from '../types/records-ty
3
3
  export declare class RecordsCountHandler 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: RecordsCountMessage;
9
9
  }): Promise<RecordsCountReply>;
@@ -19,6 +19,7 @@ export declare class RecordsCountHandler implements MethodHandler {
19
19
  * Counts only published records.
20
20
  */
21
21
  private countPublishedRecords;
22
+ private countProjectedRecords;
22
23
  private static buildPublishedRecordsFilter;
23
24
  /**
24
25
  * Creates a filter for unpublished records that are intended for the count author (where `recipient` is the author).
@@ -1 +1 @@
1
- {"version":3,"file":"records-count.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-count.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAYxF,qBAAa,mBAAoB,YAAW,aAAa;IAE3C,OAAO,CAAC,QAAQ,CAAC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;IAY1D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,+CAA+C;IAW9D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sDAAsD;IAWrE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0CAA0C;IAYzD;;OAEG;mBACkB,qBAAqB;CA8B3C"}
@@ -4,7 +4,7 @@ import type { HandlerDependencies, MethodHandler } from '../types/method-handler
4
4
  export declare class RecordsDeleteHandler implements MethodHandler {
5
5
  private readonly deps;
6
6
  constructor(deps: HandlerDependencies);
7
- handle({ tenant, message }: {
7
+ handle({ tenant, message, }: {
8
8
  tenant: string;
9
9
  message: RecordsDeleteMessage;
10
10
  }): Promise<GenericMessageReply>;
@@ -13,6 +13,6 @@ export declare class RecordsDeleteHandler implements MethodHandler {
13
13
  *
14
14
  * @param recordsWrite A RecordsWrite of the record to be deleted.
15
15
  */
16
- private static authorizeRecordsDelete;
16
+ private authorizeRecordsDelete;
17
17
  }
18
18
  //# sourceMappingURL=records-delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"records-delete.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-delete.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAcrF,qBAAa,oBAAqB,YAAW,aAAa;IAE5C,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,oBAAoB,CAAA;KAAC,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAoElF;;;;OAIG;mBACkB,sBAAsB;CA6B5C"}
1
+ {"version":3,"file":"records-delete.d.ts","sourceRoot":"","sources":["../../../../src/handlers/records-delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAYrF,qBAAa,oBAAqB,YAAW,aAAa;IAE5C,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,oBAAoB,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAyEnF;;;;OAIG;YACW,sBAAsB;CA4BrC"}
@@ -3,7 +3,7 @@ import type { RecordsQueryMessage, RecordsQueryReply } from '../types/records-ty
3
3
  export declare class RecordsQueryHandler 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: RecordsQueryMessage;
9
9
  }): Promise<RecordsQueryReply>;
@@ -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,mBAAm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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,mBAAmB,EACpB,EAAE;QACD,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,uBAAuB,CAAC;QACjC,mBAAmB,EAAE,oBAAoB,CAAC;KAC3C,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAsHlC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAwB9B;;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,OA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,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;AAC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AAI,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,iBAA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A8B,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
  */
@@ -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O,CAAC,MAAM,CAAC,0BAA0B;IAkSzC;;;;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,CA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S,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.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,8BAA8B,EAA0B,mBAAmB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE5I,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAW9D,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,CAAC,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;IAEt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qB,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,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AACjF,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,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,aAAa,CAAC;IA8BjF;;;;;;;;;;OAUG;IACI,gBAAgB,CACrB,YAAY,EAAE,mBAAmB,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;AAWrD,MAAM,MAAM,mBAAmB,GAAG;IAChC,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;;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;WAuC1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,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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,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,CAA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