@pkcprotocol/pkc-js 0.0.11

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 (843) hide show
  1. package/LICENSE +339 -0
  2. package/README.md +1663 -0
  3. package/dist/browser/challenges.d.ts +1 -0
  4. package/dist/browser/challenges.js +2 -0
  5. package/dist/browser/challenges.js.map +1 -0
  6. package/dist/browser/clients/base-client-manager.d.ts +126 -0
  7. package/dist/browser/clients/base-client-manager.js +673 -0
  8. package/dist/browser/clients/base-client-manager.js.map +1 -0
  9. package/dist/browser/clients/name-resolver-client.d.ts +8 -0
  10. package/dist/browser/clients/name-resolver-client.js +10 -0
  11. package/dist/browser/clients/name-resolver-client.js.map +1 -0
  12. package/dist/browser/clients/pkc-typed-emitter.d.ts +9 -0
  13. package/dist/browser/clients/pkc-typed-emitter.js +52 -0
  14. package/dist/browser/clients/pkc-typed-emitter.js.map +1 -0
  15. package/dist/browser/clients/rpc-client/decode-rpc-response-util.d.ts +8 -0
  16. package/dist/browser/clients/rpc-client/decode-rpc-response-util.js +53 -0
  17. package/dist/browser/clients/rpc-client/decode-rpc-response-util.js.map +1 -0
  18. package/dist/browser/clients/rpc-client/pkc-rpc-client.d.ts +68 -0
  19. package/dist/browser/clients/rpc-client/pkc-rpc-client.js +404 -0
  20. package/dist/browser/clients/rpc-client/pkc-rpc-client.js.map +1 -0
  21. package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +147 -0
  22. package/dist/browser/clients/rpc-client/rpc-schema-util.js +11 -0
  23. package/dist/browser/clients/rpc-client/rpc-schema-util.js.map +1 -0
  24. package/dist/browser/clients/rpc-client/schema.d.ts +433 -0
  25. package/dist/browser/clients/rpc-client/schema.js +49 -0
  26. package/dist/browser/clients/rpc-client/schema.js.map +1 -0
  27. package/dist/browser/clients/rpc-client/types.d.ts +8 -0
  28. package/dist/browser/clients/rpc-client/types.js +2 -0
  29. package/dist/browser/clients/rpc-client/types.js.map +1 -0
  30. package/dist/browser/community/community-client-manager.d.ts +60 -0
  31. package/dist/browser/community/community-client-manager.js +717 -0
  32. package/dist/browser/community/community-client-manager.js.map +1 -0
  33. package/dist/browser/community/community-clients.d.ts +18 -0
  34. package/dist/browser/community/community-clients.js +12 -0
  35. package/dist/browser/community/community-clients.js.map +1 -0
  36. package/dist/browser/community/community-wire.d.ts +20 -0
  37. package/dist/browser/community/community-wire.js +38 -0
  38. package/dist/browser/community/community-wire.js.map +1 -0
  39. package/dist/browser/community/remote-community.d.ts +110 -0
  40. package/dist/browser/community/remote-community.js +555 -0
  41. package/dist/browser/community/remote-community.js.map +1 -0
  42. package/dist/browser/community/rpc-local-community.d.ts +41 -0
  43. package/dist/browser/community/rpc-local-community.js +289 -0
  44. package/dist/browser/community/rpc-local-community.js.map +1 -0
  45. package/dist/browser/community/rpc-remote-community.d.ts +18 -0
  46. package/dist/browser/community/rpc-remote-community.js +286 -0
  47. package/dist/browser/community/rpc-remote-community.js.map +1 -0
  48. package/dist/browser/community/schema.d.ts +4217 -0
  49. package/dist/browser/community/schema.js +289 -0
  50. package/dist/browser/community/schema.js.map +1 -0
  51. package/dist/browser/community/types.d.ts +135 -0
  52. package/dist/browser/community/types.js +2 -0
  53. package/dist/browser/community/types.js.map +1 -0
  54. package/dist/browser/constants.d.ts +6 -0
  55. package/dist/browser/constants.js +9 -0
  56. package/dist/browser/constants.js.map +1 -0
  57. package/dist/browser/decorator-util.d.ts +1 -0
  58. package/dist/browser/decorator-util.js +35 -0
  59. package/dist/browser/decorator-util.js.map +1 -0
  60. package/dist/browser/errors.d.ts +343 -0
  61. package/dist/browser/errors.js +358 -0
  62. package/dist/browser/errors.js.map +1 -0
  63. package/dist/browser/general-util/limited-set.d.ts +15 -0
  64. package/dist/browser/general-util/limited-set.js +66 -0
  65. package/dist/browser/general-util/limited-set.js.map +1 -0
  66. package/dist/browser/generated-version.d.ts +1 -0
  67. package/dist/browser/generated-version.js +3 -0
  68. package/dist/browser/generated-version.js.map +1 -0
  69. package/dist/browser/generic-state-client.d.ts +6 -0
  70. package/dist/browser/generic-state-client.js +11 -0
  71. package/dist/browser/generic-state-client.js.map +1 -0
  72. package/dist/browser/helia/helia-for-pkc.d.ts +3 -0
  73. package/dist/browser/helia/helia-for-pkc.js +255 -0
  74. package/dist/browser/helia/helia-for-pkc.js.map +1 -0
  75. package/dist/browser/helia/ipns-over-pubsub-with-fetch.d.ts +36 -0
  76. package/dist/browser/helia/ipns-over-pubsub-with-fetch.js +229 -0
  77. package/dist/browser/helia/ipns-over-pubsub-with-fetch.js.map +1 -0
  78. package/dist/browser/helia/libp2pjsClient.d.ts +27 -0
  79. package/dist/browser/helia/libp2pjsClient.js +15 -0
  80. package/dist/browser/helia/libp2pjsClient.js.map +1 -0
  81. package/dist/browser/helia/types.d.ts +19 -0
  82. package/dist/browser/helia/types.js +2 -0
  83. package/dist/browser/helia/types.js.map +1 -0
  84. package/dist/browser/helia/util.d.ts +13 -0
  85. package/dist/browser/helia/util.js +98 -0
  86. package/dist/browser/helia/util.js.map +1 -0
  87. package/dist/browser/index.d.ts +244 -0
  88. package/dist/browser/index.js +36 -0
  89. package/dist/browser/index.js.map +1 -0
  90. package/dist/browser/logger.d.ts +12 -0
  91. package/dist/browser/logger.js +11 -0
  92. package/dist/browser/logger.js.map +1 -0
  93. package/dist/browser/pages/pages-client-manager.d.ts +159 -0
  94. package/dist/browser/pages/pages-client-manager.js +334 -0
  95. package/dist/browser/pages/pages-client-manager.js.map +1 -0
  96. package/dist/browser/pages/pages-clients.d.ts +11 -0
  97. package/dist/browser/pages/pages-clients.js +10 -0
  98. package/dist/browser/pages/pages-clients.js.map +1 -0
  99. package/dist/browser/pages/pages.d.ts +107 -0
  100. package/dist/browser/pages/pages.js +262 -0
  101. package/dist/browser/pages/pages.js.map +1 -0
  102. package/dist/browser/pages/schema-util.d.ts +3 -0
  103. package/dist/browser/pages/schema-util.js +3 -0
  104. package/dist/browser/pages/schema-util.js.map +1 -0
  105. package/dist/browser/pages/schema.d.ts +719 -0
  106. package/dist/browser/pages/schema.js +32 -0
  107. package/dist/browser/pages/schema.js.map +1 -0
  108. package/dist/browser/pages/types.d.ts +44 -0
  109. package/dist/browser/pages/types.js +2 -0
  110. package/dist/browser/pages/types.js.map +1 -0
  111. package/dist/browser/pages/util.d.ts +56 -0
  112. package/dist/browser/pages/util.js +446 -0
  113. package/dist/browser/pages/util.js.map +1 -0
  114. package/dist/browser/pkc/pkc-client-manager.d.ts +44 -0
  115. package/dist/browser/pkc/pkc-client-manager.js +156 -0
  116. package/dist/browser/pkc/pkc-client-manager.js.map +1 -0
  117. package/dist/browser/pkc/pkc-clients.d.ts +11 -0
  118. package/dist/browser/pkc/pkc-clients.js +8 -0
  119. package/dist/browser/pkc/pkc-clients.js.map +1 -0
  120. package/dist/browser/pkc/pkc-with-rpc-client.d.ts +19 -0
  121. package/dist/browser/pkc/pkc-with-rpc-client.js +128 -0
  122. package/dist/browser/pkc/pkc-with-rpc-client.js.map +1 -0
  123. package/dist/browser/pkc/pkc.d.ts +137 -0
  124. package/dist/browser/pkc/pkc.js +888 -0
  125. package/dist/browser/pkc/pkc.js.map +1 -0
  126. package/dist/browser/pkc/tracked-instance-registry-util.d.ts +44 -0
  127. package/dist/browser/pkc/tracked-instance-registry-util.js +106 -0
  128. package/dist/browser/pkc/tracked-instance-registry-util.js.map +1 -0
  129. package/dist/browser/pkc/tracked-instance-registry.d.ts +18 -0
  130. package/dist/browser/pkc/tracked-instance-registry.js +134 -0
  131. package/dist/browser/pkc/tracked-instance-registry.js.map +1 -0
  132. package/dist/browser/pkc-error.d.ts +65 -0
  133. package/dist/browser/pkc-error.js +137 -0
  134. package/dist/browser/pkc-error.js.map +1 -0
  135. package/dist/browser/publications/comment/comment-client-manager.d.ts +86 -0
  136. package/dist/browser/publications/comment/comment-client-manager.js +908 -0
  137. package/dist/browser/publications/comment/comment-client-manager.js.map +1 -0
  138. package/dist/browser/publications/comment/comment-clients.d.ts +19 -0
  139. package/dist/browser/publications/comment/comment-clients.js +12 -0
  140. package/dist/browser/publications/comment/comment-clients.js.map +1 -0
  141. package/dist/browser/publications/comment/comment-util.d.ts +10 -0
  142. package/dist/browser/publications/comment/comment-util.js +202 -0
  143. package/dist/browser/publications/comment/comment-util.js.map +1 -0
  144. package/dist/browser/publications/comment/comment.d.ts +147 -0
  145. package/dist/browser/publications/comment/comment.js +1044 -0
  146. package/dist/browser/publications/comment/comment.js.map +1 -0
  147. package/dist/browser/publications/comment/schema.d.ts +1237 -0
  148. package/dist/browser/publications/comment/schema.js +184 -0
  149. package/dist/browser/publications/comment/schema.js.map +1 -0
  150. package/dist/browser/publications/comment/types.d.ts +100 -0
  151. package/dist/browser/publications/comment/types.js +2 -0
  152. package/dist/browser/publications/comment/types.js.map +1 -0
  153. package/dist/browser/publications/comment-edit/comment-edit.d.ts +41 -0
  154. package/dist/browser/publications/comment-edit/comment-edit.js +63 -0
  155. package/dist/browser/publications/comment-edit/comment-edit.js.map +1 -0
  156. package/dist/browser/publications/comment-edit/schema.d.ts +295 -0
  157. package/dist/browser/publications/comment-edit/schema.js +55 -0
  158. package/dist/browser/publications/comment-edit/schema.js.map +1 -0
  159. package/dist/browser/publications/comment-edit/types.d.ts +25 -0
  160. package/dist/browser/publications/comment-edit/types.js +2 -0
  161. package/dist/browser/publications/comment-edit/types.js.map +1 -0
  162. package/dist/browser/publications/comment-moderation/comment-moderation.d.ts +36 -0
  163. package/dist/browser/publications/comment-moderation/comment-moderation.js +53 -0
  164. package/dist/browser/publications/comment-moderation/comment-moderation.js.map +1 -0
  165. package/dist/browser/publications/comment-moderation/schema.d.ts +315 -0
  166. package/dist/browser/publications/comment-moderation/schema.js +62 -0
  167. package/dist/browser/publications/comment-moderation/schema.js.map +1 -0
  168. package/dist/browser/publications/comment-moderation/types.d.ts +22 -0
  169. package/dist/browser/publications/comment-moderation/types.js +2 -0
  170. package/dist/browser/publications/comment-moderation/types.js.map +1 -0
  171. package/dist/browser/publications/community-edit/community-edit.d.ts +35 -0
  172. package/dist/browser/publications/community-edit/community-edit.js +50 -0
  173. package/dist/browser/publications/community-edit/community-edit.js.map +1 -0
  174. package/dist/browser/publications/community-edit/schema.d.ts +467 -0
  175. package/dist/browser/publications/community-edit/schema.js +36 -0
  176. package/dist/browser/publications/community-edit/schema.js.map +1 -0
  177. package/dist/browser/publications/community-edit/types.d.ts +19 -0
  178. package/dist/browser/publications/community-edit/types.js +2 -0
  179. package/dist/browser/publications/community-edit/types.js.map +1 -0
  180. package/dist/browser/publications/publication-author.d.ts +22 -0
  181. package/dist/browser/publications/publication-author.js +66 -0
  182. package/dist/browser/publications/publication-author.js.map +1 -0
  183. package/dist/browser/publications/publication-client-manager.d.ts +62 -0
  184. package/dist/browser/publications/publication-client-manager.js +257 -0
  185. package/dist/browser/publications/publication-client-manager.js.map +1 -0
  186. package/dist/browser/publications/publication-clients.d.ts +19 -0
  187. package/dist/browser/publications/publication-clients.js +12 -0
  188. package/dist/browser/publications/publication-clients.js.map +1 -0
  189. package/dist/browser/publications/publication-community.d.ts +55 -0
  190. package/dist/browser/publications/publication-community.js +87 -0
  191. package/dist/browser/publications/publication-community.js.map +1 -0
  192. package/dist/browser/publications/publication.d.ts +120 -0
  193. package/dist/browser/publications/publication.js +950 -0
  194. package/dist/browser/publications/publication.js.map +1 -0
  195. package/dist/browser/publications/types.d.ts +26 -0
  196. package/dist/browser/publications/types.js +2 -0
  197. package/dist/browser/publications/types.js.map +1 -0
  198. package/dist/browser/publications/vote/schema.d.ts +150 -0
  199. package/dist/browser/publications/vote/schema.js +44 -0
  200. package/dist/browser/publications/vote/schema.js.map +1 -0
  201. package/dist/browser/publications/vote/types.d.ts +21 -0
  202. package/dist/browser/publications/vote/types.js +2 -0
  203. package/dist/browser/publications/vote/types.js.map +1 -0
  204. package/dist/browser/publications/vote/vote.d.ts +36 -0
  205. package/dist/browser/publications/vote/vote.js +49 -0
  206. package/dist/browser/publications/vote/vote.js.map +1 -0
  207. package/dist/browser/pubsub-messages/schema.d.ts +964 -0
  208. package/dist/browser/pubsub-messages/schema.js +98 -0
  209. package/dist/browser/pubsub-messages/schema.js.map +1 -0
  210. package/dist/browser/pubsub-messages/types.d.ts +81 -0
  211. package/dist/browser/pubsub-messages/types.js +2 -0
  212. package/dist/browser/pubsub-messages/types.js.map +1 -0
  213. package/dist/browser/rpc/src/index.d.ts +483 -0
  214. package/dist/browser/rpc/src/index.js +1267 -0
  215. package/dist/browser/rpc/src/index.js.map +1 -0
  216. package/dist/browser/rpc/src/json-rpc-util.d.ts +1 -0
  217. package/dist/browser/rpc/src/json-rpc-util.js +19 -0
  218. package/dist/browser/rpc/src/json-rpc-util.js.map +1 -0
  219. package/dist/browser/rpc/src/lib/pkc-js/index.d.ts +132 -0
  220. package/dist/browser/rpc/src/lib/pkc-js/index.js +29 -0
  221. package/dist/browser/rpc/src/lib/pkc-js/index.js.map +1 -0
  222. package/dist/browser/rpc/src/lib/pkc-js/pkc-js-mock.d.ts +1 -0
  223. package/dist/browser/rpc/src/lib/pkc-js/pkc-js-mock.js +472 -0
  224. package/dist/browser/rpc/src/lib/pkc-js/pkc-js-mock.js.map +1 -0
  225. package/dist/browser/rpc/src/schema.d.ts +843 -0
  226. package/dist/browser/rpc/src/schema.js +28 -0
  227. package/dist/browser/rpc/src/schema.js.map +1 -0
  228. package/dist/browser/rpc/src/types.d.ts +24 -0
  229. package/dist/browser/rpc/src/types.js +2 -0
  230. package/dist/browser/rpc/src/types.js.map +1 -0
  231. package/dist/browser/rpc/src/utils.d.ts +7 -0
  232. package/dist/browser/rpc/src/utils.js +58 -0
  233. package/dist/browser/rpc/src/utils.js.map +1 -0
  234. package/dist/browser/runtime/browser/community/challenges/index.d.ts +6 -0
  235. package/dist/browser/runtime/browser/community/challenges/index.js +7 -0
  236. package/dist/browser/runtime/browser/community/challenges/index.js.map +1 -0
  237. package/dist/browser/runtime/browser/community/local-community.d.ts +3 -0
  238. package/dist/browser/runtime/browser/community/local-community.js +6 -0
  239. package/dist/browser/runtime/browser/community/local-community.js.map +1 -0
  240. package/dist/browser/runtime/browser/db-handler.d.ts +4 -0
  241. package/dist/browser/runtime/browser/db-handler.js +8 -0
  242. package/dist/browser/runtime/browser/db-handler.js.map +1 -0
  243. package/dist/browser/runtime/browser/localforage-lru.d.ts +15 -0
  244. package/dist/browser/runtime/browser/localforage-lru.js +140 -0
  245. package/dist/browser/runtime/browser/localforage-lru.js.map +1 -0
  246. package/dist/browser/runtime/browser/lru-storage.d.ts +14 -0
  247. package/dist/browser/runtime/browser/lru-storage.js +34 -0
  248. package/dist/browser/runtime/browser/lru-storage.js.map +1 -0
  249. package/dist/browser/runtime/browser/native-functions.d.ts +3 -0
  250. package/dist/browser/runtime/browser/native-functions.js +6 -0
  251. package/dist/browser/runtime/browser/native-functions.js.map +1 -0
  252. package/dist/browser/runtime/browser/polyfill.d.ts +3 -0
  253. package/dist/browser/runtime/browser/polyfill.js +37 -0
  254. package/dist/browser/runtime/browser/polyfill.js.map +1 -0
  255. package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.d.ts +1 -0
  256. package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.js +4 -0
  257. package/dist/browser/runtime/browser/setup-kubo-address-rewriter-and-http-router.js.map +1 -0
  258. package/dist/browser/runtime/browser/storage.d.ts +13 -0
  259. package/dist/browser/runtime/browser/storage.js +37 -0
  260. package/dist/browser/runtime/browser/storage.js.map +1 -0
  261. package/dist/browser/runtime/browser/util.d.ts +14 -0
  262. package/dist/browser/runtime/browser/util.js +61 -0
  263. package/dist/browser/runtime/browser/util.js.map +1 -0
  264. package/dist/browser/runtime/node/address-rewriter-db.d.ts +31 -0
  265. package/dist/browser/runtime/node/address-rewriter-db.js +156 -0
  266. package/dist/browser/runtime/node/address-rewriter-db.js.map +1 -0
  267. package/dist/browser/runtime/node/addresses-rewriter-proxy-server.d.ts +45 -0
  268. package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js +493 -0
  269. package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js.map +1 -0
  270. package/dist/browser/runtime/node/community/challenges/exclude/exclude.d.ts +8 -0
  271. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js +280 -0
  272. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js.map +1 -0
  273. package/dist/browser/runtime/node/community/challenges/exclude/index.d.ts +3 -0
  274. package/dist/browser/runtime/node/community/challenges/exclude/index.js +4 -0
  275. package/dist/browser/runtime/node/community/challenges/exclude/index.js.map +1 -0
  276. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.d.ts +5 -0
  277. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js +127 -0
  278. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -0
  279. package/dist/browser/runtime/node/community/challenges/exclude/utils.d.ts +13 -0
  280. package/dist/browser/runtime/node/community/challenges/exclude/utils.js +52 -0
  281. package/dist/browser/runtime/node/community/challenges/exclude/utils.js.map +1 -0
  282. package/dist/browser/runtime/node/community/challenges/index.d.ts +32 -0
  283. package/dist/browser/runtime/node/community/challenges/index.js +307 -0
  284. package/dist/browser/runtime/node/community/challenges/index.js.map +1 -0
  285. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/blacklist.d.ts +5 -0
  286. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/blacklist.js +118 -0
  287. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/blacklist.js.map +1 -0
  288. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/fail.d.ts +5 -0
  289. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/fail.js +26 -0
  290. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/fail.js.map +1 -0
  291. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.d.ts +5 -0
  292. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +135 -0
  293. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -0
  294. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/question.d.ts +5 -0
  295. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/question.js +66 -0
  296. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/question.js.map +1 -0
  297. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/text-math.d.ts +5 -0
  298. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/text-math.js +61 -0
  299. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/text-math.js.map +1 -0
  300. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/whitelist.d.ts +5 -0
  301. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/whitelist.js +118 -0
  302. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/whitelist.js.map +1 -0
  303. package/dist/browser/runtime/node/community/db-handler-types.d.ts +19 -0
  304. package/dist/browser/runtime/node/community/db-handler-types.js +2 -0
  305. package/dist/browser/runtime/node/community/db-handler-types.js.map +1 -0
  306. package/dist/browser/runtime/node/community/db-handler.d.ts +226 -0
  307. package/dist/browser/runtime/node/community/db-handler.js +2462 -0
  308. package/dist/browser/runtime/node/community/db-handler.js.map +1 -0
  309. package/dist/browser/runtime/node/community/db-row-parser.d.ts +19 -0
  310. package/dist/browser/runtime/node/community/db-row-parser.js +40 -0
  311. package/dist/browser/runtime/node/community/db-row-parser.js.map +1 -0
  312. package/dist/browser/runtime/node/community/keyv-better-sqlite3.d.ts +68 -0
  313. package/dist/browser/runtime/node/community/keyv-better-sqlite3.js +251 -0
  314. package/dist/browser/runtime/node/community/keyv-better-sqlite3.js.map +1 -0
  315. package/dist/browser/runtime/node/community/local-community.d.ts +129 -0
  316. package/dist/browser/runtime/node/community/local-community.js +2978 -0
  317. package/dist/browser/runtime/node/community/local-community.js.map +1 -0
  318. package/dist/browser/runtime/node/community/page-generator.d.ts +433 -0
  319. package/dist/browser/runtime/node/community/page-generator.js +441 -0
  320. package/dist/browser/runtime/node/community/page-generator.js.map +1 -0
  321. package/dist/browser/runtime/node/lru-storage.d.ts +14 -0
  322. package/dist/browser/runtime/node/lru-storage.js +40 -0
  323. package/dist/browser/runtime/node/lru-storage.js.map +1 -0
  324. package/dist/browser/runtime/node/native-functions.d.ts +3 -0
  325. package/dist/browser/runtime/node/native-functions.js +7 -0
  326. package/dist/browser/runtime/node/native-functions.js.map +1 -0
  327. package/dist/browser/runtime/node/polyfill.d.ts +3 -0
  328. package/dist/browser/runtime/node/polyfill.js +20 -0
  329. package/dist/browser/runtime/node/polyfill.js.map +1 -0
  330. package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.d.ts +4 -0
  331. package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js +240 -0
  332. package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -0
  333. package/dist/browser/runtime/node/sqlite-lru-cache.d.ts +52 -0
  334. package/dist/browser/runtime/node/sqlite-lru-cache.js +127 -0
  335. package/dist/browser/runtime/node/sqlite-lru-cache.js.map +1 -0
  336. package/dist/browser/runtime/node/storage.d.ts +14 -0
  337. package/dist/browser/runtime/node/storage.js +52 -0
  338. package/dist/browser/runtime/node/storage.js.map +1 -0
  339. package/dist/browser/runtime/node/test/helpers/hanging-runner.d.ts +1 -0
  340. package/dist/browser/runtime/node/test/helpers/hanging-runner.js +157 -0
  341. package/dist/browser/runtime/node/test/helpers/hanging-runner.js.map +1 -0
  342. package/dist/browser/runtime/node/test/helpers/run-hanging-node.d.ts +7 -0
  343. package/dist/browser/runtime/node/test/helpers/run-hanging-node.js +68 -0
  344. package/dist/browser/runtime/node/test/helpers/run-hanging-node.js.map +1 -0
  345. package/dist/browser/runtime/node/test/mock-http-router.d.ts +54 -0
  346. package/dist/browser/runtime/node/test/mock-http-router.js +397 -0
  347. package/dist/browser/runtime/node/test/mock-http-router.js.map +1 -0
  348. package/dist/browser/runtime/node/util.d.ts +43 -0
  349. package/dist/browser/runtime/node/util.js +384 -0
  350. package/dist/browser/runtime/node/util.js.map +1 -0
  351. package/dist/browser/schema/schema-util.d.ts +2751 -0
  352. package/dist/browser/schema/schema-util.js +562 -0
  353. package/dist/browser/schema/schema-util.js.map +1 -0
  354. package/dist/browser/schema/schema.d.ts +237 -0
  355. package/dist/browser/schema/schema.js +128 -0
  356. package/dist/browser/schema/schema.js.map +1 -0
  357. package/dist/browser/schema.d.ts +1142 -0
  358. package/dist/browser/schema.js +104 -0
  359. package/dist/browser/schema.js.map +1 -0
  360. package/dist/browser/signer/constants.d.ts +2 -0
  361. package/dist/browser/signer/constants.js +3 -0
  362. package/dist/browser/signer/constants.js.map +1 -0
  363. package/dist/browser/signer/encryption.d.ts +21 -0
  364. package/dist/browser/signer/encryption.js +122 -0
  365. package/dist/browser/signer/encryption.js.map +1 -0
  366. package/dist/browser/signer/index.d.ts +21 -0
  367. package/dist/browser/signer/index.js +49 -0
  368. package/dist/browser/signer/index.js.map +1 -0
  369. package/dist/browser/signer/signatures.d.ts +200 -0
  370. package/dist/browser/signer/signatures.js +594 -0
  371. package/dist/browser/signer/signatures.js.map +1 -0
  372. package/dist/browser/signer/types.d.ts +20 -0
  373. package/dist/browser/signer/types.js +2 -0
  374. package/dist/browser/signer/types.js.map +1 -0
  375. package/dist/browser/signer/util.d.ts +14 -0
  376. package/dist/browser/signer/util.js +156 -0
  377. package/dist/browser/signer/util.js.map +1 -0
  378. package/dist/browser/stats.d.ts +15 -0
  379. package/dist/browser/stats.js +64 -0
  380. package/dist/browser/stats.js.map +1 -0
  381. package/dist/browser/test/mock-ipfs-client.d.ts +34 -0
  382. package/dist/browser/test/mock-ipfs-client.js +208 -0
  383. package/dist/browser/test/mock-ipfs-client.js.map +1 -0
  384. package/dist/browser/test/node/hanging-test/scenarios/comment-publish-pending.scenario.d.ts +8 -0
  385. package/dist/browser/test/node/hanging-test/scenarios/comment-publish-pending.scenario.js +21 -0
  386. package/dist/browser/test/node/hanging-test/scenarios/comment-publish-pending.scenario.js.map +1 -0
  387. package/dist/browser/test/node/hanging-test/scenarios/comment-publish.scenario.d.ts +8 -0
  388. package/dist/browser/test/node/hanging-test/scenarios/comment-publish.scenario.js +19 -0
  389. package/dist/browser/test/node/hanging-test/scenarios/comment-publish.scenario.js.map +1 -0
  390. package/dist/browser/test/node/hanging-test/scenarios/comment-update.scenario.d.ts +8 -0
  391. package/dist/browser/test/node/hanging-test/scenarios/comment-update.scenario.js +22 -0
  392. package/dist/browser/test/node/hanging-test/scenarios/comment-update.scenario.js.map +1 -0
  393. package/dist/browser/test/node/hanging-test/scenarios/community-start.scenario.d.ts +8 -0
  394. package/dist/browser/test/node/hanging-test/scenarios/community-start.scenario.js +23 -0
  395. package/dist/browser/test/node/hanging-test/scenarios/community-start.scenario.js.map +1 -0
  396. package/dist/browser/test/node/hanging-test/scenarios/community-update.scenario.d.ts +8 -0
  397. package/dist/browser/test/node/hanging-test/scenarios/community-update.scenario.js +21 -0
  398. package/dist/browser/test/node/hanging-test/scenarios/community-update.scenario.js.map +1 -0
  399. package/dist/browser/test/node/hanging-test/scenarios/destroy-only.scenario.d.ts +7 -0
  400. package/dist/browser/test/node/hanging-test/scenarios/destroy-only.scenario.js +15 -0
  401. package/dist/browser/test/node/hanging-test/scenarios/destroy-only.scenario.js.map +1 -0
  402. package/dist/browser/test/node/hanging-test/scenarios/hanging-test-util.d.ts +30 -0
  403. package/dist/browser/test/node/hanging-test/scenarios/hanging-test-util.js +46 -0
  404. package/dist/browser/test/node/hanging-test/scenarios/hanging-test-util.js.map +1 -0
  405. package/dist/browser/test/test-util.d.ts +1019 -0
  406. package/dist/browser/test/test-util.js +1886 -0
  407. package/dist/browser/test/test-util.js.map +1 -0
  408. package/dist/browser/types.d.ts +165 -0
  409. package/dist/browser/types.js +2 -0
  410. package/dist/browser/types.js.map +1 -0
  411. package/dist/browser/util/inflight-fetch-manager.d.ts +11 -0
  412. package/dist/browser/util/inflight-fetch-manager.js +41 -0
  413. package/dist/browser/util/inflight-fetch-manager.js.map +1 -0
  414. package/dist/browser/util.d.ts +120 -0
  415. package/dist/browser/util.js +816 -0
  416. package/dist/browser/util.js.map +1 -0
  417. package/dist/browser/version.d.ts +7 -0
  418. package/dist/browser/version.js +12 -0
  419. package/dist/browser/version.js.map +1 -0
  420. package/dist/browser/zod-error-map.d.ts +1 -0
  421. package/dist/browser/zod-error-map.js +10 -0
  422. package/dist/browser/zod-error-map.js.map +1 -0
  423. package/dist/node/challenges.d.ts +1 -0
  424. package/dist/node/challenges.js +2 -0
  425. package/dist/node/challenges.js.map +1 -0
  426. package/dist/node/clients/base-client-manager.d.ts +126 -0
  427. package/dist/node/clients/base-client-manager.js +673 -0
  428. package/dist/node/clients/base-client-manager.js.map +1 -0
  429. package/dist/node/clients/name-resolver-client.d.ts +8 -0
  430. package/dist/node/clients/name-resolver-client.js +10 -0
  431. package/dist/node/clients/name-resolver-client.js.map +1 -0
  432. package/dist/node/clients/pkc-typed-emitter.d.ts +9 -0
  433. package/dist/node/clients/pkc-typed-emitter.js +52 -0
  434. package/dist/node/clients/pkc-typed-emitter.js.map +1 -0
  435. package/dist/node/clients/rpc-client/decode-rpc-response-util.d.ts +8 -0
  436. package/dist/node/clients/rpc-client/decode-rpc-response-util.js +53 -0
  437. package/dist/node/clients/rpc-client/decode-rpc-response-util.js.map +1 -0
  438. package/dist/node/clients/rpc-client/pkc-rpc-client.d.ts +68 -0
  439. package/dist/node/clients/rpc-client/pkc-rpc-client.js +404 -0
  440. package/dist/node/clients/rpc-client/pkc-rpc-client.js.map +1 -0
  441. package/dist/node/clients/rpc-client/rpc-schema-util.d.ts +147 -0
  442. package/dist/node/clients/rpc-client/rpc-schema-util.js +11 -0
  443. package/dist/node/clients/rpc-client/rpc-schema-util.js.map +1 -0
  444. package/dist/node/clients/rpc-client/schema.d.ts +433 -0
  445. package/dist/node/clients/rpc-client/schema.js +49 -0
  446. package/dist/node/clients/rpc-client/schema.js.map +1 -0
  447. package/dist/node/clients/rpc-client/types.d.ts +8 -0
  448. package/dist/node/clients/rpc-client/types.js +2 -0
  449. package/dist/node/clients/rpc-client/types.js.map +1 -0
  450. package/dist/node/community/community-client-manager.d.ts +60 -0
  451. package/dist/node/community/community-client-manager.js +717 -0
  452. package/dist/node/community/community-client-manager.js.map +1 -0
  453. package/dist/node/community/community-clients.d.ts +18 -0
  454. package/dist/node/community/community-clients.js +12 -0
  455. package/dist/node/community/community-clients.js.map +1 -0
  456. package/dist/node/community/community-wire.d.ts +20 -0
  457. package/dist/node/community/community-wire.js +38 -0
  458. package/dist/node/community/community-wire.js.map +1 -0
  459. package/dist/node/community/remote-community.d.ts +110 -0
  460. package/dist/node/community/remote-community.js +555 -0
  461. package/dist/node/community/remote-community.js.map +1 -0
  462. package/dist/node/community/rpc-local-community.d.ts +41 -0
  463. package/dist/node/community/rpc-local-community.js +289 -0
  464. package/dist/node/community/rpc-local-community.js.map +1 -0
  465. package/dist/node/community/rpc-remote-community.d.ts +18 -0
  466. package/dist/node/community/rpc-remote-community.js +286 -0
  467. package/dist/node/community/rpc-remote-community.js.map +1 -0
  468. package/dist/node/community/schema.d.ts +4217 -0
  469. package/dist/node/community/schema.js +289 -0
  470. package/dist/node/community/schema.js.map +1 -0
  471. package/dist/node/community/types.d.ts +135 -0
  472. package/dist/node/community/types.js +2 -0
  473. package/dist/node/community/types.js.map +1 -0
  474. package/dist/node/constants.d.ts +6 -0
  475. package/dist/node/constants.js +9 -0
  476. package/dist/node/constants.js.map +1 -0
  477. package/dist/node/decorator-util.d.ts +1 -0
  478. package/dist/node/decorator-util.js +35 -0
  479. package/dist/node/decorator-util.js.map +1 -0
  480. package/dist/node/errors.d.ts +343 -0
  481. package/dist/node/errors.js +358 -0
  482. package/dist/node/errors.js.map +1 -0
  483. package/dist/node/general-util/limited-set.d.ts +15 -0
  484. package/dist/node/general-util/limited-set.js +66 -0
  485. package/dist/node/general-util/limited-set.js.map +1 -0
  486. package/dist/node/generated-version.d.ts +1 -0
  487. package/dist/node/generated-version.js +3 -0
  488. package/dist/node/generated-version.js.map +1 -0
  489. package/dist/node/generic-state-client.d.ts +6 -0
  490. package/dist/node/generic-state-client.js +11 -0
  491. package/dist/node/generic-state-client.js.map +1 -0
  492. package/dist/node/helia/helia-for-pkc.d.ts +3 -0
  493. package/dist/node/helia/helia-for-pkc.js +255 -0
  494. package/dist/node/helia/helia-for-pkc.js.map +1 -0
  495. package/dist/node/helia/ipns-over-pubsub-with-fetch.d.ts +36 -0
  496. package/dist/node/helia/ipns-over-pubsub-with-fetch.js +229 -0
  497. package/dist/node/helia/ipns-over-pubsub-with-fetch.js.map +1 -0
  498. package/dist/node/helia/libp2pjsClient.d.ts +27 -0
  499. package/dist/node/helia/libp2pjsClient.js +15 -0
  500. package/dist/node/helia/libp2pjsClient.js.map +1 -0
  501. package/dist/node/helia/types.d.ts +19 -0
  502. package/dist/node/helia/types.js +2 -0
  503. package/dist/node/helia/types.js.map +1 -0
  504. package/dist/node/helia/util.d.ts +13 -0
  505. package/dist/node/helia/util.js +98 -0
  506. package/dist/node/helia/util.js.map +1 -0
  507. package/dist/node/index.d.ts +244 -0
  508. package/dist/node/index.js +36 -0
  509. package/dist/node/index.js.map +1 -0
  510. package/dist/node/logger.d.ts +12 -0
  511. package/dist/node/logger.js +11 -0
  512. package/dist/node/logger.js.map +1 -0
  513. package/dist/node/pages/pages-client-manager.d.ts +159 -0
  514. package/dist/node/pages/pages-client-manager.js +334 -0
  515. package/dist/node/pages/pages-client-manager.js.map +1 -0
  516. package/dist/node/pages/pages-clients.d.ts +11 -0
  517. package/dist/node/pages/pages-clients.js +10 -0
  518. package/dist/node/pages/pages-clients.js.map +1 -0
  519. package/dist/node/pages/pages.d.ts +107 -0
  520. package/dist/node/pages/pages.js +262 -0
  521. package/dist/node/pages/pages.js.map +1 -0
  522. package/dist/node/pages/schema-util.d.ts +3 -0
  523. package/dist/node/pages/schema-util.js +3 -0
  524. package/dist/node/pages/schema-util.js.map +1 -0
  525. package/dist/node/pages/schema.d.ts +719 -0
  526. package/dist/node/pages/schema.js +32 -0
  527. package/dist/node/pages/schema.js.map +1 -0
  528. package/dist/node/pages/types.d.ts +44 -0
  529. package/dist/node/pages/types.js +2 -0
  530. package/dist/node/pages/types.js.map +1 -0
  531. package/dist/node/pages/util.d.ts +56 -0
  532. package/dist/node/pages/util.js +446 -0
  533. package/dist/node/pages/util.js.map +1 -0
  534. package/dist/node/pkc/pkc-client-manager.d.ts +44 -0
  535. package/dist/node/pkc/pkc-client-manager.js +156 -0
  536. package/dist/node/pkc/pkc-client-manager.js.map +1 -0
  537. package/dist/node/pkc/pkc-clients.d.ts +11 -0
  538. package/dist/node/pkc/pkc-clients.js +8 -0
  539. package/dist/node/pkc/pkc-clients.js.map +1 -0
  540. package/dist/node/pkc/pkc-with-rpc-client.d.ts +19 -0
  541. package/dist/node/pkc/pkc-with-rpc-client.js +128 -0
  542. package/dist/node/pkc/pkc-with-rpc-client.js.map +1 -0
  543. package/dist/node/pkc/pkc.d.ts +137 -0
  544. package/dist/node/pkc/pkc.js +888 -0
  545. package/dist/node/pkc/pkc.js.map +1 -0
  546. package/dist/node/pkc/tracked-instance-registry-util.d.ts +44 -0
  547. package/dist/node/pkc/tracked-instance-registry-util.js +106 -0
  548. package/dist/node/pkc/tracked-instance-registry-util.js.map +1 -0
  549. package/dist/node/pkc/tracked-instance-registry.d.ts +18 -0
  550. package/dist/node/pkc/tracked-instance-registry.js +134 -0
  551. package/dist/node/pkc/tracked-instance-registry.js.map +1 -0
  552. package/dist/node/pkc-error.d.ts +65 -0
  553. package/dist/node/pkc-error.js +137 -0
  554. package/dist/node/pkc-error.js.map +1 -0
  555. package/dist/node/publications/comment/comment-client-manager.d.ts +86 -0
  556. package/dist/node/publications/comment/comment-client-manager.js +908 -0
  557. package/dist/node/publications/comment/comment-client-manager.js.map +1 -0
  558. package/dist/node/publications/comment/comment-clients.d.ts +19 -0
  559. package/dist/node/publications/comment/comment-clients.js +12 -0
  560. package/dist/node/publications/comment/comment-clients.js.map +1 -0
  561. package/dist/node/publications/comment/comment-util.d.ts +10 -0
  562. package/dist/node/publications/comment/comment-util.js +202 -0
  563. package/dist/node/publications/comment/comment-util.js.map +1 -0
  564. package/dist/node/publications/comment/comment.d.ts +147 -0
  565. package/dist/node/publications/comment/comment.js +1044 -0
  566. package/dist/node/publications/comment/comment.js.map +1 -0
  567. package/dist/node/publications/comment/schema.d.ts +1237 -0
  568. package/dist/node/publications/comment/schema.js +184 -0
  569. package/dist/node/publications/comment/schema.js.map +1 -0
  570. package/dist/node/publications/comment/types.d.ts +100 -0
  571. package/dist/node/publications/comment/types.js +2 -0
  572. package/dist/node/publications/comment/types.js.map +1 -0
  573. package/dist/node/publications/comment-edit/comment-edit.d.ts +41 -0
  574. package/dist/node/publications/comment-edit/comment-edit.js +63 -0
  575. package/dist/node/publications/comment-edit/comment-edit.js.map +1 -0
  576. package/dist/node/publications/comment-edit/schema.d.ts +295 -0
  577. package/dist/node/publications/comment-edit/schema.js +55 -0
  578. package/dist/node/publications/comment-edit/schema.js.map +1 -0
  579. package/dist/node/publications/comment-edit/types.d.ts +25 -0
  580. package/dist/node/publications/comment-edit/types.js +2 -0
  581. package/dist/node/publications/comment-edit/types.js.map +1 -0
  582. package/dist/node/publications/comment-moderation/comment-moderation.d.ts +36 -0
  583. package/dist/node/publications/comment-moderation/comment-moderation.js +53 -0
  584. package/dist/node/publications/comment-moderation/comment-moderation.js.map +1 -0
  585. package/dist/node/publications/comment-moderation/schema.d.ts +315 -0
  586. package/dist/node/publications/comment-moderation/schema.js +62 -0
  587. package/dist/node/publications/comment-moderation/schema.js.map +1 -0
  588. package/dist/node/publications/comment-moderation/types.d.ts +22 -0
  589. package/dist/node/publications/comment-moderation/types.js +2 -0
  590. package/dist/node/publications/comment-moderation/types.js.map +1 -0
  591. package/dist/node/publications/community-edit/community-edit.d.ts +35 -0
  592. package/dist/node/publications/community-edit/community-edit.js +50 -0
  593. package/dist/node/publications/community-edit/community-edit.js.map +1 -0
  594. package/dist/node/publications/community-edit/schema.d.ts +467 -0
  595. package/dist/node/publications/community-edit/schema.js +36 -0
  596. package/dist/node/publications/community-edit/schema.js.map +1 -0
  597. package/dist/node/publications/community-edit/types.d.ts +19 -0
  598. package/dist/node/publications/community-edit/types.js +2 -0
  599. package/dist/node/publications/community-edit/types.js.map +1 -0
  600. package/dist/node/publications/publication-author.d.ts +22 -0
  601. package/dist/node/publications/publication-author.js +66 -0
  602. package/dist/node/publications/publication-author.js.map +1 -0
  603. package/dist/node/publications/publication-client-manager.d.ts +62 -0
  604. package/dist/node/publications/publication-client-manager.js +257 -0
  605. package/dist/node/publications/publication-client-manager.js.map +1 -0
  606. package/dist/node/publications/publication-clients.d.ts +19 -0
  607. package/dist/node/publications/publication-clients.js +12 -0
  608. package/dist/node/publications/publication-clients.js.map +1 -0
  609. package/dist/node/publications/publication-community.d.ts +55 -0
  610. package/dist/node/publications/publication-community.js +87 -0
  611. package/dist/node/publications/publication-community.js.map +1 -0
  612. package/dist/node/publications/publication.d.ts +120 -0
  613. package/dist/node/publications/publication.js +950 -0
  614. package/dist/node/publications/publication.js.map +1 -0
  615. package/dist/node/publications/types.d.ts +26 -0
  616. package/dist/node/publications/types.js +2 -0
  617. package/dist/node/publications/types.js.map +1 -0
  618. package/dist/node/publications/vote/schema.d.ts +150 -0
  619. package/dist/node/publications/vote/schema.js +44 -0
  620. package/dist/node/publications/vote/schema.js.map +1 -0
  621. package/dist/node/publications/vote/types.d.ts +21 -0
  622. package/dist/node/publications/vote/types.js +2 -0
  623. package/dist/node/publications/vote/types.js.map +1 -0
  624. package/dist/node/publications/vote/vote.d.ts +36 -0
  625. package/dist/node/publications/vote/vote.js +49 -0
  626. package/dist/node/publications/vote/vote.js.map +1 -0
  627. package/dist/node/pubsub-messages/schema.d.ts +964 -0
  628. package/dist/node/pubsub-messages/schema.js +98 -0
  629. package/dist/node/pubsub-messages/schema.js.map +1 -0
  630. package/dist/node/pubsub-messages/types.d.ts +81 -0
  631. package/dist/node/pubsub-messages/types.js +2 -0
  632. package/dist/node/pubsub-messages/types.js.map +1 -0
  633. package/dist/node/rpc/src/index.d.ts +483 -0
  634. package/dist/node/rpc/src/index.js +1267 -0
  635. package/dist/node/rpc/src/index.js.map +1 -0
  636. package/dist/node/rpc/src/json-rpc-util.d.ts +1 -0
  637. package/dist/node/rpc/src/json-rpc-util.js +19 -0
  638. package/dist/node/rpc/src/json-rpc-util.js.map +1 -0
  639. package/dist/node/rpc/src/lib/pkc-js/index.d.ts +132 -0
  640. package/dist/node/rpc/src/lib/pkc-js/index.js +29 -0
  641. package/dist/node/rpc/src/lib/pkc-js/index.js.map +1 -0
  642. package/dist/node/rpc/src/lib/pkc-js/pkc-js-mock.d.ts +1 -0
  643. package/dist/node/rpc/src/lib/pkc-js/pkc-js-mock.js +472 -0
  644. package/dist/node/rpc/src/lib/pkc-js/pkc-js-mock.js.map +1 -0
  645. package/dist/node/rpc/src/schema.d.ts +843 -0
  646. package/dist/node/rpc/src/schema.js +28 -0
  647. package/dist/node/rpc/src/schema.js.map +1 -0
  648. package/dist/node/rpc/src/types.d.ts +24 -0
  649. package/dist/node/rpc/src/types.js +2 -0
  650. package/dist/node/rpc/src/types.js.map +1 -0
  651. package/dist/node/rpc/src/utils.d.ts +7 -0
  652. package/dist/node/rpc/src/utils.js +58 -0
  653. package/dist/node/rpc/src/utils.js.map +1 -0
  654. package/dist/node/runtime/browser/community/challenges/index.d.ts +6 -0
  655. package/dist/node/runtime/browser/community/challenges/index.js +7 -0
  656. package/dist/node/runtime/browser/community/challenges/index.js.map +1 -0
  657. package/dist/node/runtime/browser/community/local-community.d.ts +3 -0
  658. package/dist/node/runtime/browser/community/local-community.js +6 -0
  659. package/dist/node/runtime/browser/community/local-community.js.map +1 -0
  660. package/dist/node/runtime/browser/db-handler.d.ts +4 -0
  661. package/dist/node/runtime/browser/db-handler.js +8 -0
  662. package/dist/node/runtime/browser/db-handler.js.map +1 -0
  663. package/dist/node/runtime/browser/localforage-lru.d.ts +15 -0
  664. package/dist/node/runtime/browser/localforage-lru.js +140 -0
  665. package/dist/node/runtime/browser/localforage-lru.js.map +1 -0
  666. package/dist/node/runtime/browser/lru-storage.d.ts +14 -0
  667. package/dist/node/runtime/browser/lru-storage.js +34 -0
  668. package/dist/node/runtime/browser/lru-storage.js.map +1 -0
  669. package/dist/node/runtime/browser/native-functions.d.ts +3 -0
  670. package/dist/node/runtime/browser/native-functions.js +6 -0
  671. package/dist/node/runtime/browser/native-functions.js.map +1 -0
  672. package/dist/node/runtime/browser/polyfill.d.ts +3 -0
  673. package/dist/node/runtime/browser/polyfill.js +37 -0
  674. package/dist/node/runtime/browser/polyfill.js.map +1 -0
  675. package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.d.ts +1 -0
  676. package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.js +4 -0
  677. package/dist/node/runtime/browser/setup-kubo-address-rewriter-and-http-router.js.map +1 -0
  678. package/dist/node/runtime/browser/storage.d.ts +13 -0
  679. package/dist/node/runtime/browser/storage.js +37 -0
  680. package/dist/node/runtime/browser/storage.js.map +1 -0
  681. package/dist/node/runtime/browser/util.d.ts +14 -0
  682. package/dist/node/runtime/browser/util.js +61 -0
  683. package/dist/node/runtime/browser/util.js.map +1 -0
  684. package/dist/node/runtime/node/address-rewriter-db.d.ts +31 -0
  685. package/dist/node/runtime/node/address-rewriter-db.js +156 -0
  686. package/dist/node/runtime/node/address-rewriter-db.js.map +1 -0
  687. package/dist/node/runtime/node/addresses-rewriter-proxy-server.d.ts +45 -0
  688. package/dist/node/runtime/node/addresses-rewriter-proxy-server.js +493 -0
  689. package/dist/node/runtime/node/addresses-rewriter-proxy-server.js.map +1 -0
  690. package/dist/node/runtime/node/community/challenges/exclude/exclude.d.ts +8 -0
  691. package/dist/node/runtime/node/community/challenges/exclude/exclude.js +280 -0
  692. package/dist/node/runtime/node/community/challenges/exclude/exclude.js.map +1 -0
  693. package/dist/node/runtime/node/community/challenges/exclude/index.d.ts +3 -0
  694. package/dist/node/runtime/node/community/challenges/exclude/index.js +4 -0
  695. package/dist/node/runtime/node/community/challenges/exclude/index.js.map +1 -0
  696. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.d.ts +5 -0
  697. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js +127 -0
  698. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -0
  699. package/dist/node/runtime/node/community/challenges/exclude/utils.d.ts +13 -0
  700. package/dist/node/runtime/node/community/challenges/exclude/utils.js +52 -0
  701. package/dist/node/runtime/node/community/challenges/exclude/utils.js.map +1 -0
  702. package/dist/node/runtime/node/community/challenges/index.d.ts +32 -0
  703. package/dist/node/runtime/node/community/challenges/index.js +307 -0
  704. package/dist/node/runtime/node/community/challenges/index.js.map +1 -0
  705. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/blacklist.d.ts +5 -0
  706. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/blacklist.js +118 -0
  707. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/blacklist.js.map +1 -0
  708. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/fail.d.ts +5 -0
  709. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/fail.js +26 -0
  710. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/fail.js.map +1 -0
  711. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.d.ts +5 -0
  712. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +135 -0
  713. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -0
  714. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/question.d.ts +5 -0
  715. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/question.js +66 -0
  716. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/question.js.map +1 -0
  717. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/text-math.d.ts +5 -0
  718. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/text-math.js +61 -0
  719. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/text-math.js.map +1 -0
  720. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/whitelist.d.ts +5 -0
  721. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/whitelist.js +118 -0
  722. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/whitelist.js.map +1 -0
  723. package/dist/node/runtime/node/community/db-handler-types.d.ts +19 -0
  724. package/dist/node/runtime/node/community/db-handler-types.js +2 -0
  725. package/dist/node/runtime/node/community/db-handler-types.js.map +1 -0
  726. package/dist/node/runtime/node/community/db-handler.d.ts +226 -0
  727. package/dist/node/runtime/node/community/db-handler.js +2462 -0
  728. package/dist/node/runtime/node/community/db-handler.js.map +1 -0
  729. package/dist/node/runtime/node/community/db-row-parser.d.ts +19 -0
  730. package/dist/node/runtime/node/community/db-row-parser.js +40 -0
  731. package/dist/node/runtime/node/community/db-row-parser.js.map +1 -0
  732. package/dist/node/runtime/node/community/keyv-better-sqlite3.d.ts +68 -0
  733. package/dist/node/runtime/node/community/keyv-better-sqlite3.js +251 -0
  734. package/dist/node/runtime/node/community/keyv-better-sqlite3.js.map +1 -0
  735. package/dist/node/runtime/node/community/local-community.d.ts +129 -0
  736. package/dist/node/runtime/node/community/local-community.js +2978 -0
  737. package/dist/node/runtime/node/community/local-community.js.map +1 -0
  738. package/dist/node/runtime/node/community/page-generator.d.ts +433 -0
  739. package/dist/node/runtime/node/community/page-generator.js +441 -0
  740. package/dist/node/runtime/node/community/page-generator.js.map +1 -0
  741. package/dist/node/runtime/node/lru-storage.d.ts +14 -0
  742. package/dist/node/runtime/node/lru-storage.js +40 -0
  743. package/dist/node/runtime/node/lru-storage.js.map +1 -0
  744. package/dist/node/runtime/node/native-functions.d.ts +3 -0
  745. package/dist/node/runtime/node/native-functions.js +7 -0
  746. package/dist/node/runtime/node/native-functions.js.map +1 -0
  747. package/dist/node/runtime/node/polyfill.d.ts +3 -0
  748. package/dist/node/runtime/node/polyfill.js +20 -0
  749. package/dist/node/runtime/node/polyfill.js.map +1 -0
  750. package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.d.ts +4 -0
  751. package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js +240 -0
  752. package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -0
  753. package/dist/node/runtime/node/sqlite-lru-cache.d.ts +52 -0
  754. package/dist/node/runtime/node/sqlite-lru-cache.js +127 -0
  755. package/dist/node/runtime/node/sqlite-lru-cache.js.map +1 -0
  756. package/dist/node/runtime/node/storage.d.ts +14 -0
  757. package/dist/node/runtime/node/storage.js +52 -0
  758. package/dist/node/runtime/node/storage.js.map +1 -0
  759. package/dist/node/runtime/node/test/helpers/hanging-runner.d.ts +1 -0
  760. package/dist/node/runtime/node/test/helpers/hanging-runner.js +157 -0
  761. package/dist/node/runtime/node/test/helpers/hanging-runner.js.map +1 -0
  762. package/dist/node/runtime/node/test/helpers/run-hanging-node.d.ts +7 -0
  763. package/dist/node/runtime/node/test/helpers/run-hanging-node.js +68 -0
  764. package/dist/node/runtime/node/test/helpers/run-hanging-node.js.map +1 -0
  765. package/dist/node/runtime/node/test/mock-http-router.d.ts +54 -0
  766. package/dist/node/runtime/node/test/mock-http-router.js +397 -0
  767. package/dist/node/runtime/node/test/mock-http-router.js.map +1 -0
  768. package/dist/node/runtime/node/util.d.ts +43 -0
  769. package/dist/node/runtime/node/util.js +384 -0
  770. package/dist/node/runtime/node/util.js.map +1 -0
  771. package/dist/node/schema/schema-util.d.ts +2751 -0
  772. package/dist/node/schema/schema-util.js +562 -0
  773. package/dist/node/schema/schema-util.js.map +1 -0
  774. package/dist/node/schema/schema.d.ts +237 -0
  775. package/dist/node/schema/schema.js +128 -0
  776. package/dist/node/schema/schema.js.map +1 -0
  777. package/dist/node/schema.d.ts +1142 -0
  778. package/dist/node/schema.js +104 -0
  779. package/dist/node/schema.js.map +1 -0
  780. package/dist/node/signer/constants.d.ts +2 -0
  781. package/dist/node/signer/constants.js +3 -0
  782. package/dist/node/signer/constants.js.map +1 -0
  783. package/dist/node/signer/encryption.d.ts +21 -0
  784. package/dist/node/signer/encryption.js +122 -0
  785. package/dist/node/signer/encryption.js.map +1 -0
  786. package/dist/node/signer/index.d.ts +21 -0
  787. package/dist/node/signer/index.js +49 -0
  788. package/dist/node/signer/index.js.map +1 -0
  789. package/dist/node/signer/signatures.d.ts +200 -0
  790. package/dist/node/signer/signatures.js +594 -0
  791. package/dist/node/signer/signatures.js.map +1 -0
  792. package/dist/node/signer/types.d.ts +20 -0
  793. package/dist/node/signer/types.js +2 -0
  794. package/dist/node/signer/types.js.map +1 -0
  795. package/dist/node/signer/util.d.ts +14 -0
  796. package/dist/node/signer/util.js +156 -0
  797. package/dist/node/signer/util.js.map +1 -0
  798. package/dist/node/stats.d.ts +15 -0
  799. package/dist/node/stats.js +64 -0
  800. package/dist/node/stats.js.map +1 -0
  801. package/dist/node/test/mock-ipfs-client.d.ts +34 -0
  802. package/dist/node/test/mock-ipfs-client.js +208 -0
  803. package/dist/node/test/mock-ipfs-client.js.map +1 -0
  804. package/dist/node/test/node/hanging-test/scenarios/comment-publish-pending.scenario.d.ts +8 -0
  805. package/dist/node/test/node/hanging-test/scenarios/comment-publish-pending.scenario.js +21 -0
  806. package/dist/node/test/node/hanging-test/scenarios/comment-publish-pending.scenario.js.map +1 -0
  807. package/dist/node/test/node/hanging-test/scenarios/comment-publish.scenario.d.ts +8 -0
  808. package/dist/node/test/node/hanging-test/scenarios/comment-publish.scenario.js +19 -0
  809. package/dist/node/test/node/hanging-test/scenarios/comment-publish.scenario.js.map +1 -0
  810. package/dist/node/test/node/hanging-test/scenarios/comment-update.scenario.d.ts +8 -0
  811. package/dist/node/test/node/hanging-test/scenarios/comment-update.scenario.js +22 -0
  812. package/dist/node/test/node/hanging-test/scenarios/comment-update.scenario.js.map +1 -0
  813. package/dist/node/test/node/hanging-test/scenarios/community-start.scenario.d.ts +8 -0
  814. package/dist/node/test/node/hanging-test/scenarios/community-start.scenario.js +23 -0
  815. package/dist/node/test/node/hanging-test/scenarios/community-start.scenario.js.map +1 -0
  816. package/dist/node/test/node/hanging-test/scenarios/community-update.scenario.d.ts +8 -0
  817. package/dist/node/test/node/hanging-test/scenarios/community-update.scenario.js +21 -0
  818. package/dist/node/test/node/hanging-test/scenarios/community-update.scenario.js.map +1 -0
  819. package/dist/node/test/node/hanging-test/scenarios/destroy-only.scenario.d.ts +7 -0
  820. package/dist/node/test/node/hanging-test/scenarios/destroy-only.scenario.js +15 -0
  821. package/dist/node/test/node/hanging-test/scenarios/destroy-only.scenario.js.map +1 -0
  822. package/dist/node/test/node/hanging-test/scenarios/hanging-test-util.d.ts +30 -0
  823. package/dist/node/test/node/hanging-test/scenarios/hanging-test-util.js +46 -0
  824. package/dist/node/test/node/hanging-test/scenarios/hanging-test-util.js.map +1 -0
  825. package/dist/node/test/test-util.d.ts +1019 -0
  826. package/dist/node/test/test-util.js +1886 -0
  827. package/dist/node/test/test-util.js.map +1 -0
  828. package/dist/node/types.d.ts +165 -0
  829. package/dist/node/types.js +2 -0
  830. package/dist/node/types.js.map +1 -0
  831. package/dist/node/util/inflight-fetch-manager.d.ts +11 -0
  832. package/dist/node/util/inflight-fetch-manager.js +41 -0
  833. package/dist/node/util/inflight-fetch-manager.js.map +1 -0
  834. package/dist/node/util.d.ts +120 -0
  835. package/dist/node/util.js +816 -0
  836. package/dist/node/util.js.map +1 -0
  837. package/dist/node/version.d.ts +7 -0
  838. package/dist/node/version.js +12 -0
  839. package/dist/node/version.js.map +1 -0
  840. package/dist/node/zod-error-map.d.ts +1 -0
  841. package/dist/node/zod-error-map.js +10 -0
  842. package/dist/node/zod-error-map.js.map +1 -0
  843. package/package.json +212 -0
