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

Function success_response

plugins/lsps-plugin/src/core/router.rs:162–169  ·  view source on GitHub ↗
(id: &str, result: serde_json::Value)

Source from the content-addressed store, hash-verified

160}
161
162fn success_response(id: &str, result: serde_json::Value) -> Vec<u8> {
163 serde_json::to_vec(&serde_json::json!({
164 "jsonrpc": "2.0",
165 "id": id,
166 "result": result
167 }))
168 .unwrap()
169}
170
171fn error_response(id: Option<&str>, error: RpcError) -> Vec<u8> {
172 serde_json::to_vec(&serde_json::json!({

Callers 1

handleMethod · 0.85

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected