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

Method create_invoice_request

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

Source from the content-addressed store, hash-verified

883 }
884
885 async fn create_invoice_request(
886 &self,
887 request: tonic::Request<pb::InvoicerequestRequest>,
888 ) -> Result<tonic::Response<pb::InvoicerequestResponse>, tonic::Status> {
889 let req = request.into_inner();
890 let req: requests::InvoicerequestRequest = req.into();
891 debug!("Client asked for create_invoice_request");
892 trace!("create_invoice_request request: {:?}", req);
893 let mut rpc = ClnRpc::new(&self.rpc_path)
894 .await
895 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
896 let result = rpc.call(Request::InvoiceRequest(req))
897 .await
898 .map_err(|e| Status::new(
899 Code::Unknown,
900 format!("Error calling method InvoiceRequest: {:?}", e)))?;
901 match result {
902 Response::InvoiceRequest(r) => {
903 trace!("create_invoice_request response: {:?}", r);
904 Ok(tonic::Response::new(r.into()))
905 },
906 r => Err(Status::new(
907 Code::Internal,
908 format!(
909 "Unexpected result {:?} to method call InvoiceRequest",
910 r
911 )
912 )),
913 }
914
915 }
916
917 async fn disable_invoice_request(
918 &self,

Callers

nothing calls this directly

Calls 4

into_innerMethod · 0.80
InvoiceRequestClass · 0.50
to_stringMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected