@prosopo/types 0.2.13 → 0.2.15
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/cjs/config/config.cjs +56 -52
- package/dist/cjs/config/enumMap.cjs +2 -2
- package/dist/cjs/config/network.cjs +12 -12
- package/dist/cjs/contract/artifacts.cjs +2 -2
- package/dist/cjs/datasets/captcha.cjs +36 -36
- package/dist/cjs/datasets/dataset.cjs +16 -16
- package/dist/cjs/networks/index.cjs +4 -4
- package/dist/cjs/procaptcha/manager.cjs +7 -7
- package/dist/cjs/provider/api.cjs +20 -14
- package/dist/cjs/provider/argv.cjs +2 -3
- package/dist/config/config.d.ts +253 -425
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +59 -68
- package/dist/config/config.js.map +1 -1
- package/dist/config/enumMap.d.ts +2 -2
- package/dist/config/enumMap.d.ts.map +1 -1
- package/dist/config/enumMap.js +2 -2
- package/dist/config/enumMap.js.map +1 -1
- package/dist/config/index.js +0 -13
- package/dist/config/index.js.map +1 -1
- package/dist/config/network.d.ts +23 -23
- package/dist/config/network.d.ts.map +1 -1
- package/dist/config/network.js +13 -16
- package/dist/config/network.js.map +1 -1
- package/dist/contract/artifacts.d.ts +2 -2
- package/dist/contract/artifacts.d.ts.map +1 -1
- package/dist/contract/artifacts.js +1 -67
- package/dist/contract/artifacts.js.map +1 -1
- package/dist/contract/batch.d.ts +2 -2
- package/dist/contract/batch.d.ts.map +1 -1
- package/dist/contract/contract.d.ts +1 -1
- package/dist/contract/contract.d.ts.map +1 -1
- package/dist/contract/contract.js +0 -13
- package/dist/contract/contract.js.map +1 -1
- package/dist/contract/index.js +0 -13
- package/dist/contract/index.js.map +1 -1
- package/dist/contract/interface.js +0 -50
- package/dist/contract/interface.js.map +1 -1
- package/dist/contract/useWeight.d.ts +1 -1
- package/dist/contract/useWeight.d.ts.map +1 -1
- package/dist/datasets/assets.js +0 -13
- package/dist/datasets/assets.js.map +1 -1
- package/dist/datasets/captcha.d.ts +158 -158
- package/dist/datasets/captcha.d.ts.map +1 -1
- package/dist/datasets/captcha.js +37 -37
- package/dist/datasets/captcha.js.map +1 -1
- package/dist/datasets/dataset.d.ts +87 -88
- package/dist/datasets/dataset.d.ts.map +1 -1
- package/dist/datasets/dataset.js +17 -31
- package/dist/datasets/dataset.js.map +1 -1
- package/dist/datasets/index.js +0 -13
- package/dist/datasets/index.js.map +1 -1
- package/dist/datasets/merkle.js +0 -13
- package/dist/datasets/merkle.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -13
- package/dist/index.js.map +1 -1
- package/dist/networks/index.d.ts.map +1 -1
- package/dist/networks/index.js +4 -12
- package/dist/networks/index.js.map +1 -1
- package/dist/procaptcha/index.js +0 -13
- package/dist/procaptcha/index.js.map +1 -1
- package/dist/procaptcha/manager.d.ts +18 -23
- package/dist/procaptcha/manager.d.ts.map +1 -1
- package/dist/procaptcha/manager.js +8 -21
- package/dist/procaptcha/manager.js.map +1 -1
- package/dist/provider/accounts.d.ts +2 -3
- package/dist/provider/accounts.d.ts.map +1 -1
- package/dist/provider/api.d.ts +37 -27
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +18 -28
- package/dist/provider/api.js.map +1 -1
- package/dist/provider/argv.d.ts +2 -3
- package/dist/provider/argv.d.ts.map +1 -1
- package/dist/provider/argv.js +3 -16
- package/dist/provider/argv.js.map +1 -1
- package/dist/provider/index.js +0 -13
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/scheduler.js +0 -13
- package/dist/provider/scheduler.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/contracts/captcha/dist/build-extrinsic/captcha.cjs +0 -339
- package/dist/cjs/contracts/captcha/dist/contract-info/captcha.cjs +0 -6
- package/dist/cjs/contracts/captcha/dist/contracts/captcha.cjs +0 -79
- package/dist/cjs/contracts/captcha/dist/data/captcha.json.cjs +0 -3374
- package/dist/cjs/contracts/captcha/dist/event-data/captcha.json.cjs +0 -3
- package/dist/cjs/contracts/captcha/dist/events/captcha.cjs +0 -23
- package/dist/cjs/contracts/captcha/dist/index.cjs +0 -44
- package/dist/cjs/contracts/captcha/dist/mixed-methods/captcha.cjs +0 -470
- package/dist/cjs/contracts/captcha/dist/query/captcha.cjs +0 -468
- package/dist/cjs/contracts/captcha/dist/shared/utils.cjs +0 -31
- package/dist/cjs/contracts/captcha/dist/tx-sign-and-send/captcha.cjs +0 -426
- package/dist/cjs/contracts/captcha/dist/types-arguments/captcha.cjs +0 -62
package/dist/datasets/captcha.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { array, nativeEnum, number, object, string, undefined, union } from 'zod';
|
|
2
2
|
export var CaptchaTypes;
|
|
3
3
|
(function (CaptchaTypes) {
|
|
4
4
|
CaptchaTypes["SelectAll"] = "SelectAll";
|
|
@@ -13,60 +13,60 @@ export var CaptchaStates;
|
|
|
13
13
|
CaptchaStates["Solved"] = "solved";
|
|
14
14
|
CaptchaStates["Unsolved"] = "unsolved";
|
|
15
15
|
})(CaptchaStates || (CaptchaStates = {}));
|
|
16
|
-
export const CaptchaSchema =
|
|
17
|
-
captchaId:
|
|
18
|
-
captchaContentId:
|
|
19
|
-
salt:
|
|
20
|
-
solution:
|
|
21
|
-
unlabelled:
|
|
22
|
-
timeLimit:
|
|
16
|
+
export const CaptchaSchema = object({
|
|
17
|
+
captchaId: union([string(), undefined()]),
|
|
18
|
+
captchaContentId: union([string(), undefined()]),
|
|
19
|
+
salt: string().min(34),
|
|
20
|
+
solution: number().array().optional(),
|
|
21
|
+
unlabelled: number().array().optional(),
|
|
22
|
+
timeLimit: number().optional(),
|
|
23
23
|
});
|
|
24
|
-
export const CaptchaItemSchema =
|
|
25
|
-
hash:
|
|
26
|
-
data:
|
|
27
|
-
type:
|
|
24
|
+
export const CaptchaItemSchema = object({
|
|
25
|
+
hash: string(),
|
|
26
|
+
data: string(),
|
|
27
|
+
type: nativeEnum(CaptchaItemTypes),
|
|
28
28
|
});
|
|
29
29
|
export const HashedCaptchaItemSchema = CaptchaItemSchema.extend({
|
|
30
|
-
hash:
|
|
30
|
+
hash: string(),
|
|
31
31
|
});
|
|
32
32
|
export const LabelledItemSchema = HashedCaptchaItemSchema.extend({
|
|
33
|
-
label:
|
|
33
|
+
label: string(),
|
|
34
34
|
});
|
|
35
35
|
export const MaybeLabelledHashedItemSchema = HashedCaptchaItemSchema.extend({
|
|
36
|
-
label:
|
|
36
|
+
label: string().optional(),
|
|
37
37
|
});
|
|
38
38
|
export const SelectAllCaptchaSchemaRaw = CaptchaSchema.extend({
|
|
39
|
-
items:
|
|
40
|
-
target:
|
|
39
|
+
items: array(CaptchaItemSchema),
|
|
40
|
+
target: string(),
|
|
41
41
|
});
|
|
42
42
|
export const SelectAllCaptchaSchema = SelectAllCaptchaSchemaRaw.extend({
|
|
43
|
-
solution:
|
|
44
|
-
unlabelled:
|
|
43
|
+
solution: string().array().optional(),
|
|
44
|
+
unlabelled: string().array().optional(),
|
|
45
45
|
});
|
|
46
46
|
export const SelectAllCaptchaSchemaWithNumericSolution = SelectAllCaptchaSchema.extend({
|
|
47
|
-
solution:
|
|
48
|
-
unlabelled:
|
|
47
|
+
solution: number().array().optional(),
|
|
48
|
+
unlabelled: number().array().optional(),
|
|
49
49
|
});
|
|
50
|
-
export const CaptchasSchema =
|
|
51
|
-
export const CaptchasWithNumericSolutionSchema =
|
|
52
|
-
export const CaptchaSolutionSchema =
|
|
53
|
-
captchaId:
|
|
54
|
-
captchaContentId:
|
|
55
|
-
solution:
|
|
56
|
-
salt:
|
|
50
|
+
export const CaptchasSchema = array(SelectAllCaptchaSchemaRaw);
|
|
51
|
+
export const CaptchasWithNumericSolutionSchema = array(SelectAllCaptchaSchemaWithNumericSolution);
|
|
52
|
+
export const CaptchaSolutionSchema = object({
|
|
53
|
+
captchaId: string(),
|
|
54
|
+
captchaContentId: string(),
|
|
55
|
+
solution: string().array(),
|
|
56
|
+
salt: string().min(34),
|
|
57
57
|
});
|
|
58
|
-
export const CaptchaSolutionArraySchema =
|
|
59
|
-
export const DataSchema =
|
|
60
|
-
items:
|
|
58
|
+
export const CaptchaSolutionArraySchema = array(CaptchaSolutionSchema);
|
|
59
|
+
export const DataSchema = object({
|
|
60
|
+
items: array(MaybeLabelledHashedItemSchema),
|
|
61
61
|
});
|
|
62
|
-
export const LabelledDataSchema =
|
|
63
|
-
items:
|
|
62
|
+
export const LabelledDataSchema = object({
|
|
63
|
+
items: array(LabelledItemSchema),
|
|
64
64
|
});
|
|
65
|
-
export const CaptchasContainerSchema =
|
|
65
|
+
export const CaptchasContainerSchema = object({
|
|
66
66
|
captchas: CaptchasSchema,
|
|
67
|
-
format:
|
|
67
|
+
format: nativeEnum(CaptchaTypes),
|
|
68
68
|
});
|
|
69
|
-
export const LabelsContainerSchema =
|
|
70
|
-
labels:
|
|
69
|
+
export const LabelsContainerSchema = object({
|
|
70
|
+
labels: array(string()),
|
|
71
71
|
});
|
|
72
72
|
//# sourceMappingURL=captcha.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../src/datasets/captcha.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../src/datasets/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAmB,MAAM,KAAK,CAAA;AAGlG,MAAM,CAAN,IAAY,YAEX;AAFD,WAAY,YAAY;IACpB,uCAAuB,CAAA;AAC3B,CAAC,EAFW,YAAY,KAAZ,YAAY,QAEvB;AACD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,mCAAe,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AACD,MAAM,C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AQ,EAAE,cAAc;IACxB,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;CACnC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;IACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1B,CAAC,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Captcha, CaptchaTypes, CaptchaWithoutId } from './captcha.js';
|
|
2
|
-
import { Hash } from '@prosopo/captcha-contract';
|
|
3
|
-
import { z } from 'zod';
|
|
2
|
+
import { Hash } from '@prosopo/captcha-contract/types-arguments';
|
|
4
3
|
export type DatasetBase = {
|
|
5
4
|
datasetId?: Hash;
|
|
6
5
|
datasetContentId?: Hash;
|
|
@@ -25,21 +24,21 @@ export type DatasetWithIds = {
|
|
|
25
24
|
export interface DatasetWithIdsAndTree extends DatasetWithIds {
|
|
26
25
|
contentTree: string[][];
|
|
27
26
|
}
|
|
28
|
-
export declare const DatasetSchema:
|
|
29
|
-
datasetId:
|
|
30
|
-
datasetContentId:
|
|
31
|
-
captchas:
|
|
32
|
-
captchaId:
|
|
33
|
-
captchaContentId:
|
|
34
|
-
salt:
|
|
35
|
-
solution:
|
|
36
|
-
unlabelled:
|
|
37
|
-
timeLimit:
|
|
38
|
-
items:
|
|
39
|
-
hash:
|
|
40
|
-
data:
|
|
41
|
-
type:
|
|
42
|
-
}, "strip",
|
|
27
|
+
export declare const DatasetSchema: import("zod").ZodObject<{
|
|
28
|
+
datasetId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
datasetContentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
captchas: import("zod").ZodArray<import("zod").ZodObject<{
|
|
31
|
+
captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
32
|
+
captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
33
|
+
salt: import("zod").ZodString;
|
|
34
|
+
solution: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
|
|
35
|
+
unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
|
|
36
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
37
|
+
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
38
|
+
hash: import("zod").ZodString;
|
|
39
|
+
data: import("zod").ZodString;
|
|
40
|
+
type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
|
|
41
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
43
42
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
44
43
|
data: string;
|
|
45
44
|
hash: string;
|
|
@@ -48,8 +47,8 @@ export declare const DatasetSchema: z.ZodObject<{
|
|
|
48
47
|
data: string;
|
|
49
48
|
hash: string;
|
|
50
49
|
}>, "many">;
|
|
51
|
-
target:
|
|
52
|
-
}, "strip",
|
|
50
|
+
target: import("zod").ZodString;
|
|
51
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
53
52
|
items: {
|
|
54
53
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
55
54
|
data: string;
|
|
@@ -76,11 +75,11 @@ export declare const DatasetSchema: z.ZodObject<{
|
|
|
76
75
|
unlabelled?: number[] | undefined;
|
|
77
76
|
timeLimit?: number | undefined;
|
|
78
77
|
}>, "many">;
|
|
79
|
-
format:
|
|
80
|
-
solutionTree:
|
|
81
|
-
contentTree:
|
|
82
|
-
timeLimit:
|
|
83
|
-
}, "strip",
|
|
78
|
+
format: import("zod").ZodNativeEnum<typeof CaptchaTypes>;
|
|
79
|
+
solutionTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
80
|
+
contentTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
81
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
82
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
84
83
|
captchas: {
|
|
85
84
|
items: {
|
|
86
85
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
@@ -123,19 +122,19 @@ export declare const DatasetSchema: z.ZodObject<{
|
|
|
123
122
|
contentTree?: string[][] | undefined;
|
|
124
123
|
timeLimit?: number | undefined;
|
|
125
124
|
}>;
|
|
126
|
-
export declare const DatasetWithNumericSolutionSchema:
|
|
127
|
-
timeLimit:
|
|
128
|
-
format:
|
|
129
|
-
datasetId:
|
|
130
|
-
datasetContentId:
|
|
131
|
-
solutionTree:
|
|
132
|
-
contentTree:
|
|
133
|
-
captchas:
|
|
134
|
-
items:
|
|
135
|
-
hash:
|
|
136
|
-
data:
|
|
137
|
-
type:
|
|
138
|
-
}, "strip",
|
|
125
|
+
export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
|
|
126
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
127
|
+
format: import("zod").ZodNativeEnum<typeof CaptchaTypes>;
|
|
128
|
+
datasetId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
129
|
+
datasetContentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
+
solutionTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
131
|
+
contentTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
132
|
+
captchas: import("zod").ZodArray<import("zod").ZodObject<{
|
|
133
|
+
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
134
|
+
hash: import("zod").ZodString;
|
|
135
|
+
data: import("zod").ZodString;
|
|
136
|
+
type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
|
|
137
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
139
138
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
140
139
|
data: string;
|
|
141
140
|
hash: string;
|
|
@@ -144,14 +143,14 @@ export declare const DatasetWithNumericSolutionSchema: z.ZodObject<{
|
|
|
144
143
|
data: string;
|
|
145
144
|
hash: string;
|
|
146
145
|
}>, "many">;
|
|
147
|
-
captchaId:
|
|
148
|
-
captchaContentId:
|
|
149
|
-
salt:
|
|
150
|
-
timeLimit:
|
|
151
|
-
target:
|
|
152
|
-
solution:
|
|
153
|
-
unlabelled:
|
|
154
|
-
}, "strip",
|
|
146
|
+
captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
147
|
+
captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
148
|
+
salt: import("zod").ZodString;
|
|
149
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
150
|
+
target: import("zod").ZodString;
|
|
151
|
+
solution: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
|
|
152
|
+
unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
|
|
153
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
155
154
|
items: {
|
|
156
155
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
157
156
|
data: string;
|
|
@@ -178,7 +177,7 @@ export declare const DatasetWithNumericSolutionSchema: z.ZodObject<{
|
|
|
178
177
|
solution?: number[] | undefined;
|
|
179
178
|
unlabelled?: number[] | undefined;
|
|
180
179
|
}>, "many">;
|
|
181
|
-
}, "strip",
|
|
180
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
182
181
|
captchas: {
|
|
183
182
|
items: {
|
|
184
183
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
@@ -221,15 +220,15 @@ export declare const DatasetWithNumericSolutionSchema: z.ZodObject<{
|
|
|
221
220
|
solutionTree?: string[][] | undefined;
|
|
222
221
|
contentTree?: string[][] | undefined;
|
|
223
222
|
}>;
|
|
224
|
-
export declare const DatasetWithIdsSchema:
|
|
225
|
-
datasetId:
|
|
226
|
-
datasetContentId:
|
|
227
|
-
captchas:
|
|
228
|
-
items:
|
|
229
|
-
hash:
|
|
230
|
-
data:
|
|
231
|
-
type:
|
|
232
|
-
}, "strip",
|
|
223
|
+
export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
|
|
224
|
+
datasetId: import("zod").ZodString;
|
|
225
|
+
datasetContentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
226
|
+
captchas: import("zod").ZodArray<import("zod").ZodObject<{
|
|
227
|
+
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
228
|
+
hash: import("zod").ZodString;
|
|
229
|
+
data: import("zod").ZodString;
|
|
230
|
+
type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
|
|
231
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
233
232
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
234
233
|
data: string;
|
|
235
234
|
hash: string;
|
|
@@ -238,14 +237,14 @@ export declare const DatasetWithIdsSchema: z.ZodObject<{
|
|
|
238
237
|
data: string;
|
|
239
238
|
hash: string;
|
|
240
239
|
}>, "many">;
|
|
241
|
-
captchaId:
|
|
242
|
-
captchaContentId:
|
|
243
|
-
salt:
|
|
244
|
-
timeLimit:
|
|
245
|
-
target:
|
|
246
|
-
solution:
|
|
247
|
-
unlabelled:
|
|
248
|
-
}, "strip",
|
|
240
|
+
captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
241
|
+
captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
242
|
+
salt: import("zod").ZodString;
|
|
243
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
244
|
+
target: import("zod").ZodString;
|
|
245
|
+
solution: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
246
|
+
unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
247
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
249
248
|
items: {
|
|
250
249
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
251
250
|
data: string;
|
|
@@ -272,10 +271,10 @@ export declare const DatasetWithIdsSchema: z.ZodObject<{
|
|
|
272
271
|
solution?: string[] | undefined;
|
|
273
272
|
unlabelled?: string[] | undefined;
|
|
274
273
|
}>, "many">;
|
|
275
|
-
format:
|
|
276
|
-
solutionTree:
|
|
277
|
-
contentTree:
|
|
278
|
-
}, "strip",
|
|
274
|
+
format: import("zod").ZodNativeEnum<typeof CaptchaTypes>;
|
|
275
|
+
solutionTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
276
|
+
contentTree: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">>;
|
|
277
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
279
278
|
captchas: {
|
|
280
279
|
items: {
|
|
281
280
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
@@ -316,13 +315,13 @@ export declare const DatasetWithIdsSchema: z.ZodObject<{
|
|
|
316
315
|
solutionTree?: string[][] | undefined;
|
|
317
316
|
contentTree?: string[][] | undefined;
|
|
318
317
|
}>;
|
|
319
|
-
export declare const DatasetWithIdsAndTreeSchema:
|
|
320
|
-
captchas:
|
|
321
|
-
items:
|
|
322
|
-
hash:
|
|
323
|
-
data:
|
|
324
|
-
type:
|
|
325
|
-
}, "strip",
|
|
318
|
+
export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
|
|
319
|
+
captchas: import("zod").ZodArray<import("zod").ZodObject<{
|
|
320
|
+
items: import("zod").ZodArray<import("zod").ZodObject<{
|
|
321
|
+
hash: import("zod").ZodString;
|
|
322
|
+
data: import("zod").ZodString;
|
|
323
|
+
type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
|
|
324
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
326
325
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
327
326
|
data: string;
|
|
328
327
|
hash: string;
|
|
@@ -331,14 +330,14 @@ export declare const DatasetWithIdsAndTreeSchema: z.ZodObject<{
|
|
|
331
330
|
data: string;
|
|
332
331
|
hash: string;
|
|
333
332
|
}>, "many">;
|
|
334
|
-
captchaId:
|
|
335
|
-
captchaContentId:
|
|
336
|
-
salt:
|
|
337
|
-
timeLimit:
|
|
338
|
-
target:
|
|
339
|
-
solution:
|
|
340
|
-
unlabelled:
|
|
341
|
-
}, "strip",
|
|
333
|
+
captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
334
|
+
captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
|
|
335
|
+
salt: import("zod").ZodString;
|
|
336
|
+
timeLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
337
|
+
target: import("zod").ZodString;
|
|
338
|
+
solution: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
339
|
+
unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
340
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
342
341
|
items: {
|
|
343
342
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
344
343
|
data: string;
|
|
@@ -365,12 +364,12 @@ export declare const DatasetWithIdsAndTreeSchema: z.ZodObject<{
|
|
|
365
364
|
solution?: string[] | undefined;
|
|
366
365
|
unlabelled?: string[] | undefined;
|
|
367
366
|
}>, "many">;
|
|
368
|
-
format:
|
|
369
|
-
datasetId:
|
|
370
|
-
datasetContentId:
|
|
371
|
-
solutionTree:
|
|
372
|
-
contentTree:
|
|
373
|
-
}, "strip",
|
|
367
|
+
format: import("zod").ZodNativeEnum<typeof CaptchaTypes>;
|
|
368
|
+
datasetId: import("zod").ZodString;
|
|
369
|
+
datasetContentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
370
|
+
solutionTree: import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">;
|
|
371
|
+
contentTree: import("zod").ZodArray<import("zod").ZodArray<import("zod").ZodString, "many">, "many">;
|
|
372
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
374
373
|
captchas: {
|
|
375
374
|
items: {
|
|
376
375
|
type: import("./captcha.js").CaptchaItemTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,OAAO,EACP,YAAY,EACZ,gBAAgB,EAInB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dataset.d.ts","sourceRoot":"","sources":["../../src/datasets/dataset.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,OAAO,EACP,YAAY,EACZ,gBAAgB,EAInB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,2CAA2C,CAAA;AAGhE,MAAM,MAAM,WAAW,GAAG;IACtB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,gBAAgB,CAAC,EAAE,IAAI,CAAA;IACvB,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,WAAW,OAAQ,SAAQ,WAAW;IACxC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,OAAO,EAAE,CAAA;CAC3C;AAED,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC3C,QAAQ,EAAE,gBAAgB,EAAE,CAAA;CAC/B;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,SAAS,EAAE,IAAI,CAAA;IACf,gBAAgB,EAAE,IAAI,CAAA;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IACzD,WAAW,EAAE,MAAM,EAAE,EAAE,CAAA;CAC1B;AAID,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQxB,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE3C,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAA"}
|
package/dist/datasets/dataset.js
CHANGED
|
@@ -1,41 +1,27 @@
|
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
1
|
import { CaptchaTypes, CaptchasSchema, CaptchasWithNumericSolutionSchema, SelectAllCaptchaSchema, } from './captcha.js';
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
datasetContentId: z.string().optional(),
|
|
2
|
+
import { array, nativeEnum, number, object, string } from 'zod';
|
|
3
|
+
export const DatasetSchema = object({
|
|
4
|
+
datasetId: string().optional(),
|
|
5
|
+
datasetContentId: string().optional(),
|
|
20
6
|
captchas: CaptchasSchema,
|
|
21
|
-
format:
|
|
22
|
-
solutionTree:
|
|
23
|
-
contentTree:
|
|
24
|
-
timeLimit:
|
|
7
|
+
format: nativeEnum(CaptchaTypes),
|
|
8
|
+
solutionTree: array(array(string())).optional(),
|
|
9
|
+
contentTree: array(array(string())).optional(),
|
|
10
|
+
timeLimit: number().optional(),
|
|
25
11
|
});
|
|
26
12
|
export const DatasetWithNumericSolutionSchema = DatasetSchema.extend({
|
|
27
13
|
captchas: CaptchasWithNumericSolutionSchema,
|
|
28
14
|
});
|
|
29
|
-
export const DatasetWithIdsSchema =
|
|
30
|
-
datasetId:
|
|
31
|
-
datasetContentId:
|
|
32
|
-
captchas:
|
|
33
|
-
format:
|
|
34
|
-
solutionTree:
|
|
35
|
-
contentTree:
|
|
15
|
+
export const DatasetWithIdsSchema = object({
|
|
16
|
+
datasetId: string(),
|
|
17
|
+
datasetContentId: string().optional(),
|
|
18
|
+
captchas: array(SelectAllCaptchaSchema),
|
|
19
|
+
format: nativeEnum(CaptchaTypes),
|
|
20
|
+
solutionTree: array(array(string())).optional(),
|
|
21
|
+
contentTree: array(array(string())).optional(),
|
|
36
22
|
});
|
|
37
23
|
export const DatasetWithIdsAndTreeSchema = DatasetWithIdsSchema.extend({
|
|
38
|
-
solutionTree:
|
|
39
|
-
contentTree:
|
|
24
|
+
solutionTree: array(array(string())),
|
|
25
|
+
contentTree: array(array(string())),
|
|
40
26
|
});
|
|
41
27
|
//# sourceMappingURL=dataset.js.map
|
|
@@ -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":"AAaA,OAAO,EAEH,YAAY,EAEZ,cAAc,EACd,iCAAiC,EACjC,sBAAsB,GACzB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AAiC/D,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC;IAChC,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;CACjC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,aAAa,CAAC,MAAM,CAAC;IACjE,QAAQ,EAAE,iCAAiC;CAC9C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IACvC,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;CACjD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACnE,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;CACtC,CAAC,CAAA"}
|
package/dist/datasets/index.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
1
|
export * from './captcha.js';
|
|
15
2
|
export * from './dataset.js';
|
|
16
3
|
export * from './merkle.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/datasets/index.ts"],"names":[],"mappings":"AAaA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
package/dist/datasets/merkle.js
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
1
|
export {};
|
|
15
2
|
//# sourceMappingURL=merkle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merkle.js","sourceRoot":"","sources":["../../src/datasets/merkle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merkle.js","sourceRoot":"","sources":["../../src/datasets/merkle.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export * from './datasets/index.js';
|
|
|
4
4
|
export * from './provider/index.js';
|
|
5
5
|
export * from './procaptcha/index.js';
|
|
6
6
|
export { default as networks } from './networks/index.js';
|
|
7
|
-
export type { Hash, AccountId } from '@prosopo/captcha-contract';
|
|
7
|
+
export type { Hash, AccountId } from '@prosopo/captcha-contract/types-arguments';
|
|
8
8
|
//# 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,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACzD,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACzD,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
// Copyright 2021-2023 Prosopo (UK) Ltd.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
1
|
export * from './config/index.js';
|
|
15
2
|
export * from './contract/index.js';
|
|
16
3
|
export * from './datasets/index.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;8BAQ5C,0BAA0B;AAA7C,wBA8BC"}
|
package/dist/networks/index.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { NetworkNamesSchema, NetworkPairTypeSchema } from '../config/network.js';
|
|
2
2
|
const pairTypeSr25519 = NetworkPairTypeSchema.parse('sr25519');
|
|
3
3
|
const getContractAddress = (defaultAddress) => {
|
|
4
|
-
return
|
|
5
|
-
process.env.PROSOPO_CONTRACT_ADDRESS ||
|
|
6
|
-
process.env.REACT_APP_PROSOPO_CONTRACT_ADDRESS ||
|
|
7
|
-
defaultAddress ||
|
|
8
|
-
'');
|
|
4
|
+
return process.env.PROSOPO_CONTRACT_ADDRESS ? process.env.PROSOPO_CONTRACT_ADDRESS : defaultAddress || '';
|
|
9
5
|
};
|
|
10
6
|
export default () => {
|
|
11
7
|
return {
|
|
12
8
|
[NetworkNamesSchema.Values.development]: {
|
|
13
|
-
endpoint: process.env.
|
|
9
|
+
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT || 'ws://127.0.0.1:9944',
|
|
14
10
|
contract: {
|
|
15
11
|
name: 'captcha',
|
|
16
12
|
address: getContractAddress('CONTRACT_NOT_DEPLOYED'),
|
|
@@ -19,9 +15,7 @@ export default () => {
|
|
|
19
15
|
ss58Format: 42,
|
|
20
16
|
},
|
|
21
17
|
[NetworkNamesSchema.Values.rococo]: {
|
|
22
|
-
endpoint: process.env.
|
|
23
|
-
process.env.SUBSTRATE_NODE_URL ||
|
|
24
|
-
'wss://rococo-contracts-rpc.polkadot.io:443',
|
|
18
|
+
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT || 'wss://rococo-contracts-rpc.polkadot.io:443',
|
|
25
19
|
contract: {
|
|
26
20
|
name: 'captcha',
|
|
27
21
|
address: getContractAddress('5HiVWQhJrysNcFNEWf2crArKht16zrhro3FcekVWocyQjx5u'),
|
|
@@ -30,9 +24,7 @@ export default () => {
|
|
|
30
24
|
ss58Format: 42,
|
|
31
25
|
},
|
|
32
26
|
[NetworkNamesSchema.Values.shiden]: {
|
|
33
|
-
endpoint: process.env.
|
|
34
|
-
process.env.SUBSTRATE_NODE_URL ||
|
|
35
|
-
'wss://shiden.public.blastapi.io',
|
|
27
|
+
endpoint: process.env.PROSOPO_SUBSTRATE_ENDPOINT || 'wss://shiden.public.blastapi.io',
|
|
36
28
|
contract: {
|
|
37
29
|
address: getContractAddress('XpRox5bNg6YV8BHafsuHQ3b8i7gSq3GKPeYLA1b8EZwrDb3'),
|
|
38
30
|
name: 'captcha',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAGhF,MAAM,eAAe,GAAG,qBAAqB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAE9D,MAAM,kBAAkB,GAAG,CAAC,cAAuB,EAAE,EAAE;IACnD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/networks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAGhF,MAAM,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