@@ -0,0 +1,358 @@
1
+ export var messages;
2
+ (function (messages) {
3
+ messages["ERR_COMMUNITY_SIGNER_NOT_DEFINED"] = "Community signer is not defined";
4
+ messages["ERR_COMMUNITY_CAN_EITHER_RUN_OR_UPDATE"] = "Community can either sync through .start() or update, but not both";
5
+ messages["ERR_PUBLICATION_MISSING_FIELD"] = "Publication is missing field(s)";
6
+ messages["ERR_COMMUNITY_MISSING_FIELD"] = "Community is missing field needed for publishing";
7
+ messages["ERR_COMMUNITY_OPTIONS_MISSING_ADDRESS"] = "The options sent to pkc.createCommunity() is missing address or signer";
8
+ messages["ERR_INVALID_COMMUNITY_ADDRESS_SCHEMA"] = "Community address is incorrect. Address should be either a domain or IPNS";
9
+ messages["ERR_CID_IS_INVALID"] = "CID is invalid";
10
+ messages["ERR_DATA_PATH_IS_NOT_DEFINED"] = "pkcOptions.dataPath needs to be defined with native functions";
11
+ messages["ERR_COMMUNITY_OWNER_ATTEMPTED_EDIT_NEW_ADDRESS_THAT_ALREADY_EXISTS"] = "Community owner attempted to edit community.address to a new address that already exists";
12
+ messages["ERR_COMMENT_MISSING_IPFS_AND_UPDATE"] = "Comment is missing CommentIpfs and CommentUpdate";
13
+ messages["ERR_COMMENT_MISSING_CID"] = "Comment is missing cid";
14
+ messages["ERR_COMMENT_MISSING_IPFS"] = "Comment is missing CommentIpfs props";
15
+ messages["ERR_COMMENT_MISSING_UPDATE"] = "Comment is missing CommentUpdate props";
16
+ messages["ERR_COMMENT_IPFS_COMMUNITY_ADDRESS_MISMATCH"] = "CommentIpfs community address does not match the expected community address";
17
+ messages["ERR_NEED_TO_STOP_UPDATING_COMMUNITY_BEFORE_STARTING"] = "You need to stop updating the community before starting it";
18
+ messages["ERR_HELIAS_STOPPING_OR_STOPPED"] = "Helia is stopping or stopped already. You can't use any helia functions";
19
+ messages["ERR_FAILED_TO_DIAL_ANY_PUBSUB_PEERS_FROM_DELEGATED_ROUTERS"] = "Failed to dial and connect to any IPNS-Over-Pubsub peers from delegated routers";
20
+ messages["ERR_FETCH_OVER_IPNS_OVER_PUBSUB_RETURNED_UNDEFINED"] = "libp2p Fetch over IPNS-Over-Pubsub returned undefined when requested from a peer";
21
+ messages["ERR_FAILED_TO_DIAL_ANY_PEERS_PROVIDING_CID"] = "Failed to dial and connect to any peers providing a CID";
22
+ messages["ERR_GET_COMMUNITY_TIMED_OUT"] = "pkc.getCommunity({address}) timed out";
23
+ messages["ERR_TIMEOUT_WAITING_FOR_PUBSUB_TOPIC_PEERS"] = "Timeout waiting for propagation of pubsub topic peers";
24
+ messages["ERR_TIMED_OUT_RM_MFS_FILE"] = "Timed out removing MFS paths. We may need to nuke the whole MFS directory and republish everything";
25
+ messages["ERR_ABORTED_RESOLVING_TEXT_RECORD"] = "Aborted resolving text record on domain";
26
+ // PKC errors
27
+ messages["ERR_CALLED_COMMUNITY_STOP_WITHOUT_UPDATE"] = "community.stop() called without calling update() first";
28
+ messages["ERR_PKC_MISSING_NATIVE_FUNCTIONS"] = "missing nativeFunctions required to create a community";
29
+ messages["ERR_CAN_NOT_RUN_A_COMMUNITY_WITH_NO_IPFS_NODE"] = "Can't run a community with pkc.ipfsHttpClientOptions undefined";
30
+ messages["ERR_PKC_OPTION_NOT_ACCEPTED"] = "Option is not accepted on PKC constructor";
31
+ messages["ERR_FAILED_TO_GET_CONFIG_ON_KUBO_NODE"] = "Failed to get config on kubo node";
32
+ messages["ERR_FAILED_TO_SET_CONFIG_ON_KUBO_NODE"] = "Failed to set config on kubo node";
33
+ messages["ERR_FAILED_TO_SHUTDOWN_KUBO_NODE"] = "Failed to shutdown kubo node";
34
+ messages["ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY"] = "Can't create a new local community with the provided arguments";
35
+ messages["ERR_COMMUNITY_ADDRESS_IS_PROVIDED_AS_NULL_OR_UNDEFINED"] = "User provided options.address in createCommunity that is either undefined or null";
36
+ messages["ERR_UNABLE_TO_DERIVE_PUBSUB_COMMENT_PUBLICATION_FROM_JSONIFIED_COMMENT"] = "User provided a jsonfied (cloned) Comment and we're unable to derive request.comment from it. This is an implementation error";
37
+ messages["ERR_UNABLE_TO_DERIVE_PUBSUB_COMMENT_EDIT_PUBLICATION_FROM_JSONIFIED_COMMENT_EDIT"] = "User provided a jsonfied (cloned) CommentEdit and we're unable to derive request.commentEdit from it. This is an implementation error";
38
+ messages["ERR_UNABLE_TO_DERIVE_PUBSUB_COMMENT_MODERATION_PUBLICATION_FROM_JSONIFIED_COMMENT_MODERATION"] = "User provided a jsonfied (cloned) CommentModeration and we're unable to derive request.commentModeration from it. This is an implementation error";
39
+ messages["ERR_UNABLE_TO_DERIVE_PUBSUB_VOTE_PUBLICATION_FROM_JSONIFIED_VOTE"] = "User provided a jsonfied (cloned) Vote and we're unable to derive request.vote from it. This is an implementation error";
40
+ messages["ERR_UNABLE_TO_DERIVE_PUBSUB_COMMUNITY_EDIT_PUBLICATION_FROM_JSONIFIED_COMMUNITY_EDIT"] = "User provided a jsonfied (cloned) CommunityEdit and we're unable to derive request.communityEdit from it. This is an implementation error";
41
+ messages["ERR_PKC_SQLITE_LONG_TERM_STORAGE_KEYV_ERROR"] = "Error in Keyv SQLITE adapter";
42
+ messages["ERR_PKC_IS_DESTROYED"] = "PKC instance has been destroyed. Create a new instance.";
43
+ // Fetch errors
44
+ messages["ERR_FAILED_TO_FETCH_IPFS_VIA_GATEWAY"] = "Failed to fetch IPFS file via gateway";
45
+ messages["ERR_FAILED_TO_FETCH_IPFS_CID_VIA_IPFS_P2P"] = "Failed to fetch an IPFS CID via IPFS P2P";
46
+ messages["ERR_FAILED_TO_FETCH_IPNS_VIA_GATEWAY"] = "Failed to fetch IPNS through gateway";
47
+ messages["ERR_IPNS_RECORD_NOT_FOUND"] = "IPNS record not found in local Kubo node";
48
+ messages["ERR_FAILED_TO_FETCH_COMMUNITY_FROM_GATEWAYS"] = "Failed to fetch Community IPNS record from gateway(s)";
49
+ messages["ERR_FETCH_OVER_IPNS_OVER_PUBSUB_FAILED"] = "Failed to fetch IPNS record over IPNS-Over-Pubsub using libp2p/fetch";
50
+ messages["ERR_LIBP2P_FETCH_IPNS_FROM_PEER_TIMEDOUT"] = "libp2p fetch IPNS from peer timed out";
51
+ messages["ERR_FAILED_TO_FETCH_COMMENT_IPFS_FROM_GATEWAYS"] = "Failed to fetch comment IPFS file from gateway(s)";
52
+ messages["ERR_FAILED_TO_FETCH_COMMENT_UPDATE_FROM_GATEWAYS"] = "Failed to fetch comment update IPFS file from gateway(s)";
53
+ messages["ERR_FAILED_TO_FETCH_PAGE_IPFS_FROM_GATEWAYS"] = "Failed to fetch Page IPFS file from gateway(s)";
54
+ messages["ERR_FAILED_TO_FETCH_GENERIC_IPFS_FROM_GATEWAYS"] = "Failed to fetch IPFS file from gateways(s)";
55
+ messages["ERR_FAILED_TO_RESOLVE_IPNS_VIA_IPFS_P2P"] = "Failed to resolve IPNS through IPFS P2P. It may have resolved IPNS name to an undefined CID";
56
+ messages["ERR_FAILED_TO_FETCH_COMMENT_UPDATE_FROM_ALL_POST_UPDATES_RANGES"] = "Failed to fetch CommentUpdate from all post update timestamp ranges";
57
+ messages["ERR_COMMUNITY_HAS_NO_POST_UPDATES"] = "Community has no postUpdates field and therefore can't fetch a commentUpdate";
58
+ messages["ERR_FAILED_TO_FETCH_GENERIC"] = "Failed to fetch";
59
+ messages["ERR_OVER_DOWNLOAD_LIMIT"] = "The file size is larger than download limit";
60
+ messages["ERR_CALCULATED_CID_DOES_NOT_MATCH"] = "The CID calculated from loaded content does not match the provided CID";
61
+ messages["ERR_FAILED_TO_FETCH_THUMBNAIL_URL_OF_LINK"] = "Failed to fetch the thumbnail url of the link";
62
+ messages["ERR_FAILED_TO_FETCH_THUMBNAIL_DIMENSION_OF_LINK"] = "Failed to fetch the thumbnail dimension of the link";
63
+ messages["ERR_COMMUNITY_NAME_HAS_CAPITAL_LETTER"] = "Domain address has an uppercase letter. Community domain address should be lowercase";
64
+ messages["ERR_GATEWAY_TIMED_OUT_OR_ABORTED"] = "Fetching from gateway has been aborted/timed out";
65
+ messages["ERR_FAILED_TO_PARSE_CID_FROM_GATEWAY_RESPONSE_ETAG"] = "Failed to parse the CID from the etag header of IPNS gateway response";
66
+ messages["ERR_GATEWAY_MISSING_ETAG_HEADER"] = "Gateway response is missing the etag header";
67
+ messages["ERR_GATEWAY_ABORTING_LOADING_COMMUNITY_BECAUSE_SAME_INVALID_COMMUNITY_RECORD"] = "Aborted the gateway request to load community record because it will give us an invalid record we already processed and validated before";
68
+ messages["ERR_GATEWAY_ABORTING_LOADING_COMMUNITY_BECAUSE_SAME_UPDATE_CID"] = "Aborted the gateway request to load community record because it will give us the same record we already have";
69
+ messages["ERR_GATEWAY_ABORTING_LOADING_COMMUNITY_BECAUSE_WE_ALREADY_LOADED_THIS_RECORD"] = "Aborted the gateway request to load community record because we already loaded this record before";
70
+ messages["ERR_GATEWAY_PROVIDED_INCORRECT_X_IPFS_ROOTS"] = "Gateway provided an x-ipfs-roots that doesn't correspond to body";
71
+ messages["ERR_REMOTE_COMMUNITY_RECEIVED_ALREADY_PROCCESSED_RECORD"] = "We loaded a community record but it's a record we already consumed before";
72
+ messages["ERR_COMMENT_RECEIVED_ALREADY_PROCESSED_COMMENT_UPDATE"] = "We loaded a CommentUpdate but it's a record we already consumed";
73
+ messages["ERR_FETCH_CID_P2P_TIMEOUT"] = "Fetching CID via Kubo-rpc-client/helia P2P has timed out";
74
+ messages["ERR_FETCH_CID_P2P_TIMEOUT_AFTER_RETRIES"] = "Fetching CID via Kubo-rpc-client/helia P2P has timed out after all retry attempts";
75
+ messages["ERR_RESOLVED_IPNS_P2P_TO_UNDEFINED"] = "Resolved IPNS name to undefined. Does this IPNS name exist?";
76
+ messages["ERR_IPNS_RESOLUTION_P2P_TIMEOUT"] = "IPNS resolution P2P timed out";
77
+ messages["ERR_FIND_PROVIDERS_TIMEOUT"] = "Finding providers for CID timed out without yielding any results";
78
+ messages["ERR_NO_DEFAULT_IPFS_PROVIDER"] = "No default IPFS provider found. Make sure to define either kuboRpcClientOptions or libp2pJsClientOptions";
79
+ messages["ERR_NO_DEFAULT_PUBSUB_PROVIDER"] = "No default pubsub provider found. Make sure to define either pubsubKuboRpcClientOptions or libp2pJsClientOptions";
80
+ messages["ERR_NO_DEFAULT_KUBO_RPC_PUBSUB_PROVIDER"] = "No default kubo rpc pubsub provider found. Make sure to define pubsubKuboRpcClientOptions";
81
+ messages["ERR_NO_DEFAULT_KUBO_RPC_IPFS_PROVIDER"] = "No default kubo rpc ipfs provider found. Make sure to define kuboRpcClientOptions";
82
+ messages["ERR_CAN_NOT_HAVE_BOTH_KUBO_AND_LIBP2P_JS_CLIENTS_DEFINED"] = "Can't have both libp2pJsClientOptions and kuboRpcClientOptions or pubsubKuboRpcClientOptions defined. Please define only one of them";
83
+ messages["ERR_INVALID_PUBSUB_PROVIDER"] = "Couldn't find a kubo pubsub RPC with that url or a libp2pjs with that key";
84
+ messages["ERR_ADDED_COMMENT_IPFS_TO_IPFS_BUT_GOT_DIFFERENT_CID"] = "Added CommentIpfs to IPFS but we got a different cid than challengeVerification.commentUpdate.cid, should not happen";
85
+ messages["ERR_NO_PUBSUB_PROVIDERS_AVAILABLE_TO_PUBLISH_OVER_PUBSUB"] = "No pubsub providers available to publish over pubsub";
86
+ // Schema errors
87
+ messages["ERR_INVALID_JSON"] = "The loaded file is not the expected json";
88
+ messages["ERR_INVALID_COMMENT_IPFS_SCHEMA"] = "The schema of Comment ipfs file is invalid";
89
+ messages["ERR_REPLY_HAS_NOT_DEFINED_POST_CID"] = "User attempted to create a reply without defining postCid";
90
+ messages["ERR_REPLY_POST_CID_IS_NOT_PARENT_OF_REPLY"] = "User's reply has reply.postCid that is not the post of the reply";
91
+ messages["ERR_POST_CANNOT_HAVE_QUOTED_CIDS"] = "Only replies can have quotedCids, posts cannot quote other comments";
92
+ messages["ERR_QUOTED_CID_DOES_NOT_EXIST"] = "One or more quoted CIDs do not exist in this community";
93
+ messages["ERR_QUOTED_CID_NOT_UNDER_POST"] = "One or more quoted CIDs are not under the same post";
94
+ messages["ERR_QUOTED_CID_IS_PENDING_APPROVAL"] = "One or more quoted CIDs are pending approval";
95
+ messages["ERR_INVALID_COMMUNITY_IPFS_SCHEMA"] = "The loaded Community record has an invalid schema";
96
+ messages["ERR_INVALID_COMMENT_UPDATE_SCHEMA"] = "The schema of Comment Update is invalid";
97
+ messages["ERR_INVALID_PAGE_IPFS_SCHEMA"] = "The schema of Page ipfs file is invalid";
98
+ messages["ERR_INVALID_MODQUEUE_PAGE_IPFS_SCHEMA"] = "The schema of mod queue page ipfs file is invalid";
99
+ messages["ERR_INVALID_CHALLENGE_DECRYPTED_SCHEMA"] = "The schema of decrypted challenge.encrypted is invalid";
100
+ messages["ERR_INVALID_CHALLENGE_VERIFICATION_DECRYPTED_SCHEMA"] = "The schema of challengeverification.encryption is invalid";
101
+ messages["ERR_INVALID_RPC_ENCODED_CHALLENGE_REQUEST_PUBSUB_MSG_SCHEMA"] = "The rpc server transmitted an encoded challenge request pubsub message with invalid schema";
102
+ messages["ERR_INVALID_RPC_ENCODED_CHALLENGE_PUBSUB_MSG_SCHEMA"] = "The rpc server transmitted an encoded challenge pubsub message with invalid schema";
103
+ messages["ERR_INVALID_RPC_ENCODED_CHALLENGE_ANSWER_PUBSUB_MSG_SCHEMA"] = "The rpc server transmitted an encoded challenge answer pubsub message with invalid schema";
104
+ messages["ERR_INVALID_RPC_ENCODED_CHALLENGE_VERIFICATION_PUBSUB_MSG_SCHEMA"] = "The rpc server transmitted an enocded challenge verification pubsub message with invalid schema";
105
+ messages["ERR_INVALID_RPC_LOCAL_COMMUNITY_UPDATE_SCHEMA"] = "RPC server has transmitted a local community update result with invalid schema";
106
+ messages["ERR_INVALID_RPC_COMMUNITY_UPDATING_STATE_SCHEMA"] = "RPC server transmitted an invalid updating state schema";
107
+ messages["ERR_INVALID_RPC_COMMUNITY_STARTED_STATE_SCHEMA"] = "RPC server transmitted an invalid started state schema";
108
+ messages["ERR_INVALID_RPC_ENCODED_CHALLENGE_REQUEST_WITH_COMMUNITY_AUTHOR_PUBSUB_MSG_SCHEMA"] = "RPC server transmitted an invalid challenge request schema for RpcLocalCommunity";
109
+ messages["ERR_INVALID_RPC_REMOTE_COMMUNITY_SCHEMA"] = "Invalid schema of remote community transmitted by RPC";
110
+ messages["ERR_INVALID_RPC_PUBLICATION_PUBLISHING_STATE_SCHEMA"] = "Invalid schema of publication.publishingState transmitted by RPC";
111
+ messages["ERR_INVALID_RPC_PUBLICATION_STATE_SCHEMA"] = "Invalid schema of publication.state transmitted by RPC";
112
+ messages["ERR_INVALID_CID_STRING_SCHEMA"] = "Invalid cid string schema";
113
+ messages["ERR_LOCAL_COMMUNITY_PRODUCED_INVALID_SCHEMA"] = "Local community produced a community record with invalid schema";
114
+ messages["ERR_INVALID_RPC_COMMENT_UPDATE_SCHEMA"] = "RPC server transmitted an update event with invalid schema, it should follow CommentUpdate schema";
115
+ messages["ERR_INVALID_RPC_COMMENT_SCHEMA"] = "RPC server transmitted a comment event with an invalid schema, it should follow CommentIpfs schema";
116
+ messages["ERR_INVALID_RPC_COMMENT_UPDATING_STATE_SCHEMA"] = "RPC server transmitted a comment's updating state with invalid schema";
117
+ messages["ERR_INVALID_RPC_COMMENT_STATE_SCHEMA"] = "RPC server transmitted a comment state with invalid schema";
118
+ messages["ERR_INVALID_CREATE_COMMUNITY_ARGS_SCHEMA"] = "User provided invalid schema of arguments for pkc.createCommunity";
119
+ messages["ERR_INVALID_CREATE_COMMENT_EDIT_ARGS_SCHEMA"] = "User provided invalid schema of arguments for pkc.createCommentEdit";
120
+ messages["ERR_INVALID_CREATE_VOTE_ARGS_SCHEMA"] = "User provided invalid schema of arguments for pkc.createVote";
121
+ messages["ERR_INVALID_CREATE_COMMENT_MODERATION_ARGS_SCHEMA"] = "User provided an invalid schema of arguments for pkc.createCommentModeration";
122
+ messages["ERR_INVALID_CREATE_COMMENT_ARGS_SCHEMA"] = "User provided an invalid schema of arguments for pkc.createComment";
123
+ messages["ERR_INVALID_CREATE_REMOTE_COMMUNITY_ARGS_SCHEMA"] = "User provided an invalid remote community schema";
124
+ messages["ERR_INVALID_CREATE_COMMUNITY_EDIT_ARGS_SCHEMA"] = "User provided an invalid args to pkc.createCommunityEdit";
125
+ messages["ERR_GENERIC_RPC_INVALID_SCHEMA"] = "The RPC server responded with invalid schema error";
126
+ messages["ERR_INVALID_NEW_WS_SERVER_SETTINGS_SCHEMA"] = "RPC client sent new settings with invalid schema";
127
+ messages["ERR_INVALID_CREATE_NEW_LOCAL_COMMUNITY_USER_OPTIONS"] = "User provided arguments to create a local community with invalid schema";
128
+ messages["ERR_INVALID_COMMENT_EDIT_CHALLENGE_REQUEST_TO_ENCRYPT_SCHEMA"] = "RPC client sent an invalid schema for challenge request with commentEdit";
129
+ messages["ERR_INVALID_VOTE_CHALLENGE_REQUEST_TO_ENCRYPT_SCHEMA"] = "RPC client sent an invalid schema for challenge request with vote";
130
+ messages["ERR_INVALID_COMMENT_CHALLENGE_REQUEST_TO_ENCRYPT_SCHEMA"] = "RPC client sent an invalid schema for challenge request with comment";
131
+ messages["ERR_INVALID_COMMENT_MODERATION_CHALLENGE_REQUEST_TO_ENCRYPT_SCHEMA"] = "RPC client sent an invalid schema for challenge request with commentModeration";
132
+ messages["ERR_INVALID_COMMUNITY_EDIT_CHALLENGE_REQUEST_TO_ENCRYPT_SCHEMA"] = "RPC client sent an invalid schema for challenge request with communityEdit";
133
+ messages["ERR_COMMUNITY_EDIT_OPTIONS_SCHEMA"] = "User sent a community edit options with invalid schema";
134
+ messages["ERR_INVALID_CHALLENGE_ANSWERS"] = "User sent challenge answers with invalid schema";
135
+ messages["ERR_INVALID_CREATE_PKC_WS_SERVER_OPTIONS_SCHEMA"] = "Invalid create arguments for PKC WS RPC server";
136
+ messages["ERR_INVALID_CREATE_PKC_ARGS_SCHEMA"] = "User sent arguments with invalid schema in an attempt to create a PKC instance";
137
+ messages["ERR_INVALID_CREATE_COMMUNITY_WITH_RPC_ARGS_SCHEMA"] = "User provided invalid schema of arguments for pkc.createCommunity while connected to RPC";
138
+ messages["ERR_CAN_NOT_SET_EXCLUDE_PUBLICATION_TO_EMPTY_OBJECT"] = "The community has community.settings.challenges[x].exclude[y].publicationType is set to an empty object. You should either choose which publication to exclude or remove exclude.publicationType";
139
+ messages["ERR_COMMUNITY_HAS_NO_INTERNAL_STATE"] = "The community has no internal state. This should never happen. Please report this bug.";
140
+ // Sign errors
141
+ messages["ERR_AUTHOR_ADDRESS_NOT_MATCHING_SIGNER"] = "comment.author.address does not match signer.address";
142
+ messages["ERR_AUTHOR_ADDRESS_IS_NOT_A_DOMAIN_OR_B58"] = "author.address is not a domain or B58";
143
+ messages["ERR_SIGNATURE_PUBLIC_KEY_IS_NOT_B58"] = "The public key of the signature is not B58";
144
+ messages["ERR_PUBLICATION_FAILED_TO_DECRYPT_CHALLENGE"] = "The publication received a challenge and failed to decrypt";
145
+ // Verify Signature errors
146
+ messages["ERR_SIGNATURE_IS_INVALID"] = "Signature of publication is invalid";
147
+ messages["ERR_SIGNATURE_HAS_NO_PUBLIC_KEY"] = "Signature of publication has no public key";
148
+ messages["ERR_COMMENT_UPDATE_EDIT_SIGNATURE_IS_INVALID"] = "The author edit of comment (commentUpdate.edit) has an invalid signature";
149
+ messages["ERR_THE_COMMUNITY_IPNS_RECORD_POINTS_TO_DIFFERENT_ADDRESS_THAN_WE_EXPECTED"] = "The community record address does not correspond to the requested community. requestedCommunity.address !== providedCommunity.address";
150
+ messages["ERR_COMMUNITY_NAME_RESOLVES_TO_DIFFERENT_PUBLIC_KEY"] = "The community name resolves to a different public key than the one provided. The community may have migrated to a new key.";
151
+ messages["ERR_AUTHOR_NOT_MATCHING_SIGNATURE"] = "comment.author.address doesn't match comment.signature.publicKey";
152
+ messages["ERR_AUTHOR_NAME_MUST_BE_A_DOMAIN"] = "author.name must be a domain name (e.g. 'example.bso')";
153
+ messages["ERR_COMMUNITY_IPNS_NAME_DOES_NOT_MATCH_SIGNATURE_PUBLIC_KEY"] = "The IPNS name of community doesn't match community.signature.publicKey";
154
+ messages["ERR_COMMENT_SHOULD_BE_THE_LATEST_EDIT"] = "comment.content is not set to the latest comment.authorEdit.content";
155
+ messages["ERR_COMMENT_UPDATE_IS_NOT_SIGNED_BY_COMMUNITY"] = "Comment update is not signed by the community";
156
+ messages["ERR_AUTHOR_EDIT_IS_NOT_SIGNED_BY_AUTHOR"] = "Author edit is not signed by original author of comment";
157
+ messages["ERR_COMMENT_UPDATE_DIFFERENT_CID_THAN_COMMENT"] = "CommentUpdate.cid is different than calculated or provided comment.cid";
158
+ messages["ERR_PAGE_COMMENT_POST_HAS_POST_CID_DEFINED_WITH_DEPTH_0"] = "pageComment.comment.postCid is defined even though depth = 0, comments in page need to adhere to strict CommentIpfs and CommentUpdate props";
159
+ messages["ERR_CHALLENGE_MSG_SIGNER_IS_NOT_COMMUNITY"] = "The signer of challenge pubsub message is not the community";
160
+ messages["ERR_CHALLENGE_VERIFICATION_MSG_SIGNER_IS_NOT_COMMUNITY"] = "The signer of challenge verification pubsub message is not the community";
161
+ messages["ERR_CHALLENGE_REQUEST_ID_NOT_DERIVED_FROM_SIGNATURE"] = "Challenge request id is not derived from signature.publicKey";
162
+ messages["ERR_CHALLENGE_SIGNATURE_IS_INVALID"] = "Received a challenge message with an invalid signature";
163
+ messages["ERR_CHALLENGE_VERIFICATION_SIGNATURE_IS_INVALID"] = "Received a challenge verification message with an invalid signature";
164
+ messages["ERR_LOCAL_COMMUNITY_PRODUCED_INVALID_SIGNATURE"] = "Local community produced a new record with invalid signature";
165
+ messages["ERR_COMMUNITY_POSTS_INVALID"] = "community.posts signature is invalid";
166
+ messages["ERR_COMMENT_IPFS_SIGNATURE_IS_INVALID"] = "CommentIpfs signature is invalid";
167
+ messages["ERR_COMMENT_UPDATE_SIGNATURE_IS_INVALID"] = "CommentUpdate signature is invalid";
168
+ messages["ERR_COMMENT_IPFS_RECORD_INCLUDES_RESERVED_FIELD"] = "CommentIpfs record includes a reserved field";
169
+ messages["ERR_COMMENT_IPFS_AUTHOR_INCLUDES_RESERVED_FIELD"] = "CommentIpfs author includes a reserved field";
170
+ messages["ERR_COMMENT_UPDATE_RECORD_INCLUDES_RESERVED_FIELD"] = "CommentUpdate record includes a reserved field";
171
+ messages["ERR_COMMUNITY_EDIT_HAS_RESERVED_FIELD"] = "CommunityEdit record includes a reserved field";
172
+ messages["ERR_COMMUNITY_SIGNATURE_IS_INVALID"] = "Community signature is invalid";
173
+ messages["ERR_COMMUNITY_RECORD_INCLUDES_RESERVED_FIELD"] = "The CommunityIpfs record includes a reserved field";
174
+ messages["ERR_FAILED_TO_RESOLVE_COMMUNITY_DOMAIN"] = "Failed to resolve the community domain address to use for verification";
175
+ messages["ERR_FAILED_TO_RESOLVE_AUTHOR_DOMAIN"] = "Failed to resolve the author domain address to use for verification";
176
+ messages["ERR_AUTHOR_DOMAIN_RESOLVES_TO_DIFFERENT_SIGNER"] = "The author domain resolved to a public key that does not match the publication signer";
177
+ messages["ERR_COMMUNITY_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommunityIpfs record includes a field not included in signature.signedPropertyNames";
178
+ messages["ERR_VOTE_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "VotePubsubMessagePublication record includes a field that's not included in signature.signedPropertyNames";
179
+ messages["ERR_COMMENT_EDIT_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommentEditPubsubMessagePublication record includes a field that's not included in signature.signedPropertyNames";
180
+ messages["ERR_COMMENT_MODERATION_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommentModerationPubsubMessagePublication includes a field that's not included in signature.signedPropertyNames";
181
+ messages["ERR_COMMENT_PUBSUB_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommentPubsubMessagePublication includes a field that's not included in signature.signedPropertyNames";
182
+ messages["ERR_COMMENT_UPDATE_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommentUpdate record includes a field that's not included in signature.signedPropertyNames";
183
+ messages["ERR_CHALLENGE_REQUEST_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "ChallengeRequestPubsubMessage include a field that's not part of signature.signedPropertyNames";
184
+ messages["ERR_CHALLENGE_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "ChallengePubsubMessage includes a field that's not part of signature.signedPropertyNames";
185
+ messages["ERR_CHALLENGE_ANSWER_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "ChallengeAnswerPubsubMessage includes a field that's not part of signature.signedPropertyNames";
186
+ messages["ERR_CHALLENGE_VERIFICATION_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "ChallengeVerificationPubsubMessage includes a field that's not part of signature.signedPropertyNames";
187
+ messages["ERR_COMMUNITY_EDIT_RECORD_INCLUDES_FIELD_NOT_IN_SIGNED_PROPERTY_NAMES"] = "CommunityEditPubsubPublication includes a field that's not in signature.signedPropertyNames";
188
+ messages["ERR_COMMUNITY_CHANGED_COMMENT_PUBSUB_PUBLICATION_PROPS"] = "The community changed CommentPubsubMessagePublication props in decryptedChallengeVerification.comment";
189
+ messages["ERR_COMMUNITY_SENT_CHALLENGE_VERIFICATION_WITH_INVALID_COMMENT"] = "The community sent an invalid decryptedChallengeVerification.comment";
190
+ messages["ERR_COMMUNITY_SENT_CHALLENGE_VERIFICATION_WITH_INVALID_COMMENTUPDATE"] = "The community sent an invalid decryptedChallengeVerification.commentUpdate";
191
+ messages["ERR_COMMUNITY_SENT_CHALLENGE_VERIFICATION_WITH_INVALID_CID"] = "The community sent decryptedChallengeVerification with commentUpdate.cid that does not correspond to commentIpfs";
192
+ messages["ERR_PAGE_COMMENT_IS_INVALID"] = "validatePage has found a comment within a page that is invalid";
193
+ messages["ERR_PAGE_COMMENT_IS_A_REPLY_BUT_HAS_NO_PARENT_COMMENT_INSTANCE"] = "Page comment is a reply with depth greater than 0, but has no parent comment instance cid";
194
+ messages["ERR_PAGE_COMMENT_DEPTH_VALUE_IS_NOT_RELATIVE_TO_ITS_PARENT"] = "Page comment is a reply with a depth that's not relative to its direct parent";
195
+ messages["ERR_PAGE_COMMENT_PARENT_DOES_NOT_EXIST_IN_FLAT_PAGE"] = "The parent of a comment in a flat page does not exist";
196
+ messages["ERR_PAGE_COMMENT_POST_CID_IS_NOT_SAME_AS_POST_CID_OF_COMMENT_INSTANCE"] = "The post cid of reply in page is different than the post cid of the comment instance. Did the community instance put the wrong reply in this page?";
197
+ messages["ERR_REPLY_IN_FLAT_PAGE_HAS_NO_PARENT_CID"] = "Reply in flat page has no parent CID";
198
+ messages["ERR_PAGE_COMMENT_NO_WAY_TO_DERIVE_POST_CID"] = "Unable to derive post cid from page comment while verifying page";
199
+ messages["ERR_POSTS_PAGE_IS_INVALID"] = "The page of posts is invalid";
200
+ messages["ERR_REPLIES_PAGE_IS_INVALID"] = "The page of replies is invalid";
201
+ messages["ERR_USER_ATTEMPTS_TO_VALIDATE_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_CID"] = "User attempted to validate replies page without providing parent comment cid. Make sure parent comment is properly loaded";
202
+ messages["ERR_USER_ATTEMPTS_TO_VALIDATE_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_DEPTH"] = "User attempted to validate replies page without providing parent comment depth. Make sure parent comment is properly loaded";
203
+ messages["ERR_USER_ATTEMPTS_TO_VALIDATE_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_POST_CID"] = "User attempted to validate replies page without providing parent comment post cid. Make sure parent comment is properly loaded";
204
+ messages["ERR_USER_ATTEMPTS_TO_GET_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_CID"] = "User attempted to get replies page without providing parent comment cid. Make sure parent comment is properly loaded";
205
+ messages["ERR_USER_ATTEMPTS_TO_GET_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_DEPTH"] = "User attempted to get replies page without providing parent comment depth. Make sure parent comment is properly loaded";
206
+ messages["ERR_USER_ATTEMPTS_TO_GET_REPLIES_PAGE_WITHOUT_PARENT_COMMENT_POST_CID"] = "User attempted to get replies page without providing parent comment post cid. Make sure parent comment is properly loaded";
207
+ messages["ERR_FAILED_TO_FIND_REPLY_COMMENT_UPDATE_WITHIN_PARENT_COMMENT_PAGE_CIDS"] = "Failed to find reply comment update within parent comment page cids";
208
+ messages["ERR_INVALID_COMMENT_IPFS"] = "The part of CommentIpfs in Comment or PageComment is invalid";
209
+ messages["ERR_COMMENT_MISSING_POST_CID"] = "Comment instance or PageComment has no postCid. postCid should always be defined if you have CommentIpfs";
210
+ messages["ERR_INVALID_COMMENT_UPDATE"] = "The part of CommentUpdate in Comment or PageComment is invalid";
211
+ // getPage errors
212
+ messages["ERR_COMMENT_IN_PAGE_BELONG_TO_DIFFERENT_COMMUNITY"] = "Comment in page should be under the same community";
213
+ messages["ERR_PARENT_CID_OF_COMMENT_IN_PAGE_IS_NOT_CORRECT"] = "The parent cid of comment in page is not correct";
214
+ messages["ERR_PAGE_SIGNATURE_IS_INVALID"] = "The signature of one of the comment in the page is invalid";
215
+ messages["ERR_MOD_QUEUE_PAGE_IS_INVALID"] = "The signature of mod queue page is invalid";
216
+ // Community rejections of pubsub messages
217
+ messages["ERR_CHALLENGE_ANSWER_WITH_NO_CHALLENGE_REQUEST"] = "Received a challenge answer without a prior challenge request";
218
+ messages["ERR_REUSED_PUBSUB_MSG_SIGNER"] = "Reusing a pubsub message signer is forbidden";
219
+ messages["ERR_PUBSUB_MSG_TIMESTAMP_IS_OUTDATED"] = "The timestamp of the pubsub message is outdated";
220
+ // Community rejections of publications
221
+ messages["ERR_UNAUTHORIZED_COMMENT_EDIT"] = "The author of this edit is not a mod/admin/owner or an author of the original comment. Can't edit";
222
+ messages["ERR_COMMUNITY_COMMENT_TIMESTAMP_IS_EARLIER_THAN_PARENT"] = "Rejecting post/comment because its timestamp is earlier than its parent";
223
+ messages["ERR_USER_PUBLISHED_UNDER_PENDING_COMMENT"] = "User attempted to publish a publication under a pending comment";
224
+ messages["ERR_USER_PUBLISHED_UNDER_DISAPPROVED_COMMENT"] = "User attempted to publish a publication under a disapproved comment";
225
+ messages["ERR_MOD_ATTEMPTING_TO_APPROVE_OR_DISAPPROVE_COMMENT_THAT_IS_NOT_PENDING"] = "Mod published a comment moderation with approved field on a comment that's not pending approval";
226
+ messages["ERR_PUBLICATION_PARENT_DOES_NOT_EXIST_IN_COMMUNITY"] = "The parent of this publication does not exist within the community's records";
227
+ messages["ERR_COMMUNITY_PUBLICATION_PARENT_CID_NOT_DEFINED"] = "The parent cid of this publication is not defined. Make sure either commentCid or parentCid is defined";
228
+ messages["ERR_PUBLICATION_INVALID_COMMUNITY_ADDRESS"] = "The communityAddress field of publication is not the same as the community being published to";
229
+ messages["ERR_PUBLICATION_USES_DEPRECATED_SUBPLEBBIT_ADDRESS"] = "Publication uses the deprecated `subplebbitAddress` field; update your client to use `communityPublicKey`";
230
+ messages["ERR_PUBLICATION_USES_DEPRECATED_COMMUNITY_ADDRESS"] = "Publication uses the deprecated `communityAddress` field; update your client to use `communityPublicKey`";
231
+ messages["ERR_PUBLICATION_INVALID_COMMUNITY_PUBLIC_KEY"] = "The communityPublicKey field of publication does not match the community's IPNS key";
232
+ messages["ERR_PUBLICATION_INVALID_COMMUNITY_NAME"] = "The communityName field of publication does not match the community's address";
233
+ messages["ERR_AUTHOR_IS_BANNED"] = "Author is banned";
234
+ messages["ERR_PUBLICATION_HAS_NO_AUTHOR_ADDRESS"] = "Publication has no author.address";
235
+ messages["ERR_COMMUNITY_PUBLICATION_PARENT_HAS_BEEN_REMOVED"] = "The parent of this publication has been removed";
236
+ messages["ERR_COMMUNITY_PUBLICATION_PARENT_HAS_BEEN_DELETED"] = "The parent of this publication has been deleted";
237
+ messages["ERR_COMMUNITY_PUBLICATION_POST_HAS_BEEN_DELETED"] = "The post of this publication has been deleted";
238
+ messages["ERR_COMMUNITY_PUBLICATION_POST_HAS_BEEN_REMOVED"] = "The post of this publication has been removed";
239
+ messages["ERR_COMMUNITY_PUBLICATION_POST_IS_LOCKED"] = "The post of this publication has been locked";
240
+ messages["ERR_COMMUNITY_PUBLICATION_POST_IS_ARCHIVED"] = "The post of this publication has been archived";
241
+ messages["ERR_FORBIDDEN_AUTHOR_FIELD"] = "The author field includes a forbidden field";
242
+ messages["ERR_FORBIDDEN_COMMENT_FIELD"] = "The comment/post contains a forbidden field";
243
+ messages["ERR_FORBIDDEN_SIGNER_FIELD"] = "The publication includes a signer field which is forbidden";
244
+ messages["ERR_DUPLICATE_COMMENT"] = "Comment is duplicated";
245
+ messages["ERR_DUPLICATE_COMMENT_MODERATION"] = "CommentModeration is duplicated";
246
+ messages["ERR_DUPLICATE_COMMENT_EDIT"] = "CommentEdit is duplicated";
247
+ messages["ERR_AUTHOR_ADDRESS_UNDEFINED"] = "author address is undefined";
248
+ messages["ERR_COMMUNITY_FAILED_TO_DECRYPT_PUBSUB_MSG"] = "Community failed to decrypt the pubsub message";
249
+ messages["ERR_REQUEST_PUBLICATION_OVER_ALLOWED_SIZE"] = "request.publication size is over 40kb";
250
+ messages["UNAUTHORIZED_AUTHOR_ATTEMPTED_TO_CHANGE_VOTE"] = "An author attempted to change another author's vote";
251
+ messages["COMMENT_LINK_LENGTH_IS_OVER_LIMIT"] = "comment.link length is over the limit";
252
+ messages["INCORRECT_VOTE_VALUE"] = "The vote can only be 1 or 0 or -1";
253
+ messages["ERR_COMMENT_HAS_INVALID_LINK_FIELD"] = "The comment arguments you provided contain an invalid .link";
254
+ messages["ERR_POST_LINK_IS_NOT_OF_MEDIA"] = "Publishing to the community requires a post with a link pointing to media (audio, video, image)";
255
+ messages["ERR_REPLY_HAS_INVALID_LINK_FIELD"] = "The reply must include a valid .link (https URL)";
256
+ messages["ERR_REPLY_LINK_IS_NOT_OF_MEDIA"] = "Publishing a reply to the community requires a link pointing to media (audio, video, image)";
257
+ messages["ERR_COMMENT_CONTENT_CONTAINS_MARKDOWN_IMAGE"] = "This community does not allow embedding images in markdown content";
258
+ messages["ERR_COMMENT_CONTENT_CONTAINS_MARKDOWN_VIDEO"] = "This community does not allow embedding videos in markdown content";
259
+ messages["ERR_COMMENT_HAS_LINK_THAT_IS_IMAGE"] = "This community does not allow comments with image links";
260
+ messages["ERR_COMMENT_HAS_LINK_THAT_IS_VIDEO"] = "This community does not allow comments with video links";
261
+ messages["ERR_COMMENT_HAS_SPOILER_ENABLED"] = "This community does not allow authors to mark comments as spoilers";
262
+ messages["ERR_REPLY_HAS_LINK_THAT_IS_IMAGE"] = "This community does not allow replies with image links";
263
+ messages["ERR_REPLY_HAS_LINK_THAT_IS_VIDEO"] = "This community does not allow replies with video links";
264
+ messages["ERR_COMMENT_HAS_LINK_THAT_IS_AUDIO"] = "This community does not allow comments with audio links";
265
+ messages["ERR_REPLY_HAS_LINK_THAT_IS_AUDIO"] = "This community does not allow replies with audio links";
266
+ messages["ERR_COMMENT_CONTENT_CONTAINS_MARKDOWN_AUDIO"] = "This community does not allow embedding audio in markdown content";
267
+ messages["ERR_REPLY_HAS_SPOILER_ENABLED"] = "This community does not allow authors to mark replies as spoilers";
268
+ messages["ERR_NESTED_REPLIES_NOT_ALLOWED"] = "This community does not allow nested replies (depth > 1)";
269
+ messages["ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE"] = "Comment has no content, link or title";
270
+ messages["ERR_COMMENT_EDIT_HAS_NO_EDIT_FIELD"] = "CommentEdit has no editable field. At least one of content, deleted, flairs, spoiler or nsfw must be defined";
271
+ messages["ERR_COMMENT_MODERATION_HAS_NO_MODERATION_FIELD"] = "CommentModeration has no moderation field. At least one moderation field other than reason must be defined";
272
+ messages["ERR_REQUEST_ENCRYPTED_IS_INVALID_JSON_AFTER_DECRYPTION"] = "request.encrypted is an invalid json after decrypting";
273
+ messages["ERR_REQUEST_ENCRYPTED_HAS_INVALID_SCHEMA_AFTER_DECRYPTING"] = "request.encrypted has an invalid schema after decrypting";
274
+ messages["ERR_CHALLENGE_REQUEST_ENCRYPTED_HAS_NO_PUBLICATION_AFTER_DECRYPTING"] = "request.encrypted has not defined vote, comment, commentEdit, or commentModeration. At least one of them need to be defined";
275
+ messages["ERR_CHALLENGE_REQUEST_ENCRYPTED_HAS_MULTIPLE_PUBLICATIONS_AFTER_DECRYPTING"] = "request.encrypted has multiple publication fields. The user is only allowed one publication per request";
276
+ messages["ERR_CHALLENGE_ANSWER_IS_INVALID_JSON"] = "challenganswer.challengeAnswers is an invalid json";
277
+ messages["ERR_CHALLENGE_ANSWER_IS_INVALID_SCHEMA"] = "challengeanswer.challengeAnswers is an invalid schema";
278
+ messages["ERR_COMMENT_HAS_RESERVED_FIELD"] = "CommentPubsubMessagePublication has a reserved field";
279
+ messages["ERR_VOTE_HAS_RESERVED_FIELD"] = "VotePubsubMessagePublication has a reserved field";
280
+ messages["ERR_COMMENT_EDIT_HAS_RESERVED_FIELD"] = "CommentEditPubsubMessagePublication has a reserved field";
281
+ messages["ERR_PUBLICATION_AUTHOR_HAS_RESERVED_FIELD"] = "request.publication.author has a reserved field";
282
+ messages["ERR_COMMENT_EDIT_CAN_NOT_EDIT_COMMENT_IF_NOT_ORIGINAL_AUTHOR"] = "CommentEditPubsubPublication is attempting to edit a comment while not being the original author of the comment";
283
+ messages["ERR_COMMENT_MODERATION_NO_COMMENT_TO_EDIT"] = "CommentModerationPubsubMessagePublication is attempting to moderate a comment that does not exist";
284
+ messages["ERR_COMMENT_EDIT_NO_COMMENT_TO_EDIT"] = "CommentEditPubsubMessagePublication is attempting to edit a comment that does not exist";
285
+ messages["ERR_COMMENT_MODERATION_HAS_RESERVED_FIELD"] = "CommentModerationPubsubMessagePublication has a reserved field";
286
+ messages["ERR_COMMENT_MODERATION_ATTEMPTED_WITHOUT_BEING_MODERATOR"] = "CommentModerationPubsubMessagePublication signer is not a mod at this community";
287
+ messages["ERR_COMMUNITY_EDIT_ATTEMPTED_TO_MODIFY_OWNER_EXCLUSIVE_PROPS"] = "CommunityEdit attempted to modify props meant only for the owner to edit";
288
+ messages["ERR_COMMUNITY_EDIT_ATTEMPTED_TO_MODIFY_COMMUNITY_WITHOUT_BEING_OWNER_OR_ADMIN"] = "CommunityEdit attempted to modify community without being an owner or admin";
289
+ messages["ERR_COMMUNITY_EDIT_ATTEMPTED_TO_NON_PUBLIC_PROPS"] = "CommunityEdit attempted to modify non public props or non existent. CommunityEdit is only allowed to edit props from CommunityIpfs schema";
290
+ messages["ERR_PUBLICATION_TIMESTAMP_IS_NOT_IN_PROPER_RANGE"] = "Timestamp of publication is either too high or too low. It should be within 5 minutes range";
291
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_UPVOTES"] = "community.features.noUpvotes is true which means no upvotes can be published to this community";
292
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_DOWNVOTES"] = "community.features.noDownvotes is true which means no downvotes can be published to this community";
293
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_POST_DOWNVOTES"] = "community.features.noPostDownvotes is true which means no downvotes can be published to posts";
294
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_POST_UPVOTES"] = "community.features.noPostUpvotes is true which means no upvotes can be published to posts";
295
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_REPLY_DOWNVOTES"] = "community.features.noReplyDownvotes is true which means no downvotes can be published to replies (depth > 0)";
296
+ messages["ERR_NOT_ALLOWED_TO_PUBLISH_REPLY_UPVOTES"] = "community.features.noReplyUpvotes is true which means no upvotes can be published to replies (depth > 0)";
297
+ messages["ERR_THERE_IS_NO_PREVIOUS_VOTE_TO_CANCEL"] = "vote=0 is for canceling a previous vote, but the author doesn't have a previous vote on this comment";
298
+ messages["ERR_POST_FLAIRS_NOT_ALLOWED"] = "Post flairs are not allowed unless community.features.postFlairs is true";
299
+ messages["ERR_POST_FLAIRS_REQUIRED"] = "Post flairs are required when community.features.requirePostFlairs is true";
300
+ messages["ERR_POST_FLAIR_NOT_IN_ALLOWED_FLAIRS"] = "Post flair must be from the allowed flairs in community.flairs['post']";
301
+ messages["ERR_AUTHOR_FLAIRS_NOT_ALLOWED"] = "Author flairs are not allowed unless community.features.authorFlairs is true";
302
+ messages["ERR_AUTHOR_FLAIRS_REQUIRED"] = "Author flairs are required when community.features.requireAuthorFlairs is true";
303
+ messages["ERR_AUTHOR_FLAIR_NOT_IN_ALLOWED_FLAIRS"] = "Author flair must be from the allowed flairs in community.flairs['author']";
304
+ // Comment Edit errors
305
+ messages["ERR_COMMUNITY_COMMENT_MOD_CAN_NOT_LOCK_REPLY"] = "Can't lock replies. Only posts";
306
+ messages["ERR_COMMUNITY_COMMENT_MOD_CAN_NOT_ARCHIVE_REPLY"] = "Can't archive replies. Only posts";
307
+ messages["ERR_COMMUNITY_COMMENT_EDIT_UNAUTHORIZED_FIELD"] = "CommentEdit includes a field that cannot be used";
308
+ messages["ERR_PUBLISHING_EDIT_WITH_BOTH_MOD_AND_AUTHOR_FIELDS"] = "CommentEdit can't have both author and mod fields. Please publish a separate request for author and mod";
309
+ // Resolver errors
310
+ messages["ERR_FAILED_TO_RESOLVE_TEXT_RECORD"] = "Failed to resolve text record";
311
+ messages["ERR_NO_CHAIN_PROVIDER_FOR_CHAIN_TICKER"] = "no chain provider options set for chain ticker";
312
+ messages["ERR_NO_RESOLVER_FOR_NAME"] = "No name resolver can handle this address";
313
+ messages["ERR_DOMAIN_TXT_RECORD_NOT_FOUND"] = "Domain resolver did not find the text record";
314
+ messages["ERR_DOMAIN_COMMUNITY_ADDRESS_TXT_RECORD_POINT_TO_DIFFERENT_ADDRESS"] = "community-address text record of domain is pointing to a different address than community.signer.address";
315
+ messages["ERR_RESOLVED_TEXT_RECORD_TO_NON_IPNS"] = "Resolved the text record value to a string that is non IPNS";
316
+ messages["ERR_COMMUNITY_DOMAIN_HAS_NO_TEXT_RECORD"] = "Domain resolver did not find the text record community-address";
317
+ messages["ERR_AUTHOR_DOMAIN_HAS_NO_TEXT_RECORD"] = "Domain resolver did not find the text record pkc-author-address";
318
+ messages["ERR_ROLE_ADDRESS_DOMAIN_COULD_NOT_BE_RESOLVED"] = "Failed to resolve the pkc-author-address text record for role address domain";
319
+ // Local community errors
320
+ messages["ERR_LOCAL_COMMUNITY_HAS_NO_SIGNER_IN_INTERNAL_STATE"] = "community.signer needs to be defined before proceeding";
321
+ messages["ERR_COMMUNITY_STATE_LOCKED"] = "The internal state of the community in DB is locked";
322
+ messages["ERR_COMMUNITY_CREATION_LOCKED"] = "Community creation is locked";
323
+ messages["ERR_COMMUNITY_ALREADY_STARTED"] = "Community already started";
324
+ messages["ERR_FAILED_TO_IMPORT_IPFS_KEY"] = "Community failed to import IPFS key";
325
+ messages["ERR_LOCAL_COMMUNITY_PRODUCED_INVALID_RECORD"] = "The local community has produced a new IPNS record with invalid signature. This is a critical error";
326
+ messages["ERR_FAILED_TO_PARSE_LOCAL_RAW_IPNS_RECORD"] = "Failed to parse the local IPNS record within our kubo node";
327
+ messages["ERR_FAILED_TO_LOAD_LOCAL_RAW_IPNS_RECORD"] = "Failed to load local IPNS record from within our kubo node";
328
+ messages["ERR_FAILED_TO_IMPORT_CHALLENGE_FILE_FACTORY"] = "Failed to import challenge file factory";
329
+ messages["ERR_FAILED_TO_IMPORT_CHALLENGE_FILE"] = "Failed to import challenge file";
330
+ messages["ERR_INVALID_RESULT_FROM_GET_CHALLENGE_FUNCTION"] = "invalid getChallenge response from community challenge";
331
+ messages["ERR_LOCAL_COMMUNITY_RECORD_TOO_LARGE"] = "Local community has produced a record that is too large. This is a critical error and a bug in pkc-js";
332
+ messages["ERR_CAN_NOT_LOAD_DB_IF_LOCAL_COMMUNITY_ALREADY_STARTED_IN_ANOTHER_PROCESS"] = "Can't load a local community that's already started in another process. You need to use the same PKC instance to load the community";
333
+ messages["ERR_CAN_NOT_EDIT_A_LOCAL_COMMUNITY_THAT_IS_ALREADY_STARTED_IN_ANOTHER_PROCESS"] = "Can't edit a local community that's already started in another process. You need to use the same PKC instance to edit the community";
334
+ messages["CAN_NOT_LOAD_LOCAL_COMMUNITY_IF_DB_DOES_NOT_EXIST"] = "Can't load the local community because its DB does not exist in dataPath";
335
+ messages["ERR_COMMUNITY_START_FAILED_UNKNOWN_ERROR"] = "Community start failed with unknown error";
336
+ messages["ERR_COMMUNITY_ALREADY_STARTED_IN_SAME_PKC_INSTANCE"] = "Community already started in the same PKC instance. You can check pkc._startedCommunities to see all started communities";
337
+ messages["ERR_PAGE_GENERATED_IS_OVER_EXPECTED_SIZE"] = "Page generated is over expected size. This is a critical error and a bug in pkc-js";
338
+ // Pubsub errors
339
+ messages["ERR_PUBSUB_FAILED_TO_SUBSCRIBE"] = "Failed to subscribe on pubsub";
340
+ messages["ERR_PUBSUB_FAILED_TO_UNSUBSCRIBE"] = "Failed to unsubscribe on pubsub";
341
+ messages["ERR_PUBSUB_FAILED_TO_PUBLISH"] = "Failed to publish on pubsub";
342
+ messages["ERR_PUBSUB_DID_NOT_RECEIVE_RESPONSE_AFTER_PUBLISHING_CHALLENGE_REQUEST"] = "Did not receive response to challenge request in the specified time";
343
+ messages["ERR_ALL_PUBSUB_PROVIDERS_THROW_ERRORS"] = "All pubsub providers throw an error and unable to publish or subscribe";
344
+ messages["ERR_CHALLENGE_REQUEST_RECEIVED_NO_RESPONSE_FROM_ANY_PROVIDER"] = "The challenge request has been published over the pubsub topic but no response was received";
345
+ messages["ERR_PUBLICATION_DID_NOT_RECEIVE_RESPONSE"] = "Publication did not receive any response to challenge request";
346
+ // RPC errors
347
+ messages["ERR_RPC_AUTH_REQUIRED"] = "RPC server rejected the connection. The auth key is either missing or wrong. Set the correct auth key in the RPC URL (e.g., ws://host:port/your-auth-key)";
348
+ messages["ERR_FAILED_TO_OPEN_CONNECTION_TO_RPC"] = "Failed to open connection to RPC";
349
+ messages["ERR_FAILED_TO_CREATE_WS_RPC_SERVER"] = "Failed to create WebSocket RPC server";
350
+ messages["ERR_RPC_CLIENT_ATTEMPTING_TO_START_A_REMOTE_COMMUNITY"] = "Attempting to start a community that is not local";
351
+ messages["ERR_RPC_CLIENT_TRYING_TO_STOP_COMMUNITY_THAT_IS_NOT_RUNNING"] = "RPC client is attempting to stop a local community that is not running";
352
+ messages["ERR_RPC_CLIENT_TRYING_TO_STOP_REMOTE_COMMUNITY"] = "RPC client is attempting to stop a remote community";
353
+ messages["ERR_RPC_CLIENT_TRYING_TO_EDIT_REMOTE_COMMUNITY"] = "RPC client is attempting to edit remote community";
354
+ messages["ERR_RPC_CLIENT_TRYING_TO_DELETE_REMOTE_COMMUNITY"] = "RPC client is attempting to delete remote community";
355
+ messages["ERR_GENERIC_RPC_CLIENT_CALL_ERROR"] = "RPC client received an unknown error when executing call over websocket";
356
+ messages["ERR_RPC_CLIENT_CHALLENGE_NAME_NOT_AVAILABLE_ON_SERVER"] = "The challenge name is not available on the RPC server. Available challenges are listed in details.availableChallenges";
357
+ })(messages || (messages = {}));
358
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,QA8WX;AA9WD,WAAY,QAAQ;IAChB,gFAAoE,CAAA;IACpE,yHAA6G,CAAA;IAC7G,6EAAiE,CAAA;IACjE,4FAAgF,CAAA;IAChF,4HAAgH,CAAA;IAChH,8HAAkH,CAAA;IAClH,iDAAqC,CAAA;IACrC,0GAA8F,CAAA;IAC9F,2KAA+J,CAAA;IAC/J,oGAAwF,CAAA;IACxF,8DAAkD,CAAA;IAClD,6EAAiE,CAAA;IACjE,iFAAqE,CAAA;IACrE,uIAA2H,CAAA;IAC3H,8HAAkH,CAAA;IAClH,sHAA0G,CAAA;IAC1G,0JAA8I,CAAA;IAC9I,mJAAuI,CAAA;IACvI,kHAAsG,CAAA;IACtG,iFAAqE,CAAA;IACrE,gHAAoG,CAAA;IACpG,4IAAgI,CAAA;IAChI,yFAA6E,CAAA;IAC7E,aAAa;IACb,+GAAmG,CAAA;IACnG,uGAA2F,CAAA;IAC3F,4HAAgH,CAAA;IAChH,qFAAyE,CAAA;IACzE,uFAA2E,CAAA;IAC3E,uFAA2E,CAAA;IAC3E,6EAAiE,CAAA;IACjE,mHAAuG,CAAA;IACvG,wJAA4I,CAAA;IAC5I,oNAAwM,CAAA;IACxM,sOAA0N,CAAA;IAC1N,8PAAkP,CAAA;IAClP,wMAA4L,CAAA;IAC5L,8OAAkO,CAAA;IAClO,wFAA4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H,CAAA;IAC/H,gBAAgB;IAChB,4EAAgE,CAAA;IAChE,gFAAoE,CAAA;IACpE,wEAA4D,CAAA;IAC5D,0JAA8I,CAAA;IAC9I,4HAAgH,CAAA;IAChH,wKAA4J,CAAA;IAC5J,sHAA0G,CAAA;IAE1G,aAAa;IACb,+LAAmL,CAAA;IACnL,qFAAyE,CAAA;IACzE,wFAA4E,CAAA;IAC5E,uHAA2G,CAAA;IAC3G,kJAAsI,CAAA;IACtI,kHAAsG,CAAA;IACtG,gHAAoG,CAAA;IACpG,oHAAwG,CAAA;IACxG,yHAA6G,CAAA;IAC7G,2LAA+K,CAAA;AACnL,CAAC,EA9WW,QAAQ,KAAR,QAAQ,QA8WnB"}
@@ -0,0 +1,15 @@
1
+ export declare class LimitedSet<T> {
2
+ private maxSize;
3
+ private set;
4
+ private insertionOrder;
5
+ constructor(maxSize: number);
6
+ add(value: T): LimitedSet<T>;
7
+ has(value: T): boolean;
8
+ delete(value: T): boolean;
9
+ clear(): void;
10
+ get size(): number;
11
+ [Symbol.iterator](): IterableIterator<T>;
12
+ entries(): IterableIterator<[T, T]>;
13
+ values(): IterableIterator<T>;
14
+ forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
15
+ }
@@ -0,0 +1,66 @@
1
+ export class LimitedSet {
2
+ constructor(maxSize) {
3
+ this.maxSize = maxSize;
4
+ this.set = new Set();
5
+ this.insertionOrder = []; // To track insertion order
6
+ }
7
+ add(value) {
8
+ // If the value already exists, we need to refresh its position
9
+ if (this.set.has(value)) {
10
+ // Remove from insertion order to refresh position
11
+ const index = this.insertionOrder.indexOf(value);
12
+ if (index !== -1) {
13
+ this.insertionOrder.splice(index, 1);
14
+ }
15
+ }
16
+ else {
17
+ // Check if we need to remove the oldest element
18
+ if (this.set.size >= this.maxSize) {
19
+ const oldest = this.insertionOrder.shift(); // Get and remove oldest
20
+ if (oldest !== undefined) {
21
+ this.set.delete(oldest);
22
+ }
23
+ }
24
+ }
25
+ // Add the new value
26
+ this.set.add(value);
27
+ this.insertionOrder.push(value);
28
+ return this;
29
+ }
30
+ has(value) {
31
+ return this.set.has(value);
32
+ }
33
+ delete(value) {
34
+ const result = this.set.delete(value);
35
+ if (result) {
36
+ const index = this.insertionOrder.indexOf(value);
37
+ if (index !== -1) {
38
+ this.insertionOrder.splice(index, 1);
39
+ }
40
+ }
41
+ return result;
42
+ }
43
+ clear() {
44
+ this.set.clear();
45
+ this.insertionOrder = [];
46
+ }
47
+ get size() {
48
+ return this.set.size;
49
+ }
50
+ *[Symbol.iterator]() {
51
+ for (const item of this.set) {
52
+ yield item;
53
+ }
54
+ }
55
+ // Additional methods to make it more compatible with Set interface
56
+ entries() {
57
+ return this.set.entries();
58
+ }
59
+ values() {
60
+ return this.set.values();
61
+ }
62
+ forEach(callbackfn, thisArg) {
63
+ this.set.forEach(callbackfn, thisArg);
64
+ }
65
+ }
66
+ //# sourceMappingURL=limited-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limited-set.js","sourceRoot":"","sources":["../../../src/general-util/limited-set.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;IAKnB,YAAY,OAAe;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,EAAK,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,CAAC,2BAA2B;IACzD,CAAC;IAED,GAAG,CAAC,KAAQ;QACR,+DAA+D;QAC/D,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,kDAAkD;YAClD,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;gBACf,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACzC,CAAC;QACL,CAAC;a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M,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC1B,MAAM,IAAI,CAAC;QACf,CAAC;IACL,CAAC;IAED,mEAAmE;IACnE,OAAO;QACH,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM;QACF,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,UAAsD,EAAE,OAAa;QACzE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACJ"}
@@ -0,0 +1 @@
1
+ export declare const version = "0.0.11";
@@ -0,0 +1,3 @@
1
+ // Auto-generated by config/generate-version.js — do not edit
2
+ export const version = "0.0.11";
3
+ //# sourceMappingURL=generated-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-version.js","sourceRoot":"","sources":["../../src/generated-version.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { PKCTypedEmitter } from "./clients/pkc-typed-emitter.js";
2
+ import { GenericClientEvents } from "./types.js";
3
+ export declare class GenericStateClient<T extends string> extends PKCTypedEmitter<GenericClientEvents<T>> {
4
+ state: T;
5
+ constructor(state: T);
6
+ }
@@ -0,0 +1,11 @@
1
+ import { PKCTypedEmitter } from "./clients/pkc-typed-emitter.js";
2
+ import { hideClassPrivateProps } from "./util.js";
3
+ export class GenericStateClient extends PKCTypedEmitter {
4
+ constructor(state) {
5
+ super();
6
+ this.state = state;
7
+ this.setMaxListeners(100);
8
+ hideClassPrivateProps(this);
9
+ }
10
+ }
11
+ //# sourceMappingURL=generic-state-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic-state-client.js","sourceRoot":"","sources":["../../src/generic-state-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAElD,MAAM,OAAO,kBAAqC,SAAQ,eAAuC;IAG7F,YAAY,KAAQ;QAChB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC1B,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;CACJ"}
@@ -0,0 +1,3 @@
1
+ import type { ParsedPKCOptions } from "../types.js";
2
+ import { Libp2pJsClient } from "./libp2pjsClient.js";
3
+ export declare function createLibp2pJsClientOrUseExistingOne(pkcOptions: Required<Pick<ParsedPKCOptions, "httpRoutersOptions">> & NonNullable<ParsedPKCOptions["libp2pJsClientsOptions"]>[number]): Promise<Libp2pJsClient>;