plutus-ledger-1.2.0.0: Wallet API
Safe HaskellNone
LanguageHaskell2010

Ledger.Blockchain

Synopsis

Documentation

newtype OnChainTx Source #

A transaction on the blockchain. Invalid transactions are still put on the chain to be able to collect fees.

Constructors

OnChainTx 

Fields

Instances

Instances details
Eq OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Show OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Generic OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Associated Types

type Rep OnChainTx :: Type -> Type Source #

Serialise OnChainTx Source # 
Instance details

Defined in Ledger.Index.Internal

Methods

encode :: OnChainTx -> Encoding

decode :: Decoder s OnChainTx

encodeList :: [OnChainTx] -> Encoding

decodeList :: Decoder s [OnChainTx]

type Rep OnChainTx Source # 
Instance details

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.

newtype BlockId Source #

Block identifier (usually a hash)

Constructors

BlockId 

Fields

Instances

Instances details
Eq BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Ord BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Show BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Generic BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Associated Types

type Rep BlockId :: Type -> Type Source #

FromJSON BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Methods

parseJSON :: Value -> Parser BlockId

parseJSONList :: Value -> Parser [BlockId]

ToJSON BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Methods

toJSON :: BlockId -> Value

toEncoding :: BlockId -> Encoding

toJSONList :: [BlockId] -> Value

toEncodingList :: [BlockId] -> Encoding

Pretty BlockId Source # 
Instance details

Defined in Ledger.Blockchain

Methods

pretty :: BlockId -> Doc ann #

prettyList :: [BlockId] -> Doc ann #

type Rep BlockId Source # 
Instance details

Defined in Ledger.Blockchain

type Rep BlockId = D1 ('MetaData "BlockId" "Ledger.Blockchain" "plutus-ledger-1.2.0.0-8dOSOspdVv7Hd909lHBnfn" 'True) (C1 ('MetaCons "BlockId" 'PrefixI 'True) (S1 ('MetaSel ('Just "getBlockId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

type Blockchain = [Block] Source #

A blockchain, which is just a list of blocks, starting with the newest.

newtype Context #

Constructors

Context BuiltinData 

Instances

Instances details
Show Context 
Instance details

Defined in Plutus.V1.Ledger.Scripts

FromJSON Context 
Instance details

Defined in Ledger.Scripts.Orphans

Methods

parseJSON :: Value -> Parser Context

parseJSONList :: Value -> Parser [Context]

ToJSON Context 
Instance details

Defined in Ledger.Scripts.Orphans

Methods

toJSON :: Context -> Value

toEncoding :: Context -> Encoding

toJSONList :: [Context] -> Value

toEncodingList :: [Context] -> Encoding

Pretty Context 
Instance details

Defined in Plutus.V1.Ledger.Scripts

Methods

pretty :: Context -> Doc ann #

prettyList :: [Context] -> Doc ann #

eitherTx :: (CardanoTx -> r) -> (CardanoTx -> r) -> OnChainTx -> r Source #

consumableInputs :: OnChainTx -> [TxIn] Source #

Outputs consumed from the UTXO set by the OnChainTx

outputsProduced :: OnChainTx -> Map TxIn TxOut Source #

Outputs added to the UTXO set by the OnChainTx