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

Method list_funds

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

Source from the content-addressed store, hash-verified

147 }
148
149 async fn list_funds(
150 &self,
151 request: tonic::Request<pb::ListfundsRequest>,
152 ) -> Result<tonic::Response<pb::ListfundsResponse>, tonic::Status> {
153 let req = request.into_inner();
154 let req: requests::ListfundsRequest = req.into();
155 debug!("Client asked for list_funds");
156 trace!("list_funds request: {:?}", req);
157 let mut rpc = ClnRpc::new(&self.rpc_path)
158 .await
159 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
160 let result = rpc.call(Request::ListFunds(req))
161 .await
162 .map_err(|e| Status::new(
163 Code::Unknown,
164 format!("Error calling method ListFunds: {:?}", e)))?;
165 match result {
166 Response::ListFunds(r) => {
167 trace!("list_funds response: {:?}", r);
168 Ok(tonic::Response::new(r.into()))
169 },
170 r => Err(Status::new(
171 Code::Internal,
172 format!(
173 "Unexpected result {:?} to method call ListFunds",
174 r
175 )
176 )),
177 }
178
179 }
180
181 async fn send_pay(
182 &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