Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Fund = Fund {}
- data FundInEra era = FundInEra {
- _fundTxIn :: !TxIn
- _fundWitness :: Witness WitCtxTxIn era
- _fundVal :: !(TxOutValue era)
- _fundSigningKey :: !(Maybe (SigningKey PaymentKey))
- getFundTxIn :: Fund -> TxIn
- getFundKey :: Fund -> Maybe (SigningKey PaymentKey)
- getFundLovelace :: Fund -> Lovelace
- getFundWitness :: forall era. IsShelleyBasedEra era => Fund -> Witness WitCtxTxIn era
Types
Outputs that are available for spending.
When building a new transaction, they provide the TxIn
parts.
InAnyCardanoEra
helps form heterogenous collections wrt. eras.
FundInEra
has field naming conventions suggesting anticipated
use of lenses.
FundInEra | |
|
Accessors
getFundKey :: Fund -> Maybe (SigningKey PaymentKey) Source #
Signing keys are optional as far as funds go.
getFundLovelace :: Fund -> Lovelace Source #
Converting a TxOutValue
to Lovelace
requires case analysis.
getFundWitness :: forall era. IsShelleyBasedEra era => Fund -> Witness WitCtxTxIn era Source #
The Fund
alternative is checked against cardanoEra
, but
getFundWitness
otherwise wraps _fundWitness
.