@vlayer/sdk 0.1.0-nightly-20241018-2f0aade → 0.1.0-nightly-20241022-004c3c4
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@vlayer/sdk",
|
3
3
|
"type": "module",
|
4
4
|
"exports": "./src/index.ts",
|
5
|
-
"version": "0.1.0-nightly-
|
5
|
+
"version": "0.1.0-nightly-20241022-004c3c4",
|
6
6
|
"types": "src/index.ts",
|
7
7
|
"scripts": {
|
8
8
|
"build": "npm run gen:types",
|
@@ -22,6 +22,7 @@
|
|
22
22
|
"dns-over-http-resolver": "^3.0.3",
|
23
23
|
"postal-mime": "^2.3.2",
|
24
24
|
"viem": "2.21.0",
|
25
|
-
"vite-tsconfig-paths": "^5.0.1"
|
25
|
+
"vite-tsconfig-paths": "^5.0.1",
|
26
|
+
"@vitejs/plugin-react": "^4.3.2"
|
26
27
|
}
|
27
28
|
}
|
@@ -8,8 +8,6 @@ import {
|
|
8
8
|
Hex,
|
9
9
|
} from "viem";
|
10
10
|
|
11
|
-
import { type ProverCallCommitment } from "types/webProofProvider.ts";
|
12
|
-
|
13
11
|
type Calldata = string;
|
14
12
|
|
15
13
|
export type CallParams = {
|
@@ -51,19 +49,16 @@ export type VlayerClient = {
|
|
51
49
|
prove: <
|
52
50
|
T extends readonly [AbiFunction, ...Abi[number][]],
|
53
51
|
F extends ContractFunctionName<T>,
|
54
|
-
>(
|
55
|
-
|
56
|
-
|
52
|
+
>(args: {
|
53
|
+
address: Hex;
|
54
|
+
proverAbi: T;
|
55
|
+
functionName: F;
|
56
|
+
chainId: number;
|
57
|
+
args: ContractFunctionArgs<T, AbiStateMutability, F>;
|
58
|
+
}) => Promise<{ hash: string }>;
|
57
59
|
waitForProvingResult: ({
|
58
60
|
hash,
|
59
61
|
}: {
|
60
62
|
hash: string;
|
61
63
|
}) => Promise<[Proof, ...unknown[]]>;
|
62
64
|
};
|
63
|
-
|
64
|
-
export type VlayerClientProveArgs<
|
65
|
-
T extends readonly [AbiFunction, ...Abi[number][]],
|
66
|
-
F extends ContractFunctionName<T>,
|
67
|
-
> = ProverCallCommitment<T, F> & {
|
68
|
-
args: ContractFunctionArgs<T, AbiStateMutability, F>;
|
69
|
-
};
|
@@ -33,7 +33,7 @@ declare const chrome: {
|
|
33
33
|
};
|
34
34
|
|
35
35
|
// this id is fixed in the extension by the key in manifest.json
|
36
|
-
const EXTENSION_ID = "
|
36
|
+
const EXTENSION_ID = "jbchhcgphfokabmfacnkafoeeeppjmpl";
|
37
37
|
|
38
38
|
export const createExtensionWebProofProvider = (
|
39
39
|
{
|
package/tsconfig.json
CHANGED
@@ -1,22 +1,17 @@
|
|
1
1
|
{
|
2
|
+
"extends": "../tsconfig.base.json",
|
2
3
|
"compilerOptions": {
|
3
4
|
"lib": [
|
4
5
|
"ESNext"
|
5
6
|
],
|
6
|
-
"module": "esnext",
|
7
|
-
"target": "esnext",
|
8
7
|
"moduleResolution": "bundler",
|
9
8
|
"moduleDetection": "force",
|
10
9
|
"allowImportingTsExtensions": true,
|
11
|
-
"strict": true,
|
12
10
|
"downlevelIteration": true,
|
13
|
-
"skipLibCheck": true,
|
14
11
|
"jsx": "preserve",
|
15
12
|
"allowSyntheticDefaultImports": true,
|
16
13
|
"forceConsistentCasingInFileNames": true,
|
17
14
|
"allowJs": true,
|
18
|
-
"noEmit": true,
|
19
|
-
"composite": true,
|
20
15
|
"types": [
|
21
16
|
"bun" // add Bun global
|
22
17
|
],
|