@prosopo/types 1.0.2 → 2.0.0

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 (179) hide show
  1. package/dist/api/api.d.ts +10 -12
  2. package/dist/api/api.d.ts.map +1 -1
  3. package/dist/api/index.d.ts +2 -2
  4. package/dist/api/index.d.ts.map +1 -1
  5. package/dist/api/index.js +2 -2
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/params.d.ts +3 -2
  8. package/dist/api/params.d.ts.map +1 -1
  9. package/dist/api/params.js +2 -1
  10. package/dist/api/params.js.map +1 -1
  11. package/dist/cjs/api/params.cjs +2 -1
  12. package/dist/cjs/config/config.cjs +43 -38
  13. package/dist/cjs/config/index.cjs +9 -8
  14. package/dist/cjs/config/network.cjs +6 -1
  15. package/dist/cjs/config/timeouts.cjs +19 -0
  16. package/dist/cjs/contract/artifacts.cjs +10 -3
  17. package/dist/cjs/datasets/captcha.cjs +35 -1
  18. package/dist/cjs/datasets/dataset.cjs +1 -1
  19. package/dist/cjs/datasets/index.cjs +5 -0
  20. package/dist/cjs/dist/api/api.cjs +1 -0
  21. package/dist/cjs/dist/api/index.cjs +8 -0
  22. package/dist/cjs/dist/api/params.cjs +30 -0
  23. package/dist/cjs/dist/config/config.cjs +182 -0
  24. package/dist/cjs/dist/config/enumMap.cjs +8 -0
  25. package/dist/cjs/dist/config/index.cjs +33 -0
  26. package/dist/cjs/dist/config/network.cjs +34 -0
  27. package/dist/cjs/dist/config/timeouts.cjs +19 -0
  28. package/dist/cjs/dist/contract/artifacts.cjs +135 -0
  29. package/dist/cjs/dist/contract/batch.cjs +1 -0
  30. package/dist/cjs/dist/contract/contract.cjs +1 -0
  31. package/dist/cjs/dist/contract/index.cjs +22 -0
  32. package/dist/cjs/dist/contract/interface.cjs +1 -0
  33. package/dist/cjs/dist/contract/useWeight.cjs +1 -0
  34. package/dist/cjs/dist/datasets/assets.cjs +1 -0
  35. package/dist/cjs/dist/datasets/captcha.cjs +118 -0
  36. package/dist/cjs/dist/datasets/dataset.cjs +32 -0
  37. package/dist/cjs/dist/datasets/index.cjs +52 -0
  38. package/dist/cjs/dist/datasets/merkle.cjs +1 -0
  39. package/dist/cjs/dist/index.cjs +16 -0
  40. package/dist/cjs/dist/networks/index.cjs +52 -0
  41. package/dist/cjs/dist/procaptcha/api.cjs +1 -0
  42. package/dist/cjs/dist/procaptcha/client.cjs +1 -0
  43. package/dist/cjs/dist/procaptcha/collector.cjs +1 -0
  44. package/dist/cjs/dist/procaptcha/index.cjs +17 -0
  45. package/dist/cjs/dist/procaptcha/manager.cjs +10 -0
  46. package/dist/cjs/dist/procaptcha/props.cjs +1 -0
  47. package/dist/cjs/dist/procaptcha/storage.cjs +9 -0
  48. package/dist/cjs/dist/procaptcha/token.cjs +58 -0
  49. package/dist/cjs/dist/procaptcha/utils.cjs +1 -0
  50. package/dist/cjs/dist/procaptcha-bundle/index.cjs +8 -0
  51. package/dist/cjs/dist/procaptcha-frictionless/index.cjs +2 -0
  52. package/dist/cjs/dist/procaptcha-frictionless/props.cjs +1 -0
  53. package/dist/cjs/dist/provider/accounts.cjs +7 -0
  54. package/dist/cjs/dist/provider/api.cjs +113 -0
  55. package/dist/cjs/dist/provider/argv.cjs +7 -0
  56. package/dist/cjs/dist/provider/index.cjs +35 -0
  57. package/dist/cjs/dist/provider/scheduler.cjs +14 -0
  58. package/dist/cjs/index.cjs +19 -8
  59. package/dist/cjs/networks/index.cjs +11 -5
  60. package/dist/cjs/procaptcha/manager.cjs +1 -1
  61. package/dist/cjs/procaptcha/token.cjs +23 -5
  62. package/dist/cjs/procaptcha-frictionless/index.cjs +2 -0
  63. package/dist/cjs/procaptcha-frictionless/props.cjs +1 -0
  64. package/dist/cjs/provider/accounts.cjs +7 -0
  65. package/dist/cjs/provider/api.cjs +102 -14
  66. package/dist/cjs/provider/argv.cjs +3 -2
  67. package/dist/cjs/provider/index.cjs +4 -1
  68. package/dist/config/config.d.ts +344 -96
  69. package/dist/config/config.d.ts.map +1 -1
  70. package/dist/config/config.js +64 -30
  71. package/dist/config/config.js.map +1 -1
  72. package/dist/config/enumMap.d.ts +1 -1
  73. package/dist/config/enumMap.d.ts.map +1 -1
  74. package/dist/config/enumMap.js +1 -1
  75. package/dist/config/enumMap.js.map +1 -1
  76. package/dist/config/index.d.ts +3 -2
  77. package/dist/config/index.d.ts.map +1 -1
  78. package/dist/config/index.js +3 -2
  79. package/dist/config/index.js.map +1 -1
  80. package/dist/config/network.d.ts +18 -18
  81. package/dist/config/network.d.ts.map +1 -1
  82. package/dist/config/network.js +12 -7
  83. package/dist/config/network.js.map +1 -1
  84. package/dist/config/timeouts.d.ts +9 -0
  85. package/dist/config/timeouts.d.ts.map +1 -0
  86. package/dist/config/timeouts.js +10 -0
  87. package/dist/config/timeouts.js.map +1 -0
  88. package/dist/contract/artifacts.d.ts +171 -171
  89. package/dist/contract/artifacts.d.ts.map +1 -1
  90. package/dist/contract/artifacts.js +7 -4
  91. package/dist/contract/artifacts.js.map +1 -1
  92. package/dist/contract/batch.d.ts +4 -4
  93. package/dist/contract/batch.d.ts.map +1 -1
  94. package/dist/contract/contract.d.ts +2 -2
  95. package/dist/contract/contract.d.ts.map +1 -1
  96. package/dist/contract/index.d.ts +5 -5
  97. package/dist/contract/index.d.ts.map +1 -1
  98. package/dist/contract/index.js +5 -5
  99. package/dist/contract/index.js.map +1 -1
  100. package/dist/contract/interface.d.ts +9 -9
  101. package/dist/contract/interface.d.ts.map +1 -1
  102. package/dist/contract/useWeight.d.ts +2 -2
  103. package/dist/contract/useWeight.d.ts.map +1 -1
  104. package/dist/datasets/assets.d.ts.map +1 -1
  105. package/dist/datasets/captcha.d.ts +52 -10
  106. package/dist/datasets/captcha.d.ts.map +1 -1
  107. package/dist/datasets/captcha.js +31 -3
  108. package/dist/datasets/captcha.js.map +1 -1
  109. package/dist/datasets/dataset.d.ts +43 -43
  110. package/dist/datasets/dataset.d.ts.map +1 -1
  111. package/dist/datasets/dataset.js +2 -2
  112. package/dist/datasets/dataset.js.map +1 -1
  113. package/dist/datasets/index.d.ts +4 -4
  114. package/dist/datasets/index.d.ts.map +1 -1
  115. package/dist/datasets/index.js +4 -4
  116. package/dist/datasets/index.js.map +1 -1
  117. package/dist/datasets/merkle.d.ts.map +1 -1
  118. package/dist/index.d.ts +9 -9
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +9 -8
  121. package/dist/index.js.map +1 -1
  122. package/dist/networks/index.d.ts +1 -1
  123. package/dist/networks/index.d.ts.map +1 -1
  124. package/dist/networks/index.js +22 -20
  125. package/dist/networks/index.js.map +1 -1
  126. package/dist/procaptcha/api.d.ts +8 -10
  127. package/dist/procaptcha/api.d.ts.map +1 -1
  128. package/dist/procaptcha/client.d.ts +8 -3
  129. package/dist/procaptcha/client.d.ts.map +1 -1
  130. package/dist/procaptcha/collector.d.ts.map +1 -1
  131. package/dist/procaptcha/index.d.ts +8 -8
  132. package/dist/procaptcha/index.d.ts.map +1 -1
  133. package/dist/procaptcha/index.js +8 -8
  134. package/dist/procaptcha/index.js.map +1 -1
  135. package/dist/procaptcha/manager.d.ts +5 -5
  136. package/dist/procaptcha/manager.d.ts.map +1 -1
  137. package/dist/procaptcha/manager.js +3 -3
  138. package/dist/procaptcha/manager.js.map +1 -1
  139. package/dist/procaptcha/props.d.ts +2 -2
  140. package/dist/procaptcha/props.d.ts.map +1 -1
  141. package/dist/procaptcha/storage.d.ts +1 -1
  142. package/dist/procaptcha/storage.d.ts.map +1 -1
  143. package/dist/procaptcha/storage.js +1 -1
  144. package/dist/procaptcha/storage.js.map +1 -1
  145. package/dist/procaptcha/token.d.ts +56 -1
  146. package/dist/procaptcha/token.d.ts.map +1 -1
  147. package/dist/procaptcha/token.js +21 -5
  148. package/dist/procaptcha/token.js.map +1 -1
  149. package/dist/procaptcha/utils.d.ts.map +1 -1
  150. package/dist/procaptcha-bundle/index.d.ts.map +1 -1
  151. package/dist/procaptcha-bundle/index.js.map +1 -1
  152. package/dist/procaptcha-frictionless/index.d.ts +2 -0
  153. package/dist/procaptcha-frictionless/index.d.ts.map +1 -0
  154. package/dist/procaptcha-frictionless/index.js +2 -0
  155. package/dist/procaptcha-frictionless/index.js.map +1 -0
  156. package/dist/procaptcha-frictionless/props.d.ts +8 -0
  157. package/dist/procaptcha-frictionless/props.d.ts.map +1 -0
  158. package/dist/procaptcha-frictionless/props.js +2 -0
  159. package/dist/procaptcha-frictionless/props.js.map +1 -0
  160. package/dist/provider/accounts.d.ts +6 -3
  161. package/dist/provider/accounts.d.ts.map +1 -1
  162. package/dist/provider/accounts.js +5 -1
  163. package/dist/provider/accounts.js.map +1 -1
  164. package/dist/provider/api.d.ts +324 -34
  165. package/dist/provider/api.d.ts.map +1 -1
  166. package/dist/provider/api.js +57 -12
  167. package/dist/provider/api.js.map +1 -1
  168. package/dist/provider/argv.d.ts +1 -1
  169. package/dist/provider/argv.d.ts.map +1 -1
  170. package/dist/provider/argv.js +2 -2
  171. package/dist/provider/argv.js.map +1 -1
  172. package/dist/provider/index.d.ts +4 -4
  173. package/dist/provider/index.d.ts.map +1 -1
  174. package/dist/provider/index.js +4 -4
  175. package/dist/provider/index.js.map +1 -1
  176. package/dist/provider/scheduler.d.ts.map +1 -1
  177. package/dist/provider/scheduler.js.map +1 -1
  178. package/package.json +50 -55
  179. package/vite.cjs.config.ts +3 -3
