@@ -47,8 +47,8 @@ use crate::{
4747 TxOutSecrets ,
4848} ;
4949use crate :: {
50- LockTime , OutPoint , Sequence , SurjectionInput , Transaction , TxIn , TxInType ,
51- TxInWitness , TxOut , TxOutWitness , Txid ,
50+ LockTime , OutPoint , Sequence , SurjectionInput , Transaction , TxIn ,
51+ TxInWitness , TxOut , TxOutWitness , Txid , CtLocation , CtLocationType ,
5252} ;
5353use secp256k1_zkp:: rand:: { CryptoRng , RngCore } ;
5454use secp256k1_zkp:: { self , RangeProof , SecretKey , SurjectionProof } ;
@@ -481,7 +481,7 @@ impl PartiallySignedTransaction {
481481 rng : & mut R ,
482482 secp : & secp256k1_zkp:: Secp256k1 < C > ,
483483 inp_txout_sec : & HashMap < usize , TxOutSecrets > ,
484- ) -> Result < BTreeMap < TxInType , ( AssetBlindingFactor , ValueBlindingFactor , SecretKey ) > , PsetBlindError > {
484+ ) -> Result < BTreeMap < CtLocation , ( AssetBlindingFactor , ValueBlindingFactor , SecretKey ) > , PsetBlindError > {
485485 let ( inp_secrets, outs_to_blind) = self . blind_checks ( inp_txout_sec) ?;
486486
487487 let mut ret = BTreeMap :: new ( ) ; // return all the random values used
@@ -541,7 +541,8 @@ impl PartiallySignedTransaction {
541541 ) ) ;
542542 }
543543 // return blinding factors used
544- ret. insert ( TxInType :: Input ( i) , ( abf, vbf, ephemeral_sk) ) ;
544+ let location = CtLocation { input_index : i, ty : CtLocationType :: Input } ;
545+ ret. insert ( location, ( abf, vbf, ephemeral_sk) ) ;
545546 }
546547
547548 // safe to unwrap because we have checked that there is atleast one output to blind
@@ -582,7 +583,7 @@ impl PartiallySignedTransaction {
582583 rng : & mut R ,
583584 secp : & secp256k1_zkp:: Secp256k1 < C > ,
584585 inp_txout_sec : & HashMap < usize , TxOutSecrets > ,
585- ) -> Result < BTreeMap < TxInType , ( AssetBlindingFactor , ValueBlindingFactor , SecretKey ) > , PsetBlindError > {
586+ ) -> Result < BTreeMap < CtLocation , ( AssetBlindingFactor , ValueBlindingFactor , SecretKey ) > , PsetBlindError > {
586587 let ( mut inp_secrets, mut outs_to_blind) = self . blind_checks ( inp_txout_sec) ?;
587588
588589 let mut ret = BTreeMap :: new ( ) ;
@@ -661,7 +662,8 @@ impl PartiallySignedTransaction {
661662 ) ;
662663 let ( value_commitment, nonce, rangeproof) =
663664 blind_res. map_err ( |e| PsetBlindError :: ConfidentialTxOutError ( last_out_index, e) ) ?;
664- ret. insert ( TxInType :: Input ( last_out_index) , ( out_abf, final_vbf, ephemeral_sk) ) ;
665+ let location = CtLocation { input_index : last_out_index, ty : CtLocationType :: Input } ;
666+ ret. insert ( location, ( out_abf, final_vbf, ephemeral_sk) ) ;
665667
666668 // mutate the pset
667669 {
0 commit comments