@prosopo/types-env 1.0.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/env.d.ts +7 -17
- package/dist/env.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +2 -2
- package/dist/provider.d.ts.map +1 -1
- package/package.json +46 -51
- package/vite.cjs.config.ts +3 -3
package/dist/env.d.ts
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Logger } from '@prosopo/common';
|
|
8
|
-
import { ProsopoBasicConfigOutput } from '@prosopo/types';
|
|
9
|
-
import { ProsopoCaptchaContract } from '@prosopo/contract';
|
|
10
|
-
import { WsProvider } from '@polkadot/rpc-provider/ws';
|
|
1
|
+
import type { Keyring } from "@polkadot/keyring";
|
|
2
|
+
import type { KeyringPair } from "@polkadot/keyring/types";
|
|
3
|
+
import type { Logger } from "@prosopo/common";
|
|
4
|
+
import type { AssetsResolver, EnvironmentTypes, NetworkNames } from "@prosopo/types";
|
|
5
|
+
import type { ProsopoBasicConfigOutput } from "@prosopo/types";
|
|
6
|
+
import type { Database } from "@prosopo/types-database";
|
|
11
7
|
export interface ProsopoEnvironment {
|
|
12
8
|
config: ProsopoBasicConfigOutput;
|
|
13
9
|
db: Database | undefined;
|
|
14
|
-
contractInterface: ProsopoCaptchaContract | undefined;
|
|
15
10
|
contractAddress: string;
|
|
16
11
|
defaultEnvironment: EnvironmentTypes;
|
|
17
12
|
defaultNetwork: NetworkNames;
|
|
18
13
|
contractName: string;
|
|
19
|
-
abi: ContractAbi;
|
|
20
14
|
logger: Logger;
|
|
21
15
|
assetsResolver: AssetsResolver | undefined;
|
|
22
|
-
wsProvider: WsProvider;
|
|
23
16
|
keyring: Keyring;
|
|
24
17
|
pair: KeyringPair | undefined;
|
|
25
|
-
|
|
18
|
+
getDb(): Database;
|
|
26
19
|
isReady(): Promise<void>;
|
|
27
20
|
importDatabase(): Promise<void>;
|
|
28
|
-
changeSigner(pair: KeyringPair): Promise<void>;
|
|
29
|
-
getApi(): ApiPromise;
|
|
30
|
-
getContractInterface(): ProsopoCaptchaContract;
|
|
31
21
|
}
|
|
32
22
|
//# sourceMappingURL=env.d.ts.map
|
package/dist/env.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAc9C,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,wBAAwB,CAAC;IACjC,EAAE,EAAE,QAAQ,GAAG,SAAS,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,gBAAgB,CAAC;IACrC,cAAc,EAAE,YAAY,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,WAAW,GAAG,SAAS,CAAC;IAC9B,KAAK,IAAI,QAAQ,CAAC;IAClB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./env.js";
|
|
2
|
+
export * from "./provider.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./env.js";
|
|
2
|
+
export * from "./provider.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC"}
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProsopoConfigOutput } from
|
|
2
|
-
import { ProsopoEnvironment } from
|
|
1
|
+
import type { ProsopoConfigOutput } from "@prosopo/types";
|
|
2
|
+
import type { ProsopoEnvironment } from "./env.js";
|
|
3
3
|
export interface ProviderEnvironment extends ProsopoEnvironment {
|
|
4
4
|
config: ProsopoConfigOutput;
|
|
5
5
|
}
|
package/dist/provider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC9D,MAAM,EAAE,mBAAmB,CAAC;CAC5B"}
|
package/package.json
CHANGED
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"tslib": "2.6.2",
|
|
50
|
-
"typescript": "5.1.6"
|
|
51
|
-
},
|
|
52
|
-
"sideEffects": false
|
|
2
|
+
"name": "@prosopo/types-env",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Types for prosopo environment",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20",
|
|
9
|
+
"npm": ">=9"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/cjs/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "echo \"No test specified\"",
|
|
19
|
+
"clean": "tsc --build --clean",
|
|
20
|
+
"build": "tsc --build --verbose",
|
|
21
|
+
"build:cjs": "npx vite --config vite.cjs.config.ts build"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+ssh://git@github.com/prosopo/captcha.git"
|
|
26
|
+
},
|
|
27
|
+
"author": "Prosopo Limited",
|
|
28
|
+
"license": "Apache-2.0",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/prosopo/captcha/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@polkadot/api": "10.13.1",
|
|
35
|
+
"@polkadot/keyring": "12.6.2",
|
|
36
|
+
"@polkadot/rpc-provider": "10.13.1",
|
|
37
|
+
"@prosopo/contract": "2.0.1",
|
|
38
|
+
"@prosopo/common": "2.0.1",
|
|
39
|
+
"@prosopo/types": "2.0.1",
|
|
40
|
+
"@prosopo/types-database": "2.0.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"tslib": "2.6.2",
|
|
44
|
+
"typescript": "5.1.6",
|
|
45
|
+
"@prosopo/config": "2.0.1"
|
|
46
|
+
},
|
|
47
|
+
"sideEffects": false
|
|
53
48
|
}
|
package/vite.cjs.config.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
// Copyright 2021-2024 Prosopo (UK) Ltd.
|
|
2
3
|
//
|
|
3
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -11,9 +12,8 @@
|
|
|
11
12
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
13
|
// See the License for the specific language governing permissions and
|
|
13
14
|
// limitations under the License.
|
|
14
|
-
import { ViteCommonJSConfig } from
|
|
15
|
-
import path from 'path'
|
|
15
|
+
import { ViteCommonJSConfig } from "@prosopo/config";
|
|
16
16
|
|
|
17
17
|
export default function () {
|
|
18
|
-
|
|
18
|
+
return ViteCommonJSConfig("types-env", path.resolve("./tsconfig.cjs.json"));
|
|
19
19
|
}
|