Add client side endpoint

This commit is contained in:
Tan Chee Keong
2025-02-19 21:46:12 +08:00
parent fc657db5ea
commit 8c7a995c91
2 changed files with 48 additions and 20 deletions

View File

@@ -2664,6 +2664,22 @@ impl BeaconNodeHttpClient {
)
.await
}
/// `POST validator/beacon_committee_selections`
pub async fn post_validator_beacon_committee_selections(
&self,
selections: &[BeaconCommitteeSelection],
) -> Result<(), Error> {
let mut path = self.eth_path(V1)?;
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
.push("validator")
.push("beacon_committee_selections");
self.post_with_timeout(path, &selections, self.timeouts.attester_duties)
.await
}
}
/// Returns `Ok(response)` if the response is a `200 OK` response. Otherwise, creates an