@@ -25,7 +25,7 @@ use crate::encode::Decodable;
2525use crate :: endian:: u32_to_array_le;
2626use crate :: pset:: { self , map:: Map , raw, Error } ;
2727use crate :: { LockTime , VarInt } ;
28- use bitcoin:: bip32:: { ChildNumber , DerivationPath , ExtendedPubKey , Fingerprint , KeySource } ;
28+ use bitcoin:: bip32:: { ChildNumber , DerivationPath , Xpub , Fingerprint , KeySource } ;
2929use secp256k1_zkp:: Tweak ;
3030
3131// (Not used in pset) Type: Unsigned Transaction PSET_GLOBAL_UNSIGNED_TX = 0x00
@@ -102,7 +102,7 @@ pub struct Global {
102102 pub version : u32 ,
103103 /// A global map from extended public keys to the used key fingerprint and
104104 /// derivation path as defined by BIP 32
105- pub xpub : BTreeMap < ExtendedPubKey , KeySource > ,
105+ pub xpub : BTreeMap < Xpub , KeySource > ,
106106 // Global proprietary key-value pairs.
107107 /// Scalars used for blinding
108108 pub scalars : Vec < Tweak > ,
@@ -369,7 +369,7 @@ impl Decodable for Global {
369369 fn consensus_decode < D : io:: Read > ( mut d : D ) -> Result < Self , encode:: Error > {
370370 let mut version: Option < u32 > = None ;
371371 let mut unknowns: BTreeMap < raw:: Key , Vec < u8 > > = Default :: default ( ) ;
372- let mut xpub_map: BTreeMap < ExtendedPubKey , ( Fingerprint , DerivationPath ) > =
372+ let mut xpub_map: BTreeMap < Xpub , ( Fingerprint , DerivationPath ) > =
373373 Default :: default ( ) ;
374374 let mut proprietary = BTreeMap :: new ( ) ;
375375 let mut scalars = Vec :: new ( ) ;
@@ -416,9 +416,9 @@ impl Decodable for Global {
416416 }
417417 PSET_GLOBAL_XPUB => {
418418 if !raw_key. key . is_empty ( ) {
419- let xpub = ExtendedPubKey :: decode ( & raw_key. key )
419+ let xpub = Xpub :: decode ( & raw_key. key )
420420 . map_err ( |_| encode:: Error :: ParseFailed (
421- "Can't deserialize ExtendedPublicKey from global XPUB key data"
421+ "Can't deserialize Xpub from global XPUB key data"
422422 ) ) ?;
423423
424424 if raw_value. is_empty ( ) || raw_value. len ( ) % 4 != 0 {
0 commit comments