Skip to content

Commit fb6795e

Browse files
committed
Expose VssStore in bindings
1 parent b5679a8 commit fb6795e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

bindings/ldk_node.udl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ interface Builder {
3636
Node build();
3737
[Throws=BuildError]
3838
Node build_with_fs_store();
39+
[Throws=BuildError]
40+
Node build_with_vss_store(string url, string store_id);
3941
};
4042

4143
interface Node {

src/builder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,13 @@ impl ArcedNodeBuilder {
454454
self.inner.read().unwrap().build_with_fs_store().map(Arc::new)
455455
}
456456

457+
/// Builds a [`Node`] instance with a [`VssStore`] backend and according to the options
458+
/// previously configured.
459+
#[cfg(any(vss, vss_test))]
460+
pub fn build_with_vss_store(&self, url: String, store_id: String) -> Result<Arc<Node>, BuildError> {
461+
self.inner.read().unwrap().build_with_vss_store(url, store_id).map(Arc::new)
462+
}
463+
457464
/// Builds a [`Node`] instance according to the options previously configured.
458465
pub fn build_with_store(&self, kv_store: Arc<DynStore>) -> Result<Arc<Node>, BuildError> {
459466
self.inner.read().unwrap().build_with_store(kv_store).map(Arc::new)

0 commit comments

Comments
 (0)