@enbox/dwn-sdk-js 0.0.6 → 0.0.7

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 (361) hide show
  1. package/dist/browser.mjs +8 -8
  2. package/dist/browser.mjs.map +4 -4
  3. package/dist/esm/generated/precompiled-validators.js +1 -2
  4. package/dist/esm/generated/precompiled-validators.js.map +1 -1
  5. package/dist/esm/src/core/abstract-message.js +4 -0
  6. package/dist/esm/src/core/abstract-message.js.map +1 -1
  7. package/dist/esm/src/core/auth.js +22 -33
  8. package/dist/esm/src/core/auth.js.map +1 -1
  9. package/dist/esm/src/core/dwn-constant.js +7 -7
  10. package/dist/esm/src/core/dwn-constant.js.map +1 -1
  11. package/dist/esm/src/core/dwn-error.js +1 -0
  12. package/dist/esm/src/core/dwn-error.js.map +1 -1
  13. package/dist/esm/src/core/grant-authorization.js +37 -52
  14. package/dist/esm/src/core/grant-authorization.js.map +1 -1
  15. package/dist/esm/src/core/message.js +85 -116
  16. package/dist/esm/src/core/message.js.map +1 -1
  17. package/dist/esm/src/core/messages-grant-authorization.js +63 -78
  18. package/dist/esm/src/core/messages-grant-authorization.js.map +1 -1
  19. package/dist/esm/src/core/protocol-authorization-action.js +266 -0
  20. package/dist/esm/src/core/protocol-authorization-action.js.map +1 -0
  21. package/dist/esm/src/core/protocol-authorization-validation.js +254 -0
  22. package/dist/esm/src/core/protocol-authorization-validation.js.map +1 -0
  23. package/dist/esm/src/core/protocol-authorization.js +122 -740
  24. package/dist/esm/src/core/protocol-authorization.js.map +1 -1
  25. package/dist/esm/src/core/protocols-grant-authorization.js +24 -38
  26. package/dist/esm/src/core/protocols-grant-authorization.js.map +1 -1
  27. package/dist/esm/src/core/record-chain.js +64 -0
  28. package/dist/esm/src/core/record-chain.js.map +1 -0
  29. package/dist/esm/src/core/records-grant-authorization.js +55 -72
  30. package/dist/esm/src/core/records-grant-authorization.js.map +1 -1
  31. package/dist/esm/src/core/resumable-task-manager.js +50 -65
  32. package/dist/esm/src/core/resumable-task-manager.js.map +1 -1
  33. package/dist/esm/src/core/tenant-gate.js +2 -13
  34. package/dist/esm/src/core/tenant-gate.js.map +1 -1
  35. package/dist/esm/src/dwn.js +69 -86
  36. package/dist/esm/src/dwn.js.map +1 -1
  37. package/dist/esm/src/event-stream/event-emitter-stream.js +17 -31
  38. package/dist/esm/src/event-stream/event-emitter-stream.js.map +1 -1
  39. package/dist/esm/src/handlers/messages-read.js +67 -77
  40. package/dist/esm/src/handlers/messages-read.js.map +1 -1
  41. package/dist/esm/src/handlers/messages-subscribe.js +51 -61
  42. package/dist/esm/src/handlers/messages-subscribe.js.map +1 -1
  43. package/dist/esm/src/handlers/messages-sync.js +75 -85
  44. package/dist/esm/src/handlers/messages-sync.js.map +1 -1
  45. package/dist/esm/src/handlers/protocols-configure.js +135 -155
  46. package/dist/esm/src/handlers/protocols-configure.js.map +1 -1
  47. package/dist/esm/src/handlers/protocols-query.js +52 -51
  48. package/dist/esm/src/handlers/protocols-query.js.map +1 -1
  49. package/dist/esm/src/handlers/records-count.js +96 -82
  50. package/dist/esm/src/handlers/records-count.js.map +1 -1
  51. package/dist/esm/src/handlers/records-delete.js +78 -88
  52. package/dist/esm/src/handlers/records-delete.js.map +1 -1
  53. package/dist/esm/src/handlers/records-query.js +116 -101
  54. package/dist/esm/src/handlers/records-query.js.map +1 -1
  55. package/dist/esm/src/handlers/records-read.js +124 -131
  56. package/dist/esm/src/handlers/records-read.js.map +1 -1
  57. package/dist/esm/src/handlers/records-subscribe.js +150 -103
  58. package/dist/esm/src/handlers/records-subscribe.js.map +1 -1
  59. package/dist/esm/src/handlers/records-write.js +250 -259
  60. package/dist/esm/src/handlers/records-write.js.map +1 -1
  61. package/dist/esm/src/interfaces/messages-read.js +24 -32
  62. package/dist/esm/src/interfaces/messages-read.js.map +1 -1
  63. package/dist/esm/src/interfaces/messages-subscribe.js +27 -41
  64. package/dist/esm/src/interfaces/messages-subscribe.js.map +1 -1
  65. package/dist/esm/src/interfaces/messages-sync.js +26 -40
  66. package/dist/esm/src/interfaces/messages-sync.js.map +1 -1
  67. package/dist/esm/src/interfaces/protocols-configure.js +63 -63
  68. package/dist/esm/src/interfaces/protocols-configure.js.map +1 -1
  69. package/dist/esm/src/interfaces/protocols-query.js +55 -68
  70. package/dist/esm/src/interfaces/protocols-query.js.map +1 -1
  71. package/dist/esm/src/interfaces/records-count.js +50 -66
  72. package/dist/esm/src/interfaces/records-count.js.map +1 -1
  73. package/dist/esm/src/interfaces/records-delete.js +45 -55
  74. package/dist/esm/src/interfaces/records-delete.js.map +1 -1
  75. package/dist/esm/src/interfaces/records-query.js +60 -76
  76. package/dist/esm/src/interfaces/records-query.js.map +1 -1
  77. package/dist/esm/src/interfaces/records-read.js +51 -67
  78. package/dist/esm/src/interfaces/records-read.js.map +1 -1
  79. package/dist/esm/src/interfaces/records-subscribe.js +52 -68
  80. package/dist/esm/src/interfaces/records-subscribe.js.map +1 -1
  81. package/dist/esm/src/interfaces/records-write-query.js +102 -0
  82. package/dist/esm/src/interfaces/records-write-query.js.map +1 -0
  83. package/dist/esm/src/interfaces/records-write-signing.js +92 -0
  84. package/dist/esm/src/interfaces/records-write-signing.js.map +1 -0
  85. package/dist/esm/src/interfaces/records-write.js +407 -602
  86. package/dist/esm/src/interfaces/records-write.js.map +1 -1
  87. package/dist/esm/src/jose/algorithms/signing/ed25519.js +10 -19
  88. package/dist/esm/src/jose/algorithms/signing/ed25519.js.map +1 -1
  89. package/dist/esm/src/jose/jws/general/builder.js +23 -35
  90. package/dist/esm/src/jose/jws/general/builder.js.map +1 -1
  91. package/dist/esm/src/jose/jws/general/verifier.js +56 -69
  92. package/dist/esm/src/jose/jws/general/verifier.js.map +1 -1
  93. package/dist/esm/src/protocols/permission-grant.js +44 -15
  94. package/dist/esm/src/protocols/permission-grant.js.map +1 -1
  95. package/dist/esm/src/protocols/permission-request.js +29 -15
  96. package/dist/esm/src/protocols/permission-request.js.map +1 -1
  97. package/dist/esm/src/protocols/permissions.js +216 -226
  98. package/dist/esm/src/protocols/permissions.js.map +1 -1
  99. package/dist/esm/src/smt/smt-store-level.js +42 -64
  100. package/dist/esm/src/smt/smt-store-level.js.map +1 -1
  101. package/dist/esm/src/smt/smt-store-memory.js +19 -45
  102. package/dist/esm/src/smt/smt-store-memory.js.map +1 -1
  103. package/dist/esm/src/smt/smt-utils.js +28 -45
  104. package/dist/esm/src/smt/smt-utils.js.map +1 -1
  105. package/dist/esm/src/smt/sparse-merkle-tree.js +426 -471
  106. package/dist/esm/src/smt/sparse-merkle-tree.js.map +1 -1
  107. package/dist/esm/src/state-index/state-index-level.js +115 -150
  108. package/dist/esm/src/state-index/state-index-level.js.map +1 -1
  109. package/dist/esm/src/store/blockstore-level.js +54 -156
  110. package/dist/esm/src/store/blockstore-level.js.map +1 -1
  111. package/dist/esm/src/store/blockstore-mock.js +48 -153
  112. package/dist/esm/src/store/blockstore-mock.js.map +1 -1
  113. package/dist/esm/src/store/data-store-level.js +59 -99
  114. package/dist/esm/src/store/data-store-level.js.map +1 -1
  115. package/dist/esm/src/store/index-level-compound.js +246 -0
  116. package/dist/esm/src/store/index-level-compound.js.map +1 -0
  117. package/dist/esm/src/store/index-level.js +295 -713
  118. package/dist/esm/src/store/index-level.js.map +1 -1
  119. package/dist/esm/src/store/level-wrapper.js +143 -244
  120. package/dist/esm/src/store/level-wrapper.js.map +1 -1
  121. package/dist/esm/src/store/message-store-level.js +71 -94
  122. package/dist/esm/src/store/message-store-level.js.map +1 -1
  123. package/dist/esm/src/store/resumable-task-store-level.js +62 -101
  124. package/dist/esm/src/store/resumable-task-store-level.js.map +1 -1
  125. package/dist/esm/src/store/storage-controller.js +129 -144
  126. package/dist/esm/src/store/storage-controller.js.map +1 -1
  127. package/dist/esm/src/utils/abort.js +8 -19
  128. package/dist/esm/src/utils/abort.js.map +1 -1
  129. package/dist/esm/src/utils/array.js +15 -49
  130. package/dist/esm/src/utils/array.js.map +1 -1
  131. package/dist/esm/src/utils/cid.js +29 -77
  132. package/dist/esm/src/utils/cid.js.map +1 -1
  133. package/dist/esm/src/utils/data-stream.js +37 -65
  134. package/dist/esm/src/utils/data-stream.js.map +1 -1
  135. package/dist/esm/src/utils/encryption.js +136 -162
  136. package/dist/esm/src/utils/encryption.js.map +1 -1
  137. package/dist/esm/src/utils/filter.js +1 -12
  138. package/dist/esm/src/utils/filter.js.map +1 -1
  139. package/dist/esm/src/utils/hd-key.js +45 -63
  140. package/dist/esm/src/utils/hd-key.js.map +1 -1
  141. package/dist/esm/src/utils/jws.js +9 -20
  142. package/dist/esm/src/utils/jws.js.map +1 -1
  143. package/dist/esm/src/utils/memory-cache.js +12 -23
  144. package/dist/esm/src/utils/memory-cache.js.map +1 -1
  145. package/dist/esm/src/utils/messages.js +9 -3
  146. package/dist/esm/src/utils/messages.js.map +1 -1
  147. package/dist/esm/src/utils/private-key-signer.js +9 -17
  148. package/dist/esm/src/utils/private-key-signer.js.map +1 -1
  149. package/dist/esm/src/utils/protocols.js +62 -70
  150. package/dist/esm/src/utils/protocols.js.map +1 -1
  151. package/dist/esm/src/utils/records.js +100 -125
  152. package/dist/esm/src/utils/records.js.map +1 -1
  153. package/dist/esm/src/utils/secp256k1.js +60 -96
  154. package/dist/esm/src/utils/secp256k1.js.map +1 -1
  155. package/dist/esm/src/utils/secp256r1.js +54 -71
  156. package/dist/esm/src/utils/secp256r1.js.map +1 -1
  157. package/dist/esm/src/utils/time.js +5 -18
  158. package/dist/esm/src/utils/time.js.map +1 -1
  159. package/dist/esm/src/utils/url.js +3 -3
  160. package/dist/esm/src/utils/url.js.map +1 -1
  161. package/dist/esm/tests/core/auth.spec.js +3 -12
  162. package/dist/esm/tests/core/auth.spec.js.map +1 -1
  163. package/dist/esm/tests/core/message.spec.js +50 -59
  164. package/dist/esm/tests/core/message.spec.js.map +1 -1
  165. package/dist/esm/tests/core/protocol-authorization.spec.js +9 -18
  166. package/dist/esm/tests/core/protocol-authorization.spec.js.map +1 -1
  167. package/dist/esm/tests/dwn.spec.js +45 -58
  168. package/dist/esm/tests/dwn.spec.js.map +1 -1
  169. package/dist/esm/tests/event-stream/event-emitter-stream.spec.js +24 -33
  170. package/dist/esm/tests/event-stream/event-emitter-stream.spec.js.map +1 -1
  171. package/dist/esm/tests/event-stream/event-stream.spec.js +46 -55
  172. package/dist/esm/tests/event-stream/event-stream.spec.js.map +1 -1
  173. package/dist/esm/tests/features/author-delegated-grant.spec.js +326 -343
  174. package/dist/esm/tests/features/author-delegated-grant.spec.js.map +1 -1
  175. package/dist/esm/tests/features/owner-delegated-grant.spec.js +153 -169
  176. package/dist/esm/tests/features/owner-delegated-grant.spec.js.map +1 -1
  177. package/dist/esm/tests/features/owner-signature.spec.js +67 -78
  178. package/dist/esm/tests/features/owner-signature.spec.js.map +1 -1
  179. package/dist/esm/tests/features/permissions.spec.js +446 -181
  180. package/dist/esm/tests/features/permissions.spec.js.map +1 -1
  181. package/dist/esm/tests/features/protocol-composition.spec.js +346 -356
  182. package/dist/esm/tests/features/protocol-composition.spec.js.map +1 -1
  183. package/dist/esm/tests/features/protocol-create-action.spec.js +42 -51
  184. package/dist/esm/tests/features/protocol-create-action.spec.js.map +1 -1
  185. package/dist/esm/tests/features/protocol-delete-action.spec.js +94 -103
  186. package/dist/esm/tests/features/protocol-delete-action.spec.js.map +1 -1
  187. package/dist/esm/tests/features/protocol-update-action.spec.js +105 -114
  188. package/dist/esm/tests/features/protocol-update-action.spec.js.map +1 -1
  189. package/dist/esm/tests/features/records-prune.spec.js +175 -191
  190. package/dist/esm/tests/features/records-prune.spec.js.map +1 -1
  191. package/dist/esm/tests/features/records-tags.spec.js +441 -460
  192. package/dist/esm/tests/features/records-tags.spec.js.map +1 -1
  193. package/dist/esm/tests/features/resumable-tasks.spec.js +82 -91
  194. package/dist/esm/tests/features/resumable-tasks.spec.js.map +1 -1
  195. package/dist/esm/tests/handlers/messages-read.spec.js +206 -207
  196. package/dist/esm/tests/handlers/messages-read.spec.js.map +1 -1
  197. package/dist/esm/tests/handlers/messages-subscribe.spec.js +145 -154
  198. package/dist/esm/tests/handlers/messages-subscribe.spec.js.map +1 -1
  199. package/dist/esm/tests/handlers/messages-sync.spec.js +174 -183
  200. package/dist/esm/tests/handlers/messages-sync.spec.js.map +1 -1
  201. package/dist/esm/tests/handlers/protocols-configure.spec.js +244 -238
  202. package/dist/esm/tests/handlers/protocols-configure.spec.js.map +1 -1
  203. package/dist/esm/tests/handlers/protocols-query.spec.js +156 -169
  204. package/dist/esm/tests/handlers/protocols-query.spec.js.map +1 -1
  205. package/dist/esm/tests/handlers/records-count.spec.js +93 -102
  206. package/dist/esm/tests/handlers/records-count.spec.js.map +1 -1
  207. package/dist/esm/tests/handlers/records-delete.spec.js +252 -264
  208. package/dist/esm/tests/handlers/records-delete.spec.js.map +1 -1
  209. package/dist/esm/tests/handlers/records-query.spec.js +917 -988
  210. package/dist/esm/tests/handlers/records-query.spec.js.map +1 -1
  211. package/dist/esm/tests/handlers/records-read.spec.js +549 -564
  212. package/dist/esm/tests/handlers/records-read.spec.js.map +1 -1
  213. package/dist/esm/tests/handlers/records-subscribe.spec.js +269 -278
  214. package/dist/esm/tests/handlers/records-subscribe.spec.js.map +1 -1
  215. package/dist/esm/tests/handlers/records-write.spec.js +1057 -1082
  216. package/dist/esm/tests/handlers/records-write.spec.js.map +1 -1
  217. package/dist/esm/tests/interfaces/messages-get.spec.js +39 -48
  218. package/dist/esm/tests/interfaces/messages-get.spec.js.map +1 -1
  219. package/dist/esm/tests/interfaces/messages-subscribe.spec.js +4 -13
  220. package/dist/esm/tests/interfaces/messages-subscribe.spec.js.map +1 -1
  221. package/dist/esm/tests/interfaces/protocols-configure.spec.js +212 -88
  222. package/dist/esm/tests/interfaces/protocols-configure.spec.js.map +1 -1
  223. package/dist/esm/tests/interfaces/protocols-query.spec.js +8 -17
  224. package/dist/esm/tests/interfaces/protocols-query.spec.js.map +1 -1
  225. package/dist/esm/tests/interfaces/records-delete.spec.js +8 -17
  226. package/dist/esm/tests/interfaces/records-delete.spec.js.map +1 -1
  227. package/dist/esm/tests/interfaces/records-query.spec.js +20 -29
  228. package/dist/esm/tests/interfaces/records-query.spec.js.map +1 -1
  229. package/dist/esm/tests/interfaces/records-read.spec.js +42 -51
  230. package/dist/esm/tests/interfaces/records-read.spec.js.map +1 -1
  231. package/dist/esm/tests/interfaces/records-subscribe.spec.js +16 -25
  232. package/dist/esm/tests/interfaces/records-subscribe.spec.js.map +1 -1
  233. package/dist/esm/tests/interfaces/records-write.spec.js +152 -165
  234. package/dist/esm/tests/interfaces/records-write.spec.js.map +1 -1
  235. package/dist/esm/tests/jose/jws/general.spec.js +36 -45
  236. package/dist/esm/tests/jose/jws/general.spec.js.map +1 -1
  237. package/dist/esm/tests/protocols/permission-grant.spec.js +44 -50
  238. package/dist/esm/tests/protocols/permission-grant.spec.js.map +1 -1
  239. package/dist/esm/tests/protocols/permission-request.spec.js +23 -32
  240. package/dist/esm/tests/protocols/permission-request.spec.js.map +1 -1
  241. package/dist/esm/tests/protocols/permissions.spec.js +49 -55
  242. package/dist/esm/tests/protocols/permissions.spec.js.map +1 -1
  243. package/dist/esm/tests/scenarios/aggregator.spec.js +124 -135
  244. package/dist/esm/tests/scenarios/aggregator.spec.js.map +1 -1
  245. package/dist/esm/tests/scenarios/deleted-record.spec.js +23 -32
  246. package/dist/esm/tests/scenarios/deleted-record.spec.js.map +1 -1
  247. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js +52 -61
  248. package/dist/esm/tests/scenarios/end-to-end-tests.spec.js.map +1 -1
  249. package/dist/esm/tests/scenarios/nested-roles.spec.js +63 -73
  250. package/dist/esm/tests/scenarios/nested-roles.spec.js.map +1 -1
  251. package/dist/esm/tests/scenarios/subscriptions.spec.js +377 -333
  252. package/dist/esm/tests/scenarios/subscriptions.spec.js.map +1 -1
  253. package/dist/esm/tests/smt/smt-store-level.spec.js +76 -87
  254. package/dist/esm/tests/smt/smt-store-level.spec.js.map +1 -1
  255. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js +344 -353
  256. package/dist/esm/tests/smt/sparse-merkle-tree.spec.js.map +1 -1
  257. package/dist/esm/tests/state-index/state-index-level.spec.js +117 -126
  258. package/dist/esm/tests/state-index/state-index-level.spec.js.map +1 -1
  259. package/dist/esm/tests/store/blockstore-level.spec.js +44 -99
  260. package/dist/esm/tests/store/blockstore-level.spec.js.map +1 -1
  261. package/dist/esm/tests/store/blockstore-mock.spec.js +40 -120
  262. package/dist/esm/tests/store/blockstore-mock.spec.js.map +1 -1
  263. package/dist/esm/tests/store/data-store-level.spec.js +86 -95
  264. package/dist/esm/tests/store/data-store-level.spec.js.map +1 -1
  265. package/dist/esm/tests/store/index-level.spec.js +404 -414
  266. package/dist/esm/tests/store/index-level.spec.js.map +1 -1
  267. package/dist/esm/tests/store/message-store-level.spec.js +13 -22
  268. package/dist/esm/tests/store/message-store-level.spec.js.map +1 -1
  269. package/dist/esm/tests/store/message-store.spec.js +229 -238
  270. package/dist/esm/tests/store/message-store.spec.js.map +1 -1
  271. package/dist/esm/tests/test-event-stream.js +3 -3
  272. package/dist/esm/tests/test-event-stream.js.map +1 -1
  273. package/dist/esm/tests/test-stores.js +16 -13
  274. package/dist/esm/tests/test-stores.js.map +1 -1
  275. package/dist/esm/tests/test-suite.js +2 -11
  276. package/dist/esm/tests/test-suite.js.map +1 -1
  277. package/dist/esm/tests/utils/cid.spec.js +24 -33
  278. package/dist/esm/tests/utils/cid.spec.js.map +1 -1
  279. package/dist/esm/tests/utils/data-stream.spec.js +48 -57
  280. package/dist/esm/tests/utils/data-stream.spec.js.map +1 -1
  281. package/dist/esm/tests/utils/encryption-callbacks.spec.js +45 -54
  282. package/dist/esm/tests/utils/encryption-callbacks.spec.js.map +1 -1
  283. package/dist/esm/tests/utils/encryption.spec.js +229 -82
  284. package/dist/esm/tests/utils/encryption.spec.js.map +1 -1
  285. package/dist/esm/tests/utils/filters.spec.js +46 -55
  286. package/dist/esm/tests/utils/filters.spec.js.map +1 -1
  287. package/dist/esm/tests/utils/hd-key.spec.js +10 -19
  288. package/dist/esm/tests/utils/hd-key.spec.js.map +1 -1
  289. package/dist/esm/tests/utils/jws.spec.js +3 -12
  290. package/dist/esm/tests/utils/jws.spec.js.map +1 -1
  291. package/dist/esm/tests/utils/memory-cache.spec.js +9 -18
  292. package/dist/esm/tests/utils/memory-cache.spec.js.map +1 -1
  293. package/dist/esm/tests/utils/messages.spec.js +6 -15
  294. package/dist/esm/tests/utils/messages.spec.js.map +1 -1
  295. package/dist/esm/tests/utils/poller.js +22 -33
  296. package/dist/esm/tests/utils/poller.js.map +1 -1
  297. package/dist/esm/tests/utils/private-key-signer.spec.js +15 -24
  298. package/dist/esm/tests/utils/private-key-signer.spec.js.map +1 -1
  299. package/dist/esm/tests/utils/records.spec.js +10 -19
  300. package/dist/esm/tests/utils/records.spec.js.map +1 -1
  301. package/dist/esm/tests/utils/secp256k1.spec.js +16 -25
  302. package/dist/esm/tests/utils/secp256k1.spec.js.map +1 -1
  303. package/dist/esm/tests/utils/secp256r1.spec.js +18 -27
  304. package/dist/esm/tests/utils/secp256r1.spec.js.map +1 -1
  305. package/dist/esm/tests/utils/test-data-generator.js +414 -468
  306. package/dist/esm/tests/utils/test-data-generator.js.map +1 -1
  307. package/dist/esm/tests/validation/json-schemas/definitions.spec.js +2 -11
  308. package/dist/esm/tests/validation/json-schemas/definitions.spec.js.map +1 -1
  309. package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js +4 -13
  310. package/dist/esm/tests/validation/json-schemas/jwk/general-jwk.spec.js.map +1 -1
  311. package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js +8 -17
  312. package/dist/esm/tests/validation/json-schemas/jwk/public-jwk.spec.js.map +1 -1
  313. package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js +3 -12
  314. package/dist/esm/tests/validation/json-schemas/jwk-verification-method.spec.js.map +1 -1
  315. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js +4 -13
  316. package/dist/esm/tests/validation/json-schemas/protocols/protocols-configure.spec.js.map +1 -1
  317. package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js +2 -11
  318. package/dist/esm/tests/validation/json-schemas/records/records-query.spec.js.map +1 -1
  319. package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js +2 -11
  320. package/dist/esm/tests/validation/json-schemas/records/records-read.spec.js.map +1 -1
  321. package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js +7 -16
  322. package/dist/esm/tests/validation/json-schemas/records/records-write.spec.js.map +1 -1
  323. package/dist/types/src/core/protocol-authorization-action.d.ts +42 -0
  324. package/dist/types/src/core/protocol-authorization-action.d.ts.map +1 -0
  325. package/dist/types/src/core/protocol-authorization-validation.d.ts +60 -0
  326. package/dist/types/src/core/protocol-authorization-validation.d.ts.map +1 -0
  327. package/dist/types/src/core/protocol-authorization.d.ts +10 -100
  328. package/dist/types/src/core/protocol-authorization.d.ts.map +1 -1
  329. package/dist/types/src/core/record-chain.d.ts +24 -0
  330. package/dist/types/src/core/record-chain.d.ts.map +1 -0
  331. package/dist/types/src/handlers/records-write.d.ts +2 -1
  332. package/dist/types/src/handlers/records-write.d.ts.map +1 -1
  333. package/dist/types/src/interfaces/protocols-configure.d.ts.map +1 -1
  334. package/dist/types/src/interfaces/records-write-query.d.ts +33 -0
  335. package/dist/types/src/interfaces/records-write-query.d.ts.map +1 -0
  336. package/dist/types/src/interfaces/records-write-signing.d.ts +35 -0
  337. package/dist/types/src/interfaces/records-write-signing.d.ts.map +1 -0
  338. package/dist/types/src/interfaces/records-write.d.ts +10 -44
  339. package/dist/types/src/interfaces/records-write.d.ts.map +1 -1
  340. package/dist/types/src/store/index-level-compound.d.ts +70 -0
  341. package/dist/types/src/store/index-level-compound.d.ts.map +1 -0
  342. package/dist/types/src/store/index-level.d.ts +0 -58
  343. package/dist/types/src/store/index-level.d.ts.map +1 -1
  344. package/dist/types/src/utils/protocols.d.ts +5 -0
  345. package/dist/types/src/utils/protocols.d.ts.map +1 -1
  346. package/dist/types/tests/features/permissions.spec.d.ts.map +1 -1
  347. package/package.json +2 -2
  348. package/src/core/protocol-authorization-action.ts +377 -0
  349. package/src/core/protocol-authorization-validation.ts +391 -0
  350. package/src/core/protocol-authorization.ts +60 -849
  351. package/src/core/record-chain.ts +99 -0
  352. package/src/handlers/records-read.ts +1 -1
  353. package/src/handlers/records-write.ts +37 -21
  354. package/src/interfaces/protocols-configure.ts +33 -5
  355. package/src/interfaces/records-write-query.ts +139 -0
  356. package/src/interfaces/records-write-signing.ts +143 -0
  357. package/src/interfaces/records-write.ts +49 -221
  358. package/src/store/index-level-compound.ts +324 -0
  359. package/src/store/index-level.ts +24 -306
  360. package/src/utils/protocols.ts +8 -0
  361. package/src/utils/records.ts +1 -1
@@ -1,12 +1,3 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import sinon from 'sinon';
11
2
  import slackProtocolDefinition from '../vectors/protocol-definitions/slack.json' with { type: 'json' };
12
3
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from 'bun:test';
@@ -29,7 +20,7 @@ export function testNestedRoleScenarios() {
29
20
  let dwn;
30
21
  // important to follow the `beforeAll` and `afterAll` pattern to initialize and clean the stores in tests
31
22
  // so that different test suites can reuse the same backend store for testing
32
- beforeAll(() => __awaiter(this, void 0, void 0, function* () {
23
+ beforeAll(async () => {
33
24
  didResolver = new UniversalResolver({ didResolvers: [DidKey] });
34
25
  const stores = TestStores.get();
35
26
  messageStore = stores.messageStore;
@@ -37,20 +28,20 @@ export function testNestedRoleScenarios() {
37
28
  resumableTaskStore = stores.resumableTaskStore;
38
29
  stateIndex = stores.stateIndex;
39
30
  eventStream = TestEventStream.get();
40
- dwn = yield Dwn.create({ didResolver, messageStore, dataStore, stateIndex, eventStream, resumableTaskStore });
41
- }));
42
- beforeEach(() => __awaiter(this, void 0, void 0, function* () {
31
+ dwn = await Dwn.create({ didResolver, messageStore, dataStore, stateIndex, eventStream, resumableTaskStore });
32
+ });
33
+ beforeEach(async () => {
43
34
  sinon.restore(); // wipe all previous stubs/spies/mocks/fakes
44
35
  // clean up before each test rather than after so that a test does not depend on other tests to do the clean up
45
- yield messageStore.clear();
46
- yield dataStore.clear();
47
- yield resumableTaskStore.clear();
48
- yield stateIndex.clear();
49
- }));
50
- afterAll(() => __awaiter(this, void 0, void 0, function* () {
51
- yield dwn.close();
52
- }));
53
- it('should support Slack-like protocol with community and gated channels', () => __awaiter(this, void 0, void 0, function* () {
36
+ await messageStore.clear();
37
+ await dataStore.clear();
38
+ await resumableTaskStore.clear();
39
+ await stateIndex.clear();
40
+ });
41
+ afterAll(async () => {
42
+ await dwn.close();
43
+ });
44
+ it('should support Slack-like protocol with community and gated channels', async () => {
54
45
  // scenario:
55
46
  // 1. Alice installs the Slack-like protocol
56
47
  // 2. Alice creates a community
@@ -71,41 +62,40 @@ export function testNestedRoleScenarios() {
71
62
  // 12. Carol can invoke the participant role to react to Bob's chat message in the channel
72
63
  // 13. Mallory CANNOT invoke the participant role (which she is not given) to read the chat messages in the channel
73
64
  // 14. Mallory CANNOT invoke the participant role (which she is not given) to write a chat message in the channel
74
- var _a, _b, _c, _d;
75
- const alice = yield TestDataGenerator.generateDidKeyPersona();
76
- const bob = yield TestDataGenerator.generateDidKeyPersona();
77
- const carol = yield TestDataGenerator.generateDidKeyPersona();
78
- const daniel = yield TestDataGenerator.generateDidKeyPersona();
79
- const mallory = yield TestDataGenerator.generateDidKeyPersona(); // unauthorized person
65
+ const alice = await TestDataGenerator.generateDidKeyPersona();
66
+ const bob = await TestDataGenerator.generateDidKeyPersona();
67
+ const carol = await TestDataGenerator.generateDidKeyPersona();
68
+ const daniel = await TestDataGenerator.generateDidKeyPersona();
69
+ const mallory = await TestDataGenerator.generateDidKeyPersona(); // unauthorized person
80
70
  const protocolDefinition = slackProtocolDefinition;
81
71
  // 1. Alice installs the Slack-like protocol
82
- const protocolsConfig = yield TestDataGenerator.generateProtocolsConfigure({
72
+ const protocolsConfig = await TestDataGenerator.generateProtocolsConfigure({
83
73
  author: alice,
84
74
  protocolDefinition
85
75
  });
86
- const protocolsConfigureReply = yield dwn.processMessage(alice.did, protocolsConfig.message);
76
+ const protocolsConfigureReply = await dwn.processMessage(alice.did, protocolsConfig.message);
87
77
  expect(protocolsConfigureReply.status.code).toBe(202);
88
78
  // 2. Alice creates a community
89
- const communityRecord = yield TestDataGenerator.generateRecordsWrite({
79
+ const communityRecord = await TestDataGenerator.generateRecordsWrite({
90
80
  author: alice,
91
81
  protocol: protocolDefinition.protocol,
92
82
  protocolPath: 'community'
93
83
  });
94
- const communityRecordReply = yield dwn.processMessage(alice.did, communityRecord.message, { dataStream: communityRecord.dataStream });
84
+ const communityRecordReply = await dwn.processMessage(alice.did, communityRecord.message, { dataStream: communityRecord.dataStream });
95
85
  expect(communityRecordReply.status.code).toBe(202);
96
86
  // 3. Alice can assign Bob as an 'admin' in the community
97
- const communityAdminBobRecord = yield TestDataGenerator.generateRecordsWrite({
87
+ const communityAdminBobRecord = await TestDataGenerator.generateRecordsWrite({
98
88
  author: alice,
99
89
  recipient: bob.did,
100
90
  protocol: protocolDefinition.protocol,
101
91
  protocolPath: 'community/admin',
102
92
  parentContextId: communityRecord.message.contextId,
103
93
  });
104
- const communityAdminBobRecordReply = yield dwn.processMessage(alice.did, communityAdminBobRecord.message, { dataStream: communityAdminBobRecord.dataStream });
94
+ const communityAdminBobRecordReply = await dwn.processMessage(alice.did, communityAdminBobRecord.message, { dataStream: communityAdminBobRecord.dataStream });
105
95
  expect(communityAdminBobRecordReply.status.code).toBe(202);
106
96
  // 4. Bob can invoke his `admin` role to perform actions:
107
97
  // 4a. Bob can read the community record
108
- const bobCommunityRead = yield RecordsRead.create({
98
+ const bobCommunityRead = await RecordsRead.create({
109
99
  signer: Jws.createSigner(bob),
110
100
  protocolRole: 'community/admin',
111
101
  filter: {
@@ -114,30 +104,30 @@ export function testNestedRoleScenarios() {
114
104
  contextId: communityRecord.message.contextId
115
105
  }
116
106
  });
117
- const bobCommunityReadReply = yield dwn.processMessage(alice.did, bobCommunityRead.message);
107
+ const bobCommunityReadReply = await dwn.processMessage(alice.did, bobCommunityRead.message);
118
108
  expect(bobCommunityReadReply.status.code).toBe(200);
119
- expect((_a = bobCommunityReadReply.entry.recordsWrite) === null || _a === void 0 ? void 0 : _a.recordId).toBe(communityRecord.message.recordId);
109
+ expect(bobCommunityReadReply.entry.recordsWrite?.recordId).toBe(communityRecord.message.recordId);
120
110
  // 4b. Bob can create gated-channels 1 & 2 in the community
121
- const channel1Record = yield TestDataGenerator.generateRecordsWrite({
111
+ const channel1Record = await TestDataGenerator.generateRecordsWrite({
122
112
  author: bob,
123
113
  protocol: protocolDefinition.protocol,
124
114
  protocolRole: 'community/admin',
125
115
  protocolPath: 'community/gatedChannel',
126
116
  parentContextId: communityRecord.message.contextId
127
117
  });
128
- const channel1RecordReply = yield dwn.processMessage(alice.did, channel1Record.message, { dataStream: channel1Record.dataStream });
118
+ const channel1RecordReply = await dwn.processMessage(alice.did, channel1Record.message, { dataStream: channel1Record.dataStream });
129
119
  expect(channel1RecordReply.status.code).toBe(202);
130
- const channel2Record = yield TestDataGenerator.generateRecordsWrite({
120
+ const channel2Record = await TestDataGenerator.generateRecordsWrite({
131
121
  author: bob,
132
122
  protocol: protocolDefinition.protocol,
133
123
  protocolRole: 'community/admin',
134
124
  protocolPath: 'community/gatedChannel',
135
125
  parentContextId: communityRecord.message.contextId
136
126
  });
137
- const channel2RecordReply = yield dwn.processMessage(alice.did, channel2Record.message, { dataStream: channel2Record.dataStream });
127
+ const channel2RecordReply = await dwn.processMessage(alice.did, channel2Record.message, { dataStream: channel2Record.dataStream });
138
128
  expect(channel2RecordReply.status.code).toBe(202);
139
129
  // 4c. Bob can query all gated-channels in the community
140
- const bobQuery = yield RecordsQuery.create({
130
+ const bobQuery = await RecordsQuery.create({
141
131
  signer: Jws.createSigner(bob),
142
132
  protocolRole: 'community/admin',
143
133
  filter: {
@@ -146,50 +136,50 @@ export function testNestedRoleScenarios() {
146
136
  contextId: communityRecord.message.contextId
147
137
  }
148
138
  });
149
- const bobQueryReply = yield dwn.processMessage(alice.did, bobQuery.message);
139
+ const bobQueryReply = await dwn.processMessage(alice.did, bobQuery.message);
150
140
  expect(bobQueryReply.status.code).toBe(200);
151
- expect((_b = bobQueryReply.entries) === null || _b === void 0 ? void 0 : _b.length).toBe(2);
141
+ expect(bobQueryReply.entries?.length).toBe(2);
152
142
  // 5. Bob as the creator/author of the channels can add participants in the gated-channels
153
143
  // 5a. Bob can add himself and Carol as participants in the gated-channel 1
154
- const channel1ParticipantBobRecord = yield TestDataGenerator.generateRecordsWrite({
144
+ const channel1ParticipantBobRecord = await TestDataGenerator.generateRecordsWrite({
155
145
  author: bob,
156
146
  recipient: bob.did,
157
147
  protocol: protocolDefinition.protocol,
158
148
  protocolPath: 'community/gatedChannel/participant',
159
149
  parentContextId: channel1Record.message.contextId,
160
150
  });
161
- const channel1ParticipantBobRecordReply = yield dwn.processMessage(alice.did, channel1ParticipantBobRecord.message, { dataStream: channel1ParticipantBobRecord.dataStream });
151
+ const channel1ParticipantBobRecordReply = await dwn.processMessage(alice.did, channel1ParticipantBobRecord.message, { dataStream: channel1ParticipantBobRecord.dataStream });
162
152
  expect(channel1ParticipantBobRecordReply.status.code).toBe(202);
163
- const channel1ParticipantCarolRecord = yield TestDataGenerator.generateRecordsWrite({
153
+ const channel1ParticipantCarolRecord = await TestDataGenerator.generateRecordsWrite({
164
154
  author: bob,
165
155
  recipient: carol.did,
166
156
  protocol: protocolDefinition.protocol,
167
157
  protocolPath: 'community/gatedChannel/participant',
168
158
  parentContextId: channel1Record.message.contextId,
169
159
  });
170
- const channel1ParticipantCarolRecordReply = yield dwn.processMessage(alice.did, channel1ParticipantCarolRecord.message, { dataStream: channel1ParticipantCarolRecord.dataStream });
160
+ const channel1ParticipantCarolRecordReply = await dwn.processMessage(alice.did, channel1ParticipantCarolRecord.message, { dataStream: channel1ParticipantCarolRecord.dataStream });
171
161
  expect(channel1ParticipantCarolRecordReply.status.code).toBe(202);
172
162
  // 5b. Bob can add himself and Daniel as participants in the gated-channel 2
173
- const channel2ParticipantBobRecord = yield TestDataGenerator.generateRecordsWrite({
163
+ const channel2ParticipantBobRecord = await TestDataGenerator.generateRecordsWrite({
174
164
  author: bob,
175
165
  recipient: bob.did,
176
166
  protocol: protocolDefinition.protocol,
177
167
  protocolPath: 'community/gatedChannel/participant',
178
168
  parentContextId: channel2Record.message.contextId,
179
169
  });
180
- const channel2ParticipantBobRecordReply = yield dwn.processMessage(alice.did, channel2ParticipantBobRecord.message, { dataStream: channel2ParticipantBobRecord.dataStream });
170
+ const channel2ParticipantBobRecordReply = await dwn.processMessage(alice.did, channel2ParticipantBobRecord.message, { dataStream: channel2ParticipantBobRecord.dataStream });
181
171
  expect(channel2ParticipantBobRecordReply.status.code).toBe(202);
182
- const channel2ParticipantDanielRecord = yield TestDataGenerator.generateRecordsWrite({
172
+ const channel2ParticipantDanielRecord = await TestDataGenerator.generateRecordsWrite({
183
173
  author: bob,
184
174
  recipient: daniel.did,
185
175
  protocol: protocolDefinition.protocol,
186
176
  protocolPath: 'community/gatedChannel/participant',
187
177
  parentContextId: channel2Record.message.contextId,
188
178
  });
189
- const channel2ParticipantDanielRecordReply = yield dwn.processMessage(alice.did, channel2ParticipantDanielRecord.message, { dataStream: channel2ParticipantDanielRecord.dataStream });
179
+ const channel2ParticipantDanielRecordReply = await dwn.processMessage(alice.did, channel2ParticipantDanielRecord.message, { dataStream: channel2ParticipantDanielRecord.dataStream });
190
180
  expect(channel2ParticipantDanielRecordReply.status.code).toBe(202);
191
181
  // 6. Carol can read the gated channel 1 record by invoking her child participant role to the gated channel 1
192
- const carolRead = yield RecordsRead.create({
182
+ const carolRead = await RecordsRead.create({
193
183
  signer: Jws.createSigner(carol),
194
184
  protocolRole: 'community/gatedChannel/participant',
195
185
  filter: {
@@ -198,11 +188,11 @@ export function testNestedRoleScenarios() {
198
188
  contextId: channel1Record.message.contextId
199
189
  }
200
190
  });
201
- const carolReadReply = yield dwn.processMessage(alice.did, carolRead.message);
191
+ const carolReadReply = await dwn.processMessage(alice.did, carolRead.message);
202
192
  expect(carolReadReply.status.code).toBe(200);
203
- expect((_c = carolReadReply.entry.recordsWrite) === null || _c === void 0 ? void 0 : _c.recordId).toBe(channel1Record.message.recordId);
193
+ expect(carolReadReply.entry.recordsWrite?.recordId).toBe(channel1Record.message.recordId);
204
194
  // 7. Carol CANNOT add anyone as a participant in the gated-channel 2 since she is not a participant in the channel
205
- const participantCarolRecord = yield TestDataGenerator.generateRecordsWrite({
195
+ const participantCarolRecord = await TestDataGenerator.generateRecordsWrite({
206
196
  author: carol,
207
197
  recipient: carol.did,
208
198
  protocol: protocolDefinition.protocol,
@@ -210,22 +200,22 @@ export function testNestedRoleScenarios() {
210
200
  protocolPath: 'community/gatedChannel/participant',
211
201
  parentContextId: channel2Record.message.contextId
212
202
  });
213
- const participantCarolRecordReply = yield dwn.processMessage(alice.did, participantCarolRecord.message, { dataStream: participantCarolRecord.dataStream });
203
+ const participantCarolRecordReply = await dwn.processMessage(alice.did, participantCarolRecord.message, { dataStream: participantCarolRecord.dataStream });
214
204
  expect(participantCarolRecordReply.status.code).toBe(401);
215
205
  expect(participantCarolRecordReply.status.detail).toContain(DwnErrorCode.ProtocolAuthorizationMatchingRoleRecordNotFound);
216
206
  // 8. Carol CANNOT add Daniel as another participant in the gated-channel without invoking her role
217
- const participantDanielRecordAttempt1 = yield TestDataGenerator.generateRecordsWrite({
207
+ const participantDanielRecordAttempt1 = await TestDataGenerator.generateRecordsWrite({
218
208
  author: carol,
219
209
  recipient: daniel.did,
220
210
  protocol: protocolDefinition.protocol,
221
211
  protocolPath: 'community/gatedChannel/participant',
222
212
  parentContextId: channel1Record.message.contextId,
223
213
  });
224
- const participantDanielRecordAttempt1Reply = yield dwn.processMessage(alice.did, participantDanielRecordAttempt1.message, { dataStream: participantDanielRecordAttempt1.dataStream });
214
+ const participantDanielRecordAttempt1Reply = await dwn.processMessage(alice.did, participantDanielRecordAttempt1.message, { dataStream: participantDanielRecordAttempt1.dataStream });
225
215
  expect(participantDanielRecordAttempt1Reply.status.code).toBe(401);
226
216
  expect(participantDanielRecordAttempt1Reply.status.detail).toContain(DwnErrorCode.ProtocolAuthorizationActionNotAllowed);
227
217
  // 9. Carol can invoke her participant role to add Daniel as another participant in the gated-channel
228
- const participantDanielRecordAttempt2 = yield TestDataGenerator.generateRecordsWrite({
218
+ const participantDanielRecordAttempt2 = await TestDataGenerator.generateRecordsWrite({
229
219
  author: carol,
230
220
  recipient: daniel.did,
231
221
  protocol: protocolDefinition.protocol,
@@ -233,20 +223,20 @@ export function testNestedRoleScenarios() {
233
223
  protocolPath: 'community/gatedChannel/participant',
234
224
  parentContextId: channel1Record.message.contextId,
235
225
  });
236
- const participantDanielRecordAttempt2Reply = yield dwn.processMessage(alice.did, participantDanielRecordAttempt2.message, { dataStream: participantDanielRecordAttempt2.dataStream });
226
+ const participantDanielRecordAttempt2Reply = await dwn.processMessage(alice.did, participantDanielRecordAttempt2.message, { dataStream: participantDanielRecordAttempt2.dataStream });
237
227
  expect(participantDanielRecordAttempt2Reply.status.code).toBe(202);
238
228
  // 10. Bob can invoke the participant role to write a chat message in the channel
239
- const bobChatMessage = yield TestDataGenerator.generateRecordsWrite({
229
+ const bobChatMessage = await TestDataGenerator.generateRecordsWrite({
240
230
  author: bob,
241
231
  protocol: protocolDefinition.protocol,
242
232
  protocolRole: 'community/gatedChannel/participant',
243
233
  protocolPath: 'community/gatedChannel/message',
244
234
  parentContextId: channel1Record.message.contextId
245
235
  });
246
- const bobChatMessageReply = yield dwn.processMessage(alice.did, bobChatMessage.message, { dataStream: bobChatMessage.dataStream });
236
+ const bobChatMessageReply = await dwn.processMessage(alice.did, bobChatMessage.message, { dataStream: bobChatMessage.dataStream });
247
237
  expect(bobChatMessageReply.status.code).toBe(202);
248
238
  // 11. Carol can invoke the participant role to read chat messages in the channel
249
- const carolQuery = yield RecordsQuery.create({
239
+ const carolQuery = await RecordsQuery.create({
250
240
  signer: Jws.createSigner(carol),
251
241
  protocolRole: 'community/gatedChannel/participant',
252
242
  filter: {
@@ -255,21 +245,21 @@ export function testNestedRoleScenarios() {
255
245
  contextId: channel1Record.message.contextId
256
246
  }
257
247
  });
258
- const carolQueryReply = yield dwn.processMessage(alice.did, carolQuery.message);
248
+ const carolQueryReply = await dwn.processMessage(alice.did, carolQuery.message);
259
249
  expect(carolQueryReply.status.code).toBe(200);
260
- expect((_d = carolQueryReply.entries) === null || _d === void 0 ? void 0 : _d[0].recordId).toBe(bobChatMessage.message.recordId);
250
+ expect(carolQueryReply.entries?.[0].recordId).toBe(bobChatMessage.message.recordId);
261
251
  // 12. Carol can invoke the participant role to react to Bob's chat message in the channel
262
- const carolReaction = yield TestDataGenerator.generateRecordsWrite({
252
+ const carolReaction = await TestDataGenerator.generateRecordsWrite({
263
253
  author: bob,
264
254
  protocol: protocolDefinition.protocol,
265
255
  protocolRole: 'community/gatedChannel/participant',
266
256
  protocolPath: 'community/gatedChannel/message/reaction',
267
257
  parentContextId: bobChatMessage.message.contextId
268
258
  });
269
- const carolReactionReply = yield dwn.processMessage(alice.did, carolReaction.message, { dataStream: carolReaction.dataStream });
259
+ const carolReactionReply = await dwn.processMessage(alice.did, carolReaction.message, { dataStream: carolReaction.dataStream });
270
260
  expect(carolReactionReply.status.code).toBe(202);
271
261
  // 13. Mallory CANNOT invoke the participant role (which she is not given) to read the chat messages in the channel
272
- const malloryQuery = yield RecordsQuery.create({
262
+ const malloryQuery = await RecordsQuery.create({
273
263
  signer: Jws.createSigner(mallory),
274
264
  protocolRole: 'community/gatedChannel/participant',
275
265
  filter: {
@@ -278,21 +268,21 @@ export function testNestedRoleScenarios() {
278
268
  contextId: channel1Record.message.contextId
279
269
  }
280
270
  });
281
- const malloryQueryReply = yield dwn.processMessage(alice.did, malloryQuery.message);
271
+ const malloryQueryReply = await dwn.processMessage(alice.did, malloryQuery.message);
282
272
  expect(malloryQueryReply.status.code).toBe(401);
283
273
  expect(malloryQueryReply.status.detail).toContain(DwnErrorCode.ProtocolAuthorizationMatchingRoleRecordNotFound);
284
274
  // 14. Mallory CANNOT invoke the participant role (which she is not given) to write a chat message in the channel
285
- const malloryChatMessage = yield TestDataGenerator.generateRecordsWrite({
275
+ const malloryChatMessage = await TestDataGenerator.generateRecordsWrite({
286
276
  author: mallory,
287
277
  protocol: protocolDefinition.protocol,
288
278
  protocolRole: 'community/gatedChannel/participant',
289
279
  protocolPath: 'community/gatedChannel/message',
290
280
  parentContextId: channel1Record.message.contextId
291
281
  });
292
- const malloryChatMessageReply = yield dwn.processMessage(alice.did, malloryChatMessage.message, { dataStream: malloryChatMessage.dataStream });
282
+ const malloryChatMessageReply = await dwn.processMessage(alice.did, malloryChatMessage.message, { dataStream: malloryChatMessage.dataStream });
293
283
  expect(malloryChatMessageReply.status.code).toBe(401);
294
284
  expect(malloryChatMessageReply.status.detail).toContain(DwnErrorCode.ProtocolAuthorizationMatchingRoleRecordNotFound);
295
- }));
285
+ });
296
286
  });
297
287
  }
298
288
  //# sourceMappingURL=nested-roles.spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nested-roles.spec.js","sourceRoot":"","sources":["../../../../tests/scenarios/nested-roles.spec.ts"],"names":[],"mappings":";;;;;;;;;AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,uBAAuB,MAAM,4CAA4C,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,SA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