From 943431de3fa16d7349b363c35ba5ea9f80b423d3 Mon Sep 17 00:00:00 2001 From: jangko Date: Tue, 8 Aug 2023 09:41:43 +0700 Subject: [PATCH] add engine_exchangeCapabilities callsigs --- web3/engine_api.nim | 5 +++++ web3/engine_api_callsigs.nim | 3 +++ 2 files changed, 8 insertions(+) diff --git a/web3/engine_api.nim b/web3/engine_api.nim index 5917887..19b1c4f 100644 --- a/web3/engine_api.nim +++ b/web3/engine_api.nim @@ -71,3 +71,8 @@ template newPayload*( parentBeaconBlockRoot: FixedBytes[32]): Future[PayloadStatusV1] = engine_newPayloadV3( rpcClient, payload, versionedHashes, parentBeaconBlockRoot) + +template exchangeCapabilities*( + rpcClient: RpcClient, + methods: seq[string]): Future[seq[string]] = + engine_exchangeCapabilities(rpcClient, methods) diff --git a/web3/engine_api_callsigs.nim b/web3/engine_api_callsigs.nim index d4ad352..771b943 100644 --- a/web3/engine_api_callsigs.nim +++ b/web3/engine_api_callsigs.nim @@ -16,3 +16,6 @@ proc engine_getPayloadV2_exact(payloadId: PayloadID): GetPayloadV2ResponseExact proc engine_getPayloadV3(payloadId: PayloadID): GetPayloadV3Response proc engine_exchangeTransitionConfigurationV1(transitionConfiguration: TransitionConfigurationV1): TransitionConfigurationV1 proc engine_getPayloadBodiesByHashV1(hashes: seq[BlockHash]): seq[Option[ExecutionPayloadBodyV1]] + +# https://github.com/ethereum/execution-apis/blob/9301c0697e4c7566f0929147112f6d91f65180f6/src/engine/common.md +proc engine_exchangeCapabilities(methods: seq[string]): seq[string]