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

Method new

plugins/lsps-plugin/src/service.rs:41–51  ·  view source on GitHub ↗
(rpc_path: PathBuf, promise_secret: &[u8; 32])

Source from the content-addressed store, hash-verified

39
40impl State {
41 pub fn new(rpc_path: PathBuf, promise_secret: &[u8; 32]) -> Self {
42 let api = Arc::new(ClnApiRpc::new(rpc_path.clone()));
43 let sender = ClnSender::new(rpc_path);
44 let lsps2_handler = Arc::new(Lsps2ServiceHandler::new(api, promise_secret));
45 let lsps_service = Arc::new(LspsService::builder().with_protocol(lsps2_handler).build());
46 Self {
47 lsps_service,
48 sender,
49 lsps2_enabled: true,
50 }
51 }
52}
53
54impl ServiceState for State {

Callers

nothing calls this directly

Calls 2

with_protocolMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected