Update bdk to bitcoin 0.30.0

This commit is contained in:
Daniela Brozzoni
2023-07-19 15:27:48 +02:00
parent 853d361751
commit f4e3ba3265
23 changed files with 562 additions and 380 deletions

View File

@@ -15,7 +15,7 @@
// something that should be fairly simple to re-implement.
use alloc::string::String;
use bitcoin::util::bip32;
use bitcoin::bip32;
use bitcoin::Network;
use miniscript::ScriptContext;
@@ -142,7 +142,7 @@ impl<Ctx: ScriptContext> GeneratableKey<Ctx> for Mnemonic {
(word_count, language): Self::Options,
entropy: Self::Entropy,
) -> Result<GeneratedKey<Self, Ctx>, Self::Error> {
let entropy = &entropy.as_ref()[..(word_count as usize / 8)];
let entropy = &entropy[..(word_count as usize / 8)];
let mnemonic = Mnemonic::from_entropy_in(language, entropy)?;
Ok(GeneratedKey::new(mnemonic, any_network()))
@@ -154,7 +154,7 @@ mod test {
use alloc::string::ToString;
use core::str::FromStr;
use bitcoin::util::bip32;
use bitcoin::bip32;
use bip39::{Language, Mnemonic};