| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ledger.Blockchain
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.
Constructors
| OnChainTx | |
Fields
| |
Instances
| Eq OnChainTx Source # | |
| Show OnChainTx Source # | |
| Generic OnChainTx Source # | |
| Serialise OnChainTx Source # | |
Defined in Ledger.Index.Internal Methods 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)
Constructors
| BlockId | |
Fields
| |
Instances
| Eq BlockId Source # | |
| Ord BlockId Source # | |
Defined in Ledger.Blockchain | |
| Show BlockId Source # | |
| Generic BlockId Source # | |
| FromJSON BlockId Source # | |
Defined in Ledger.Blockchain | |
| ToJSON BlockId Source # | |
Defined in Ledger.Blockchain Methods 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.
Constructors
| Context BuiltinData |
Instances
| Show Context | |
| FromJSON Context | |
Defined in Ledger.Scripts.Orphans | |
| ToJSON Context | |
Defined in Ledger.Scripts.Orphans Methods toEncoding :: Context -> Encoding toJSONList :: [Context] -> Value toEncodingList :: [Context] -> Encoding | |
| Pretty Context | |
Defined in Plutus.V1.Ledger.Scripts | |
onChainTxIsValid :: OnChainTx -> Bool Source #