@prosopo/cli 0.2.13 → 0.2.14
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/cli.cjs +1 -1
- package/dist/cjs/commands/dappRegister.cjs +21 -5
- package/dist/cjs/commands/dappUpdate.cjs +22 -6
- package/dist/cjs/commands/providerDataset.cjs +20 -3
- package/dist/cjs/commands/providerDetails.cjs +19 -2
- package/dist/cjs/commands/providerRegister.cjs +4 -5
- package/dist/cjs/commands/providerSetDataset.cjs +19 -2
- package/dist/cjs/commands/providerUpdate.cjs +25 -9
- package/dist/cjs/commands/validators.cjs +21 -4
- package/dist/cjs/start.cjs +7 -3
- package/dist/cli.js +1 -1
- package/dist/commands/dappRegister.d.ts.map +1 -1
- package/dist/commands/dappRegister.js +2 -2
- package/dist/commands/dappRegister.js.map +1 -1
- package/dist/commands/dappUpdate.d.ts.map +1 -1
- package/dist/commands/dappUpdate.js +2 -2
- package/dist/commands/dappUpdate.js.map +1 -1
- package/dist/commands/providerDataset.d.ts.map +1 -1
- package/dist/commands/providerDataset.js +2 -2
- package/dist/commands/providerDataset.js.map +1 -1
- package/dist/commands/providerDetails.d.ts.map +1 -1
- package/dist/commands/providerDetails.js +1 -1
- package/dist/commands/providerDetails.js.map +1 -1
- package/dist/commands/providerRegister.js +2 -2
- package/dist/commands/providerRegister.js.map +1 -1
- package/dist/commands/providerSetDataset.d.ts.map +1 -1
- package/dist/commands/providerSetDataset.js +1 -1
- package/dist/commands/providerSetDataset.js.map +1 -1
- package/dist/commands/providerUpdate.d.ts +1 -2
- package/dist/commands/providerUpdate.d.ts.map +1 -1
- package/dist/commands/providerUpdate.js +2 -2
- package/dist/commands/providerUpdate.js.map +1 -1
- package/dist/commands/validators.d.ts +2 -1
- package/dist/commands/validators.d.ts.map +1 -1
- package/dist/commands/validators.js +2 -2
- package/dist/commands/validators.js.map +1 -1
- package/dist/start.d.ts +2 -2
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +8 -3
- package/dist/start.js.map +1 -1
- package/dist/tests/bundle/bundle.test.js +1 -1
- package/dist/tests/bundle/bundle.test.js.map +1 -1
- package/package.json +12 -11
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providerUpdate.js","sourceRoot":"","sources":["../../src/commands/providerUpdate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"providerUpdate.js","sourceRoot":"","sources":["../../src/commands/providerUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAGxB,OAAO,EAAE,QAAQ,EAAU,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAA;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MA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SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;iBAC/C;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC;KAChD,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ArgumentsCamelCase } from 'yargs';
|
|
2
|
-
import { Compact
|
|
2
|
+
import { Compact } from '@polkadot/types-codec/base';
|
|
3
|
+
import { u128 } from '@polkadot/types-codec/primitive';
|
|
3
4
|
export declare const validateAddress: (argv: ArgumentsCamelCase) => {
|
|
4
5
|
address: string;
|
|
5
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/commands/validators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../src/commands/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAKpD,OAAO,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAA;AAGtD,eAAO,MAAM,eAAe,SAAU,kBAAkB;aAAc,MAAM;CAI3E,CAAA;AAED,eAAO,MAAM,gBAAgB,SAAU,kBAAkB;;CAIxD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,kBAAkB;;aAWrD,CAAA;AAED,eAAO,MAAM,aAAa,SAAU,kBAAkB;;CAMrD,CAAA;AAED,eAAO,MAAM,WAAW,SAAU,kBAAkB;;CAMnD,CAAA;AAED,eAAO,MAAM,0BAA0B,SAAU,kBAAkB;;;;CAYlE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
1
2
|
import { PayeeSchema } from '@prosopo/types';
|
|
2
3
|
import { ProsopoEnvError } from '@prosopo/common';
|
|
3
4
|
import { encodeStringAddress } from '@prosopo/provider';
|
|
4
|
-
import { lodash } from '@prosopo/util';
|
|
5
|
-
import { z } from 'zod';
|
|
5
|
+
import { lodash } from '@prosopo/util/lodash';
|
|
6
6
|
import parser from 'cron-parser';
|
|
7
7
|
export const validateAddress = (argv) => {
|
|
8
8
|
const address = encodeStringAddress(argv.address);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/commands/validators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/commands/validators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAwB,EAAuB,EAAE;IAC7E,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,OAAiB,CAAC,CAAA;IAE3D,OAAO,EAAE,OAAO,EAAE,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAwB,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,QAAkB,CAAC,CAAA;IAE5D,OAAO,EAAE,OAAO,EAAE,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAwB,EAAE,EAAE;IACtD,IAAI;QACA,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAM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QACnC,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAkB,CAAC,CAAA;QAE1D,IAAI,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE;YAChC,MAAM,IAAI,eAAe,CAAC,qBAAqB,EAAE,0BAA0B,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;SACzG;QAED,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAkB,EAAE,CAAA;KAC/C;SAAM;QACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;KAC5B;AACL,CAAC,CAAA"}
|
package/dist/start.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProsopoApiError } from '@prosopo/common';
|
|
2
2
|
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
-
import express, { Request, Response } from 'express';
|
|
4
|
-
export declare const handleErrors: (err: ProsopoApiError,
|
|
3
|
+
import express, { NextFunction, Request, Response } from 'express';
|
|
4
|
+
export declare const handleErrors: (err: ProsopoApiError | SyntaxError, request: Request, response: Response, next: NextFunction) => express.Response<any, Record<string, any>>;
|
|
5
5
|
export declare function start(env?: ProviderEnvironment): Promise<void>;
|
|
6
6
|
//# sourceMappingURL=start.d.ts.map
|
package/dist/start.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAOlD,OAAO,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAkB,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAOlD,OAAO,OAAO,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAIlE,eAAO,MAAM,YAAY,QAChB,eAAe,GAAG,WAAW,WACzB,OAAO,YACN,QAAQ,QACZ,YAAY,+CAarB,CAAA;AAkBD,wBAAsB,KAAK,CAAC,GAAG,CAAC,EAAE,mBAAmB,iBAiBpD"}
|
package/dist/start.js
CHANGED
|
@@ -21,7 +21,9 @@ import cors from 'cors';
|
|
|
21
21
|
import esMain from 'es-main';
|
|
22
22
|
import express from 'express';
|
|
23
23
|
import getConfig from './prosopo.config.js';
|
|
24
|
-
|
|
24
|
+
// We need the unused params to make express recognise this function as an error handler
|
|
25
|
+
export const handleErrors = (err, request, response, next) => {
|
|
26
|
+
const code = 'code' in err ? err.code : 400;
|
|
25
27
|
let message = err.message;
|
|
26
28
|
try {
|
|
27
29
|
message = JSON.parse(err.message);
|
|
@@ -29,7 +31,7 @@ export const handleErrors = (err, req, res) => {
|
|
|
29
31
|
catch {
|
|
30
32
|
console.debug('Invalid JSON error message');
|
|
31
33
|
}
|
|
32
|
-
return
|
|
34
|
+
return response.status(code).json({
|
|
33
35
|
message,
|
|
34
36
|
name: err.name,
|
|
35
37
|
});
|
|
@@ -53,7 +55,10 @@ export async function start(env) {
|
|
|
53
55
|
// Fail to start api if db is not defined
|
|
54
56
|
getDB();
|
|
55
57
|
const secret = getSecret();
|
|
56
|
-
const config = getConfig(
|
|
58
|
+
const config = getConfig(undefined, undefined, undefined, {
|
|
59
|
+
solved: { count: 2 },
|
|
60
|
+
unsolved: { count: 0 },
|
|
61
|
+
});
|
|
57
62
|
const pair = await getPairAsync(config.networks[config.defaultNetwork], secret, '');
|
|
58
63
|
env = new ProviderEnvironment(config, pair);
|
|
59
64
|
}
|
package/dist/start.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAmB,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,MAAM,MAAM,SAAS,CAAA;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,OAAO,EAAmB,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,IAAI,MAAM,MAAM,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MAAM,CAAC,OAAO,EAAE,GAAG,EAAE;QACxB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,6CAA6C,OAAO,EAAE,CAAC,CAAA;IAC3E,CAAC,CAAC,CAAA;AACN,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAyB;IACjD,IAAI,CAAC,GAAG,EAAE;QACN,OAAO,EAAE,CAAA;QAET,yCAAyC;QACzC,KAAK,EAAE,CAAA;QAEP,MAAM,MAAM,GAAG,SAAS,EAAE,CAAA;QAC1B,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;YACtD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;YACpB,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;SACzB,CAAC,CAAA;QACF,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAA;QACnF,GAAG,GAAG,IAAI,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;KAC9C;IACD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;IACnB,QAAQ,CAAC,GAAG,CAAC,CAAA;AACjB,CAAC;AAED,iBAAiB;AACjB,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;IACrB,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACpB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACxB,CAAC,CAAC,CAAA;CACL"}
|
|
@@ -10,7 +10,7 @@ describe('provider bundle', () => {
|
|
|
10
10
|
// get root directory of this package
|
|
11
11
|
const rootDir = dir.split('/').slice(0, -3).join('/');
|
|
12
12
|
// build bundle
|
|
13
|
-
await execPromise(`cd ${rootDir} && npm run
|
|
13
|
+
await execPromise(`cd ${rootDir} && npm run bundle:prod`);
|
|
14
14
|
// run bundle and get version
|
|
15
15
|
const { stdout: runOut, stderr: runErr } = await execPromise(`cd ${rootDir} && node dist/bundle/provider.cli.bundle.js version`);
|
|
16
16
|
assert(runOut.includes('Version:'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.test.js","sourceRoot":"","sources":["../../../src/tests/bundle/bundle.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;AAEnC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,IAAI,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,oBAAoB;QACpB,MAAM,GAAG,GAAG,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEpD,qCAAqC;QACrC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAErD,eAAe;QACf,MAAM,WAAW,CAAC,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"bundle.test.js","sourceRoot":"","sources":["../../../src/tests/bundle/bundle.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,CAAA;AAEnC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,IAAI,CAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC1C,oBAAoB;QACpB,MAAM,GAAG,GAAG,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAEpD,qCAAqC;QACrC,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QAErD,eAAe;QACf,MAAM,WAAW,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAA;QAEzD,6BAA6B;QAC7B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,WAAW,CACxD,MAAM,OAAO,qDAAqD,CACrE,CAAA;QACD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAA;IACvC,CAAC,EAAE,MAAM,CAAC,CAAA;AACd,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "CLI for Prosopo Provider",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"clean": "tsc --build --clean",
|
|
19
19
|
"build": "tsc --build --verbose",
|
|
20
20
|
"build:cjs": "npx vite --config vite.cjs.config.ts build",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"bundle:dev": "vite build --config vite.config.ts --mode development",
|
|
22
|
+
"bundle:prod": "vite build --config vite.config.ts --mode production",
|
|
23
23
|
"cli": "node ./dist/cli.js",
|
|
24
24
|
"start": "node ./dist/start.js --api",
|
|
25
25
|
"lint": "npx eslint .",
|
|
@@ -30,16 +30,17 @@
|
|
|
30
30
|
"@polkadot/types": "10.10.1",
|
|
31
31
|
"@polkadot/util": "12.5.1",
|
|
32
32
|
"@polkadot/util-crypto": "12.5.1",
|
|
33
|
-
"@prosopo/captcha-contract": "0.2.
|
|
34
|
-
"@prosopo/common": "0.2.
|
|
35
|
-
"@prosopo/contract": "0.2.
|
|
36
|
-
"@prosopo/env": "0.2.
|
|
37
|
-
"@prosopo/provider": "0.2.
|
|
38
|
-
"@prosopo/types": "0.2.
|
|
39
|
-
"@prosopo/util": "0.2.
|
|
33
|
+
"@prosopo/captcha-contract": "0.2.14",
|
|
34
|
+
"@prosopo/common": "0.2.14",
|
|
35
|
+
"@prosopo/contract": "0.2.14",
|
|
36
|
+
"@prosopo/env": "0.2.14",
|
|
37
|
+
"@prosopo/provider": "0.2.14",
|
|
38
|
+
"@prosopo/types": "0.2.14",
|
|
39
|
+
"@prosopo/util": "0.2.14",
|
|
40
40
|
"cors": "^2.8.5",
|
|
41
41
|
"cron-parser": "^4.9.0",
|
|
42
42
|
"dotenv": "^16.0.1",
|
|
43
|
+
"es-main": "^1.3.0",
|
|
43
44
|
"yargs": "^17.7.2",
|
|
44
45
|
"zod": "^3.22.4"
|
|
45
46
|
},
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"express": "^4.18.2",
|
|
49
50
|
"vite": "^4.5.0",
|
|
50
51
|
"vitest": "^0.34.6",
|
|
51
|
-
"@prosopo/config": "0.2.
|
|
52
|
+
"@prosopo/config": "0.2.14",
|
|
52
53
|
"@types/cors": "^2.8.14",
|
|
53
54
|
"tslib": "2.6.2",
|
|
54
55
|
"typescript": "5.1.6"
|
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const typechainTypes = require("@727-ventures/typechain-types");
|
|
3
|
-
class Methods {
|
|
4
|
-
constructor(nativeContract, apiPromise) {
|
|
5
|
-
this.__nativeContract = nativeContract;
|
|
6
|
-
this.__apiPromise = apiPromise;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* getGitCommitId
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
getGitCommitId(__options) {
|
|
13
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getGitCommitId", [], __options);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* getAdmin
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
getAdmin(__options) {
|
|
20
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getAdmin", [], __options);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* getPayees
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
getPayees(__options) {
|
|
27
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getPayees", [], __options);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* getDappPayees
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
getDappPayees(__options) {
|
|
34
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getDappPayees", [], __options);
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* getStatuses
|
|
38
|
-
*
|
|
39
|
-
*/
|
|
40
|
-
getStatuses(__options) {
|
|
41
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getStatuses", [], __options);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* getProviderStakeThreshold
|
|
45
|
-
*
|
|
46
|
-
*/
|
|
47
|
-
getProviderStakeThreshold(__options) {
|
|
48
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getProviderStakeThreshold", [], __options);
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* getDappStakeThreshold
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
getDappStakeThreshold(__options) {
|
|
55
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getDappStakeThreshold", [], __options);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* getMaxProviderFee
|
|
59
|
-
*
|
|
60
|
-
*/
|
|
61
|
-
getMaxProviderFee(__options) {
|
|
62
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getMaxProviderFee", [], __options);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* getMinNumActiveProviders
|
|
66
|
-
*
|
|
67
|
-
*/
|
|
68
|
-
getMinNumActiveProviders(__options) {
|
|
69
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getMinNumActiveProviders", [], __options);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* getBlockTime
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
getBlockTime(__options) {
|
|
76
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getBlockTime", [], __options);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* getMaxUserHistoryAgeSeconds
|
|
80
|
-
*
|
|
81
|
-
*/
|
|
82
|
-
getMaxUserHistoryAgeSeconds(__options) {
|
|
83
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getMaxUserHistoryAgeSeconds", [], __options);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* getMaxUserHistoryLen
|
|
87
|
-
*
|
|
88
|
-
*/
|
|
89
|
-
getMaxUserHistoryLen(__options) {
|
|
90
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getMaxUserHistoryLen", [], __options);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* getMaxUserHistoryAgeBlocks
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
getMaxUserHistoryAgeBlocks(__options) {
|
|
97
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getMaxUserHistoryAgeBlocks", [], __options);
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* providerRegister
|
|
101
|
-
*
|
|
102
|
-
* @param { Array<(number | string | BN)> } url,
|
|
103
|
-
* @param { (number | string | BN) } fee,
|
|
104
|
-
* @param { ArgumentTypes.Payee } payee,
|
|
105
|
-
*/
|
|
106
|
-
providerRegister(url, fee, payee, __options) {
|
|
107
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerRegister", [url, fee, payee], __options);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* providerUpdate
|
|
111
|
-
*
|
|
112
|
-
* @param { Array<(number | string | BN)> } url,
|
|
113
|
-
* @param { (number | string | BN) } fee,
|
|
114
|
-
* @param { ArgumentTypes.Payee } payee,
|
|
115
|
-
*/
|
|
116
|
-
providerUpdate(url, fee, payee, __options) {
|
|
117
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerUpdate", [url, fee, payee], __options);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* providerDeactivate
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
123
|
-
providerDeactivate(__options) {
|
|
124
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerDeactivate", [], __options);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* providerDeregister
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
providerDeregister(__options) {
|
|
131
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerDeregister", [], __options);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* getProvider
|
|
135
|
-
*
|
|
136
|
-
* @param { ArgumentTypes.AccountId } account,
|
|
137
|
-
*/
|
|
138
|
-
getProvider(account, __options) {
|
|
139
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getProvider", [account], __options);
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* providerFund
|
|
143
|
-
*
|
|
144
|
-
*/
|
|
145
|
-
providerFund(__options) {
|
|
146
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerFund", [], __options);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* providerSetDataset
|
|
150
|
-
*
|
|
151
|
-
* @param { ArgumentTypes.Hash } datasetId,
|
|
152
|
-
* @param { ArgumentTypes.Hash } datasetIdContent,
|
|
153
|
-
*/
|
|
154
|
-
providerSetDataset(datasetId, datasetIdContent, __options) {
|
|
155
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerSetDataset", [datasetId, datasetIdContent], __options);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* getDapp
|
|
159
|
-
*
|
|
160
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
161
|
-
*/
|
|
162
|
-
getDapp(contract, __options) {
|
|
163
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getDapp", [contract], __options);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* dappRegister
|
|
167
|
-
*
|
|
168
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
169
|
-
* @param { ArgumentTypes.DappPayee } payee,
|
|
170
|
-
*/
|
|
171
|
-
dappRegister(contract, payee, __options) {
|
|
172
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappRegister", [contract, payee], __options);
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* dappUpdate
|
|
176
|
-
*
|
|
177
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
178
|
-
* @param { ArgumentTypes.DappPayee } payee,
|
|
179
|
-
* @param { ArgumentTypes.AccountId } owner,
|
|
180
|
-
*/
|
|
181
|
-
dappUpdate(contract, payee, owner, __options) {
|
|
182
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappUpdate", [contract, payee, owner], __options);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* dappFund
|
|
186
|
-
*
|
|
187
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
188
|
-
*/
|
|
189
|
-
dappFund(contract, __options) {
|
|
190
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappFund", [contract], __options);
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* dappDeregister
|
|
194
|
-
*
|
|
195
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
196
|
-
*/
|
|
197
|
-
dappDeregister(contract, __options) {
|
|
198
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappDeregister", [contract], __options);
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* dappDeactivate
|
|
202
|
-
*
|
|
203
|
-
* @param { ArgumentTypes.AccountId } contract,
|
|
204
|
-
*/
|
|
205
|
-
dappDeactivate(contract, __options) {
|
|
206
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappDeactivate", [contract], __options);
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* getUserHistorySummary
|
|
210
|
-
*
|
|
211
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
212
|
-
*/
|
|
213
|
-
getUserHistorySummary(userAccount, __options) {
|
|
214
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getUserHistorySummary", [userAccount], __options);
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* providerCommit
|
|
218
|
-
*
|
|
219
|
-
* @param { ArgumentTypes.Commit } commit,
|
|
220
|
-
*/
|
|
221
|
-
providerCommit(commit, __options) {
|
|
222
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerCommit", [commit], __options);
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* providerCommitMany
|
|
226
|
-
*
|
|
227
|
-
* @param { Array<ArgumentTypes.Commit> } commits,
|
|
228
|
-
*/
|
|
229
|
-
providerCommitMany(commits, __options) {
|
|
230
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "providerCommitMany", [commits], __options);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* dappOperatorIsHumanUser
|
|
234
|
-
*
|
|
235
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
236
|
-
* @param { (number | string | BN) } threshold,
|
|
237
|
-
*/
|
|
238
|
-
dappOperatorIsHumanUser(userAccount, threshold, __options) {
|
|
239
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappOperatorIsHumanUser", [userAccount, threshold], __options);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* dappOperatorLastCorrectCaptcha
|
|
243
|
-
*
|
|
244
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
245
|
-
*/
|
|
246
|
-
dappOperatorLastCorrectCaptcha(userAccount, __options) {
|
|
247
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "dappOperatorLastCorrectCaptcha", [userAccount], __options);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* getCaptchaData
|
|
251
|
-
*
|
|
252
|
-
* @param { ArgumentTypes.Hash } datasetId,
|
|
253
|
-
*/
|
|
254
|
-
getCaptchaData(datasetId, __options) {
|
|
255
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getCaptchaData", [datasetId], __options);
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* getUser
|
|
259
|
-
*
|
|
260
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
261
|
-
*/
|
|
262
|
-
getUser(userAccount, __options) {
|
|
263
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getUser", [userAccount], __options);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* getCommit
|
|
267
|
-
*
|
|
268
|
-
* @param { ArgumentTypes.Hash } commitId,
|
|
269
|
-
*/
|
|
270
|
-
getCommit(commitId, __options) {
|
|
271
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getCommit", [commitId], __options);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* listProvidersByAccounts
|
|
275
|
-
*
|
|
276
|
-
* @param { Array<ArgumentTypes.AccountId> } providerAccounts,
|
|
277
|
-
*/
|
|
278
|
-
listProvidersByAccounts(providerAccounts, __options) {
|
|
279
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "listProvidersByAccounts", [providerAccounts], __options);
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* listProvidersByStatus
|
|
283
|
-
*
|
|
284
|
-
* @param { Array<ArgumentTypes.GovernanceStatus> } statuses,
|
|
285
|
-
*/
|
|
286
|
-
listProvidersByStatus(statuses, __options) {
|
|
287
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "listProvidersByStatus", [statuses], __options);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* getRandomActiveProvider
|
|
291
|
-
*
|
|
292
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
293
|
-
* @param { ArgumentTypes.AccountId } dappContract,
|
|
294
|
-
*/
|
|
295
|
-
getRandomActiveProvider(userAccount, dappContract, __options) {
|
|
296
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getRandomActiveProvider", [userAccount, dappContract], __options);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* getAllProviderAccounts
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
getAllProviderAccounts(__options) {
|
|
303
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getAllProviderAccounts", [], __options);
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* getRandomNumber
|
|
307
|
-
*
|
|
308
|
-
* @param { (string | number | BN) } len,
|
|
309
|
-
* @param { ArgumentTypes.AccountId } userAccount,
|
|
310
|
-
* @param { ArgumentTypes.AccountId } dappContract,
|
|
311
|
-
*/
|
|
312
|
-
getRandomNumber(len, userAccount, dappContract, __options) {
|
|
313
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "getRandomNumber", [len, userAccount, dappContract], __options);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* terminate
|
|
317
|
-
*
|
|
318
|
-
*/
|
|
319
|
-
terminate(__options) {
|
|
320
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "terminate", [], __options);
|
|
321
|
-
}
|
|
322
|
-
/**
|
|
323
|
-
* withdraw
|
|
324
|
-
*
|
|
325
|
-
* @param { (string | number | BN) } amount,
|
|
326
|
-
*/
|
|
327
|
-
withdraw(amount, __options) {
|
|
328
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "withdraw", [amount], __options);
|
|
329
|
-
}
|
|
330
|
-
/**
|
|
331
|
-
* setCodeHash
|
|
332
|
-
*
|
|
333
|
-
* @param { Array<(number | string | BN)> } codeHash,
|
|
334
|
-
*/
|
|
335
|
-
setCodeHash(codeHash, __options) {
|
|
336
|
-
return typechainTypes.buildSubmittableExtrinsic(this.__apiPromise, this.__nativeContract, "setCodeHash", [codeHash], __options);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
module.exports = Methods;
|