2022-07-29 10:53:42 +00:00
|
|
|
# Copyright (c) 2018-2022 Status Research & Development GmbH
|
2021-08-03 15:17:11 +00:00
|
|
|
# Licensed and distributed under either of
|
|
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
2022-07-29 10:53:42 +00:00
|
|
|
when (NimMajor, NimMinor) < (1, 4):
|
|
|
|
{.push raises: [Defect].}
|
|
|
|
else:
|
|
|
|
{.push raises: [].}
|
2021-08-03 15:17:11 +00:00
|
|
|
|
|
|
|
import
|
2021-08-27 09:00:06 +00:00
|
|
|
chronos, presto/client,
|
2021-08-03 15:17:11 +00:00
|
|
|
"."/[rest_types, eth2_rest_serialization]
|
|
|
|
|
2021-08-27 09:00:06 +00:00
|
|
|
export chronos, client, rest_types, eth2_rest_serialization
|
2021-08-03 15:17:11 +00:00
|
|
|
|
|
|
|
proc getForkSchedule*(): RestResponse[GetForkScheduleResponse] {.
|
|
|
|
rest, endpoint: "/eth/v1/config/fork_schedule", meth: MethodGet.}
|
2021-08-27 09:00:06 +00:00
|
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule
|
2021-08-03 15:17:11 +00:00
|
|
|
|
|
|
|
proc getSpec*(): RestResponse[GetSpecResponse] {.
|
|
|
|
rest, endpoint: "/eth/v1/config/spec", meth: MethodGet.}
|
2021-08-27 09:00:06 +00:00
|
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getSpec
|
2021-08-03 15:17:11 +00:00
|
|
|
|
2021-10-20 09:58:38 +00:00
|
|
|
proc getSpecVC*(): RestResponse[GetSpecVCResponse] {.
|
|
|
|
rest, endpoint: "/eth/v1/config/spec", meth: MethodGet.}
|
|
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getSpec
|
|
|
|
|
2021-08-03 15:17:11 +00:00
|
|
|
proc getDepositContract*(): RestResponse[GetDepositContractResponse] {.
|
|
|
|
rest, endpoint: "/eth/v1/config/deposit_contract", meth: MethodGet.}
|
2021-08-27 09:00:06 +00:00
|
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getDepositContract
|