Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Feb 7, 2024
1 parent a83b58e commit 059b1e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface Builder {
[Throws=BuildError]
Node build_with_fs_store();
[Throws=BuildError]
Node build_with_vss_store(string url, string store_id);
Node build_with_vss_store(string url, string store_id, AuthMethod auth_custom);
};

interface Node {
Expand Down Expand Up @@ -256,6 +256,11 @@ enum LogLevel {
"Error",
};

[Trait]
interface AuthMethod {
record<string, string> get([ByRef]sequence<u8> request_body);
};

[Custom]
typedef string Txid;

Expand Down
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ impl ArcedNodeBuilder {
pub fn build_with_vss_store(
&self, url: String, store_id: String, auth_custom: Arc<dyn AuthMethod>,
) -> Result<Arc<Node>, BuildError> {
self.inner.read().unwrap().build_with_vss_store(url, store_id).map(Arc::new)
self.inner.read().unwrap().build_with_vss_store(url, store_id, auth_custom).map(Arc::new)
}

/// Builds a [`Node`] instance according to the options previously configured.
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ pub use bip39;
pub use bitcoin;
pub use lightning;
pub use lightning_invoice;
#[cfg(vss)]
pub use vss_client;

pub use error::Error as NodeError;
use error::Error;
Expand All @@ -105,6 +107,8 @@ pub use types::ChannelConfig;

pub use io::utils::generate_entropy_mnemonic;

#[cfg(all(vss, feature = "uniffi"))]
pub use vss_client::client::AuthMethod;
#[cfg(feature = "uniffi")]
use {bip39::Mnemonic, bitcoin::OutPoint, lightning::ln::PaymentSecret};

Expand Down

0 comments on commit 059b1e6

Please sign in to comment.