Skip to content

Commit

Permalink
Adding watcher_unspent_utxos to web interface
Browse files Browse the repository at this point in the history
  • Loading branch information
josediegorobles committed Aug 5, 2023
1 parent 7af913a commit bdc1779
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,20 @@ pub mod rgb {
}
})
}

#[wasm_bindgen]
pub fn watcher_unspent_utxos(nostr_hex_sk: String, name: String, iface: String) -> Promise {
set_panic_hook();

future_to_promise(async move {
match crate::rgb::watcher_unspent_utxos(&nostr_hex_sk, &name, &iface).await {
Ok(result) => Ok(JsValue::from_string(
serde_json::to_string(&result).unwrap(),
)),
Err(err) => Err(JsValue::from_string(err.to_string())),
}
})
}
}

pub mod lightning {
Expand Down

0 comments on commit bdc1779

Please sign in to comment.