Request a list of validator pubkeys for which signatures can be requested. TODO: add more docs on how proxy keys work
(&mut self)
| 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> |
no test coverage detected