@xyo-network/bridge-pub-sub 2.90.23 → 2.91.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.cts +11 -0
  2. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.cts.map +1 -0
  3. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.mts +11 -0
  4. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.mts.map +1 -0
  5. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.ts +11 -0
  6. package/dist/browser/AbstractModuleHost/AbstractModuleHost.d.ts.map +1 -0
  7. package/dist/browser/AbstractModuleHost/index.d.cts +2 -0
  8. package/dist/browser/AbstractModuleHost/index.d.cts.map +1 -0
  9. package/dist/browser/AbstractModuleHost/index.d.mts +2 -0
  10. package/dist/browser/AbstractModuleHost/index.d.mts.map +1 -0
  11. package/dist/browser/AbstractModuleHost/index.d.ts +2 -0
  12. package/dist/browser/AbstractModuleHost/index.d.ts.map +1 -0
  13. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.cts +90 -0
  14. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.cts.map +1 -0
  15. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.mts +90 -0
  16. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.mts.map +1 -0
  17. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.ts +90 -0
  18. package/dist/browser/AbstractModuleProxy/AbstractModuleProxy.d.ts.map +1 -0
  19. package/dist/browser/AbstractModuleProxy/index.d.cts +2 -0
  20. package/dist/browser/AbstractModuleProxy/index.d.cts.map +1 -0
  21. package/dist/browser/AbstractModuleProxy/index.d.mts +2 -0
  22. package/dist/browser/AbstractModuleProxy/index.d.mts.map +1 -0
  23. package/dist/browser/AbstractModuleProxy/index.d.ts +2 -0
  24. package/dist/browser/AbstractModuleProxy/index.d.ts.map +1 -0
  25. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.cts +75 -38
  26. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.cts.map +1 -1
  27. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.mts +75 -38
  28. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.mts.map +1 -1
  29. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.ts +75 -38
  30. package/dist/browser/AsyncQueryBus/AsyncQueryBusBase.d.ts.map +1 -1
  31. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.cts +16 -46
  32. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.cts.map +1 -1
  33. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.mts +16 -46
  34. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.mts.map +1 -1
  35. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.ts +16 -46
  36. package/dist/browser/AsyncQueryBus/AsyncQueryBusClient.d.ts.map +1 -1
  37. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.cts +37 -0
  38. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.cts.map +1 -0
  39. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.mts +37 -0
  40. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.mts.map +1 -0
  41. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.ts +37 -0
  42. package/dist/browser/AsyncQueryBus/AsyncQueryBusHost.d.ts.map +1 -0
  43. package/dist/browser/AsyncQueryBus/Config.d.cts +21 -31
  44. package/dist/browser/AsyncQueryBus/Config.d.cts.map +1 -1
  45. package/dist/browser/AsyncQueryBus/Config.d.mts +21 -31
  46. package/dist/browser/AsyncQueryBus/Config.d.mts.map +1 -1
  47. package/dist/browser/AsyncQueryBus/Config.d.ts +21 -31
  48. package/dist/browser/AsyncQueryBus/Config.d.ts.map +1 -1
  49. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.cts +12 -0
  50. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.cts.map +1 -0
  51. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.mts +12 -0
  52. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.mts.map +1 -0
  53. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.ts +12 -0
  54. package/dist/browser/AsyncQueryBus/ModuleHost/ModuleHost.d.ts.map +1 -0
  55. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.cts +2 -0
  56. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.cts.map +1 -0
  57. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.mts +2 -0
  58. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.mts.map +1 -0
  59. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.ts +2 -0
  60. package/dist/browser/AsyncQueryBus/ModuleHost/index.d.ts.map +1 -0
  61. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts +12 -0
  62. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts.map +1 -0
  63. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts +12 -0
  64. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts.map +1 -0
  65. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts +12 -0
  66. package/dist/browser/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts.map +1 -0
  67. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.cts +2 -0
  68. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.cts.map +1 -0
  69. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.mts +2 -0
  70. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.mts.map +1 -0
  71. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.ts +2 -0
  72. package/dist/browser/AsyncQueryBus/ModuleProxy/index.d.ts.map +1 -0
  73. package/dist/browser/AsyncQueryBus/Params.d.cts +5 -3
  74. package/dist/browser/AsyncQueryBus/Params.d.cts.map +1 -1
  75. package/dist/browser/AsyncQueryBus/Params.d.mts +5 -3
  76. package/dist/browser/AsyncQueryBus/Params.d.mts.map +1 -1
  77. package/dist/browser/AsyncQueryBus/Params.d.ts +5 -3
  78. package/dist/browser/AsyncQueryBus/Params.d.ts.map +1 -1
  79. package/dist/browser/AsyncQueryBus/index.d.cts +3 -1
  80. package/dist/browser/AsyncQueryBus/index.d.cts.map +1 -1
  81. package/dist/browser/AsyncQueryBus/index.d.mts +3 -1
  82. package/dist/browser/AsyncQueryBus/index.d.mts.map +1 -1
  83. package/dist/browser/AsyncQueryBus/index.d.ts +3 -1
  84. package/dist/browser/AsyncQueryBus/index.d.ts.map +1 -1
  85. package/dist/browser/Config.d.cts +5 -2
  86. package/dist/browser/Config.d.cts.map +1 -1
  87. package/dist/browser/Config.d.mts +5 -2
  88. package/dist/browser/Config.d.mts.map +1 -1
  89. package/dist/browser/Config.d.ts +5 -2
  90. package/dist/browser/Config.d.ts.map +1 -1
  91. package/dist/browser/PubSubBridge.d.cts +14 -19
  92. package/dist/browser/PubSubBridge.d.cts.map +1 -1
  93. package/dist/browser/PubSubBridge.d.mts +14 -19
  94. package/dist/browser/PubSubBridge.d.mts.map +1 -1
  95. package/dist/browser/PubSubBridge.d.ts +14 -19
  96. package/dist/browser/PubSubBridge.d.ts.map +1 -1
  97. package/dist/browser/index.cjs +341 -135
  98. package/dist/browser/index.cjs.map +1 -1
  99. package/dist/browser/index.d.cts +2 -0
  100. package/dist/browser/index.d.cts.map +1 -1
  101. package/dist/browser/index.d.mts +2 -0
  102. package/dist/browser/index.d.mts.map +1 -1
  103. package/dist/browser/index.d.ts +2 -0
  104. package/dist/browser/index.d.ts.map +1 -1
  105. package/dist/browser/index.js +343 -137
  106. package/dist/browser/index.js.map +1 -1
  107. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.cts +11 -0
  108. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.cts.map +1 -0
  109. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.mts +11 -0
  110. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.mts.map +1 -0
  111. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.ts +11 -0
  112. package/dist/node/AbstractModuleHost/AbstractModuleHost.d.ts.map +1 -0
  113. package/dist/node/AbstractModuleHost/index.d.cts +2 -0
  114. package/dist/node/AbstractModuleHost/index.d.cts.map +1 -0
  115. package/dist/node/AbstractModuleHost/index.d.mts +2 -0
  116. package/dist/node/AbstractModuleHost/index.d.mts.map +1 -0
  117. package/dist/node/AbstractModuleHost/index.d.ts +2 -0
  118. package/dist/node/AbstractModuleHost/index.d.ts.map +1 -0
  119. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.cts +90 -0
  120. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.cts.map +1 -0
  121. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.mts +90 -0
  122. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.mts.map +1 -0
  123. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.ts +90 -0
  124. package/dist/node/AbstractModuleProxy/AbstractModuleProxy.d.ts.map +1 -0
  125. package/dist/node/AbstractModuleProxy/index.d.cts +2 -0
  126. package/dist/node/AbstractModuleProxy/index.d.cts.map +1 -0
  127. package/dist/node/AbstractModuleProxy/index.d.mts +2 -0
  128. package/dist/node/AbstractModuleProxy/index.d.mts.map +1 -0
  129. package/dist/node/AbstractModuleProxy/index.d.ts +2 -0
  130. package/dist/node/AbstractModuleProxy/index.d.ts.map +1 -0
  131. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.cts +75 -38
  132. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.cts.map +1 -1
  133. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.mts +75 -38
  134. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.mts.map +1 -1
  135. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.ts +75 -38
  136. package/dist/node/AsyncQueryBus/AsyncQueryBusBase.d.ts.map +1 -1
  137. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.cts +16 -46
  138. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.cts.map +1 -1
  139. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.mts +16 -46
  140. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.mts.map +1 -1
  141. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.ts +16 -46
  142. package/dist/node/AsyncQueryBus/AsyncQueryBusClient.d.ts.map +1 -1
  143. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.cts +37 -0
  144. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.cts.map +1 -0
  145. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.mts +37 -0
  146. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.mts.map +1 -0
  147. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.ts +37 -0
  148. package/dist/node/AsyncQueryBus/AsyncQueryBusHost.d.ts.map +1 -0
  149. package/dist/node/AsyncQueryBus/Config.d.cts +21 -31
  150. package/dist/node/AsyncQueryBus/Config.d.cts.map +1 -1
  151. package/dist/node/AsyncQueryBus/Config.d.mts +21 -31
  152. package/dist/node/AsyncQueryBus/Config.d.mts.map +1 -1
  153. package/dist/node/AsyncQueryBus/Config.d.ts +21 -31
  154. package/dist/node/AsyncQueryBus/Config.d.ts.map +1 -1
  155. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.cts +12 -0
  156. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.cts.map +1 -0
  157. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.mts +12 -0
  158. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.mts.map +1 -0
  159. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.ts +12 -0
  160. package/dist/node/AsyncQueryBus/ModuleHost/ModuleHost.d.ts.map +1 -0
  161. package/dist/node/AsyncQueryBus/ModuleHost/index.d.cts +2 -0
  162. package/dist/node/AsyncQueryBus/ModuleHost/index.d.cts.map +1 -0
  163. package/dist/node/AsyncQueryBus/ModuleHost/index.d.mts +2 -0
  164. package/dist/node/AsyncQueryBus/ModuleHost/index.d.mts.map +1 -0
  165. package/dist/node/AsyncQueryBus/ModuleHost/index.d.ts +2 -0
  166. package/dist/node/AsyncQueryBus/ModuleHost/index.d.ts.map +1 -0
  167. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts +12 -0
  168. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.cts.map +1 -0
  169. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts +12 -0
  170. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.mts.map +1 -0
  171. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts +12 -0
  172. package/dist/node/AsyncQueryBus/ModuleProxy/ModuleProxy.d.ts.map +1 -0
  173. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.cts +2 -0
  174. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.cts.map +1 -0
  175. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.mts +2 -0
  176. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.mts.map +1 -0
  177. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.ts +2 -0
  178. package/dist/node/AsyncQueryBus/ModuleProxy/index.d.ts.map +1 -0
  179. package/dist/node/AsyncQueryBus/Params.d.cts +5 -3
  180. package/dist/node/AsyncQueryBus/Params.d.cts.map +1 -1
  181. package/dist/node/AsyncQueryBus/Params.d.mts +5 -3
  182. package/dist/node/AsyncQueryBus/Params.d.mts.map +1 -1
  183. package/dist/node/AsyncQueryBus/Params.d.ts +5 -3
  184. package/dist/node/AsyncQueryBus/Params.d.ts.map +1 -1
  185. package/dist/node/AsyncQueryBus/index.d.cts +3 -1
  186. package/dist/node/AsyncQueryBus/index.d.cts.map +1 -1
  187. package/dist/node/AsyncQueryBus/index.d.mts +3 -1
  188. package/dist/node/AsyncQueryBus/index.d.mts.map +1 -1
  189. package/dist/node/AsyncQueryBus/index.d.ts +3 -1
  190. package/dist/node/AsyncQueryBus/index.d.ts.map +1 -1
  191. package/dist/node/Config.d.cts +5 -2
  192. package/dist/node/Config.d.cts.map +1 -1
  193. package/dist/node/Config.d.mts +5 -2
  194. package/dist/node/Config.d.mts.map +1 -1
  195. package/dist/node/Config.d.ts +5 -2
  196. package/dist/node/Config.d.ts.map +1 -1
  197. package/dist/node/PubSubBridge.d.cts +14 -19
  198. package/dist/node/PubSubBridge.d.cts.map +1 -1
  199. package/dist/node/PubSubBridge.d.mts +14 -19
  200. package/dist/node/PubSubBridge.d.mts.map +1 -1
  201. package/dist/node/PubSubBridge.d.ts +14 -19
  202. package/dist/node/PubSubBridge.d.ts.map +1 -1
  203. package/dist/node/index.cjs +367 -152
  204. package/dist/node/index.cjs.map +1 -1
  205. package/dist/node/index.d.cts +2 -0
  206. package/dist/node/index.d.cts.map +1 -1
  207. package/dist/node/index.d.mts +2 -0
  208. package/dist/node/index.d.mts.map +1 -1
  209. package/dist/node/index.d.ts +2 -0
  210. package/dist/node/index.d.ts.map +1 -1
  211. package/dist/node/index.js +363 -154
  212. package/dist/node/index.js.map +1 -1
  213. package/package.json +32 -25
  214. package/src/AbstractModuleHost/AbstractModuleHost.ts +12 -0
  215. package/src/AbstractModuleHost/index.ts +1 -0
  216. package/src/AbstractModuleProxy/AbstractModuleProxy.ts +239 -0
  217. package/src/AbstractModuleProxy/index.ts +1 -0
  218. package/src/AsyncQueryBus/AsyncQueryBusBase.ts +19 -40
  219. package/src/AsyncQueryBus/AsyncQueryBusClient.ts +73 -63
  220. package/src/AsyncQueryBus/{AsyncQueryBusServer.ts → AsyncQueryBusHost.ts} +35 -27
  221. package/src/AsyncQueryBus/Config.ts +23 -33
  222. package/src/AsyncQueryBus/ModuleHost/ModuleHost.ts +29 -0
  223. package/src/AsyncQueryBus/ModuleHost/index.ts +1 -0
  224. package/src/AsyncQueryBus/ModuleProxy/ModuleProxy.ts +19 -0
  225. package/src/AsyncQueryBus/ModuleProxy/index.ts +1 -0
  226. package/src/AsyncQueryBus/Params.ts +6 -3
  227. package/src/AsyncQueryBus/index.ts +3 -1
  228. package/src/Config.ts +5 -2
  229. package/src/PubSubBridge.ts +19 -20
  230. package/src/index.ts +2 -0
  231. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.cts +0 -74
  232. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.cts.map +0 -1
  233. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.mts +0 -74
  234. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.mts.map +0 -1
  235. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.ts +0 -74
  236. package/dist/browser/AsyncQueryBus/AsyncQueryBusServer.d.ts.map +0 -1
  237. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.cts +0 -74
  238. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.cts.map +0 -1
  239. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.mts +0 -74
  240. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.mts.map +0 -1
  241. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.ts +0 -74
  242. package/dist/node/AsyncQueryBus/AsyncQueryBusServer.d.ts.map +0 -1
