@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.
- package/dist/api/api.d.ts +10 -12
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -2
- package/dist/api/index.js.map +1 -1
- package/dist/api/params.d.ts +3 -2
- package/dist/api/params.d.ts.map +1 -1
- package/dist/api/params.js +2 -1
- package/dist/api/params.js.map +1 -1
- package/dist/cjs/api/params.cjs +2 -1
- package/dist/cjs/config/config.cjs +43 -38
- package/dist/cjs/config/index.cjs +9 -8
- package/dist/cjs/config/network.cjs +6 -1
- package/dist/cjs/config/timeouts.cjs +19 -0
- package/dist/cjs/contract/artifacts.cjs +10 -3
- package/dist/cjs/datasets/captcha.cjs +35 -1
- package/dist/cjs/datasets/dataset.cjs +1 -1
- package/dist/cjs/datasets/index.cjs +5 -0
- package/dist/cjs/dist/api/api.cjs +1 -0
- package/dist/cjs/dist/api/index.cjs +8 -0
- package/dist/cjs/dist/api/params.cjs +30 -0
- package/dist/cjs/dist/config/config.cjs +182 -0
- package/dist/cjs/dist/config/enumMap.cjs +8 -0
- package/dist/cjs/dist/config/index.cjs +33 -0
- package/dist/cjs/dist/config/network.cjs +34 -0
- package/dist/cjs/dist/config/timeouts.cjs +19 -0
- package/dist/cjs/dist/contract/artifacts.cjs +135 -0
- package/dist/cjs/dist/contract/batch.cjs +1 -0
- package/dist/cjs/dist/contract/contract.cjs +1 -0
- package/dist/cjs/dist/contract/index.cjs +22 -0
- package/dist/cjs/dist/contract/interface.cjs +1 -0
- package/dist/cjs/dist/contract/useWeight.cjs +1 -0
- package/dist/cjs/dist/datasets/assets.cjs +1 -0
- package/dist/cjs/dist/datasets/captcha.cjs +118 -0
- package/dist/cjs/dist/datasets/dataset.cjs +32 -0
- package/dist/cjs/dist/datasets/index.cjs +52 -0
- package/dist/cjs/dist/datasets/merkle.cjs +1 -0
- package/dist/cjs/dist/index.cjs +16 -0
- package/dist/cjs/dist/networks/index.cjs +52 -0
- package/dist/cjs/dist/procaptcha/api.cjs +1 -0
- package/dist/cjs/dist/procaptcha/client.cjs +1 -0
- package/dist/cjs/dist/procaptcha/collector.cjs +1 -0
- package/dist/cjs/dist/procaptcha/index.cjs +17 -0
- package/dist/cjs/dist/procaptcha/manager.cjs +10 -0
- package/dist/cjs/dist/procaptcha/props.cjs +1 -0
- package/dist/cjs/dist/procaptcha/storage.cjs +9 -0
- package/dist/cjs/dist/procaptcha/token.cjs +58 -0
- package/dist/cjs/dist/procaptcha/utils.cjs +1 -0
- package/dist/cjs/dist/procaptcha-bundle/index.cjs +8 -0
- package/dist/cjs/dist/procaptcha-frictionless/index.cjs +2 -0
- package/dist/cjs/dist/procaptcha-frictionless/props.cjs +1 -0
- package/dist/cjs/dist/provider/accounts.cjs +7 -0
- package/dist/cjs/dist/provider/api.cjs +113 -0
- package/dist/cjs/dist/provider/argv.cjs +7 -0
- package/dist/cjs/dist/provider/index.cjs +35 -0
- package/dist/cjs/dist/provider/scheduler.cjs +14 -0
- package/dist/cjs/index.cjs +19 -8
- package/dist/cjs/networks/index.cjs +11 -5
- package/dist/cjs/procaptcha/manager.cjs +1 -1
- package/dist/cjs/procaptcha/token.cjs +23 -5
- package/dist/cjs/procaptcha-frictionless/index.cjs +2 -0
- package/dist/cjs/procaptcha-frictionless/props.cjs +1 -0
- package/dist/cjs/provider/accounts.cjs +7 -0
- package/dist/cjs/provider/api.cjs +102 -14
- package/dist/cjs/provider/argv.cjs +3 -2
- package/dist/cjs/provider/index.cjs +4 -1
- package/dist/config/config.d.ts +344 -96
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +64 -30
- package/dist/config/config.js.map +1 -1
- package/dist/config/enumMap.d.ts +1 -1
- package/dist/config/enumMap.d.ts.map +1 -1
- package/dist/config/enumMap.js +1 -1
- package/dist/config/enumMap.js.map +1 -1
- package/dist/config/index.d.ts +3 -2
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +3 -2
- package/dist/config/index.js.map +1 -1
- package/dist/config/network.d.ts +18 -18
- package/dist/config/network.d.ts.map +1 -1
- package/dist/config/network.js +12 -7
- package/dist/config/network.js.map +1 -1
- package/dist/config/timeouts.d.ts +9 -0
- package/dist/config/timeouts.d.ts.map +1 -0
- package/dist/config/timeouts.js +10 -0
- package/dist/config/timeouts.js.map +1 -0
- package/dist/contract/artifacts.d.ts +171 -171
- package/dist/contract/artifacts.d.ts.map +1 -1
- package/dist/contract/artifacts.js +7 -4
- package/dist/contract/artifacts.js.map +1 -1
- package/dist/contract/batch.d.ts +4 -4
- package/dist/contract/batch.d.ts.map +1 -1
- package/dist/contract/contract.d.ts +2 -2
- package/dist/contract/contract.d.ts.map +1 -1
- package/dist/contract/index.d.ts +5 -5
- package/dist/contract/index.d.ts.map +1 -1
- package/dist/contract/index.js +5 -5
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/interface.d.ts +9 -9
- package/dist/contract/interface.d.ts.map +1 -1
- package/dist/contract/useWeight.d.ts +2 -2
- package/dist/contract/useWeight.d.ts.map +1 -1
- package/dist/datasets/assets.d.ts.map +1 -1
- package/dist/datasets/captcha.d.ts +52 -10
- package/dist/datasets/captcha.d.ts.map +1 -1
- package/dist/datasets/captcha.js +31 -3
- package/dist/datasets/captcha.js.map +1 -1
- package/dist/datasets/dataset.d.ts +43 -43
- package/dist/datasets/dataset.d.ts.map +1 -1
- package/dist/datasets/dataset.js +2 -2
- package/dist/datasets/dataset.js.map +1 -1
- package/dist/datasets/index.d.ts +4 -4
- package/dist/datasets/index.d.ts.map +1 -1
- package/dist/datasets/index.js +4 -4
- package/dist/datasets/index.js.map +1 -1
- package/dist/datasets/merkle.d.ts.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/networks/index.d.ts +1 -1
- package/dist/networks/index.d.ts.map +1 -1
- package/dist/networks/index.js +22 -20
- package/dist/networks/index.js.map +1 -1
- package/dist/procaptcha/api.d.ts +8 -10
- package/dist/procaptcha/api.d.ts.map +1 -1
- package/dist/procaptcha/client.d.ts +8 -3
- package/dist/procaptcha/client.d.ts.map +1 -1
- package/dist/procaptcha/collector.d.ts.map +1 -1
- package/dist/procaptcha/index.d.ts +8 -8
- package/dist/procaptcha/index.d.ts.map +1 -1
- package/dist/procaptcha/index.js +8 -8
- package/dist/procaptcha/index.js.map +1 -1
- package/dist/procaptcha/manager.d.ts +5 -5
- package/dist/procaptcha/manager.d.ts.map +1 -1
- package/dist/procaptcha/manager.js +3 -3
- package/dist/procaptcha/manager.js.map +1 -1
- package/dist/procaptcha/props.d.ts +2 -2
- package/dist/procaptcha/props.d.ts.map +1 -1
- package/dist/procaptcha/storage.d.ts +1 -1
- package/dist/procaptcha/storage.d.ts.map +1 -1
- package/dist/procaptcha/storage.js +1 -1
- package/dist/procaptcha/storage.js.map +1 -1
- package/dist/procaptcha/token.d.ts +56 -1
- package/dist/procaptcha/token.d.ts.map +1 -1
- package/dist/procaptcha/token.js +21 -5
- package/dist/procaptcha/token.js.map +1 -1
- package/dist/procaptcha/utils.d.ts.map +1 -1
- package/dist/procaptcha-bundle/index.d.ts.map +1 -1
- package/dist/procaptcha-bundle/index.js.map +1 -1
- package/dist/procaptcha-frictionless/index.d.ts +2 -0
- package/dist/procaptcha-frictionless/index.d.ts.map +1 -0
- package/dist/procaptcha-frictionless/index.js +2 -0
- package/dist/procaptcha-frictionless/index.js.map +1 -0
- package/dist/procaptcha-frictionless/props.d.ts +8 -0
- package/dist/procaptcha-frictionless/props.d.ts.map +1 -0
- package/dist/procaptcha-frictionless/props.js +2 -0
- package/dist/procaptcha-frictionless/props.js.map +1 -0
- package/dist/provider/accounts.d.ts +6 -3
- package/dist/provider/accounts.d.ts.map +1 -1
- package/dist/provider/accounts.js +5 -1
- package/dist/provider/accounts.js.map +1 -1
- package/dist/provider/api.d.ts +324 -34
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +57 -12
- package/dist/provider/api.js.map +1 -1
- package/dist/provider/argv.d.ts +1 -1
- package/dist/provider/argv.d.ts.map +1 -1
- package/dist/provider/argv.js +2 -2
- package/dist/provider/argv.js.map +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +4 -4
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/scheduler.d.ts.map +1 -1
- package/dist/provider/scheduler.js.map +1 -1
- package/package.json +50 -55
- package/vite.cjs.config.ts +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Hash } from "@prosopo/types";
|
|
2
|
+
import { type Captcha, CaptchaTypes, type CaptchaWithoutId } from "./captcha.js";
|
|
3
3
|
export type DatasetBase = {
|
|
4
4
|
datasetId?: Hash;
|
|
5
5
|
datasetContentId?: Hash;
|
|
@@ -38,22 +38,22 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
38
38
|
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
39
39
|
hash: import("zod").ZodString;
|
|
40
40
|
data: import("zod").ZodString;
|
|
41
|
-
type: import("zod").ZodNativeEnum<typeof import("
|
|
41
|
+
type: import("zod").ZodNativeEnum<typeof import("@prosopo/types").CaptchaItemTypes>;
|
|
42
42
|
}, "strip", import("zod").ZodTypeAny, {
|
|
43
43
|
hash: string;
|
|
44
44
|
data: string;
|
|
45
|
-
type: import("
|
|
45
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
46
46
|
}, {
|
|
47
47
|
hash: string;
|
|
48
48
|
data: string;
|
|
49
|
-
type: import("
|
|
49
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
50
50
|
}>, "many">;
|
|
51
51
|
target: import("zod").ZodString;
|
|
52
52
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
53
53
|
items: {
|
|
54
54
|
hash: string;
|
|
55
55
|
data: string;
|
|
56
|
-
type: import("
|
|
56
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
57
57
|
}[];
|
|
58
58
|
salt: string;
|
|
59
59
|
target: string;
|
|
@@ -66,7 +66,7 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
66
66
|
items: {
|
|
67
67
|
hash: string;
|
|
68
68
|
data: string;
|
|
69
|
-
type: import("
|
|
69
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
70
70
|
}[];
|
|
71
71
|
salt: string;
|
|
72
72
|
target: string;
|
|
@@ -85,7 +85,7 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
85
85
|
items: {
|
|
86
86
|
hash: string;
|
|
87
87
|
data: string;
|
|
88
|
-
type: import("
|
|
88
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
89
89
|
}[];
|
|
90
90
|
salt: string;
|
|
91
91
|
target: string;
|
|
@@ -96,8 +96,8 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
96
96
|
timeLimit?: number | undefined;
|
|
97
97
|
}[];
|
|
98
98
|
format: CaptchaTypes;
|
|
99
|
-
datasetId?: string | undefined;
|
|
100
99
|
timeLimit?: number | undefined;
|
|
100
|
+
datasetId?: string | undefined;
|
|
101
101
|
datasetContentId?: string | undefined;
|
|
102
102
|
solutionTree?: string[][] | undefined;
|
|
103
103
|
contentTree?: string[][] | undefined;
|
|
@@ -106,7 +106,7 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
106
106
|
items: {
|
|
107
107
|
hash: string;
|
|
108
108
|
data: string;
|
|
109
|
-
type: import("
|
|
109
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
110
110
|
}[];
|
|
111
111
|
salt: string;
|
|
112
112
|
target: string;
|
|
@@ -117,8 +117,8 @@ export declare const DatasetSchema: import("zod").ZodObject<{
|
|
|
117
117
|
timeLimit?: number | undefined;
|
|
118
118
|
}[];
|
|
119
119
|
format: CaptchaTypes;
|
|
120
|
-
datasetId?: string | undefined;
|
|
121
120
|
timeLimit?: number | undefined;
|
|
121
|
+
datasetId?: string | undefined;
|
|
122
122
|
datasetContentId?: string | undefined;
|
|
123
123
|
solutionTree?: string[][] | undefined;
|
|
124
124
|
contentTree?: string[][] | undefined;
|
|
@@ -137,22 +137,22 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
137
137
|
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
138
138
|
hash: import("zod").ZodString;
|
|
139
139
|
data: import("zod").ZodString;
|
|
140
|
-
type: import("zod").ZodNativeEnum<typeof import("
|
|
140
|
+
type: import("zod").ZodNativeEnum<typeof import("@prosopo/types").CaptchaItemTypes>;
|
|
141
141
|
}, "strip", import("zod").ZodTypeAny, {
|
|
142
142
|
hash: string;
|
|
143
143
|
data: string;
|
|
144
|
-
type: import("
|
|
144
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
145
145
|
}, {
|
|
146
146
|
hash: string;
|
|
147
147
|
data: string;
|
|
148
|
-
type: import("
|
|
148
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
149
149
|
}>, "many">;
|
|
150
150
|
target: import("zod").ZodString;
|
|
151
151
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
152
152
|
items: {
|
|
153
153
|
hash: string;
|
|
154
154
|
data: string;
|
|
155
|
-
type: import("
|
|
155
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
156
156
|
}[];
|
|
157
157
|
salt: string;
|
|
158
158
|
target: string;
|
|
@@ -165,7 +165,7 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
165
165
|
items: {
|
|
166
166
|
hash: string;
|
|
167
167
|
data: string;
|
|
168
|
-
type: import("
|
|
168
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
169
169
|
}[];
|
|
170
170
|
salt: string;
|
|
171
171
|
target: string;
|
|
@@ -191,15 +191,15 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
191
191
|
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
192
192
|
hash: import("zod").ZodString;
|
|
193
193
|
data: import("zod").ZodString;
|
|
194
|
-
type: import("zod").ZodNativeEnum<typeof import("
|
|
194
|
+
type: import("zod").ZodNativeEnum<typeof import("@prosopo/types").CaptchaItemTypes>;
|
|
195
195
|
}, "strip", import("zod").ZodTypeAny, {
|
|
196
196
|
hash: string;
|
|
197
197
|
data: string;
|
|
198
|
-
type: import("
|
|
198
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
199
199
|
}, {
|
|
200
200
|
hash: string;
|
|
201
201
|
data: string;
|
|
202
|
-
type: import("
|
|
202
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
203
203
|
}>, "many">;
|
|
204
204
|
target: import("zod").ZodString;
|
|
205
205
|
}>, {
|
|
@@ -212,7 +212,7 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
212
212
|
items: {
|
|
213
213
|
hash: string;
|
|
214
214
|
data: string;
|
|
215
|
-
type: import("
|
|
215
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
216
216
|
}[];
|
|
217
217
|
salt: string;
|
|
218
218
|
target: string;
|
|
@@ -225,7 +225,7 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
225
225
|
items: {
|
|
226
226
|
hash: string;
|
|
227
227
|
data: string;
|
|
228
|
-
type: import("
|
|
228
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
229
229
|
}[];
|
|
230
230
|
salt: string;
|
|
231
231
|
target: string;
|
|
@@ -240,7 +240,7 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
240
240
|
items: {
|
|
241
241
|
hash: string;
|
|
242
242
|
data: string;
|
|
243
|
-
type: import("
|
|
243
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
244
244
|
}[];
|
|
245
245
|
salt: string;
|
|
246
246
|
target: string;
|
|
@@ -251,8 +251,8 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
251
251
|
timeLimit?: number | undefined;
|
|
252
252
|
}[];
|
|
253
253
|
format: CaptchaTypes;
|
|
254
|
-
datasetId?: string | undefined;
|
|
255
254
|
timeLimit?: number | undefined;
|
|
255
|
+
datasetId?: string | undefined;
|
|
256
256
|
datasetContentId?: string | undefined;
|
|
257
257
|
solutionTree?: string[][] | undefined;
|
|
258
258
|
contentTree?: string[][] | undefined;
|
|
@@ -261,7 +261,7 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
261
261
|
items: {
|
|
262
262
|
hash: string;
|
|
263
263
|
data: string;
|
|
264
|
-
type: import("
|
|
264
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
265
265
|
}[];
|
|
266
266
|
salt: string;
|
|
267
267
|
target: string;
|
|
@@ -272,8 +272,8 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<i
|
|
|
272
272
|
timeLimit?: number | undefined;
|
|
273
273
|
}[];
|
|
274
274
|
format: CaptchaTypes;
|
|
275
|
-
datasetId?: string | undefined;
|
|
276
275
|
timeLimit?: number | undefined;
|
|
276
|
+
datasetId?: string | undefined;
|
|
277
277
|
datasetContentId?: string | undefined;
|
|
278
278
|
solutionTree?: string[][] | undefined;
|
|
279
279
|
contentTree?: string[][] | undefined;
|
|
@@ -292,15 +292,15 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
292
292
|
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
293
293
|
hash: import("zod").ZodString;
|
|
294
294
|
data: import("zod").ZodString;
|
|
295
|
-
type: import("zod").ZodNativeEnum<typeof import("
|
|
295
|
+
type: import("zod").ZodNativeEnum<typeof import("@prosopo/types").CaptchaItemTypes>;
|
|
296
296
|
}, "strip", import("zod").ZodTypeAny, {
|
|
297
297
|
hash: string;
|
|
298
298
|
data: string;
|
|
299
|
-
type: import("
|
|
299
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
300
300
|
}, {
|
|
301
301
|
hash: string;
|
|
302
302
|
data: string;
|
|
303
|
-
type: import("
|
|
303
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
304
304
|
}>, "many">;
|
|
305
305
|
target: import("zod").ZodString;
|
|
306
306
|
}>, {
|
|
@@ -310,7 +310,7 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
310
310
|
items: {
|
|
311
311
|
hash: string;
|
|
312
312
|
data: string;
|
|
313
|
-
type: import("
|
|
313
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
314
314
|
}[];
|
|
315
315
|
salt: string;
|
|
316
316
|
target: string;
|
|
@@ -323,7 +323,7 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
323
323
|
items: {
|
|
324
324
|
hash: string;
|
|
325
325
|
data: string;
|
|
326
|
-
type: import("
|
|
326
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
327
327
|
}[];
|
|
328
328
|
salt: string;
|
|
329
329
|
target: string;
|
|
@@ -337,12 +337,11 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
337
337
|
solutionTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
338
338
|
contentTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
339
339
|
}, "strip", import("zod").ZodTypeAny, {
|
|
340
|
-
datasetId: string;
|
|
341
340
|
captchas: {
|
|
342
341
|
items: {
|
|
343
342
|
hash: string;
|
|
344
343
|
data: string;
|
|
345
|
-
type: import("
|
|
344
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
346
345
|
}[];
|
|
347
346
|
salt: string;
|
|
348
347
|
target: string;
|
|
@@ -353,16 +352,16 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
353
352
|
timeLimit?: number | undefined;
|
|
354
353
|
}[];
|
|
355
354
|
format: CaptchaTypes;
|
|
355
|
+
datasetId: string;
|
|
356
356
|
datasetContentId?: string | undefined;
|
|
357
357
|
solutionTree?: string[][] | undefined;
|
|
358
358
|
contentTree?: string[][] | undefined;
|
|
359
359
|
}, {
|
|
360
|
-
datasetId: string;
|
|
361
360
|
captchas: {
|
|
362
361
|
items: {
|
|
363
362
|
hash: string;
|
|
364
363
|
data: string;
|
|
365
|
-
type: import("
|
|
364
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
366
365
|
}[];
|
|
367
366
|
salt: string;
|
|
368
367
|
target: string;
|
|
@@ -373,6 +372,7 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
|
373
372
|
timeLimit?: number | undefined;
|
|
374
373
|
}[];
|
|
375
374
|
format: CaptchaTypes;
|
|
375
|
+
datasetId: string;
|
|
376
376
|
datasetContentId?: string | undefined;
|
|
377
377
|
solutionTree?: string[][] | undefined;
|
|
378
378
|
contentTree?: string[][] | undefined;
|
|
@@ -391,15 +391,15 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
391
391
|
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
392
392
|
hash: import("zod").ZodString;
|
|
393
393
|
data: import("zod").ZodString;
|
|
394
|
-
type: import("zod").ZodNativeEnum<typeof import("
|
|
394
|
+
type: import("zod").ZodNativeEnum<typeof import("@prosopo/types").CaptchaItemTypes>;
|
|
395
395
|
}, "strip", import("zod").ZodTypeAny, {
|
|
396
396
|
hash: string;
|
|
397
397
|
data: string;
|
|
398
|
-
type: import("
|
|
398
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
399
399
|
}, {
|
|
400
400
|
hash: string;
|
|
401
401
|
data: string;
|
|
402
|
-
type: import("
|
|
402
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
403
403
|
}>, "many">;
|
|
404
404
|
target: import("zod").ZodString;
|
|
405
405
|
}>, {
|
|
@@ -409,7 +409,7 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
409
409
|
items: {
|
|
410
410
|
hash: string;
|
|
411
411
|
data: string;
|
|
412
|
-
type: import("
|
|
412
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
413
413
|
}[];
|
|
414
414
|
salt: string;
|
|
415
415
|
target: string;
|
|
@@ -422,7 +422,7 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
422
422
|
items: {
|
|
423
423
|
hash: string;
|
|
424
424
|
data: string;
|
|
425
|
-
type: import("
|
|
425
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
426
426
|
}[];
|
|
427
427
|
salt: string;
|
|
428
428
|
target: string;
|
|
@@ -439,12 +439,11 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
439
439
|
solutionTree: import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">;
|
|
440
440
|
contentTree: import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">;
|
|
441
441
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
442
|
-
datasetId: string;
|
|
443
442
|
captchas: {
|
|
444
443
|
items: {
|
|
445
444
|
hash: string;
|
|
446
445
|
data: string;
|
|
447
|
-
type: import("
|
|
446
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
448
447
|
}[];
|
|
449
448
|
salt: string;
|
|
450
449
|
target: string;
|
|
@@ -455,16 +454,16 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
455
454
|
timeLimit?: number | undefined;
|
|
456
455
|
}[];
|
|
457
456
|
format: CaptchaTypes;
|
|
457
|
+
datasetId: string;
|
|
458
458
|
solutionTree: string[][];
|
|
459
459
|
contentTree: string[][];
|
|
460
460
|
datasetContentId?: string | undefined;
|
|
461
461
|
}, {
|
|
462
|
-
datasetId: string;
|
|
463
462
|
captchas: {
|
|
464
463
|
items: {
|
|
465
464
|
hash: string;
|
|
466
465
|
data: string;
|
|
467
|
-
type: import("
|
|
466
|
+
type: import("@prosopo/types").CaptchaItemTypes;
|
|
468
467
|
}[];
|
|
469
468
|
salt: string;
|
|
470
469
|
target: string;
|
|
@@ -475,6 +474,7 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<import
|
|
|
475
474
|
timeLimit?: number | undefined;
|
|
476
475
|
}[];
|
|
477
476
|
format: CaptchaTypes;
|
|
477
|
+
datasetId: string;
|
|
478
478
|
solutionTree: string[][];
|
|
479
479
|
contentTree: string[][];
|
|
480
480
|
datasetContentId?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAe3C,OAAO,EACN,KAAK,OAAO,EACZ,YAAY,EACZ,KAAK,gBAAgB,EAIrB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,GAAG;IACzB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,OAAQ,SAAQ,WAAW;IAC3C,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC9C,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,gBAAgB,EAAE,IAAI,CAAC;IACvB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC5D,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC;CACxB;AAID,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3C,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC"}
|
package/dist/datasets/dataset.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { array, nativeEnum, number, object, string } from "zod";
|
|
2
|
+
import { CaptchaTypes, CaptchasSchema, CaptchasWithNumericSolutionSchema, SelectAllCaptchaSchema, } from "./captcha.js";
|
|
3
3
|
export const DatasetSchema = object({
|
|
4
4
|
datasetId: string().optional(),
|
|
5
5
|
datasetContentId: string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dataset.js","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAchE,OAAO,EAEN,YAAY,EAEZ,cAAc,EACd,iCAAiC,EACjC,sBAAsB,GACtB,MAAM,cAAc,CAAC;AAiCtB,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,gBAAgB,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAChC,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/C,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9C,SAAS,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,aAAa,CAAC,MAAM,CAAC;IACpE,QAAQ,EAAE,iCAAiC;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IAC1C,SAAS,EAAE,MAAM,EAAE;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC;IACvC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAChC,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/C,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACtE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;CACnC,CAAC,CAAC"}
|
package/dist/datasets/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./captcha.js";
|
|
2
|
+
export * from "./dataset.js";
|
|
3
|
+
export * from "./merkle.js";
|
|
4
|
+
export * from "./assets.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
package/dist/datasets/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./captcha.js";
|
|
2
|
+
export * from "./dataset.js";
|
|
3
|
+
export * from "./merkle.js";
|
|
4
|
+
export * from "./assets.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merkle.d.ts","sourceRoot":"","sources":["../../src/datasets/merkle.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,mBAAmB;
|
|
1
|
+
{"version":3,"file":"merkle.d.ts","sourceRoot":"","sources":["../../src/datasets/merkle.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,MAAM,WAAW,GAAG,UAAU,EAAE,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAExD,MAAM,MAAM,eAAe,GAAG,CAAC,UAAU,CAAC,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,gBAAgB,EAAE,EAAE,eAAe,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export
|
|
9
|
-
export
|
|
1
|
+
export * from "./api/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./contract/index.js";
|
|
4
|
+
export * from "./datasets/index.js";
|
|
5
|
+
export * from "./provider/index.js";
|
|
6
|
+
export * from "./procaptcha/index.js";
|
|
7
|
+
export * from "./procaptcha-bundle/index.js";
|
|
8
|
+
export * from "./procaptcha-frictionless/index.js";
|
|
9
|
+
export { default as networks } from "./networks/index.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export
|
|
1
|
+
export * from "./api/index.js";
|
|
2
|
+
export * from "./config/index.js";
|
|
3
|
+
export * from "./contract/index.js";
|
|
4
|
+
export * from "./datasets/index.js";
|
|
5
|
+
export * from "./provider/index.js";
|
|
6
|
+
export * from "./procaptcha/index.js";
|
|
7
|
+
export * from "./procaptcha-bundle/index.js";
|
|
8
|
+
export * from "./procaptcha-frictionless/index.js";
|
|
9
|
+
export { default as networks } from "./networks/index.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/networks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;8BA2BlD,0BAA0B;AAA7C,wBA0DE"}
|
package/dist/networks/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { NetworkNamesSchema, NetworkPairTypeSchema } from
|
|
2
|
-
const pairTypeSr25519 = NetworkPairTypeSchema.parse(
|
|
1
|
+
import { NetworkNamesSchema, NetworkPairTypeSchema, } from "../config/network.js";
|
|
2
|
+
const pairTypeSr25519 = NetworkPairTypeSchema.parse("sr25519");
|
|
3
3
|
const getContractAddress = (defaultAddress) => {
|
|
4
|
-
return process.env.PROSOPO_CONTRACT_ADDRESS
|
|
4
|
+
return process.env.PROSOPO_CONTRACT_ADDRESS
|
|
5
|
+
? process.env.PROSOPO_CONTRACT_ADDRESS
|
|
6
|
+
: defaultAddress || "";
|
|
5
7
|
};
|
|
6
8
|
export default () => {
|
|
7
9
|
return {
|
|
8
10
|
[NetworkNamesSchema.Values.development]: {
|
|
9
11
|
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT
|
|
10
12
|
? [process.env.PROSOPO_SUBSTRATE_ENDPOINT]
|
|
11
|
-
: [
|
|
13
|
+
: ["ws://127.0.0.1:9944"],
|
|
12
14
|
contract: {
|
|
13
|
-
name:
|
|
14
|
-
address: getContractAddress(
|
|
15
|
+
name: "captcha",
|
|
16
|
+
address: getContractAddress("CONTRACT_NOT_DEPLOYED"),
|
|
15
17
|
},
|
|
16
18
|
pairType: pairTypeSr25519,
|
|
17
19
|
ss58Format: 42,
|
|
@@ -19,10 +21,10 @@ export default () => {
|
|
|
19
21
|
[NetworkNamesSchema.Values.rococo]: {
|
|
20
22
|
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT
|
|
21
23
|
? [process.env.PROSOPO_SUBSTRATE_ENDPOINT]
|
|
22
|
-
: [
|
|
24
|
+
: ["wss://rococo-contracts-rpc.polkadot.io:443"],
|
|
23
25
|
contract: {
|
|
24
|
-
name:
|
|
25
|
-
address: getContractAddress(
|
|
26
|
+
name: "captcha",
|
|
27
|
+
address: getContractAddress("5HiVWQhJrysNcFNEWf2crArKht16zrhro3FcekVWocyQjx5u"),
|
|
26
28
|
},
|
|
27
29
|
pairType: pairTypeSr25519,
|
|
28
30
|
ss58Format: 42,
|
|
@@ -30,29 +32,29 @@ export default () => {
|
|
|
30
32
|
[NetworkNamesSchema.Values.shiden]: {
|
|
31
33
|
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT
|
|
32
34
|
? [process.env.PROSOPO_SUBSTRATE_ENDPOINT]
|
|
33
|
-
: [
|
|
35
|
+
: ["wss://shiden.public.blastapi.io"],
|
|
34
36
|
contract: {
|
|
35
|
-
address: getContractAddress(
|
|
36
|
-
name:
|
|
37
|
+
address: getContractAddress("XpRox5bNg6YV8BHafsuHQ3b8i7gSq3GKPeYLA1b8EZwrDb3"),
|
|
38
|
+
name: "captcha",
|
|
37
39
|
},
|
|
38
40
|
pairType: pairTypeSr25519,
|
|
39
|
-
ss58Format:
|
|
41
|
+
ss58Format: 42,
|
|
40
42
|
},
|
|
41
43
|
[NetworkNamesSchema.Values.astar]: {
|
|
42
44
|
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT
|
|
43
45
|
? [process.env.PROSOPO_SUBSTRATE_ENDPOINT]
|
|
44
46
|
: [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
"wss://rpc.astar.network",
|
|
48
|
+
"wss://1rpc.io/astr",
|
|
49
|
+
"wss://astar.public.blastapi.io",
|
|
50
|
+
"wss://astar.public.curie.radiumblock.co/ws",
|
|
49
51
|
],
|
|
50
52
|
contract: {
|
|
51
|
-
address: getContractAddress(
|
|
52
|
-
name:
|
|
53
|
+
address: getContractAddress("X2NLPj49L4UKWAzX8tS1LHTwioMHNyVurCsvTyUNYxcPuWA"),
|
|
54
|
+
name: "captcha",
|
|
53
55
|
},
|
|
54
56
|
pairType: pairTypeSr25519,
|
|
55
|
-
ss58Format:
|
|
57
|
+
ss58Format: 42,
|
|
56
58
|
},
|
|
57
59
|
};
|
|
58
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,kBAAkB,EAClB,qBAAqB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,cAAuB,EAAE,EAAE;IACtD,OAAO,OAAO,CAAC,GAAG,CAAC,wBAAwB;QAC1C,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB;QACtC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC;AACzB,CAAC,CAAC;AAEF,eAAe,GAA+B,EAAE;IAC/C,OAAO;QACN,CAAC,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;YACxC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;gBAC/C,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;gBAC1C,CAAC,CAAC,CAAC,qBAAqB,CAAC;YAC1B,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,kBAAkB,CAAC,uBAAuB,CAAC;aACpD;YACD,QAAQ,EAAE,eAAe;YACzB,UAAU,EAAE,EAAE;SACd;QACD,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACnC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;gBAC/C,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;gBAC1C,CAAC,CAAC,CAAC,4CAA4C,CAAC;YACjD,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,kBAAkB,CAC1B,kDAAkD,CAClD;aACD;YACD,QAAQ,EAAE,eAAe;YACzB,UAAU,EAAE,EAAE;SACd;QACD,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;YACnC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;gBAC/C,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;gBAC1C,CAAC,CAAC,CAAC,iCAAiC,CAAC;YACtC,QAAQ,EAAE;gBACT,OAAO,EAAE,kBAAkB,CAC1B,iDAAiD,CACjD;gBACD,IAAI,EAAE,SAAS;aACf;YACD,QAAQ,EAAE,eAAe;YACzB,UAAU,EAAE,EAAE;SACd;QACD,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YAClC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,0BAA0B;gBAC/C,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;gBAC1C,CAAC,CAAC;oBACA,yBAAyB;oBACzB,oBAAoB;oBACpB,gCAAgC;oBAChC,4CAA4C;iBAC5C;YACH,QAAQ,EAAE;gBACT,OAAO,EAAE,kBAAkB,CAC1B,iDAAiD,CACjD;gBACD,IAAI,EAAE,SAAS;aACf;YACD,QAAQ,EAAE,eAAe;YACzB,UAAU,EAAE,EAAE;SACd;KACD,CAAC;AACH,CAAC,CAAC"}
|
package/dist/procaptcha/api.d.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { IProsopoCaptchaContract } from
|
|
4
|
-
import {
|
|
5
|
-
import { RandomProvider } from
|
|
6
|
-
import {
|
|
7
|
-
import { TCaptchaSubmitResult } from './client.js';
|
|
1
|
+
import type { Signer } from "@polkadot/api/types";
|
|
2
|
+
import type { ProviderApiInterface } from "../api/index.js";
|
|
3
|
+
import type { IProsopoCaptchaContract } from "../contract/index.js";
|
|
4
|
+
import type { CaptchaSolution } from "../datasets/index.js";
|
|
5
|
+
import type { CaptchaResponseBody, RandomProvider } from "../provider/index.js";
|
|
6
|
+
import type { TCaptchaSubmitResult } from "./client.js";
|
|
8
7
|
export interface ProsopoCaptchaApiInterface {
|
|
9
8
|
userAccount: string;
|
|
10
|
-
contract: IProsopoCaptchaContract;
|
|
9
|
+
contract: IProsopoCaptchaContract | string;
|
|
11
10
|
provider: RandomProvider;
|
|
12
11
|
providerApi: ProviderApiInterface;
|
|
13
12
|
dappAccount: string;
|
|
14
13
|
web2: boolean;
|
|
15
14
|
getCaptchaChallenge(): Promise<CaptchaResponseBody>;
|
|
16
|
-
|
|
17
|
-
submitCaptchaSolution(signer: Signer, requestHash: string, datasetId: string, solutions: CaptchaSolution[], salt: string): Promise<TCaptchaSubmitResult>;
|
|
15
|
+
submitCaptchaSolution(signer: Signer, requestHash: string, solutions: CaptchaSolution[], salt: string, timestamp: string, providerTimestampSignature: string): Promise<TCaptchaSubmitResult>;
|
|
18
16
|
}
|
|
19
17
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/procaptcha/api.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/procaptcha/api.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EACV,mBAAmB,EAGnB,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,uBAAuB,GAAG,MAAM,CAAC;IAC3C,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,oBAAoB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpD,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,eAAe,EAAE,EAC5B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,MAAM,GACjC,OAAO,CAAC,oBAAoB,CAAC,CAAC;CAClC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { ContractSubmittableResult } from "@polkadot/api-contract/base/Contract";
|
|
2
|
+
import type { Hash } from "../index.js";
|
|
3
|
+
import type { CaptchaSolutionResponse } from "../provider/api.js";
|
|
4
|
+
export type TCaptchaSubmitResult = [
|
|
5
|
+
CaptchaSolutionResponse,
|
|
6
|
+
Hash,
|
|
7
|
+
ContractSubmittableResult?
|
|
8
|
+
];
|
|
4
9
|
//# sourceMappingURL=client.d.ts.map
|