@prosopo/env 0.2.11 → 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/env.cjs +9 -10
- package/dist/cjs/mockenv.cjs +4 -4
- package/dist/env.d.ts +2 -2
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +5 -5
- package/dist/env.js.map +1 -1
- package/dist/mockenv.d.ts +1 -1
- package/dist/mockenv.d.ts.map +1 -1
- package/dist/mockenv.js +1 -1
- package/dist/mockenv.js.map +1 -1
- package/package.json +12 -9
- 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
package/dist/cjs/env.cjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const Api = require("@polkadot/api/promise/Api");
|
|
4
4
|
const database = require("@prosopo/database");
|
|
5
5
|
const keyring = require("@polkadot/keyring");
|
|
6
6
|
const common = require("@prosopo/common");
|
|
7
7
|
const contract = require("@prosopo/contract");
|
|
8
|
-
const
|
|
9
|
-
require("
|
|
8
|
+
const ws = require("@polkadot/rpc-provider/ws");
|
|
9
|
+
const contractInfo = require("@prosopo/captcha-contract/contract-info");
|
|
10
10
|
const util = require("@prosopo/util");
|
|
11
|
-
const
|
|
12
|
-
const captcha = require("./contracts/captcha/dist/contract-info/captcha.cjs");
|
|
11
|
+
const address = require("@polkadot/util-crypto/address");
|
|
13
12
|
class Environment {
|
|
14
13
|
constructor(config, pair) {
|
|
15
14
|
this.config = config;
|
|
@@ -20,7 +19,7 @@ class Environment {
|
|
|
20
19
|
if (this.config.defaultEnvironment && Object.prototype.hasOwnProperty.call(this.config.networks, this.config.defaultEnvironment) && this.config.networks && this.config.networks[this.defaultNetwork]) {
|
|
21
20
|
const network = this.config.networks[this.defaultNetwork];
|
|
22
21
|
this.logger.info(`Endpoint: ${network == null ? void 0 : network.endpoint}`);
|
|
23
|
-
this.wsProvider = new
|
|
22
|
+
this.wsProvider = new ws.WsProvider(network == null ? void 0 : network.endpoint);
|
|
24
23
|
this.contractAddress = network == null ? void 0 : network.contract.address;
|
|
25
24
|
this.contractName = network == null ? void 0 : network.contract.name;
|
|
26
25
|
this.keyring = new keyring.Keyring({
|
|
@@ -29,7 +28,7 @@ class Environment {
|
|
|
29
28
|
});
|
|
30
29
|
if (this.pair)
|
|
31
30
|
this.keyring.addPair(this.pair);
|
|
32
|
-
this.abi = JSON.parse(
|
|
31
|
+
this.abi = JSON.parse(contractInfo.ContractAbi);
|
|
33
32
|
this.importDatabase().catch((err) => {
|
|
34
33
|
this.logger.error(err);
|
|
35
34
|
});
|
|
@@ -72,7 +71,7 @@ class Environment {
|
|
|
72
71
|
}
|
|
73
72
|
async getContractApi() {
|
|
74
73
|
const nonce = this.pair ? await this.getApi().rpc.system.accountNextIndex(this.pair.address) : 0;
|
|
75
|
-
if (!
|
|
74
|
+
if (!address.isAddress(this.contractAddress)) {
|
|
76
75
|
throw new common.ProsopoEnvError("CONTRACT.CONTRACT_UNDEFINED");
|
|
77
76
|
}
|
|
78
77
|
this.contractInterface = new contract.ProsopoCaptchaContract(
|
|
@@ -95,10 +94,10 @@ class Environment {
|
|
|
95
94
|
this.pair.unlock(this.config.account.password);
|
|
96
95
|
}
|
|
97
96
|
if (!this.api) {
|
|
98
|
-
this.api = await
|
|
97
|
+
this.api = await Api.ApiPromise.create({ provider: this.wsProvider, initWasm: false });
|
|
99
98
|
}
|
|
100
99
|
await this.getSigner();
|
|
101
|
-
if (
|
|
100
|
+
if (address.isAddress(this.contractAddress)) {
|
|
102
101
|
this.contractInterface = await this.getContractApi();
|
|
103
102
|
}
|
|
104
103
|
if (!this.db) {
|
package/dist/cjs/mockenv.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const provider = require("./provider.cjs");
|
|
4
|
-
const
|
|
4
|
+
const mnemonic = require("@polkadot/util-crypto/mnemonic");
|
|
5
5
|
class MockEnvironment extends provider.ProviderEnvironment {
|
|
6
6
|
createAccountAndAddToKeyring() {
|
|
7
|
-
const mnemonic =
|
|
8
|
-
const account = this.keyring.addFromMnemonic(mnemonic);
|
|
7
|
+
const mnemonic$1 = mnemonic.mnemonicGenerate();
|
|
8
|
+
const account = this.keyring.addFromMnemonic(mnemonic$1);
|
|
9
9
|
const { address } = account;
|
|
10
|
-
return [mnemonic, address];
|
|
10
|
+
return [mnemonic$1, address];
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.MockEnvironment = MockEnvironment;
|
package/dist/env.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiPromise } from '@polkadot/api';
|
|
1
|
+
import { ApiPromise } from '@polkadot/api/promise/Api';
|
|
2
2
|
import { AssetsResolver, ContractAbi, EnvironmentTypes, NetworkNames } from '@prosopo/types';
|
|
3
3
|
import { Database } from '@prosopo/types-database';
|
|
4
4
|
import { Keyring } from '@polkadot/keyring';
|
|
@@ -7,7 +7,7 @@ import { Logger } from '@prosopo/common';
|
|
|
7
7
|
import { ProsopoBasicConfigOutput } from '@prosopo/types';
|
|
8
8
|
import { ProsopoCaptchaContract } from '@prosopo/contract';
|
|
9
9
|
import { ProsopoEnvironment } from '@prosopo/types-env';
|
|
10
|
-
import { WsProvider } from '@polkadot/rpc-provider';
|
|
10
|
+
import { WsProvider } from '@polkadot/rpc-provider/ws';
|
|
11
11
|
export declare class Environment implements ProsopoEnvironment {
|
|
12
12
|
config: ProsopoBasicConfigOutput;
|
|
13
13
|
db: Database | undefined;
|
package/dist/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAY,MAAM,EAA8B,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAKtD,qBAAa,WAAY,YAAW,kBAAkB;IAClD,MAAM,EAAE,wBAAwB,CAAA;IAChC,EAAE,EAAE,QAAQ,GAAG,SAAS,CAAA;IACxB,iBAAiB,EAAE,sBAAsB,GAAG,SAAS,CAAA;IACrD,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,gBAAgB,CAAA;IACpC,cAAc,EAAE,YAAY,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,GAAG,EAAE,WAAW,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,cAAc,GAAG,SAAS,CAAA;IAC1C,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,WAAW,GAAG,SAAS,CAAA;IAC7B,GAAG,EAAE,UAAU,GAAG,SAAS,CAAA;gBAEf,MAAM,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE,WAAW;IAoC1D,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAWhC,oBAAoB,IAAI,sBAAsB;IAO9C,MAAM,IAAI,UAAU;IAOd,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAO9C,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAkBjD,OAAO;IA8BP,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CA4BxC"}
|
package/dist/env.js
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import { ApiPromise } from '@polkadot/api';
|
|
14
|
+
import { ApiPromise } from '@polkadot/api/promise/Api';
|
|
15
15
|
import { Databases } from '@prosopo/database';
|
|
16
16
|
import { Keyring } from '@polkadot/keyring';
|
|
17
17
|
import { ProsopoEnvError, getLogger } from '@prosopo/common';
|
|
18
18
|
import { ProsopoCaptchaContract } from '@prosopo/contract';
|
|
19
|
-
import { WsProvider } from '@polkadot/rpc-provider';
|
|
20
|
-
import { ContractAbi as abiJson } from '@prosopo/captcha-contract';
|
|
19
|
+
import { WsProvider } from '@polkadot/rpc-provider/ws';
|
|
20
|
+
import { ContractAbi as abiJson } from '@prosopo/captcha-contract/contract-info';
|
|
21
21
|
import { get } from '@prosopo/util';
|
|
22
|
-
import { isAddress } from '@polkadot/util-crypto';
|
|
22
|
+
import { isAddress } from '@polkadot/util-crypto/address';
|
|
23
23
|
export class Environment {
|
|
24
24
|
constructor(config, pair) {
|
|
25
25
|
this.config = config;
|
|
@@ -94,7 +94,7 @@ export class Environment {
|
|
|
94
94
|
this.pair.unlock(this.config.account.password);
|
|
95
95
|
}
|
|
96
96
|
if (!this.api) {
|
|
97
|
-
this.api = await ApiPromise.create({ provider: this.wsProvider });
|
|
97
|
+
this.api = await ApiPromise.create({ provider: this.wsProvider, initWasm: false });
|
|
98
98
|
}
|
|
99
99
|
await this.getSigner();
|
|
100
100
|
// make sure contract address is valid before trying to load contract interface
|
package/dist/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.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;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../src/env.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;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAGtD,OAAO,EAAE,SAAS,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AI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACtB,oCAAoC;YACpC,MAAM,IAAI,eAAe,CAAC,GAAY,EAAE,+BAA+B,CAAC,CAAA;SAC3E;IACL,CAAC;IAED,KAAK,CAAC,cAAc;QAChB,IAAI;YACA,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;gBAC9D,IAAI,QAAQ,EAAE;oBACV,MAAM,eAAe,GAAG,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAA;oBACrD,IAAI,CAAC,EAAE,GAAG,MAAM,eAAe,CAAC,MAAM,CAClC,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,MAAM,EACf,IAAI,CAAC,MAAM,EACX,QAAQ,CAAC,UAAU,CACtB,CAAA;iBACJ;aACJ;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,kCAAkC;YAClC,MAAM,IAAI,eAAe,CACrB,GAAY,EACZ,iCAAiC,EACjC,EAAE,EACF,IAAI,CAAC,MAAM,CAAC,QAAQ;gBAChB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;oBAC3C,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,IAAI;oBACrD,CAAC,CAAC,SAAS;gBACf,CAAC,CAAC,SAAS,CAClB,CAAA;SACJ;IACL,CAAC;CACJ"}
|
package/dist/mockenv.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="bn.js" />
|
|
2
|
-
import { BN } from '@polkadot/util';
|
|
2
|
+
import { BN } from '@polkadot/util/bn';
|
|
3
3
|
import { ProviderEnvironment } from './provider.js';
|
|
4
4
|
export declare class MockEnvironment extends ProviderEnvironment {
|
|
5
5
|
createAccountAndAddToKeyring(): [string, string];
|
package/dist/mockenv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockenv.d.ts","sourceRoot":"","sources":["../src/mockenv.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mockenv.d.ts","sourceRoot":"","sources":["../src/mockenv.ts"],"names":[],"mappings":";AAaA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAEnD,qBAAa,eAAgB,SAAQ,mBAAmB;IAC7C,4BAA4B,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;CAM1D;AAED,MAAM,WAAW,eAAe;IAC5B,GAAG,EAAE,eAAe,CAAA;IACpB,sBAAsB,EAAE,EAAE,CAAA;CAC7B"}
|
package/dist/mockenv.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProviderEnvironment } from './provider.js';
|
|
2
|
-
import { mnemonicGenerate } from '@polkadot/util-crypto';
|
|
2
|
+
import { mnemonicGenerate } from '@polkadot/util-crypto/mnemonic';
|
|
3
3
|
export class MockEnvironment extends ProviderEnvironment {
|
|
4
4
|
createAccountAndAddToKeyring() {
|
|
5
5
|
const mnemonic = mnemonicGenerate();
|
package/dist/mockenv.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockenv.js","sourceRoot":"","sources":["../src/mockenv.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"mockenv.js","sourceRoot":"","sources":["../src/mockenv.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,MAAM,OAAO,eAAgB,SAAQ,mBAAmB;IAC7C,4BAA4B;QAC/B,MAAM,QAAQ,GAAW,gBAAgB,EAAE,CAAA;QAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;QACtD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;QAC3B,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;IAC9B,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/env",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "Path env prosopo environment",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -22,16 +22,19 @@
|
|
|
22
22
|
"lint:fix": "npx eslint . --fix --config ../../.eslintrc.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@polkadot/util-crypto": "12.
|
|
26
|
-
"@prosopo/common": "0.2.
|
|
27
|
-
"@prosopo/contract": "0.2.
|
|
28
|
-
"@prosopo/database": "0.2.
|
|
29
|
-
"@prosopo/types": "0.2.
|
|
30
|
-
"@prosopo/types-database": "0.2.
|
|
31
|
-
"@prosopo/types-env": "0.2.
|
|
32
|
-
"@prosopo/util": "0.2.
|
|
25
|
+
"@polkadot/util-crypto": "12.5.1",
|
|
26
|
+
"@prosopo/common": "0.2.14",
|
|
27
|
+
"@prosopo/contract": "0.2.14",
|
|
28
|
+
"@prosopo/database": "0.2.14",
|
|
29
|
+
"@prosopo/types": "0.2.14",
|
|
30
|
+
"@prosopo/types-database": "0.2.14",
|
|
31
|
+
"@prosopo/types-env": "0.2.14",
|
|
32
|
+
"@prosopo/util": "0.2.14",
|
|
33
33
|
"dotenv": "^16.0.1"
|
|
34
34
|
},
|
|
35
|
+
"overrides": {
|
|
36
|
+
"@polkadot/keyring": "12.5.1"
|
|
37
|
+
},
|
|
35
38
|
"devDependencies": {
|
|
36
39
|
"tslib": "2.6.2",
|
|
37
40
|
"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;
|