cardano-ledger-shelley-0.1.0.0
Safe Haskell None
Language Haskell2010

Cardano.Ledger.Shelley.Tx

Synopsis

Documentation

data Tx era where Source #

Instances

Instances details
body ~ TxBody era => HasField "body" ( Tx era) body Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Methods

getField :: Tx era -> body Source #

HasField "txsize" ( Tx era) Integer Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

wits ~ Witnesses era => HasField "wits" ( Tx era) wits Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Methods

getField :: Tx era -> wits Source #

(c ~ Crypto era, Witnesses era ~ WitnessSet era) => HasField "addrWits" ( Tx era) ( Set ( WitVKey ' Witness c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

aux ~ AuxiliaryData era => HasField "auxiliaryData" ( Tx era) ( StrictMaybe aux) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

(c ~ Crypto era, Witnesses era ~ WitnessSet era) => HasField "bootWits" ( Tx era) ( Set ( BootstrapWitness c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

(c ~ Crypto era, script ~ Script era, Witnesses era ~ WitnessSet era) => HasField "scriptWits" ( Tx era) ( Map ( ScriptHash c) script) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Eq ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, Show ( AuxiliaryData era), Show ( TxBody era), Show ( Witnesses era)) => Show ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( NFData ( TxBody era), NFData ( Witnesses era), NFData ( AuxiliaryData era)) => NFData ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Methods

rnf :: Tx era -> () Source #

Typeable era => ToCBOR ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era))) => FromCBOR ( Annotator ( Tx era)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

SafeToHash ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, NoThunks ( AuxiliaryData era), NoThunks ( TxBody era), NoThunks ( Witnesses era)) => NoThunks ( Tx era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

newtype TxBody era Source #

Instances

Instances details
HasField "ttl" ( TxBody era) SlotNo Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

HasField "txfee" ( TxBody era) Coin Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto era ~ crypto => HasField "adHash" ( TxBody era) ( StrictMaybe ( AuxiliaryDataHash crypto)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto era ~ crypto => HasField "certs" ( TxBody era) ( StrictSeq ( DCert crypto)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto era ~ crypto => HasField "inputs" ( TxBody era) ( Set ( TxIn crypto)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

c ~ Crypto era => HasField "minted" ( TxBody era) ( Set ( ScriptHash c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

TxOut era ~ out => HasField "outputs" ( TxBody era) ( StrictSeq out) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

c ~ Crypto era => HasField "txinputs_fee" ( TxBody era) ( Set ( TxIn c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

HasField "update" ( TxBody era) ( StrictMaybe ( Update era)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto era ~ crypto => HasField "wdrls" ( TxBody era) ( Wdrl crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, TransTxBody Eq era) => Eq ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, TransTxBody Show era) => Show ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Generic ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Associated Types

type Rep ( TxBody era) :: Type -> Type Source #

( NFData ( TxOut era), Crypto ( Crypto era), NFData ( PParamsDelta era)) => NFData ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Methods

rnf :: TxBody era -> () Source #

Era era => ToCBOR ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, FromCBOR ( TxOut era), FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR ( Annotator ( TxBody era)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

SafeToHash ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( TransTxBody NoThunks era, Typeable era) => NoThunks ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, c ~ Crypto era) => HashAnnotated ( TxBody era) EraIndependentTxBody c Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Rep ( TxBody era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Rep ( TxBody era) = D1 (' MetaData "TxBody" "Cardano.Ledger.Shelley.TxBody" "cardano-ledger-shelley-0.1.0.0-4LNBTpyKcsy6EW18a3tTt2" ' True ) ( C1 (' MetaCons "TxBodyConstr" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( MemoBytes ( TxBodyRaw era)))))

data TxOut era Source #

The output of a UTxO.

Bundled Patterns

pattern TxOut :: ( Era era, Show ( Value era), Compactible ( Value era)) => Addr ( Crypto era) -> Value era -> TxOut era

Instances

Instances details
( Compactible v, v ~ Value era) => HasField "value" ( TxOut era) v Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

TransTxOut Eq era => Eq ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( TransTxOut Show era, Era era) => Show ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

NFData ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Methods

rnf :: TxOut era -> () Source #

( Era era, TransTxOut ToCBOR era) => ToCBOR ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, TransTxOut DecodeNonNegative era, Show ( Value era)) => FromCBOR ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, TransTxOut DecodeNonNegative era, Show ( Value era)) => FromSharedCBOR ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Associated Types

type Share ( TxOut era) Source #

( Crypto ( Crypto era), HeapWords ( CompactForm ( Value era))) => HeapWords ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

NoThunks ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Share ( TxOut era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

data TxIn crypto Source #

The input of a UTxO.

Constructors

TxIn !( TxId crypto) ! TxIx

Instances

Instances details
Crypto era ~ crypto => HasField "inputs" ( TxBody era) ( Set ( TxIn crypto)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

c ~ Crypto era => HasField "txinputs_fee" ( TxBody era) ( Set ( TxIn c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Eq ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Ord ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Show ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Generic ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Associated Types

type Rep ( TxIn crypto) :: Type -> Type Source #

Methods

from :: TxIn crypto -> Rep ( TxIn crypto) x Source #

to :: Rep ( TxIn crypto) x -> TxIn crypto Source #

Crypto crypto => NFData ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Methods

rnf :: TxIn crypto -> () Source #

Crypto crypto => ToCBOR ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => FromCBOR ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => HeapWords ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

NoThunks ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

type Rep ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

newtype TxId crypto Source #

A unique ID of a transaction, which is computable from the transaction.

Instances

Instances details
Eq ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Ord ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Show ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Generic ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Associated Types

type Rep ( TxId crypto) :: Type -> Type Source #

Methods

from :: TxId crypto -> Rep ( TxId crypto) x Source #

to :: Rep ( TxId crypto) x -> TxId crypto Source #

Crypto crypto => NFData ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Methods

rnf :: TxId crypto -> () Source #

Crypto crypto => ToCBOR ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => FromCBOR ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

HeapWords ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

NoThunks ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

type Rep ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

type Rep ( TxId crypto) = D1 (' MetaData "TxId" "Cardano.Ledger.TxIn" "cardano-ledger-core-0.1.0.0-3EJt5rxsPizAWHDEqGPh9V" ' True ) ( C1 (' MetaCons "TxId" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "_unTxId") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( SafeHash crypto EraIndependentTxBody ))))

data WitnessSetHKD f era where Source #

Instances

Instances details
(c ~ Crypto era, Witnesses era ~ WitnessSet era) => HasField "addrWits" ( WitnessSet era) ( Set ( WitVKey ' Witness c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

(c ~ Crypto era, script ~ Script era, Witnesses era ~ WitnessSet era) => HasField "scriptWits" ( WitnessSet era) ( Map ( ScriptHash c) script) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Typeable era, FromCBOR ( Annotator ( Script era)), ValidateScript era) => FromCBOR ( Annotator ( WitnessSetHKD Identity era)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, TransWitnessSet Eq era) => Eq ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, TransWitnessSet Show era) => Show ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Era era => Generic ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, AnnotatedData ( Script era)) => Semigroup ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, AnnotatedData ( Script era)) => Monoid ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, NFData ( Script era), NFData ( WitVKey ' Witness ( Crypto era)), NFData ( BootstrapWitness ( Crypto era))) => NFData ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Era era => ToCBOR ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

SafeToHash ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Era era, TransWitnessSet NoThunks era) => NoThunks ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

type Rep ( WitnessSetHKD Identity era) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

data WitVKey kr crypto where Source #

Proof/Witness that a transaction is authorized by the given key holder.

Bundled Patterns

pattern WitVKey :: ( Typeable kr, Crypto crypto) => VKey kr crypto -> SignedDSIGN crypto ( Hash crypto EraIndependentTxBody ) -> WitVKey kr crypto

Instances

Instances details
(c ~ Crypto era, Witnesses era ~ WitnessSet era) => HasField "addrWits" ( WitnessSet era) ( Set ( WitVKey ' Witness c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

(c ~ Crypto era, Witnesses era ~ WitnessSet era) => HasField "addrWits" ( Tx era) ( Set ( WitVKey ' Witness c)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.Tx

( Typeable kr, Crypto crypto) => FromCBOR ( Annotator ( WitVKey kr crypto)) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => Eq ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Methods

(==) :: WitVKey kr crypto -> WitVKey kr crypto -> Bool Source #

(/=) :: WitVKey kr crypto -> WitVKey kr crypto -> Bool Source #

( Typeable kr, Crypto crypto) => Ord ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => Show ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Generic ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Associated Types

type Rep ( WitVKey kr crypto) :: Type -> Type Source #

Methods

from :: WitVKey kr crypto -> Rep ( WitVKey kr crypto) x Source #

to :: Rep ( WitVKey kr crypto) x -> WitVKey kr crypto Source #

NFData ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Methods

rnf :: WitVKey kr crypto -> () Source #

( Typeable kr, Crypto crypto) => ToCBOR ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Crypto crypto, Typeable kr) => NoThunks ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Rep ( WitVKey kr crypto) Source #
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

class ( Era era, SafeToHash ( Script era), HasField "body" ( Tx era) ( TxBody era)) => ValidateScript era where Source #

Typeclass for script data types. Allows for script validation and hashing. You must understand the role of SafeToHash and scriptPrefixTag to make new instances. scriptPrefixTag is a magic number representing the tag of the script language. For each new script language defined, a new tag is chosen and the tag is included in the script hash for a script. The safeToHash constraint ensures that Scripts are never reserialised.

Minimal complete definition

scriptPrefixTag , validateScript

txwitsScript :: Witnesses era ~ WitnessSet era => Tx era -> Map ( ScriptHash ( Crypto era)) ( Script era) Source #

Multi-signature script witness accessor function for Transactions

evalNativeMultiSigScript :: Crypto crypto => MultiSig crypto -> Set ( KeyHash ' Witness crypto) -> Bool Source #

Script evaluator for native multi-signature scheme. vhks is the set of key hashes that signed the transaction to be validated.

hashMultiSigScript :: forall era. ( ValidateScript era, Script era ~ MultiSig ( Crypto era)) => MultiSig ( Crypto era) -> ScriptHash ( Crypto era) Source #

Hashes native multi-signature script.

validateNativeMultiSigScript :: ( TransTx ToCBOR era, Witnesses era ~ WitnessSet era) => MultiSig ( Crypto era) -> Tx era -> Bool Source #

Script validator for native multi-signature scheme.

type TransTx (c :: Type -> Constraint ) era = ( Era era, c ( Script era), c ( TxBody era), c ( AuxiliaryData era)) Source #

prettyWitnessSetParts :: WitnessSetHKD Identity era -> ( Set ( WitVKey ' Witness ( Crypto era)), Map ( ScriptHash ( Crypto era)) ( Script era), Set ( BootstrapWitness ( Crypto era))) Source #

Exports the relevant parts from a (WintessSetHKD Identity era) for use by the pretty printer without all the horrible constraints. Uses the non-exported WitnessSet' constructor.