cardano-api-1.36.0: The cardano api
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Api.Tx

Description

Complete, signed transactions

Synopsis

Signing transactions

Creating transaction witnesses one by one, or all in one go.

data Tx era where Source #

Constructors

ByronTx ∷ ATxAux ByteStringTx ByronEra 
ShelleyTxShelleyBasedEra era → Tx (ShelleyLedgerEra era) → Tx era 

Bundled Patterns

pattern TxTxBody era → [KeyWitness era] → Tx era 

Instances

Instances details
Show (InAnyCardanoEra Tx) Source # 
Instance details

Defined in Cardano.Api.Tx

Show (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

Methods

showsPrecIntTx era → ShowS Source #

showTx era → String Source #

showList ∷ [Tx era] → ShowS Source #

HasTypeProxy era ⇒ HasTypeProxy (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

Associated Types

data AsType (Tx era) Source #

Methods

proxyToAsTypeProxy (Tx era) → AsType (Tx era) Source #

IsCardanoEra era ⇒ SerialiseAsCBOR (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

Methods

serialiseToCBORTx era → ByteString Source #

deserialiseFromCBORAsType (Tx era) → ByteStringEither DecoderError (Tx era) Source #

IsCardanoEra era ⇒ HasTextEnvelope (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

Eq (InAnyCardanoEra Tx) Source # 
Instance details

Defined in Cardano.Api.Tx

Eq (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

Methods

(==)Tx era → Tx era → Bool Source #

(/=)Tx era → Tx era → Bool Source #

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

data AsType (Tx era) = AsTx (AsType era)

getTxBody ∷ ∀ era. Tx era → TxBody era Source #

getTxWitnesses ∷ ∀ era. Tx era → [KeyWitness era] Source #

data ScriptValidity Source #

Indicates whether a script is expected to fail or pass validation.

Constructors

ScriptInvalid

Script is expected to fail validation. Transactions marked as such can include scripts that fail validation. Such transactions may be submitted to the chain, in which case the collateral will be taken upon on chain script validation failure.

ScriptValid

Script is expected to pass validation. Transactions marked as such cannot include scripts that fail validation.

Instances

Instances details
Show ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

FromCBOR ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

fromCBOR ∷ Decoder s ScriptValidity #

labelProxy ScriptValidityText #

ToCBOR ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Methods

toCBORScriptValidity → Encoding #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ScriptValidity → Size #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ScriptValidity] → Size #

Eq ScriptValidity Source # 
Instance details

Defined in Cardano.Api.TxBody

Signing in one go

data ShelleySigningKey Source #

We support making key witnesses with both normal and extended signing keys.

Constructors

ShelleyNormalSigningKey (SignKeyDSIGN StandardCrypto)

A normal ed25519 signing key

ShelleyExtendedSigningKey XPrv

An extended ed25519 signing key

Incremental signing and separate witnesses

makeSignedTransaction ∷ ∀ era. [KeyWitness era] → TxBody era → Tx era Source #

data KeyWitness era where Source #

Constructors

ByronKeyWitness ∷ TxInWitness → KeyWitness ByronEra 
ShelleyBootstrapWitnessShelleyBasedEra era → BootstrapWitness StandardCrypto → KeyWitness era 
ShelleyKeyWitnessShelleyBasedEra era → WitVKey Witness StandardCrypto → KeyWitness era 

Instances

Instances details
Show (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

Methods

showsPrecIntKeyWitness era → ShowS Source #

showKeyWitness era → String Source #

showList ∷ [KeyWitness era] → ShowS Source #

HasTypeProxy era ⇒ HasTypeProxy (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

Associated Types

data AsType (KeyWitness era) Source #

IsCardanoEra era ⇒ SerialiseAsCBOR (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

IsCardanoEra era ⇒ HasTextEnvelope (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

Eq (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

Methods

(==)KeyWitness era → KeyWitness era → Bool Source #

(/=)KeyWitness era → KeyWitness era → Bool Source #

data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

data WitnessNetworkIdOrByronAddress Source #

Either a network ID or a Byron address to be used in constructing a Shelley bootstrap witness.

Constructors

WitnessNetworkId !NetworkId

Network ID.

If this value is used in the construction of a Shelley bootstrap witness, the result will not consist of a derivation path. If that is required, specify a WitnessByronAddress value instead.

WitnessByronAddress !(Address ByronAddr)

Byron address.

If this value is used in the construction of a Shelley bootstrap witness, both the network ID and derivation path will be extracted from the address and used in the construction of the witness.

makeShelleySignature ∷ SignableRepresentation tosign ⇒ tosign → ShelleySigningKey → SignedDSIGN StandardCrypto tosign Source #

Data family instances

data family AsType t Source #

A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.

Values of this type are passed to deserialisation functions for example.

Instances

Instances details
data AsType AddressAny Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ByronAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType ShelleyAddr Source # 
Instance details

Defined in Cardano.Api.Address

data AsType StakeAddress Source # 
Instance details

Defined in Cardano.Api.Address

data AsType BlockHeader Source # 
Instance details

Defined in Cardano.Api.Block

data AsType Certificate Source # 
Instance details

Defined in Cardano.Api.Certificate

data AsType AllegraEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType AlonzoEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType BabbageEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ByronEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ConwayEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType MaryEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ShelleyEra Source # 
Instance details

Defined in Cardano.Api.Eras

data AsType ByronKey Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType ByronKeyLegacy Source # 
Instance details

Defined in Cardano.Api.Keys.Byron

data AsType KesKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType VrfKey Source # 
Instance details

Defined in Cardano.Api.Keys.Praos

data AsType GenesisDelegateExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisDelegateKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType GenesisUTxOKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType PaymentKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeExtendedKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakeKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType StakePoolKey Source # 
Instance details

Defined in Cardano.Api.Keys.Shelley

data AsType OperationalCertificate Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificateIssueCounter Source # 
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType PraosNonce Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType UpdateProposal Source # 
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType PlutusScriptV1 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType PlutusScriptV2 Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptHash Source # 
Instance details

Defined in Cardano.Api.Script

data AsType ScriptInAnyLang Source # 
Instance details

Defined in Cardano.Api.Script

data AsType SimpleScript' Source # 
Instance details

Defined in Cardano.Api.Script

data AsType HashableScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType ScriptData Source # 
Instance details

Defined in Cardano.Api.ScriptData

data AsType TextEnvelope Source # 
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

data AsType ByronUpdateProposal Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType ByronVote Source # 
Instance details

Defined in Cardano.Api.SpecialByron

data AsType StakePoolMetadata Source # 
Instance details

Defined in Cardano.Api.StakePoolMetadata

data AsType TxId Source # 
Instance details

Defined in Cardano.Api.TxIn

data AsType TxMetadata Source # 
Instance details

Defined in Cardano.Api.TxMetadata

data AsType AssetName Source # 
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId Source # 
Instance details

Defined in Cardano.Api.Value

data AsType (Address addrtype) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Address addrtype) = AsAddress (AsType addrtype)
data AsType (AddressInEra era) Source # 
Instance details

Defined in Cardano.Api.Address

data AsType (Hash a) Source # 
Instance details

Defined in Cardano.Api.Hash

data AsType (Hash a) = AsHash (AsType a)
data AsType (SigningKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (VerificationKey a) Source # 
Instance details

Defined in Cardano.Api.Keys.Class

data AsType (PlutusScript lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (Script lang) = AsScript (AsType lang)
data AsType (ScriptInEra era) Source # 
Instance details

Defined in Cardano.Api.Script

data AsType (KeyWitness era) Source # 
Instance details

Defined in Cardano.Api.Tx

data AsType (Tx era) Source # 
Instance details

Defined in Cardano.Api.Tx

data AsType (Tx era) = AsTx (AsType era)
data AsType (TxBody era) Source # 
Instance details

Defined in Cardano.Api.TxBody

data AsType (TxBody era) = AsTxBody (AsType era)