Skip to content

Commit c4ad6ea

Browse files
committed
Expose VssStore in bindings
1 parent b7c4862 commit c4ad6ea

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
@@ -37,6 +37,8 @@ interface Builder {
3737
Node build();
3838
[Throws=BuildError]
3939
Node build_with_fs_store();
40+
[Throws=BuildError]
41+
Node build_with_vss_store(string url, string store_id);
4042
};
4143

4244
interface Node {

src/builder.rs

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

515+
/// Builds a [`Node`] instance with a [`VssStore`] backend and according to the options
516+
/// previously configured.
517+
#[cfg(any(vss, vss_test))]
518+
pub fn build_with_vss_store(&self, url: String, store_id: String) -> Result<Arc<Node>, BuildError> {
519+
self.inner.read().unwrap().build_with_vss_store(url, store_id).map(Arc::new)
520+
}
521+
515522
/// Builds a [`Node`] instance according to the options previously configured.
516523
pub fn build_with_store(&self, kv_store: Arc<DynStore>) -> Result<Arc<Node>, BuildError> {
517524
self.inner.read().unwrap().build_with_store(kv_store).map(Arc::new)

0 commit comments

Comments
 (0)