Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype OnChainTx = OnChainTx {
- getOnChainTx :: Validated (Tx EmulatorEra)
- type Block = [OnChainTx]
- newtype BlockId = BlockId {
- getBlockId :: ByteString
- type Blockchain = [Block]
- newtype Context = Context BuiltinData
- eitherTx :: (CardanoTx -> r) -> (CardanoTx -> r) -> OnChainTx -> r
- unOnChain :: OnChainTx -> CardanoTx
- onChainTxIsValid :: OnChainTx -> Bool
- consumableInputs :: OnChainTx -> [TxIn]
- outputsProduced :: OnChainTx -> Map TxIn TxOut
Documentation
A transaction on the blockchain. Invalid transactions are still put on the chain to be able to collect fees.
OnChainTx | |
|
Instances
Eq OnChainTx Source # | |
Show OnChainTx Source # | |
Generic OnChainTx Source # | |
Serialise OnChainTx Source # | |
Defined in Ledger.Index.Internal encode :: OnChainTx -> Encoding encodeList :: [OnChainTx] -> Encoding decodeList :: Decoder s [OnChainTx] | |
type Rep OnChainTx Source # | |
Defined in Ledger.Index.Internal type Rep OnChainTx = D1 ('MetaData "OnChainTx" "Ledger.Index.Internal" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "OnChainTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOnChainTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Validated (Tx EmulatorEra))))) |
type Block = [OnChainTx] Source #
A block on the blockchain. This is just a list of transactions following on from the chain so far.
Block identifier (usually a hash)
BlockId | |
|
Instances
Eq BlockId Source # | |
Ord BlockId Source # | |
Show BlockId Source # | |
Generic BlockId Source # | |
FromJSON BlockId Source # | |
Defined in Ledger.Blockchain parseJSON :: Value -> Parser BlockId parseJSONList :: Value -> Parser [BlockId] | |
ToJSON BlockId Source # | |
Defined in Ledger.Blockchain toEncoding :: BlockId -> Encoding toJSONList :: [BlockId] -> Value toEncodingList :: [BlockId] -> Encoding | |
Pretty BlockId Source # | |
Defined in Ledger.Blockchain | |
type Rep BlockId Source # | |
Defined in Ledger.Blockchain |
type Blockchain = [Block] Source #
A blockchain, which is just a list of blocks, starting with the newest.
Context BuiltinData |
Instances
Show Context | |
FromJSON Context | |
Defined in Ledger.Scripts.Orphans parseJSON :: Value -> Parser Context parseJSONList :: Value -> Parser [Context] | |
ToJSON Context | |
Defined in Ledger.Scripts.Orphans toEncoding :: Context -> Encoding toJSONList :: [Context] -> Value toEncodingList :: [Context] -> Encoding | |
Pretty Context | |
Defined in Plutus.V1.Ledger.Scripts |
onChainTxIsValid :: OnChainTx -> Bool Source #