@prosopo/provider 0.3.5 → 0.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/authMiddleware.d.ts.map +1 -1
- package/dist/api/authMiddleware.js +2 -1
- package/dist/api/authMiddleware.js.map +1 -1
- package/dist/api/captcha.d.ts.map +1 -1
- package/dist/api/captcha.js +12 -7
- package/dist/api/captcha.js.map +1 -1
- package/dist/cjs/api/authMiddleware.cjs +2 -1
- package/dist/cjs/api/captcha.cjs +12 -7
- package/dist/cjs/index.cjs +0 -4
- package/dist/cjs/tasks/index.cjs +0 -2
- package/dist/cjs/tasks/tasks.cjs +3 -16
- package/dist/cjs/util.cjs +1 -37
- package/dist/scheduler.d.ts +0 -1
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +0 -13
- package/dist/scheduler.js.map +1 -1
- package/dist/tasks/index.d.ts +0 -1
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +0 -1
- package/dist/tasks/index.js.map +1 -1
- package/dist/tasks/tasks.d.ts +0 -2
- package/dist/tasks/tasks.d.ts.map +1 -1
- package/dist/tasks/tasks.js +4 -11
- package/dist/tasks/tasks.js.map +1 -1
- package/dist/tests/accounts.d.ts +5 -4
- package/dist/tests/accounts.d.ts.map +1 -1
- package/dist/tests/accounts.js +8 -5
- package/dist/tests/accounts.js.map +1 -1
- package/dist/tests/dataUtils/DatabaseAccounts.d.ts +13 -13
- package/dist/tests/dataUtils/DatabaseAccounts.d.ts.map +1 -1
- package/dist/tests/dataUtils/DatabaseAccounts.js.map +1 -1
- package/dist/tests/dataUtils/DatabasePopulator.d.ts +36 -28
- package/dist/tests/dataUtils/DatabasePopulator.d.ts.map +1 -1
- package/dist/tests/dataUtils/DatabasePopulator.js +128 -40
- package/dist/tests/dataUtils/DatabasePopulator.js.map +1 -1
- package/dist/tests/dataUtils/funds.d.ts +2 -1
- package/dist/tests/dataUtils/funds.d.ts.map +1 -1
- package/dist/tests/dataUtils/funds.js +54 -28
- package/dist/tests/dataUtils/funds.js.map +1 -1
- package/dist/tests/dataUtils/populateDatabase.d.ts +3 -2
- package/dist/tests/dataUtils/populateDatabase.d.ts.map +1 -1
- package/dist/tests/dataUtils/populateDatabase.js +9 -14
- package/dist/tests/dataUtils/populateDatabase.js.map +1 -1
- package/dist/tests/getUser.d.ts +2 -3
- package/dist/tests/getUser.d.ts.map +1 -1
- package/dist/tests/getUser.js.map +1 -1
- package/dist/tests/tasks/tasks.test.d.ts.map +1 -1
- package/dist/tests/tasks/tasks.test.js +6 -5
- package/dist/tests/tasks/tasks.test.js.map +1 -1
- package/dist/util.d.ts +1 -5
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +1 -36
- package/dist/util.js.map +1 -1
- package/package.json +15 -15
- package/vite.test.config.ts +32 -0
- package/dist/cjs/tasks/calculateSolutions.cjs +0 -67
- package/dist/tasks/calculateSolutions.d.ts +0 -7
- package/dist/tasks/calculateSolutions.d.ts.map +0 -1
- package/dist/tasks/calculateSolutions.js +0 -65
- package/dist/tasks/calculateSolutions.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/provider",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.37",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"build:cjs": "npx vite --config vite.cjs.config.ts build",
|
|
22
22
|
"build:debug": "tsc --build --verbose",
|
|
23
23
|
"build:config": "tsc --project",
|
|
24
|
+
"test": "npx vitest run --config ./vite.test.config.ts",
|
|
24
25
|
"mnemonic": "ts-node ./scripts/generateMnemonic.ts",
|
|
25
26
|
"coverage": "npx c8 npm run test",
|
|
26
|
-
"populate-data": "ts-node ./tests/dataUtils/populateDatabase.ts",
|
|
27
27
|
"eslint": "npx eslint . --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
|
|
28
28
|
"eslint:fix": "npm run eslint -- --fix",
|
|
29
29
|
"prettier": "npx prettier . --check --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"@polkadot/types": "10.11.2",
|
|
38
38
|
"@polkadot/util": "12.6.2",
|
|
39
39
|
"@polkadot/util-crypto": "12.6.2",
|
|
40
|
-
"@prosopo/captcha-contract": "0.3.
|
|
41
|
-
"@prosopo/common": "0.3.
|
|
42
|
-
"@prosopo/config": "0.3.
|
|
43
|
-
"@prosopo/contract": "0.3.
|
|
44
|
-
"@prosopo/database": "0.3.
|
|
45
|
-
"@prosopo/datasets": "0.3.
|
|
46
|
-
"@prosopo/env": "0.3.
|
|
47
|
-
"@prosopo/
|
|
48
|
-
"@prosopo/types
|
|
49
|
-
"@prosopo/types-
|
|
40
|
+
"@prosopo/captcha-contract": "0.3.37",
|
|
41
|
+
"@prosopo/common": "0.3.37",
|
|
42
|
+
"@prosopo/config": "0.3.37",
|
|
43
|
+
"@prosopo/contract": "0.3.37",
|
|
44
|
+
"@prosopo/database": "0.3.37",
|
|
45
|
+
"@prosopo/datasets": "0.3.37",
|
|
46
|
+
"@prosopo/env": "0.3.37",
|
|
47
|
+
"@prosopo/tx": "0.3.37",
|
|
48
|
+
"@prosopo/types": "0.3.37",
|
|
49
|
+
"@prosopo/types-database": "0.3.37",
|
|
50
|
+
"@prosopo/types-env": "0.3.37",
|
|
50
51
|
"cron": "^2.1.0",
|
|
51
52
|
"cron-parser": "^4.5.0",
|
|
52
53
|
"express": "^4.18.1",
|
|
53
54
|
"jsonwebtoken": "^9.0.1",
|
|
54
|
-
"nodejs-polars": "^0.6.0",
|
|
55
55
|
"yargs": "^17.5.1",
|
|
56
56
|
"yargs-parser": "^21.0.1"
|
|
57
57
|
},
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"c8": "^7.11.3",
|
|
65
65
|
"chai": "^4.3.6",
|
|
66
66
|
"chai-as-promised": "^7.1.1",
|
|
67
|
+
"dotenv": "^16.0.1",
|
|
67
68
|
"fs-extra": "^10.1.0",
|
|
68
69
|
"sinon": "^15.2.0",
|
|
69
|
-
"ts-node": "^10.9.1",
|
|
70
70
|
"tslib": "2.6.2",
|
|
71
71
|
"typescript": "5.1.6"
|
|
72
72
|
},
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"type": "git",
|
|
75
75
|
"url": "git+ssh://git@github.com/prosopo/provider.git"
|
|
76
76
|
},
|
|
77
|
-
"description": "
|
|
77
|
+
"description": "The easiest way to deploy the Prosopo contract and run the Provider node is via the [captcha repository](https://github.com/prosopo/captcha/).",
|
|
78
78
|
"bugs": {
|
|
79
79
|
"url": "https://github.com/prosopo/captcha/issues"
|
|
80
80
|
},
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2021-2024 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
|
+
import { ViteTestConfig } from '@prosopo/config'
|
|
15
|
+
import dotenv from 'dotenv'
|
|
16
|
+
import fs from 'fs'
|
|
17
|
+
import path from 'path'
|
|
18
|
+
process.env.NODE_ENV = 'test'
|
|
19
|
+
// if .env.test exists at this level, use it, otherwise use the one at the root
|
|
20
|
+
const envFile = `.env.${process.env.NODE_ENV || 'development'}`
|
|
21
|
+
let envPath = envFile
|
|
22
|
+
if (fs.existsSync(envFile)) {
|
|
23
|
+
envPath = path.resolve(envFile)
|
|
24
|
+
} else if (fs.existsSync(`../../${envFile}`)) {
|
|
25
|
+
envPath = path.resolve(`../../${envFile}`)
|
|
26
|
+
} else {
|
|
27
|
+
throw new Error(`No ${envFile} file found`)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
dotenv.config({ path: envPath })
|
|
31
|
+
|
|
32
|
+
export default ViteTestConfig
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const types = require("@prosopo/types");
|
|
4
|
-
const common = require("@prosopo/common");
|
|
5
|
-
const tasks = require("./tasks.cjs");
|
|
6
|
-
const util = require("../util.cjs");
|
|
7
|
-
const datasets = require("@prosopo/datasets");
|
|
8
|
-
class CalculateSolutionsTask extends tasks.Tasks {
|
|
9
|
-
constructor(env) {
|
|
10
|
-
super(env);
|
|
11
|
-
this.logger = common.getLogger(env.config.logLevel, "CalculateSolutionsTask");
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Apply new captcha solutions to captcha dataset and recalculate merkle tree
|
|
15
|
-
*/
|
|
16
|
-
async run() {
|
|
17
|
-
try {
|
|
18
|
-
const taskRunning = await util.checkIfTaskIsRunning(types.ScheduledTaskNames.CalculateSolution, this.db);
|
|
19
|
-
if (!taskRunning) {
|
|
20
|
-
const provider = (await this.contract.methods.getProvider(this.contract.pair.address, {})).value.unwrap().unwrap();
|
|
21
|
-
const unsolvedCaptchas = await this.db.getAllCaptchasByDatasetId(
|
|
22
|
-
provider.datasetId.toString(),
|
|
23
|
-
types.CaptchaStates.Unsolved
|
|
24
|
-
);
|
|
25
|
-
if (!unsolvedCaptchas) {
|
|
26
|
-
return 0;
|
|
27
|
-
}
|
|
28
|
-
const unsolvedSorted = unsolvedCaptchas.sort(datasets.captchaSort);
|
|
29
|
-
this.logger.info(`There are ${unsolvedSorted.length} unsolved CAPTCHA challenges`);
|
|
30
|
-
const requiredNumberOfSolutions = this.captchaSolutionConfig.requiredNumberOfSolutions;
|
|
31
|
-
const winningPercentage = this.captchaSolutionConfig.solutionWinningPercentage;
|
|
32
|
-
const winningNumberOfSolutions = Math.round(requiredNumberOfSolutions * (winningPercentage / 100));
|
|
33
|
-
if (unsolvedSorted && unsolvedSorted.length > 0) {
|
|
34
|
-
const captchaIds = unsolvedSorted.map((captcha) => captcha.captchaId);
|
|
35
|
-
const solutions = await this.db.getAllDappUserSolutions(captchaIds) || [];
|
|
36
|
-
const solutionsToUpdate = util.calculateNewSolutions(solutions, winningNumberOfSolutions);
|
|
37
|
-
if (solutionsToUpdate.rows().length > 0) {
|
|
38
|
-
this.logger.info(
|
|
39
|
-
`There are ${solutionsToUpdate.rows().length} CAPTCHA challenges to update with solutions`
|
|
40
|
-
);
|
|
41
|
-
try {
|
|
42
|
-
const captchaIdsToUpdate = [...solutionsToUpdate["captchaId"].values()];
|
|
43
|
-
const commitmentIds = solutions.filter((s) => captchaIdsToUpdate.indexOf(s.captchaId) > -1).map((s) => s.commitmentId);
|
|
44
|
-
const dataset = await this.db.getDataset(provider.datasetId.toString());
|
|
45
|
-
dataset.captchas = util.updateSolutions(solutionsToUpdate, dataset.captchas, this.logger);
|
|
46
|
-
await this.providerSetDataset(dataset);
|
|
47
|
-
await this.db.flagProcessedDappUserSolutions(captchaIdsToUpdate);
|
|
48
|
-
await this.db.flagProcessedDappUserCommitments(commitmentIds);
|
|
49
|
-
await this.db.removeCaptchas(captchaIdsToUpdate);
|
|
50
|
-
return solutionsToUpdate.rows().length;
|
|
51
|
-
} catch (error) {
|
|
52
|
-
this.logger.error(error);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return 0;
|
|
56
|
-
} else {
|
|
57
|
-
this.logger.info(`There are no CAPTCHA challenges that require their solutions to be updated`);
|
|
58
|
-
return 0;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return 0;
|
|
62
|
-
} catch (error) {
|
|
63
|
-
throw new common.ProsopoEnvError("GENERAL.CALCULATE_CAPTCHA_SOLUTION", { context: { error } });
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.CalculateSolutionsTask = CalculateSolutionsTask;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ProviderEnvironment } from '@prosopo/types-env';
|
|
2
|
-
import { Tasks } from './tasks.js';
|
|
3
|
-
export declare class CalculateSolutionsTask extends Tasks {
|
|
4
|
-
constructor(env: ProviderEnvironment);
|
|
5
|
-
run(): Promise<number>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=calculateSolutions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateSolutions.d.ts","sourceRoot":"","sources":["../../src/tasks/calculateSolutions.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAExD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGlC,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,GAAG,EAAE,mBAAmB;IAQ9B,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;CAoE/B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { CaptchaStates } from '@prosopo/types';
|
|
2
|
-
import { ProsopoEnvError, getLogger } from '@prosopo/common';
|
|
3
|
-
import { ScheduledTaskNames } from '@prosopo/types';
|
|
4
|
-
import { Tasks } from './tasks.js';
|
|
5
|
-
import { calculateNewSolutions, checkIfTaskIsRunning, updateSolutions } from '../util.js';
|
|
6
|
-
import { captchaSort } from '@prosopo/datasets';
|
|
7
|
-
export class CalculateSolutionsTask extends Tasks {
|
|
8
|
-
constructor(env) {
|
|
9
|
-
super(env);
|
|
10
|
-
this.logger = getLogger(env.config.logLevel, 'CalculateSolutionsTask');
|
|
11
|
-
}
|
|
12
|
-
async run() {
|
|
13
|
-
try {
|
|
14
|
-
const taskRunning = await checkIfTaskIsRunning(ScheduledTaskNames.CalculateSolution, this.db);
|
|
15
|
-
if (!taskRunning) {
|
|
16
|
-
const provider = (await this.contract.methods.getProvider(this.contract.pair.address, {})).value
|
|
17
|
-
.unwrap()
|
|
18
|
-
.unwrap();
|
|
19
|
-
const unsolvedCaptchas = await this.db.getAllCaptchasByDatasetId(provider.datasetId.toString(), CaptchaStates.Unsolved);
|
|
20
|
-
if (!unsolvedCaptchas) {
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
const unsolvedSorted = unsolvedCaptchas.sort(captchaSort);
|
|
24
|
-
this.logger.info(`There are ${unsolvedSorted.length} unsolved CAPTCHA challenges`);
|
|
25
|
-
const requiredNumberOfSolutions = this.captchaSolutionConfig.requiredNumberOfSolutions;
|
|
26
|
-
const winningPercentage = this.captchaSolutionConfig.solutionWinningPercentage;
|
|
27
|
-
const winningNumberOfSolutions = Math.round(requiredNumberOfSolutions * (winningPercentage / 100));
|
|
28
|
-
if (unsolvedSorted && unsolvedSorted.length > 0) {
|
|
29
|
-
const captchaIds = unsolvedSorted.map((captcha) => captcha.captchaId);
|
|
30
|
-
const solutions = (await this.db.getAllDappUserSolutions(captchaIds)) || [];
|
|
31
|
-
const solutionsToUpdate = calculateNewSolutions(solutions, winningNumberOfSolutions);
|
|
32
|
-
if (solutionsToUpdate.rows().length > 0) {
|
|
33
|
-
this.logger.info(`There are ${solutionsToUpdate.rows().length} CAPTCHA challenges to update with solutions`);
|
|
34
|
-
try {
|
|
35
|
-
const captchaIdsToUpdate = [...solutionsToUpdate['captchaId'].values()];
|
|
36
|
-
const commitmentIds = solutions
|
|
37
|
-
.filter((s) => captchaIdsToUpdate.indexOf(s.captchaId) > -1)
|
|
38
|
-
.map((s) => s.commitmentId);
|
|
39
|
-
const dataset = await this.db.getDataset(provider.datasetId.toString());
|
|
40
|
-
dataset.captchas = updateSolutions(solutionsToUpdate, dataset.captchas, this.logger);
|
|
41
|
-
await this.providerSetDataset(dataset);
|
|
42
|
-
await this.db.flagProcessedDappUserSolutions(captchaIdsToUpdate);
|
|
43
|
-
await this.db.flagProcessedDappUserCommitments(commitmentIds);
|
|
44
|
-
await this.db.removeCaptchas(captchaIdsToUpdate);
|
|
45
|
-
return solutionsToUpdate.rows().length;
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
this.logger.error(error);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return 0;
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
this.logger.info(`There are no CAPTCHA challenges that require their solutions to be updated`);
|
|
55
|
-
return 0;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return 0;
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
throw new ProsopoEnvError('GENERAL.CALCULATE_CAPTCHA_SOLUTION', { context: { error } });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=calculateSolutions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calculateSolutions.js","sourceRoot":"","sources":["../../src/tasks/calculateSolutions.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC7C,YAAY,GAAwB;QAChC,KAAK,CAAC,GAAG,CAAC,CAAA;QACV,IAAI,CAAC,MA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