@@ -1,19 +1,11 @@
1
- import { ProsopoNetworkSchema } from './network.js';
2
- import { input } from 'zod';
3
- import { output } from 'zod';
4
- import { infer as zInfer } from 'zod';
5
- import z from 'zod';
1
+ import type { input } from "zod";
2
+ import type { output } from "zod";
3
+ import type { infer as zInfer } from "zod";
4
+ import z from "zod";
5
+ import { ProsopoNetworkSchema } from "./network.js";
6
6
  export declare const DatabaseTypes: z.ZodEnum<["mongo", "mongoMemory"]>;
7
7
  export declare const EnvironmentTypesSchema: z.ZodEnum<["development", "staging", "production"]>;
8
8
  export type EnvironmentTypes = zInfer<typeof EnvironmentTypesSchema>;
9
- export declare const DEFAULT_IMAGE_CAPTCHA_TIMEOUT: number;
10
- export declare const DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT: number;
11
- export declare const DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT: number;
12
- export declare const DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED: number;
13
- export declare const DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT: number;
14
- export declare const DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT: number;
15
- export declare const DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT: number;
16
- export declare const DEFAULT_MAX_VERIFIED_TIME_CONTRACT: number;
17
9
  export declare const DatabaseConfigSchema: z.ZodRecord<z.ZodEnum<["development", "staging", "production"]>, z.ZodObject<{
18
10
  type: z.ZodString;
19
11
  endpoint: z.ZodString;
@@ -88,12 +80,12 @@ export declare const PolkadotSecretJSONSpec: z.ZodObject<{
88
80
  version: z.ZodString;
89
81
  }, "strip", z.ZodTypeAny, {
90
82
  type: string[];
91
- content: string[];
92
83
  version: string;
84
+ content: string[];
93
85
  }, {
94
86
  type: string[];
95
- content: string[];
96
87
  version: string;
88
+ content: string[];
97
89
  }>;
98
90
  address: z.ZodString;
99
91
  meta: z.ZodObject<{
@@ -110,26 +102,26 @@ export declare const PolkadotSecretJSONSpec: z.ZodObject<{
110
102
  whenCreated: number;
111
103
  }>;
112
104
  }, "strip", z.ZodTypeAny, {
113
- address: string;
114
- encoded: string;
115
105
  encoding: {
116
106
  type: string[];
117
- content: string[];
118
107
  version: string;
108
+ content: string[];
119
109
  };
110
+ address: string;
111
+ encoded: string;
120
112
  meta: {
121
113
  name: string;
122
114
  genesisHash: string;
123
115
  whenCreated: number;
124
116
  };
125
117
  }, {
126
- address: string;
127
- encoded: string;
128
118
  encoding: {
129
119
  type: string[];
130
- content: string[];
131
120
  version: string;
121
+ content: string[];
132
122
  };
123
+ address: string;
124
+ encoded: string;
133
125
  meta: {
134
126
  name: string;
135
127
  genesisHash: string;
@@ -156,49 +148,49 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
156
148
  }>;
157
149
  }, {
158
150
  networks: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
159
- endpoint: z.ZodArray<z.ZodString, "many">;
160
151
  contract: z.ZodObject<{
161
152
  address: z.ZodString;
162
153
  name: z.ZodString;
163
154
  }, "strip", z.ZodTypeAny, {
164
- address: string;
165
155
  name: string;
166
- }, {
167
156
  address: string;
157
+ }, {
168
158
  name: string;
159
+ address: string;
169
160
  }>;
161
+ endpoint: z.ZodArray<z.ZodString, "many">;
170
162
  pairType: z.ZodUnion<[z.ZodLiteral<"sr25519">, z.ZodLiteral<"ed25519">, z.ZodLiteral<"ecdsa">, z.ZodLiteral<"ethereum">]>;
171
163
  ss58Format: z.ZodDefault<z.ZodNumber>;
172
164
  }, "strip", z.ZodTypeAny, {
173
- endpoint: string[];
174
165
  contract: {
175
- address: string;
176
166
  name: string;
167
+ address: string;
177
168
  };
169
+ endpoint: string[];
178
170
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
179
171
  ss58Format: number;
180
172
  }, {
181
- endpoint: string[];
182
173
  contract: {
183
- address: string;
184
174
  name: string;
175
+ address: string;
185
176
  };
177
+ endpoint: string[];
186
178
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
187
179
  ss58Format?: number | undefined;
188
180
  }>>, Record<"development" | "rococo" | "shiden" | "astar", {
189
- endpoint: string[];
190
181
  contract: {
191
- address: string;
192
182
  name: string;
183
+ address: string;
193
184
  };
185
+ endpoint: string[];
194
186
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
195
187
  ss58Format: number;
196
188
  }>, Record<string, {
197
- endpoint: string[];
198
189
  contract: {
199
- address: string;
200
190
  name: string;
191
+ address: string;
201
192
  };
193
+ endpoint: string[];
202
194
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
203
195
  ss58Format?: number | undefined;
204
196
  }>>>;
@@ -229,11 +221,11 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
229
221
  password?: string | undefined;
230
222
  };
