@asyncswap/engine-rpc 0.0.7 → 0.0.9
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 +5 -5
- package/dist/engine-api.d.ts +7 -0
- package/dist/engine-api.d.ts.map +1 -0
- package/dist/engine-api.js +10 -0
- package/dist/engine-api.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/types/blob.d.ts +10 -0
- package/dist/types/blob.d.ts.map +1 -0
- package/dist/types/blob.js +1 -0
- package/dist/types/blob.js.map +1 -0
- package/dist/types/forkchoice.d.ts +30 -0
- package/dist/types/forkchoice.d.ts.map +1 -0
- package/dist/types/forkchoice.js +1 -0
- package/dist/types/forkchoice.js.map +1 -0
- package/dist/types/identification.d.ts +8 -0
- package/dist/types/identification.d.ts.map +1 -0
- package/dist/types/identification.js +1 -0
- package/dist/types/identification.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/methods.d.ts +159 -0
- package/dist/types/methods.d.ts.map +1 -0
- package/dist/types/methods.js +1 -0
- package/dist/types/methods.js.map +1 -0
- package/dist/types/payload.d.ts +116 -0
- package/dist/types/payload.d.ts.map +1 -0
- package/dist/types/payload.js +9 -0
- package/dist/types/payload.js.map +1 -0
- package/dist/types/transition-configuration.d.ts +7 -0
- package/dist/types/transition-configuration.d.ts.map +1 -0
- package/dist/types/transition-configuration.js +1 -0
- package/dist/types/transition-configuration.js.map +1 -0
- package/package.json +8 -3
- package/src/engine-api.ts +4 -15
- package/src/index.ts +2 -0
- package/src/types/blob.ts +9 -0
- package/src/types/forkchoice.ts +36 -0
- package/src/types/identification.ts +20 -0
- package/src/types/index.ts +6 -0
- package/src/types/methods.ts +166 -0
- package/src/types/payload.ts +126 -0
- package/src/types/transition-configuration.ts +7 -0
- package/CHANGELOG.md +0 -57
- package/example.ts +0 -6
- package/src/types/blob.d.ts +0 -12
- package/src/types/forkchoice.d.ts +0 -32
- package/src/types/identification.d.ts +0 -24
- package/src/types/methods.d.ts +0 -130
- package/src/types/payload.d.ts +0 -121
- package/src/types/transition-configuration.d.ts +0 -10
- package/tsconfig.json +0 -33
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Address,
|
|
3
|
+
Block,
|
|
4
|
+
BlockNumberOrTag,
|
|
5
|
+
BlockNumberOrTagOrHash,
|
|
6
|
+
Bytes,
|
|
7
|
+
Bytes8,
|
|
8
|
+
Filter,
|
|
9
|
+
FilterResults,
|
|
10
|
+
GenericTransaction,
|
|
11
|
+
Hash32,
|
|
12
|
+
NotFound,
|
|
13
|
+
SyncingStatus,
|
|
14
|
+
Uint,
|
|
15
|
+
Uint64,
|
|
16
|
+
Uint256,
|
|
17
|
+
} from "@asyncswap/eth-types";
|
|
18
|
+
import type { BlobAndProofV1, BlobAndProofV2 } from "./blob";
|
|
19
|
+
import type {
|
|
20
|
+
ForkchoiceStateV1,
|
|
21
|
+
ForkchoiceUpdatedResponseV1,
|
|
22
|
+
PayloadAttributesV1,
|
|
23
|
+
PayloadAttributesV2,
|
|
24
|
+
PayloadAttributesV3,
|
|
25
|
+
} from "./forkchoice";
|
|
26
|
+
|
|
27
|
+
import type { ClientVersionV1 } from "./identification";
|
|
28
|
+
import type {
|
|
29
|
+
BlobsBundleV1,
|
|
30
|
+
BlobsBundleV2,
|
|
31
|
+
ExecutionPayloadBodyV1,
|
|
32
|
+
ExecutionPayloadV1,
|
|
33
|
+
ExecutionPayloadV2,
|
|
34
|
+
ExecutionPayloadV3,
|
|
35
|
+
ExecutionPayloadV4,
|
|
36
|
+
PayloadStatusNoInvalidBlockHash,
|
|
37
|
+
PayloadStatusV1,
|
|
38
|
+
} from "./payload";
|
|
39
|
+
import type { TransitionConfigurationV1 } from "./transition-configuration";
|
|
40
|
+
|
|
41
|
+
export type EngineMethodsSpec = {
|
|
42
|
+
// identification
|
|
43
|
+
engine_getClientVersionV1: {
|
|
44
|
+
params: [ClientVersionV1];
|
|
45
|
+
result: ClientVersionV1[];
|
|
46
|
+
};
|
|
47
|
+
// share methods
|
|
48
|
+
eth_blockNumber: { params: []; result: Uint };
|
|
49
|
+
eth_call: {
|
|
50
|
+
params: [GenericTransaction, BlockNumberOrTagOrHash];
|
|
51
|
+
result: Bytes;
|
|
52
|
+
};
|
|
53
|
+
eth_chainId: { params: []; result: Uint };
|
|
54
|
+
eth_getCode: { params: [Address, BlockNumberOrTagOrHash]; result: Bytes };
|
|
55
|
+
eth_getBlockByHash: { params: [Hash32, boolean]; result: NotFound | Block };
|
|
56
|
+
eth_getBlockByNumber: {
|
|
57
|
+
params: [BlockNumberOrTag, boolean];
|
|
58
|
+
result: NotFound | Block;
|
|
59
|
+
};
|
|
60
|
+
eth_getLogs: { params: [Filter]; result: FilterResults };
|
|
61
|
+
eth_sendRawTransaction: { params: [Bytes]; result: Hash32 };
|
|
62
|
+
eth_syncing: { params: []; result: SyncingStatus };
|
|
63
|
+
// engine/blob
|
|
64
|
+
engine_getBlobsV1: { params: [Hash32[]]; result: BlobAndProofV1[] };
|
|
65
|
+
engine_getBlobsV2: { params: [Hash32[]]; result: BlobAndProofV2[] };
|
|
66
|
+
engine_getBlobsV3: {
|
|
67
|
+
params: [Hash32[]];
|
|
68
|
+
result: Array<BlobAndProofV2[] | null> | null;
|
|
69
|
+
};
|
|
70
|
+
// engine/capabilities
|
|
71
|
+
engine_exchangeCapabilities: { params: [string[]]; result: string[] };
|
|
72
|
+
// engine/forkchoice
|
|
73
|
+
engine_forkchoiceUpdatedV1: {
|
|
74
|
+
params: [ForkchoiceStateV1, PayloadAttributesV1];
|
|
75
|
+
result: ForkchoiceUpdatedResponseV1;
|
|
76
|
+
};
|
|
77
|
+
engine_forkchoiceUpdatedV2: {
|
|
78
|
+
params: [ForkchoiceStateV1, PayloadAttributesV2];
|
|
79
|
+
result: ForkchoiceUpdatedResponseV1;
|
|
80
|
+
};
|
|
81
|
+
engine_forkchoiceUpdatedV3: {
|
|
82
|
+
params: [ForkchoiceStateV1, PayloadAttributesV3];
|
|
83
|
+
result: ForkchoiceUpdatedResponseV1;
|
|
84
|
+
};
|
|
85
|
+
// engine/payload
|
|
86
|
+
engine_newPayloadV1: {
|
|
87
|
+
params: [ExecutionPayloadV1];
|
|
88
|
+
result: PayloadStatusV1;
|
|
89
|
+
};
|
|
90
|
+
engine_newPayloadV2: {
|
|
91
|
+
params: [ExecutionPayloadV1 | ExecutionPayloadV2];
|
|
92
|
+
result: PayloadStatusNoInvalidBlockHash;
|
|
93
|
+
};
|
|
94
|
+
engine_newPayloadV3: {
|
|
95
|
+
params: [ExecutionPayloadV3, Hash32[], Hash32];
|
|
96
|
+
result: PayloadStatusNoInvalidBlockHash;
|
|
97
|
+
};
|
|
98
|
+
engine_newPayloadV4: {
|
|
99
|
+
params: [ExecutionPayloadV3, Hash32[], Hash32, Bytes[]];
|
|
100
|
+
result: PayloadStatusNoInvalidBlockHash;
|
|
101
|
+
};
|
|
102
|
+
engine_getPayloadV1: { params: [Bytes8]; result: ExecutionPayloadV1 };
|
|
103
|
+
engine_getPayloadV2: {
|
|
104
|
+
params: [Bytes8];
|
|
105
|
+
result: {
|
|
106
|
+
executionPayload: ExecutionPayloadV1 | ExecutionPayloadV2;
|
|
107
|
+
blockValue: Uint256;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
engine_getPayloadV3: {
|
|
111
|
+
params: [Bytes8];
|
|
112
|
+
result: {
|
|
113
|
+
executionPayload: ExecutionPayloadV3;
|
|
114
|
+
blockValue: Uint256;
|
|
115
|
+
blobsBundle: BlobsBundleV1;
|
|
116
|
+
shouldOverrideBuilder: boolean;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
engine_getPayloadV4: {
|
|
120
|
+
params: [Bytes8];
|
|
121
|
+
result: {
|
|
122
|
+
executionPayload: ExecutionPayloadV3;
|
|
123
|
+
blockValue: Uint256;
|
|
124
|
+
blobsBundle: BlobsBundleV1;
|
|
125
|
+
shouldOverrideBuilder: boolean;
|
|
126
|
+
executionRequests: Bytes[];
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
engine_getPayloadV5: {
|
|
130
|
+
params: [Bytes8];
|
|
131
|
+
result: {
|
|
132
|
+
executionPayload: ExecutionPayloadV3;
|
|
133
|
+
blockValue: Uint256;
|
|
134
|
+
blobsBundle: BlobsBundleV2;
|
|
135
|
+
shouldOverrideBuilder: boolean;
|
|
136
|
+
executionRequests: Bytes[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
engine_getPayloadBodiesByHashV1: {
|
|
140
|
+
params: [Hash32[]];
|
|
141
|
+
result: ExecutionPayloadBodyV1[];
|
|
142
|
+
};
|
|
143
|
+
engine_getPayloadBodiesByRangeV1: {
|
|
144
|
+
params: [Uint64, Uint64];
|
|
145
|
+
result: ExecutionPayloadBodyV1[];
|
|
146
|
+
};
|
|
147
|
+
engine_newPayloadV5: {
|
|
148
|
+
params: [ExecutionPayloadV4, Hash32[], Hash32, Bytes[]];
|
|
149
|
+
result: PayloadStatusNoInvalidBlockHash;
|
|
150
|
+
};
|
|
151
|
+
engine_getPayloadV6: {
|
|
152
|
+
params: [Bytes8];
|
|
153
|
+
result: {
|
|
154
|
+
executionPayload: ExecutionPayloadV4;
|
|
155
|
+
blockValue: Uint256;
|
|
156
|
+
blobsBundle: BlobsBundleV2;
|
|
157
|
+
shouldOverrideBuilder: boolean;
|
|
158
|
+
executionRequests: Bytes[];
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
// engine/transition-configuration
|
|
162
|
+
engine_exchangeTransitionConfigurationV1: {
|
|
163
|
+
params: [TransitionConfigurationV1];
|
|
164
|
+
result: TransitionConfigurationV1;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Address,
|
|
3
|
+
Bytes,
|
|
4
|
+
Bytes32,
|
|
5
|
+
Bytes48,
|
|
6
|
+
Bytes256,
|
|
7
|
+
Hash32,
|
|
8
|
+
Uint64,
|
|
9
|
+
} from "@asyncswap/eth-types";
|
|
10
|
+
export enum PAYLOAD_STATUS {
|
|
11
|
+
VALID = "VALID",
|
|
12
|
+
INVALID = "INVALID",
|
|
13
|
+
SYNCING = "SYNCING",
|
|
14
|
+
ACCEPTED = "ACCEPTED",
|
|
15
|
+
INVALID_BLOCK_HASH = "INVALID_BLOCK_HASH",
|
|
16
|
+
}
|
|
17
|
+
export interface PayloadStatusV1 {
|
|
18
|
+
status: PAYLOAD_STATUS;
|
|
19
|
+
latestValidHash?: Hash32;
|
|
20
|
+
validationError?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RestrictedPayloadStatusV1 {
|
|
23
|
+
status:
|
|
24
|
+
| PAYLOAD_STATUS.VALID
|
|
25
|
+
| PAYLOAD_STATUS.INVALID
|
|
26
|
+
| PAYLOAD_STATUS.SYNCING;
|
|
27
|
+
latestValidHash: Hash32;
|
|
28
|
+
validationError: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PayloadStatusNoInvalidBlockHash {
|
|
31
|
+
status: Exclude<PAYLOAD_STATUS, PAYLOAD_STATUS.INVALID_BLOCK_HASH>;
|
|
32
|
+
latestValidHash: Hash32;
|
|
33
|
+
validationError: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ExecutionPayloadV1 {
|
|
36
|
+
parentHash: Hash32;
|
|
37
|
+
feeRecipient: Address;
|
|
38
|
+
stateRoot: Bytes32;
|
|
39
|
+
receiptsRoot: Bytes32;
|
|
40
|
+
logsBloom: Bytes256;
|
|
41
|
+
prevRandao: Bytes32;
|
|
42
|
+
blockNumber: Uint64;
|
|
43
|
+
gasLimit: Uint64;
|
|
44
|
+
gasUsed: Uint64;
|
|
45
|
+
timestamp: Uint64;
|
|
46
|
+
extraData: Bytes32;
|
|
47
|
+
baseFeePerGas: Uint64;
|
|
48
|
+
blockHash: Hash32;
|
|
49
|
+
transactions: Bytes[];
|
|
50
|
+
}
|
|
51
|
+
export interface WithdrawalV1 {
|
|
52
|
+
index: Uint64;
|
|
53
|
+
validatorIndex: Uint64;
|
|
54
|
+
address: Address;
|
|
55
|
+
amount: Uint64;
|
|
56
|
+
}
|
|
57
|
+
export interface ExecutionPayloadV2 {
|
|
58
|
+
parentHash: Hash32;
|
|
59
|
+
feeRecipient: Address;
|
|
60
|
+
stateRoot: Bytes32;
|
|
61
|
+
receiptsRoot: Bytes32;
|
|
62
|
+
logsBloom: Bytes256;
|
|
63
|
+
prevRandao: Bytes32;
|
|
64
|
+
blockNumber: Uint64;
|
|
65
|
+
gasLimit: Uint64;
|
|
66
|
+
gasUsed: Uint64;
|
|
67
|
+
timestamp: Uint64;
|
|
68
|
+
extraData: Bytes32;
|
|
69
|
+
baseFeePerGas: Uint64;
|
|
70
|
+
blockHash: Hash32;
|
|
71
|
+
transactions: Bytes[];
|
|
72
|
+
withdrawals: WithdrawalV1[];
|
|
73
|
+
}
|
|
74
|
+
export interface ExecutionPayloadV3 {
|
|
75
|
+
parentHash: Hash32;
|
|
76
|
+
feeRecipient: Address;
|
|
77
|
+
stateRoot: Bytes32;
|
|
78
|
+
receiptsRoot: Bytes32;
|
|
79
|
+
logsBloom: Bytes256;
|
|
80
|
+
prevRandao: Bytes32;
|
|
81
|
+
blockNumber: Uint64;
|
|
82
|
+
gasLimit: Uint64;
|
|
83
|
+
gasUsed: Uint64;
|
|
84
|
+
timestamp: Uint64;
|
|
85
|
+
extraData: Bytes32;
|
|
86
|
+
baseFeePerGas: Uint64;
|
|
87
|
+
blockHash: Hash32;
|
|
88
|
+
transactions: Bytes[];
|
|
89
|
+
withdrawals: WithdrawalV1[];
|
|
90
|
+
blobGasUsed: Uint64;
|
|
91
|
+
excessBlobGas: Uint64;
|
|
92
|
+
}
|
|
93
|
+
export interface ExecutionPayloadV4 {
|
|
94
|
+
parentHash: Hash32;
|
|
95
|
+
feeRecipient: Address;
|
|
96
|
+
stateRoot: Bytes32;
|
|
97
|
+
receiptsRoot: Bytes32;
|
|
98
|
+
logsBloom: Bytes256;
|
|
99
|
+
prevRandao: Bytes32;
|
|
100
|
+
blockNumber: Uint64;
|
|
101
|
+
gasLimit: Uint64;
|
|
102
|
+
gasUsed: Uint64;
|
|
103
|
+
timestamp: Uint64;
|
|
104
|
+
extraData: Bytes32;
|
|
105
|
+
baseFeePerGas: Uint64;
|
|
106
|
+
blockHash: Hash32;
|
|
107
|
+
transactions: Bytes[];
|
|
108
|
+
withdrawals: WithdrawalV1[];
|
|
109
|
+
blobGasUsed: Uint64;
|
|
110
|
+
excessBlobGas: Uint64;
|
|
111
|
+
blockAccessList: Bytes;
|
|
112
|
+
}
|
|
113
|
+
export interface ExecutionPayloadBodyV1 {
|
|
114
|
+
transactions: Bytes[];
|
|
115
|
+
withdrawals?: WithdrawalV1[];
|
|
116
|
+
}
|
|
117
|
+
export interface BlobsBundleV1 {
|
|
118
|
+
commitments: Bytes48[];
|
|
119
|
+
proofs: Bytes48[];
|
|
120
|
+
blobs: Bytes[];
|
|
121
|
+
}
|
|
122
|
+
export interface BlobsBundleV2 {
|
|
123
|
+
commitments: Bytes48[];
|
|
124
|
+
proofs: Bytes48[];
|
|
125
|
+
blobs: Bytes[];
|
|
126
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# @asyncswap/engine-rpc
|
|
2
|
-
|
|
3
|
-
## 0.0.7
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 2f7dece: fixes build
|
|
8
|
-
- Updated dependencies [2f7dece]
|
|
9
|
-
- @asyncswap/jsonrpc@0.4.11
|
|
10
|
-
|
|
11
|
-
## 0.0.6
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- 69a2d7e: patch types updates
|
|
16
|
-
- Updated dependencies [69a2d7e]
|
|
17
|
-
- @asyncswap/jsonrpc@0.4.10
|
|
18
|
-
|
|
19
|
-
## 0.0.5
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- dc792b1: (refactor): change to `withHeaders` option and update BaseClient source
|
|
24
|
-
- Updated dependencies [dc792b1]
|
|
25
|
-
- @asyncswap/jsonrpc@0.4.9
|
|
26
|
-
|
|
27
|
-
## 0.0.4
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- e9fc1df: remove biome dep
|
|
32
|
-
- Updated dependencies [e9fc1df]
|
|
33
|
-
- @asyncswap/eth-rpc@0.4.9
|
|
34
|
-
|
|
35
|
-
## 0.0.3
|
|
36
|
-
|
|
37
|
-
### Patch Changes
|
|
38
|
-
|
|
39
|
-
- 494a28f: update package location
|
|
40
|
-
|
|
41
|
-
## 0.0.2
|
|
42
|
-
|
|
43
|
-
### Patch Changes
|
|
44
|
-
|
|
45
|
-
- 863d9b8: udpate example
|
|
46
|
-
|
|
47
|
-
## 0.0.1
|
|
48
|
-
|
|
49
|
-
### Patch Changes
|
|
50
|
-
|
|
51
|
-
- 97a6143: engine rpc spec
|
|
52
|
-
|
|
53
|
-
- Adds class for engine api spec
|
|
54
|
-
- Add example and docs
|
|
55
|
-
|
|
56
|
-
- Updated dependencies [cad9042]
|
|
57
|
-
- @asyncswap/eth-rpc@0.4.8
|
package/example.ts
DELETED
package/src/types/blob.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
// forkchoice
|
|
3
|
-
export interface ForkchoiceStateV1 {
|
|
4
|
-
headBlockHash: Hash32;
|
|
5
|
-
safeBlockHash: Hash32;
|
|
6
|
-
finalizedBlockHash: Hash32;
|
|
7
|
-
}
|
|
8
|
-
export interface ForkchoiceUpdatedResponseV1 {
|
|
9
|
-
payloadStatus: RestrictedPayloadStatusV1;
|
|
10
|
-
payloadId?: Bytes8;
|
|
11
|
-
}
|
|
12
|
-
export interface PayloadAttributesV1 {
|
|
13
|
-
timestamp: Uint64;
|
|
14
|
-
prevRandao: Bytes32;
|
|
15
|
-
suggestedFeeRecipient: Address;
|
|
16
|
-
}
|
|
17
|
-
export interface PayloadAttributesV2 {
|
|
18
|
-
timestamp: Uint64;
|
|
19
|
-
prevRandao: Bytes32;
|
|
20
|
-
suggestedFeeRecipient: Address;
|
|
21
|
-
withdrawals: WithdrawalV1[];
|
|
22
|
-
}
|
|
23
|
-
export interface PayloadAttributesV3 {
|
|
24
|
-
timestamp: Uint64;
|
|
25
|
-
prevRandao: Bytes32;
|
|
26
|
-
suggestedFeeRecipient: Address;
|
|
27
|
-
withdrawals: WithdrawalV1[];
|
|
28
|
-
parentBeaconBlockRoot: Hash32;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
export type ClientVersionV1 = {
|
|
3
|
-
code: ClientCode;
|
|
4
|
-
name: string;
|
|
5
|
-
varsion: string;
|
|
6
|
-
commit: string;
|
|
7
|
-
};
|
|
8
|
-
export type ClientCode =
|
|
9
|
-
| "BU" // besu
|
|
10
|
-
| "EJ" // ethereumJs
|
|
11
|
-
| "EG" // erigon
|
|
12
|
-
| "GE" // go-ethereum
|
|
13
|
-
| "GR" // gradine
|
|
14
|
-
| "LH" // lighthouse
|
|
15
|
-
| "LS" // lodestar
|
|
16
|
-
| "NM" // nethermind
|
|
17
|
-
| "NB" // nimbus
|
|
18
|
-
| "TE" // thin-execution
|
|
19
|
-
| "TK" // teku
|
|
20
|
-
| "PM" // prysm
|
|
21
|
-
| "RH"; // reth
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { };
|
package/src/types/methods.d.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
export type EngineMethodsSpec = {
|
|
3
|
-
// identification
|
|
4
|
-
engine_getClientVersionV1: {
|
|
5
|
-
params: [ClientVersionV1];
|
|
6
|
-
result: ClientVersionV1[];
|
|
7
|
-
};
|
|
8
|
-
// share methods
|
|
9
|
-
eth_blockNumber: { params: []; result: Uint };
|
|
10
|
-
eth_call: {
|
|
11
|
-
params: [GenericTransaction, BlockNumberOrTagOrHash];
|
|
12
|
-
result: Bytes;
|
|
13
|
-
};
|
|
14
|
-
eth_chainId: { params: []; result: Uint };
|
|
15
|
-
eth_getCode: { params: [Address, BlockNumberOrTagOrHash]; result: Bytes };
|
|
16
|
-
eth_getBlockByHash: { params: [Hash32, boolean]; result: NotFound | Block };
|
|
17
|
-
eth_getBlockByNumber: {
|
|
18
|
-
params: [BlockNumberOrTag, boolean];
|
|
19
|
-
result: NotFound | Block;
|
|
20
|
-
};
|
|
21
|
-
eth_getLogs: { params: [Filter]; result: FilterResults };
|
|
22
|
-
eth_sendRawTransaction: { params: [Bytes]; result: Hash32 };
|
|
23
|
-
eth_syncing: { params: []; result: SyncingStatus };
|
|
24
|
-
// engine/blob
|
|
25
|
-
engine_getBlobsV1: { params: [Hash32[]]; result: BlobAndProofV1[] };
|
|
26
|
-
engine_getBlobsV2: { params: [Hash32[]]; result: BlobAndProofV2[] };
|
|
27
|
-
engine_getBlobsV3: {
|
|
28
|
-
params: [Hash32[]];
|
|
29
|
-
result: Array<BlobAndProofV2[] | null> | null;
|
|
30
|
-
};
|
|
31
|
-
// engine/capabilities
|
|
32
|
-
engine_exchangeCapabilities: { params: [string[]]; result: string[] };
|
|
33
|
-
// engine/forkchoice
|
|
34
|
-
engine_forkchoiceUpdatedV1: {
|
|
35
|
-
params: [ForkchoiceStateV1, PayloadAttributesV1];
|
|
36
|
-
result: ForkchoiceUpdatedResponseV1;
|
|
37
|
-
};
|
|
38
|
-
engine_forkchoiceUpdatedV2: {
|
|
39
|
-
params: [ForkchoiceStateV1, PayloadAttributesV2];
|
|
40
|
-
result: ForkchoiceUpdatedResponseV1;
|
|
41
|
-
};
|
|
42
|
-
engine_forkchoiceUpdatedV3: {
|
|
43
|
-
params: [ForkchoiceStateV1, PayloadAttributesV3];
|
|
44
|
-
result: ForkchoiceUpdatedResponseV1;
|
|
45
|
-
};
|
|
46
|
-
// engine/payload
|
|
47
|
-
engine_newPayloadV1: {
|
|
48
|
-
params: [ExecutionPayloadV1];
|
|
49
|
-
result: PayloadStatusV1;
|
|
50
|
-
};
|
|
51
|
-
engine_newPayloadV2: {
|
|
52
|
-
params: [ExecutionPayloadV1 | ExecutionPayloadV2];
|
|
53
|
-
result: PayloadStatusNoInvalidBlockHash;
|
|
54
|
-
};
|
|
55
|
-
engine_newPayloadV3: {
|
|
56
|
-
params: [ExecutionPayloadV3, Hash32[], Hash32];
|
|
57
|
-
result: PayloadStatusNoInvalidBlockHash;
|
|
58
|
-
};
|
|
59
|
-
engine_newPayloadV4: {
|
|
60
|
-
params: [ExecutionPayloadV3, Hash32[], Hash32, Bytes[]];
|
|
61
|
-
result: PayloadStatusNoInvalidBlockHash;
|
|
62
|
-
};
|
|
63
|
-
engine_getPayloadV1: { params: [Bytes8]; result: ExecutionPayloadV1 };
|
|
64
|
-
engine_getPayloadV2: {
|
|
65
|
-
params: [Bytes8];
|
|
66
|
-
result: {
|
|
67
|
-
executionPayload: ExecutionPayloadV1 | ExecutionPayloadV2;
|
|
68
|
-
blockValue: Uint256;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
engine_getPayloadV3: {
|
|
72
|
-
params: [Bytes8];
|
|
73
|
-
result: {
|
|
74
|
-
executionPayload: ExecutionPayloadV3;
|
|
75
|
-
blockValue: Uint256;
|
|
76
|
-
blobsBundle: BlobsBundleV1;
|
|
77
|
-
shouldOverrideBuilder: boolean;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
engine_getPayloadV4: {
|
|
81
|
-
params: [Bytes8];
|
|
82
|
-
result: {
|
|
83
|
-
executionPayload: ExecutionPayloadV3;
|
|
84
|
-
blockValue: Uint256;
|
|
85
|
-
blobsBundle: BlobsBundleV1;
|
|
86
|
-
shouldOverrideBuilder: boolean;
|
|
87
|
-
executionRequests: Bytes[];
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
engine_getPayloadV5: {
|
|
91
|
-
params: [Bytes8];
|
|
92
|
-
result: {
|
|
93
|
-
executionPayload: ExecutionPayloadV3;
|
|
94
|
-
blockValue: Uint256;
|
|
95
|
-
blobsBundle: BlobsBundleV2;
|
|
96
|
-
shouldOverrideBuilder: boolean;
|
|
97
|
-
executionRequests: Bytes[];
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
engine_getPayloadBodiesByHashV1: {
|
|
101
|
-
params: [Hash32[]];
|
|
102
|
-
result: ExecutionPayloadBodyV1[];
|
|
103
|
-
};
|
|
104
|
-
engine_getPayloadBodiesByRangeV1: {
|
|
105
|
-
params: [Uint64, Uint64];
|
|
106
|
-
result: ExecutionPayloadBodyV1[];
|
|
107
|
-
};
|
|
108
|
-
engine_newPayloadV5: {
|
|
109
|
-
params: [ExecutionPayloadV4, Hash32[], Hash32, Bytes[]];
|
|
110
|
-
result: PayloadStatusNoInvalidBlockHash;
|
|
111
|
-
};
|
|
112
|
-
engine_getPayloadV6: {
|
|
113
|
-
params: [Bytes8];
|
|
114
|
-
result: {
|
|
115
|
-
executionPayload: ExecutionPayloadV4;
|
|
116
|
-
blockValue: Uint256;
|
|
117
|
-
blobsBundle: BlobsBundleV2;
|
|
118
|
-
shouldOverrideBuilder: boolean;
|
|
119
|
-
executionRequests: Bytes[];
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
// engine/transition-configuration
|
|
123
|
-
engine_exchangeTransitionConfigurationV1: {
|
|
124
|
-
params: [TransitionConfigurationV1];
|
|
125
|
-
result: TransitionConfigurationV1;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export { };
|
package/src/types/payload.d.ts
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
export enum PAYLOAD_STATUS {
|
|
3
|
-
VALID = "VALID",
|
|
4
|
-
INVALID = "INVALID",
|
|
5
|
-
SYNCING = "SYNCING",
|
|
6
|
-
ACCEPTED = "ACCEPTED",
|
|
7
|
-
INVALID_BLOCK_HASH = "INVALID_BLOCK_HASH",
|
|
8
|
-
}
|
|
9
|
-
export interface PayloadStatusV1 {
|
|
10
|
-
status: PAYLOAD_STATUS;
|
|
11
|
-
latestValidHash?: Hash32;
|
|
12
|
-
validationError?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface RestrictedPayloadStatusV1 {
|
|
15
|
-
status:
|
|
16
|
-
| PAYLOAD_STATUS.VALID
|
|
17
|
-
| PAYLOAD_STATUS.INVALID
|
|
18
|
-
| PAYLOAD_STATUS.SYNCING;
|
|
19
|
-
latestValidHash: Hash32;
|
|
20
|
-
validationError: string;
|
|
21
|
-
}
|
|
22
|
-
export interface PayloadStatusNoInvalidBlockHash {
|
|
23
|
-
status: Exclude<PAYLOAD_STATUS, PAYLOAD_STATUS.INVALID_BLOCK_HASH>;
|
|
24
|
-
latestValidHash: Hash32;
|
|
25
|
-
validationError: string;
|
|
26
|
-
}
|
|
27
|
-
export interface ExecutionPayloadV1 {
|
|
28
|
-
parentHash: Hash32;
|
|
29
|
-
feeRecipient: Address;
|
|
30
|
-
stateRoot: Bytes32;
|
|
31
|
-
receiptsRoot: Bytes32;
|
|
32
|
-
logsBloom: Bytes256;
|
|
33
|
-
prevRandao: Bytes32;
|
|
34
|
-
blockNumber: Uint64;
|
|
35
|
-
gasLimit: Uint64;
|
|
36
|
-
gasUsed: Uint64;
|
|
37
|
-
timestamp: Uint64;
|
|
38
|
-
extraData: Bytes32;
|
|
39
|
-
baseFeePerGas: Uint64;
|
|
40
|
-
blockHash: Hash32;
|
|
41
|
-
transactions: Bytes[];
|
|
42
|
-
}
|
|
43
|
-
export interface WithdrawalV1 {
|
|
44
|
-
index: Uint64;
|
|
45
|
-
validatorIndex: Uint64;
|
|
46
|
-
address: Address;
|
|
47
|
-
amount: Uint64;
|
|
48
|
-
}
|
|
49
|
-
export interface ExecutionPayloadV2 {
|
|
50
|
-
parentHash: Hash32;
|
|
51
|
-
feeRecipient: Address;
|
|
52
|
-
stateRoot: Bytes32;
|
|
53
|
-
receiptsRoot: Bytes32;
|
|
54
|
-
logsBloom: Bytes256;
|
|
55
|
-
prevRandao: Bytes32;
|
|
56
|
-
blockNumber: Uint64;
|
|
57
|
-
gasLimit: Uint64;
|
|
58
|
-
gasUsed: Uint64;
|
|
59
|
-
timestamp: Uint64;
|
|
60
|
-
extraData: Bytes32;
|
|
61
|
-
baseFeePerGas: Uint64;
|
|
62
|
-
blockHash: Hash32;
|
|
63
|
-
transactions: Bytes[];
|
|
64
|
-
withdrawals: WithdrawalV1[];
|
|
65
|
-
}
|
|
66
|
-
export interface ExecutionPayloadV3 {
|
|
67
|
-
parentHash: Hash32;
|
|
68
|
-
feeRecipient: Address;
|
|
69
|
-
stateRoot: Bytes32;
|
|
70
|
-
receiptsRoot: Bytes32;
|
|
71
|
-
logsBloom: Bytes256;
|
|
72
|
-
prevRandao: Bytes32;
|
|
73
|
-
blockNumber: Uint64;
|
|
74
|
-
gasLimit: Uint64;
|
|
75
|
-
gasUsed: Uint64;
|
|
76
|
-
timestamp: Uint64;
|
|
77
|
-
extraData: Bytes32;
|
|
78
|
-
baseFeePerGas: Uint64;
|
|
79
|
-
blockHash: Hash32;
|
|
80
|
-
transactions: Bytes[];
|
|
81
|
-
withdrawals: WithdrawalV1[];
|
|
82
|
-
blobGasUsed: Uint64;
|
|
83
|
-
excessBlobGas: Uint64;
|
|
84
|
-
}
|
|
85
|
-
export interface ExecutionPayloadV4 {
|
|
86
|
-
parentHash: Hash32;
|
|
87
|
-
feeRecipient: Address;
|
|
88
|
-
stateRoot: Bytes32;
|
|
89
|
-
receiptsRoot: Bytes32;
|
|
90
|
-
logsBloom: Bytes256;
|
|
91
|
-
prevRandao: Bytes32;
|
|
92
|
-
blockNumber: Uint64;
|
|
93
|
-
gasLimit: Uint64;
|
|
94
|
-
gasUsed: Uint64;
|
|
95
|
-
timestamp: Uint64;
|
|
96
|
-
extraData: Bytes32;
|
|
97
|
-
baseFeePerGas: Uint64;
|
|
98
|
-
blockHash: Hash32;
|
|
99
|
-
transactions: Bytes[];
|
|
100
|
-
withdrawals: WithdrawalV1[];
|
|
101
|
-
blobGasUsed: Uint64;
|
|
102
|
-
excessBlobGas: Uint64;
|
|
103
|
-
blockAccessList: Bytes;
|
|
104
|
-
}
|
|
105
|
-
export interface ExecutionPayloadBodyV1 {
|
|
106
|
-
transactions: Bytes[];
|
|
107
|
-
withdrawals?: WithdrawalV1[];
|
|
108
|
-
}
|
|
109
|
-
export interface BlobsBundleV1 {
|
|
110
|
-
commitments: Bytes48[];
|
|
111
|
-
proofs: Bytes48[];
|
|
112
|
-
blobs: Bytes[];
|
|
113
|
-
}
|
|
114
|
-
export interface BlobsBundleV2 {
|
|
115
|
-
commitments: Bytes48[];
|
|
116
|
-
proofs: Bytes48[];
|
|
117
|
-
blobs: Bytes[];
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export { };
|