Skip to content

Commit 895c94f

Browse files
authored
Merge pull request #22 from G8XSU/constructor
Add constructor for StorableBuilder
2 parents c5564e7 + ebbfc3c commit 895c94f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vss-client"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
license = "MIT OR Apache-2.0"
55
edition = "2021"
66
homepage = "https://lightningdevkit.org/"

src/util/storable_builder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ pub struct StorableBuilder<T: EntropySource> {
1212
entropy_source: T,
1313
}
1414

15+
impl<T: EntropySource> StorableBuilder<T> {
16+
/// Constructs a new instance.
17+
pub fn new(data_encryption_key: [u8; 32], entropy_source: T) -> StorableBuilder<T> {
18+
Self { data_encryption_key, entropy_source }
19+
}
20+
}
21+
1522
/// A trait representing a source for generating entropy/randomness.
1623
pub trait EntropySource {
1724
/// Fills a buffer with random bytes.

0 commit comments

Comments
 (0)