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

Function fetch_bip353

plugins/bip353-plugin/src/main.rs:92–103  ·  view source on GitHub ↗
(
    plugin: Plugin<()>,
    args: serde_json::Value,
)

Source from the content-addressed store, hash-verified

90}
91
92async fn fetch_bip353(
93 plugin: Plugin<()>,
94 args: serde_json::Value,
95) -> Result<serde_json::Value, anyhow::Error> {
96 let hrn = parse_hrn(args)?;
97
98 let payment_instructions = fetch_payment_instructions(plugin.clone(), &hrn).await?;
99
100 let processed_payment_instructions = parse_payment_instructions(&payment_instructions)?;
101
102 Ok(serde_json::to_value(processed_payment_instructions)?)
103}
104
105fn parse_hrn(args: serde_json::Value) -> Result<HumanReadableName, anyhow::Error> {
106 match args {

Callers

nothing calls this directly

Calls 3

parse_hrnFunction · 0.85

Tested by

no test coverage detected