231
223
  networks: Record<"development" | "rococo" | "shiden" | "astar", {
232
- endpoint: string[];
233
224
  contract: {
234
- address: string;
235
225
  name: string;
226
+ address: string;
236
227
  };
228
+ endpoint: string[];
237
229
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
238
230
  ss58Format: number;
239
231
  }>;
@@ -254,11 +246,11 @@ export declare const ProsopoBasicConfigSchema: z.ZodObject<z.objectUtil.extendSh
254
246
  defaultEnvironment?: "development" | "staging" | "production" | undefined;
255
247
  defaultNetwork?: "development" | "rococo" | "shiden" | "astar" | undefined;
256
248
  networks?: Record<string, {
257
- endpoint: string[];
258
249
  contract: {
259
- address: string;
260
250
  name: string;
251
+ address: string;
261
252
  };
253
+ endpoint: string[];
262
254
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
263
255
  ss58Format?: number | undefined;
264
256
  }> | undefined;
@@ -347,49 +339,49 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
347
339
  }>;
348
340
  }, {
349
341
  networks: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
350
- endpoint: z.ZodArray<z.ZodString, "many">;
351
342
  contract: z.ZodObject<{
352
343
  address: z.ZodString;
353
344
  name: z.ZodString;
354
345
  }, "strip", z.ZodTypeAny, {
355
- address: string;
356
346
  name: string;
357
- }, {
358
347
  address: string;
348
+ }, {
359
349
  name: string;
350
+ address: string;
360
351
  }>;
352
+ endpoint: z.ZodArray<z.ZodString, "many">;
361
353
  pairType: z.ZodUnion<[z.ZodLiteral<"sr25519">, z.ZodLiteral<"ed25519">, z.ZodLiteral<"ecdsa">, z.ZodLiteral<"ethereum">]>;
362
354
  ss58Format: z.ZodDefault<z.ZodNumber>;
363
355
  }, "strip", z.ZodTypeAny, {
364
- endpoint: string[];
365
356
  contract: {
366
- address: string;
367
357
  name: string;
358
+ address: string;
368
359
  };
360
+ endpoint: string[];
369
361
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
370
362
  ss58Format: number;
371
363
  }, {
372
- endpoint: string[];
373
364
  contract: {
374
- address: string;
375
365
  name: string;
366
+ address: string;
376
367
  };
368
+ endpoint: string[];
377
369
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
378
370
  ss58Format?: number | undefined;
379
371
  }>>, Record<"development" | "rococo" | "shiden" | "astar", {
380
- endpoint: string[];
381
372
  contract: {
382
- address: string;
383
373
  name: string;
374
+ address: string;
384
375
  };
376
+ endpoint: string[];
385
377
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
386
378
  ss58Format: number;
387
379
  }>, Record<string, {
388
- endpoint: string[];
389
380
  contract: {
390
- address: string;
391
381
  name: string;
382
+ address: string;
392
383
  };
384
+ endpoint: string[];
393
385
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
394
386
  ss58Format?: number | undefined;
395
387
  }>>>;
@@ -426,11 +418,11 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
426
418
  password?: string | undefined;
427
419
  };
428
420
  networks: Record<"development" | "rococo" | "shiden" | "astar", {
429
- endpoint: string[];
430
421
  contract: {
431
- address: string;
432
422
  name: string;
423
+ address: string;
433
424
  };
425
+ endpoint: string[];
434
426
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
435
427
  ss58Format: number;
436
428
  }>;
@@ -456,11 +448,11 @@ export declare const ProsopoClientConfigSchema: z.ZodObject<z.objectUtil.extendS
456
448
  defaultEnvironment?: "development" | "staging" | "production" | undefined;
457
449
  defaultNetwork?: "development" | "rococo" | "shiden" | "astar" | undefined;
458
450
  networks?: Record<string, {
459
- endpoint: string[];
460
451
  contract: {
461
- address: string;
462
452
  name: string;
453
+ address: string;
463
454
  };
455
+ endpoint: string[];
464
456
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
465
457
  ss58Format?: number | undefined;
466
458
  }> | undefined;
@@ -566,49 +558,49 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
566
558
  }>;
567
559
  }, {
568
560
  networks: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
569
- endpoint: z.ZodArray<z.ZodString, "many">;
570
561
  contract: z.ZodObject<{
571
562
  address: z.ZodString;
572
563
  name: z.ZodString;
573
564
  }, "strip", z.ZodTypeAny, {
574
- address: string;
575
565
  name: string;
576
- }, {
577
566
  address: string;
567
+ }, {
578
568
  name: string;
569
+ address: string;
579
570
  }>;
571
+ endpoint: z.ZodArray<z.ZodString, "many">;
580
572
  pairType: z.ZodUnion<[z.ZodLiteral<"sr25519">, z.ZodLiteral<"ed25519">, z.ZodLiteral<"ecdsa">, z.ZodLiteral<"ethereum">]>;
581
573
  ss58Format: z.ZodDefault<z.ZodNumber>;
582
574
  }, "strip", z.ZodTypeAny, {
583
- endpoint: string[];
584
575
  contract: {
585
- address: string;
586
576
  name: string;
577
+ address: string;
587
578
  };
579
+ endpoint: string[];
588
580
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
589
581
  ss58Format: number;
590
582
  }, {
591
- endpoint: string[];
592
583
  contract: {
593
- address: string;
594
584
  name: string;
585
+ address: string;
595
586
  };
587
+ endpoint: string[];
596
588
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
597
589
  ss58Format?: number | undefined;
598
590
  }>>, Record<"development" | "rococo" | "shiden" | "astar", {
599
- endpoint: string[];
600
591
  contract: {
601
- address: string;
602
592
  name: string;
593
+ address: string;
603
594
  };
595
+ endpoint: string[];
604
596
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
605
597
  ss58Format: number;
606
598
  }>, Record<string, {
607
- endpoint: string[];
608
599
  contract: {
609
- address: string;
610
600
  name: string;
601
+ address: string;
611
602
  };
603
+ endpoint: string[];
612
604
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
613
605
  ss58Format?: number | undefined;
614
606
  }>>>;
@@ -731,11 +723,11 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
731
723
  password?: string | undefined;
732
724
  };
733
725
  networks: Record<"development" | "rococo" | "shiden" | "astar", {
734
- endpoint: string[];
735
726
  contract: {
736
- address: string;
737
727
  name: string;
728
+ address: string;
738
729
  };
730
+ endpoint: string[];
739
731
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
740
732
  ss58Format: number;
741
733
  }>;
@@ -777,11 +769,11 @@ export declare const ProsopoServerConfigSchema: z.ZodObject<z.objectUtil.extendS
777
769
  defaultEnvironment?: "development" | "staging" | "production" | undefined;
778
770
  defaultNetwork?: "development" | "rococo" | "shiden" | "astar" | undefined;
779
771
  networks?: Record<string, {
780
- endpoint: string[];
781
772
  contract: {
782
- address: string;
783
773
  name: string;
774
+ address: string;
784
775
  };
776
+ endpoint: string[];
785
777
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
786
778
  ss58Format?: number | undefined;
787
779
  }> | undefined;
@@ -861,49 +853,49 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
861
853
  }>;
862
854
  }, {
863
855
  networks: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
864
- endpoint: z.ZodArray<z.ZodString, "many">;
865
856
  contract: z.ZodObject<{
866
857
  address: z.ZodString;
867
858
  name: z.ZodString;
868
859
  }, "strip", z.ZodTypeAny, {
869
- address: string;
870
860
  name: string;
871
- }, {
872
861
  address: string;
862
+ }, {
873
863
  name: string;
864
+ address: string;
874
865
  }>;
866
+ endpoint: z.ZodArray<z.ZodString, "many">;
875
867
  pairType: z.ZodUnion<[z.ZodLiteral<"sr25519">, z.ZodLiteral<"ed25519">, z.ZodLiteral<"ecdsa">, z.ZodLiteral<"ethereum">]>;
876
868
  ss58Format: z.ZodDefault<z.ZodNumber>;
877
869
  }, "strip", z.ZodTypeAny, {
878
- endpoint: string[];
879
870
  contract: {
880
- address: string;
881
871
  name: string;
872
+ address: string;
882
873
  };
874
+ endpoint: string[];
883
875
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
884
876
  ss58Format: number;
885
877
  }, {
886
- endpoint: string[];
887
878
  contract: {
888
- address: string;
889
879
  name: string;
880
+ address: string;
890
881
  };
882
+ endpoint: string[];
891
883
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
892
884
  ss58Format?: number | undefined;
893
885
  }>>, Record<"development" | "rococo" | "shiden" | "astar", {
894
- endpoint: string[];
895
886
  contract: {
896
- address: string;
897
887
  name: string;
888
+ address: string;
898
889
  };
890
+ endpoint: string[];
899
891
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
900
892
  ss58Format: number;
901
893
  }>, Record<string, {
902
- endpoint: string[];
903
894
  contract: {
904
- address: string;
905
895
  name: string;
896
+ address: string;
906
897
  };
898
+ endpoint: string[];
907
899
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
908
900
  ss58Format?: number | undefined;
909
901
  }>>>;
@@ -940,11 +932,11 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
940
932
  password?: string | undefined;
941
933
  };
942
934
  networks: Record<"development" | "rococo" | "shiden" | "astar", {
943
- endpoint: string[];
944
935
  contract: {
945
- address: string;
946
936
  name: string;
937
+ address: string;
947
938
  };
939
+ endpoint: string[];
948
940
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
949
941
  ss58Format: number;
950
942
  }>;
@@ -970,11 +962,11 @@ export declare const ProcaptchaConfigSchema: z.ZodIntersection<z.ZodObject<z.obj
970
962
  defaultEnvironment?: "development" | "staging" | "production" | undefined;
971
963
  defaultNetwork?: "development" | "rococo" | "shiden" | "astar" | undefined;
972
964
  networks?: Record<string, {
973
- endpoint: string[];
974
965
  contract: {
975
- address: string;
976
966
  name: string;
967
+ address: string;
977
968
  };
969
+ endpoint: string[];
978
970
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
979
971
  ss58Format?: number | undefined;
980
972
  }> | undefined;
@@ -1182,49 +1174,49 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1182
1174
  }>;
1183
1175
  }, {
1184
1176
  networks: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
1185
- endpoint: z.ZodArray<z.ZodString, "many">;
1186
1177
  contract: z.ZodObject<{
1187
1178
  address: z.ZodString;
1188
1179
  name: z.ZodString;
1189
1180
  }, "strip", z.ZodTypeAny, {
1190
- address: string;
1191
1181
  name: string;
1192
- }, {
1193
1182
  address: string;
1183
+ }, {
1194
1184
  name: string;
1185
+ address: string;
1195
1186
  }>;
1187
+ endpoint: z.ZodArray<z.ZodString, "many">;
1196
1188
  pairType: z.ZodUnion<[z.ZodLiteral<"sr25519">, z.ZodLiteral<"ed25519">, z.ZodLiteral<"ecdsa">, z.ZodLiteral<"ethereum">]>;
1197
1189
  ss58Format: z.ZodDefault<z.ZodNumber>;
1198
1190
  }, "strip", z.ZodTypeAny, {
1199
- endpoint: string[];
1200
1191
  contract: {
1201
- address: string;
1202
1192
  name: string;
1193
+ address: string;
1203
1194
  };
1195
+ endpoint: string[];
1204
1196
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1205
1197
  ss58Format: number;
1206
1198
  }, {
1207
- endpoint: string[];
1208
1199
  contract: {
1209
- address: string;
1210
1200
  name: string;
1201
+ address: string;
1211
1202
  };
1203
+ endpoint: string[];
1212
1204
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1213
1205
  ss58Format?: number | undefined;
1214
1206
  }>>, Record<"development" | "rococo" | "shiden" | "astar", {
1215
- endpoint: string[];
1216
1207
  contract: {
1217
- address: string;
1218
1208
  name: string;
1209
+ address: string;
1219
1210
  };
1211
+ endpoint: string[];
1220
1212
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1221
1213
  ss58Format: number;
1222
1214
  }>, Record<string, {
1223
- endpoint: string[];
1224
1215
  contract: {
1225
- address: string;
1226
1216
  name: string;
1217
+ address: string;
1227
1218
  };
1219
+ endpoint: string[];
1228
1220
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1229
1221
  ss58Format?: number | undefined;
1230
1222
  }>>>;
@@ -1299,6 +1291,13 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1299
1291
  interval?: number | undefined;
1300
1292
  maxBatchExtrinsicPercentage?: number | undefined;
1301
1293
  }>>>;
1294
+ captchaScheduler: z.ZodOptional<z.ZodObject<{
1295
+ schedule: z.ZodOptional<z.ZodString>;
1296
+ }, "strip", z.ZodTypeAny, {
1297
+ schedule?: string | undefined;
1298
+ }, {
1299
+ schedule?: string | undefined;
1300
+ }>>;
1302
1301
  server: z.ZodObject<{
1303
1302
  baseURL: z.ZodString;
1304
1303
  port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1311,6 +1310,131 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1311
1310
  }>;
1312
1311
  mongoEventsUri: z.ZodOptional<z.ZodString>;
1313
1312
  mongoCaptchaUri: z.ZodOptional<z.ZodString>;
1313
+ rateLimits: z.ZodDefault<z.ZodObject<Record<import("../provider/api.js").CombinedApiPaths, z.ZodObject<{
1314
+ windowMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1315
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1316
+ }, z.UnknownKeysParam, z.ZodTypeAny, {
1317
+ windowMs: number;
1318
+ limit: number;
1319
+ }, {
1320
+ windowMs?: number | undefined;
1321
+ limit?: number | undefined;
1322
+ }>>, "strip", z.ZodTypeAny, {
1323
+ "/v1/prosopo/provider/captcha/image": {
1324
+ windowMs: number;
1325
+ limit: number;
1326
+ };
1327
+ "/v1/prosopo/provider/captcha/pow": {
1328
+ windowMs: number;
1329
+ limit: number;
1330
+ };
1331
+ "/v1/prosopo/provider/solution": {
1332
+ windowMs: number;
1333
+ limit: number;
1334
+ };
1335
+ "/v1/prosopo/provider/pow/solution": {
1336
+ windowMs: number;
1337
+ limit: number;
1338
+ };
1339
+ "/v1/prosopo/provider/pow/verify": {
1340
+ windowMs: number;
1341
+ limit: number;
1342
+ };
1343
+ "/v1/prosopo/provider/image/dapp/verify": {
1344
+ windowMs: number;
1345
+ limit: number;
1346
+ };
1347
+ "/v1/prosopo/provider/image/user/verify": {
1348
+ windowMs: number;
1349
+ limit: number;
1350
+ };
1351
+ "/v1/prosopo/provider/status": {
1352
+ windowMs: number;
1353
+ limit: number;
1354
+ };
1355
+ "/v1/prosopo/provider/details": {
1356
+ windowMs: number;
1357
+ limit: number;
1358
+ };
1359
+ "/v1/prosopo/provider/events": {
1360
+ windowMs: number;
1361
+ limit: number;
1362
+ };
1363
+ "/v1/prosopo/provider/admin/batch": {
1364
+ windowMs: number;
1365
+ limit: number;
1366
+ };
1367
+ "/v1/prosopo/provider/admin/dataset": {
1368
+ windowMs: number;
1369
+ limit: number;
1370
+ };
1371
+ "/v1/prosopo/provider/admin/deregister": {
1372
+ windowMs: number;
1373
+ limit: number;
1374
+ };
1375
+ "/v1/prosopo/provider/admin/update": {
1376
+ windowMs: number;
1377
+ limit: number;
1378
+ };
1379
+ }, {
1380
+ "/v1/prosopo/provider/captcha/image": {
1381
+ windowMs?: number | undefined;
1382
+ limit?: number | undefined;
1383
+ };
1384
+ "/v1/prosopo/provider/captcha/pow": {
1385
+ windowMs?: number | undefined;
1386
+ limit?: number | undefined;
1387
+ };
1388
+ "/v1/prosopo/provider/solution": {
1389
+ windowMs?: number | undefined;
1390
+ limit?: number | undefined;
1391
+ };
1392
+ "/v1/prosopo/provider/pow/solution": {
1393
+ windowMs?: number | undefined;
1394
+ limit?: number | undefined;
1395
+ };
1396
+ "/v1/prosopo/provider/pow/verify": {
1397
+ windowMs?: number | undefined;
1398
+ limit?: number | undefined;
1399
+ };
1400
+ "/v1/prosopo/provider/image/dapp/verify": {
1401
+ windowMs?: number | undefined;
1402
+ limit?: number | undefined;
1403
+ };
1404
+ "/v1/prosopo/provider/image/user/verify": {
1405
+ windowMs?: number | undefined;
1406
+ limit?: number | undefined;
1407
+ };
1408
+ "/v1/prosopo/provider/status": {
1409
+ windowMs?: number | undefined;
1410
+ limit?: number | undefined;
1411
+ };
1412
+ "/v1/prosopo/provider/details": {
1413
+ windowMs?: number | undefined;
1414
+ limit?: number | undefined;
1415
+ };
1416
+ "/v1/prosopo/provider/events": {
1417
+ windowMs?: number | undefined;
1418
+ limit?: number | undefined;
1419
+ };
1420
+ "/v1/prosopo/provider/admin/batch": {
1421
+ windowMs?: number | undefined;
1422
+ limit?: number | undefined;
1423
+ };
1424
+ "/v1/prosopo/provider/admin/dataset": {
1425
+ windowMs?: number | undefined;
1426
+ limit?: number | undefined;
1427
+ };
1428
+ "/v1/prosopo/provider/admin/deregister": {
1429
+ windowMs?: number | undefined;
1430
+ limit?: number | undefined;
1431
+ };
1432
+ "/v1/prosopo/provider/admin/update": {
1433
+ windowMs?: number | undefined;
1434
+ limit?: number | undefined;
1435
+ };
1436
+ }>>;
1437
+ proxyCount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1314
1438
  }>, "strip", z.ZodTypeAny, {
1315
1439
  captchas: {
1316
1440
  solved: {
@@ -1329,11 +1453,11 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1329
1453
  password?: string | undefined;
1330
1454
  };
1331
1455
  networks: Record<"development" | "rococo" | "shiden" | "astar", {
1332
- endpoint: string[];
1333
1456
  contract: {
1334
- address: string;
1335
1457
  name: string;
1458
+ address: string;
1336
1459
  };
1460
+ endpoint: string[];
1337
1461
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1338
1462
  ss58Format: number;
1339
1463
  }>;
@@ -1350,6 +1474,65 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1350
1474
  baseURL: string;
1351
1475
  port: number;
1352
1476
  };
1477
+ rateLimits: {
1478
+ "/v1/prosopo/provider/captcha/image": {
1479
+ windowMs: number;
1480
+ limit: number;
1481
+ };
1482
+ "/v1/prosopo/provider/captcha/pow": {
1483
+ windowMs: number;
1484
+ limit: number;
1485
+ };
1486
+ "/v1/prosopo/provider/solution": {
1487
+ windowMs: number;
1488
+ limit: number;
1489
+ };
1490
+ "/v1/prosopo/provider/pow/solution": {
1491
+ windowMs: number;
1492
+ limit: number;
1493
+ };
1494
+ "/v1/prosopo/provider/pow/verify": {
1495
+ windowMs: number;
1496
+ limit: number;
1497
+ };
1498
+ "/v1/prosopo/provider/image/dapp/verify": {
1499
+ windowMs: number;
1500
+ limit: number;
1501
+ };
1502
+ "/v1/prosopo/provider/image/user/verify": {
1503
+ windowMs: number;
1504
+ limit: number;
1505
+ };
1506
+ "/v1/prosopo/provider/status": {
1507
+ windowMs: number;
1508
+ limit: number;
1509
+ };
1510
+ "/v1/prosopo/provider/details": {
1511
+ windowMs: number;
1512
+ limit: number;
1513
+ };
1514
+ "/v1/prosopo/provider/events": {
1515
+ windowMs: number;
1516
+ limit: number;
1517
+ };
1518
+ "/v1/prosopo/provider/admin/batch": {
1519
+ windowMs: number;
1520
+ limit: number;
1521
+ };
1522
+ "/v1/prosopo/provider/admin/dataset": {
1523
+ windowMs: number;
1524
+ limit: number;
1525
+ };
1526
+ "/v1/prosopo/provider/admin/deregister": {
1527
+ windowMs: number;
1528
+ limit: number;
1529
+ };
1530
+ "/v1/prosopo/provider/admin/update": {
1531
+ windowMs: number;
1532
+ limit: number;
1533
+ };
1534
+ };
1535
+ proxyCount: number;
1353
1536
  database?: Partial<Record<"development" | "staging" | "production", {
1354
1537
  type: string;
1355
1538
  endpoint: string;
@@ -1357,6 +1540,9 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1357
1540
  authSource: string;
1358
1541
  }>> | undefined;
1359
1542
  devOnlyWatchEvents?: boolean | undefined;
1543
+ captchaScheduler?: {
1544
+ schedule?: string | undefined;
1545
+ } | undefined;
1360
1546
  mongoEventsUri?: string | undefined;
1361
1547
  mongoCaptchaUri?: string | undefined;
1362
1548
  }, {
@@ -1381,11 +1567,11 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1381
1567
  defaultEnvironment?: "development" | "staging" | "production" | undefined;
1382
1568
  defaultNetwork?: "development" | "rococo" | "shiden" | "astar" | undefined;
1383
1569
  networks?: Record<string, {
1384
- endpoint: string[];
1385
1570
  contract: {
1386
- address: string;
1387
1571
  name: string;
1572
+ address: string;
1388
1573
  };
1574
+ endpoint: string[];
1389
1575
  pairType: "sr25519" | "ed25519" | "ecdsa" | "ethereum";
1390
1576
  ss58Format?: number | undefined;
1391
1577
  }> | undefined;
@@ -1405,8 +1591,70 @@ export declare const ProsopoConfigSchema: z.ZodObject<z.objectUtil.extendShape<z
1405
1591
  interval?: number | undefined;
1406
1592
  maxBatchExtrinsicPercentage?: number | undefined;
1407
1593
  } | undefined;
1594
+ captchaScheduler?: {
1595
+ schedule?: string | undefined;
1596
+ } | undefined;
1408
1597
  mongoEventsUri?: string | undefined;
1409
1598
  mongoCaptchaUri?: string | undefined;
1599
+ rateLimits?: {
1600
+ "/v1/prosopo/provider/captcha/image": {
1601
+ windowMs?: number | undefined;
1602
+ limit?: number | undefined;
1603
+ };
1604
+ "/v1/prosopo/provider/captcha/pow": {
1605
+ windowMs?: number | undefined;
1606
+ limit?: number | undefined;
1607
+ };
1608
+ "/v1/prosopo/provider/solution": {
1609
+ windowMs?: number | undefined;
1610
+ limit?: number | undefined;
1611
+ };
1612
+ "/v1/prosopo/provider/pow/solution": {
1613
+ windowMs?: number | undefined;
1614
+ limit?: number | undefined;
1615
+ };
1616
+ "/v1/prosopo/provider/pow/verify": {
1617
+ windowMs?: number | undefined;
1618
+ limit?: number | undefined;
1619
+ };
1620
+ "/v1/prosopo/provider/image/dapp/verify": {
1621
+ windowMs?: number | undefined;
1622
+ limit?: number | undefined;
1623
+ };
1624
+ "/v1/prosopo/provider/image/user/verify": {
1625
+ windowMs?: number | undefined;
1626
+ limit?: number | undefined;
1627
+ };
1628
+ "/v1/prosopo/provider/status": {
1629
+ windowMs?: number | undefined;
1630
+ limit?: number | undefined;
1631
+ };
1632
+ "/v1/prosopo/provider/details": {
1633
+ windowMs?: number | undefined;
1634
+ limit?: number | undefined;
1635
+ };
1636
+ "/v1/prosopo/provider/events": {
1637
+ windowMs?: number | undefined;
1638
+ limit?: number | undefined;
1639
+ };
1640
+ "/v1/prosopo/provider/admin/batch": {
1641
+ windowMs?: number | undefined;
1642
+ limit?: number | undefined;
1643
+ };
1644
+ "/v1/prosopo/provider/admin/dataset": {
1645
+ windowMs?: number | undefined;
1646
+ limit?: number | undefined;
1647
+ };
1648
+ "/v1/prosopo/provider/admin/deregister": {
1649
+ windowMs?: number | undefined;
1650
+ limit?: number | undefined;
1651
+ };
1652
+ "/v1/prosopo/provider/admin/update": {
1653
+ windowMs?: number | undefined;
1654
+ limit?: number | undefined;
1655
+ };
1656
+ } | undefined;
1657
+ proxyCount?: number | undefined;
1410
1658
  }>;
1411
1659
  export type ProsopoConfigInput = input<typeof ProsopoConfigSchema>;
1412
1660
  export type ProsopoConfigOutput = output<typeof ProsopoConfigSchema>;