Skip to content

Commit

Permalink
refactor(devimint): run DKG using the apis
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmoon authored and douglaz committed Jul 27, 2023
1 parent 0db6b13 commit 097a309
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 88 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions devimint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ tower-http = { version = "0.3.5", features = ["cors", "auth"] }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
serde = "1.0.159"
url = "2.3.1"
7 changes: 6 additions & 1 deletion devimint/src/bin/faucet.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::Arc;

use anyhow::Context;
use axum::extract::State;
use axum::http::StatusCode;
use axum::routing::{get, post};
Expand Down Expand Up @@ -35,7 +36,11 @@ impl Faucet {
let url = cmd.bitcoind_rpc.parse()?;
let (host, auth) = fedimint_bitcoind::bitcoincore::from_url_to_url_auth(&url)?;
let bitcoin = Arc::new(bitcoincore_rpc::Client::new(&host, auth)?);
let ln_rpc = Arc::new(Mutex::new(ClnRpc::new(&cmd.cln_socket).await?));
let ln_rpc = Arc::new(Mutex::new(
ClnRpc::new(&cmd.cln_socket)
.await
.with_context(|| format!("couldn't open CLN socket {}", &cmd.cln_socket))?,
));
Ok(Faucet { bitcoin, ln_rpc })
}

Expand Down
Loading

0 comments on commit 097a309

Please sign in to comment.