(
&self,
request: tonic::Request<pb::SignpsbtRequest>,
)
| 1493 | } |
| 1494 | |
| 1495 | async fn sign_psbt( |
| 1496 | &self, |
| 1497 | request: tonic::Request<pb::SignpsbtRequest>, |
| 1498 | ) -> Result<tonic::Response<pb::SignpsbtResponse>, tonic::Status> { |
| 1499 | let req = request.into_inner(); |
| 1500 | let req: requests::SignpsbtRequest = req.try_into()?; |
| 1501 | debug!("Client asked for sign_psbt"); |
| 1502 | trace!("sign_psbt request: {:?}", req); |
| 1503 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1504 | .await |
| 1505 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1506 | let result = rpc.call(Request::SignPsbt(req)) |
| 1507 | .await |
| 1508 | .map_err(|e| Status::new( |
| 1509 | Code::Unknown, |
| 1510 | format!("Error calling method SignPsbt: {:?}", e)))?; |
| 1511 | match result { |
| 1512 | Response::SignPsbt(r) => { |
| 1513 | trace!("sign_psbt response: {:?}", r); |
| 1514 | Ok(tonic::Response::new(r.into())) |
| 1515 | }, |
| 1516 | r => Err(Status::new( |
| 1517 | Code::Internal, |
| 1518 | format!( |
| 1519 | "Unexpected result {:?} to method call SignPsbt", |
| 1520 | r |
| 1521 | ) |
| 1522 | )), |
| 1523 | } |
| 1524 | |
| 1525 | } |
| 1526 | |
| 1527 | async fn utxo_psbt( |
| 1528 | &self, |
nothing calls this directly
no test coverage detected