@prosopo/cli 0.1.16 → 0.1.17
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/argv.d.ts +13 -2
- package/dist/argv.d.ts.map +1 -1
- package/dist/argv.js +22 -311
- package/dist/argv.js.map +1 -1
- package/dist/cli.js +35 -25
- package/dist/cli.js.map +1 -1
- package/dist/commands/batchCommit.d.ts +21 -0
- package/dist/commands/batchCommit.d.ts.map +1 -0
- package/dist/commands/batchCommit.js +37 -0
- package/dist/commands/batchCommit.js.map +1 -0
- package/dist/commands/calculateCaptchaSolutions.d.ts +21 -0
- package/dist/commands/calculateCaptchaSolutions.d.ts.map +1 -0
- package/dist/commands/calculateCaptchaSolutions.js +32 -0
- package/dist/commands/calculateCaptchaSolutions.js.map +1 -0
- package/dist/commands/dappAccounts.d.ts +14 -0
- package/dist/commands/dappAccounts.d.ts.map +1 -0
- package/dist/commands/dappAccounts.js +25 -0
- package/dist/commands/dappAccounts.js.map +1 -0
- package/dist/commands/dappDetails.d.ts +16 -0
- package/dist/commands/dappDetails.d.ts.map +1 -0
- package/dist/commands/dappDetails.js +32 -0
- package/dist/commands/dappDetails.js.map +1 -0
- package/dist/commands/dappRegister.d.ts +18 -0
- package/dist/commands/dappRegister.d.ts.map +1 -0
- package/dist/commands/dappRegister.js +45 -0
- package/dist/commands/dappRegister.js.map +1 -0
- package/dist/commands/dappUpdate.d.ts +18 -0
- package/dist/commands/dappUpdate.d.ts.map +1 -0
- package/dist/commands/dappUpdate.js +47 -0
- package/dist/commands/dappUpdate.js.map +1 -0
- package/dist/commands/index.d.ts +15 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +15 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/providerAccounts.d.ts +9 -0
- package/dist/commands/providerAccounts.d.ts.map +1 -0
- package/dist/commands/providerAccounts.js +24 -0
- package/dist/commands/providerAccounts.js.map +1 -0
- package/dist/commands/providerDataset.d.ts +13 -0
- package/dist/commands/providerDataset.d.ts.map +1 -0
- package/dist/commands/providerDataset.js +44 -0
- package/dist/commands/providerDataset.js.map +1 -0
- package/dist/commands/providerDeregister.d.ts +16 -0
- package/dist/commands/providerDeregister.d.ts.map +1 -0
- package/dist/commands/providerDeregister.js +30 -0
- package/dist/commands/providerDeregister.js.map +1 -0
- package/dist/commands/providerDetails.d.ts +16 -0
- package/dist/commands/providerDetails.d.ts.map +1 -0
- package/dist/commands/providerDetails.js +30 -0
- package/dist/commands/providerDetails.js.map +1 -0
- package/dist/commands/providerRegister.d.ts +9 -0
- package/dist/commands/providerRegister.d.ts.map +1 -0
- package/dist/commands/providerRegister.js +60 -0
- package/dist/commands/providerRegister.js.map +1 -0
- package/dist/commands/providerSetDataset.d.ts +14 -0
- package/dist/commands/providerSetDataset.d.ts.map +1 -0
- package/dist/commands/providerSetDataset.js +32 -0
- package/dist/commands/providerSetDataset.js.map +1 -0
- package/dist/commands/providerUpdate.d.ts +18 -0
- package/dist/commands/providerUpdate.d.ts.map +1 -0
- package/dist/commands/providerUpdate.js +51 -0
- package/dist/commands/providerUpdate.js.map +1 -0
- package/dist/commands/validators.d.ts +22 -0
- package/dist/commands/validators.d.ts.map +1 -0
- package/dist/commands/validators.js +51 -0
- package/dist/commands/validators.js.map +1 -0
- package/dist/commands/version.d.ts +12 -0
- package/dist/commands/version.d.ts.map +1 -0
- package/dist/commands/version.js +13 -0
- package/dist/commands/version.js.map +1 -0
- package/dist/env.d.ts +1 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +30 -20
- package/dist/env.js.map +1 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +22 -17
- package/dist/files.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -12
- package/dist/index.js.map +1 -1
- package/dist/process.env.d.ts +1 -8
- package/dist/process.env.d.ts.map +1 -1
- package/dist/process.env.js +18 -38
- package/dist/process.env.js.map +1 -1
- package/dist/prosopo.config.d.ts.map +1 -1
- package/dist/prosopo.config.js +27 -12
- package/dist/prosopo.config.js.map +1 -1
- package/dist/start.d.ts +2 -0
- package/dist/start.d.ts.map +1 -1
- package/dist/start.js +27 -54
- package/dist/start.js.map +1 -1
- package/package.json +24 -11
- package/vite.config.ts +25 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
export default (pair, config, cmdArgs) => {
|
|
5
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.dapp_accounts');
|
|
6
|
+
return {
|
|
7
|
+
command: 'dapp_accounts',
|
|
8
|
+
describe: 'List all dapp accounts',
|
|
9
|
+
builder: (yargs) => yargs,
|
|
10
|
+
handler: async () => {
|
|
11
|
+
try {
|
|
12
|
+
const env = new ProviderEnvironment(pair, config);
|
|
13
|
+
await env.isReady();
|
|
14
|
+
const tasks = new Tasks(env);
|
|
15
|
+
const result = await tasks.contract.contract['dappAccounts']();
|
|
16
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
logger.error(err);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
middlewares: [],
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=dappAccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappAccounts.js","sourceRoot":"","sources":["../../src/commands/dappAccounts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAA;IAE5F,OAAO;QACH,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,wBAAwB;QAClC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAChB,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBAEjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAA;gBAE9D,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,EAAE;KAClB,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: ((argv: any) => {
|
|
12
|
+
address: string;
|
|
13
|
+
})[];
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=dappDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappDetails.d.ts","sourceRoot":"","sources":["../../src/commands/dappDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAIxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;AAAvF,wBA4BC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { validateAddress } from './validators.js';
|
|
5
|
+
export default (pair, config, cmdArgs) => {
|
|
6
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.dapp_details');
|
|
7
|
+
return {
|
|
8
|
+
command: 'dapp_details',
|
|
9
|
+
describe: 'List details of a single Dapp',
|
|
10
|
+
builder: (yargs) => yargs.option('address', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
demand: true,
|
|
13
|
+
desc: 'The AccountId of the Dapp',
|
|
14
|
+
}),
|
|
15
|
+
handler: async (argv) => {
|
|
16
|
+
try {
|
|
17
|
+
const env = new ProviderEnvironment(pair, config);
|
|
18
|
+
await env.isReady();
|
|
19
|
+
const tasks = new Tasks(env);
|
|
20
|
+
const result = (await tasks.contract.query.getDapp(validateAddress(argv.address).address)).value
|
|
21
|
+
.unwrap()
|
|
22
|
+
.unwrap();
|
|
23
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
logger.error(err);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
middlewares: [validateAddress],
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=dappDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappDetails.js","sourceRoot":"","sources":["../../src/commands/dappDetails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAA;IAE3F,OAAO;QACH,OAAO,EAAE,cAAc;QACvB,QAAQ,EAAE,+BAA+B;QACzC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;YACpB,IAAI,EAAE,QAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;SAC3B,CAAC;QACf,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBACjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,MAAM,GAAG,CAAC,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;qBAC3F,MAAM,EAAE;qBACR,MAAM,EAAE,CAAA;gBAEb,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,CAAC,eAAe,CAAC;KACjC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: (((argv: any) => {
|
|
12
|
+
address: string;
|
|
13
|
+
}) | ((argv: any) => {
|
|
14
|
+
payee: import("@prosopo/types").Payee;
|
|
15
|
+
} | undefined))[];
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=dappRegister.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappRegister.d.ts","sourceRoot":"","sources":["../../src/commands/dappRegister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAMxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;AAAvF,wBAwCC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { validateContract, validatePayee } from './validators.js';
|
|
5
|
+
import { wrapQuery } from '@prosopo/contract';
|
|
6
|
+
export default (pair, config, cmdArgs) => {
|
|
7
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.dapp_register');
|
|
8
|
+
return {
|
|
9
|
+
command: 'dapp_register',
|
|
10
|
+
describe: 'Register a Dapp',
|
|
11
|
+
builder: (yargs) => yargs
|
|
12
|
+
.option('contract', {
|
|
13
|
+
type: 'string',
|
|
14
|
+
demand: true,
|
|
15
|
+
desc: 'The AccountId of the Dapp',
|
|
16
|
+
})
|
|
17
|
+
.option('payee', {
|
|
18
|
+
type: 'string',
|
|
19
|
+
demand: true,
|
|
20
|
+
desc: 'The person who receives the fee (`Provider` or `Dapp`)',
|
|
21
|
+
}),
|
|
22
|
+
handler: async (argv) => {
|
|
23
|
+
try {
|
|
24
|
+
const env = new ProviderEnvironment(pair, config);
|
|
25
|
+
await env.isReady();
|
|
26
|
+
const tasks = new Tasks(env);
|
|
27
|
+
const dappRegisterArgs = [
|
|
28
|
+
argv.contract,
|
|
29
|
+
argv.payee,
|
|
30
|
+
{
|
|
31
|
+
value: 0,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
await wrapQuery(tasks.contract.query.dappRegister, tasks.contract.query)(...dappRegisterArgs);
|
|
35
|
+
const result = await tasks.contract.tx.dappRegister(...dappRegisterArgs);
|
|
36
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
logger.error(err);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
middlewares: [validateContract, validatePayee],
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=dappRegister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappRegister.js","sourceRoot":"","sources":["../../src/commands/dappRegister.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAA;IAE5F,OAAO;QACH,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,iBAAiB;QAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,KAAK;aACA,MAAM,CAAC,UAAU,EAAE;YAChB,IAAI,EAAE,QAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2B;SAC3B,CAAC;aACV,MAAM,CAAC,OAAO,EAAE;YACb,IAAI,EAAE,QAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,wDAAwD;SACxD,CAAC;QACnB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBACjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,gBAAgB,GAAyD;oBAC3E,IAAI,CAAC,QAAQ;oBACb,IAAI,CAAC,KAAK;oBACV;wBACI,KAAK,EAAE,CAAC;qBACX;iBACJ,CAAA;gBACD,MAAM,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAA;gBAC7F,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,GAAG,gBAAgB,CAAC,CAAA;gBAExE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,CAAC,gBAAgB,EAAE,aAAa,CAAC;KACjD,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: (((argv: any) => {
|
|
12
|
+
address: string;
|
|
13
|
+
}) | ((argv: any) => {
|
|
14
|
+
payee: import("@prosopo/types").Payee;
|
|
15
|
+
} | undefined))[];
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
18
|
+
//# sourceMappingURL=dappUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappUpdate.d.ts","sourceRoot":"","sources":["../../src/commands/dappUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAMxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;AAAvF,wBA0CC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { validateContract, validatePayee } from './validators.js';
|
|
5
|
+
import { wrapQuery } from '@prosopo/contract';
|
|
6
|
+
export default (pair, config, cmdArgs) => {
|
|
7
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.dapp_update');
|
|
8
|
+
return {
|
|
9
|
+
command: 'dapp_update',
|
|
10
|
+
describe: 'Register a Dapp',
|
|
11
|
+
builder: (yargs) => yargs
|
|
12
|
+
.option('contract', {
|
|
13
|
+
type: 'string',
|
|
14
|
+
demand: true,
|
|
15
|
+
desc: 'The AccountId of the Dapp',
|
|
16
|
+
})
|
|
17
|
+
.option('payee', {
|
|
18
|
+
type: 'string',
|
|
19
|
+
demand: true,
|
|
20
|
+
desc: 'The person who receives the fee (`Provider` or `Dapp`)',
|
|
21
|
+
}),
|
|
22
|
+
handler: async (argv) => {
|
|
23
|
+
try {
|
|
24
|
+
const env = new ProviderEnvironment(pair, config);
|
|
25
|
+
await env.isReady();
|
|
26
|
+
const tasks = new Tasks(env);
|
|
27
|
+
const stakeThreshold = (await tasks.contract.query.getDappStakeThreshold({})).value.unwrap();
|
|
28
|
+
const dappRegisterArgs = [
|
|
29
|
+
argv.contract,
|
|
30
|
+
argv.payee,
|
|
31
|
+
argv.owner,
|
|
32
|
+
{
|
|
33
|
+
value: stakeThreshold.toNumber(),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
await wrapQuery(tasks.contract.query.dappUpdate, tasks.contract.query)(...dappRegisterArgs);
|
|
37
|
+
const result = await tasks.contract.tx.dappUpdate(...dappRegisterArgs);
|
|
38
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
logger.error(err);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
middlewares: [validateContract, validatePayee],
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=dappUpdate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dappUpdate.js","sourceRoot":"","sources":["../../src/commands/dappUpdate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE7C,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAA;IAE1F,OAAO;QACH,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,iBAAiB;QAC3B,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,KAAK;aACA,MAAM,CAAC,UAAU,EAAE;YAChB,IAAI,EAAE,QAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,2BAA2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0,0 +1,15 @@
|
|
|
1
|
+
export { default as commandBatchCommit } from './batchCommit.js';
|
|
2
|
+
export { default as commandCalculateCaptchaSolutions } from './calculateCaptchaSolutions.js';
|
|
3
|
+
export { default as commandDappAccounts } from './dappAccounts.js';
|
|
4
|
+
export { default as commandDappDetails } from './dappDetails.js';
|
|
5
|
+
export { default as commandDappUpdate } from './dappUpdate.js';
|
|
6
|
+
export { default as commandDappRegister } from './dappRegister.js';
|
|
7
|
+
export { default as commandProviderAccounts } from './providerAccounts.js';
|
|
8
|
+
export { default as commandProviderDataset } from './providerDataset.js';
|
|
9
|
+
export { default as commandProviderDetails } from './providerDetails.js';
|
|
10
|
+
export { default as commandProviderDeregister } from './providerDeregister.js';
|
|
11
|
+
export { default as commandProviderRegister } from './providerRegister.js';
|
|
12
|
+
export { default as commandProviderSetDataset } from './providerSetDataset.js';
|
|
13
|
+
export { default as commandProviderUpdate } from './providerUpdate.js';
|
|
14
|
+
export { default as commandVersion } from './version.js';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,gCAAgC,CAAA;AAC5F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as commandBatchCommit } from './batchCommit.js';
|
|
2
|
+
export { default as commandCalculateCaptchaSolutions } from './calculateCaptchaSolutions.js';
|
|
3
|
+
export { default as commandDappAccounts } from './dappAccounts.js';
|
|
4
|
+
export { default as commandDappDetails } from './dappDetails.js';
|
|
5
|
+
export { default as commandDappUpdate } from './dappUpdate.js';
|
|
6
|
+
export { default as commandDappRegister } from './dappRegister.js';
|
|
7
|
+
export { default as commandProviderAccounts } from './providerAccounts.js';
|
|
8
|
+
export { default as commandProviderDataset } from './providerDataset.js';
|
|
9
|
+
export { default as commandProviderDetails } from './providerDetails.js';
|
|
10
|
+
export { default as commandProviderDeregister } from './providerDeregister.js';
|
|
11
|
+
export { default as commandProviderRegister } from './providerRegister.js';
|
|
12
|
+
export { default as commandProviderSetDataset } from './providerSetDataset.js';
|
|
13
|
+
export { default as commandProviderUpdate } from './providerUpdate.js';
|
|
14
|
+
export { default as commandVersion } from './version.js';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,gCAAgC,EAAE,MAAM,gCAAgC,CAAA;AAC5F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommandModule } from 'yargs';
|
|
2
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
3
|
+
import { Logger } from '@prosopo/common';
|
|
4
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
5
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
6
|
+
logger?: Logger;
|
|
7
|
+
}) => CommandModule;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=providerAccounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerAccounts.d.ts","sourceRoot":"","sources":["../../src/commands/providerAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAGxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,aAAa;AAAvG,wBAmBC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
export default (pair, config, cmdArgs) => {
|
|
5
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.provider_accounts');
|
|
6
|
+
return {
|
|
7
|
+
command: 'provider_accounts',
|
|
8
|
+
describe: 'List all provider accounts',
|
|
9
|
+
builder: (yargs) => yargs,
|
|
10
|
+
handler: async () => {
|
|
11
|
+
try {
|
|
12
|
+
const env = new ProviderEnvironment(pair, config);
|
|
13
|
+
await env.isReady();
|
|
14
|
+
const tasks = new Tasks(env);
|
|
15
|
+
const result = await tasks.contract.contract['providerAccounts']();
|
|
16
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
logger.error(err);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=providerAccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerAccounts.js","sourceRoot":"","sources":["../../src/commands/providerAccounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAiB,EAAE;IACtG,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAA;IAEhG,OAAO;QACH,OAAO,EAAE,mBAAmB;QAC5B,QAAQ,EAAE,4BAA4B;QACtC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAChB,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBACjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAA;gBAClE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;KACJ,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=providerDataset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDataset.d.ts","sourceRoot":"","sources":["../../src/commands/providerDataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAIxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;AAAvF,wBAsCC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { writeJSONFile } from '../files.js';
|
|
5
|
+
export default (pair, config, cmdArgs) => {
|
|
6
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.provider_dataset');
|
|
7
|
+
return {
|
|
8
|
+
command: 'provider_dataset',
|
|
9
|
+
describe: 'Exports a dataset from the provider database',
|
|
10
|
+
builder: (yargs) => yargs
|
|
11
|
+
.option('dataset-id', {
|
|
12
|
+
type: 'string',
|
|
13
|
+
demand: false,
|
|
14
|
+
desc: 'The dataset ID to export',
|
|
15
|
+
})
|
|
16
|
+
.option('file', {
|
|
17
|
+
type: 'string',
|
|
18
|
+
demand: true,
|
|
19
|
+
desc: 'The file path to export the dataset to',
|
|
20
|
+
}),
|
|
21
|
+
handler: async (argv) => {
|
|
22
|
+
try {
|
|
23
|
+
const env = new ProviderEnvironment(pair, config);
|
|
24
|
+
await env.isReady();
|
|
25
|
+
const tasks = new Tasks(env);
|
|
26
|
+
let datasetId = argv.datasetId;
|
|
27
|
+
if (datasetId === undefined) {
|
|
28
|
+
const providerAddress = env.config.account.address;
|
|
29
|
+
const provider = (await tasks.contract.query.getProvider(providerAddress)).value.unwrap().unwrap();
|
|
30
|
+
logger.info(`Getting dataset ID from provider ${providerAddress}`);
|
|
31
|
+
datasetId = provider.datasetId.toString();
|
|
32
|
+
}
|
|
33
|
+
// get the dataset from the provider database
|
|
34
|
+
const result = await tasks.getProviderDataset(datasetId);
|
|
35
|
+
// export the result to file
|
|
36
|
+
await writeJSONFile(argv.file, result);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
logger.error(err);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=providerDataset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDataset.js","sourceRoot":"","sources":["../../src/commands/providerDataset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAA;IAC/F,OAAO;QACH,OAAO,EAAE,kBAAkB;QAC3B,QAAQ,EAAE,8CAA8C;QACxD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,KAAK;aACA,MAAM,CAAC,YAAY,EAAE;YAClB,IAAI,EAAE,QAAiB;YACvB,MAAM,EAA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
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: ((argv: any) => {
|
|
12
|
+
address: string;
|
|
13
|
+
})[];
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=providerDeregister.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDeregister.d.ts","sourceRoot":"","sources":["../../src/commands/providerDeregister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAIxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;AAAvF,wBA0BC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { validateAddress } from './validators.js';
|
|
5
|
+
export default (pair, config, cmdArgs) => {
|
|
6
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.provider_deregister');
|
|
7
|
+
return {
|
|
8
|
+
command: 'provider_deregister',
|
|
9
|
+
describe: 'Deregister a Provider',
|
|
10
|
+
builder: (yargs) => yargs.option('address', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
demand: true,
|
|
13
|
+
desc: 'The AccountId of the Provider',
|
|
14
|
+
}),
|
|
15
|
+
handler: async (argv) => {
|
|
16
|
+
try {
|
|
17
|
+
const env = new ProviderEnvironment(pair, config);
|
|
18
|
+
await env.isReady();
|
|
19
|
+
const tasks = new Tasks(env);
|
|
20
|
+
await tasks.contract.tx.providerDeregister(argv.address);
|
|
21
|
+
logger.info('Provider registered');
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
logger.error(err);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
middlewares: [validateAddress],
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=providerDeregister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDeregister.js","sourceRoot":"","sources":["../../src/commands/providerDeregister.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,eAAe,CAAC,IAAiB,EAAE,MAAqB,EAAE,OAA6B,EAAE,EAAE;IACvF,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAA;IAElG,OAAO;QACH,OAAO,EAAE,qBAAqB;QAC9B,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;YACpB,IAAI,EAAE,QAAiB;YACvB,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,+BAA+B;SAC/B,CAAC;QACf,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI;gBACA,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBACjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;gBAExD,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;aACrC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,CAAC,eAAe,CAAC;KACjC,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: ((argv: any) => {
|
|
12
|
+
address: string;
|
|
13
|
+
})[];
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=providerDetails.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDetails.d.ts","sourceRoot":"","sources":["../../src/commands/providerDetails.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAIxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;AAAvF,wBAwBC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
2
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
3
|
+
import { Tasks } from '@prosopo/provider';
|
|
4
|
+
import { validateAddress } from './validators.js';
|
|
5
|
+
export default (pair, config, cmdArgs) => {
|
|
6
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.provider_details');
|
|
7
|
+
return {
|
|
8
|
+
command: 'provider_details',
|
|
9
|
+
describe: 'List details of a single Provider',
|
|
10
|
+
builder: (yargs) => yargs.option('address', {
|
|
11
|
+
type: 'string',
|
|
12
|
+
demand: true,
|
|
13
|
+
desc: 'The AccountId of the Provider',
|
|
14
|
+
}),
|
|
15
|
+
handler: async (argv) => {
|
|
16
|
+
try {
|
|
17
|
+
const env = new ProviderEnvironment(pair, config);
|
|
18
|
+
await env.isReady();
|
|
19
|
+
const tasks = new Tasks(env);
|
|
20
|
+
const result = (await tasks.contract.query.getProvider(argv.address, {})).value.unwrap().unwrap();
|
|
21
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
logger.error(err);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
middlewares: [validateAddress],
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=providerDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerDetails.js","sourceRoot":"","sources":["../../src/commands/providerDetails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,eAAe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types';
|
|
3
|
+
import { Logger } from '@prosopo/common';
|
|
4
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
5
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
6
|
+
logger?: Logger;
|
|
7
|
+
}) => CommandModule<{}, {}>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=providerRegister.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerRegister.d.ts","sourceRoot":"","sources":["../../src/commands/providerRegister.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAS,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAW/B,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AAAvF,wBA8CC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { LogLevelSchema, getLogger } from '@prosopo/common';
|
|
3
|
+
import { Payee } from '@prosopo/types';
|
|
4
|
+
import { ProviderEnvironment } from '@prosopo/env';
|
|
5
|
+
import { Tasks } from '@prosopo/provider';
|
|
6
|
+
import { stringToU8a } from '@polkadot/util';
|
|
7
|
+
import { validateFee, validatePayee } from './validators.js';
|
|
8
|
+
import { wrapQuery } from '@prosopo/contract';
|
|
9
|
+
const providerRegisterArgsParser = z.object({
|
|
10
|
+
url: z.string(),
|
|
11
|
+
fee: z.number(),
|
|
12
|
+
payee: z.nativeEnum(Payee),
|
|
13
|
+
});
|
|
14
|
+
export default (pair, config, cmdArgs) => {
|
|
15
|
+
const logger = cmdArgs?.logger || getLogger(LogLevelSchema.Values.Info, 'cli.provider_register');
|
|
16
|
+
return {
|
|
17
|
+
command: 'provider_register',
|
|
18
|
+
describe: 'Register a Provider',
|
|
19
|
+
builder: (yargs) => yargs
|
|
20
|
+
.option('url', {
|
|
21
|
+
type: 'string',
|
|
22
|
+
demand: true,
|
|
23
|
+
desc: 'The provider service origin (URI)',
|
|
24
|
+
})
|
|
25
|
+
.option('fee', {
|
|
26
|
+
type: 'number',
|
|
27
|
+
demand: true,
|
|
28
|
+
desc: 'The fee to pay per solved captcha',
|
|
29
|
+
})
|
|
30
|
+
.option('payee', {
|
|
31
|
+
type: 'string',
|
|
32
|
+
demand: true,
|
|
33
|
+
desc: 'The person who receives the fee (`Provider` or `Dapp`)',
|
|
34
|
+
}),
|
|
35
|
+
handler: async (argv) => {
|
|
36
|
+
try {
|
|
37
|
+
const parsedArgs = providerRegisterArgsParser.parse(argv);
|
|
38
|
+
const env = new ProviderEnvironment(pair, config);
|
|
39
|
+
await env.isReady();
|
|
40
|
+
const tasks = new Tasks(env);
|
|
41
|
+
const providerRegisterArgs = [
|
|
42
|
+
Array.from(stringToU8a(parsedArgs.url)),
|
|
43
|
+
parsedArgs.fee,
|
|
44
|
+
parsedArgs.payee,
|
|
45
|
+
{
|
|
46
|
+
value: 0,
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
await wrapQuery(tasks.contract.query.providerRegister, tasks.contract.query)(...providerRegisterArgs);
|
|
50
|
+
const result = await tasks.contract.tx.providerRegister(...providerRegisterArgs);
|
|
51
|
+
logger.info(JSON.stringify(result, null, 2));
|
|
52
|
+
}
|
|
53
|
+
catch (err) {
|
|
54
|
+
logger.error(err);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
middlewares: [validatePayee, validateFee],
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=providerRegister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerRegister.js","sourceRoot":"","sources":["../../src/commands/providerRegister.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,C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,CAAC;QACnB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI;gBACA,MAAM,UAAU,GAAG,0BAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBACzD,MAAM,GAAG,GAAG,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;gBACjD,MAAM,GAAG,CAAC,OAAO,EAAE,CAAA;gBACnB,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAA;gBAC5B,MAAM,oBAAoB,GAA6D;oBACnF,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBACvC,UAAU,CAAC,GAAG;oBACd,UAAU,CAAC,KAAK;oBAChB;wBACI,KAAK,EAAE,CAAC;qBACX;iBACJ,CAAA;gBACD,MAAM,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAA;gBACrG,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,gBAAgB,CAAC,GAAG,oBAAoB,CAAC,CAAA;gBAEhF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;aAC/C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;aACpB;QACL,CAAC;QACD,WAAW,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC;KAC3B,CAAA;AACtB,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KeyringPair } from '@polkadot/keyring/types';
|
|
2
|
+
import { Logger } from '@prosopo/common';
|
|
3
|
+
import { ProsopoConfig } from '@prosopo/types';
|
|
4
|
+
declare const _default: (pair: KeyringPair, config: ProsopoConfig, cmdArgs?: {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
}) => {
|
|
7
|
+
command: string;
|
|
8
|
+
describe: string;
|
|
9
|
+
builder: (yargs: any) => any;
|
|
10
|
+
handler: (argv: any) => Promise<void>;
|
|
11
|
+
middlewares: never[];
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=providerSetDataset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providerSetDataset.d.ts","sourceRoot":"","sources":["../../src/commands/providerSetDataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAkB,MAAM,EAAa,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;+BAKxB,WAAW,UAAU,aAAa,YAAY;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;AAAvF,wBA2BC"}
|