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

Method create_proof

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

Source from the content-addressed store, hash-verified

4888 }
4889
4890 async fn create_proof(
4891 &self,
4892 request: tonic::Request<pb::CreateproofRequest>,
4893 ) -> Result<tonic::Response<pb::CreateproofResponse>, tonic::Status> {
4894 let req = request.into_inner();
4895 let req: requests::CreateproofRequest = req.try_into()?;
4896 debug!("Client asked for create_proof");
4897 trace!("create_proof request: {:?}", req);
4898 let mut rpc = ClnRpc::new(&self.rpc_path)
4899 .await
4900 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
4901 let result = rpc.call(Request::CreateProof(req))
4902 .await
4903 .map_err(|e| Status::new(
4904 Code::Unknown,
4905 format!("Error calling method CreateProof: {:?}", e)))?;
4906 match result {
4907 Response::CreateProof(r) => {
4908 trace!("create_proof response: {:?}", r);
4909 Ok(tonic::Response::new(r.into()))
4910 },
4911 r => Err(Status::new(
4912 Code::Internal,
4913 format!(
4914 "Unexpected result {:?} to method call CreateProof",
4915 r
4916 )
4917 )),
4918 }
4919
4920 }
4921
4922 async fn xkeysend(
4923 &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