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

Method key_send

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

Source from the content-addressed store, hash-verified

1396 }
1397
1398 async fn key_send(
1399 &self,
1400 request: tonic::Request<pb::KeysendRequest>,
1401 ) -> Result<tonic::Response<pb::KeysendResponse>, tonic::Status> {
1402 let req = request.into_inner();
1403 #[allow(deprecated)]
1404 let req: requests::KeysendRequest = req.try_into()?;
1405 debug!("Client asked for key_send");
1406 trace!("key_send request: {:?}", req);
1407 let mut rpc = ClnRpc::new(&self.rpc_path)
1408 .await
1409 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
1410 let result = rpc.call(Request::KeySend(req))
1411 .await
1412 .map_err(|e| Status::new(
1413 Code::Unknown,
1414 format!("Error calling method KeySend: {:?}", e)))?;
1415 match result {
1416 Response::KeySend(r) => {
1417 trace!("key_send response: {:?}", r);
1418 Ok(tonic::Response::new(r.into()))
1419 },
1420 r => Err(Status::new(
1421 Code::Internal,
1422 format!(
1423 "Unexpected result {:?} to method call KeySend",
1424 r
1425 )
1426 )),
1427 }
1428
1429 }
1430
1431 async fn fund_psbt(
1432 &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