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

Method sign_message

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

Source from the content-addressed store, hash-verified

3032 }
3033
3034 async fn sign_message(
3035 &self,
3036 request: tonic::Request<pb::SignmessageRequest>,
3037 ) -> Result<tonic::Response<pb::SignmessageResponse>, tonic::Status> {
3038 let req = request.into_inner();
3039 let req: requests::SignmessageRequest = req.try_into()?;
3040 debug!("Client asked for sign_message");
3041 trace!("sign_message request: {:?}", req);
3042 let mut rpc = ClnRpc::new(&self.rpc_path)
3043 .await
3044 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
3045 let result = rpc.call(Request::SignMessage(req))
3046 .await
3047 .map_err(|e| Status::new(
3048 Code::Unknown,
3049 format!("Error calling method SignMessage: {:?}", e)))?;
3050 match result {
3051 Response::SignMessage(r) => {
3052 trace!("sign_message response: {:?}", r);
3053 Ok(tonic::Response::new(r.into()))
3054 },
3055 r => Err(Status::new(
3056 Code::Internal,
3057 format!(
3058 "Unexpected result {:?} to method call SignMessage",
3059 r
3060 )
3061 )),
3062 }
3063
3064 }
3065
3066 async fn splice_init(
3067 &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