(
plugin: Plugin<()>,
args: serde_json::Value,
)
| 90 | } |
| 91 | |
| 92 | async 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 | |
| 105 | fn parse_hrn(args: serde_json::Value) -> Result<HumanReadableName, anyhow::Error> { |
| 106 | match args { |
nothing calls this directly
no test coverage detected