@@ -1,28 +1,61 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { Base } from '@xylabs/object';
2
3
  import { DivinerInstance } from '@xyo-network/diviner-model';
3
- import { ModuleConfig, ModuleQueryResult } from '@xyo-network/module-model';
4
+ import { ModuleConfig } from '@xyo-network/module-model';
4
5
  import { LRUCache } from 'lru-cache';
5
- import { Pending } from './Config';
6
6
  import { AsyncQueryBusParams } from './Params';
7
7
  export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = AsyncQueryBusParams> extends Base<TParams> {
8
- protected _lastState?: LRUCache<string, number>;
9
- protected _queryCache?: LRUCache<string, Pending | ModuleQueryResult>;
10
- protected _targetConfigs: Record<string, ModuleConfig>;
11
- protected _targetQueries: Record<string, string[]>;
8
+ protected _lastState?: LRUCache<Address, number>;
9
+ protected _targetConfigs: Record<Address, ModuleConfig>;
10
+ protected _targetQueries: Record<Address, string[]>;
12
11
  constructor(params: TParams);
13
- get config(): import("./Config").AsyncQueryBusConfig<string, string>;
14
- get individualAddressBatchQueryLimitConfig(): number;
12
+ get config(): TParams['config'];
15
13
  get pollFrequencyConfig(): number;
16
- get queryCacheConfig(): LRUCache.Options<string, Pending | ModuleQueryResult, unknown>;
17
- get resolver(): import("@xyo-network/module-model").ModuleResolver;
14
+ get resolver(): import("@xyo-network/module-model").ModuleResolver<import("@xyo-network/module-model").ModuleInstance<import("@xylabs/object").BaseParamsFields & {
15
+ account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
16
+ config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
17
+ readonly archivist?: string | undefined;
18
+ readonly labels?: import("@xyo-network/module-model").Labels | undefined;
19
+ readonly name?: string | undefined;
20
+ readonly paging?: Record<string, {
21
+ size?: number | undefined;
22
+ }> | undefined;
23
+ readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
24
+ schema: "network.xyo.module.config";
25
+ readonly security?: {
26
+ readonly allowAnonymous?: boolean | undefined;
27
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
28
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
29
+ } | undefined;
30
+ readonly sign?: boolean | undefined;
31
+ readonly storeQueries?: boolean | undefined;
32
+ readonly timestamp?: boolean | undefined;
33
+ } & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
34
+ readonly archivist?: string | undefined;
35
+ readonly labels?: import("@xyo-network/module-model").Labels | undefined;
36
+ readonly name?: string | undefined;
37
+ readonly paging?: Record<string, {
38
+ size?: number | undefined;
39
+ }> | undefined;
40
+ readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
41
+ schema: "network.xyo.module.config";
42
+ readonly security?: {
43
+ readonly allowAnonymous?: boolean | undefined;
44
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
45
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
46
+ } | undefined;
47
+ readonly sign?: boolean | undefined;
48
+ readonly storeQueries?: boolean | undefined;
49
+ readonly timestamp?: boolean | undefined;
50
+ }, "schema"> & {
51
+ schema: string;
52
+ };
53
+ ephemeralQueryAccountEnabled?: boolean | undefined;
54
+ }, import("@xyo-network/module-model").ModuleEventData<object>>>;
18
55
  /**
19
56
  * A cache of the last offset of the Diviner process per address
20
57
  */
21
- protected get lastState(): LRUCache<string, number>;
22
- /**
23
- * A cache of queries that have been issued
24
- */
25
- protected get queryCache(): LRUCache<string, Pending | ModuleQueryResult>;
58
+ protected get lastState(): LRUCache<Address, number>;
26
59
  queriesArchivist(): Promise<import("@xyo-network/archivist-model").ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
27
60
  account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
28
61
  config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
@@ -36,8 +69,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
36
69
  schema: "network.xyo.archivist.config";
37
70
  readonly security?: {
38
71
  readonly allowAnonymous?: boolean | undefined;
39
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
40
- readonly disallowed?: Record<string, string[]> | undefined;
72
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
73
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
41
74
  } | undefined;
42
75
  readonly sign?: boolean | undefined;
43
76
  readonly storeQueries?: boolean | undefined;
@@ -53,8 +86,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
53
86
  schema: "network.xyo.archivist.config";
54
87
  readonly security?: {
55
88
  readonly allowAnonymous?: boolean | undefined;
56
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
57
- readonly disallowed?: Record<string, string[]> | undefined;
89
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
90
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
58
91
  } | undefined;
59
92
  readonly sign?: boolean | undefined;
60
93
  readonly storeQueries?: boolean | undefined;
@@ -84,8 +117,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
84
117
  schema: "network.xyo.diviner.boundwitness.config";
85
118
  readonly security?: {
86
119
  readonly allowAnonymous?: boolean | undefined;
87
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
88
- readonly disallowed?: Record<string, string[]> | undefined;
120
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
121
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
89
122
  } | undefined;
90
123
  readonly sign?: boolean | undefined;
91
124
  readonly storeQueries?: boolean | undefined;
@@ -101,8 +134,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
101
134
  schema: "network.xyo.diviner.boundwitness.config";
102
135
  readonly security?: {
103
136
  readonly allowAnonymous?: boolean | undefined;
104
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
105
- readonly disallowed?: Record<string, string[]> | undefined;
137
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
138
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
106
139
  } | undefined;
107
140
  readonly sign?: boolean | undefined;
108
141
  readonly storeQueries?: boolean | undefined;
@@ -117,10 +150,12 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
117
150
  schema: string;
118
151
  };
119
152
  ephemeralQueryAccountEnabled?: boolean | undefined;
120
- }, import("@xyo-network/payload-model").SchemaFields & object & {
153
+ }, import("@xyo-network/payload-model").SchemaFields & object & Omit<{
121
154
  schema: "network.xyo.diviner.boundwitness.query";
122
- } & import("@xyo-network/diviner-boundwitness-model").BoundWitnessDivinerPredicate & import("@xyo-network/payload-model").QueryFields, import("@xyo-network/payload-model").SchemaFields & object & Omit<import("@xyo-network/boundwitness-model").BoundWitnessFields & {
123
- query: string;
155
+ } & import("@xyo-network/diviner-boundwitness-model").BoundWitnessDivinerPredicate & import("@xyo-network/payload-model").QueryFields, "schema"> & {
156
+ schema: "network.xyo.diviner.boundwitness.query";
157
+ }, import("@xyo-network/payload-model").SchemaFields & object & Omit<import("@xyo-network/boundwitness-model").BoundWitnessFields & {
158
+ query: Lowercase<string>;
124
159
  resultSet?: string | undefined;
125
160
  schema: "network.xyo.boundwitness";
126
161
  }, "schema"> & {
@@ -139,8 +174,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
139
174
  schema: "network.xyo.archivist.config";
140
175
  readonly security?: {
141
176
  readonly allowAnonymous?: boolean | undefined;
142
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
143
- readonly disallowed?: Record<string, string[]> | undefined;
177
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
178
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
144
179
  } | undefined;
145
180
  readonly sign?: boolean | undefined;
146
181
  readonly storeQueries?: boolean | undefined;
@@ -156,8 +191,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
156
191
  schema: "network.xyo.archivist.config";
157
192
  readonly security?: {
158
193
  readonly allowAnonymous?: boolean | undefined;
159
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
160
- readonly disallowed?: Record<string, string[]> | undefined;
194
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
195
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
161
196
  } | undefined;
162
197
  readonly sign?: boolean | undefined;
163
198
  readonly storeQueries?: boolean | undefined;
@@ -187,8 +222,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
187
222
  schema: "network.xyo.diviner.boundwitness.config";
188
223
  readonly security?: {
189
224
  readonly allowAnonymous?: boolean | undefined;
190
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
191
- readonly disallowed?: Record<string, string[]> | undefined;
225
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
226
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
192
227
  } | undefined;
193
228
  readonly sign?: boolean | undefined;
194
229
  readonly storeQueries?: boolean | undefined;
@@ -204,8 +239,8 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
204
239
  schema: "network.xyo.diviner.boundwitness.config";
205
240
  readonly security?: {
206
241
  readonly allowAnonymous?: boolean | undefined;
207
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
208
- readonly disallowed?: Record<string, string[]> | undefined;
242
+ readonly allowed?: Record<string, (Lowercase<string> | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
243
+ readonly disallowed?: Record<string, Lowercase<string>[]> | undefined;
209
244
  } | undefined;
210
245
  readonly sign?: boolean | undefined;
211
246
  readonly storeQueries?: boolean | undefined;
@@ -220,9 +255,11 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
220
255
  schema: string;
221
256
  };
222
257
  ephemeralQueryAccountEnabled?: boolean | undefined;
223
- }, import("@xyo-network/payload-model").SchemaFields & object & {
258
+ }, import("@xyo-network/payload-model").SchemaFields & object & Omit<{
259
+ schema: "network.xyo.diviner.boundwitness.query";
260
+ } & import("@xyo-network/diviner-boundwitness-model").BoundWitnessDivinerPredicate & import("@xyo-network/payload-model").QueryFields, "schema"> & {
224
261
  schema: "network.xyo.diviner.boundwitness.query";
225
- } & import("@xyo-network/diviner-boundwitness-model").BoundWitnessDivinerPredicate & import("@xyo-network/payload-model").QueryFields, import("@xyo-network/payload-model").SchemaFields & object & import("@xyo-network/boundwitness-model").BoundWitnessFields & {
262
+ }, import("@xyo-network/payload-model").SchemaFields & object & import("@xyo-network/boundwitness-model").BoundWitnessFields & {
226
263
  schema: "network.xyo.boundwitness";
227
264
  }>>;
228
265
  /**
@@ -233,11 +270,11 @@ export declare class AsyncQueryBusBase<TParams extends AsyncQueryBusParams = Asy
233
270
  * @param address The module address to commit the state for
234
271
  * @param nextState The state to commit
235
272
  */
236
- protected commitState(address: string, nextState: number): Promise<void>;
273
+ protected commitState(address: Address, nextState: number): Promise<void>;
237
274
  /**
238
275
  * Retrieves the last state of the process. Used to recover state after
239
276
  * preemptions, reboots, etc.
240
277
  */
241
- protected retrieveState(address: string): Promise<number>;
278
+ protected retrieveState(address: Address): Promise<number>;
242
279
  }
243
280
  //# sourceMappingURL=AsyncQueryBusBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncQueryBusBase.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusBase.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAKrC,OAAO,EAAqB,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC/E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,2B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AK,SAAS,IAAI,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAInD;IAEK,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOhB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOd,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOlB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOtB;;;;;;;OAOG;cACa,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM;IAQ/D;;;OAGG;cACa,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;CAajE"}
@@ -1,56 +1,24 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
2
3
  import { ModuleQueryResult } from '@xyo-network/module-model';
3
4
  import { Payload } from '@xyo-network/payload-model';
5
+ import { LRUCache } from 'lru-cache';
4
6
  import { AsyncQueryBusBase } from './AsyncQueryBusBase';
5
- import { AsyncQueryBusParams } from './Params';
6
- export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = AsyncQueryBusParams> extends AsyncQueryBusBase<TParams> {
7
+ import { Pending } from './Config';
8
+ import { AsyncQueryBusClientParams } from './Params';
9
+ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusClientParams = AsyncQueryBusClientParams> extends AsyncQueryBusBase<TParams> {
10
+ protected _queryCache?: LRUCache<Address, Pending | ModuleQueryResult>;
11
+ private _pollCount;
7
12
  private _pollId?;
8
13
  constructor(params: TParams);
14
+ get queryCacheConfig(): LRUCache.Options<Address, Pending | ModuleQueryResult, unknown>;
9
15
  get started(): boolean;
10
- listeningModules(): Promise<import("@xyo-network/module-model").ModuleInstance<import("@xylabs/object").BaseParamsFields & {
11
- account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
12
- config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
13
- readonly archivist?: string | undefined;
14
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
15
- readonly name?: string | undefined;
16
- readonly paging?: Record<string, {
17
- size?: number | undefined;
18
- }> | undefined;
19
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
20
- schema: "network.xyo.module.config";
21
- readonly security?: {
22
- readonly allowAnonymous?: boolean | undefined;
23
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
24
- readonly disallowed?: Record<string, string[]> | undefined;
25
- } | undefined;
26
- readonly sign?: boolean | undefined;
27
- readonly storeQueries?: boolean | undefined;
28
- readonly timestamp?: boolean | undefined;
29
- } & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
30
- readonly archivist?: string | undefined;
31
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
32
- readonly name?: string | undefined;
33
- readonly paging?: Record<string, {
34
- size?: number | undefined;
35
- }> | undefined;
36
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
37
- schema: "network.xyo.module.config";
38
- readonly security?: {
39
- readonly allowAnonymous?: boolean | undefined;
40
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
41
- readonly disallowed?: Record<string, string[]> | undefined;
42
- } | undefined;
43
- readonly sign?: boolean | undefined;
44
- readonly storeQueries?: boolean | undefined;
45
- readonly timestamp?: boolean | undefined;
46
- }, "schema"> & {
47
- schema: string;
48
- };
49
- ephemeralQueryAccountEnabled?: boolean | undefined;
50
- }, import("@xyo-network/module-model").ModuleEventData<object>>[]>;
51
- send(address: string, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
52
- start(): void;
53
- stop(): void;
16
+ /**
17
+ * A cache of queries that have been issued
18
+ */
19
+ protected get queryCache(): LRUCache<Address, Pending | ModuleQueryResult>;
20
+ listeningAddresses(): Generator<Lowercase<string>, void, unknown> | undefined;
21
+ send(address: Address, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
54
22
  /**
55
23
  * Runs the background divine process on a loop with a delay
56
24
  * specified by the `config.pollFrequency`
@@ -60,5 +28,7 @@ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = A
60
28
  * Background process for processing incoming responses to previously issued queries
61
29
  */
62
30
  private processIncomingResponses;
31
+ private start;
32
+ private stop;
63
33
  }
64
34
  //# sourceMappingURL=AsyncQueryBusClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncQueryBusClient.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAE3F,OAAO,EAAoB,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE/E,OAAO,EAAe,OAAO,EAA6B,MAAM,4BAA4B,CAAA;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,qBAAa,mBAAmB,CAAC,OAAO,SAAS,mBAAmB,GAAG,mBAAmB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAC5H,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,OAAO,YAEV;IAEK,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAchB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgEnH,KAAK;IAOL,IAAI;IAQJ;;;OAGG;IACH,OAAO,CAAC,IA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OAAO,CAAC,iBAAiB,CAAC;IAgEpH;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAsB/B;IAED,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,IAAI;CAQb"}
@@ -1,56 +1,24 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
2
3
  import { ModuleQueryResult } from '@xyo-network/module-model';
3
4
  import { Payload } from '@xyo-network/payload-model';
5
+ import { LRUCache } from 'lru-cache';
4
6
  import { AsyncQueryBusBase } from './AsyncQueryBusBase';
5
- import { AsyncQueryBusParams } from './Params';
6
- export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = AsyncQueryBusParams> extends AsyncQueryBusBase<TParams> {
7
+ import { Pending } from './Config';
8
+ import { AsyncQueryBusClientParams } from './Params';
9
+ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusClientParams = AsyncQueryBusClientParams> extends AsyncQueryBusBase<TParams> {
10
+ protected _queryCache?: LRUCache<Address, Pending | ModuleQueryResult>;
11
+ private _pollCount;
7
12
  private _pollId?;
8
13
  constructor(params: TParams);
14
+ get queryCacheConfig(): LRUCache.Options<Address, Pending | ModuleQueryResult, unknown>;
9
15
  get started(): boolean;
10
- listeningModules(): Promise<import("@xyo-network/module-model").ModuleInstance<import("@xylabs/object").BaseParamsFields & {
11
- account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
12
- config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
13
- readonly archivist?: string | undefined;
14
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
15
- readonly name?: string | undefined;
16
- readonly paging?: Record<string, {
17
- size?: number | undefined;
18
- }> | undefined;
19
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
20
- schema: "network.xyo.module.config";
21
- readonly security?: {
22
- readonly allowAnonymous?: boolean | undefined;
23
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
24
- readonly disallowed?: Record<string, string[]> | undefined;
25
- } | undefined;
26
- readonly sign?: boolean | undefined;
27
- readonly storeQueries?: boolean | undefined;
28
- readonly timestamp?: boolean | undefined;
29
- } & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
30
- readonly archivist?: string | undefined;
31
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
32
- readonly name?: string | undefined;
33
- readonly paging?: Record<string, {
34
- size?: number | undefined;
35
- }> | undefined;
36
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
37
- schema: "network.xyo.module.config";
38
- readonly security?: {
39
- readonly allowAnonymous?: boolean | undefined;
40
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
41
- readonly disallowed?: Record<string, string[]> | undefined;
42
- } | undefined;
43
- readonly sign?: boolean | undefined;
44
- readonly storeQueries?: boolean | undefined;
45
- readonly timestamp?: boolean | undefined;
46
- }, "schema"> & {
47
- schema: string;
48
- };
49
- ephemeralQueryAccountEnabled?: boolean | undefined;
50
- }, import("@xyo-network/module-model").ModuleEventData<object>>[]>;
51
- send(address: string, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
52
- start(): void;
53
- stop(): void;
16
+ /**
17
+ * A cache of queries that have been issued
18
+ */
19
+ protected get queryCache(): LRUCache<Address, Pending | ModuleQueryResult>;
20
+ listeningAddresses(): Generator<Lowercase<string>, void, unknown> | undefined;
21
+ send(address: Address, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
54
22
  /**
55
23
  * Runs the background divine process on a loop with a delay
56
24
  * specified by the `config.pollFrequency`
@@ -60,5 +28,7 @@ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = A
60
28
  * Background process for processing incoming responses to previously issued queries
61
29
  */
62
30
  private processIncomingResponses;
31
+ private start;
32
+ private stop;
63
33
  }
64
34
  //# sourceMappingURL=AsyncQueryBusClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncQueryBusClient.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAE3F,OAAO,EAAoB,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE/E,OAAO,EAAe,OAAO,EAA6B,MAAM,4BAA4B,CAAA;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,qBAAa,mBAAmB,CAAC,OAAO,SAAS,mBAAmB,GAAG,mBAAmB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAC5H,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,OAAO,YAEV;IAEK,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAchB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgEnH,KAAK;IAOL,IAAI;IAQJ;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAsB/B;CACF"}
1
+ {"version":3,"file":"AsyncQueryBusClient.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusClient.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAG3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,OAAO,EAAe,OAAO,EAA6B,MAAM,4BAA4B,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAA;AAEpD,qBAAa,mBAAmB,CAAC,OAAO,SAAS,yBAAyB,GAAG,yBAAyB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IACxI,SAAS,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAA;IACtE,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,gBAAgB,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAGtF;IAED,IAAI,OAAO,YAEV;IAED;;OAEG;IACH,SAAS,KAAK,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAKzE;IAED,kBAAkB;IAIZ,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgEpH;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAsB/B;IAED,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,IAAI;CAQb"}
@@ -1,56 +1,24 @@
1
+ import { Address } from '@xylabs/hex';
1
2
  import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
2
3
  import { ModuleQueryResult } from '@xyo-network/module-model';
3
4
  import { Payload } from '@xyo-network/payload-model';
5
+ import { LRUCache } from 'lru-cache';
4
6
  import { AsyncQueryBusBase } from './AsyncQueryBusBase';
5
- import { AsyncQueryBusParams } from './Params';
6
- export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = AsyncQueryBusParams> extends AsyncQueryBusBase<TParams> {
7
+ import { Pending } from './Config';
8
+ import { AsyncQueryBusClientParams } from './Params';
9
+ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusClientParams = AsyncQueryBusClientParams> extends AsyncQueryBusBase<TParams> {
10
+ protected _queryCache?: LRUCache<Address, Pending | ModuleQueryResult>;
11
+ private _pollCount;
7
12
  private _pollId?;
8
13
  constructor(params: TParams);
14
+ get queryCacheConfig(): LRUCache.Options<Address, Pending | ModuleQueryResult, unknown>;
9
15
  get started(): boolean;
10
- listeningModules(): Promise<import("@xyo-network/module-model").ModuleInstance<import("@xylabs/object").BaseParamsFields & {
11
- account?: import("@xyo-network/account-model").AccountInstance | "random" | undefined;
12
- config: import("@xyo-network/payload-model").SchemaFields & object & Omit<{
13
- readonly archivist?: string | undefined;
14
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
15
- readonly name?: string | undefined;
16
- readonly paging?: Record<string, {
17
- size?: number | undefined;
18
- }> | undefined;
19
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
20
- schema: "network.xyo.module.config";
21
- readonly security?: {
22
- readonly allowAnonymous?: boolean | undefined;
23
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
24
- readonly disallowed?: Record<string, string[]> | undefined;
25
- } | undefined;
26
- readonly sign?: boolean | undefined;
27
- readonly storeQueries?: boolean | undefined;
28
- readonly timestamp?: boolean | undefined;
29
- } & import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/payload-model").SchemaFields & object & {
30
- readonly archivist?: string | undefined;
31
- readonly labels?: import("@xyo-network/module-model").Labels | undefined;
32
- readonly name?: string | undefined;
33
- readonly paging?: Record<string, {
34
- size?: number | undefined;
35
- }> | undefined;
36
- readonly retry?: import("@xylabs/retry").RetryConfig | undefined;
37
- schema: "network.xyo.module.config";
38
- readonly security?: {
39
- readonly allowAnonymous?: boolean | undefined;
40
- readonly allowed?: Record<string, (string | import("@xyo-network/module-model").CosigningAddressSet)[]> | undefined;
41
- readonly disallowed?: Record<string, string[]> | undefined;
42
- } | undefined;
43
- readonly sign?: boolean | undefined;
44
- readonly storeQueries?: boolean | undefined;
45
- readonly timestamp?: boolean | undefined;
46
- }, "schema"> & {
47
- schema: string;
48
- };
49
- ephemeralQueryAccountEnabled?: boolean | undefined;
50
- }, import("@xyo-network/module-model").ModuleEventData<object>>[]>;
51
- send(address: string, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
52
- start(): void;
53
- stop(): void;
16
+ /**
17
+ * A cache of queries that have been issued
18
+ */
19
+ protected get queryCache(): LRUCache<Address, Pending | ModuleQueryResult>;
20
+ listeningAddresses(): Generator<Lowercase<string>, void, unknown> | undefined;
21
+ send(address: Address, query: QueryBoundWitness, payloads?: Payload[] | undefined): Promise<ModuleQueryResult>;
54
22
  /**
55
23
  * Runs the background divine process on a loop with a delay
56
24
  * specified by the `config.pollFrequency`
@@ -60,5 +28,7 @@ export declare class AsyncQueryBusClient<TParams extends AsyncQueryBusParams = A
60
28
  * Background process for processing incoming responses to previously issued queries
61
29
  */
62
30
  private processIncomingResponses;
31
+ private start;
32
+ private stop;
63
33
  }
64
34
  //# sourceMappingURL=AsyncQueryBusClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncQueryBusClient.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAE3F,OAAO,EAAoB,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE/E,OAAO,EAAe,OAAO,EAA6B,MAAM,4BAA4B,CAAA;AAE5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;A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,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAAA;IACtE,OAAO,CAAC,UAAU,CAAI;IACtB,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,gBAAgB,IAAI,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAGtF;IAED,IAAI,OAAO,YAEV;IAED;;OAEG;IACH,SAAS,KAAK,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAAC,CAKzE;IAED,kBAAkB;IAIZ,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAgEpH;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,wBAAwB,CAsB/B;IAED,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,IAAI;CAQb"}
@@ -0,0 +1,37 @@
1
+ import { Address } from '@xylabs/hex';
2
+ import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
3
+ import { ModuleInstance } from '@xyo-network/module-model';
4
+ import { WithMeta } from '@xyo-network/payload-model';
5
+ import { AsyncQueryBusBase } from './AsyncQueryBusBase';
6
+ import { AsyncQueryBusHostParams } from './Params';
7
+ export declare class AsyncQueryBusHost<TParams extends AsyncQueryBusHostParams = AsyncQueryBusHostParams> extends AsyncQueryBusBase<TParams> {
8
+ private _pollId?;
9
+ constructor(params: TParams);
10
+ get perAddressBatchQueryLimit(): number;
11
+ get started(): boolean;
12
+ listeningModules(): Promise<ModuleInstance[]>;
13
+ start(): void;
14
+ stop(): void;
15
+ protected callLocalModule: (localModule: ModuleInstance, query: WithMeta<QueryBoundWitness>) => Promise<void>;
16
+ /**
17
+ * Finds unprocessed commands addressed to the supplied address
18
+ * @param address The address to find commands for
19
+ */
20
+ protected findQueriesToAddress: (address: Address) => Promise<WithMeta<import("@xyo-network/payload-model").SchemaFields & object & Omit<import("@xyo-network/boundwitness-model").BoundWitnessFields & {
21
+ query: Lowercase<string>;
22
+ resultSet?: string | undefined;
23
+ schema: "network.xyo.boundwitness";
24
+ }, "schema"> & {
25
+ schema: "network.xyo.boundwitness";
26
+ }>[]>;
27
+ /**
28
+ * Runs the background divine process on a loop with a delay
29
+ * specified by the `config.pollFrequency`
30
+ */
31
+ private poll;
32
+ /**
33
+ * Background process for checking for inbound commands
34
+ */
35
+ private processIncomingQueries;
36
+ }
37
+ //# sourceMappingURL=AsyncQueryBusHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncQueryBusHost.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAA+B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEhG,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,qBAAa,iBAAiB,CAAC,OAAO,SAAS,uBAAuB,GAAG,uBAAuB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAClI,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,yBAAyB,IAAI,MAAM,CAEtC;IAED,IAAI,OAAO,YAEV;IAEK,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAYnD,KAAK;IAOL,IAAI;IAQJ,SAAS,CAAC,eAAe,gBAAuB,cAAc,SAAS,SAAS,iBAAiB,CAAC,mBAgDjG;IAED;;;OAGG;IACH,SAAS,CAAC,oBAAoB,YAAmB,OAAO;;;;;;UAgBvD;IAED;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAsB7B;CACF"}
@@ -0,0 +1,37 @@
1
+ import { Address } from '@xylabs/hex';
2
+ import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
3
+ import { ModuleInstance } from '@xyo-network/module-model';
4
+ import { WithMeta } from '@xyo-network/payload-model';
5
+ import { AsyncQueryBusBase } from './AsyncQueryBusBase';
6
+ import { AsyncQueryBusHostParams } from './Params';
7
+ export declare class AsyncQueryBusHost<TParams extends AsyncQueryBusHostParams = AsyncQueryBusHostParams> extends AsyncQueryBusBase<TParams> {
8
+ private _pollId?;
9
+ constructor(params: TParams);
10
+ get perAddressBatchQueryLimit(): number;
11
+ get started(): boolean;
12
+ listeningModules(): Promise<ModuleInstance[]>;
13
+ start(): void;
14
+ stop(): void;
15
+ protected callLocalModule: (localModule: ModuleInstance, query: WithMeta<QueryBoundWitness>) => Promise<void>;
16
+ /**
17
+ * Finds unprocessed commands addressed to the supplied address
18
+ * @param address The address to find commands for
19
+ */
20
+ protected findQueriesToAddress: (address: Address) => Promise<WithMeta<import("@xyo-network/payload-model").SchemaFields & object & Omit<import("@xyo-network/boundwitness-model").BoundWitnessFields & {
21
+ query: Lowercase<string>;
22
+ resultSet?: string | undefined;
23
+ schema: "network.xyo.boundwitness";
24
+ }, "schema"> & {
25
+ schema: "network.xyo.boundwitness";
26
+ }>[]>;
27
+ /**
28
+ * Runs the background divine process on a loop with a delay
29
+ * specified by the `config.pollFrequency`
30
+ */
31
+ private poll;
32
+ /**
33
+ * Background process for checking for inbound commands
34
+ */
35
+ private processIncomingQueries;
36
+ }
37
+ //# sourceMappingURL=AsyncQueryBusHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncQueryBusHost.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAA+B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEhG,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,qBAAa,iBAAiB,CAAC,OAAO,SAAS,uBAAuB,GAAG,uBAAuB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAClI,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,yBAAyB,IAAI,MAAM,CAEtC;IAED,IAAI,OAAO,YAEV;IAEK,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAYnD,KAAK;IAOL,IAAI;IAQJ,SAAS,CAAC,eAAe,gBAAuB,cAAc,SAAS,SAAS,iBAAiB,CAAC,mBAgDjG;IAED;;;OAGG;IACH,SAAS,CAAC,oBAAoB,YAAmB,OAAO;;;;;;UAgBvD;IAED;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAsB7B;CACF"}
@@ -0,0 +1,37 @@
1
+ import { Address } from '@xylabs/hex';
2
+ import { QueryBoundWitness } from '@xyo-network/boundwitness-model';
3
+ import { ModuleInstance } from '@xyo-network/module-model';
4
+ import { WithMeta } from '@xyo-network/payload-model';
5
+ import { AsyncQueryBusBase } from './AsyncQueryBusBase';
6
+ import { AsyncQueryBusHostParams } from './Params';
7
+ export declare class AsyncQueryBusHost<TParams extends AsyncQueryBusHostParams = AsyncQueryBusHostParams> extends AsyncQueryBusBase<TParams> {
8
+ private _pollId?;
9
+ constructor(params: TParams);
10
+ get perAddressBatchQueryLimit(): number;
11
+ get started(): boolean;
12
+ listeningModules(): Promise<ModuleInstance[]>;
13
+ start(): void;
14
+ stop(): void;
15
+ protected callLocalModule: (localModule: ModuleInstance, query: WithMeta<QueryBoundWitness>) => Promise<void>;
16
+ /**
17
+ * Finds unprocessed commands addressed to the supplied address
18
+ * @param address The address to find commands for
19
+ */
20
+ protected findQueriesToAddress: (address: Address) => Promise<WithMeta<import("@xyo-network/payload-model").SchemaFields & object & Omit<import("@xyo-network/boundwitness-model").BoundWitnessFields & {
21
+ query: Lowercase<string>;
22
+ resultSet?: string | undefined;
23
+ schema: "network.xyo.boundwitness";
24
+ }, "schema"> & {
25
+ schema: "network.xyo.boundwitness";
26
+ }>[]>;
27
+ /**
28
+ * Runs the background divine process on a loop with a delay
29
+ * specified by the `config.pollFrequency`
30
+ */
31
+ private poll;
32
+ /**
33
+ * Background process for checking for inbound commands
34
+ */
35
+ private processIncomingQueries;
36
+ }
37
+ //# sourceMappingURL=AsyncQueryBusHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncQueryBusHost.d.ts","sourceRoot":"","sources":["../../../src/AsyncQueryBus/AsyncQueryBusHost.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAErC,OAAO,EAA+B,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEhG,OAAO,EAAoB,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAA;AAElD,qBAAa,iBAAiB,CAAC,OAAO,SAAS,uBAAuB,GAAG,uBAAuB,CAAE,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IAClI,OAAO,CAAC,OAAO,CAAC,CAAQ;gBAEZ,MAAM,EAAE,OAAO;IAI3B,IAAI,yBAAyB,IAAI,MAAM,CAEtC;IAED,IAAI,OAAO,YAEV;IAEK,gBAAgB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;IAYnD,KAAK;IAOL,IAAI;IAQJ,SAAS,CAAC,eAAe,gBAAuB,cAAc,SAAS,SAAS,iBAAiB,CAAC,mBAgDjG;IAED;;;OAGG;IACH,SAAS,CAAC,oBAAoB,YAAmB,OAAO;;;;;;UAgBvD;IAED;;;OAGG;IACH,OAAO,CAAC,IAAI;IAcZ;;OAEG;IACH,OAAO,CAAC,sBAAsB,CAsB7B;CACF"}