@lodestar/api 1.20.0-dev.966f3acc0f → 1.20.0-dev.d101913ca3
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 +2 -2
- package/lib/beacon/client/beacon.d.ts +4 -3
- package/lib/beacon/client/beacon.js +3 -36
- package/lib/beacon/client/beacon.js.map +1 -1
- package/lib/beacon/client/config.d.ts +4 -3
- package/lib/beacon/client/config.js +3 -6
- package/lib/beacon/client/config.js.map +1 -1
- package/lib/beacon/client/debug.d.ts +4 -3
- package/lib/beacon/client/debug.js +4 -45
- package/lib/beacon/client/debug.js.map +1 -1
- package/lib/beacon/client/events.d.ts +5 -2
- package/lib/beacon/client/events.js +32 -35
- package/lib/beacon/client/events.js.map +1 -1
- package/lib/beacon/client/index.d.ts +6 -3
- package/lib/beacon/client/index.js +2 -2
- package/lib/beacon/client/index.js.map +1 -1
- package/lib/beacon/client/lightclient.d.ts +4 -3
- package/lib/beacon/client/lightclient.js +4 -7
- package/lib/beacon/client/lightclient.js.map +1 -1
- package/lib/beacon/client/lodestar.d.ts +4 -3
- package/lib/beacon/client/lodestar.js +4 -7
- package/lib/beacon/client/lodestar.js.map +1 -1
- package/lib/beacon/client/node.d.ts +4 -3
- package/lib/beacon/client/node.js +4 -7
- package/lib/beacon/client/node.js.map +1 -1
- package/lib/beacon/client/proof.d.ts +5 -4
- package/lib/beacon/client/proof.js +5 -61
- package/lib/beacon/client/proof.js.map +1 -1
- package/lib/beacon/client/validator.d.ts +4 -3
- package/lib/beacon/client/validator.js +4 -7
- package/lib/beacon/client/validator.js.map +1 -1
- package/lib/beacon/index.d.ts +5 -5
- package/lib/beacon/index.js.map +1 -1
- package/lib/beacon/routes/beacon/block.d.ts +282 -164
- package/lib/beacon/routes/beacon/block.js +324 -116
- package/lib/beacon/routes/beacon/block.js.map +1 -1
- package/lib/beacon/routes/beacon/index.d.ts +6 -588
- package/lib/beacon/routes/beacon/index.js +16 -26
- package/lib/beacon/routes/beacon/index.js.map +1 -1
- package/lib/beacon/routes/beacon/pool.d.ts +155 -117
- package/lib/beacon/routes/beacon/pool.js +146 -42
- package/lib/beacon/routes/beacon/pool.js.map +1 -1
- package/lib/beacon/routes/beacon/rewards.d.ts +113 -101
- package/lib/beacon/routes/beacon/rewards.js +98 -63
- package/lib/beacon/routes/beacon/rewards.js.map +1 -1
- package/lib/beacon/routes/beacon/state.d.ts +172 -226
- package/lib/beacon/routes/beacon/state.js +204 -126
- package/lib/beacon/routes/beacon/state.js.map +1 -1
- package/lib/beacon/routes/config.d.ts +21 -36
- package/lib/beacon/routes/config.js +45 -24
- package/lib/beacon/routes/config.js.map +1 -1
- package/lib/beacon/routes/debug.d.ts +32 -95
- package/lib/beacon/routes/debug.js +87 -45
- package/lib/beacon/routes/debug.js.map +1 -1
- package/lib/beacon/routes/events.d.ts +20 -16
- package/lib/beacon/routes/events.js +39 -17
- package/lib/beacon/routes/events.js.map +1 -1
- package/lib/beacon/routes/index.d.ts +19 -19
- package/lib/beacon/routes/index.js +1 -0
- package/lib/beacon/routes/index.js.map +1 -1
- package/lib/beacon/routes/lightclient.d.ts +33 -55
- package/lib/beacon/routes/lightclient.js +107 -47
- package/lib/beacon/routes/lightclient.js.map +1 -1
- package/lib/beacon/routes/lodestar.d.ts +74 -148
- package/lib/beacon/routes/lodestar.js +126 -77
- package/lib/beacon/routes/lodestar.js.map +1 -1
- package/lib/beacon/routes/node.d.ts +48 -82
- package/lib/beacon/routes/node.js +90 -57
- package/lib/beacon/routes/node.js.map +1 -1
- package/lib/beacon/routes/proof.d.ts +25 -31
- package/lib/beacon/routes/proof.js +44 -24
- package/lib/beacon/routes/proof.js.map +1 -1
- package/lib/beacon/routes/validator.d.ts +547 -320
- package/lib/beacon/routes/validator.js +494 -213
- package/lib/beacon/routes/validator.js.map +1 -1
- package/lib/beacon/server/beacon.d.ts +3 -4
- package/lib/beacon/server/beacon.js +4 -57
- package/lib/beacon/server/beacon.js.map +1 -1
- package/lib/beacon/server/config.d.ts +3 -4
- package/lib/beacon/server/config.js +4 -5
- package/lib/beacon/server/config.js.map +1 -1
- package/lib/beacon/server/debug.d.ts +3 -4
- package/lib/beacon/server/debug.js +4 -54
- package/lib/beacon/server/debug.js.map +1 -1
- package/lib/beacon/server/events.d.ts +4 -4
- package/lib/beacon/server/events.js +17 -23
- package/lib/beacon/server/events.js.map +1 -1
- package/lib/beacon/server/index.d.ts +7 -8
- package/lib/beacon/server/index.js +13 -14
- package/lib/beacon/server/index.js.map +1 -1
- package/lib/beacon/server/lightclient.d.ts +3 -4
- package/lib/beacon/server/lightclient.js +4 -5
- package/lib/beacon/server/lightclient.js.map +1 -1
- package/lib/beacon/server/lodestar.d.ts +3 -4
- package/lib/beacon/server/lodestar.js +4 -5
- package/lib/beacon/server/lodestar.js.map +1 -1
- package/lib/beacon/server/node.d.ts +3 -4
- package/lib/beacon/server/node.js +4 -18
- package/lib/beacon/server/node.js.map +1 -1
- package/lib/beacon/server/proof.d.ts +3 -4
- package/lib/beacon/server/proof.js +4 -36
- package/lib/beacon/server/proof.js.map +1 -1
- package/lib/beacon/server/validator.d.ts +3 -4
- package/lib/beacon/server/validator.js +4 -21
- package/lib/beacon/server/validator.js.map +1 -1
- package/lib/builder/client.d.ts +4 -6
- package/lib/builder/client.js +3 -9
- package/lib/builder/client.js.map +1 -1
- package/lib/builder/index.d.ts +8 -5
- package/lib/builder/index.js +4 -1
- package/lib/builder/index.js.map +1 -1
- package/lib/builder/routes.d.ts +24 -38
- package/lib/builder/routes.js +77 -33
- package/lib/builder/routes.js.map +1 -1
- package/lib/builder/server/index.d.ts +6 -6
- package/lib/builder/server/index.js +7 -8
- package/lib/builder/server/index.js.map +1 -1
- package/lib/index.d.ts +9 -6
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/keymanager/client.d.ts +4 -3
- package/lib/keymanager/client.js +4 -7
- package/lib/keymanager/client.js.map +1 -1
- package/lib/keymanager/index.d.ts +5 -4
- package/lib/keymanager/index.js +1 -1
- package/lib/keymanager/index.js.map +1 -1
- package/lib/keymanager/routes.d.ts +155 -177
- package/lib/keymanager/routes.js +236 -123
- package/lib/keymanager/routes.js.map +1 -1
- package/lib/keymanager/server/index.d.ts +6 -6
- package/lib/keymanager/server/index.js +7 -8
- package/lib/keymanager/server/index.js.map +1 -1
- package/lib/server/index.d.ts +2 -0
- package/lib/server/index.js +3 -0
- package/lib/server/index.js.map +1 -0
- package/lib/utils/client/error.d.ts +6 -0
- package/lib/utils/client/error.js +8 -0
- package/lib/utils/client/error.js.map +1 -0
- package/lib/utils/client/httpClient.d.ts +35 -75
- package/lib/utils/client/httpClient.js +201 -153
- package/lib/utils/client/httpClient.js.map +1 -1
- package/lib/utils/client/index.d.ts +6 -2
- package/lib/utils/client/index.js +6 -2
- package/lib/utils/client/index.js.map +1 -1
- package/lib/utils/client/method.d.ts +11 -0
- package/lib/utils/client/method.js +27 -0
- package/lib/utils/client/method.js.map +1 -0
- package/lib/utils/client/request.d.ts +33 -0
- package/lib/utils/client/request.js +66 -0
- package/lib/utils/client/request.js.map +1 -0
- package/lib/utils/client/response.d.ts +35 -0
- package/lib/utils/client/response.js +166 -0
- package/lib/utils/client/response.js.map +1 -0
- package/lib/utils/codecs.d.ts +28 -0
- package/lib/utils/codecs.js +105 -0
- package/lib/utils/codecs.js.map +1 -0
- package/lib/utils/fork.d.ts +8 -0
- package/lib/utils/fork.js +35 -0
- package/lib/utils/fork.js.map +1 -0
- package/lib/utils/headers.d.ts +37 -0
- package/lib/utils/headers.js +134 -0
- package/lib/utils/headers.js.map +1 -0
- package/lib/utils/httpStatusCode.js.map +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/metadata.d.ts +88 -0
- package/lib/utils/metadata.js +126 -0
- package/lib/utils/metadata.js.map +1 -0
- package/lib/utils/schema.d.ts +31 -17
- package/lib/utils/schema.js +18 -6
- package/lib/utils/schema.js.map +1 -1
- package/lib/utils/serdes.d.ts +3 -0
- package/lib/utils/serdes.js +13 -0
- package/lib/utils/serdes.js.map +1 -1
- package/lib/utils/server/{errors.d.ts → error.d.ts} +2 -2
- package/lib/utils/server/{errors.js → error.js} +1 -1
- package/lib/utils/server/error.js.map +1 -0
- package/lib/utils/server/handler.d.ts +11 -0
- package/lib/utils/server/handler.js +117 -0
- package/lib/utils/server/handler.js.map +1 -0
- package/lib/utils/server/index.d.ts +5 -4
- package/lib/utils/server/index.js +5 -4
- package/lib/utils/server/index.js.map +1 -1
- package/lib/utils/server/method.d.ts +35 -0
- package/lib/utils/server/method.js +2 -0
- package/lib/utils/server/method.js.map +1 -0
- package/lib/utils/server/parser.d.ts +3 -0
- package/lib/utils/server/parser.js +20 -0
- package/lib/utils/server/parser.js.map +1 -0
- package/lib/utils/server/route.d.ts +20 -0
- package/lib/utils/server/route.js +19 -0
- package/lib/utils/server/route.js.map +1 -0
- package/lib/utils/types.d.ts +116 -104
- package/lib/utils/types.js +2 -155
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/urlFormat.d.ts +2 -2
- package/lib/utils/urlFormat.js +3 -3
- package/lib/utils/urlFormat.js.map +1 -1
- package/lib/utils/wireFormat.d.ts +8 -0
- package/lib/utils/wireFormat.js +23 -0
- package/lib/utils/wireFormat.js.map +1 -0
- package/package.json +9 -6
- package/lib/interfaces.d.ts +0 -44
- package/lib/interfaces.js +0 -2
- package/lib/interfaces.js.map +0 -1
- package/lib/utils/acceptHeader.d.ts +0 -9
- package/lib/utils/acceptHeader.js +0 -62
- package/lib/utils/acceptHeader.js.map +0 -1
- package/lib/utils/client/client.d.ts +0 -29
- package/lib/utils/client/client.js +0 -88
- package/lib/utils/client/client.js.map +0 -1
- package/lib/utils/client/httpStatusCode.js.map +0 -1
- package/lib/utils/routes.d.ts +0 -6
- package/lib/utils/routes.js +0 -31
- package/lib/utils/routes.js.map +0 -1
- package/lib/utils/server/errors.js.map +0 -1
- package/lib/utils/server/genericJsonServer.d.ts +0 -13
- package/lib/utils/server/genericJsonServer.js +0 -32
- package/lib/utils/server/genericJsonServer.js.map +0 -1
- package/lib/utils/server/registerRoute.d.ts +0 -3
- package/lib/utils/server/registerRoute.js +0 -13
- package/lib/utils/server/registerRoute.js.map +0 -1
- package/lib/utils/server/types.d.ts +0 -22
- package/lib/utils/server/types.js +0 -2
- package/lib/utils/server/types.js.map +0 -1
- /package/lib/utils/{client/httpStatusCode.d.ts → httpStatusCode.d.ts} +0 -0
- /package/lib/utils/{client/httpStatusCode.js → httpStatusCode.js} +0 -0
package/lib/beacon/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Endpoints } from "./routes/index.js";
|
|
2
2
|
import * as routes from "./routes/index.js";
|
|
3
3
|
export { routes };
|
|
4
|
-
export { getClient } from "./client/index.js";
|
|
5
|
-
export type {
|
|
6
|
-
export type ApiNamespace = keyof
|
|
7
|
-
export declare const allNamespaces: (keyof
|
|
4
|
+
export { getClient, type ApiClient } from "./client/index.js";
|
|
5
|
+
export type { Endpoints };
|
|
6
|
+
export type ApiNamespace = keyof Endpoints;
|
|
7
|
+
export declare const allNamespaces: (keyof Endpoints)[];
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/beacon/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/beacon/index.ts"],"names":[],"mappings":"AAEA,sEAAsE;AAEtE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAC,CAAC;AAChB,OAAO,EAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/beacon/index.ts"],"names":[],"mappings":"AAEA,sEAAsE;AAEtE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAC,MAAM,EAAC,CAAC;AAChB,OAAO,EAAC,SAAS,EAAiB,MAAM,mBAAmB,CAAC;AAK5D,MAAM,gBAAgB,GAAmC;IACvD,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,IAAI;IACd,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAmB,CAAC"}
|
|
@@ -1,121 +1,274 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContainerType, ListCompositeType, ValueOf } from "@chainsafe/ssz";
|
|
2
2
|
import { ChainForkConfig } from "@lodestar/config";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
import { allForks, Slot, RootHex, deneb, phase0 } from "@lodestar/types";
|
|
4
|
+
import { Endpoint, RouteDefinitions } from "../../../utils/index.js";
|
|
5
|
+
import { EmptyMeta, EmptyResponseData } from "../../../utils/codecs.js";
|
|
6
|
+
import { ExecutionOptimisticAndFinalizedMeta, ExecutionOptimisticFinalizedAndVersionMeta, MetaHeader } from "../../../utils/metadata.js";
|
|
7
|
+
export declare const BlockHeaderResponseType: ContainerType<{
|
|
8
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
9
|
+
canonical: import("@chainsafe/ssz").BooleanType;
|
|
10
|
+
header: ContainerType<{
|
|
11
|
+
message: ContainerType<{
|
|
12
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
13
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
14
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
15
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
16
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
17
|
+
}>;
|
|
18
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
19
|
+
}>;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const BlockHeadersResponseType: ListCompositeType<ContainerType<{
|
|
22
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
23
|
+
canonical: import("@chainsafe/ssz").BooleanType;
|
|
24
|
+
header: ContainerType<{
|
|
25
|
+
message: ContainerType<{
|
|
26
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
27
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
28
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
29
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
30
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
31
|
+
}>;
|
|
32
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
33
|
+
}>;
|
|
34
|
+
}>>;
|
|
35
|
+
export declare const RootResponseType: ContainerType<{
|
|
36
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const SignedBlockContentsType: ContainerType<{
|
|
39
|
+
signedBlock: ContainerType<{
|
|
40
|
+
message: ContainerType<{
|
|
41
|
+
body: ContainerType<{
|
|
42
|
+
executionPayload: ContainerType<{
|
|
43
|
+
blobGasUsed: import("@chainsafe/ssz").UintBigintType;
|
|
44
|
+
excessBlobGas: import("@chainsafe/ssz").UintBigintType;
|
|
45
|
+
withdrawals: ListCompositeType<ContainerType<{
|
|
46
|
+
index: import("@chainsafe/ssz").UintNumberType;
|
|
47
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
48
|
+
address: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
49
|
+
amount: import("@chainsafe/ssz").UintBigintType;
|
|
50
|
+
}>>;
|
|
51
|
+
transactions: ListCompositeType<import("@chainsafe/ssz").ByteListType>;
|
|
52
|
+
parentHash: import("@chainsafe/ssz").ByteVectorType;
|
|
53
|
+
feeRecipient: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
54
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
55
|
+
receiptsRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
56
|
+
logsBloom: import("@chainsafe/ssz").ByteVectorType;
|
|
57
|
+
prevRandao: import("@chainsafe/ssz").ByteVectorType;
|
|
58
|
+
blockNumber: import("@chainsafe/ssz").UintNumberType;
|
|
59
|
+
gasLimit: import("@chainsafe/ssz").UintNumberType;
|
|
60
|
+
gasUsed: import("@chainsafe/ssz").UintNumberType;
|
|
61
|
+
timestamp: import("@chainsafe/ssz").UintNumberType;
|
|
62
|
+
extraData: import("@chainsafe/ssz").ByteListType;
|
|
63
|
+
baseFeePerGas: import("@chainsafe/ssz").UintBigintType;
|
|
64
|
+
blockHash: import("@chainsafe/ssz").ByteVectorType;
|
|
65
|
+
}>;
|
|
66
|
+
blsToExecutionChanges: ListCompositeType<ContainerType<{
|
|
67
|
+
message: ContainerType<{
|
|
68
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
69
|
+
fromBlsPubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
70
|
+
toExecutionAddress: import("@lodestar/types/lib/utils/executionAddress.js").ExecutionAddressType;
|
|
71
|
+
}>;
|
|
72
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
73
|
+
}>>;
|
|
74
|
+
blobKzgCommitments: ListCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
75
|
+
syncAggregate: ContainerType<{
|
|
76
|
+
syncCommitteeBits: import("@chainsafe/ssz").BitVectorType;
|
|
77
|
+
syncCommitteeSignature: import("@chainsafe/ssz").ByteVectorType;
|
|
78
|
+
}>;
|
|
79
|
+
randaoReveal: import("@chainsafe/ssz").ByteVectorType;
|
|
80
|
+
eth1Data: ContainerType<{
|
|
81
|
+
depositRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
82
|
+
depositCount: import("@chainsafe/ssz").UintNumberType;
|
|
83
|
+
blockHash: import("@chainsafe/ssz").ByteVectorType;
|
|
84
|
+
}>;
|
|
85
|
+
graffiti: import("@chainsafe/ssz").ByteVectorType;
|
|
86
|
+
proposerSlashings: ListCompositeType<ContainerType<{
|
|
87
|
+
signedHeader1: ContainerType<{
|
|
88
|
+
message: ContainerType<{
|
|
89
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
90
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
91
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
92
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
93
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
94
|
+
}>;
|
|
95
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
96
|
+
}>;
|
|
97
|
+
signedHeader2: ContainerType<{
|
|
98
|
+
message: ContainerType<{
|
|
99
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
100
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
101
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
102
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
103
|
+
bodyRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
104
|
+
}>;
|
|
105
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
106
|
+
}>;
|
|
107
|
+
}>>;
|
|
108
|
+
attesterSlashings: ListCompositeType<ContainerType<{
|
|
109
|
+
attestation1: ContainerType<{
|
|
110
|
+
attestingIndices: import("@chainsafe/ssz").ListBasicType<import("@chainsafe/ssz").UintNumberType>;
|
|
111
|
+
data: ContainerType<{
|
|
112
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
113
|
+
index: import("@chainsafe/ssz").UintBigintType;
|
|
114
|
+
beaconBlockRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
115
|
+
source: ContainerType<{
|
|
116
|
+
epoch: import("@chainsafe/ssz").UintBigintType;
|
|
117
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
118
|
+
}>;
|
|
119
|
+
target: ContainerType<{
|
|
120
|
+
epoch: import("@chainsafe/ssz").UintBigintType;
|
|
121
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
122
|
+
}>;
|
|
123
|
+
}>;
|
|
124
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
125
|
+
}>;
|
|
126
|
+
attestation2: ContainerType<{
|
|
127
|
+
attestingIndices: import("@chainsafe/ssz").ListBasicType<import("@chainsafe/ssz").UintNumberType>;
|
|
128
|
+
data: ContainerType<{
|
|
129
|
+
slot: import("@chainsafe/ssz").UintBigintType;
|
|
130
|
+
index: import("@chainsafe/ssz").UintBigintType;
|
|
131
|
+
beaconBlockRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
132
|
+
source: ContainerType<{
|
|
133
|
+
epoch: import("@chainsafe/ssz").UintBigintType;
|
|
134
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
135
|
+
}>;
|
|
136
|
+
target: ContainerType<{
|
|
137
|
+
epoch: import("@chainsafe/ssz").UintBigintType;
|
|
138
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
139
|
+
}>;
|
|
140
|
+
}>;
|
|
141
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
142
|
+
}>;
|
|
143
|
+
}>>;
|
|
144
|
+
attestations: ListCompositeType<ContainerType<{
|
|
145
|
+
aggregationBits: import("@chainsafe/ssz").BitListType;
|
|
146
|
+
data: ContainerType<{
|
|
147
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
148
|
+
index: import("@chainsafe/ssz").UintNumberType;
|
|
149
|
+
beaconBlockRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
150
|
+
source: ContainerType<{
|
|
151
|
+
epoch: import("@chainsafe/ssz").UintNumberType;
|
|
152
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
153
|
+
}>;
|
|
154
|
+
target: ContainerType<{
|
|
155
|
+
epoch: import("@chainsafe/ssz").UintNumberType;
|
|
156
|
+
root: import("@chainsafe/ssz").ByteVectorType;
|
|
157
|
+
}>;
|
|
158
|
+
}>;
|
|
159
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
160
|
+
}>>;
|
|
161
|
+
deposits: ListCompositeType<ContainerType<{
|
|
162
|
+
proof: import("@chainsafe/ssz").VectorCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
163
|
+
data: ContainerType<{
|
|
164
|
+
pubkey: import("@chainsafe/ssz").ByteVectorType;
|
|
165
|
+
withdrawalCredentials: import("@chainsafe/ssz").ByteVectorType;
|
|
166
|
+
amount: import("@chainsafe/ssz").UintNumberType;
|
|
167
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
168
|
+
}>;
|
|
169
|
+
}>>;
|
|
170
|
+
voluntaryExits: ListCompositeType<ContainerType<{
|
|
171
|
+
message: ContainerType<{
|
|
172
|
+
epoch: import("@chainsafe/ssz").UintNumberType;
|
|
173
|
+
validatorIndex: import("@chainsafe/ssz").UintNumberType;
|
|
174
|
+
}>;
|
|
175
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
176
|
+
}>>;
|
|
177
|
+
}>;
|
|
178
|
+
slot: import("@chainsafe/ssz").UintNumberType;
|
|
179
|
+
proposerIndex: import("@chainsafe/ssz").UintNumberType;
|
|
180
|
+
parentRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
181
|
+
stateRoot: import("@chainsafe/ssz").ByteVectorType;
|
|
182
|
+
}>;
|
|
183
|
+
signature: import("@chainsafe/ssz").ByteVectorType;
|
|
184
|
+
}>;
|
|
185
|
+
kzgProofs: ListCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
186
|
+
blobs: ListCompositeType<import("@chainsafe/ssz").ByteVectorType>;
|
|
187
|
+
}>;
|
|
188
|
+
export type BlockHeaderResponse = ValueOf<typeof BlockHeaderResponseType>;
|
|
189
|
+
export type BlockHeadersResponse = ValueOf<typeof BlockHeadersResponseType>;
|
|
190
|
+
export type RootResponse = ValueOf<typeof RootResponseType>;
|
|
191
|
+
export type SignedBlockContents = ValueOf<typeof SignedBlockContentsType>;
|
|
192
|
+
export type BlockId = RootHex | Slot | "head" | "genesis" | "finalized" | "justified";
|
|
193
|
+
export type BlockArgs = {
|
|
194
|
+
/**
|
|
195
|
+
* Block identifier.
|
|
196
|
+
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
197
|
+
*/
|
|
198
|
+
blockId: BlockId;
|
|
21
199
|
};
|
|
22
200
|
export declare enum BroadcastValidation {
|
|
201
|
+
/**
|
|
202
|
+
NOTE: The value `none` is not part of the spec.
|
|
203
|
+
|
|
204
|
+
In case a node is configured only with the unknownBlockSync, it needs to know the unknown parent blocks on the network
|
|
205
|
+
to initiate the syncing process. Such cases can be covered only if we publish blocks and make sure no gossip validation
|
|
206
|
+
is performed on those. But this behavior is not the default.
|
|
207
|
+
*/
|
|
23
208
|
none = "none",
|
|
24
209
|
gossip = "gossip",
|
|
25
210
|
consensus = "consensus",
|
|
26
211
|
consensusAndEquivocation = "consensus_and_equivocation"
|
|
27
212
|
}
|
|
28
|
-
export type
|
|
29
|
-
[HttpStatusCode.OK]: Uint8Array;
|
|
30
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.NOT_FOUND> : ApiClientResponse<{
|
|
31
|
-
[HttpStatusCode.OK]: {
|
|
32
|
-
data: allForks.SignedBeaconBlock;
|
|
33
|
-
};
|
|
34
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.NOT_FOUND>;
|
|
35
|
-
export type BlockV2Response<T extends ResponseFormat = "json"> = T extends "ssz" ? ApiClientResponse<{
|
|
36
|
-
[HttpStatusCode.OK]: Uint8Array;
|
|
37
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.NOT_FOUND> : ApiClientResponse<{
|
|
38
|
-
[HttpStatusCode.OK]: {
|
|
39
|
-
data: allForks.SignedBeaconBlock;
|
|
40
|
-
executionOptimistic: ExecutionOptimistic;
|
|
41
|
-
finalized: Finalized;
|
|
42
|
-
version: ForkName;
|
|
43
|
-
};
|
|
44
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.NOT_FOUND>;
|
|
45
|
-
export type Api = {
|
|
213
|
+
export type Endpoints = {
|
|
46
214
|
/**
|
|
47
215
|
* Get block
|
|
48
216
|
* Returns the complete `SignedBeaconBlock` for a given block ID.
|
|
49
|
-
* Depending on the `Accept` header it can be returned either as JSON or SSZ-serialized bytes.
|
|
50
|
-
*
|
|
51
|
-
* @param blockId Block identifier.
|
|
52
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
53
217
|
*/
|
|
54
|
-
getBlock<
|
|
218
|
+
getBlock: Endpoint<"GET", BlockArgs, {
|
|
219
|
+
params: {
|
|
220
|
+
block_id: string;
|
|
221
|
+
};
|
|
222
|
+
}, phase0.SignedBeaconBlock, EmptyMeta>;
|
|
55
223
|
/**
|
|
56
224
|
* Get block
|
|
57
225
|
* Retrieves block details for given block id.
|
|
58
|
-
* @param blockId Block identifier.
|
|
59
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
60
226
|
*/
|
|
61
|
-
getBlockV2<
|
|
227
|
+
getBlockV2: Endpoint<"GET", BlockArgs, {
|
|
228
|
+
params: {
|
|
229
|
+
block_id: string;
|
|
230
|
+
};
|
|
231
|
+
}, allForks.SignedBeaconBlock, ExecutionOptimisticFinalizedAndVersionMeta>;
|
|
62
232
|
/**
|
|
63
233
|
* Get block attestations
|
|
64
234
|
* Retrieves attestation included in requested block.
|
|
65
|
-
* @param blockId Block identifier.
|
|
66
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
67
235
|
*/
|
|
68
|
-
getBlockAttestations
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
executionOptimistic: ExecutionOptimistic;
|
|
72
|
-
finalized: Finalized;
|
|
236
|
+
getBlockAttestations: Endpoint<"GET", BlockArgs, {
|
|
237
|
+
params: {
|
|
238
|
+
block_id: string;
|
|
73
239
|
};
|
|
74
|
-
},
|
|
240
|
+
}, allForks.BeaconBlockBody["attestations"], ExecutionOptimisticAndFinalizedMeta>;
|
|
75
241
|
/**
|
|
76
242
|
* Get block header
|
|
77
243
|
* Retrieves block header for given block id.
|
|
78
|
-
* @param blockId Block identifier.
|
|
79
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
80
244
|
*/
|
|
81
|
-
getBlockHeader
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
executionOptimistic: ExecutionOptimistic;
|
|
85
|
-
finalized: Finalized;
|
|
245
|
+
getBlockHeader: Endpoint<"GET", BlockArgs, {
|
|
246
|
+
params: {
|
|
247
|
+
block_id: string;
|
|
86
248
|
};
|
|
87
|
-
},
|
|
249
|
+
}, BlockHeaderResponse, ExecutionOptimisticAndFinalizedMeta>;
|
|
88
250
|
/**
|
|
89
251
|
* Get block headers
|
|
90
252
|
* Retrieves block headers matching given query. By default it will fetch current head slot blocks.
|
|
91
|
-
* @param slot
|
|
92
|
-
* @param parentRoot
|
|
93
253
|
*/
|
|
94
|
-
getBlockHeaders
|
|
95
|
-
slot
|
|
96
|
-
parentRoot
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
finalized: Finalized;
|
|
254
|
+
getBlockHeaders: Endpoint<"GET", {
|
|
255
|
+
slot?: Slot;
|
|
256
|
+
parentRoot?: string;
|
|
257
|
+
}, {
|
|
258
|
+
query: {
|
|
259
|
+
slot?: number;
|
|
260
|
+
parent_root?: string;
|
|
102
261
|
};
|
|
103
|
-
},
|
|
262
|
+
}, BlockHeaderResponse[], ExecutionOptimisticAndFinalizedMeta>;
|
|
104
263
|
/**
|
|
105
264
|
* Get block root
|
|
106
265
|
* Retrieves hashTreeRoot of BeaconBlock/BeaconBlockHeader
|
|
107
|
-
* @param blockId Block identifier.
|
|
108
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
109
266
|
*/
|
|
110
|
-
getBlockRoot
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
root: Root;
|
|
114
|
-
};
|
|
115
|
-
executionOptimistic: ExecutionOptimistic;
|
|
116
|
-
finalized: Finalized;
|
|
267
|
+
getBlockRoot: Endpoint<"GET", BlockArgs, {
|
|
268
|
+
params: {
|
|
269
|
+
block_id: string;
|
|
117
270
|
};
|
|
118
|
-
},
|
|
271
|
+
}, RootResponse, ExecutionOptimisticAndFinalizedMeta>;
|
|
119
272
|
/**
|
|
120
273
|
* Publish a signed block.
|
|
121
274
|
* Instructs the beacon node to broadcast a newly signed beacon block to the beacon network,
|
|
@@ -125,105 +278,70 @@ export type Api = {
|
|
|
125
278
|
* therefore validate the block internally, however blocks which fail the validation are still
|
|
126
279
|
* broadcast but a different status code is returned (202)
|
|
127
280
|
*
|
|
128
|
-
*
|
|
129
|
-
* @returns any The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
|
|
281
|
+
* Returns if the block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
|
|
130
282
|
*/
|
|
131
|
-
publishBlock
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
283
|
+
publishBlock: Endpoint<"POST", {
|
|
284
|
+
signedBlockOrContents: allForks.SignedBeaconBlockOrContents;
|
|
285
|
+
}, {
|
|
286
|
+
body: unknown;
|
|
287
|
+
headers: {
|
|
288
|
+
[MetaHeader.Version]: string;
|
|
289
|
+
};
|
|
290
|
+
}, EmptyResponseData, EmptyMeta>;
|
|
291
|
+
publishBlockV2: Endpoint<"POST", {
|
|
292
|
+
signedBlockOrContents: allForks.SignedBeaconBlockOrContents;
|
|
136
293
|
broadcastValidation?: BroadcastValidation;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
294
|
+
}, {
|
|
295
|
+
body: unknown;
|
|
296
|
+
headers: {
|
|
297
|
+
[MetaHeader.Version]: string;
|
|
298
|
+
};
|
|
299
|
+
query: {
|
|
300
|
+
broadcast_validation?: string;
|
|
301
|
+
};
|
|
302
|
+
}, EmptyResponseData, EmptyMeta>;
|
|
141
303
|
/**
|
|
142
304
|
* Publish a signed blinded block by submitting it to the mev relay and patching in the block
|
|
143
305
|
* transactions beacon node gets in response.
|
|
144
306
|
*/
|
|
145
|
-
publishBlindedBlock
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.SERVICE_UNAVAILABLE>>;
|
|
149
|
-
publishBlindedBlockV2(blindedBlockOrContents: allForks.SignedBlindedBeaconBlock, opts: {
|
|
150
|
-
broadcastValidation?: BroadcastValidation;
|
|
151
|
-
}): Promise<ApiClientResponse<{
|
|
152
|
-
[HttpStatusCode.OK]: void;
|
|
153
|
-
[HttpStatusCode.ACCEPTED]: void;
|
|
154
|
-
}, HttpStatusCode.BAD_REQUEST | HttpStatusCode.SERVICE_UNAVAILABLE>>;
|
|
155
|
-
/**
|
|
156
|
-
* Get block BlobSidecar
|
|
157
|
-
* Retrieves BlobSidecar included in requested block.
|
|
158
|
-
* @param blockId Block identifier.
|
|
159
|
-
* Can be one of: "head" (canonical head in node's view), "genesis", "finalized", \<slot\>, \<hex encoded blockRoot with 0x prefix\>.
|
|
160
|
-
* @param indices Array of indices for blob sidecars to request for in the specified block. Returns all blob sidecars in the block if not specified.
|
|
161
|
-
*/
|
|
162
|
-
getBlobSidecars(blockId: BlockId, indices?: number[]): Promise<ApiClientResponse<{
|
|
163
|
-
[HttpStatusCode.OK]: {
|
|
164
|
-
data: deneb.BlobSidecars;
|
|
165
|
-
executionOptimistic: ExecutionOptimistic;
|
|
166
|
-
finalized: Finalized;
|
|
167
|
-
};
|
|
168
|
-
}>>;
|
|
169
|
-
};
|
|
170
|
-
/**
|
|
171
|
-
* Define javascript values for each route
|
|
172
|
-
*/
|
|
173
|
-
export declare const routesData: RoutesData<Api>;
|
|
174
|
-
type GetBlockReq = {
|
|
175
|
-
params: {
|
|
176
|
-
block_id: string;
|
|
177
|
-
};
|
|
178
|
-
headers: {
|
|
179
|
-
accept?: string;
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
type BlockIdOnlyReq = {
|
|
183
|
-
params: {
|
|
184
|
-
block_id: string;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
export type ReqTypes = {
|
|
188
|
-
getBlock: GetBlockReq;
|
|
189
|
-
getBlockV2: GetBlockReq;
|
|
190
|
-
getBlockAttestations: BlockIdOnlyReq;
|
|
191
|
-
getBlockHeader: BlockIdOnlyReq;
|
|
192
|
-
getBlockHeaders: {
|
|
193
|
-
query: {
|
|
194
|
-
slot?: number;
|
|
195
|
-
parent_root?: string;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
getBlockRoot: BlockIdOnlyReq;
|
|
199
|
-
publishBlock: {
|
|
200
|
-
body: unknown;
|
|
201
|
-
};
|
|
202
|
-
publishBlockV2: {
|
|
307
|
+
publishBlindedBlock: Endpoint<"POST", {
|
|
308
|
+
signedBlindedBlock: allForks.SignedBlindedBeaconBlock;
|
|
309
|
+
}, {
|
|
203
310
|
body: unknown;
|
|
204
|
-
|
|
205
|
-
|
|
311
|
+
headers: {
|
|
312
|
+
[MetaHeader.Version]: string;
|
|
206
313
|
};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
314
|
+
}, EmptyResponseData, EmptyMeta>;
|
|
315
|
+
publishBlindedBlockV2: Endpoint<"POST", {
|
|
316
|
+
signedBlindedBlock: allForks.SignedBlindedBeaconBlock;
|
|
317
|
+
broadcastValidation?: BroadcastValidation;
|
|
318
|
+
}, {
|
|
212
319
|
body: unknown;
|
|
320
|
+
headers: {
|
|
321
|
+
[MetaHeader.Version]: string;
|
|
322
|
+
};
|
|
213
323
|
query: {
|
|
214
324
|
broadcast_validation?: string;
|
|
215
325
|
};
|
|
216
|
-
}
|
|
217
|
-
|
|
326
|
+
}, EmptyResponseData, EmptyMeta>;
|
|
327
|
+
/**
|
|
328
|
+
* Get block BlobSidecar
|
|
329
|
+
* Retrieves BlobSidecar included in requested block.
|
|
330
|
+
*/
|
|
331
|
+
getBlobSidecars: Endpoint<"GET", BlockArgs & {
|
|
332
|
+
/**
|
|
333
|
+
* Array of indices for blob sidecars to request for in the specified block.
|
|
334
|
+
* Returns all blob sidecars in the block if not specified.
|
|
335
|
+
*/
|
|
336
|
+
indices?: number[];
|
|
337
|
+
}, {
|
|
218
338
|
params: {
|
|
219
339
|
block_id: string;
|
|
220
340
|
};
|
|
221
341
|
query: {
|
|
222
342
|
indices?: number[];
|
|
223
343
|
};
|
|
224
|
-
}
|
|
344
|
+
}, deneb.BlobSidecars, ExecutionOptimisticFinalizedAndVersionMeta>;
|
|
225
345
|
};
|
|
226
|
-
export declare function
|
|
227
|
-
export declare function getReturnTypes(): ReturnTypes<Api>;
|
|
228
|
-
export {};
|
|
346
|
+
export declare function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoints>;
|
|
229
347
|
//# sourceMappingURL=block.d.ts.map
|