Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions api/all-features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ pub fn psbt_v2::v0::bitcoin::SigningKeys::from(t: T) -> T
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v0::bitcoin::SigningKeys where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v0::bitcoin::SigningKeys::vzip(self) -> V
pub struct psbt_v2::v0::bitcoin::Input
pub psbt_v2::v0::bitcoin::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::bitcoin::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v0::bitcoin::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -1026,7 +1026,7 @@ impl<T> serde::de::DeserializeOwned for psbt_v2::v0::Input where T: for<'de> ser
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v0::Input where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v0::Input::vzip(self) -> V
pub struct psbt_v2::v0::bitcoin::Output
pub psbt_v2::v0::bitcoin::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Output::proprietary: alloc::collections::btree::map::BTreeMap<psbt_v2::v0::bitcoin::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v0::bitcoin::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::bitcoin::Output::tap_internal_key: core::option::Option<secp256k1::key::XOnlyPublicKey>
Expand Down Expand Up @@ -1679,7 +1679,7 @@ pub fn psbt_v2::v0::SignerChecksError::from(t: T) -> T
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v0::SignerChecksError where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v0::SignerChecksError::vzip(self) -> V
pub struct psbt_v2::v0::Input
pub psbt_v2::v0::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v0::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -1755,7 +1755,7 @@ impl<T> serde::de::DeserializeOwned for psbt_v2::v0::Input where T: for<'de> ser
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v0::Input where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v0::Input::vzip(self) -> V
pub struct psbt_v2::v0::Output
pub psbt_v2::v0::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Output::proprietary: alloc::collections::btree::map::BTreeMap<psbt_v2::v0::bitcoin::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v0::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::Output::tap_internal_key: core::option::Option<secp256k1::key::XOnlyPublicKey>
Expand Down Expand Up @@ -2549,7 +2549,7 @@ pub fn psbt_v2::v2::input::HashPreimageError::from(t: T) -> T
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v2::input::HashPreimageError where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v2::input::HashPreimageError::vzip(self) -> V
pub struct psbt_v2::v2::input::Input
pub psbt_v2::v2::input::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::input::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::input::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::input::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v2::input::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -2808,7 +2808,7 @@ impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v2::output::InsertPairError w
pub fn psbt_v2::v2::output::InsertPairError::vzip(self) -> V
pub struct psbt_v2::v2::output::Output
pub psbt_v2::v2::output::Output::amount: bitcoin_units::amount::Amount
pub psbt_v2::v2::output::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::output::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::output::Output::proprietaries: alloc::collections::btree::map::BTreeMap<psbt_v2::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v2::output::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::output::Output::script_pubkey: bitcoin::blockdata::script::owned::ScriptBuf
Expand Down Expand Up @@ -4422,7 +4422,7 @@ impl<T> serde::de::DeserializeOwned for psbt_v2::v2::Global where T: for<'de> se
impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v2::Global where V: ppv_lite86::types::MultiLane<T>
pub fn psbt_v2::v2::Global::vzip(self) -> V
pub struct psbt_v2::v2::Input
pub psbt_v2::v2::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v2::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -4633,7 +4633,7 @@ impl<V, T> ppv_lite86::types::VZip<V> for psbt_v2::v2::dleq::InvalidLengthError
pub fn psbt_v2::v2::dleq::InvalidLengthError::vzip(self) -> V
pub struct psbt_v2::v2::Output
pub psbt_v2::v2::Output::amount: bitcoin_units::amount::Amount
pub psbt_v2::v2::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Output::proprietaries: alloc::collections::btree::map::BTreeMap<psbt_v2::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v2::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::Output::script_pubkey: bitcoin::blockdata::script::owned::ScriptBuf
Expand Down
16 changes: 8 additions & 8 deletions api/no-features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ pub unsafe fn psbt_v2::v0::bitcoin::SigningKeys::clone_to_uninit(&self, dest: *m
impl<T> core::convert::From<T> for psbt_v2::v0::bitcoin::SigningKeys
pub fn psbt_v2::v0::bitcoin::SigningKeys::from(t: T) -> T
pub struct psbt_v2::v0::bitcoin::Input
pub psbt_v2::v0::bitcoin::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::bitcoin::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v0::bitcoin::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -903,7 +903,7 @@ pub unsafe fn psbt_v2::v0::Input::clone_to_uninit(&self, dest: *mut u8)
impl<T> core::convert::From<T> for psbt_v2::v0::Input
pub fn psbt_v2::v0::Input::from(t: T) -> T
pub struct psbt_v2::v0::bitcoin::Output
pub psbt_v2::v0::bitcoin::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::bitcoin::Output::proprietary: alloc::collections::btree::map::BTreeMap<psbt_v2::v0::bitcoin::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v0::bitcoin::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::bitcoin::Output::tap_internal_key: core::option::Option<secp256k1::key::XOnlyPublicKey>
Expand Down Expand Up @@ -1084,7 +1084,7 @@ pub unsafe fn psbt_v2::v0::SignerChecksError::clone_to_uninit(&self, dest: *mut
impl<T> core::convert::From<T> for psbt_v2::v0::SignerChecksError
pub fn psbt_v2::v0::SignerChecksError::from(t: T) -> T
pub struct psbt_v2::v0::Input
pub psbt_v2::v0::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Input::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v0::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -1151,7 +1151,7 @@ pub unsafe fn psbt_v2::v0::Input::clone_to_uninit(&self, dest: *mut u8)
impl<T> core::convert::From<T> for psbt_v2::v0::Input
pub fn psbt_v2::v0::Input::from(t: T) -> T
pub struct psbt_v2::v0::Output
pub psbt_v2::v0::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Output::bip32_derivation: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v0::Output::proprietary: alloc::collections::btree::map::BTreeMap<psbt_v2::v0::bitcoin::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v0::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v0::Output::tap_internal_key: core::option::Option<secp256k1::key::XOnlyPublicKey>
Expand Down Expand Up @@ -1707,7 +1707,7 @@ pub unsafe fn psbt_v2::v2::input::HashPreimageError::clone_to_uninit(&self, dest
impl<T> core::convert::From<T> for psbt_v2::v2::input::HashPreimageError
pub fn psbt_v2::v2::input::HashPreimageError::from(t: T) -> T
pub struct psbt_v2::v2::input::Input
pub psbt_v2::v2::input::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::input::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::input::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::input::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v2::input::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -1943,7 +1943,7 @@ impl<T> core::convert::From<T> for psbt_v2::v2::output::InsertPairError
pub fn psbt_v2::v2::output::InsertPairError::from(t: T) -> T
pub struct psbt_v2::v2::output::Output
pub psbt_v2::v2::output::Output::amount: bitcoin_units::amount::Amount
pub psbt_v2::v2::output::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::output::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::output::Output::proprietaries: alloc::collections::btree::map::BTreeMap<psbt_v2::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v2::output::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::output::Output::script_pubkey: bitcoin::blockdata::script::owned::ScriptBuf
Expand Down Expand Up @@ -3065,7 +3065,7 @@ pub unsafe fn psbt_v2::v2::Global::clone_to_uninit(&self, dest: *mut u8)
impl<T> core::convert::From<T> for psbt_v2::v2::Global
pub fn psbt_v2::v2::Global::from(t: T) -> T
pub struct psbt_v2::v2::Input
pub psbt_v2::v2::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Input::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Input::final_script_sig: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::Input::final_script_witness: core::option::Option<bitcoin::blockdata::witness::Witness>
pub psbt_v2::v2::Input::hash160_preimages: alloc::collections::btree::map::BTreeMap<bitcoin_hashes::hash160::Hash, alloc::vec::Vec<u8>>
Expand Down Expand Up @@ -3214,7 +3214,7 @@ impl<T> core::convert::From<T> for psbt_v2::v2::InputsNotModifiableError
pub fn psbt_v2::v2::InputsNotModifiableError::from(t: T) -> T
pub struct psbt_v2::v2::Output
pub psbt_v2::v2::Output::amount: bitcoin_units::amount::Amount
pub psbt_v2::v2::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<secp256k1::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Output::bip32_derivations: alloc::collections::btree::map::BTreeMap<bitcoin::crypto::key::PublicKey, bitcoin::bip32::KeySource>
pub psbt_v2::v2::Output::proprietaries: alloc::collections::btree::map::BTreeMap<psbt_v2::raw::ProprietaryKey, alloc::vec::Vec<u8>>
pub psbt_v2::v2::Output::redeem_script: core::option::Option<bitcoin::blockdata::script::owned::ScriptBuf>
pub psbt_v2::v2::Output::script_pubkey: bitcoin::blockdata::script::owned::ScriptBuf
Expand Down
4 changes: 2 additions & 2 deletions examples/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ fn main() -> anyhow::Result<()> {
let fake_fp: [u8; 4] = [0; 4];
psbt.inputs[0]
.bip32_derivation
.insert(alice.0.pk, (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));
.insert(alice.0.public_key(), (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));
psbt.inputs[1]
.bip32_derivation
.insert(bob.0.pk, (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));
.insert(bob.0.public_key(), (Fingerprint::from(fake_fp), DerivationPath::from_str("m")?));

// Since we are spending 2 p2wpkh inputs there are no other updates needed.

Expand Down
11 changes: 4 additions & 7 deletions examples/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl Alice {
/// Provides the actual UTXO that Alice is contributing, this would usually come from the chain.
fn input_utxo(&self) -> anyhow::Result<TxOut> { self.0.input_utxo(Self::PATH) }

fn bip32_derivation(&self) -> anyhow::Result<(secp256k1::PublicKey, KeySource)> {
fn bip32_derivation(&self) -> anyhow::Result<(PublicKey, KeySource)> {
self.0.bip32_derivation(Self::PATH)
}
}
Expand Down Expand Up @@ -229,7 +229,7 @@ impl Bob {
/// Provides the actual UTXO that Alice is contributing, this would usually come from the chain.
fn input_utxo(&self) -> anyhow::Result<TxOut> { self.0.input_utxo(Self::PATH) }

fn bip32_derivation(&self) -> anyhow::Result<(secp256k1::PublicKey, KeySource)> {
fn bip32_derivation(&self) -> anyhow::Result<(PublicKey, KeySource)> {
self.0.bip32_derivation(Self::PATH)
}
}
Expand Down Expand Up @@ -266,15 +266,12 @@ impl Entity {
}

/// Returns the BOP-32 stuff needed to sign an ECDSA input using the [`v2::Psbt`] BIP-32 signing API.
fn bip32_derivation(
&self,
derivation_path: &str,
) -> anyhow::Result<(secp256k1::PublicKey, KeySource)> {
fn bip32_derivation(&self, derivation_path: &str) -> anyhow::Result<(PublicKey, KeySource)> {
let path = DerivationPath::from_str(derivation_path)?;
let xpriv = self.master.derive_priv(&self.secp, &path).expect("failed to derive xpriv");
let fingerprint = xpriv.fingerprint(&self.secp);
let sk = xpriv.to_priv();
Ok((sk.public_key(&self.secp).inner, (fingerprint, path)))
Ok((sk.public_key(&self.secp), (fingerprint, path)))
}

/// Signs any ECDSA inputs for which we have keys.
Expand Down
6 changes: 3 additions & 3 deletions src/v0/bitcoin/map/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use bitcoin::blockdata::transaction::{Transaction, TxOut};
use bitcoin::blockdata::witness::Witness;
use bitcoin::hashes::{self, hash160, ripemd160, sha256, sha256d};
use bitcoin::key::PublicKey;
use bitcoin::secp256k1::{self, XOnlyPublicKey};
use bitcoin::secp256k1::XOnlyPublicKey;
use bitcoin::sighash::{EcdsaSighashType, NonStandardSighashTypeError, TapSighashType};
use bitcoin::taproot::{ControlBlock, LeafVersion, TapLeafHash, TapNodeHash};
use bitcoin::{ecdsa, taproot};
Expand Down Expand Up @@ -96,7 +96,7 @@ pub struct Input {
/// A map from public keys needed to sign this input to their corresponding
/// master key fingerprints and derivation paths.
#[cfg_attr(feature = "serde", serde(with = "crate::serde_utils::btreemap_as_seq"))]
pub bip32_derivation: BTreeMap<secp256k1::PublicKey, KeySource>,
pub bip32_derivation: BTreeMap<PublicKey, KeySource>,
/// The finalized, fully-constructed scriptSig with signatures and any other
/// scripts necessary for this input to pass validation.
pub final_script_sig: Option<ScriptBuf>,
Expand Down Expand Up @@ -199,7 +199,7 @@ impl Input {
}
PSBT_IN_BIP32_DERIVATION => {
impl_psbt_insert_pair! {
self.bip32_derivation <= <raw_key: secp256k1::PublicKey>|<raw_value: KeySource>
self.bip32_derivation <= <raw_key: PublicKey>|<raw_value: KeySource>
}
}
PSBT_IN_FINAL_SCRIPTSIG => {
Expand Down
7 changes: 4 additions & 3 deletions src/v0/bitcoin/map/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use core::convert::TryFrom;

use bitcoin::bip32::KeySource;
use bitcoin::blockdata::script::ScriptBuf;
use bitcoin::secp256k1::{self, XOnlyPublicKey};
use bitcoin::key::PublicKey;
use bitcoin::secp256k1::XOnlyPublicKey;
use bitcoin::taproot::{TapLeafHash, TapTree};

use crate::prelude::*;
Expand Down Expand Up @@ -42,7 +43,7 @@ pub struct Output {
/// A map from public keys needed to spend this output to their
/// corresponding master key fingerprints and derivation paths.
#[cfg_attr(feature = "serde", serde(with = "crate::serde_utils::btreemap_as_seq"))]
pub bip32_derivation: BTreeMap<secp256k1::PublicKey, KeySource>,
pub bip32_derivation: BTreeMap<PublicKey, KeySource>,
/// The internal pubkey.
pub tap_internal_key: Option<XOnlyPublicKey>,
/// Taproot Output tree.
Expand Down Expand Up @@ -75,7 +76,7 @@ impl Output {
}
PSBT_OUT_BIP32_DERIVATION => {
impl_psbt_insert_pair! {
self.bip32_derivation <= <raw_key: secp256k1::PublicKey>|<raw_value: KeySource>
self.bip32_derivation <= <raw_key: PublicKey>|<raw_value: KeySource>
}
}
PSBT_OUT_PROPRIETARY => {
Expand Down
Loading