@lodestar/prover 1.27.1 → 1.28.0-dev.096ceddf29

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/README.md CHANGED
@@ -14,7 +14,7 @@ A set of tools allowing to verify EL client JSON-RPC calls.
14
14
  You can use the `@lodestar/prover` in two ways, as a Web3 Provider and as proxy. For prover use case see below example.
15
15
 
16
16
  ```ts
17
- import Web3 from "web3";
17
+ import {Web3} from "web3";
18
18
  import {createVerifiedExecutionProvider, LCTransport} from "@lodestar/prover";
19
19
 
20
20
  const httpProvider = new Web3.providers.HttpProvider("https://lodestar-sepoliarpc.chainsafe.io");
@@ -38,7 +38,7 @@ In this scenario the actual provider is mutated to handle the RPC requests and v
38
38
  For some scenarios when you don't want to mutate the provider you can pass an option `mutateProvider` as `false`. In this scenario the object `httpProvider` is not mutated and you get a new object `provider`. This is useful when your provider object does not allow mutation, e.g. Metamask provider accessible through `window.ethereum`. If not provided `mutateProvider` is considered as `true` by default. In coming releases we will switch its default behavior to `false`.
39
39
 
40
40
  ```ts
41
- import Web3 from "web3";
41
+ import {Web3} from "web3";
42
42
  import {createVerifiedExecutionProvider, LCTransport} from "@lodestar/prover";
43
43
 
44
44
  const httpProvider = new Web3.providers.HttpProvider("https://lodestar-sepoliarpc.chainsafe.io");
@@ -51,7 +51,7 @@ const {provider, proofProvider} = createVerifiedExecutionProvider(httpProvider,
51
51
  mutateProvider: false,
52
52
  });
53
53
 
54
- const web3 = new Web3(provider);
54
+ const web3 = new Web3(httpProvider);
55
55
 
56
56
  const address = "0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134";
57
57
  const balance = await web3.eth.getBalance(address, "latest");
package/lib/types.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export type JsonRpcId = number | string;
3
2
  export type JsonRpcVersion = string & ("2.0" | "1.0");
4
3
  export interface JsonRpcRequestPayload<T = unknown[]> {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { BlockData, HeaderData } from "@ethereumjs/block";
3
2
  import { ELBlock, ELTransaction } from "../types.js";
4
3
  export declare function numberToHex(num: number | bigint): string;
@@ -13,13 +12,13 @@ export declare function txDataFromELBlock(txInfo: ELTransaction): {
13
12
  data: string;
14
13
  gasPrice: bigint | null;
15
14
  gasLimit: string;
16
- to: Buffer | undefined;
15
+ to: Buffer<ArrayBufferLike> | undefined;
17
16
  value: bigint | undefined;
18
17
  maxFeePerGas: bigint | undefined;
19
18
  maxPriorityFeePerGas: bigint | undefined;
20
19
  type: string;
21
20
  nonce: string;
22
- chainId?: string | undefined;
21
+ chainId?: string;
23
22
  input: string;
24
23
  gas: string;
25
24
  blockHash: string;
@@ -33,7 +32,7 @@ export declare function txDataFromELBlock(txInfo: ELTransaction): {
33
32
  accessList?: {
34
33
  address: string;
35
34
  storageKeys: string[];
36
- }[] | undefined;
35
+ }[];
37
36
  };
38
37
  export declare function blockDataFromELBlock(blockInfo: ELBlock): BlockData;
39
38
  export declare function cleanObject<T extends Record<string, unknown> | unknown[]>(obj: T): T;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import http from "node:http";
3
2
  import { JsonRpcRequestPayload, JsonRpcResponse } from "../types.js";
4
3
  export declare const fetchRequestPayload: (req: http.IncomingMessage) => Promise<JsonRpcRequestPayload>;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import http from "node:http";
3
2
  import { VerifiedExecutionInitOptions } from "./interfaces.js";
4
3
  import { ProofProvider } from "./proof_provider/proof_provider.js";
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/ChainSafe/lodestar/issues"
13
13
  },
14
- "version": "1.27.1",
14
+ "version": "1.28.0-dev.096ceddf29",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -51,12 +51,9 @@
51
51
  "lint": "biome check src/ test/",
52
52
  "lint:fix": "yarn run lint --write",
53
53
  "test": "yarn test:unit && yarn test:e2e",
54
- "test:unit": "vitest --run --dir test/unit/",
55
- "test:browsers": "yarn test:browsers:chrome && yarn test:browsers:firefox && yarn test:browsers:electron",
56
- "test:browsers:chrome": "vitest --run --browser chrome --config ./vitest.browser.config.ts --dir test/unit",
57
- "test:browsers:firefox": "vitest --run --browser firefox --config ./vitest.browser.config.ts --dir test/unit",
58
- "test:browsers:electron": "echo 'Electron tests will be introduced back in the future as soon vitest supports electron.'",
59
- "test:e2e": "LODESTAR_PRESET=minimal vitest --run --config vitest.e2e.config.ts --dir test/e2e",
54
+ "test:unit": "vitest run --dir test/unit/",
55
+ "test:browsers": "vitest run --config ./vitest.browser.config.ts --dir test/unit",
56
+ "test:e2e": "LODESTAR_PRESET=minimal vitest run --config vitest.e2e.config.ts --dir test/e2e",
60
57
  "check-readme": "typescript-docs-verifier",
61
58
  "generate-fixtures": "node --loader ts-node/esm scripts/generate_fixtures.ts"
62
59
  },
@@ -69,13 +66,13 @@
69
66
  "@ethereumjs/tx": "^4.1.2",
70
67
  "@ethereumjs/util": "^8.0.6",
71
68
  "@ethereumjs/vm": "^6.4.2",
72
- "@lodestar/api": "^1.27.1",
73
- "@lodestar/config": "^1.27.1",
74
- "@lodestar/light-client": "^1.27.1",
75
- "@lodestar/logger": "^1.27.1",
76
- "@lodestar/params": "^1.27.1",
77
- "@lodestar/types": "^1.27.1",
78
- "@lodestar/utils": "^1.27.1",
69
+ "@lodestar/api": "1.28.0-dev.096ceddf29",
70
+ "@lodestar/config": "1.28.0-dev.096ceddf29",
71
+ "@lodestar/light-client": "1.28.0-dev.096ceddf29",
72
+ "@lodestar/logger": "1.28.0-dev.096ceddf29",
73
+ "@lodestar/params": "1.28.0-dev.096ceddf29",
74
+ "@lodestar/types": "1.28.0-dev.096ceddf29",
75
+ "@lodestar/utils": "1.28.0-dev.096ceddf29",
79
76
  "ethereum-cryptography": "^2.0.0",
80
77
  "find-up": "^6.3.0",
81
78
  "http-proxy": "^1.18.1",
@@ -84,7 +81,7 @@
84
81
  "yargs": "^17.7.1"
85
82
  },
86
83
  "devDependencies": {
87
- "@lodestar/test-utils": "^1.27.1",
84
+ "@lodestar/test-utils": "1.28.0-dev.096ceddf29",
88
85
  "@types/http-proxy": "^1.17.10",
89
86
  "@types/yargs": "^17.0.24",
90
87
  "axios": "^1.3.4",
@@ -99,5 +96,5 @@
99
96
  "blockchain",
100
97
  "prover"
101
98
  ],
102
- "gitHead": "ff574a59114e6e8524de8478b6474e2b554fec3d"
99
+ "gitHead": "cf35b94ed15256f338f07650c0c9413b7edffc19"
103
100
  }