pub trait EngineSszApi:
Clone
+ Send
+ Sync
+ 'static {
// Provided methods
fn capabilities(&self, _witness_enabled: bool) -> HttpResponse { ... }
fn supports_witness(&self) -> bool { ... }
fn new_payload_with_witness(
&self,
_body: Bytes,
_witness_handler: Arc<dyn EngineSszWitness>,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn identity(&self) -> HttpResponse { ... }
fn new_payload(
&self,
_fork: EngineSszFork,
_body: Bytes,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn get_payload(
&self,
_fork: EngineSszFork,
_payload_id: PayloadId,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn forkchoice_updated(
&self,
_fork: EngineSszFork,
_body: Bytes,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn get_payload_bodies_by_hash(
&self,
_fork: EngineSszFork,
_hashes: Vec<B256>,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn get_payload_bodies_by_range(
&self,
_fork: EngineSszFork,
_start: u64,
_count: u64,
) -> impl Future<Output = HttpResponse> + Send { ... }
fn get_blobs(
&self,
_version: u8,
_body: Bytes,
) -> impl Future<Output = HttpResponse> + Send { ... }
}Expand description
API surface required by the SSZ Engine API proxy.
Custom APIs can opt in with a marker implementation; every route, including
/capabilities, then answers 404 so clients fall back to the JSON-RPC Engine API.
Provided Methods§
Sourcefn capabilities(&self, _witness_enabled: bool) -> HttpResponse
fn capabilities(&self, _witness_enabled: bool) -> HttpResponse
Returns the capabilities advertisement.
witness_enabled is true when a witness generator is configured and
Self::supports_witness holds, so the advertisement can include the extension.
Sourcefn supports_witness(&self) -> bool
fn supports_witness(&self) -> bool
Whether the implementation supports the witness extension.
Sourcefn new_payload_with_witness(
&self,
_body: Bytes,
_witness_handler: Arc<dyn EngineSszWitness>,
) -> impl Future<Output = HttpResponse> + Send
fn new_payload_with_witness( &self, _body: Bytes, _witness_handler: Arc<dyn EngineSszWitness>, ) -> impl Future<Output = HttpResponse> + Send
Handles the experimental Amsterdam payload submission with a witness.
Sourcefn new_payload(
&self,
_fork: EngineSszFork,
_body: Bytes,
) -> impl Future<Output = HttpResponse> + Send
fn new_payload( &self, _fork: EngineSszFork, _body: Bytes, ) -> impl Future<Output = HttpResponse> + Send
Handles a new payload request.
Sourcefn get_payload(
&self,
_fork: EngineSszFork,
_payload_id: PayloadId,
) -> impl Future<Output = HttpResponse> + Send
fn get_payload( &self, _fork: EngineSszFork, _payload_id: PayloadId, ) -> impl Future<Output = HttpResponse> + Send
Handles a getPayload request.
Sourcefn forkchoice_updated(
&self,
_fork: EngineSszFork,
_body: Bytes,
) -> impl Future<Output = HttpResponse> + Send
fn forkchoice_updated( &self, _fork: EngineSszFork, _body: Bytes, ) -> impl Future<Output = HttpResponse> + Send
Handles a forkchoice update request.
Sourcefn get_payload_bodies_by_hash(
&self,
_fork: EngineSszFork,
_hashes: Vec<B256>,
) -> impl Future<Output = HttpResponse> + Send
fn get_payload_bodies_by_hash( &self, _fork: EngineSszFork, _hashes: Vec<B256>, ) -> impl Future<Output = HttpResponse> + Send
Handles a getPayloadBodiesByHash request.
Sourcefn get_payload_bodies_by_range(
&self,
_fork: EngineSszFork,
_start: u64,
_count: u64,
) -> impl Future<Output = HttpResponse> + Send
fn get_payload_bodies_by_range( &self, _fork: EngineSszFork, _start: u64, _count: u64, ) -> impl Future<Output = HttpResponse> + Send
Handles a getPayloadBodiesByRange request.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".