MCPcopy Create free account
hub / github.com/ElementsProject/lightning / add_psbt_output

Method add_psbt_output

cln-grpc/src/server.rs:277–307  ·  view source on GitHub ↗
(
        &self,
        request: tonic::Request<pb::AddpsbtoutputRequest>,
    )

Source from the content-addressed store, hash-verified

275 }
276
277 async fn add_psbt_output(
278 &self,
279 request: tonic::Request<pb::AddpsbtoutputRequest>,
280 ) -> Result<tonic::Response<pb::AddpsbtoutputResponse>, tonic::Status> {
281 let req = request.into_inner();
282 let req: requests::AddpsbtoutputRequest = req.into();
283 debug!("Client asked for add_psbt_output");
284 trace!("add_psbt_output request: {:?}", req);
285 let mut rpc = ClnRpc::new(&self.rpc_path)
286 .await
287 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
288 let result = rpc.call(Request::AddPsbtOutput(req))
289 .await
290 .map_err(|e| Status::new(
291 Code::Unknown,
292 format!("Error calling method AddPsbtOutput: {:?}", e)))?;
293 match result {
294 Response::AddPsbtOutput(r) => {
295 trace!("add_psbt_output response: {:?}", r);
296 Ok(tonic::Response::new(r.into()))
297 },
298 r => Err(Status::new(
299 Code::Internal,
300 format!(
301 "Unexpected result {:?} to method call AddPsbtOutput",
302 r
303 )
304 )),
305 }
306
307 }
308
309 async fn auto_clean_once(
310 &self,

Callers

nothing calls this directly

Calls 3

into_innerMethod · 0.80
to_stringMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected