Skip to content

Commit 059b1e6

Browse files
committed
WIP
1 parent a83b58e commit 059b1e6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

bindings/ldk_node.udl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface Builder {
3737
[Throws=BuildError]
3838
Node build_with_fs_store();
3939
[Throws=BuildError]
40-
Node build_with_vss_store(string url, string store_id);
40+
Node build_with_vss_store(string url, string store_id, AuthMethod auth_custom);
4141
};
4242

4343
interface Node {
@@ -256,6 +256,11 @@ enum LogLevel {
256256
"Error",
257257
};
258258

259+
[Trait]
260+
interface AuthMethod {
261+
record<string, string> get([ByRef]sequence<u8> request_body);
262+
};
263+
259264
[Custom]
260265
typedef string Txid;
261266

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl ArcedNodeBuilder {
464464
pub fn build_with_vss_store(
465465
&self, url: String, store_id: String, auth_custom: Arc<dyn AuthMethod>,
466466
) -> Result<Arc<Node>, BuildError> {
467-
self.inner.read().unwrap().build_with_vss_store(url, store_id).map(Arc::new)
467+
self.inner.read().unwrap().build_with_vss_store(url, store_id, auth_custom).map(Arc::new)
468468
}
469469

470470
/// Builds a [`Node`] instance according to the options previously configured.

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ pub use bip39;
9696
pub use bitcoin;
9797
pub use lightning;
9898
pub use lightning_invoice;
99+
#[cfg(vss)]
100+
pub use vss_client;
99101

100102
pub use error::Error as NodeError;
101103
use error::Error;
@@ -105,6 +107,8 @@ pub use types::ChannelConfig;
105107

106108
pub use io::utils::generate_entropy_mnemonic;
107109

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

0 commit comments

Comments
 (0)