MCPcopy Index your code
hub / github.com/Commit-Boost/commit-boost-client / get_pubkeys

Method get_pubkeys

crates/common/src/commit/client.rs:85–99  ·  view source on GitHub ↗

Request a list of validator pubkeys for which signatures can be requested. TODO: add more docs on how proxy keys work

(&mut self)

Source from the content-addressed store, hash-verified

83 /// requested.
84 // TODO: add more docs on how proxy keys work
85 pub async fn get_pubkeys(&mut self) -> Result<GetPubkeysResponse, SignerClientError> {
86 self.refresh_jwt()?;
87
88 let url = self.url.join(GET_PUBKEYS_PATH)?;
89 let res = self.client.get(url).send().await?;
90
91 if !res.status().is_success() {
92 return Err(SignerClientError::FailedRequest {
93 status: res.status().as_u16(),
94 error_msg: String::from_utf8_lossy(&res.bytes().await?).into_owned(),
95 });
96 }
97
98 Ok(serde_json::from_slice(&res.bytes().await?)?)
99 }
100
101 /// Send a signature request
102 async fn request_signature<T>(&mut self, request: &SignRequest) -> Result<T, SignerClientError>

Callers 1

runMethod · 0.80

Calls 2

refresh_jwtMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected