Safe Haskell | None |
---|---|
Language | Haskell2010 |
Byron.Spec.Ledger.UTxO
Synopsis
- newtype TxId = TxId {}
- data TxIn = TxIn TxId Natural
- data TxOut = TxOut {}
- newtype UTxO = UTxO {}
- mapUTxOValues :: (Lovelace -> Lovelace) -> UTxO -> UTxO
- addValue :: TxOut -> Lovelace -> TxOut
- fromTxOuts :: [TxOut] -> UTxO
- data TxBody = TxBody {}
- txid :: TxBody -> TxId
- txValue :: TxBody -> Lovelace
- txins :: TxBody -> [TxIn]
- txouts :: TxBody -> UTxO
- balance :: UTxO -> Lovelace
- pcMinFee :: PParams -> Tx -> Lovelace
- txsize :: Tx -> Int
- data Wit = Wit VKey (Sig TxBody)
- data Tx = Tx {}
- makeWitness :: KeyPair -> TxBody -> Wit
- makeTxWits :: UTxO -> TxBody -> Tx
Documentation
A unique ID of a transaction, which is computable from the transaction.
Instances
Eq TxId Source # | |
Data TxId Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TxId -> c TxId # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TxId # dataTypeOf :: TxId -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TxId) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TxId) # gmapT :: (forall b. Data b => b -> b) -> TxId -> TxId # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TxId -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TxId -> r # gmapQ :: (forall d. Data d => d -> u) -> TxId -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TxId -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TxId -> m TxId # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TxId -> m TxId # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TxId -> m TxId # | |
Ord TxId Source # | |
Show TxId Source # | |
Generic TxId Source # | |
Hashable TxId Source # | |
AddShrinks TxId Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
SeedGoblin TxId Source # | |
NoThunks TxId Source # | |
HasTypeReps TxId Source # | |
GeneOps genome => Goblin genome TxId Source # | |
type Rep TxId Source # | |
Defined in Byron.Spec.Ledger.UTxO |
The input of a UTxO.
- TODO - is it okay to use list indices instead of implementing the Ix Type?
Instances
Eq TxIn Source # | |
Data TxIn Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TxIn -> c TxIn # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TxIn # dataTypeOf :: TxIn -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TxIn) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TxIn) # gmapT :: (forall b. Data b => b -> b) -> TxIn -> TxIn # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TxIn -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TxIn -> r # gmapQ :: (forall d. Data d => d -> u) -> TxIn -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TxIn -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TxIn -> m TxIn # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TxIn -> m TxIn # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TxIn -> m TxIn # | |
Ord TxIn Source # | |
Show TxIn Source # | |
Generic TxIn Source # | |
Hashable TxIn Source # | |
AddShrinks TxIn Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
SeedGoblin TxIn Source # | |
NoThunks TxIn Source # | |
HasTypeReps TxIn Source # | |
GeneOps genome => Goblin genome TxIn Source # | |
type Rep TxIn Source # | |
Defined in Byron.Spec.Ledger.UTxO type Rep TxIn = D1 ('MetaData "TxIn" "Byron.Spec.Ledger.UTxO" "byron-spec-ledger-0.1.0.0-AWpYh6fpW7YLETcmEzrAvm" 'False) (C1 ('MetaCons "TxIn" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TxId) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural))) |
The output of a UTxO.
Instances
Eq TxOut Source # | |
Data TxOut Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TxOut -> c TxOut # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TxOut # dataTypeOf :: TxOut -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TxOut) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TxOut) # gmapT :: (forall b. Data b => b -> b) -> TxOut -> TxOut # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TxOut -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TxOut -> r # gmapQ :: (forall d. Data d => d -> u) -> TxOut -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TxOut -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TxOut -> m TxOut # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TxOut -> m TxOut # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TxOut -> m TxOut # | |
Ord TxOut Source # | |
Show TxOut Source # | |
Generic TxOut Source # | |
Hashable TxOut Source # | |
AddShrinks TxOut Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
SeedGoblin TxOut Source # | |
NoThunks TxOut Source # | |
HasTypeReps TxOut Source # | |
GeneOps genome => Goblin genome TxOut Source # | |
type Rep TxOut Source # | |
Defined in Byron.Spec.Ledger.UTxO type Rep TxOut = D1 ('MetaData "TxOut" "Byron.Spec.Ledger.UTxO" "byron-spec-ledger-0.1.0.0-AWpYh6fpW7YLETcmEzrAvm" 'False) (C1 ('MetaCons "TxOut" 'PrefixI 'True) (S1 ('MetaSel ('Just "addr") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Addr) :*: S1 ('MetaSel ('Just "value") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Lovelace))) |
The unspent transaction outputs.
Instances
Eq UTxO Source # | |
Data UTxO Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTxO -> c UTxO # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTxO # dataTypeOf :: UTxO -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTxO) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTxO) # gmapT :: (forall b. Data b => b -> b) -> UTxO -> UTxO # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTxO -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTxO -> r # gmapQ :: (forall d. Data d => d -> u) -> UTxO -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> UTxO -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTxO -> m UTxO # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTxO -> m UTxO # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTxO -> m UTxO # | |
Show UTxO Source # | |
Semigroup UTxO Source # | |
Monoid UTxO Source # | |
SeedGoblin UTxO Source # | |
NoThunks UTxO Source # | |
Relation UTxO Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods singleton :: Domain UTxO -> Range UTxO -> UTxO Source # dom :: UTxO -> Set (Domain UTxO) Source # range :: UTxO -> Set (Range UTxO) Source # (◁) :: (Ord (Domain UTxO), Foldable f) => f (Domain UTxO) -> UTxO -> UTxO Source # (<|) :: (Ord (Domain UTxO), Foldable f) => f (Domain UTxO) -> UTxO -> UTxO Source # (⋪) :: (Ord (Domain UTxO), Foldable f) => f (Domain UTxO) -> UTxO -> UTxO Source # (</|) :: (Ord (Domain UTxO), Foldable f) => f (Domain UTxO) -> UTxO -> UTxO Source # (▷) :: UTxO -> Set (Range UTxO) -> UTxO Source # (|>) :: UTxO -> Set (Range UTxO) -> UTxO Source # (⋫) :: UTxO -> Set (Range UTxO) -> UTxO Source # (|/>) :: UTxO -> Set (Range UTxO) -> UTxO Source # (∪) :: UTxO -> UTxO -> UTxO Source # (⨃) :: (Ord (Domain UTxO), Ord (Range UTxO), Foldable f) => UTxO -> f (Domain UTxO, Range UTxO) -> UTxO Source # (<=◁) :: Domain UTxO -> UTxO -> UTxO Source # (▷<=) :: UTxO -> Range UTxO -> UTxO Source # | |
type Domain UTxO Source # | |
type Range UTxO Source # | |
mapUTxOValues :: (Lovelace -> Lovelace) -> UTxO -> UTxO Source #
Apply function uniformly across all outputs
fromTxOuts :: [TxOut] -> UTxO Source #
Construct a UTxO from initial TxOuts
A raw transaction
Instances
Eq TxBody Source # | |
Data TxBody Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TxBody -> c TxBody # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TxBody # toConstr :: TxBody -> Constr # dataTypeOf :: TxBody -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TxBody) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TxBody) # gmapT :: (forall b. Data b => b -> b) -> TxBody -> TxBody # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TxBody -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TxBody -> r # gmapQ :: (forall d. Data d => d -> u) -> TxBody -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> TxBody -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> TxBody -> m TxBody # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TxBody -> m TxBody # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TxBody -> m TxBody # | |
Ord TxBody Source # | |
Show TxBody Source # | |
Generic TxBody Source # | |
Hashable TxBody Source # | |
AddShrinks TxBody Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
NoThunks TxBody Source # | |
HasTypeReps TxBody Source # | |
HasHash TxBody Source # | |
GeneOps g => Goblin g TxBody Source # | |
type Rep TxBody Source # | |
Defined in Byron.Spec.Ledger.UTxO type Rep TxBody = D1 ('MetaData "TxBody" "Byron.Spec.Ledger.UTxO" "byron-spec-ledger-0.1.0.0-AWpYh6fpW7YLETcmEzrAvm" 'False) (C1 ('MetaCons "TxBody" 'PrefixI 'True) (S1 ('MetaSel ('Just "inputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TxIn]) :*: S1 ('MetaSel ('Just "outputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [TxOut]))) |
Proof/Witness that a transaction is authorized by the given key holder.
Instances
Eq Wit Source # | |
Data Wit Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Wit -> c Wit # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Wit # dataTypeOf :: Wit -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Wit) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Wit) # gmapT :: (forall b. Data b => b -> b) -> Wit -> Wit # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Wit -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Wit -> r # gmapQ :: (forall d. Data d => d -> u) -> Wit -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Wit -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Wit -> m Wit # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Wit -> m Wit # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Wit -> m Wit # | |
Ord Wit Source # | |
Show Wit Source # | |
Generic Wit Source # | |
Hashable Wit Source # | |
AddShrinks Wit Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
NoThunks Wit Source # | |
HasTypeReps Wit Source # | |
GeneOps genome => Goblin genome Wit Source # | |
type Rep Wit Source # | |
Defined in Byron.Spec.Ledger.UTxO type Rep Wit = D1 ('MetaData "Wit" "Byron.Spec.Ledger.UTxO" "byron-spec-ledger-0.1.0.0-AWpYh6fpW7YLETcmEzrAvm" 'False) (C1 ('MetaCons "Wit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 VKey) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sig TxBody)))) |
A fully formed transaction.
Instances
Eq Tx Source # | |
Data Tx Source # | |
Defined in Byron.Spec.Ledger.UTxO Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Tx -> c Tx # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Tx # dataTypeOf :: Tx -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Tx) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Tx) # gmapT :: (forall b. Data b => b -> b) -> Tx -> Tx # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Tx -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Tx -> r # gmapQ :: (forall d. Data d => d -> u) -> Tx -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Tx -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Tx -> m Tx # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Tx -> m Tx # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Tx -> m Tx # | |
Show Tx Source # | |
Generic Tx Source # | |
Hashable Tx Source # | |
AddShrinks Tx Source # | |
Defined in Byron.Spec.Ledger.UTxO | |
NoThunks Tx Source # | |
HasTypeReps Tx Source # | |
GeneOps genome => Goblin genome Tx Source # | |
HasHash [Tx] Source # | |
type Rep Tx Source # | |
Defined in Byron.Spec.Ledger.UTxO type Rep Tx = D1 ('MetaData "Tx" "Byron.Spec.Ledger.UTxO" "byron-spec-ledger-0.1.0.0-AWpYh6fpW7YLETcmEzrAvm" 'False) (C1 ('MetaCons "Tx" 'PrefixI 'True) (S1 ('MetaSel ('Just "body") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TxBody) :*: S1 ('MetaSel ('Just "witnesses") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Wit]))) |