@lodestar/api 1.20.0-dev.14855ea72f → 1.20.0-dev.1aba391b1b

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.
Files changed (228) hide show
  1. package/README.md +10 -17
  2. package/lib/beacon/client/beacon.d.ts +4 -3
  3. package/lib/beacon/client/beacon.js +3 -36
  4. package/lib/beacon/client/beacon.js.map +1 -1
  5. package/lib/beacon/client/config.d.ts +4 -3
  6. package/lib/beacon/client/config.js +3 -6
  7. package/lib/beacon/client/config.js.map +1 -1
  8. package/lib/beacon/client/debug.d.ts +4 -3
  9. package/lib/beacon/client/debug.js +4 -45
  10. package/lib/beacon/client/debug.js.map +1 -1
  11. package/lib/beacon/client/events.d.ts +5 -2
  12. package/lib/beacon/client/events.js +33 -35
  13. package/lib/beacon/client/events.js.map +1 -1
  14. package/lib/beacon/client/index.d.ts +8 -3
  15. package/lib/beacon/client/index.js +3 -2
  16. package/lib/beacon/client/index.js.map +1 -1
  17. package/lib/beacon/client/lightclient.d.ts +4 -3
  18. package/lib/beacon/client/lightclient.js +4 -7
  19. package/lib/beacon/client/lightclient.js.map +1 -1
  20. package/lib/beacon/client/lodestar.d.ts +4 -3
  21. package/lib/beacon/client/lodestar.js +4 -7
  22. package/lib/beacon/client/lodestar.js.map +1 -1
  23. package/lib/beacon/client/node.d.ts +4 -3
  24. package/lib/beacon/client/node.js +4 -7
  25. package/lib/beacon/client/node.js.map +1 -1
  26. package/lib/beacon/client/proof.d.ts +5 -4
  27. package/lib/beacon/client/proof.js +5 -61
  28. package/lib/beacon/client/proof.js.map +1 -1
  29. package/lib/beacon/client/validator.d.ts +4 -3
  30. package/lib/beacon/client/validator.js +4 -7
  31. package/lib/beacon/client/validator.js.map +1 -1
  32. package/lib/beacon/index.d.ts +5 -5
  33. package/lib/beacon/index.js.map +1 -1
  34. package/lib/beacon/routes/beacon/block.d.ts +286 -167
  35. package/lib/beacon/routes/beacon/block.js +317 -117
  36. package/lib/beacon/routes/beacon/block.js.map +1 -1
  37. package/lib/beacon/routes/beacon/index.d.ts +6 -588
  38. package/lib/beacon/routes/beacon/index.js +16 -26
  39. package/lib/beacon/routes/beacon/index.js.map +1 -1
  40. package/lib/beacon/routes/beacon/pool.d.ts +155 -117
  41. package/lib/beacon/routes/beacon/pool.js +146 -42
  42. package/lib/beacon/routes/beacon/pool.js.map +1 -1
  43. package/lib/beacon/routes/beacon/rewards.d.ts +113 -101
  44. package/lib/beacon/routes/beacon/rewards.js +98 -63
  45. package/lib/beacon/routes/beacon/rewards.js.map +1 -1
  46. package/lib/beacon/routes/beacon/state.d.ts +172 -226
  47. package/lib/beacon/routes/beacon/state.js +204 -126
  48. package/lib/beacon/routes/beacon/state.js.map +1 -1
  49. package/lib/beacon/routes/config.d.ts +21 -36
  50. package/lib/beacon/routes/config.js +45 -24
  51. package/lib/beacon/routes/config.js.map +1 -1
  52. package/lib/beacon/routes/debug.d.ts +22 -104
  53. package/lib/beacon/routes/debug.js +53 -45
  54. package/lib/beacon/routes/debug.js.map +1 -1
  55. package/lib/beacon/routes/events.d.ts +24 -20
  56. package/lib/beacon/routes/events.js +40 -18
  57. package/lib/beacon/routes/events.js.map +1 -1
  58. package/lib/beacon/routes/index.d.ts +19 -19
  59. package/lib/beacon/routes/index.js +1 -0
  60. package/lib/beacon/routes/index.js.map +1 -1
  61. package/lib/beacon/routes/lightclient.d.ts +34 -56
  62. package/lib/beacon/routes/lightclient.js +108 -48
  63. package/lib/beacon/routes/lightclient.js.map +1 -1
  64. package/lib/beacon/routes/lodestar.d.ts +74 -148
  65. package/lib/beacon/routes/lodestar.js +126 -77
  66. package/lib/beacon/routes/lodestar.js.map +1 -1
  67. package/lib/beacon/routes/node.d.ts +48 -82
  68. package/lib/beacon/routes/node.js +90 -57
  69. package/lib/beacon/routes/node.js.map +1 -1
  70. package/lib/beacon/routes/proof.d.ts +25 -31
  71. package/lib/beacon/routes/proof.js +44 -24
  72. package/lib/beacon/routes/proof.js.map +1 -1
  73. package/lib/beacon/routes/validator.d.ts +524 -325
  74. package/lib/beacon/routes/validator.js +468 -213
  75. package/lib/beacon/routes/validator.js.map +1 -1
  76. package/lib/beacon/server/beacon.d.ts +3 -4
  77. package/lib/beacon/server/beacon.js +4 -57
  78. package/lib/beacon/server/beacon.js.map +1 -1
  79. package/lib/beacon/server/config.d.ts +3 -4
  80. package/lib/beacon/server/config.js +4 -5
  81. package/lib/beacon/server/config.js.map +1 -1
  82. package/lib/beacon/server/debug.d.ts +3 -4
  83. package/lib/beacon/server/debug.js +4 -54
  84. package/lib/beacon/server/debug.js.map +1 -1
  85. package/lib/beacon/server/events.d.ts +4 -4
  86. package/lib/beacon/server/events.js +17 -23
  87. package/lib/beacon/server/events.js.map +1 -1
  88. package/lib/beacon/server/index.d.ts +7 -8
  89. package/lib/beacon/server/index.js +13 -14
  90. package/lib/beacon/server/index.js.map +1 -1
  91. package/lib/beacon/server/lightclient.d.ts +3 -4
  92. package/lib/beacon/server/lightclient.js +4 -5
  93. package/lib/beacon/server/lightclient.js.map +1 -1
  94. package/lib/beacon/server/lodestar.d.ts +3 -4
  95. package/lib/beacon/server/lodestar.js +4 -5
  96. package/lib/beacon/server/lodestar.js.map +1 -1
  97. package/lib/beacon/server/node.d.ts +3 -4
  98. package/lib/beacon/server/node.js +4 -18
  99. package/lib/beacon/server/node.js.map +1 -1
  100. package/lib/beacon/server/proof.d.ts +3 -4
  101. package/lib/beacon/server/proof.js +4 -36
  102. package/lib/beacon/server/proof.js.map +1 -1
  103. package/lib/beacon/server/validator.d.ts +3 -4
  104. package/lib/beacon/server/validator.js +4 -21
  105. package/lib/beacon/server/validator.js.map +1 -1
  106. package/lib/builder/client.d.ts +4 -6
  107. package/lib/builder/client.js +3 -9
  108. package/lib/builder/client.js.map +1 -1
  109. package/lib/builder/index.d.ts +8 -5
  110. package/lib/builder/index.js +4 -1
  111. package/lib/builder/index.js.map +1 -1
  112. package/lib/builder/routes.d.ts +25 -39
  113. package/lib/builder/routes.js +78 -34
  114. package/lib/builder/routes.js.map +1 -1
  115. package/lib/builder/server/index.d.ts +6 -6
  116. package/lib/builder/server/index.js +7 -8
  117. package/lib/builder/server/index.js.map +1 -1
  118. package/lib/index.d.ts +9 -6
  119. package/lib/index.js +5 -4
  120. package/lib/index.js.map +1 -1
  121. package/lib/keymanager/client.d.ts +4 -3
  122. package/lib/keymanager/client.js +4 -7
  123. package/lib/keymanager/client.js.map +1 -1
  124. package/lib/keymanager/index.d.ts +5 -4
  125. package/lib/keymanager/index.js +1 -1
  126. package/lib/keymanager/index.js.map +1 -1
  127. package/lib/keymanager/routes.d.ts +155 -177
  128. package/lib/keymanager/routes.js +236 -123
  129. package/lib/keymanager/routes.js.map +1 -1
  130. package/lib/keymanager/server/index.d.ts +6 -6
  131. package/lib/keymanager/server/index.js +7 -8
  132. package/lib/keymanager/server/index.js.map +1 -1
  133. package/lib/server/index.d.ts +2 -0
  134. package/lib/server/index.js +3 -0
  135. package/lib/server/index.js.map +1 -0
  136. package/lib/utils/client/error.d.ts +6 -0
  137. package/lib/utils/client/error.js +8 -0
  138. package/lib/utils/client/error.js.map +1 -0
  139. package/lib/utils/client/httpClient.d.ts +38 -76
  140. package/lib/utils/client/httpClient.js +201 -153
  141. package/lib/utils/client/httpClient.js.map +1 -1
  142. package/lib/utils/client/index.d.ts +6 -2
  143. package/lib/utils/client/index.js +6 -2
  144. package/lib/utils/client/index.js.map +1 -1
  145. package/lib/utils/client/method.d.ts +11 -0
  146. package/lib/utils/client/method.js +27 -0
  147. package/lib/utils/client/method.js.map +1 -0
  148. package/lib/utils/client/request.d.ts +33 -0
  149. package/lib/utils/client/request.js +66 -0
  150. package/lib/utils/client/request.js.map +1 -0
  151. package/lib/utils/client/response.d.ts +36 -0
  152. package/lib/utils/client/response.js +167 -0
  153. package/lib/utils/client/response.js.map +1 -0
  154. package/lib/utils/codecs.d.ts +28 -0
  155. package/lib/utils/codecs.js +105 -0
  156. package/lib/utils/codecs.js.map +1 -0
  157. package/lib/utils/fork.d.ts +7 -0
  158. package/lib/utils/fork.js +29 -0
  159. package/lib/utils/fork.js.map +1 -0
  160. package/lib/utils/headers.d.ts +37 -0
  161. package/lib/utils/headers.js +134 -0
  162. package/lib/utils/headers.js.map +1 -0
  163. package/lib/utils/httpStatusCode.js.map +1 -0
  164. package/lib/utils/index.d.ts +1 -1
  165. package/lib/utils/index.js +1 -1
  166. package/lib/utils/index.js.map +1 -1
  167. package/lib/utils/metadata.d.ts +88 -0
  168. package/lib/utils/metadata.js +126 -0
  169. package/lib/utils/metadata.js.map +1 -0
  170. package/lib/utils/schema.d.ts +31 -17
  171. package/lib/utils/schema.js +18 -6
  172. package/lib/utils/schema.js.map +1 -1
  173. package/lib/utils/serdes.d.ts +3 -0
  174. package/lib/utils/serdes.js +13 -0
  175. package/lib/utils/serdes.js.map +1 -1
  176. package/lib/utils/server/{errors.d.ts → error.d.ts} +2 -2
  177. package/lib/utils/server/{errors.js → error.js} +1 -1
  178. package/lib/utils/server/error.js.map +1 -0
  179. package/lib/utils/server/handler.d.ts +11 -0
  180. package/lib/utils/server/handler.js +115 -0
  181. package/lib/utils/server/handler.js.map +1 -0
  182. package/lib/utils/server/index.d.ts +5 -4
  183. package/lib/utils/server/index.js +5 -4
  184. package/lib/utils/server/index.js.map +1 -1
  185. package/lib/utils/server/method.d.ts +35 -0
  186. package/lib/utils/server/method.js +2 -0
  187. package/lib/utils/server/method.js.map +1 -0
  188. package/lib/utils/server/parser.d.ts +3 -0
  189. package/lib/utils/server/parser.js +20 -0
  190. package/lib/utils/server/parser.js.map +1 -0
  191. package/lib/utils/server/route.d.ts +20 -0
  192. package/lib/utils/server/route.js +19 -0
  193. package/lib/utils/server/route.js.map +1 -0
  194. package/lib/utils/types.d.ts +116 -104
  195. package/lib/utils/types.js +2 -155
  196. package/lib/utils/types.js.map +1 -1
  197. package/lib/utils/urlFormat.d.ts +2 -2
  198. package/lib/utils/urlFormat.js +3 -3
  199. package/lib/utils/urlFormat.js.map +1 -1
  200. package/lib/utils/wireFormat.d.ts +8 -0
  201. package/lib/utils/wireFormat.js +23 -0
  202. package/lib/utils/wireFormat.js.map +1 -0
  203. package/package.json +10 -7
  204. package/lib/interfaces.d.ts +0 -44
  205. package/lib/interfaces.js +0 -2
  206. package/lib/interfaces.js.map +0 -1
  207. package/lib/utils/acceptHeader.d.ts +0 -9
  208. package/lib/utils/acceptHeader.js +0 -62
  209. package/lib/utils/acceptHeader.js.map +0 -1
  210. package/lib/utils/client/client.d.ts +0 -29
  211. package/lib/utils/client/client.js +0 -88
  212. package/lib/utils/client/client.js.map +0 -1
  213. package/lib/utils/client/httpStatusCode.js.map +0 -1
  214. package/lib/utils/routes.d.ts +0 -6
  215. package/lib/utils/routes.js +0 -31
  216. package/lib/utils/routes.js.map +0 -1
  217. package/lib/utils/server/errors.js.map +0 -1
  218. package/lib/utils/server/genericJsonServer.d.ts +0 -13
  219. package/lib/utils/server/genericJsonServer.js +0 -32
  220. package/lib/utils/server/genericJsonServer.js.map +0 -1
  221. package/lib/utils/server/registerRoute.d.ts +0 -3
  222. package/lib/utils/server/registerRoute.js +0 -13
  223. package/lib/utils/server/registerRoute.js.map +0 -1
  224. package/lib/utils/server/types.d.ts +0 -22
  225. package/lib/utils/server/types.js +0 -2
  226. package/lib/utils/server/types.js.map +0 -1
  227. /package/lib/utils/{client/httpStatusCode.d.ts → httpStatusCode.d.ts} +0 -0
  228. /package/lib/utils/{client/httpStatusCode.js → httpStatusCode.js} +0 -0
@@ -1,7 +1,8 @@
1
+ import { ContainerType, ValueOf } from "@chainsafe/ssz";
2
+ import { ChainForkConfig } from "@lodestar/config";
1
3
  import { Epoch, phase0 } from "@lodestar/types";
2
- import { ApiClientResponse } from "../interfaces.js";
3
- import { HttpStatusCode } from "../utils/client/httpStatusCode.js";
4
- import { ReturnTypes, RoutesData, ReqSerializers, ReqEmpty } from "../utils/index.js";
4
+ import { Endpoint, RouteDefinitions } from "../utils/index.js";
5
+ import { EmptyArgs, EmptyMeta, EmptyRequest, EmptyResponseData } from "../utils/codecs.js";
5
6
  export declare enum ImportStatus {
6
7
  /** Keystore successfully decrypted and imported to keymanager permanent storage */
7
8
  imported = "imported",
@@ -44,22 +45,26 @@ export type ResponseStatus<Status> = {
44
45
  status: Status;
45
46
  message?: string;
46
47
  };
47
- export type FeeRecipientData = {
48
- pubkey: string;
49
- ethaddress: string;
50
- };
51
- export type GraffitiData = {
52
- pubkey: string;
53
- graffiti: string;
54
- };
55
- export type GasLimitData = {
56
- pubkey: string;
57
- gasLimit: number;
58
- };
59
- export type BuilderBoostFactorData = {
60
- pubkey: string;
61
- builderBoostFactor: bigint;
62
- };
48
+ export declare const FeeRecipientDataType: ContainerType<{
49
+ pubkey: import("@lodestar/types").StringType<string>;
50
+ ethaddress: import("@lodestar/types").StringType<string>;
51
+ }>;
52
+ export declare const GraffitiDataType: ContainerType<{
53
+ pubkey: import("@lodestar/types").StringType<string>;
54
+ graffiti: import("@lodestar/types").StringType<string>;
55
+ }>;
56
+ export declare const GasLimitDataType: ContainerType<{
57
+ pubkey: import("@lodestar/types").StringType<string>;
58
+ gasLimit: import("@chainsafe/ssz").UintNumberType;
59
+ }>;
60
+ export declare const BuilderBoostFactorDataType: ContainerType<{
61
+ pubkey: import("@lodestar/types").StringType<string>;
62
+ builderBoostFactor: import("@chainsafe/ssz").UintBigintType;
63
+ }>;
64
+ export type FeeRecipientData = ValueOf<typeof FeeRecipientDataType>;
65
+ export type GraffitiData = ValueOf<typeof GraffitiDataType>;
66
+ export type GasLimitData = ValueOf<typeof GasLimitDataType>;
67
+ export type BuilderBoostFactorData = ValueOf<typeof BuilderBoostFactorDataType>;
63
68
  export type SignerDefinition = {
64
69
  pubkey: PubkeyHex;
65
70
  /**
@@ -70,6 +75,7 @@ export type SignerDefinition = {
70
75
  /** The signer associated with this pubkey cannot be deleted from the API */
71
76
  readonly: boolean;
72
77
  };
78
+ export type RemoteSignerDefinition = Pick<SignerDefinition, "pubkey" | "url">;
73
79
  /**
74
80
  * JSON serialized representation of a single keystore in EIP-2335: BLS12-381 Keystore format.
75
81
  * ```
@@ -91,41 +97,57 @@ export type SlashingProtectionData = string;
91
97
  * ```
92
98
  */
93
99
  export type PubkeyHex = string;
94
- export type Api = {
100
+ /**
101
+ * An address on the execution (Ethereum 1) network.
102
+ * ```
103
+ * "0xAbcF8e0d4e9587369b2301D0790347320302cc09"
104
+ * ```
105
+ */
106
+ export type EthAddress = string;
107
+ /**
108
+ * Arbitrary data to set in the graffiti field of BeaconBlockBody
109
+ * ```
110
+ * "plain text value"
111
+ * ```
112
+ */
113
+ export type Graffiti = string;
114
+ export type Endpoints = {
95
115
  /**
96
116
  * List all validating pubkeys known to and decrypted by this keymanager binary
97
117
  *
98
118
  * https://github.com/ethereum/keymanager-APIs/blob/0c975dae2ac6053c8245ebdb6a9f27c2f114f407/keymanager-oapi.yaml
99
119
  */
100
- listKeys(): Promise<ApiClientResponse<{
101
- [HttpStatusCode.OK]: {
102
- data: {
103
- validatingPubkey: PubkeyHex;
104
- /** The derivation path (if present in the imported keystore) */
105
- derivationPath?: string;
106
- /** The key associated with this pubkey cannot be deleted from the API */
107
- readonly?: boolean;
108
- }[];
109
- };
110
- }>>;
120
+ listKeys: Endpoint<"GET", EmptyArgs, EmptyRequest, {
121
+ validatingPubkey: PubkeyHex;
122
+ /** The derivation path (if present in the imported keystore) */
123
+ derivationPath?: string;
124
+ /** The key associated with this pubkey cannot be deleted from the API */
125
+ readonly?: boolean;
126
+ }[], EmptyMeta>;
111
127
  /**
112
128
  * Import keystores generated by the Eth2.0 deposit CLI tooling. `passwords[i]` must unlock `keystores[i]`.
113
129
  *
114
130
  * Users SHOULD send slashing_protection data associated with the imported pubkeys. MUST follow the format defined in
115
131
  * EIP-3076: Slashing Protection Interchange Format.
116
132
  *
117
- * @param keystores JSON-encoded keystore files generated with the Launchpad
118
- * @param passwords Passwords to unlock imported keystore files. `passwords[i]` must unlock `keystores[i]`
119
- * @param slashingProtection Slashing protection data for some of the keys of `keystores`
120
- * @returns Status result of each `request.keystores` with same length and order of `request.keystores`
133
+ * Returns status result of each `request.keystores` with same length and order of `request.keystores`
121
134
  *
122
135
  * https://github.com/ethereum/keymanager-APIs/blob/0c975dae2ac6053c8245ebdb6a9f27c2f114f407/keymanager-oapi.yaml
123
136
  */
124
- importKeystores(keystoresStr: KeystoreStr[], passwords: string[], slashingProtectionStr?: SlashingProtectionData): Promise<ApiClientResponse<{
125
- [HttpStatusCode.OK]: {
126
- data: ResponseStatus<ImportStatus>[];
137
+ importKeystores: Endpoint<"POST", {
138
+ /** JSON-encoded keystore files generated with the Launchpad */
139
+ keystores: KeystoreStr[];
140
+ /** Passwords to unlock imported keystore files. `passwords[i]` must unlock `keystores[i]` */
141
+ passwords: string[];
142
+ /** Slashing protection data for some of the keys of `keystores` */
143
+ slashingProtection?: SlashingProtectionData;
144
+ }, {
145
+ body: {
146
+ keystores: KeystoreStr[];
147
+ passwords: string[];
148
+ slashing_protection?: SlashingProtectionData;
127
149
  };
128
- }>>;
150
+ }, ResponseStatus<ImportStatus>[], EmptyMeta>;
129
151
  /**
130
152
  * DELETE must delete all keys from `request.pubkeys` that are known to the keymanager and exist in its
131
153
  * persistent storage. Additionally, DELETE must fetch the slashing protection data for the requested keys from
@@ -142,214 +164,170 @@ export type Api = {
142
164
  * Slashing protection data must only be returned for keys from `request.pubkeys` for which a
143
165
  * `deleted` or `not_active` status is returned.
144
166
  *
145
- * @param pubkeys List of public keys to delete.
146
- * @returns Deletion status of all keys in `request.pubkeys` in the same order.
167
+ * Returns deletion status of all keys in `request.pubkeys` in the same order.
147
168
  *
148
169
  * https://github.com/ethereum/keymanager-APIs/blob/0c975dae2ac6053c8245ebdb6a9f27c2f114f407/keymanager-oapi.yaml
149
170
  */
150
- deleteKeys(pubkeysHex: string[]): Promise<ApiClientResponse<{
151
- [HttpStatusCode.OK]: {
152
- data: ResponseStatus<DeletionStatus>[];
153
- slashingProtection: SlashingProtectionData;
171
+ deleteKeys: Endpoint<"DELETE", {
172
+ /** List of public keys to delete */
173
+ pubkeys: PubkeyHex[];
174
+ }, {
175
+ body: {
176
+ pubkeys: string[];
154
177
  };
155
- }>>;
178
+ }, {
179
+ statuses: ResponseStatus<DeletionStatus>[];
180
+ slashingProtection: SlashingProtectionData;
181
+ }, EmptyMeta>;
156
182
  /**
157
183
  * List all remote validating pubkeys known to this validator client binary
158
184
  */
159
- listRemoteKeys(): Promise<ApiClientResponse<{
160
- [HttpStatusCode.OK]: {
161
- data: SignerDefinition[];
162
- };
163
- }>>;
185
+ listRemoteKeys: Endpoint<"GET", EmptyArgs, EmptyRequest, SignerDefinition[], EmptyMeta>;
164
186
  /**
165
187
  * Import remote keys for the validator client to request duties for
166
188
  */
167
- importRemoteKeys(remoteSigners: Pick<SignerDefinition, "pubkey" | "url">[]): Promise<ApiClientResponse<{
168
- [HttpStatusCode.OK]: {
169
- data: ResponseStatus<ImportRemoteKeyStatus>[];
170
- };
171
- }>>;
172
- deleteRemoteKeys(pubkeys: PubkeyHex[]): Promise<ApiClientResponse<{
173
- [HttpStatusCode.OK]: {
174
- data: ResponseStatus<DeleteRemoteKeyStatus>[];
175
- };
176
- }>>;
177
- listFeeRecipient(pubkey: string): Promise<ApiClientResponse<{
178
- [HttpStatusCode.OK]: {
179
- data: FeeRecipientData;
180
- };
181
- }>>;
182
- setFeeRecipient(pubkey: string, ethaddress: string): Promise<ApiClientResponse<{
183
- [HttpStatusCode.OK]: void;
184
- [HttpStatusCode.NO_CONTENT]: void;
185
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
186
- deleteFeeRecipient(pubkey: string): Promise<ApiClientResponse<{
187
- [HttpStatusCode.OK]: void;
188
- [HttpStatusCode.NO_CONTENT]: void;
189
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
190
- listGraffiti(pubkey: string): Promise<ApiClientResponse<{
191
- [HttpStatusCode.OK]: {
192
- data: GraffitiData;
193
- };
194
- }>>;
195
- setGraffiti(pubkey: string, graffiti: string): Promise<ApiClientResponse<{
196
- [HttpStatusCode.OK]: void;
197
- [HttpStatusCode.NO_CONTENT]: void;
198
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
199
- deleteGraffiti(pubkey: string): Promise<ApiClientResponse<{
200
- [HttpStatusCode.OK]: void;
201
- [HttpStatusCode.NO_CONTENT]: void;
202
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
203
- getGasLimit(pubkey: string): Promise<ApiClientResponse<{
204
- [HttpStatusCode.OK]: {
205
- data: GasLimitData;
206
- };
207
- }>>;
208
- setGasLimit(pubkey: string, gasLimit: number): Promise<ApiClientResponse<{
209
- [HttpStatusCode.OK]: void;
210
- [HttpStatusCode.NO_CONTENT]: void;
211
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
212
- deleteGasLimit(pubkey: string): Promise<ApiClientResponse<{
213
- [HttpStatusCode.OK]: void;
214
- [HttpStatusCode.NO_CONTENT]: void;
215
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
216
- getBuilderBoostFactor(pubkey: string): Promise<ApiClientResponse<{
217
- [HttpStatusCode.OK]: {
218
- data: BuilderBoostFactorData;
189
+ importRemoteKeys: Endpoint<"POST", {
190
+ remoteSigners: RemoteSignerDefinition[];
191
+ }, {
192
+ body: {
193
+ remote_keys: RemoteSignerDefinition[];
219
194
  };
220
- }>>;
221
- setBuilderBoostFactor(pubkey: string, builderBoostFactor: bigint): Promise<ApiClientResponse<{
222
- [HttpStatusCode.OK]: void;
223
- [HttpStatusCode.NO_CONTENT]: void;
224
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
225
- deleteBuilderBoostFactor(pubkey: string): Promise<ApiClientResponse<{
226
- [HttpStatusCode.OK]: void;
227
- [HttpStatusCode.NO_CONTENT]: void;
228
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
195
+ }, ResponseStatus<ImportRemoteKeyStatus>[], EmptyMeta>;
229
196
  /**
230
- * Create a signed voluntary exit message for an active validator, identified by a public key known to the validator
231
- * client. This endpoint returns a `SignedVoluntaryExit` object, which can be used to initiate voluntary exit via the
232
- * beacon node's [submitPoolVoluntaryExit](https://ethereum.github.io/beacon-APIs/#/Beacon/submitPoolVoluntaryExit) endpoint.
233
- *
234
- * @param pubkey Public key of an active validator known to the validator client
235
- * @param epoch Minimum epoch for processing exit. Defaults to the current epoch if not set
236
- * @returns Signed voluntary exit message
197
+ * DELETE must delete all keys from `request.pubkeys` that are known to the validator client and exist in its
198
+ * persistent storage.
237
199
  *
238
- * https://github.com/ethereum/keymanager-APIs/blob/7105e749e11dd78032ea275cc09bf62ecd548fca/keymanager-oapi.yaml
200
+ * DELETE should never return a 404 response, even if all pubkeys from `request.pubkeys` have no existing keystores.
239
201
  */
240
- signVoluntaryExit(pubkey: PubkeyHex, epoch?: Epoch): Promise<ApiClientResponse<{
241
- [HttpStatusCode.OK]: {
242
- data: phase0.SignedVoluntaryExit;
243
- };
244
- }, HttpStatusCode.UNAUTHORIZED | HttpStatusCode.FORBIDDEN | HttpStatusCode.NOT_FOUND>>;
245
- };
246
- export declare const routesData: RoutesData<Api>;
247
- export type ReqTypes = {
248
- listKeys: ReqEmpty;
249
- importKeystores: {
250
- body: {
251
- keystores: KeystoreStr[];
252
- passwords: string[];
253
- slashing_protection?: SlashingProtectionData;
254
- };
255
- };
256
- deleteKeys: {
202
+ deleteRemoteKeys: Endpoint<"DELETE", {
203
+ pubkeys: PubkeyHex[];
204
+ }, {
257
205
  body: {
258
206
  pubkeys: string[];
259
207
  };
260
- };
261
- listRemoteKeys: ReqEmpty;
262
- importRemoteKeys: {
263
- body: {
264
- remote_keys: Pick<SignerDefinition, "pubkey" | "url">[];
265
- };
266
- };
267
- deleteRemoteKeys: {
268
- body: {
269
- pubkeys: string[];
270
- };
271
- };
272
- listFeeRecipient: {
208
+ }, ResponseStatus<DeleteRemoteKeyStatus>[], EmptyMeta>;
209
+ listFeeRecipient: Endpoint<"GET", {
210
+ pubkey: PubkeyHex;
211
+ }, {
273
212
  params: {
274
213
  pubkey: string;
275
214
  };
276
- };
277
- setFeeRecipient: {
215
+ }, FeeRecipientData, EmptyMeta>;
216
+ setFeeRecipient: Endpoint<"POST", {
217
+ pubkey: PubkeyHex;
218
+ ethaddress: EthAddress;
219
+ }, {
278
220
  params: {
279
221
  pubkey: string;
280
222
  };
281
223
  body: {
282
224
  ethaddress: string;
283
225
  };
284
- };
285
- deleteFeeRecipient: {
226
+ }, EmptyResponseData, EmptyMeta>;
227
+ deleteFeeRecipient: Endpoint<"DELETE", {
228
+ pubkey: PubkeyHex;
229
+ }, {
286
230
  params: {
287
231
  pubkey: string;
288
232
  };
289
- };
290
- listGraffiti: {
233
+ }, EmptyResponseData, EmptyMeta>;
234
+ getGraffiti: Endpoint<"GET", {
235
+ pubkey: PubkeyHex;
236
+ }, {
291
237
  params: {
292
238
  pubkey: string;
293
239
  };
294
- };
295
- setGraffiti: {
240
+ }, GraffitiData, EmptyMeta>;
241
+ setGraffiti: Endpoint<"POST", {
242
+ pubkey: PubkeyHex;
243
+ graffiti: Graffiti;
244
+ }, {
296
245
  params: {
297
246
  pubkey: string;
298
247
  };
299
248
  body: {
300
249
  graffiti: string;
301
250
  };
302
- };
303
- deleteGraffiti: {
251
+ }, EmptyResponseData, EmptyMeta>;
252
+ deleteGraffiti: Endpoint<"DELETE", {
253
+ pubkey: PubkeyHex;
254
+ }, {
304
255
  params: {
305
256
  pubkey: string;
306
257
  };
307
- };
308
- getGasLimit: {
258
+ }, EmptyResponseData, EmptyMeta>;
259
+ getGasLimit: Endpoint<"GET", {
260
+ pubkey: PubkeyHex;
261
+ }, {
309
262
  params: {
310
263
  pubkey: string;
311
264
  };
312
- };
313
- setGasLimit: {
265
+ }, GasLimitData, EmptyMeta>;
266
+ setGasLimit: Endpoint<"POST", {
267
+ pubkey: PubkeyHex;
268
+ gasLimit: number;
269
+ }, {
314
270
  params: {
315
271
  pubkey: string;
316
272
  };
317
273
  body: {
318
274
  gas_limit: string;
319
275
  };
320
- };
321
- deleteGasLimit: {
276
+ }, EmptyResponseData, EmptyMeta>;
277
+ deleteGasLimit: Endpoint<"DELETE", {
278
+ pubkey: PubkeyHex;
279
+ }, {
322
280
  params: {
323
281
  pubkey: string;
324
282
  };
325
- };
326
- getBuilderBoostFactor: {
283
+ }, EmptyResponseData, EmptyMeta>;
284
+ getBuilderBoostFactor: Endpoint<"GET", {
285
+ pubkey: PubkeyHex;
286
+ }, {
327
287
  params: {
328
288
  pubkey: string;
329
289
  };
330
- };
331
- setBuilderBoostFactor: {
290
+ }, BuilderBoostFactorData, EmptyMeta>;
291
+ setBuilderBoostFactor: Endpoint<"POST", {
292
+ pubkey: PubkeyHex;
293
+ builderBoostFactor: bigint;
294
+ }, {
332
295
  params: {
333
296
  pubkey: string;
334
297
  };
335
298
  body: {
336
299
  builder_boost_factor: string;
337
300
  };
338
- };
339
- deleteBuilderBoostFactor: {
301
+ }, EmptyResponseData, EmptyMeta>;
302
+ deleteBuilderBoostFactor: Endpoint<"DELETE", {
303
+ pubkey: PubkeyHex;
304
+ }, {
340
305
  params: {
341
306
  pubkey: string;
342
307
  };
343
- };
344
- signVoluntaryExit: {
308
+ }, EmptyResponseData, EmptyMeta>;
309
+ /**
310
+ * Create a signed voluntary exit message for an active validator, identified by a public key known to the validator
311
+ * client. This endpoint returns a `SignedVoluntaryExit` object, which can be used to initiate voluntary exit via the
312
+ * beacon node's [submitPoolVoluntaryExit](https://ethereum.github.io/beacon-APIs/#/Beacon/submitPoolVoluntaryExit) endpoint.
313
+ *
314
+ * Returns the signed voluntary exit message
315
+ *
316
+ * https://github.com/ethereum/keymanager-APIs/blob/7105e749e11dd78032ea275cc09bf62ecd548fca/keymanager-oapi.yaml
317
+ */
318
+ signVoluntaryExit: Endpoint<"POST", {
319
+ /** Public key of an active validator known to the validator client */
320
+ pubkey: PubkeyHex;
321
+ /** Minimum epoch for processing exit. Defaults to the current epoch if not set */
322
+ epoch?: Epoch;
323
+ }, {
345
324
  params: {
346
325
  pubkey: string;
347
326
  };
348
327
  query: {
349
328
  epoch?: number;
350
329
  };
351
- };
330
+ }, phase0.SignedVoluntaryExit, EmptyMeta>;
352
331
  };
353
- export declare function getReqSerializers(): ReqSerializers<Api, ReqTypes>;
354
- export declare function getReturnTypes(): ReturnTypes<Api>;
332
+ export declare function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints>;
355
333
  //# sourceMappingURL=routes.d.ts.map