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

Method get_buy_request

plugins/lsps-plugin/src/core/lsps2/handler.rs:159–175  ·  view source on GitHub ↗
(&self, scid: &ShortChannelId)

Source from the content-addressed store, hash-verified

157 }
158
159 async fn get_buy_request(&self, scid: &ShortChannelId) -> AnyResult<DatastoreEntry> {
160 let mut rpc = self.create_rpc().await?;
161 let key = vec![
162 DS_MAIN_KEY.to_string(),
163 DS_SUB_KEY.to_string(),
164 scid.to_string(),
165 ];
166 let res = rpc
167 .call_typed(&ListdatastoreRequest {
168 key: Some(key.clone()),
169 })
170 .await
171 .with_context(|| "calling listdatastore")?;
172
173 let (rec, _) = deserialize_by_key(&res, key)?;
174 Ok(rec)
175 }
176
177 async fn del_buy_request(&self, scid: &ShortChannelId) -> AnyResult<()> {
178 let mut rpc = self.create_rpc().await?;

Callers 1

handleMethod · 0.45

Calls 4

call_typedMethod · 0.80
deserialize_by_keyFunction · 0.70
create_rpcMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected