@@ -26,13 +26,15 @@ use pallas_addresses::{
2626 byron:: { AddrAttrProperty , AddressPayload } ,
2727 * ,
2828} ;
29- use pallas_primitives:: {
30- alonzo:: Value as AlonzoValue ,
31- conway:: { MintedPostAlonzoTransactionOutput , NativeScript } ,
32- } ;
29+ use pallas_primitives:: conway:: { MintedPostAlonzoTransactionOutput , NativeScript , RedeemerTag } ;
3330use sha3:: { Digest as _, Sha3_256 } ;
3431use std:: {
35- array:: TryFromSliceError , borrow:: Cow , collections:: BTreeMap , fmt:: Debug , ops:: Deref , sync:: Arc ,
32+ array:: TryFromSliceError ,
33+ borrow:: Cow ,
34+ collections:: BTreeMap ,
35+ fmt:: { self , Debug , Formatter } ,
36+ ops:: Deref ,
37+ sync:: Arc ,
3638} ;
3739
3840pub use amaru_minicbor_extra:: * ;
@@ -50,20 +52,21 @@ pub use pallas_crypto::{
5052 key:: ed25519,
5153} ;
5254pub use pallas_primitives:: {
53- AssetName , BigInt , Constr , DatumHash , DnsName , IPv4 , IPv6 , MaybeIndefArray , PlutusData ,
54- PlutusScript , PolicyId , Port , PositiveCoin ,
55+ alonzo:: Value as AlonzoValue ,
5556 babbage:: { Header , MintedHeader , PseudoHeader } ,
5657 conway:: {
57- AddrKeyhash , AuxiliaryData , Block , BootstrapWitness , Certificate , Coin , Constitution ,
58- CostModel , CostModels , DRep , DRepVotingThresholds , DatumOption , ExUnitPrices , ExUnits ,
59- GovAction , HeaderBody , KeepRaw , Language , MintedBlock , MintedDatumOption , MintedScriptRef ,
60- MintedTransactionBody , MintedTransactionOutput , MintedTx , MintedWitnessSet , Multiasset ,
61- NonEmptySet , NonZeroInt , PoolMetadata , PoolVotingThresholds , PostAlonzoTransactionOutput ,
58+ AddrKeyhash , AssetName , AuxiliaryData , BigInt , Block , BootstrapWitness , Certificate , Coin ,
59+ Constitution , Constr , CostModel , CostModels , DRep , DRepVotingThresholds , DatumHash ,
60+ DatumOption , DnsName , ExUnitPrices , ExUnits , GovAction , GovActionId as ProposalId ,
61+ HeaderBody , IPv4 , IPv6 , KeepRaw , Language , MaybeIndefArray , MintedBlock , MintedDatumOption ,
62+ MintedScriptRef , MintedTransactionBody , MintedTransactionOutput , MintedTx ,
63+ MintedWitnessSet , Multiasset , NonEmptySet , NonZeroInt , PlutusData , PlutusScript , PolicyId ,
64+ PoolMetadata , PoolVotingThresholds , Port , PositiveCoin , PostAlonzoTransactionOutput ,
6265 ProposalProcedure as Proposal , ProtocolParamUpdate , ProtocolVersion , PseudoScript ,
63- PseudoTransactionOutput , RationalNumber , Redeemer , RedeemerTag , Redeemers ,
64- RedeemersKey as RedeemerKey , Relay , RewardAccount , ScriptHash , ScriptRef , StakeCredential ,
65- TransactionBody , TransactionInput , TransactionOutput , Tx , UnitInterval , VKeyWitness , Value ,
66- Vote , Voter , VotingProcedure , VotingProcedures , VrfKeyhash , WitnessSet ,
66+ PseudoTransactionOutput , RationalNumber , Redeemer , Redeemers , RedeemersKey as RedeemerKey ,
67+ Relay , RewardAccount , ScriptHash , ScriptRef , StakeCredential , TransactionBody ,
68+ TransactionInput , TransactionOutput , Tx , UnitInterval , VKeyWitness , Value , Vote , Voter ,
69+ VotingProcedure , VotingProcedures , VrfKeyhash , WitnessSet ,
6770 } ,
6871} ;
6972pub use pallas_traverse:: { ComputeHash , OriginalHash } ;
@@ -266,6 +269,29 @@ impl From<&[u8]> for RawBlock {
266269 }
267270}
268271
272+ #[ derive( Debug , Clone ) ]
273+ pub struct TransactionInputAdapter ( TransactionInput ) ;
274+
275+ impl Deref for TransactionInputAdapter {
276+ type Target = TransactionInput ;
277+
278+ fn deref ( & self ) -> & Self :: Target {
279+ & self . 0
280+ }
281+ }
282+
283+ impl std:: fmt:: Display for TransactionInputAdapter {
284+ fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
285+ write ! ( f, "{}#{}" , self . 0 . transaction_id, self . 0 . index)
286+ }
287+ }
288+
289+ impl From < TransactionInput > for TransactionInputAdapter {
290+ fn from ( value : TransactionInput ) -> Self {
291+ Self ( value)
292+ }
293+ }
294+
269295pub type TransactionId = Hash < 32 > ;
270296
271297pub type PoolId = Hash < 28 > ;
0 commit comments