@prosopo/types 3.0.3 → 3.0.5
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/CHANGELOG.md +34 -0
- package/dist/api/api.js +1 -2
- package/dist/api/index.js +5 -3
- package/dist/api/params.js +43 -41
- package/dist/cjs/config/config.cjs +2 -2
- package/dist/cjs/index.cjs +2 -0
- package/dist/cjs/provider/api.cjs +6 -2
- package/dist/cjs/provider/index.cjs +2 -0
- package/dist/client/captchaType/captchaType.js +11 -9
- package/dist/client/captchaType/captchaTypeSpec.js +3 -2
- package/dist/client/index.js +18 -5
- package/dist/client/settings.js +20 -17
- package/dist/client/user.js +31 -18
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +167 -153
- package/dist/config/frictionless.js +7 -5
- package/dist/config/index.js +32 -5
- package/dist/config/network.js +9 -7
- package/dist/config/timeouts.js +19 -10
- package/dist/datasets/assets.js +1 -2
- package/dist/datasets/captcha.js +122 -94
- package/dist/datasets/dataset.js +28 -23
- package/dist/datasets/index.js +36 -5
- package/dist/datasets/merkle.js +1 -2
- package/dist/index.js +129 -10
- package/dist/keyring/index.js +2 -3
- package/dist/keyring/keyring/types.js +1 -2
- package/dist/keyring/pair/types.js +1 -2
- package/dist/procaptcha/api.js +1 -2
- package/dist/procaptcha/client.js +1 -2
- package/dist/procaptcha/collector.js +1 -2
- package/dist/procaptcha/index.js +19 -8
- package/dist/procaptcha/manager.js +7 -4
- package/dist/procaptcha/props.js +1 -2
- package/dist/procaptcha/token.js +77 -62
- package/dist/procaptcha/utils.js +1 -2
- package/dist/procaptcha-bundle/index.js +1 -2
- package/dist/procaptcha-frictionless/index.js +1 -2
- package/dist/procaptcha-frictionless/props.js +1 -2
- package/dist/provider/accounts.js +1 -2
- package/dist/provider/api.d.ts +3 -0
- package/dist/provider/api.d.ts.map +1 -1
- package/dist/provider/api.js +208 -143
- package/dist/provider/index.js +29 -4
- package/dist/provider/scheduler.js +18 -15
- package/package.json +18 -15
- package/vite.cjs.config.ts +4 -1
- package/vite.esm.config.ts +20 -0
- package/dist/api/api.js.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/params.js.map +0 -1
- package/dist/client/captchaType/captchaType.js.map +0 -1
- package/dist/client/captchaType/captchaTypeSpec.js.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/client/settings.js.map +0 -1
- package/dist/client/user.js.map +0 -1
- package/dist/config/config.js.map +0 -1
- package/dist/config/enumMap.js +0 -6
- package/dist/config/enumMap.js.map +0 -1
- package/dist/config/frictionless.js.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/network.js.map +0 -1
- package/dist/config/timeouts.js.map +0 -1
- package/dist/datasets/assets.js.map +0 -1
- package/dist/datasets/captcha.js.map +0 -1
- package/dist/datasets/dataset.js.map +0 -1
- package/dist/datasets/index.js.map +0 -1
- package/dist/datasets/merkle.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/keyring/index.js.map +0 -1
- package/dist/keyring/keyring/types.js.map +0 -1
- package/dist/keyring/pair/types.js.map +0 -1
- package/dist/procaptcha/api.js.map +0 -1
- package/dist/procaptcha/client.js.map +0 -1
- package/dist/procaptcha/collector.js.map +0 -1
- package/dist/procaptcha/index.js.map +0 -1
- package/dist/procaptcha/manager.js.map +0 -1
- package/dist/procaptcha/props.js.map +0 -1
- package/dist/procaptcha/token.js.map +0 -1
- package/dist/procaptcha/utils.js.map +0 -1
- package/dist/procaptcha-bundle/index.js.map +0 -1
- package/dist/procaptcha-frictionless/index.js.map +0 -1
- package/dist/procaptcha-frictionless/props.js.map +0 -1
- package/dist/provider/accounts.js.map +0 -1
- package/dist/provider/api.js.map +0 -1
- package/dist/provider/index.js.map +0 -1
- package/dist/provider/scheduler.js.map +0 -1
package/dist/datasets/captcha.js
CHANGED
|
@@ -1,108 +1,136 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
})(CaptchaTypes ||
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})(CaptchaItemTypes ||
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})(CaptchaStates ||
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})(CaptchaStatus ||
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})(StoredStatusNames ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})(GovernanceStatus ||
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
})(DappPayee ||
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
import { number, custom, object, string, union, undefined as _undefined, nativeEnum, array } from "zod";
|
|
2
|
+
var CaptchaTypes = /* @__PURE__ */ ((CaptchaTypes2) => {
|
|
3
|
+
CaptchaTypes2["SelectAll"] = "SelectAll";
|
|
4
|
+
return CaptchaTypes2;
|
|
5
|
+
})(CaptchaTypes || {});
|
|
6
|
+
var CaptchaItemTypes = /* @__PURE__ */ ((CaptchaItemTypes2) => {
|
|
7
|
+
CaptchaItemTypes2["Text"] = "text";
|
|
8
|
+
CaptchaItemTypes2["Image"] = "image";
|
|
9
|
+
return CaptchaItemTypes2;
|
|
10
|
+
})(CaptchaItemTypes || {});
|
|
11
|
+
var CaptchaStates = /* @__PURE__ */ ((CaptchaStates2) => {
|
|
12
|
+
CaptchaStates2["Solved"] = "solved";
|
|
13
|
+
CaptchaStates2["Unsolved"] = "unsolved";
|
|
14
|
+
return CaptchaStates2;
|
|
15
|
+
})(CaptchaStates || {});
|
|
16
|
+
var CaptchaStatus = /* @__PURE__ */ ((CaptchaStatus2) => {
|
|
17
|
+
CaptchaStatus2["pending"] = "Pending";
|
|
18
|
+
CaptchaStatus2["approved"] = "Approved";
|
|
19
|
+
CaptchaStatus2["disapproved"] = "Disapproved";
|
|
20
|
+
return CaptchaStatus2;
|
|
21
|
+
})(CaptchaStatus || {});
|
|
22
|
+
var StoredStatusNames = /* @__PURE__ */ ((StoredStatusNames2) => {
|
|
23
|
+
StoredStatusNames2["notStored"] = "notStored";
|
|
24
|
+
StoredStatusNames2["userSubmitted"] = "userSubmitted";
|
|
25
|
+
StoredStatusNames2["serverChecked"] = "serverChecked";
|
|
26
|
+
StoredStatusNames2["stored"] = "stored";
|
|
27
|
+
return StoredStatusNames2;
|
|
28
|
+
})(StoredStatusNames || {});
|
|
29
|
+
var GovernanceStatus = /* @__PURE__ */ ((GovernanceStatus2) => {
|
|
30
|
+
GovernanceStatus2["active"] = "Active";
|
|
31
|
+
GovernanceStatus2["inactive"] = "Inactive";
|
|
32
|
+
return GovernanceStatus2;
|
|
33
|
+
})(GovernanceStatus || {});
|
|
34
|
+
var DappPayee = /* @__PURE__ */ ((DappPayee2) => {
|
|
35
|
+
DappPayee2["provider"] = "Provider";
|
|
36
|
+
DappPayee2["dapp"] = "Dapp";
|
|
37
|
+
DappPayee2["any"] = "Any";
|
|
38
|
+
return DappPayee2;
|
|
39
|
+
})(DappPayee || {});
|
|
40
|
+
const TimestampSchema = number();
|
|
41
|
+
const POW_SEPARATOR = "___";
|
|
42
|
+
const PowChallengeIdSchema = custom((val) => {
|
|
43
|
+
const valSplit = val.split(POW_SEPARATOR);
|
|
44
|
+
try {
|
|
45
|
+
Number.parseInt(valSplit[0]);
|
|
46
|
+
return valSplit.length === 4;
|
|
47
|
+
} catch (e) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
51
50
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
const CaptchaSchema = object({
|
|
52
|
+
captchaId: union([string(), _undefined()]),
|
|
53
|
+
captchaContentId: union([string(), _undefined()]),
|
|
54
|
+
salt: string().min(34),
|
|
55
|
+
solution: number().array().optional(),
|
|
56
|
+
unlabelled: number().array().optional(),
|
|
57
|
+
timeLimit: number().optional()
|
|
59
58
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
const CaptchaItemSchema = object({
|
|
60
|
+
hash: string(),
|
|
61
|
+
data: string(),
|
|
62
|
+
type: nativeEnum(CaptchaItemTypes)
|
|
64
63
|
});
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const HashedCaptchaItemSchema = CaptchaItemSchema.extend({
|
|
65
|
+
hash: string()
|
|
67
66
|
});
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
const LabelledItemSchema = HashedCaptchaItemSchema.extend({
|
|
68
|
+
label: string()
|
|
70
69
|
});
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
const MaybeLabelledHashedItemSchema = HashedCaptchaItemSchema.extend({
|
|
71
|
+
label: string().optional()
|
|
73
72
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
const SelectAllCaptchaSchemaRaw = CaptchaSchema.extend({
|
|
74
|
+
items: array(CaptchaItemSchema),
|
|
75
|
+
target: string()
|
|
77
76
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const SelectAllCaptchaSchema = SelectAllCaptchaSchemaRaw.extend({
|
|
78
|
+
solution: string().array().optional(),
|
|
79
|
+
unlabelled: string().array().optional()
|
|
81
80
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
const SelectAllCaptchaSchemaWithNumericSolution = SelectAllCaptchaSchema.extend({
|
|
82
|
+
solution: number().array().optional(),
|
|
83
|
+
unlabelled: number().array().optional()
|
|
85
84
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
const CaptchasSchema = array(SelectAllCaptchaSchemaRaw);
|
|
86
|
+
const CaptchasWithNumericSolutionSchema = array(
|
|
87
|
+
SelectAllCaptchaSchemaWithNumericSolution
|
|
88
|
+
);
|
|
89
|
+
const CaptchaSolutionSchema = object({
|
|
90
|
+
captchaId: string(),
|
|
91
|
+
captchaContentId: string(),
|
|
92
|
+
solution: string().array(),
|
|
93
|
+
salt: string().min(34)
|
|
93
94
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
const CaptchaSolutionArraySchema = array(CaptchaSolutionSchema);
|
|
96
|
+
const DataSchema = object({
|
|
97
|
+
items: array(MaybeLabelledHashedItemSchema)
|
|
97
98
|
});
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
const LabelledDataSchema = object({
|
|
100
|
+
items: array(LabelledItemSchema)
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
const CaptchasContainerSchema = object({
|
|
103
|
+
captchas: CaptchasSchema,
|
|
104
|
+
format: nativeEnum(CaptchaTypes)
|
|
104
105
|
});
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
const LabelsContainerSchema = object({
|
|
107
|
+
labels: array(string())
|
|
107
108
|
});
|
|
108
|
-
|
|
109
|
+
export {
|
|
110
|
+
CaptchaItemSchema,
|
|
111
|
+
CaptchaItemTypes,
|
|
112
|
+
CaptchaSchema,
|
|
113
|
+
CaptchaSolutionArraySchema,
|
|
114
|
+
CaptchaSolutionSchema,
|
|
115
|
+
CaptchaStates,
|
|
116
|
+
CaptchaStatus,
|
|
117
|
+
CaptchaTypes,
|
|
118
|
+
CaptchasContainerSchema,
|
|
119
|
+
CaptchasSchema,
|
|
120
|
+
CaptchasWithNumericSolutionSchema,
|
|
121
|
+
DappPayee,
|
|
122
|
+
DataSchema,
|
|
123
|
+
GovernanceStatus,
|
|
124
|
+
HashedCaptchaItemSchema,
|
|
125
|
+
LabelledDataSchema,
|
|
126
|
+
LabelledItemSchema,
|
|
127
|
+
LabelsContainerSchema,
|
|
128
|
+
MaybeLabelledHashedItemSchema,
|
|
129
|
+
POW_SEPARATOR,
|
|
130
|
+
PowChallengeIdSchema,
|
|
131
|
+
SelectAllCaptchaSchema,
|
|
132
|
+
SelectAllCaptchaSchemaRaw,
|
|
133
|
+
SelectAllCaptchaSchemaWithNumericSolution,
|
|
134
|
+
StoredStatusNames,
|
|
135
|
+
TimestampSchema
|
|
136
|
+
};
|
package/dist/datasets/dataset.js
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CaptchaTypes, CaptchasSchema, CaptchasWithNumericSolutionSchema, SelectAllCaptchaSchema
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { object, number, array, string, nativeEnum } from "zod";
|
|
2
|
+
import { CaptchaTypes, CaptchasSchema, CaptchasWithNumericSolutionSchema, SelectAllCaptchaSchema } from "./captcha.js";
|
|
3
|
+
const DatasetSchema = object({
|
|
4
|
+
datasetId: string().optional(),
|
|
5
|
+
datasetContentId: string().optional(),
|
|
6
|
+
captchas: CaptchasSchema,
|
|
7
|
+
format: nativeEnum(CaptchaTypes),
|
|
8
|
+
solutionTree: array(array(string())).optional(),
|
|
9
|
+
contentTree: array(array(string())).optional(),
|
|
10
|
+
timeLimit: number().optional()
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const DatasetWithNumericSolutionSchema = DatasetSchema.extend({
|
|
13
|
+
captchas: CaptchasWithNumericSolutionSchema
|
|
14
14
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
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()
|
|
22
22
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const DatasetWithIdsAndTreeSchema = DatasetWithIdsSchema.extend({
|
|
24
|
+
solutionTree: array(array(string())),
|
|
25
|
+
contentTree: array(array(string()))
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
export {
|
|
28
|
+
DatasetSchema,
|
|
29
|
+
DatasetWithIdsAndTreeSchema,
|
|
30
|
+
DatasetWithIdsSchema,
|
|
31
|
+
DatasetWithNumericSolutionSchema
|
|
32
|
+
};
|
package/dist/datasets/index.js
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CaptchaItemSchema, CaptchaItemTypes, CaptchaSchema, CaptchaSolutionArraySchema, CaptchaSolutionSchema, CaptchaStates, CaptchaStatus, CaptchaTypes, CaptchasContainerSchema, CaptchasSchema, CaptchasWithNumericSolutionSchema, DappPayee, DataSchema, GovernanceStatus, HashedCaptchaItemSchema, LabelledDataSchema, LabelledItemSchema, LabelsContainerSchema, MaybeLabelledHashedItemSchema, POW_SEPARATOR, PowChallengeIdSchema, SelectAllCaptchaSchema, SelectAllCaptchaSchemaRaw, SelectAllCaptchaSchemaWithNumericSolution, StoredStatusNames, TimestampSchema } from "./captcha.js";
|
|
2
|
+
import { DatasetSchema, DatasetWithIdsAndTreeSchema, DatasetWithIdsSchema, DatasetWithNumericSolutionSchema } from "./dataset.js";
|
|
3
|
+
import "./merkle.js";
|
|
4
|
+
import "./assets.js";
|
|
5
|
+
export {
|
|
6
|
+
CaptchaItemSchema,
|
|
7
|
+
CaptchaItemTypes,
|
|
8
|
+
CaptchaSchema,
|
|
9
|
+
CaptchaSolutionArraySchema,
|
|
10
|
+
CaptchaSolutionSchema,
|
|
11
|
+
CaptchaStates,
|
|
12
|
+
CaptchaStatus,
|
|
13
|
+
CaptchaTypes,
|
|
14
|
+
CaptchasContainerSchema,
|
|
15
|
+
CaptchasSchema,
|
|
16
|
+
CaptchasWithNumericSolutionSchema,
|
|
17
|
+
DappPayee,
|
|
18
|
+
DataSchema,
|
|
19
|
+
DatasetSchema,
|
|
20
|
+
DatasetWithIdsAndTreeSchema,
|
|
21
|
+
DatasetWithIdsSchema,
|
|
22
|
+
DatasetWithNumericSolutionSchema,
|
|
23
|
+
GovernanceStatus,
|
|
24
|
+
HashedCaptchaItemSchema,
|
|
25
|
+
LabelledDataSchema,
|
|
26
|
+
LabelledItemSchema,
|
|
27
|
+
LabelsContainerSchema,
|
|
28
|
+
MaybeLabelledHashedItemSchema,
|
|
29
|
+
POW_SEPARATOR,
|
|
30
|
+
PowChallengeIdSchema,
|
|
31
|
+
SelectAllCaptchaSchema,
|
|
32
|
+
SelectAllCaptchaSchemaRaw,
|
|
33
|
+
SelectAllCaptchaSchemaWithNumericSolution,
|
|
34
|
+
StoredStatusNames,
|
|
35
|
+
TimestampSchema
|
|
36
|
+
};
|
package/dist/datasets/merkle.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=merkle.js.map
|
|
1
|
+
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,129 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import "./api/index.js";
|
|
2
|
+
import "./client/index.js";
|
|
3
|
+
import "./config/index.js";
|
|
4
|
+
import "./datasets/index.js";
|
|
5
|
+
import "./provider/index.js";
|
|
6
|
+
import "./procaptcha/index.js";
|
|
7
|
+
import "./procaptcha-bundle/index.js";
|
|
8
|
+
import "./procaptcha-frictionless/index.js";
|
|
9
|
+
import "./keyring/index.js";
|
|
10
|
+
import { ApiParams } from "./api/params.js";
|
|
11
|
+
import { Tier, TierMonthlyLimits, TierSchema } from "./client/user.js";
|
|
12
|
+
import { ClientSettingsSchema, captchaTypeDefault, domainsDefault, frictionlessThresholdDefault, imageThresholdDefault, powDifficultyDefault } from "./client/settings.js";
|
|
13
|
+
import { CaptchaType, CaptchaTypeSchema } from "./client/captchaType/captchaType.js";
|
|
14
|
+
import { CaptchaTypeSpec } from "./client/captchaType/captchaTypeSpec.js";
|
|
15
|
+
import { AccountCreatorConfigSchema, CaptchaTimeoutSchema, DatabaseConfigSchema, DatabaseTypes, EnvironmentTypesSchema, Mode, ModeEnum, PolkadotSecretJSONSpec, ProcaptchaConfigSchema, ProsopoBaseConfigSchema, ProsopoBasicConfigSchema, ProsopoCaptchaSolutionConfigSchema, ProsopoClientConfigSchema, ProsopoConfigSchema, ProsopoImageServerConfigSchema, ProsopoServerConfigSchema } from "./config/config.js";
|
|
16
|
+
import { NetworkPairTypeSchema } from "./config/network.js";
|
|
17
|
+
import { DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_TIMEOUT, DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT, DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED, DEFAULT_MAX_VERIFIED_TIME_CONTRACT, DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT, DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT, DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT } from "./config/timeouts.js";
|
|
18
|
+
import { FrictionlessPenalties } from "./config/frictionless.js";
|
|
19
|
+
import { CaptchaItemSchema, CaptchaItemTypes, CaptchaSchema, CaptchaSolutionArraySchema, CaptchaSolutionSchema, CaptchaStates, CaptchaStatus, CaptchaTypes, CaptchasContainerSchema, CaptchasSchema, CaptchasWithNumericSolutionSchema, DappPayee, DataSchema, GovernanceStatus, HashedCaptchaItemSchema, LabelledDataSchema, LabelledItemSchema, LabelsContainerSchema, MaybeLabelledHashedItemSchema, POW_SEPARATOR, PowChallengeIdSchema, SelectAllCaptchaSchema, SelectAllCaptchaSchemaRaw, SelectAllCaptchaSchemaWithNumericSolution, StoredStatusNames, TimestampSchema } from "./datasets/captcha.js";
|
|
20
|
+
import { DatasetSchema, DatasetWithIdsAndTreeSchema, DatasetWithIdsSchema, DatasetWithNumericSolutionSchema } from "./datasets/dataset.js";
|
|
21
|
+
import { AdminApiPaths, ApiPathRateLimits, ApiPrefix, BlockRuleSpec, BlockRuleType, CaptchaRequestBody, CaptchaSolutionBody, ClientApiPaths, DEFAULT_SOLVED_COUNT, DEFAULT_UNSOLVED_COUNT, DappDomainRequestBody, GetFrictionlessCaptchaChallengeRequestBody, GetPowCaptchaChallengeRequestBody, ProsopoCaptchaCountConfigSchema, ProviderDefaultRateLimits, PublicApiPaths, RegisterSitekeyBody, ServerPowCaptchaVerifyRequestBody, SubmitPowCaptchaSolutionBody, UpdateDetectorKeyBody, VerifyPowCaptchaSolutionBody, VerifySolutionBody } from "./provider/api.js";
|
|
22
|
+
import { ScheduledTaskNames, ScheduledTaskStatus } from "./provider/scheduler.js";
|
|
23
|
+
import { ProcaptchaResponse } from "./procaptcha/manager.js";
|
|
24
|
+
import { ChallengeSignatureSchema, ProcaptchaOutputSchema, ProcaptchaTokenCodec, ProcaptchaTokenSpec, RequestHashSignatureSchema, SignatureTypesSchema, TimestampSignatureSchema, decodeProcaptchaOutput, encodeProcaptchaOutput } from "./procaptcha/token.js";
|
|
25
|
+
export {
|
|
26
|
+
AccountCreatorConfigSchema,
|
|
27
|
+
AdminApiPaths,
|
|
28
|
+
ApiParams,
|
|
29
|
+
ApiPathRateLimits,
|
|
30
|
+
ApiPrefix,
|
|
31
|
+
BlockRuleSpec,
|
|
32
|
+
BlockRuleType,
|
|
33
|
+
CaptchaItemSchema,
|
|
34
|
+
CaptchaItemTypes,
|
|
35
|
+
CaptchaRequestBody,
|
|
36
|
+
CaptchaSchema,
|
|
37
|
+
CaptchaSolutionArraySchema,
|
|
38
|
+
CaptchaSolutionBody,
|
|
39
|
+
CaptchaSolutionSchema,
|
|
40
|
+
CaptchaStates,
|
|
41
|
+
CaptchaStatus,
|
|
42
|
+
CaptchaTimeoutSchema,
|
|
43
|
+
CaptchaType,
|
|
44
|
+
CaptchaTypeSchema,
|
|
45
|
+
CaptchaTypeSpec,
|
|
46
|
+
CaptchaTypes,
|
|
47
|
+
CaptchasContainerSchema,
|
|
48
|
+
CaptchasSchema,
|
|
49
|
+
CaptchasWithNumericSolutionSchema,
|
|
50
|
+
ChallengeSignatureSchema,
|
|
51
|
+
ClientApiPaths,
|
|
52
|
+
ClientSettingsSchema,
|
|
53
|
+
DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT,
|
|
54
|
+
DEFAULT_IMAGE_CAPTCHA_TIMEOUT,
|
|
55
|
+
DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT,
|
|
56
|
+
DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED,
|
|
57
|
+
DEFAULT_MAX_VERIFIED_TIME_CONTRACT,
|
|
58
|
+
DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT,
|
|
59
|
+
DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT,
|
|
60
|
+
DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT,
|
|
61
|
+
DEFAULT_SOLVED_COUNT,
|
|
62
|
+
DEFAULT_UNSOLVED_COUNT,
|
|
63
|
+
DappDomainRequestBody,
|
|
64
|
+
DappPayee,
|
|
65
|
+
DataSchema,
|
|
66
|
+
DatabaseConfigSchema,
|
|
67
|
+
DatabaseTypes,
|
|
68
|
+
DatasetSchema,
|
|
69
|
+
DatasetWithIdsAndTreeSchema,
|
|
70
|
+
DatasetWithIdsSchema,
|
|
71
|
+
DatasetWithNumericSolutionSchema,
|
|
72
|
+
EnvironmentTypesSchema,
|
|
73
|
+
FrictionlessPenalties,
|
|
74
|
+
GetFrictionlessCaptchaChallengeRequestBody,
|
|
75
|
+
GetPowCaptchaChallengeRequestBody,
|
|
76
|
+
GovernanceStatus,
|
|
77
|
+
HashedCaptchaItemSchema,
|
|
78
|
+
LabelledDataSchema,
|
|
79
|
+
LabelledItemSchema,
|
|
80
|
+
LabelsContainerSchema,
|
|
81
|
+
MaybeLabelledHashedItemSchema,
|
|
82
|
+
Mode,
|
|
83
|
+
ModeEnum,
|
|
84
|
+
NetworkPairTypeSchema,
|
|
85
|
+
POW_SEPARATOR,
|
|
86
|
+
PolkadotSecretJSONSpec,
|
|
87
|
+
PowChallengeIdSchema,
|
|
88
|
+
ProcaptchaConfigSchema,
|
|
89
|
+
ProcaptchaOutputSchema,
|
|
90
|
+
ProcaptchaResponse,
|
|
91
|
+
ProcaptchaTokenCodec,
|
|
92
|
+
ProcaptchaTokenSpec,
|
|
93
|
+
ProsopoBaseConfigSchema,
|
|
94
|
+
ProsopoBasicConfigSchema,
|
|
95
|
+
ProsopoCaptchaCountConfigSchema,
|
|
96
|
+
ProsopoCaptchaSolutionConfigSchema,
|
|
97
|
+
ProsopoClientConfigSchema,
|
|
98
|
+
ProsopoConfigSchema,
|
|
99
|
+
ProsopoImageServerConfigSchema,
|
|
100
|
+
ProsopoServerConfigSchema,
|
|
101
|
+
ProviderDefaultRateLimits,
|
|
102
|
+
PublicApiPaths,
|
|
103
|
+
RegisterSitekeyBody,
|
|
104
|
+
RequestHashSignatureSchema,
|
|
105
|
+
ScheduledTaskNames,
|
|
106
|
+
ScheduledTaskStatus,
|
|
107
|
+
SelectAllCaptchaSchema,
|
|
108
|
+
SelectAllCaptchaSchemaRaw,
|
|
109
|
+
SelectAllCaptchaSchemaWithNumericSolution,
|
|
110
|
+
ServerPowCaptchaVerifyRequestBody,
|
|
111
|
+
SignatureTypesSchema,
|
|
112
|
+
StoredStatusNames,
|
|
113
|
+
SubmitPowCaptchaSolutionBody,
|
|
114
|
+
Tier,
|
|
115
|
+
TierMonthlyLimits,
|
|
116
|
+
TierSchema,
|
|
117
|
+
TimestampSchema,
|
|
118
|
+
TimestampSignatureSchema,
|
|
119
|
+
UpdateDetectorKeyBody,
|
|
120
|
+
VerifyPowCaptchaSolutionBody,
|
|
121
|
+
VerifySolutionBody,
|
|
122
|
+
captchaTypeDefault,
|
|
123
|
+
decodeProcaptchaOutput,
|
|
124
|
+
domainsDefault,
|
|
125
|
+
encodeProcaptchaOutput,
|
|
126
|
+
frictionlessThresholdDefault,
|
|
127
|
+
imageThresholdDefault,
|
|
128
|
+
powDifficultyDefault
|
|
129
|
+
};
|
package/dist/keyring/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import "./keyring/types.js";
|
|
2
|
+
import "./pair/types.js";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
|
package/dist/procaptcha/api.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=api.js.map
|
|
1
|
+
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=client.js.map
|
|
1
|
+
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=collector.js.map
|
|
1
|
+
|
package/dist/procaptcha/index.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import "./api.js";
|
|
2
|
+
import "./client.js";
|
|
3
|
+
import "./collector.js";
|
|
4
|
+
import { ProcaptchaResponse } from "./manager.js";
|
|
5
|
+
import "./props.js";
|
|
6
|
+
import { ChallengeSignatureSchema, ProcaptchaOutputSchema, ProcaptchaTokenCodec, ProcaptchaTokenSpec, RequestHashSignatureSchema, SignatureTypesSchema, TimestampSignatureSchema, decodeProcaptchaOutput, encodeProcaptchaOutput } from "./token.js";
|
|
7
|
+
import "./utils.js";
|
|
8
|
+
export {
|
|
9
|
+
ChallengeSignatureSchema,
|
|
10
|
+
ProcaptchaOutputSchema,
|
|
11
|
+
ProcaptchaResponse,
|
|
12
|
+
ProcaptchaTokenCodec,
|
|
13
|
+
ProcaptchaTokenSpec,
|
|
14
|
+
RequestHashSignatureSchema,
|
|
15
|
+
SignatureTypesSchema,
|
|
16
|
+
TimestampSignatureSchema,
|
|
17
|
+
decodeProcaptchaOutput,
|
|
18
|
+
encodeProcaptchaOutput
|
|
19
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { object } from "zod";
|
|
2
|
-
import
|
|
2
|
+
import "../api/index.js";
|
|
3
3
|
import { ProcaptchaTokenSpec } from "./token.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { ApiParams } from "../api/params.js";
|
|
5
|
+
const ProcaptchaResponse = object({
|
|
6
|
+
[ApiParams.procaptchaResponse]: ProcaptchaTokenSpec
|
|
6
7
|
});
|
|
7
|
-
|
|
8
|
+
export {
|
|
9
|
+
ProcaptchaResponse
|
|
10
|
+
};
|
package/dist/procaptcha/props.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=props.js.map
|
|
1
|
+
|