@prosopo/types 2.5.5 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/api/api.cjs +1 -0
- package/dist/cjs/api/index.cjs +5 -0
- package/dist/cjs/api/params.cjs +42 -0
- package/dist/cjs/client/captchaType/captchaType.cjs +9 -0
- package/dist/cjs/client/captchaType/captchaTypeSpec.cjs +6 -0
- package/dist/cjs/client/index.cjs +17 -0
- package/dist/cjs/client/settings.cjs +23 -0
- package/dist/cjs/client/user.cjs +33 -0
- package/dist/cjs/config/config.cjs +210 -0
- package/dist/cjs/config/frictionless.cjs +8 -0
- package/dist/cjs/config/index.cjs +32 -0
- package/dist/cjs/config/network.cjs +10 -0
- package/dist/cjs/config/timeouts.cjs +19 -0
- package/dist/cjs/datasets/assets.cjs +1 -0
- package/dist/cjs/datasets/captcha.cjs +128 -0
- package/dist/cjs/datasets/dataset.cjs +32 -0
- package/dist/cjs/datasets/index.cjs +35 -0
- package/dist/cjs/datasets/merkle.cjs +1 -0
- package/dist/cjs/index.cjs +128 -0
- package/dist/cjs/procaptcha/api.cjs +1 -0
- package/dist/cjs/procaptcha/client.cjs +1 -0
- package/dist/cjs/procaptcha/collector.cjs +1 -0
- package/dist/cjs/procaptcha/index.cjs +19 -0
- package/dist/cjs/procaptcha/manager.cjs +10 -0
- package/dist/cjs/procaptcha/props.cjs +1 -0
- package/dist/cjs/procaptcha/token.cjs +89 -0
- package/dist/cjs/procaptcha/utils.cjs +1 -0
- package/dist/cjs/procaptcha-bundle/index.cjs +1 -0
- package/dist/cjs/procaptcha-frictionless/index.cjs +2 -0
- package/dist/cjs/procaptcha-frictionless/props.cjs +1 -0
- package/dist/cjs/provider/accounts.cjs +8 -0
- package/dist/cjs/provider/api.cjs +219 -0
- package/dist/cjs/provider/argv.cjs +6 -0
- package/dist/cjs/provider/index.cjs +30 -0
- package/dist/cjs/provider/scheduler.cjs +18 -0
- package/dist/client/settings.d.ts +4 -0
- package/dist/client/settings.d.ts.map +1 -1
- package/dist/client/settings.js +2 -0
- package/dist/client/settings.js.map +1 -1
- package/dist/client/user.d.ts +1 -1
- package/dist/client/user.d.ts.map +1 -1
- package/dist/config/config.d.ts +3 -3
- package/dist/procaptcha-bundle/index.d.ts +4 -4
- package/dist/procaptcha-bundle/index.d.ts.map +1 -1
- package/dist/provider/api.d.ts +5 -0
- package/dist/provider/api.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./api/index.cjs");
|
|
4
|
+
require("./client/index.cjs");
|
|
5
|
+
require("./config/index.cjs");
|
|
6
|
+
require("./datasets/index.cjs");
|
|
7
|
+
require("./provider/index.cjs");
|
|
8
|
+
require("./procaptcha/index.cjs");
|
|
9
|
+
require("./procaptcha-bundle/index.cjs");
|
|
10
|
+
require("./procaptcha-frictionless/index.cjs");
|
|
11
|
+
const params = require("./api/params.cjs");
|
|
12
|
+
const user = require("./client/user.cjs");
|
|
13
|
+
const settings = require("./client/settings.cjs");
|
|
14
|
+
const captchaType = require("./client/captchaType/captchaType.cjs");
|
|
15
|
+
const captchaTypeSpec = require("./client/captchaType/captchaTypeSpec.cjs");
|
|
16
|
+
const config = require("./config/config.cjs");
|
|
17
|
+
const network = require("./config/network.cjs");
|
|
18
|
+
const timeouts = require("./config/timeouts.cjs");
|
|
19
|
+
const frictionless = require("./config/frictionless.cjs");
|
|
20
|
+
const captcha = require("./datasets/captcha.cjs");
|
|
21
|
+
const dataset = require("./datasets/dataset.cjs");
|
|
22
|
+
const accounts = require("./provider/accounts.cjs");
|
|
23
|
+
const api = require("./provider/api.cjs");
|
|
24
|
+
const scheduler = require("./provider/scheduler.cjs");
|
|
25
|
+
const argv = require("./provider/argv.cjs");
|
|
26
|
+
const manager = require("./procaptcha/manager.cjs");
|
|
27
|
+
const token = require("./procaptcha/token.cjs");
|
|
28
|
+
exports.ApiParams = params.ApiParams;
|
|
29
|
+
exports.Tier = user.Tier;
|
|
30
|
+
exports.TierMonthlyLimits = user.TierMonthlyLimits;
|
|
31
|
+
exports.TierSchema = user.TierSchema;
|
|
32
|
+
exports.ClientSettingsSchema = settings.ClientSettingsSchema;
|
|
33
|
+
exports.captchaTypeDefault = settings.captchaTypeDefault;
|
|
34
|
+
exports.domainsDefault = settings.domainsDefault;
|
|
35
|
+
exports.frictionlessThresholdDefault = settings.frictionlessThresholdDefault;
|
|
36
|
+
exports.imageThresholdDefault = settings.imageThresholdDefault;
|
|
37
|
+
exports.powDifficultyDefault = settings.powDifficultyDefault;
|
|
38
|
+
exports.CaptchaType = captchaType.CaptchaType;
|
|
39
|
+
exports.CaptchaTypeSpec = captchaTypeSpec.CaptchaTypeSpec;
|
|
40
|
+
exports.AccountCreatorConfigSchema = config.AccountCreatorConfigSchema;
|
|
41
|
+
exports.CaptchaTimeoutSchema = config.CaptchaTimeoutSchema;
|
|
42
|
+
exports.DatabaseConfigSchema = config.DatabaseConfigSchema;
|
|
43
|
+
exports.DatabaseTypes = config.DatabaseTypes;
|
|
44
|
+
exports.EnvironmentTypesSchema = config.EnvironmentTypesSchema;
|
|
45
|
+
exports.Mode = config.Mode;
|
|
46
|
+
exports.ModeEnum = config.ModeEnum;
|
|
47
|
+
exports.PolkadotSecretJSONSpec = config.PolkadotSecretJSONSpec;
|
|
48
|
+
exports.ProcaptchaConfigSchema = config.ProcaptchaConfigSchema;
|
|
49
|
+
exports.ProsopoBaseConfigSchema = config.ProsopoBaseConfigSchema;
|
|
50
|
+
exports.ProsopoBasicConfigSchema = config.ProsopoBasicConfigSchema;
|
|
51
|
+
exports.ProsopoCaptchaSolutionConfigSchema = config.ProsopoCaptchaSolutionConfigSchema;
|
|
52
|
+
exports.ProsopoClientConfigSchema = config.ProsopoClientConfigSchema;
|
|
53
|
+
exports.ProsopoConfigSchema = config.ProsopoConfigSchema;
|
|
54
|
+
exports.ProsopoImageServerConfigSchema = config.ProsopoImageServerConfigSchema;
|
|
55
|
+
exports.ProsopoServerConfigSchema = config.ProsopoServerConfigSchema;
|
|
56
|
+
exports.NetworkPairTypeSchema = network.NetworkPairTypeSchema;
|
|
57
|
+
exports.DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT = timeouts.DEFAULT_IMAGE_CAPTCHA_SOLUTION_TIMEOUT;
|
|
58
|
+
exports.DEFAULT_IMAGE_CAPTCHA_TIMEOUT = timeouts.DEFAULT_IMAGE_CAPTCHA_TIMEOUT;
|
|
59
|
+
exports.DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT = timeouts.DEFAULT_IMAGE_CAPTCHA_VERIFIED_TIMEOUT;
|
|
60
|
+
exports.DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED = timeouts.DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED;
|
|
61
|
+
exports.DEFAULT_MAX_VERIFIED_TIME_CONTRACT = timeouts.DEFAULT_MAX_VERIFIED_TIME_CONTRACT;
|
|
62
|
+
exports.DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_CACHED_TIMEOUT;
|
|
63
|
+
exports.DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_SOLUTION_TIMEOUT;
|
|
64
|
+
exports.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT = timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT;
|
|
65
|
+
exports.FrictionlessPenalties = frictionless.FrictionlessPenalties;
|
|
66
|
+
exports.CaptchaItemSchema = captcha.CaptchaItemSchema;
|
|
67
|
+
exports.CaptchaItemTypes = captcha.CaptchaItemTypes;
|
|
68
|
+
exports.CaptchaSchema = captcha.CaptchaSchema;
|
|
69
|
+
exports.CaptchaSolutionArraySchema = captcha.CaptchaSolutionArraySchema;
|
|
70
|
+
exports.CaptchaSolutionSchema = captcha.CaptchaSolutionSchema;
|
|
71
|
+
exports.CaptchaStates = captcha.CaptchaStates;
|
|
72
|
+
exports.CaptchaStatus = captcha.CaptchaStatus;
|
|
73
|
+
exports.CaptchaTypes = captcha.CaptchaTypes;
|
|
74
|
+
exports.CaptchasContainerSchema = captcha.CaptchasContainerSchema;
|
|
75
|
+
exports.CaptchasSchema = captcha.CaptchasSchema;
|
|
76
|
+
exports.CaptchasWithNumericSolutionSchema = captcha.CaptchasWithNumericSolutionSchema;
|
|
77
|
+
exports.DappPayee = captcha.DappPayee;
|
|
78
|
+
exports.DataSchema = captcha.DataSchema;
|
|
79
|
+
exports.GovernanceStatus = captcha.GovernanceStatus;
|
|
80
|
+
exports.HashedCaptchaItemSchema = captcha.HashedCaptchaItemSchema;
|
|
81
|
+
exports.LabelledDataSchema = captcha.LabelledDataSchema;
|
|
82
|
+
exports.LabelledItemSchema = captcha.LabelledItemSchema;
|
|
83
|
+
exports.LabelsContainerSchema = captcha.LabelsContainerSchema;
|
|
84
|
+
exports.MaybeLabelledHashedItemSchema = captcha.MaybeLabelledHashedItemSchema;
|
|
85
|
+
exports.POW_SEPARATOR = captcha.POW_SEPARATOR;
|
|
86
|
+
exports.PowChallengeIdSchema = captcha.PowChallengeIdSchema;
|
|
87
|
+
exports.SelectAllCaptchaSchema = captcha.SelectAllCaptchaSchema;
|
|
88
|
+
exports.SelectAllCaptchaSchemaRaw = captcha.SelectAllCaptchaSchemaRaw;
|
|
89
|
+
exports.SelectAllCaptchaSchemaWithNumericSolution = captcha.SelectAllCaptchaSchemaWithNumericSolution;
|
|
90
|
+
exports.TimestampSchema = captcha.TimestampSchema;
|
|
91
|
+
exports.DatasetSchema = dataset.DatasetSchema;
|
|
92
|
+
exports.DatasetWithIdsAndTreeSchema = dataset.DatasetWithIdsAndTreeSchema;
|
|
93
|
+
exports.DatasetWithIdsSchema = dataset.DatasetWithIdsSchema;
|
|
94
|
+
exports.DatasetWithNumericSolutionSchema = dataset.DatasetWithNumericSolutionSchema;
|
|
95
|
+
exports.Payee = accounts.Payee;
|
|
96
|
+
exports.AdminApiPaths = api.AdminApiPaths;
|
|
97
|
+
exports.ApiPathRateLimits = api.ApiPathRateLimits;
|
|
98
|
+
exports.ApiPrefix = api.ApiPrefix;
|
|
99
|
+
exports.BlockRuleSpec = api.BlockRuleSpec;
|
|
100
|
+
exports.BlockRuleType = api.BlockRuleType;
|
|
101
|
+
exports.CaptchaRequestBody = api.CaptchaRequestBody;
|
|
102
|
+
exports.CaptchaSolutionBody = api.CaptchaSolutionBody;
|
|
103
|
+
exports.ClientApiPaths = api.ClientApiPaths;
|
|
104
|
+
exports.DappDomainRequestBody = api.DappDomainRequestBody;
|
|
105
|
+
exports.GetFrictionlessCaptchaChallengeRequestBody = api.GetFrictionlessCaptchaChallengeRequestBody;
|
|
106
|
+
exports.GetPowCaptchaChallengeRequestBody = api.GetPowCaptchaChallengeRequestBody;
|
|
107
|
+
exports.ProsopoCaptchaCountConfigSchema = api.ProsopoCaptchaCountConfigSchema;
|
|
108
|
+
exports.ProviderDefaultRateLimits = api.ProviderDefaultRateLimits;
|
|
109
|
+
exports.PublicApiPaths = api.PublicApiPaths;
|
|
110
|
+
exports.RegisterSitekeyBody = api.RegisterSitekeyBody;
|
|
111
|
+
exports.ServerPowCaptchaVerifyRequestBody = api.ServerPowCaptchaVerifyRequestBody;
|
|
112
|
+
exports.SubmitPowCaptchaSolutionBody = api.SubmitPowCaptchaSolutionBody;
|
|
113
|
+
exports.UpdateDetectorKeyBody = api.UpdateDetectorKeyBody;
|
|
114
|
+
exports.VerifyPowCaptchaSolutionBody = api.VerifyPowCaptchaSolutionBody;
|
|
115
|
+
exports.VerifySolutionBody = api.VerifySolutionBody;
|
|
116
|
+
exports.ScheduledTaskNames = scheduler.ScheduledTaskNames;
|
|
117
|
+
exports.ScheduledTaskStatus = scheduler.ScheduledTaskStatus;
|
|
118
|
+
exports.PayeeSchema = argv.PayeeSchema;
|
|
119
|
+
exports.ProcaptchaResponse = manager.ProcaptchaResponse;
|
|
120
|
+
exports.ChallengeSignatureSchema = token.ChallengeSignatureSchema;
|
|
121
|
+
exports.ProcaptchaOutputSchema = token.ProcaptchaOutputSchema;
|
|
122
|
+
exports.ProcaptchaTokenCodec = token.ProcaptchaTokenCodec;
|
|
123
|
+
exports.ProcaptchaTokenSpec = token.ProcaptchaTokenSpec;
|
|
124
|
+
exports.RequestHashSignatureSchema = token.RequestHashSignatureSchema;
|
|
125
|
+
exports.SignatureTypesSchema = token.SignatureTypesSchema;
|
|
126
|
+
exports.TimestampSignatureSchema = token.TimestampSignatureSchema;
|
|
127
|
+
exports.decodeProcaptchaOutput = token.decodeProcaptchaOutput;
|
|
128
|
+
exports.encodeProcaptchaOutput = token.encodeProcaptchaOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("./api.cjs");
|
|
4
|
+
require("./client.cjs");
|
|
5
|
+
require("./collector.cjs");
|
|
6
|
+
const manager = require("./manager.cjs");
|
|
7
|
+
require("./props.cjs");
|
|
8
|
+
const token = require("./token.cjs");
|
|
9
|
+
require("./utils.cjs");
|
|
10
|
+
exports.ProcaptchaResponse = manager.ProcaptchaResponse;
|
|
11
|
+
exports.ChallengeSignatureSchema = token.ChallengeSignatureSchema;
|
|
12
|
+
exports.ProcaptchaOutputSchema = token.ProcaptchaOutputSchema;
|
|
13
|
+
exports.ProcaptchaTokenCodec = token.ProcaptchaTokenCodec;
|
|
14
|
+
exports.ProcaptchaTokenSpec = token.ProcaptchaTokenSpec;
|
|
15
|
+
exports.RequestHashSignatureSchema = token.RequestHashSignatureSchema;
|
|
16
|
+
exports.SignatureTypesSchema = token.SignatureTypesSchema;
|
|
17
|
+
exports.TimestampSignatureSchema = token.TimestampSignatureSchema;
|
|
18
|
+
exports.decodeProcaptchaOutput = token.decodeProcaptchaOutput;
|
|
19
|
+
exports.encodeProcaptchaOutput = token.encodeProcaptchaOutput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const z = require("zod");
|
|
4
|
+
require("../api/index.cjs");
|
|
5
|
+
const token = require("./token.cjs");
|
|
6
|
+
const params = require("../api/params.cjs");
|
|
7
|
+
const ProcaptchaResponse = z.object({
|
|
8
|
+
[params.ApiParams.procaptchaResponse]: token.ProcaptchaTokenSpec
|
|
9
|
+
});
|
|
10
|
+
exports.ProcaptchaResponse = ProcaptchaResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const util = require("@polkadot/util");
|
|
4
|
+
const scaleTs = require("scale-ts");
|
|
5
|
+
const z = require("zod");
|
|
6
|
+
const params = require("../api/params.cjs");
|
|
7
|
+
const RequestHashSignatureSchema = z.object({
|
|
8
|
+
[params.ApiParams.requestHash]: z.string()
|
|
9
|
+
});
|
|
10
|
+
const ChallengeSignatureSchema = z.object({
|
|
11
|
+
[params.ApiParams.challenge]: z.string()
|
|
12
|
+
});
|
|
13
|
+
const TimestampSignatureSchema = z.object({
|
|
14
|
+
[params.ApiParams.timestamp]: z.string()
|
|
15
|
+
});
|
|
16
|
+
const SignatureTypesSchema = z.object({
|
|
17
|
+
[params.ApiParams.challenge]: z.string().optional(),
|
|
18
|
+
[params.ApiParams.requestHash]: z.string().optional(),
|
|
19
|
+
[params.ApiParams.timestamp]: z.string().optional()
|
|
20
|
+
});
|
|
21
|
+
const ProcaptchaOutputSchema = z.object({
|
|
22
|
+
[params.ApiParams.commitmentId]: z.string().optional(),
|
|
23
|
+
[params.ApiParams.providerUrl]: z.string().optional(),
|
|
24
|
+
[params.ApiParams.dapp]: z.string(),
|
|
25
|
+
[params.ApiParams.user]: z.string(),
|
|
26
|
+
[params.ApiParams.challenge]: z.string().optional(),
|
|
27
|
+
[params.ApiParams.nonce]: z.number().optional(),
|
|
28
|
+
[params.ApiParams.timestamp]: z.string(),
|
|
29
|
+
[params.ApiParams.signature]: z.object({
|
|
30
|
+
[params.ApiParams.provider]: SignatureTypesSchema,
|
|
31
|
+
[params.ApiParams.user]: SignatureTypesSchema
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
const ProcaptchaTokenCodec = scaleTs.Struct({
|
|
35
|
+
[params.ApiParams.commitmentId]: scaleTs.Option(scaleTs.str),
|
|
36
|
+
[params.ApiParams.providerUrl]: scaleTs.Option(scaleTs.str),
|
|
37
|
+
[params.ApiParams.dapp]: scaleTs.str,
|
|
38
|
+
[params.ApiParams.user]: scaleTs.str,
|
|
39
|
+
[params.ApiParams.challenge]: scaleTs.Option(scaleTs.str),
|
|
40
|
+
[params.ApiParams.nonce]: scaleTs.Option(scaleTs.u32),
|
|
41
|
+
[params.ApiParams.timestamp]: scaleTs.str,
|
|
42
|
+
[params.ApiParams.signature]: scaleTs.Struct({
|
|
43
|
+
[params.ApiParams.provider]: scaleTs.Struct({
|
|
44
|
+
[params.ApiParams.challenge]: scaleTs.Option(scaleTs.str),
|
|
45
|
+
[params.ApiParams.requestHash]: scaleTs.Option(scaleTs.str)
|
|
46
|
+
}),
|
|
47
|
+
[params.ApiParams.user]: scaleTs.Struct({
|
|
48
|
+
[params.ApiParams.timestamp]: scaleTs.Option(scaleTs.str),
|
|
49
|
+
[params.ApiParams.requestHash]: scaleTs.Option(scaleTs.str)
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
const ProcaptchaTokenSpec = z.string().startsWith("0x");
|
|
54
|
+
const encodeProcaptchaOutput = (procaptchaOutput) => {
|
|
55
|
+
return util.u8aToHex(
|
|
56
|
+
ProcaptchaTokenCodec.enc({
|
|
57
|
+
[params.ApiParams.commitmentId]: void 0,
|
|
58
|
+
[params.ApiParams.providerUrl]: void 0,
|
|
59
|
+
[params.ApiParams.challenge]: void 0,
|
|
60
|
+
[params.ApiParams.nonce]: void 0,
|
|
61
|
+
// override any optional fields by spreading the procaptchaOutput
|
|
62
|
+
...procaptchaOutput,
|
|
63
|
+
signature: {
|
|
64
|
+
provider: {
|
|
65
|
+
challenge: procaptchaOutput.signature.provider?.challenge || void 0,
|
|
66
|
+
requestHash: procaptchaOutput.signature.provider?.requestHash || void 0
|
|
67
|
+
},
|
|
68
|
+
user: {
|
|
69
|
+
timestamp: procaptchaOutput.signature.user?.timestamp || void 0,
|
|
70
|
+
requestHash: procaptchaOutput.signature.user?.requestHash || void 0
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
};
|
|
76
|
+
const decodeProcaptchaOutput = (procaptchaToken) => {
|
|
77
|
+
return ProcaptchaOutputSchema.parse(
|
|
78
|
+
ProcaptchaTokenCodec.dec(util.hexToU8a(procaptchaToken))
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
exports.ChallengeSignatureSchema = ChallengeSignatureSchema;
|
|
82
|
+
exports.ProcaptchaOutputSchema = ProcaptchaOutputSchema;
|
|
83
|
+
exports.ProcaptchaTokenCodec = ProcaptchaTokenCodec;
|
|
84
|
+
exports.ProcaptchaTokenSpec = ProcaptchaTokenSpec;
|
|
85
|
+
exports.RequestHashSignatureSchema = RequestHashSignatureSchema;
|
|
86
|
+
exports.SignatureTypesSchema = SignatureTypesSchema;
|
|
87
|
+
exports.TimestampSignatureSchema = TimestampSignatureSchema;
|
|
88
|
+
exports.decodeProcaptchaOutput = decodeProcaptchaOutput;
|
|
89
|
+
exports.encodeProcaptchaOutput = encodeProcaptchaOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const z = require("zod");
|
|
4
|
+
const params = require("../api/params.cjs");
|
|
5
|
+
require("../client/index.cjs");
|
|
6
|
+
const timeouts = require("../config/timeouts.cjs");
|
|
7
|
+
require("../datasets/index.cjs");
|
|
8
|
+
require("../procaptcha/index.cjs");
|
|
9
|
+
const token = require("../procaptcha/token.cjs");
|
|
10
|
+
const captcha = require("../datasets/captcha.cjs");
|
|
11
|
+
const settings = require("../client/settings.cjs");
|
|
12
|
+
const user = require("../client/user.cjs");
|
|
13
|
+
const ApiPrefix = "/v1/prosopo";
|
|
14
|
+
var ClientApiPaths = /* @__PURE__ */ ((ClientApiPaths2) => {
|
|
15
|
+
ClientApiPaths2["GetImageCaptchaChallenge"] = "/v1/prosopo/provider/client/captcha/image";
|
|
16
|
+
ClientApiPaths2["GetPowCaptchaChallenge"] = "/v1/prosopo/provider/client/captcha/pow";
|
|
17
|
+
ClientApiPaths2["GetFrictionlessCaptchaChallenge"] = "/v1/prosopo/provider/client/captcha/frictionless";
|
|
18
|
+
ClientApiPaths2["SubmitImageCaptchaSolution"] = "/v1/prosopo/provider/client/solution";
|
|
19
|
+
ClientApiPaths2["SubmitPowCaptchaSolution"] = "/v1/prosopo/provider/client/pow/solution";
|
|
20
|
+
ClientApiPaths2["VerifyPowCaptchaSolution"] = "/v1/prosopo/provider/client/pow/verify";
|
|
21
|
+
ClientApiPaths2["VerifyImageCaptchaSolutionDapp"] = "/v1/prosopo/provider/client/image/dapp/verify";
|
|
22
|
+
ClientApiPaths2["GetProviderStatus"] = "/v1/prosopo/provider/client/status";
|
|
23
|
+
ClientApiPaths2["SubmitUserEvents"] = "/v1/prosopo/provider/client/events";
|
|
24
|
+
return ClientApiPaths2;
|
|
25
|
+
})(ClientApiPaths || {});
|
|
26
|
+
var PublicApiPaths = /* @__PURE__ */ ((PublicApiPaths2) => {
|
|
27
|
+
PublicApiPaths2["GetProviderDetails"] = "/v1/prosopo/provider/public/details";
|
|
28
|
+
return PublicApiPaths2;
|
|
29
|
+
})(PublicApiPaths || {});
|
|
30
|
+
var AdminApiPaths = /* @__PURE__ */ ((AdminApiPaths2) => {
|
|
31
|
+
AdminApiPaths2["SiteKeyRegister"] = "/v1/prosopo/provider/admin/sitekey/register";
|
|
32
|
+
AdminApiPaths2["UpdateDetectorKey"] = "/v1/prosopo/provider/admin/detector/update";
|
|
33
|
+
AdminApiPaths2["RemoveDetectorKey"] = "/v1/prosopo/provider/admin/detector/remove";
|
|
34
|
+
return AdminApiPaths2;
|
|
35
|
+
})(AdminApiPaths || {});
|
|
36
|
+
const ProviderDefaultRateLimits = {
|
|
37
|
+
[
|
|
38
|
+
"/v1/prosopo/provider/client/captcha/image"
|
|
39
|
+
/* GetImageCaptchaChallenge */
|
|
40
|
+
]: { windowMs: 6e4, limit: 30 },
|
|
41
|
+
[
|
|
42
|
+
"/v1/prosopo/provider/client/captcha/pow"
|
|
43
|
+
/* GetPowCaptchaChallenge */
|
|
44
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
45
|
+
[
|
|
46
|
+
"/v1/prosopo/provider/client/solution"
|
|
47
|
+
/* SubmitImageCaptchaSolution */
|
|
48
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
49
|
+
[
|
|
50
|
+
"/v1/prosopo/provider/client/captcha/frictionless"
|
|
51
|
+
/* GetFrictionlessCaptchaChallenge */
|
|
52
|
+
]: {
|
|
53
|
+
windowMs: 6e4,
|
|
54
|
+
limit: 60
|
|
55
|
+
},
|
|
56
|
+
[
|
|
57
|
+
"/v1/prosopo/provider/client/pow/solution"
|
|
58
|
+
/* SubmitPowCaptchaSolution */
|
|
59
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
60
|
+
[
|
|
61
|
+
"/v1/prosopo/provider/client/pow/verify"
|
|
62
|
+
/* VerifyPowCaptchaSolution */
|
|
63
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
64
|
+
[
|
|
65
|
+
"/v1/prosopo/provider/client/image/dapp/verify"
|
|
66
|
+
/* VerifyImageCaptchaSolutionDapp */
|
|
67
|
+
]: {
|
|
68
|
+
windowMs: 6e4,
|
|
69
|
+
limit: 60
|
|
70
|
+
},
|
|
71
|
+
[
|
|
72
|
+
"/v1/prosopo/provider/client/status"
|
|
73
|
+
/* GetProviderStatus */
|
|
74
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
75
|
+
[
|
|
76
|
+
"/v1/prosopo/provider/public/details"
|
|
77
|
+
/* GetProviderDetails */
|
|
78
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
79
|
+
[
|
|
80
|
+
"/v1/prosopo/provider/client/events"
|
|
81
|
+
/* SubmitUserEvents */
|
|
82
|
+
]: { windowMs: 6e4, limit: 60 },
|
|
83
|
+
[
|
|
84
|
+
"/v1/prosopo/provider/admin/sitekey/register"
|
|
85
|
+
/* SiteKeyRegister */
|
|
86
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
87
|
+
[
|
|
88
|
+
"/v1/prosopo/provider/admin/detector/update"
|
|
89
|
+
/* UpdateDetectorKey */
|
|
90
|
+
]: { windowMs: 6e4, limit: 5 },
|
|
91
|
+
[
|
|
92
|
+
"/v1/prosopo/provider/admin/detector/remove"
|
|
93
|
+
/* RemoveDetectorKey */
|
|
94
|
+
]: { windowMs: 6e4, limit: 5 }
|
|
95
|
+
};
|
|
96
|
+
const createRateLimitSchemaWithDefaults = (paths) => z.object(
|
|
97
|
+
Object.entries(paths).reduce(
|
|
98
|
+
(schemas, [path, defaults]) => {
|
|
99
|
+
const enumPath = path;
|
|
100
|
+
schemas[enumPath] = z.object({
|
|
101
|
+
windowMs: z.coerce.number().optional().default(defaults.windowMs),
|
|
102
|
+
limit: z.coerce.number().optional().default(defaults.limit)
|
|
103
|
+
});
|
|
104
|
+
return schemas;
|
|
105
|
+
},
|
|
106
|
+
{}
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
const ApiPathRateLimits = createRateLimitSchemaWithDefaults(
|
|
110
|
+
ProviderDefaultRateLimits
|
|
111
|
+
);
|
|
112
|
+
const CaptchaRequestBody = z.object({
|
|
113
|
+
[params.ApiParams.user]: z.string(),
|
|
114
|
+
[params.ApiParams.dapp]: z.string(),
|
|
115
|
+
[params.ApiParams.datasetId]: z.union([z.string(), z.array(z.number())]),
|
|
116
|
+
[params.ApiParams.sessionId]: z.string().optional()
|
|
117
|
+
});
|
|
118
|
+
const CaptchaSolutionBody = z.object({
|
|
119
|
+
[params.ApiParams.user]: z.string(),
|
|
120
|
+
[params.ApiParams.dapp]: z.string(),
|
|
121
|
+
[params.ApiParams.captchas]: z.array(captcha.CaptchaSolutionSchema),
|
|
122
|
+
[params.ApiParams.requestHash]: z.string(),
|
|
123
|
+
[params.ApiParams.timestamp]: z.string(),
|
|
124
|
+
[params.ApiParams.signature]: z.object({
|
|
125
|
+
[params.ApiParams.user]: token.TimestampSignatureSchema,
|
|
126
|
+
[params.ApiParams.provider]: token.RequestHashSignatureSchema
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
const VerifySolutionBody = z.object({
|
|
130
|
+
[params.ApiParams.token]: token.ProcaptchaTokenSpec,
|
|
131
|
+
[params.ApiParams.dappSignature]: z.string(),
|
|
132
|
+
[params.ApiParams.maxVerifiedTime]: z.number().optional().default(timeouts.DEFAULT_IMAGE_MAX_VERIFIED_TIME_CACHED)
|
|
133
|
+
});
|
|
134
|
+
const ServerPowCaptchaVerifyRequestBody = z.object({
|
|
135
|
+
[params.ApiParams.token]: token.ProcaptchaTokenSpec,
|
|
136
|
+
[params.ApiParams.dappSignature]: z.string(),
|
|
137
|
+
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT)
|
|
138
|
+
});
|
|
139
|
+
const GetPowCaptchaChallengeRequestBody = z.object({
|
|
140
|
+
[params.ApiParams.user]: z.string(),
|
|
141
|
+
[params.ApiParams.dapp]: z.string(),
|
|
142
|
+
[params.ApiParams.sessionId]: z.string().optional()
|
|
143
|
+
});
|
|
144
|
+
const SubmitPowCaptchaSolutionBody = z.object({
|
|
145
|
+
[params.ApiParams.challenge]: captcha.PowChallengeIdSchema,
|
|
146
|
+
[params.ApiParams.difficulty]: z.number(),
|
|
147
|
+
[params.ApiParams.signature]: z.object({
|
|
148
|
+
[params.ApiParams.user]: z.object({
|
|
149
|
+
[params.ApiParams.timestamp]: z.string()
|
|
150
|
+
}),
|
|
151
|
+
[params.ApiParams.provider]: z.object({
|
|
152
|
+
[params.ApiParams.challenge]: z.string()
|
|
153
|
+
})
|
|
154
|
+
}),
|
|
155
|
+
[params.ApiParams.user]: z.string(),
|
|
156
|
+
[params.ApiParams.dapp]: z.string(),
|
|
157
|
+
[params.ApiParams.nonce]: z.number(),
|
|
158
|
+
[params.ApiParams.verifiedTimeout]: z.number().optional().default(timeouts.DEFAULT_POW_CAPTCHA_VERIFIED_TIMEOUT)
|
|
159
|
+
});
|
|
160
|
+
const GetFrictionlessCaptchaChallengeRequestBody = z.object({
|
|
161
|
+
[params.ApiParams.dapp]: z.string(),
|
|
162
|
+
[params.ApiParams.token]: z.string(),
|
|
163
|
+
[params.ApiParams.user]: z.string()
|
|
164
|
+
});
|
|
165
|
+
const VerifyPowCaptchaSolutionBody = z.object({
|
|
166
|
+
[params.ApiParams.siteKey]: z.string()
|
|
167
|
+
});
|
|
168
|
+
const RegisterSitekeyBody = z.object({
|
|
169
|
+
[params.ApiParams.siteKey]: z.string(),
|
|
170
|
+
[params.ApiParams.tier]: z.nativeEnum(user.Tier),
|
|
171
|
+
[params.ApiParams.settings]: settings.ClientSettingsSchema.optional()
|
|
172
|
+
});
|
|
173
|
+
const UpdateDetectorKeyBody = z.object({
|
|
174
|
+
[params.ApiParams.detectorKey]: z.string()
|
|
175
|
+
});
|
|
176
|
+
const ProsopoCaptchaCountConfigSchema = z.object({
|
|
177
|
+
solved: z.object({
|
|
178
|
+
count: z.number().positive()
|
|
179
|
+
}).optional().default({ count: 1 }),
|
|
180
|
+
unsolved: z.object({
|
|
181
|
+
count: z.number().nonnegative()
|
|
182
|
+
}).optional().default({ count: 0 })
|
|
183
|
+
});
|
|
184
|
+
var BlockRuleType = /* @__PURE__ */ ((BlockRuleType2) => {
|
|
185
|
+
BlockRuleType2["ipAddress"] = "ipAddress";
|
|
186
|
+
BlockRuleType2["userAccount"] = "userAccount";
|
|
187
|
+
return BlockRuleType2;
|
|
188
|
+
})(BlockRuleType || {});
|
|
189
|
+
const BlockRuleTypeSpec = z.nativeEnum(BlockRuleType);
|
|
190
|
+
const BlockRuleSpec = z.object({
|
|
191
|
+
global: z.boolean(),
|
|
192
|
+
hardBlock: z.boolean(),
|
|
193
|
+
type: BlockRuleTypeSpec,
|
|
194
|
+
dappAccount: z.string().optional(),
|
|
195
|
+
captchaConfig: ProsopoCaptchaCountConfigSchema.optional()
|
|
196
|
+
});
|
|
197
|
+
const DappDomainRequestBody = z.object({
|
|
198
|
+
[params.ApiParams.dapp]: z.string()
|
|
199
|
+
});
|
|
200
|
+
exports.AdminApiPaths = AdminApiPaths;
|
|
201
|
+
exports.ApiPathRateLimits = ApiPathRateLimits;
|
|
202
|
+
exports.ApiPrefix = ApiPrefix;
|
|
203
|
+
exports.BlockRuleSpec = BlockRuleSpec;
|
|
204
|
+
exports.BlockRuleType = BlockRuleType;
|
|
205
|
+
exports.CaptchaRequestBody = CaptchaRequestBody;
|
|
206
|
+
exports.CaptchaSolutionBody = CaptchaSolutionBody;
|
|
207
|
+
exports.ClientApiPaths = ClientApiPaths;
|
|
208
|
+
exports.DappDomainRequestBody = DappDomainRequestBody;
|
|
209
|
+
exports.GetFrictionlessCaptchaChallengeRequestBody = GetFrictionlessCaptchaChallengeRequestBody;
|
|
210
|
+
exports.GetPowCaptchaChallengeRequestBody = GetPowCaptchaChallengeRequestBody;
|
|
211
|
+
exports.ProsopoCaptchaCountConfigSchema = ProsopoCaptchaCountConfigSchema;
|
|
212
|
+
exports.ProviderDefaultRateLimits = ProviderDefaultRateLimits;
|
|
213
|
+
exports.PublicApiPaths = PublicApiPaths;
|
|
214
|
+
exports.RegisterSitekeyBody = RegisterSitekeyBody;
|
|
215
|
+
exports.ServerPowCaptchaVerifyRequestBody = ServerPowCaptchaVerifyRequestBody;
|
|
216
|
+
exports.SubmitPowCaptchaSolutionBody = SubmitPowCaptchaSolutionBody;
|
|
217
|
+
exports.UpdateDetectorKeyBody = UpdateDetectorKeyBody;
|
|
218
|
+
exports.VerifyPowCaptchaSolutionBody = VerifyPowCaptchaSolutionBody;
|
|
219
|
+
exports.VerifySolutionBody = VerifySolutionBody;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const accounts = require("./accounts.cjs");
|
|
4
|
+
const api = require("./api.cjs");
|
|
5
|
+
const scheduler = require("./scheduler.cjs");
|
|
6
|
+
const argv = require("./argv.cjs");
|
|
7
|
+
exports.Payee = accounts.Payee;
|
|
8
|
+
exports.AdminApiPaths = api.AdminApiPaths;
|
|
9
|
+
exports.ApiPathRateLimits = api.ApiPathRateLimits;
|
|
10
|
+
exports.ApiPrefix = api.ApiPrefix;
|
|
11
|
+
exports.BlockRuleSpec = api.BlockRuleSpec;
|
|
12
|
+
exports.BlockRuleType = api.BlockRuleType;
|
|
13
|
+
exports.CaptchaRequestBody = api.CaptchaRequestBody;
|
|
14
|
+
exports.CaptchaSolutionBody = api.CaptchaSolutionBody;
|
|
15
|
+
exports.ClientApiPaths = api.ClientApiPaths;
|
|
16
|
+
exports.DappDomainRequestBody = api.DappDomainRequestBody;
|
|
17
|
+
exports.GetFrictionlessCaptchaChallengeRequestBody = api.GetFrictionlessCaptchaChallengeRequestBody;
|
|
18
|
+
exports.GetPowCaptchaChallengeRequestBody = api.GetPowCaptchaChallengeRequestBody;
|
|
19
|
+
exports.ProsopoCaptchaCountConfigSchema = api.ProsopoCaptchaCountConfigSchema;
|
|
20
|
+
exports.ProviderDefaultRateLimits = api.ProviderDefaultRateLimits;
|
|
21
|
+
exports.PublicApiPaths = api.PublicApiPaths;
|
|
22
|
+
exports.RegisterSitekeyBody = api.RegisterSitekeyBody;
|
|
23
|
+
exports.ServerPowCaptchaVerifyRequestBody = api.ServerPowCaptchaVerifyRequestBody;
|
|
24
|
+
exports.SubmitPowCaptchaSolutionBody = api.SubmitPowCaptchaSolutionBody;
|
|
25
|
+
exports.UpdateDetectorKeyBody = api.UpdateDetectorKeyBody;
|
|
26
|
+
exports.VerifyPowCaptchaSolutionBody = api.VerifyPowCaptchaSolutionBody;
|
|
27
|
+
exports.VerifySolutionBody = api.VerifySolutionBody;
|
|
28
|
+
exports.ScheduledTaskNames = scheduler.ScheduledTaskNames;
|
|
29
|
+
exports.ScheduledTaskStatus = scheduler.ScheduledTaskStatus;
|
|
30
|
+
exports.PayeeSchema = argv.PayeeSchema;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var ScheduledTaskNames = /* @__PURE__ */ ((ScheduledTaskNames2) => {
|
|
4
|
+
ScheduledTaskNames2["BatchCommitment"] = "BatchCommitment";
|
|
5
|
+
ScheduledTaskNames2["CalculateSolution"] = "CalculateSolution";
|
|
6
|
+
ScheduledTaskNames2["StoreCommitmentsExternal"] = "StoreCommitmentsExternal";
|
|
7
|
+
ScheduledTaskNames2["GetClientList"] = "GetClientList";
|
|
8
|
+
return ScheduledTaskNames2;
|
|
9
|
+
})(ScheduledTaskNames || {});
|
|
10
|
+
var ScheduledTaskStatus = /* @__PURE__ */ ((ScheduledTaskStatus2) => {
|
|
11
|
+
ScheduledTaskStatus2["Pending"] = "Pending";
|
|
12
|
+
ScheduledTaskStatus2["Running"] = "Running";
|
|
13
|
+
ScheduledTaskStatus2["Completed"] = "Completed";
|
|
14
|
+
ScheduledTaskStatus2["Failed"] = "Failed";
|
|
15
|
+
return ScheduledTaskStatus2;
|
|
16
|
+
})(ScheduledTaskStatus || {});
|
|
17
|
+
exports.ScheduledTaskNames = ScheduledTaskNames;
|
|
18
|
+
exports.ScheduledTaskStatus = ScheduledTaskStatus;
|
|
@@ -4,21 +4,25 @@ export declare const captchaTypeDefault = CaptchaType.frictionless;
|
|
|
4
4
|
export declare const domainsDefault: string[];
|
|
5
5
|
export declare const frictionlessThresholdDefault = 0.5;
|
|
6
6
|
export declare const powDifficultyDefault = 4;
|
|
7
|
+
export declare const imageThresholdDefault = 0.8;
|
|
7
8
|
export declare const ClientSettingsSchema: import("zod").ZodObject<{
|
|
8
9
|
captchaType: import("zod").ZodDefault<import("zod").ZodNativeEnum<typeof CaptchaType>>;
|
|
9
10
|
domains: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
10
11
|
frictionlessThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
11
12
|
powDifficulty: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
13
|
+
imageThreshold: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
12
14
|
}, "strip", import("zod").ZodTypeAny, {
|
|
13
15
|
captchaType: CaptchaType;
|
|
14
16
|
domains: string[];
|
|
15
17
|
frictionlessThreshold: number;
|
|
16
18
|
powDifficulty: number;
|
|
19
|
+
imageThreshold: number;
|
|
17
20
|
}, {
|
|
18
21
|
captchaType?: CaptchaType | undefined;
|
|
19
22
|
domains?: string[] | undefined;
|
|
20
23
|
frictionlessThreshold?: number | undefined;
|
|
21
24
|
powDifficulty?: number | undefined;
|
|
25
|
+
imageThreshold?: number | undefined;
|
|
22
26
|
}>;
|
|
23
27
|
export type IUserSettings = output<typeof ClientSettingsSchema>;
|
|
24
28
|
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,MAAM,EAAU,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,cAAc,EAAE,MAAM,EAAO,CAAC;AAC3C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,oBAAoB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAyB,KAAK,MAAM,EAAU,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,eAAO,MAAM,kBAAkB,2BAA2B,CAAC;AAC3D,eAAO,MAAM,cAAc,EAAE,MAAM,EAAO,CAAC;AAC3C,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAChD,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/client/settings.js
CHANGED
|
@@ -5,10 +5,12 @@ export const captchaTypeDefault = CaptchaType.frictionless;
|
|
|
5
5
|
export const domainsDefault = [];
|
|
6
6
|
export const frictionlessThresholdDefault = 0.5;
|
|
7
7
|
export const powDifficultyDefault = 4;
|
|
8
|
+
export const imageThresholdDefault = 0.8;
|
|
8
9
|
export const ClientSettingsSchema = object({
|
|
9
10
|
captchaType: CaptchaTypeSpec.default(captchaTypeDefault),
|
|
10
11
|
domains: array(string()).default([...domainsDefault]),
|
|
11
12
|
frictionlessThreshold: number().default(frictionlessThresholdDefault),
|
|
12
13
|
powDifficulty: number().default(powDifficultyDefault),
|
|
14
|
+
imageThreshold: number().default(imageThresholdDefault),
|
|
13
15
|
});
|
|
14
16
|
//# sourceMappingURL=settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC,YAAY,CAAC;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAa,EAAE,CAAC;AAC3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/client/settings.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,KAAK,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC,YAAY,CAAC;AAC3D,MAAM,CAAC,MAAM,cAAc,GAAa,EAAE,CAAC;AAC3C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAChD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC;IAC1C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACxD,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IACrD,qBAAqB,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,4BAA4B,CAAC;IACrE,aAAa,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrD,cAAc,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,qBAAqB,CAAC;CACvD,CAAC,CAAC"}
|
package/dist/client/user.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/client/user.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,oBAAY,IAAI;IACf,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,UAAU,eAAe;CACzB;AAED,eAAO,MAAM,UAAU,8BAAqB,CAAC;AAE7C,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAC;AAEF,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/client/user.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,oBAAY,IAAI;IACf,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,UAAU,eAAe;CACzB;AAED,eAAO,MAAM,UAAU,8BAAqB,CAAC;AAE7C,eAAO,MAAM,iBAAiB;;;;;;;;;;CAU7B,CAAC;AAEF,MAAM,WAAW,SAAS;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;IACxB,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAC/B"}
|