pub struct SeedStoreCreator {}Expand description
Helper class for creating the store from given data.
Should be used only by the utility that creates the encrypted file.
See also SeedStore.
Implementations§
Source§impl SeedStoreCreator
impl SeedStoreCreator
Sourcepub fn new_from_data(
entropy: &Vec<u8>,
network: Option<Network>,
seed_passphrase: Option<&str>,
) -> Result<SeedStore, String>
pub fn new_from_data( entropy: &Vec<u8>, network: Option<Network>, seed_passphrase: Option<&str>, ) -> Result<SeedStore, String>
Create a new store instance from given secret entropy bytes and network byte.
The store can be written out to file using [write_to_file]
Caution: unencrypted secret data is taken.
entropy: the BIP39-style entropy bytes, with one of these lengths:
16 (12 BIP39 mnemonic words), 20 (15 words), 24 (18 words), 28 bytes (21 words), or 32 bytes (24 words).
- network: Optionally a different bitcoin network can be specified, default is Mainnet/0 (also for None).
seed_passphrase: Optional seed passphrase, needed to get the correct seed from the entropy (if it was used).
Sourcepub fn write_to_file(
seedstore: &SeedStore,
path_for_secret_file: &str,
encryption_password: &str,
allow_weak_password: Option<Options>,
) -> Result<(), String>
pub fn write_to_file( seedstore: &SeedStore, path_for_secret_file: &str, encryption_password: &str, allow_weak_password: Option<Options>, ) -> Result<(), String>
Write out the encrypted contents to a file. [‘encryption_password’]: The passowrd to be used for encryption, should be strong. Minimal length of password is checked.
Auto Trait Implementations§
impl Freeze for SeedStoreCreator
impl RefUnwindSafe for SeedStoreCreator
impl Send for SeedStoreCreator
impl Sync for SeedStoreCreator
impl Unpin for SeedStoreCreator
impl UnwindSafe for SeedStoreCreator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more