cardano-api-1.35.4
Safe Haskell None
Language Haskell2010

Cardano.Api

Contents

Description

This module provides a library interface for interacting with Cardano as a user of the system.

It is intended to be the complete API covering everything but without exposing constructors that reveal any lower level types.

In the interest of simplicity it glosses over some details of the system. Most simple tools should be able to work just using this interface, however you can go deeper and expose the types from the underlying libraries using Cardano.Api.Byron or Cardano.Api.Shelley .

Synopsis

Eras

data CardanoEra era where Source #

This GADT provides a value-level representation of all the Cardano eras. This enables pattern matching on the era to allow them to be treated in a non-uniform way.

This can be used in combination with the IsCardanoEra class to get access to this value.

In combination this can often enable code that handles all eras, and does so uniformly where possible, and non-uniformly where necessary.

data AnyCardanoEra where Source #

Instances

Instances details
Bounded AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

Enum AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

Eq AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

Show AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

ToJSON AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

FromJSON AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

anyCardanoEra :: CardanoEra era -> AnyCardanoEra Source #

Like the AnyCardanoEra constructor but does not demand a IsCardanoEra class constraint.

data InAnyCardanoEra thing where Source #

This pairs up some era-dependent type with a CardanoEra value that tells us what era it is, but hides the era type. This is useful when the era is not statically known, for example when deserialising from a file.

Constructors

InAnyCardanoEra :: IsCardanoEra era => CardanoEra era -> thing era -> InAnyCardanoEra thing

Shelley-based eras

data ShelleyBasedEra era where Source #

While the Byron and Shelley eras are quite different, there are several eras that are based on Shelley with only minor differences. It is useful to be able to treat the Shelley-based eras in a mostly-uniform way.

Values of this type witness the fact that the era is Shelley-based. This can be used to constrain the era to being a Shelley-based on. It allows non-uniform handling making case distinctions on the constructor.

data InAnyShelleyBasedEra thing where Source #

This pairs up some era-dependent type with a ShelleyBasedEra value that tells us what era it is, but hides the era type. This is useful when the era is not statically known, for example when deserialising from a file.

data CardanoEraStyle era where Source #

This is the same essential information as CardanoEra but instead of a flat set of alternative eras, it is factored into the legcy Byron era and the current Shelley-based eras.

This way of factoring the eras is useful because in many cases the major differences are between the Byron and Shelley-based eras, and the Shelley-based eras can often be treated uniformly.

Deprecated

type Byron = ByronEra Source #

Deprecated: Use ByronEra or ByronAddr as appropriate

type Shelley = ShelleyEra Source #

Deprecated: Use ShelleyEra or ShelleyAddr as appropriate

type Mary = MaryEra Source #

Deprecated: Use MaryEra instead

Type tags

class HasTypeProxy t where Source #

Associated Types

data 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
HasTypeProxy BabbageEra Source #
Instance details

Defined in Cardano.Api.Eras

HasTypeProxy AlonzoEra Source #
Instance details

Defined in Cardano.Api.Eras

HasTypeProxy MaryEra Source #
Instance details

Defined in Cardano.Api.Eras

Associated Types

data AsType MaryEra Source #

HasTypeProxy AllegraEra Source #
Instance details

Defined in Cardano.Api.Eras

HasTypeProxy ShelleyEra Source #
Instance details

Defined in Cardano.Api.Eras

HasTypeProxy ByronEra Source #
Instance details

Defined in Cardano.Api.Eras

HasTypeProxy TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

HasTypeProxy TextEnvelope Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

HasTypeProxy TxId Source #
Instance details

Defined in Cardano.Api.TxIn

Associated Types

data AsType TxId Source #

HasTypeProxy StakePoolKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTypeProxy ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

HasTypeProxy ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTypeProxy ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTypeProxy ByronVote Source #
Instance details

Defined in Cardano.Api.SpecialByron

HasTypeProxy ByronUpdateProposal Source #
Instance details

Defined in Cardano.Api.SpecialByron

HasTypeProxy VrfKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

Associated Types

data AsType VrfKey Source #

HasTypeProxy KesKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

Associated Types

data AsType KesKey Source #

HasTypeProxy ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy ScriptInAnyLang Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy PlutusScriptV2 Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy PlutusScriptV1 Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy SimpleScriptV2 Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy SimpleScriptV1 Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

HasTypeProxy StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy AddressAny Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy ShelleyAddr Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy ByronAddr Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy AssetName Source #
Instance details

Defined in Cardano.Api.Value

HasTypeProxy PolicyId Source #
Instance details

Defined in Cardano.Api.Value

HasTypeProxy UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTypeProxy PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTypeProxy Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

HasTypeProxy OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTypeProxy OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTypeProxy BlockHeader Source #
Instance details

Defined in Cardano.Api.Block

HasTypeProxy a => HasTypeProxy ( Hash a) Source #
Instance details

Defined in Cardano.Api.Hash

Associated Types

data AsType ( Hash a) Source #

HasTypeProxy a => HasTypeProxy ( VerificationKey a) Source #
Instance details

Defined in Cardano.Api.Key

Associated Types

data AsType ( VerificationKey a) Source #

HasTypeProxy a => HasTypeProxy ( SigningKey a) Source #
Instance details

Defined in Cardano.Api.Key

Associated Types

data AsType ( SigningKey a) Source #

HasTypeProxy lang => HasTypeProxy ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

Associated Types

data AsType ( PlutusScript lang) Source #

HasTypeProxy lang => HasTypeProxy ( SimpleScript lang) Source #
Instance details

Defined in Cardano.Api.Script

Associated Types

data AsType ( SimpleScript lang) Source #

HasTypeProxy era => HasTypeProxy ( ScriptInEra era) Source #
Instance details

Defined in Cardano.Api.Script

Associated Types

data AsType ( ScriptInEra era) Source #

HasTypeProxy lang => HasTypeProxy ( Script lang) Source #
Instance details

Defined in Cardano.Api.Script

Associated Types

data AsType ( Script lang) Source #

HasTypeProxy era => HasTypeProxy ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

Associated Types

data AsType ( AddressInEra era) Source #

HasTypeProxy addrtype => HasTypeProxy ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

Associated Types

data AsType ( Address addrtype) Source #

HasTypeProxy era => HasTypeProxy ( TxBody era) Source #
Instance details

Defined in Cardano.Api.TxBody

Associated Types

data AsType ( TxBody era) Source #

HasTypeProxy era => HasTypeProxy ( KeyWitness era) Source #
Instance details

Defined in Cardano.Api.Tx

Associated Types

data AsType ( KeyWitness era) Source #

HasTypeProxy era => HasTypeProxy ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

Associated Types

data AsType ( Tx era) Source #

Cryptographic key interface

class ( Eq ( VerificationKey keyrole), Show ( VerificationKey keyrole), SerialiseAsRawBytes ( Hash keyrole), HasTextEnvelope ( VerificationKey keyrole), HasTextEnvelope ( SigningKey keyrole)) => Key keyrole where Source #

An interface for cryptographic keys used for signatures with a SigningKey and a VerificationKey key.

This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.

Associated Types

data VerificationKey keyrole :: Type Source #

The type of cryptographic verification key, for each key role.

data SigningKey keyrole :: Type Source #

The type of cryptographic signing key, for each key role.

Methods

getVerificationKey :: SigningKey keyrole -> VerificationKey keyrole Source #

Get the corresponding verification key from a signing key.

deterministicSigningKey :: AsType keyrole -> Seed -> SigningKey keyrole Source #

Generate a SigningKey deterministically, given a Seed . The required size of the seed is given by deterministicSigningKeySeedSize .

deterministicSigningKeySeedSize :: AsType keyrole -> Word Source #

verificationKeyHash :: VerificationKey keyrole -> Hash keyrole Source #

Instances

Instances details
Key StakePoolKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

Key ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

Key VrfKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

Key KesKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

castVerificationKey :: CastVerificationKeyRole keyroleA keyroleB => VerificationKey keyroleA -> VerificationKey keyroleB Source #

Change the role of a VerificationKey , if the representation permits.

castSigningKey :: CastSigningKeyRole keyroleA keyroleB => SigningKey keyroleA -> SigningKey keyroleB Source #

Change the role of a SigningKey , if the representation permits.

generateSigningKey :: Key keyrole => AsType keyrole -> IO ( SigningKey keyrole) Source #

Generate a SigningKey using a seed from operating system entropy.

Hashes

In Cardano most keys are identified by their hash, and hashes are used in many other places.

data family Hash keyrole :: Type Source #

Instances

Instances details
Eq ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

Eq ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Eq ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Eq ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Eq ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

Ord ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

Ord ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Ord ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Ord ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Ord ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Ord ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

Show ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

Show ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Show ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Show ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Show ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

IsString ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

IsString ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

IsString ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

IsString ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

ToJSON ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

ToJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

ToJSONKey ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToJSONKey ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

FromJSON ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

FromJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

FromJSONKey ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

ToCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

ToCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

HasTypeProxy a => HasTypeProxy ( Hash a) Source #
Instance details

Defined in Cardano.Api.Hash

Associated Types

data AsType ( Hash a) Source #

SerialiseAsCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

SerialiseAsRawBytes ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

SerialiseAsRawBytes ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

SerialiseAsBech32 ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash StakePoolKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

newtype Hash ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype Hash ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype Hash VrfKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

newtype Hash KesKey Source #
Instance details

Defined in Cardano.Api.KeysPraos

newtype Hash StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

newtype Hash BlockHeader Source #

For now at least we use a fixed concrete hash type for all modes and era. The different eras do use different types, but it's all the same underlying representation.

Instance details

Defined in Cardano.Api.Block

data AsType ( Hash a) Source #
Instance details

Defined in Cardano.Api.Hash

castHash :: CastHash roleA roleB => Hash roleA -> Hash roleB Source #

Payment addresses

Constructing and inspecting normal payment addresses

data Address addrtype Source #

Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.

There are currently two types of address:

  • Byron addresses, which use the type tag ByronAddr ; and
  • Shelley addresses, which use the type tag ShelleyAddr . Notably, Shelley addresses support scripts and stake delegation.

The address type is subtly from the ledger era in which each address type is valid: while Byron addresses are the only choice in the Byron era, the Shelley era and all subsequent eras support both Byron and Shelley addresses. The Address type param only says the type of the address (either Byron or Shelley). The AddressInEra type connects the address type with the era in which it is supported.

Instances

Instances details
Eq ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

Ord ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

Show ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy addrtype => HasTypeProxy ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

Associated Types

data AsType ( Address addrtype) Source #

SerialiseAsRawBytes ( Address ShelleyAddr ) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes ( Address ByronAddr ) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsBech32 ( Address ShelleyAddr ) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAddress ( Address ShelleyAddr ) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAddress ( Address ByronAddr ) Source #
Instance details

Defined in Cardano.Api.Address

data AsType ( Address addrtype) Source #
Instance details

Defined in Cardano.Api.Address

data AsType ( Address addrtype) = AsAddress ( AsType addrtype)

Byron addresses

data ByronKey Source #

Byron-era payment keys. Used for Byron addresses and witnessing transactions that spend from these addresses.

These use Ed25519 but with a 32byte "chaincode" used in HD derivation. The inclusion of the chaincode is a design mistake but one that cannot be corrected for the Byron era. The Shelley era PaymentKey s do not include a chaincode. It is safe to use a zero or random chaincode for new Byron keys.

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

Key ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Ord ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

data AsType ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype Hash ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype VerificationKey ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype SigningKey ByronKey Source #
Instance details

Defined in Cardano.Api.KeysByron

data ByronKeyLegacy Source #

Instances

Instances details
HasTypeProxy ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

Key ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Eq ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Ord ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

Show ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

IsString ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

data AsType ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype Hash ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype VerificationKey ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

newtype SigningKey ByronKeyLegacy Source #
Instance details

Defined in Cardano.Api.KeysByron

Shelley addresses

data PaymentKey Source #

Shelley-era payment keys. Used for Shelley payment addresses and witnessing transactions that spend from these addresses.

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey PaymentKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data PaymentExtendedKey Source #

Shelley-era payment keys using extended ed25519 cryptographic keys.

They can be used for Shelley payment addresses and witnessing transactions that spend from these addresses.

These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.

The extended verification keys can be converted (via castVerificationKey ) to ordinary keys (i.e. VerificationKey PaymentKey ) but this is not the case for the signing keys. The signing keys can be used to witness transactions directly, with verification via their non-extended verification key ( VerificationKey PaymentKey ).

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey PaymentExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Addresses in any era

data AddressAny Source #

Either a Byron address or a Shelley address.

Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.

Instances

Instances details
Eq AddressAny Source #
Instance details

Defined in Cardano.Api.Address

Ord AddressAny Source #
Instance details

Defined in Cardano.Api.Address

Show AddressAny Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy AddressAny Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes AddressAny Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAddress AddressAny Source #
Instance details

Defined in Cardano.Api.Address

data AsType AddressAny Source #
Instance details

Defined in Cardano.Api.Address

Addresses in specific eras

data AddressInEra era where Source #

An Address that can be used in a particular ledger era.

All current ledger eras support Byron addresses. Shelley addresses are supported in the ShelleyEra and later eras.

Constructors

AddressInEra :: AddressTypeInEra addrtype era -> Address addrtype -> AddressInEra era

Instances

Instances details
EraCast AddressInEra Source #
Instance details

Defined in Cardano.Api.Address

Eq ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

Show ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

IsCardanoEra era => ToJSON ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

IsShelleyBasedEra era => FromJSON ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy era => HasTypeProxy ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

Associated Types

data AsType ( AddressInEra era) Source #

IsCardanoEra era => SerialiseAsRawBytes ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

IsCardanoEra era => SerialiseAddress ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

data AsType ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

isKeyAddress :: AddressInEra era -> Bool Source #

Is the UTxO at the address only spendable via a key witness.

Stake addresses

Constructing and inspecting stake addresses

data StakeAddress Source #

Instances

Instances details
Eq StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

Ord StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

Show StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

ToJSON StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

FromJSON StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

HasTypeProxy StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsBech32 StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAddress StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

data AsType StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

data StakeKey Source #

Instances

Instances details
HasTypeProxy StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey StakeKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data StakeExtendedKey Source #

Shelley-era stake keys using extended ed25519 cryptographic keys.

They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.

These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.

The extended verification keys can be converted (via castVerificationKey ) to ordinary keys (i.e. VerificationKey StakeKey ) but this is not the case for the signing keys. The signing keys can be used to witness transactions directly, with verification via their non-extended verification key ( VerificationKey StakeKey ).

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey StakeExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Currency values

Ada / Lovelace

newtype Lovelace Source #

Instances

Instances details
Enum Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Eq Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Integral Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Num Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Ord Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Real Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Show Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Semigroup Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Monoid Lovelace Source #
Instance details

Defined in Cardano.Api.Value

ToJSON Lovelace Source #
Instance details

Defined in Cardano.Api.Value

FromJSON Lovelace Source #
Instance details

Defined in Cardano.Api.Value

ToCBOR Lovelace Source #
Instance details

Defined in Cardano.Api.Value

FromCBOR Lovelace Source #
Instance details

Defined in Cardano.Api.Value

Multi-asset values

newtype Quantity Source #

Instances

Instances details
Eq Quantity Source #
Instance details

Defined in Cardano.Api.Value

Num Quantity Source #
Instance details

Defined in Cardano.Api.Value

Ord Quantity Source #
Instance details

Defined in Cardano.Api.Value

Show Quantity Source #
Instance details

Defined in Cardano.Api.Value

Semigroup Quantity Source #
Instance details

Defined in Cardano.Api.Value

Monoid Quantity Source #
Instance details

Defined in Cardano.Api.Value

ToJSON Quantity Source #
Instance details

Defined in Cardano.Api.Value

FromJSON Quantity Source #
Instance details

Defined in Cardano.Api.Value

newtype PolicyId Source #

Instances

Instances details
Eq PolicyId Source #
Instance details

Defined in Cardano.Api.Value

Ord PolicyId Source #
Instance details

Defined in Cardano.Api.Value

Show PolicyId Source #
Instance details

Defined in Cardano.Api.Value

IsString PolicyId Source #
Instance details

Defined in Cardano.Api.Value

ToJSON PolicyId Source #
Instance details

Defined in Cardano.Api.Value

FromJSON PolicyId Source #
Instance details

Defined in Cardano.Api.Value

HasTypeProxy PolicyId Source #
Instance details

Defined in Cardano.Api.Value

SerialiseAsRawBytes PolicyId Source #
Instance details

Defined in Cardano.Api.Value

data AsType PolicyId Source #
Instance details

Defined in Cardano.Api.Value

newtype AssetName Source #

Instances

Instances details
Eq AssetName Source #
Instance details

Defined in Cardano.Api.Value

Ord AssetName Source #
Instance details

Defined in Cardano.Api.Value

Show AssetName Source #
Instance details

Defined in Cardano.Api.Value

IsString AssetName Source #
Instance details

Defined in Cardano.Api.Value

ToJSON AssetName Source #
Instance details

Defined in Cardano.Api.Value

ToJSONKey AssetName Source #
Instance details

Defined in Cardano.Api.Value

FromJSON AssetName Source #
Instance details

Defined in Cardano.Api.Value

FromJSONKey AssetName Source #
Instance details

Defined in Cardano.Api.Value

HasTypeProxy AssetName Source #
Instance details

Defined in Cardano.Api.Value

SerialiseAsRawBytes AssetName Source #
Instance details

Defined in Cardano.Api.Value

data AsType AssetName Source #
Instance details

Defined in Cardano.Api.Value

parseValue :: Parser Value Source #

Parse a Value from its string representation.

negateValue :: Value -> Value Source #

This lets you write a - b as a <> negateValue b .

newtype ValueNestedRep Source #

An alternative nested representation for Value that groups assets that share a PolicyId .

renderValue :: Value -> Text Source #

Render a textual representation of a Value .

renderValuePretty :: Value -> Text Source #

Render a "prettified" textual representation of a Value .

Ada / Lovelace within multi-asset values

valueToLovelace :: Value -> Maybe Lovelace Source #

Check if the Value consists of only Lovelace and no other assets, and if so then return the Lovelace.

See also selectLovelace to select the Lovelace quantity from the Value, ignoring other assets.

Blocks

Blocks in the context of an era

data Block era where Source #

A blockchain block in a particular Cardano era.

Bundled Patterns

pattern Block :: BlockHeader -> [ Tx era] -> Block era

A block consists of a header and a body containing transactions.

data BlockHeader Source #

Instances

Instances details
HasTypeProxy BlockHeader Source #
Instance details

Defined in Cardano.Api.Block

Eq ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

Ord ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

Show ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

IsString ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

ToJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

FromJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

SerialiseAsRawBytes ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

data AsType BlockHeader Source #
Instance details

Defined in Cardano.Api.Block

newtype Hash BlockHeader Source #

For now at least we use a fixed concrete hash type for all modes and era. The different eras do use different types, but it's all the same underlying representation.

Instance details

Defined in Cardano.Api.Block

Points on the chain

newtype EpochNo Source #

An epoch, i.e. the number of the epoch.

Constructors

EpochNo

Instances

Instances details
Enum EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Num EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Show EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo
Instance details

Defined in Cardano.Slotting.Slot

NFData EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Serialise EpochNo
Instance details

Defined in Cardano.Slotting.Slot

Condense EpochNo
Instance details

Defined in Ouroboros.Consensus.Util.Condense

type Rep EpochNo
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 (' MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "EpochNo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unEpochNo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

Tip of the chain

newtype BlockNo Source #

The 0-based index of the block in the blockchain. BlockNo is <= SlotNo and is only equal at slot N if there is a block for every slot where N <= SlotNo.

Constructors

BlockNo

Instances

Instances details
Bounded BlockNo
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo
Instance details

Defined in Cardano.Slotting.Block

Eq BlockNo
Instance details

Defined in Cardano.Slotting.Block

Num BlockNo
Instance details

Defined in Cardano.Slotting.Block

Ord BlockNo
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo
Instance details

Defined in Cardano.Slotting.Block

NFData BlockNo
Instance details

Defined in Cardano.Slotting.Block

ToCBOR BlockNo
Instance details

Defined in Cardano.Slotting.Block

FromCBOR BlockNo
Instance details

Defined in Cardano.Slotting.Block

NoThunks BlockNo
Instance details

Defined in Cardano.Slotting.Block

Serialise BlockNo
Instance details

Defined in Cardano.Slotting.Block

Condense BlockNo
Instance details

Defined in Ouroboros.Consensus.Util.Condense

type Rep BlockNo
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo = D1 (' MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "BlockNo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unBlockNo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

Building transactions

Building transactions

Constructing and inspecting transactions

Transaction bodies

Transaction Ids

newtype TxId Source #

Instances

Instances details
Eq TxId Source #
Instance details

Defined in Cardano.Api.TxIn

Ord TxId Source #
Instance details

Defined in Cardano.Api.TxIn

Show TxId Source #
Instance details

Defined in Cardano.Api.TxIn

IsString TxId Source #
Instance details

Defined in Cardano.Api.TxIn

ToJSON TxId Source #
Instance details

Defined in Cardano.Api.TxIn

ToJSONKey TxId Source #
Instance details

Defined in Cardano.Api.TxIn

FromJSON TxId Source #
Instance details

Defined in Cardano.Api.TxIn

FromJSONKey TxId Source #
Instance details

Defined in Cardano.Api.TxIn

HasTypeProxy TxId Source #
Instance details

Defined in Cardano.Api.TxIn

Associated Types

data AsType TxId Source #

SerialiseAsRawBytes TxId Source #
Instance details

Defined in Cardano.Api.TxIn

data AsType TxId Source #
Instance details

Defined in Cardano.Api.TxIn

getTxId :: forall era. TxBody era -> TxId Source #

Calculate the transaction identifier for a TxBody .

Transaction inputs

data TxIn Source #

newtype TxIx Source #

Constructors

TxIx Word

Transaction outputs

data TxOut ctx era Source #

Instances

Instances details
EraCast ( TxOut ctx) Source #
Instance details

Defined in Cardano.Api.TxBody

Eq ( TxOut ctx era) Source #
Instance details

Defined in Cardano.Api.TxBody

Show ( TxOut ctx era) Source #
Instance details

Defined in Cardano.Api.TxBody

IsCardanoEra era => ToJSON ( TxOut ctx era) Source #
Instance details

Defined in Cardano.Api.TxBody

( IsShelleyBasedEra era, IsCardanoEra era) => FromJSON ( TxOut CtxUTxO era) Source #
Instance details

Defined in Cardano.Api.TxBody

( IsShelleyBasedEra era, IsCardanoEra era) => FromJSON ( TxOut CtxTx era) Source #
Instance details

Defined in Cardano.Api.TxBody

data TxOutValue era where Source #

Instances

Instances details
EraCast TxOutValue Source #
Instance details

Defined in Cardano.Api.TxBody

Eq ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

Show ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

Generic ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

Associated Types

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

ToJSON ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

IsCardanoEra era => FromJSON ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

type Rep ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

data TxOutDatum ctx era where Source #

Constructors

TxOutDatumNone :: TxOutDatum ctx era
TxOutDatumHash :: ScriptDataSupportedInEra era -> Hash ScriptData -> TxOutDatum ctx era

A transaction output that only specifies the hash of the datum, but not the full datum value.

TxOutDatumInline :: ReferenceTxInsScriptsInlineDatumsSupportedInEra era -> ScriptData -> TxOutDatum ctx era

A transaction output that specifies the whole datum instead of the datum hash. Note that the datum map will not be updated with this datum, it only exists at the transaction output.

Other transaction body types

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo

Instances

Instances details
Bounded SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Eq SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Num SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Ord SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NFData SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NoThunks SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Serialise SlotNo
Instance details

Defined in Cardano.Slotting.Slot

Condense SlotNo
Instance details

Defined in Ouroboros.Consensus.Util.Condense

HasField "ttl" ( TxBody era) SlotNo
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

HasHeader block => Anchorable ( WithOrigin SlotNo ) ( Anchor block) block
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Anchorable ( WithOrigin SlotNo ) ( HeaderState blk) ( HeaderState blk)

Used by HeaderStateHistory but defined here, where it is not an orphan.

Instance details

Defined in Ouroboros.Consensus.HeaderValidation

GetTip l => Anchorable ( WithOrigin SlotNo ) (Checkpoint l) (Checkpoint l)
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

Methods

asAnchor :: Checkpoint l -> Checkpoint l Source #

getAnchorMeasure :: Proxy (Checkpoint l) -> Checkpoint l -> WithOrigin SlotNo Source #

HasExp ( StakeCreds era) ( Map ( Credential ' Staking era) SlotNo )
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Embed ( StakeCreds era) ( Map ( Credential ' Staking era) SlotNo )
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

type Rep SlotNo
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 (' MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "SlotNo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unSlotNo") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

newtype EpochSlots Source #

The number of slots per epoch.

Instances

Instances details
Eq EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Data EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> EpochSlots -> c EpochSlots Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c EpochSlots Source #

toConstr :: EpochSlots -> Constr Source #

dataTypeOf :: EpochSlots -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c EpochSlots ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c EpochSlots ) Source #

gmapT :: ( forall b. Data b => b -> b) -> EpochSlots -> EpochSlots Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> EpochSlots -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> EpochSlots -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> EpochSlots -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> EpochSlots -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

Ord EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Read EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Show EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Generic EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

ToCBOR EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

FromCBOR EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Buildable EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

NoThunks EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

type Rep EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

type Rep EpochSlots = D1 (' MetaData "EpochSlots" "Cardano.Chain.Slotting.EpochSlots" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" ' True ) ( C1 (' MetaCons "EpochSlots" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "unEpochSlots") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Word64 )))

Building vs viewing transactions

Era-dependent transaction body features

data MultiAssetSupportedInEra era where Source #

A representation of whether the era supports multi-asset transactions.

The Mary and subsequent eras support multi-asset transactions.

The negation of this is OnlyAdaSupportedInEra .

Constructors

MultiAssetInMaryEra :: MultiAssetSupportedInEra MaryEra

Multi-asset transactions are supported in the Mary era.

MultiAssetInAlonzoEra :: MultiAssetSupportedInEra AlonzoEra

Multi-asset transactions are supported in the Alonzo era.

MultiAssetInBabbageEra :: MultiAssetSupportedInEra BabbageEra

Multi-asset transactions are supported in the Babbage era.

data OnlyAdaSupportedInEra era where Source #

A representation of whether the era supports only ada transactions.

Prior to the Mary era only ada transactions are supported. Multi-assets are supported from the Mary era onwards.

This is the negation of MultiAssetSupportedInEra . It exists since we need evidence to be positive.

data ValidityNoUpperBoundSupportedInEra era where Source #

A representation of whether the era supports transactions having no upper bound on the range of slots in which they are valid.

Note that the ShelleyEra does not support omitting a validity upper bound. It was introduced as a required field in Shelley and then made optional in Allegra and subsequent eras.

The Byron era supports this by virtue of the fact that it does not support validity ranges at all.

Feature availability functions

totalAndReturnCollateralSupportedInEra :: CardanoEra era -> Maybe (TxTotalAndReturnCollateralSupportedInEra era) Source #

Fee calculation

transactionFee Source #

Arguments

:: forall era. IsShelleyBasedEra era
=> Natural

The fixed tx fee

-> Natural

The tx fee per byte

-> Tx era
-> Lovelace

Deprecated: Use evaluateTransactionFee instead

For a concrete fully-constructed transaction, determine the minimum fee that it needs to pay.

This function is simple, but if you are doing input selection then you probably want to consider estimateTransactionFee.

estimateTransactionFee Source #

Arguments

:: forall era. IsShelleyBasedEra era
=> NetworkId
-> Natural

The fixed tx fee

-> Natural

The tx fee per byte

-> Tx era
-> Int

The number of extra UTxO transaction inputs

-> Int

The number of extra transaction outputs

-> Int

The number of extra Shelley key witnesses

-> Int

The number of extra Byron key witnesses

-> Lovelace

This can estimate what the transaction fee will be, based on a starting base transaction, plus the numbers of the additional components of the transaction that may be added.

So for example with wallet coin selection, the base transaction should contain all the things not subject to coin selection (such as script inputs, metadata, withdrawals, certs etc)

evaluateTransactionFee Source #

Arguments

:: forall era. IsShelleyBasedEra era
=> ProtocolParameters
-> TxBody era
-> Word

The number of Shelley key witnesses

-> Word

The number of Byron key witnesses

-> Lovelace

Compute the transaction fee for a proposed transaction, with the assumption that there will be the given number of key witnesses (i.e. signatures).

TODO: we need separate args for Shelley vs Byron key sigs

estimateTransactionKeyWitnessCount :: TxBodyContent BuildTx era -> Word Source #

Give an approximate count of the number of key witnesses (i.e. signatures) a transaction will need.

This is an estimate not a precise count in that it can over-estimate: it makes conservative assumptions such as all inputs are from distinct addresses, but in principle multiple inputs can use the same address and we only need a witness per address.

Similarly there can be overlap between the regular and collateral inputs, but we conservatively assume they are distinct.

TODO: it is worth us considering a more precise count that relies on the UTxO to resolve which inputs are for distinct addresses, and also to count the number of Shelley vs Byron style witnesses.

Minimum required UTxO calculation

Script execution units

evaluateTransactionExecutionUnits :: forall era mode. EraInMode era mode -> SystemStart -> EraHistory mode -> ProtocolParameters -> UTxO era -> TxBody era -> Either TransactionValidityError ( Map ScriptWitnessIndex ( Either ScriptExecutionError ExecutionUnits )) Source #

Compute the ExecutionUnits needed for each script in the transaction.

This works by running all the scripts and counting how many execution units are actually used.

data ScriptExecutionError Source #

The different possible reasons that executing a script can fail, as reported by evaluateTransactionExecutionUnits .

The first three of these are about failures before we even get to execute the script, and two are the result of execution.

Constructors

ScriptErrorMissingTxIn TxIn

The script depends on a TxIn that has not been provided in the given UTxO subset. The given UTxO must cover all the inputs the transaction references.

ScriptErrorTxInWithoutDatum TxIn

The TxIn the script is spending does not have a ScriptDatum . All inputs guarded by Plutus scripts need to have been created with a ScriptDatum .

ScriptErrorWrongDatum ( Hash ScriptData )

The ScriptDatum provided does not match the one from the UTxO . This means the wrong ScriptDatum value has been provided.

ScriptErrorEvaluationFailed EvaluationError [ Text ]

The script evaluation failed. This usually means it evaluated to an error value. This is not a case of running out of execution units (which is not possible for evaluateTransactionExecutionUnits since the whole point of it is to discover how many execution units are needed).

ScriptErrorExecutionUnitsOverflow

The execution units overflowed a 64bit word. Congratulations if you encounter this error. With the current style of cost model this would need a script to run for over 7 months, which is somewhat more than the expected maximum of a few milliseconds.

ScriptErrorNotPlutusWitnessedTxIn ScriptWitnessIndex ScriptHash

An attempt was made to spend a key witnessed tx input with a script witness.

ScriptErrorRedeemerPointsToUnknownScriptHash ScriptWitnessIndex

The redeemer pointer points to a script hash that does not exist in the transaction nor in the UTxO as a reference script"

ScriptErrorMissingScript RdmrPtr ResolvablePointers

A redeemer pointer points to a script that does not exist.

ScriptErrorMissingCostModel Language

A cost model was missing for a language which was used.

data TransactionValidityError Source #

Constructors

TransactionValidityIntervalError PastHorizonException

The transaction validity interval is too far into the future.

Transactions with Plutus scripts need to have a validity interval that is not so far in the future that we cannot reliably determine the UTC time corresponding to the validity interval expressed in slot numbers.

This is because the Plutus scripts get given the transaction validity interval in UTC time, so that they are not sensitive to slot lengths.

If either end of the validity interval is beyond the so called "time horizon" then the consensus algorithm is not able to reliably determine the relationship between slots and time. This is this situation in which this error is reported. For the Cardano mainnet the time horizon is 36 hours beyond the current time. This effectively means we cannot submit check or submit transactions that use Plutus scripts that have the end of their validity interval more than 36 hours into the future.

TransactionValidityTranslationError ( TranslationError StandardCrypto )
TransactionValidityCostModelError ( Map AnyPlutusScriptVersion CostModel ) String

Transaction balance

evaluateTransactionBalance :: forall era. IsShelleyBasedEra era => ProtocolParameters -> Set PoolId -> UTxO era -> TxBody era -> TxOutValue era Source #

Compute the total balance of the proposed transaction. Ultimately a valid transaction must be fully balanced: that is have a total value of zero.

Finding the (non-zero) balance of partially constructed transaction is useful for adjusting a transaction to be fully balanced.

Building transactions with automated fees and balancing

makeTransactionBodyAutoBalance Source #

Arguments

:: forall era mode. IsShelleyBasedEra era
=> EraInMode era mode
-> SystemStart
-> EraHistory mode
-> ProtocolParameters
-> Set PoolId

The set of registered stake pools

-> UTxO era

Just the transaction inputs, not the entire UTxO .

-> TxBodyContent BuildTx era
-> AddressInEra era

Change address

-> Maybe Word

Override key witnesses

-> Either TxBodyErrorAutoBalance ( BalancedTxBody era)

This is much like makeTransactionBody but with greater automation to calculate suitable values for several things.

In particular:

  • It calculates the correct script ExecutionUnits (ignoring the provided values, which can thus be zero).
  • It calculates the transaction fees, based on the script ExecutionUnits , the current ProtocolParameters , and an estimate of the number of key witnesses (i.e. signatures). There is an override for the number of key witnesses.
  • It accepts a change address, calculates the balance of the transaction and puts the excess change into the change output.
  • It also checks that the balance is positive and the change is above the minimum threshold.

To do this it needs more information than makeTransactionBody , all of which can be queried from a local node.

data BalancedTxBody era Source #

Constructors

BalancedTxBody

Fields

data TxBodyErrorAutoBalance Source #

The possible errors that can arise from makeTransactionBodyAutoBalance .

Constructors

TxBodyError TxBodyError

The same errors that can arise from makeTransactionBody .

TxBodyScriptExecutionError [( ScriptWitnessIndex , ScriptExecutionError )]

One or more of the scripts fails to execute correctly.

TxBodyScriptBadScriptValidity

One or more of the scripts were expected to fail validation, but none did.

TxBodyErrorAssetBalanceWrong Value

The balance of the non-ada assets is not zero. The Value here is that residual non-zero balance. The makeTransactionBodyAutoBalance function only automatically balances ada, not other assets.

TxBodyErrorAdaBalanceNegative Lovelace

There is not enough ada to cover both the outputs and the fees. The transaction should be changed to provide more input ada, or otherwise adjusted to need less (e.g. outputs, script etc).

TxBodyErrorAdaBalanceTooSmall

Offending TxOut

Fields

TxBodyErrorByronEraNotSupported

makeTransactionBodyAutoBalance does not yet support the Byron era.

TxBodyErrorMissingParamMinUTxO

The ProtocolParameters must provide the value for the min utxo parameter, for eras that use this parameter.

TxBodyErrorValidityInterval TransactionValidityError

The transaction validity interval is too far into the future. See TransactionValidityIntervalError for details.

TxBodyErrorMinUTxONotMet

Offending TxOut

Fields

TxBodyErrorMinUTxOMissingPParams MinimumUTxOError
TxBodyErrorNonAdaAssetsUnbalanced Value
TxBodyErrorScriptWitnessIndexMissingFromExecUnitsMap ScriptWitnessIndex ( Map ScriptWitnessIndex ExecutionUnits )

data TxScriptValidity era where Source #

A representation of whether the era supports tx script validity.

The Mary and subsequent eras support script validity.

Constructors

TxScriptValidityNone :: TxScriptValidity era
TxScriptValidity :: TxScriptValiditySupportedInEra era -> ScriptValidity -> TxScriptValidity era

Tx script validity is supported in transactions in the Alonzo era onwards.

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.

Signing transactions

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

data Tx era where Source #

Bundled Patterns

pattern Tx :: TxBody era -> [ KeyWitness era] -> Tx era

Instances

Instances details
Eq ( InAnyCardanoEra Tx ) Source #
Instance details

Defined in Cardano.Api.Tx

Eq ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

Show ( InAnyCardanoEra Tx ) Source #
Instance details

Defined in Cardano.Api.Tx

Show ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

HasTypeProxy era => HasTypeProxy ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

Associated Types

data AsType ( Tx era) Source #

IsCardanoEra era => SerialiseAsCBOR ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

IsCardanoEra era => HasTextEnvelope ( Tx 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)

Signing in one go

Incremental signing and separate witnesses

Transaction metadata

Embedding additional structured data within transactions.

newtype TxMetadata Source #

Instances

Instances details
Eq TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

Show TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

Semigroup TxMetadata Source #

Merge metadata maps. When there are clashing entries the left hand side takes precedence.

Instance details

Defined in Cardano.Api.TxMetadata

Monoid TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

HasTypeProxy TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

SerialiseAsCBOR TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

data AsType TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

Constructing metadata

Validating metadata

validateTxMetadata :: TxMetadata -> Either [( Word64 , TxMetadataRangeError )] () Source #

Validate transaction metadata. This is for use with existing constructed metadata values, e.g. constructed manually or decoded from CBOR directly.

data TxMetadataRangeError Source #

An error in transaction metadata due to an out-of-range value.

Constructors

TxMetadataNumberOutOfRange ! Integer

The number is outside the maximum range of -2^64-1 .. 2^64-1 .

TxMetadataTextTooLong ! Int

The length of a text string metadatum value exceeds the maximum of 64 bytes as UTF8.

TxMetadataBytesTooLong ! Int

The length of a byte string metadatum value exceeds the maximum of 64 bytes.

Conversion to/from JSON

data TxMetadataJsonSchema Source #

Tx metadata is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string.

We provide two different mappings between tx metadata and JSON, useful for different purposes:

  1. A mapping that allows almost any JSON value to be converted into tx metadata. This does not require a specific JSON schema for the input. It does not expose the full representation capability of tx metadata.
  2. A mapping that exposes the full representation capability of tx metadata, but relies on a specific JSON schema for the input JSON.

In the "no schema" mapping, the idea is that (almost) any JSON can be turned into tx metadata and then converted back, without loss. That is, we can round-trip the JSON.

The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths

The approach for this mapping is to use whichever representation as tx metadata is most compact. In particular:

  • JSON lists and maps represented as CBOR lists and maps
  • JSON strings represented as CBOR strings
  • JSON hex strings with "0x" prefix represented as CBOR byte strings
  • JSON integer numbers represented as CBOR signed or unsigned numbers
  • JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.

The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).

In the "detailed schema" mapping, the idea is that we expose the full representation capability of the tx metadata in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any tx metadata can be converted into the JSON and back without loss. That is we can round-trip the tx metadata via the JSON and also round-trip schema-compliant JSON via tx metadata.

Constructors

TxMetadataJsonNoSchema

Use the "no schema" mapping between JSON and tx metadata as described above.

TxMetadataJsonDetailedSchema

Use the "detailed schema" mapping between JSON and tx metadata as described above.

metadataFromJson :: TxMetadataJsonSchema -> Value -> Either TxMetadataJsonError TxMetadata Source #

Convert a value from JSON into tx metadata, using the given choice of mapping between JSON and tx metadata.

This may fail with a conversion error if the JSON is outside the supported subset for the chosen mapping. See TxMetadataJsonSchema for the details.

metadataToJson :: TxMetadataJsonSchema -> TxMetadata -> Value Source #

Convert a tx metadata value into JSON , using the given choice of mapping between JSON and tx metadata.

This conversion is total but is not necessarily invertible. See TxMetadataJsonSchema for the details.

Certificates

data Certificate Source #

Instances

Instances details
Eq Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

Show Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

ToCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

FromCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

HasTypeProxy Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

SerialiseAsCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

HasTextEnvelope Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

data AsType Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

Registering stake address and delegating

Certificates that are embedded in transactions for registering and unregistering stake address, and for setting the stake pool delegation choice for a stake address.

Registering stake pools

Certificates that are embedded in transactions for registering and retiring stake pools. This includes updating the stake pool parameters.

Stake pool off-chain metadata

data StakePoolMetadata Source #

A representation of the required fields for off-chain stake pool metadata.

Instances

Instances details
Eq StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Show StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

FromJSON StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

HasTypeProxy StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Eq ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Show ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

SerialiseAsRawBytes ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

data AsType StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

newtype Hash StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

validateAndHashStakePoolMetadata :: ByteString -> Either StakePoolMetadataValidationError ( StakePoolMetadata , Hash StakePoolMetadata ) Source #

Decode and validate the provided JSON-encoded bytes as StakePoolMetadata . Return the decoded metadata and the hash of the original bytes.

Scripts

Both PaymentCredential s and StakeCredential s can use scripts.

Script languages

data SimpleScriptV1 Source #

The original simple script language which supports

  • require a signature from a given key (by verification key hash)
  • n-way and combinator
  • n-way or combinator
  • m-of-n combinator

This version of the language was introduced in the ShelleyEra .

data SimpleScriptV2 Source #

The second version of the simple script language. It has all the features of SimpleScriptV1 plus new atomic predicates:

  • require the time be before a given slot number
  • require the time be after a given slot number

This version of the language was introduced in the AllegraEra .

data AnyScriptLanguage where Source #

Instances

Instances details
Bounded AnyScriptLanguage Source #
Instance details

Defined in Cardano.Api.Script

Enum AnyScriptLanguage Source #
Instance details

Defined in Cardano.Api.Script

Eq AnyScriptLanguage Source #
Instance details

Defined in Cardano.Api.Script

Ord AnyScriptLanguage Source #
Instance details

Defined in Cardano.Api.Script

Show AnyScriptLanguage Source #
Instance details

Defined in Cardano.Api.Script

data AnyPlutusScriptVersion where Source #

Instances

Instances details
Bounded AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

Enum AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

Eq AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

Ord AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

Show AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

ToJSON AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

ToJSONKey AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

FromJSON AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

FromJSONKey AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

ToCBOR AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

FromCBOR AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

Scripts in a specific language

data Script lang where Source #

A script in a particular language.

See also ScriptInAnyLang for a script in any of the known languages.

See also ScriptInEra for a script in a language that is available within a particular era.

Note that some but not all scripts have an external JSON syntax, hence this type has no JSON serialisation instances. The SimpleScript family of languages do have a JSON syntax and thus have ToJSON / FromJSON instances.

Scripts in any language

data ScriptInAnyLang where Source #

Sometimes it is necessary to handle all languages without making static type distinctions between languages. For example, when reading external input, or before the era context is known.

Use toScriptInEra to convert to a script in the context of an era.

toScriptInAnyLang :: Script lang -> ScriptInAnyLang Source #

Convert a script in a specific statically-known language to a ScriptInAnyLang .

No inverse to this is provided, just do case analysis on the ScriptLanguage field within the ScriptInAnyLang constructor.

Scripts in a specific era

toScriptInEra :: CardanoEra era -> ScriptInAnyLang -> Maybe ( ScriptInEra era) Source #

Given a target era and a script in some language, check if the language is supported in that era, and if so return a ScriptInEra .

Use of a script in an era as a witness

data WitCtxTxIn Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness a transaction input.

data WitCtxMint Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness minting.

data WitCtxStake Source #

A tag type for the context in which a script is used in a transaction.

This type tags the context as being to witness the use of stake addresses in both certificates and withdrawals.

data WitCtx witctx where Source #

This GADT provides a value-level representation of all the witness contexts. This enables pattern matching on the context to allow them to be treated in a non-uniform way.

data ScriptWitness witctx era where Source #

A use of a script within a transaction body to witness that something is being used in an authorised manner. That can be

  • spending a transaction input
  • minting tokens
  • using a certificate (stake address certs specifically)
  • withdrawing from a reward account

For simple script languages, the use of the script is the same in all contexts. For Plutus scripts, using a script involves supplying a redeemer. In addition, Plutus scripts used for spending inputs must also supply the datum value used when originally creating the TxOut that is now being spent.

data Witness witctx era where Source #

Constructors

KeyWitness :: KeyWitnessInCtx witctx -> Witness witctx era
ScriptWitness :: ScriptWitnessInCtx witctx -> ScriptWitness witctx era -> Witness witctx era

Instances

Instances details
Eq ( Witness witctx era) Source #
Instance details

Defined in Cardano.Api.Script

Methods

(==) :: Witness witctx era -> Witness witctx era -> Bool Source #

(/=) :: Witness witctx era -> Witness witctx era -> Bool Source #

Show ( Witness witctx era) Source #
Instance details

Defined in Cardano.Api.Script

Inspecting ScriptWitness es

data AnyScriptWitness era where Source #

A ScriptWitness in any WitCtx . This lets us handle heterogeneous collections of script witnesses from multiple contexts.

data ScriptWitnessIndex Source #

Identify the location of a ScriptWitness within the context of a TxBody . These are indexes of the objects within the transaction that need or can use script witnesses: inputs, minted assets, withdrawals and certificates. These are simple numeric indices, enumerated from zero. Thus the indices are not stable if the transaction body is modified.

Constructors

ScriptWitnessIndexTxIn ! Word

The n'th transaction input, in the order of the TxId s.

ScriptWitnessIndexMint ! Word

The n'th minting PolicyId , in the order of the PolicyId s.

ScriptWitnessIndexCertificate ! Word

The n'th certificate, in the list order of the certificates.

ScriptWitnessIndexWithdrawal ! Word

The n'th withdrawal, in the order of the StakeAddress s.

Languages supported in each era

data ScriptLanguageInEra lang era where Source #

scriptLanguageSupportedInEra :: CardanoEra era -> ScriptLanguage lang -> Maybe ( ScriptLanguageInEra lang era) Source #

Check if a given script language is supported in a given era, and if so return the evidence.

Simple scripts

Making multi-signature and time-lock scripts.

data SimpleScript lang where Source #

data TimeLocksSupported lang where Source #

Time lock feature in the SimpleScript language.

The constructors of this type serve as evidence that the timelocks feature is supported in particular versions of the language.

adjustSimpleScriptVersion :: SimpleScriptVersion lang' -> SimpleScript lang -> Maybe ( SimpleScript lang') Source #

Try converting the SimpleScript into a different version of the language.

This will work when the script only uses the features of the target language version. For example converting from SimpleScriptV2 to SimpleScriptV1 will work if the script happens not to use time locks feature. On the other hand converting SimpleScriptV1 to SimpleScriptV2 will always work because it is backwards compatible.

Plutus scripts

data PlutusScript lang Source #

Plutus scripts.

Note that Plutus scripts have a binary serialisation but no JSON serialisation.

Instances

Instances details
Eq ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

Ord ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

Show ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

( Typeable lang, HasTypeProxy lang) => ToCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

( Typeable lang, HasTypeProxy lang) => FromCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy lang => HasTypeProxy ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

Associated Types

data AsType ( PlutusScript lang) Source #

( HasTypeProxy lang, Typeable lang) => SerialiseAsCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy lang => SerialiseAsRawBytes ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

(IsPlutusScriptLanguage lang, Typeable lang) => HasTextEnvelope ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

data AsType ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

examplePlutusScriptAlwaysSucceeds :: WitCtx witctx -> PlutusScript PlutusScriptV1 Source #

An example Plutus script that always succeeds, irrespective of inputs.

For example, if one were to use this for a payment address then it would allow anyone to spend from it.

The exact script depends on the context in which it is to be used.

examplePlutusScriptAlwaysFails :: WitCtx witctx -> PlutusScript PlutusScriptV1 Source #

An example Plutus script that always fails, irrespective of inputs.

For example, if one were to use this for a payment address then it would be impossible for anyone to ever spend from it.

The exact script depends on the context in which it is to be used.

Script data

data ScriptData Source #

Instances

Instances details
Eq ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

Ord ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

Show ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

ToCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

FromCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

HasTypeProxy ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

SerialiseAsCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

Eq ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

Ord ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

Show ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

IsString ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

ToJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

ToJSONKey ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

FromJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

FromJSONKey ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

SerialiseAsRawBytes ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

data AsType ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

newtype Hash ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

Validation

validateScriptData :: ScriptData -> Either ScriptDataRangeError () Source #

Validate script data. This is for use with existing constructed script data values, e.g. constructed manually or decoded from CBOR directly.

Conversion to/from JSON

data ScriptDataJsonSchema Source #

Script data is similar to JSON but not exactly the same. It has some deliberate limitations such as no support for floating point numbers or special forms for null or boolean values. It also has limitations on the length of strings. On the other hand, unlike JSON, it distinguishes between byte strings and text strings. It also supports any value as map keys rather than just string. It also supports alternatives / tagged unions, used for representing constructors for Plutus data values.

We provide two different mappings between script data and JSON, useful for different purposes:

  1. A mapping that allows almost any JSON value to be converted into script data. This does not require a specific JSON schema for the input. It does not expose the full representation capability of script data.
  2. A mapping that exposes the full representation capability of script data, but relies on a specific JSON schema for the input JSON.

In the "no schema" mapping, the idea is that (almost) any JSON can be turned into script data and then converted back, without loss. That is, we can round-trip the JSON.

The subset of JSON supported is all JSON except: * No null or bool values * No floating point, only integers in the range of a 64bit signed integer * A limitation on string lengths

The approach for this mapping is to use whichever representation as script data is most compact. In particular:

  • JSON lists and maps represented as CBOR lists and maps
  • JSON strings represented as CBOR strings
  • JSON hex strings with "0x" prefix represented as CBOR byte strings
  • JSON integer numbers represented as CBOR signed or unsigned numbers
  • JSON maps with string keys that parse as numbers or hex byte strings, represented as CBOR map keys that are actually numbers or byte strings.

The string length limit depends on whether the hex string representation is used or not. For text strings the limit is 64 bytes for the UTF8 representation of the text string. For byte strings the limit is 64 bytes for the raw byte form (ie not the input hex, but after hex decoding).

In the "detailed schema" mapping, the idea is that we expose the full representation capability of the script data in the form of a JSON schema. This means the full representation is available and can be controlled precisely. It also means any script data can be converted into the JSON and back without loss. That is we can round-trip the script data via the JSON and also round-trip schema-compliant JSON via script data.

Constructors

ScriptDataJsonNoSchema

Use the "no schema" mapping between JSON and script data as described above.

ScriptDataJsonDetailedSchema

Use the "detailed schema" mapping between JSON and script data as described above.

scriptDataFromJson :: ScriptDataJsonSchema -> Value -> Either ScriptDataJsonError ScriptData Source #

Convert a value from JSON into script data, using the given choice of mapping between JSON and script data.

This may fail with a conversion error if the JSON is outside the supported subset for the chosen mapping. See ScriptDataJsonSchema for the details.

scriptDataToJson :: ScriptDataJsonSchema -> ScriptData -> Value Source #

Convert a script data value into JSON , using the given choice of mapping between JSON and script data.

This conversion is total but is not necessarily invertible. See ScriptDataJsonSchema for the details.

Script execution units

data ExecutionUnits Source #

The units for how long a script executes for and how much memory it uses. This is used to declare the resources used by a particular use of a script.

This type is also used to describe the limits for the maximum overall execution units per transaction or per block.

Constructors

ExecutionUnits

Fields

data ExecutionUnitPrices Source #

The prices for ExecutionUnits as a fraction of a Lovelace .

These are used to determine the fee for the use of a script within a transaction, based on the ExecutionUnits needed by the use of the script.

Instances

Instances details
Eq ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Show ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Script addresses

Making addresses from scripts.

data ScriptHash Source #

We have this type separate from the Hash type to avoid the script hash type being parametrised by the era. The representation is era independent, and there are many places where we want to use a script hash where we don't want things to be era-parametrised.

Instances

Instances details
Eq ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

Ord ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

Show ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

IsString ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

ToJSON ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

FromJSON ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

HasTypeProxy ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

SerialiseAsRawBytes ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

data AsType ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

Serialisation

Support for serialising data in JSON, CBOR and text files.

CBOR

class HasTypeProxy a => SerialiseAsCBOR a Source #

Instances

Instances details
SerialiseAsCBOR TxMetadata Source #
Instance details

Defined in Cardano.Api.TxMetadata

SerialiseAsCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

SerialiseAsCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

SerialiseAsCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

SerialiseAsCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

SerialiseAsCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

SerialiseAsCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsCBOR ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsCBOR ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

( HasTypeProxy lang, Typeable lang) => SerialiseAsCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

IsScriptLanguage lang => SerialiseAsCBOR ( Script lang) Source #
Instance details

Defined in Cardano.Api.Script

IsCardanoEra era => SerialiseAsCBOR ( TxBody era) Source #
Instance details

Defined in Cardano.Api.TxBody

IsCardanoEra era => SerialiseAsCBOR ( KeyWitness era) Source #
Instance details

Defined in Cardano.Api.Tx

IsCardanoEra era => SerialiseAsCBOR ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

class Typeable a => ToCBOR a Source #

Minimal complete definition

toCBOR

Instances

Instances details
ToCBOR Bool
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Float
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Int
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Int32
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Int64
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Integer
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Natural
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Word
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Word8
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Word16
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Word32
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Word64
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ()
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ByteString
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ShortByteString
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ByteString
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR UTCTime
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Text
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Nano
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Pico
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Void
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR Raw
Instance details

Defined in Cardano.Binary.Raw

ToCBOR SignKey
Instance details

Defined in Cardano.Crypto.VRF.Praos

ToCBOR VerKey
Instance details

Defined in Cardano.Crypto.VRF.Praos

ToCBOR Proof
Instance details

Defined in Cardano.Crypto.VRF.Praos

ToCBOR SigningKey
Instance details

Defined in Cardano.Crypto.Signing.SigningKey

ToCBOR VerificationKey
Instance details

Defined in Cardano.Crypto.Signing.VerificationKey

ToCBOR CompactRedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Compact

ToCBOR RedeemSigningKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.SigningKey

ToCBOR RedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.VerificationKey

ToCBOR ProtocolMagicId
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToCBOR RequiresNetworkMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToCBOR FailureDescription
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

ToCBOR TagMismatchDescription
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

ToCBOR PlutusDebug
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

ToCBOR IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

ToCBOR RdmrPtr
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

ToCBOR AlonzoGenesis
Instance details

Defined in Cardano.Ledger.Alonzo.Genesis

ToCBOR Tag
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR ExUnits
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR CostModel
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR CostModels
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR Prices
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

ToCBOR Language
Instance details

Defined in Cardano.Ledger.Alonzo.Language

ToCBOR ApplyMempoolPayloadErr
Instance details

Defined in Cardano.Chain.Byron.API.Mempool

ToCBOR ChainValidationState
Instance details

Defined in Cardano.Chain.Block.Validation

ToCBOR TxValidationError
Instance details

Defined in Cardano.Chain.UTxO.Validation

ToCBOR UTxOValidationError
Instance details

Defined in Cardano.Chain.UTxO.Validation

ToCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Interface

ToCBOR State
Instance details

Defined in Cardano.Chain.Update.Validation.Interface

ToCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Interface

ToCBOR Config
Instance details

Defined in Cardano.Chain.Genesis.Config

ToCBOR BlockSignature
Instance details

Defined in Cardano.Chain.Block.Header

ToCBOR ToSign
Instance details

Defined in Cardano.Chain.Block.Header

ToCBOR Proof
Instance details

Defined in Cardano.Chain.Block.Proof

ToCBOR Body
Instance details

Defined in Cardano.Chain.Block.Body

ToCBOR Payload
Instance details

Defined in Cardano.Chain.Update.Payload

ToCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

ToCBOR Vote
Instance details

Defined in Cardano.Chain.Update.Vote

ToCBOR CandidateProtocolUpdate
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

ToCBOR Endorsement
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

ToCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

ToCBOR ApplicationVersion
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR ProtocolUpdateProposal
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR SoftwareUpdateProposal
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR Adopted
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR Proposal
Instance details

Defined in Cardano.Chain.Update.Proposal

ToCBOR ProposalBody
Instance details

Defined in Cardano.Chain.Update.Proposal

ToCBOR SystemTag
Instance details

Defined in Cardano.Chain.Update.SystemTag

ToCBOR SystemTagError
Instance details

Defined in Cardano.Chain.Update.SystemTag

ToCBOR SoftwareVersion
Instance details

Defined in Cardano.Chain.Update.SoftwareVersion

ToCBOR SoftwareVersionError
Instance details

Defined in Cardano.Chain.Update.SoftwareVersion

ToCBOR GenesisData
Instance details

Defined in Cardano.Chain.Genesis.Data

ToCBOR ProtocolParametersUpdate
Instance details

Defined in Cardano.Chain.Update.ProtocolParametersUpdate

ToCBOR ProtocolParameters
Instance details

Defined in Cardano.Chain.Update.ProtocolParameters

ToCBOR SoftforkRule
Instance details

Defined in Cardano.Chain.Update.SoftforkRule

ToCBOR ProtocolVersion
Instance details

Defined in Cardano.Chain.Update.ProtocolVersion

ToCBOR InstallerHash
Instance details

Defined in Cardano.Chain.Update.InstallerHash

ToCBOR ApplicationName
Instance details

Defined in Cardano.Chain.Update.ApplicationName

ToCBOR ApplicationNameError
Instance details

Defined in Cardano.Chain.Update.ApplicationName

ToCBOR UTxOConfiguration
Instance details

Defined in Cardano.Chain.UTxO.UTxOConfiguration

ToCBOR UTxO
Instance details

Defined in Cardano.Chain.UTxO.UTxO

ToCBOR UTxOError
Instance details

Defined in Cardano.Chain.UTxO.UTxO

ToCBOR TxProof
Instance details

Defined in Cardano.Chain.UTxO.TxProof

ToCBOR TxPayload
Instance details

Defined in Cardano.Chain.UTxO.TxPayload

ToCBOR TxAux
Instance details

Defined in Cardano.Chain.UTxO.TxAux

ToCBOR TxInWitness
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

ToCBOR TxSigData
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

ToCBOR CompactTxIn
Instance details

Defined in Cardano.Chain.UTxO.Compact

ToCBOR CompactTxId
Instance details

Defined in Cardano.Chain.UTxO.Compact

ToCBOR CompactTxOut
Instance details

Defined in Cardano.Chain.UTxO.Compact

ToCBOR Tx
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToCBOR TxIn
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToCBOR TxOut
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToCBOR SscPayload
Instance details

Defined in Cardano.Chain.Ssc

ToCBOR SscProof
Instance details

Defined in Cardano.Chain.Ssc

ToCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Activation

ToCBOR Payload
Instance details

Defined in Cardano.Chain.Delegation.Payload

ToCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR ScheduledDelegation
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR Error
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

ToCBOR GenesisDelegation
Instance details

Defined in Cardano.Chain.Genesis.Delegation

ToCBOR Certificate
Instance details

Defined in Cardano.Chain.Delegation.Certificate

ToCBOR EpochAndSlotCount
Instance details

Defined in Cardano.Chain.Slotting.EpochAndSlotCount

ToCBOR EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

ToCBOR SlotNumber
Instance details

Defined in Cardano.Chain.Slotting.SlotNumber

ToCBOR SlotCount
Instance details

Defined in Cardano.Chain.Slotting.SlotCount

ToCBOR EpochNumber
Instance details

Defined in Cardano.Chain.Slotting.EpochNumber

ToCBOR GenesisNonAvvmBalances
Instance details

Defined in Cardano.Chain.Genesis.NonAvvmBalances

ToCBOR GenesisKeyHashes
Instance details

Defined in Cardano.Chain.Genesis.KeyHashes

ToCBOR GenesisHash
Instance details

Defined in Cardano.Chain.Genesis.Hash

ToCBOR GenesisAvvmBalances
Instance details

Defined in Cardano.Chain.Genesis.AvvmBalances

ToCBOR Map
Instance details

Defined in Cardano.Chain.Delegation.Map

ToCBOR TxFeePolicy
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

ToCBOR TxSizeLinear
Instance details

Defined in Cardano.Chain.Common.TxSizeLinear

ToCBOR CompactAddress
Instance details

Defined in Cardano.Chain.Common.Compact

ToCBOR Address'
Instance details

Defined in Cardano.Chain.Common.Address

ToCBOR Address
Instance details

Defined in Cardano.Chain.Common.Address

ToCBOR HDAddressPayload
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

ToCBOR NetworkMagic
Instance details

Defined in Cardano.Chain.Common.NetworkMagic

ToCBOR LovelacePortion
Instance details

Defined in Cardano.Chain.Common.LovelacePortion

ToCBOR Lovelace
Instance details

Defined in Cardano.Chain.Common.Lovelace

ToCBOR LovelaceError
Instance details

Defined in Cardano.Chain.Common.Lovelace

ToCBOR KeyHash
Instance details

Defined in Cardano.Chain.Common.KeyHash

ToCBOR ChainDifficulty
Instance details

Defined in Cardano.Chain.Common.ChainDifficulty

ToCBOR BlockCount
Instance details

Defined in Cardano.Chain.Common.BlockCount

ToCBOR AddrSpendingData
Instance details

Defined in Cardano.Chain.Common.AddrSpendingData

ToCBOR AddrType
Instance details

Defined in Cardano.Chain.Common.AddrSpendingData

ToCBOR Ptr
Instance details

Defined in Cardano.Ledger.Credential

ToCBOR ProtVer
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR NonNegativeInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR PositiveInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR PositiveUnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR UnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Nonce
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Seed
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Url
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR DnsName
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Port
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ActiveSlotCoeff
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Network
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR TxIx
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR CertIx
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Coin
Instance details

Defined in Cardano.Ledger.Coin

ToCBOR DeltaCoin
Instance details

Defined in Cardano.Ledger.Coin

ToCBOR BlockNo
Instance details

Defined in Cardano.Slotting.Block

ToCBOR EpochSize
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR RewardInfoPool
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

ToCBOR RewardParams
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

ToCBOR VotingPeriod
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ppup

ToCBOR AccountState
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

ToCBOR LogWeight
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

ToCBOR Likelihood
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

ToCBOR PerformanceEstimate
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

ToCBOR RewardType
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

ToCBOR Desirability
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

ToCBOR PoolMetadata
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToCBOR StakePoolRelay
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToCBOR MIRPot
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToCBOR SizeOfPoolOwners
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToCBOR SizeOfPoolRelays
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToCBOR Metadatum
Instance details

Defined in Cardano.Ledger.Shelley.Metadata

ToCBOR ChainCode
Instance details

Defined in Cardano.Ledger.Shelley.Address.Bootstrap

ToCBOR ValidityInterval
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

ToCBOR AssetName
Instance details

Defined in Cardano.Ledger.Mary.Value

ToCBOR TicknState
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Tickn

ToCBOR KESPeriod
Instance details

Defined in Cardano.Protocol.TPraos.OCert

ToCBOR SystemStart
Instance details

Defined in Cardano.Slotting.Time

ToCBOR NominalDiffTime

For backwards compatibility we round pico precision to micro

Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ByronHash
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

ToCBOR InputVRF
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.VRF

ToCBOR Point
Instance details

Defined in Cardano.Crypto.VRF.Simple

ToCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

ToCBOR ExecutionUnits Source #
Instance details

Defined in Cardano.Api.Script

ToCBOR AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

ToCBOR Lovelace Source #
Instance details

Defined in Cardano.Api.Value

ToCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR CostModel Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

ToCBOR ScriptValidity Source #
Instance details

Defined in Cardano.Api.TxBody

ToCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

ToCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

ToCBOR a => ToCBOR [a]
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR a => ToCBOR ( Maybe a)
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR a => ToCBOR ( Ratio a)
Instance details

Defined in Cardano.Binary.ToCBOR

( Ord a, ToCBOR a) => ToCBOR ( Set a)
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR a => ToCBOR ( NonEmpty a)
Instance details

Defined in Cardano.Binary.ToCBOR

Typeable xs => ToCBOR ( LengthOf xs)
Instance details

Defined in Cardano.Binary.ToCBOR

ToCBOR ( CertVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

ToCBOR ( CertVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

ToCBOR ( CertVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

ToCBOR ( SignKeyVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

ToCBOR ( SignKeyVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

ToCBOR ( SignKeyVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

ToCBOR ( VerKeyVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

ToCBOR ( VerKeyVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

ToCBOR ( VerKeyVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

Typeable v => ToCBOR ( OutputVRF v)
Instance details

Defined in Cardano.Crypto.VRF.Class

ToCBOR ( SigDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

ToCBOR ( SigDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

ToCBOR ( SigDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

ToCBOR ( SigDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

ToCBOR ( SigDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

ToCBOR ( SigDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

ToCBOR ( SignKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

ToCBOR ( SignKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

ToCBOR ( SignKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

ToCBOR ( SignKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

ToCBOR ( SignKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

ToCBOR ( SignKeyDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

ToCBOR ( VerKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

ToCBOR ( VerKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

ToCBOR ( VerKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

ToCBOR ( VerKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

ToCBOR ( VerKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

ToCBOR ( VerKeyDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( SigKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => ToCBOR ( SigKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => ToCBOR ( SigKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( SigKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => ToCBOR ( SigKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => ToCBOR ( SigKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( SignKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => ToCBOR ( SignKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => ToCBOR ( SignKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( SignKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => ToCBOR ( SignKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => ToCBOR ( SignKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( VerKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => ToCBOR ( VerKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => ToCBOR ( VerKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => ToCBOR ( VerKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => ToCBOR ( VerKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => ToCBOR ( VerKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

Typeable a => ToCBOR ( Signature a)
Instance details

Defined in Cardano.Crypto.Signing.Signature

Typeable a => ToCBOR ( RedeemSignature a)
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Signature

Typeable t => ToCBOR ( MemoBytes t)
Instance details

Defined in Data.MemoBytes

( Era era, ToCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( AuxiliaryData era), Typeable ( Script era), ToCBOR ( Script era)) => ToCBOR ( UtxowPredicateFail era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxow

( Typeable era, Era era, ToCBOR ( TxOut era), ToCBOR ( Value era), ToCBOR ( PredicateFailure ( EraRule "UTXOS" era))) => ToCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxo

( Era era, ToCBOR ( PredicateFailure ( EraRule "PPUP" era)), Show ( TxOut era)) => ToCBOR ( UtxosPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

Crypto crypto => ToCBOR ( CollectError crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.PlutusScriptApi

( Typeable era, ToCBOR ( BbodyPredicateFailure era)) => ToCBOR ( AlonzoBbodyPredFail era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Bbody

Crypto crypto => ToCBOR ( TxOutSource crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

Crypto crypto => ToCBOR ( TranslationError crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

( Typeable era, ToCBOR ( TxBody era), ToCBOR ( AuxiliaryData era)) => ToCBOR ( ValidatedTx era)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Typeable c, Crypto c) => ToCBOR ( ScriptPurpose c)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Typeable era => ToCBOR ( Redeemers era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

Typeable era => ToCBOR ( TxWitness era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

Typeable era => ToCBOR ( TxDats era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

( Era era, Compactible ( Value era)) => ToCBOR ( TxOut era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

Typeable era => ToCBOR ( TxBody era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

Typeable era => ToCBOR ( Data era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Typeable era => ToCBOR ( BinaryData era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Era era => ToCBOR ( Datum era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Typeable era => ToCBOR ( AuxiliaryData era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Era era => ToCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era => ToCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

( Typeable ( Crypto era), Typeable era) => ToCBOR ( Script era)
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

Crypto crypto => ToCBOR ( AuxiliaryDataHash crypto)
Instance details

Defined in Cardano.Ledger.AuxiliaryData

( Era era, Typeable era, ToCBOR ( TxOut era), ToCBOR ( Value era), ToCBOR ( PredicateFailure ( EraRule "UTXOS" era)), ToCBOR ( PredicateFailure ( EraRule "UTXO" era)), ToCBOR ( Script era), Typeable ( AuxiliaryData era)) => ToCBOR ( BabbageUtxowPred era)
Instance details

Defined in Cardano.Ledger.Babbage.Rules.Utxow

( Era era, Typeable era, ToCBOR ( TxOut era), ToCBOR ( Value era), ToCBOR ( PredicateFailure ( EraRule "UTXOS" era)), ToCBOR ( PredicateFailure ( EraRule "UTXO" era)), ToCBOR ( Script era), Typeable ( AuxiliaryData era)) => ToCBOR ( BabbageUtxoPred era)
Instance details

Defined in Cardano.Ledger.Babbage.Rules.Utxo

( Era era, ToCBOR ( Value era), ToCBOR ( Script era)) => ToCBOR ( TxOut era)
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Typeable era => ToCBOR ( TxBody era)
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Era era => ToCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Babbage.PParams

Era era => ToCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Babbage.PParams

ToCBOR n => ToCBOR ( TooLarge n)
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

ToCBOR a => ToCBOR ( MerkleRoot a)
Instance details

Defined in Cardano.Chain.Common.Merkle

ToCBOR a => ToCBOR ( MerkleTree a)
Instance details

Defined in Cardano.Chain.Common.Merkle

ToCBOR ( Attributes ())
Instance details

Defined in Cardano.Chain.Common.Attributes

ToCBOR ( Attributes AddrAttributes )
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

ToCBOR a => ToCBOR ( StrictMaybe a)
Instance details

Defined in Data.Maybe.Strict

Crypto crypto => ToCBOR ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => ToCBOR ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => ToCBOR ( CompactAddr crypto)
Instance details

Defined in Cardano.Ledger.CompactAddress

Crypto crypto => ToCBOR ( Addr crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => ToCBOR ( RewardAcnt crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => ToCBOR ( GenesisCredential crypto)
Instance details

Defined in Cardano.Ledger.Credential

Crypto crypto => ToCBOR ( BlocksMade crypto)
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => ToCBOR ( IndividualPoolStake crypto)
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto crypto => ToCBOR ( PoolDistr crypto)
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto crypto => ToCBOR ( GenDelegPair crypto)
Instance details

Defined in Cardano.Ledger.Keys

Crypto crypto => ToCBOR ( GenDelegs crypto)
Instance details

Defined in Cardano.Ledger.Keys

ToCBORGroup a => ToCBOR ( CBORGroup a)
Instance details

Defined in Cardano.Ledger.Serialization

ToCBOR a => ToCBOR ( CborSeq a)
Instance details

Defined in Cardano.Ledger.Serialization

ToCBOR a => ToCBOR ( Sized a)

Discards the size.

Instance details

Defined in Cardano.Ledger.Serialization

Crypto crypto => ToCBOR ( ScriptHash crypto)
Instance details

Defined in Cardano.Ledger.Hashes

ToCBOR ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

ToCBOR ( CompactForm DeltaCoin )
Instance details

Defined in Cardano.Ledger.Coin

Crypto crypto => ToCBOR ( CompactForm ( Value crypto))
Instance details

Defined in Cardano.Ledger.Mary.Value

( Era era, ToCBOR ( PredicateFailure ( EraRule "LEDGER" era))) => ToCBOR ( ApplyTxError era)
Instance details

Defined in Cardano.Ledger.Shelley.API.Mempool

Crypto crypto => ToCBOR ( ShelleyGenesisStaking crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Era era => ToCBOR ( ShelleyGenesis era)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

( Era era, ToCBOR ( PredicateFailure ( EraRule "LEDGER" era))) => ToCBOR ( LedgersPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ledgers

( ToCBOR ( PredicateFailure ( EraRule "DELEGS" era)), ToCBOR ( PredicateFailure ( EraRule "UTXOW" era)), Era era) => ToCBOR ( LedgerPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ledger

( Era era, Typeable ( Script era), ToCBOR ( PredicateFailure ( EraRule "DELPL" era))) => ToCBOR ( DelegsPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Delegs

( Era era, ToCBOR ( PredicateFailure ( EraRule "POOL" era)), ToCBOR ( PredicateFailure ( EraRule "DELEG" era)), Typeable ( Script era)) => ToCBOR ( DelplPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Delpl

( Typeable era, Era era, Typeable ( Script era)) => ToCBOR ( DelegPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Deleg

( Typeable era, Era era) => ToCBOR ( PoolPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Pool

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), ToCBOR ( PredicateFailure ( EraRule "UTXO" era))) => ToCBOR ( UtxowPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Utxow

( Typeable era, Crypto ( Crypto era), ToCBOR ( Value era), ToCBOR ( TxOut era), ToCBOR ( PredicateFailure ( EraRule "PPUP" era))) => ToCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Utxo

( Typeable era, Era era) => ToCBOR ( PpupPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ppup

Crypto crypto => ToCBOR ( FutureGenDeleg crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

Crypto crypto => ToCBOR ( InstantaneousRewards crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

Crypto crypto => ToCBOR ( DState crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

Crypto crypto => ToCBOR ( PState crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

Crypto crypto => ToCBOR ( DPState crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( TxOut era), ToCBOR ( PParams era), ToCBOR ( State ( EraRule "PPUP" era))) => ToCBOR ( EpochState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( PParamsDelta era)) => ToCBOR ( PPUPState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

Crypto crypto => ToCBOR ( IncrementalStake crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( TxOut era), ToCBOR ( State ( EraRule "PPUP" era))) => ToCBOR ( UTxOState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( TxOut era), ToCBOR ( PParams era), ToCBOR ( State ( EraRule "PPUP" era)), ToCBOR ( StashedAVVMAddresses era)) => ToCBOR ( NewEpochState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( TxOut era), ToCBOR ( State ( EraRule "PPUP" era))) => ToCBOR ( LedgerState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, ToCBOR ( TxOut era)) => ToCBOR ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Crypto c => ToCBOR ( RewardAns c)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => ToCBOR ( Pulser c)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( RewardUpdate crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( RewardSnapShot crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( FreeVars crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( PulsingRewUpdate crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => ToCBOR ( NonMyopic crypto)
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

Crypto crypto => ToCBOR ( Reward crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => ToCBOR ( LeaderOnlyReward crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => ToCBOR ( PoolRewardInfo crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => ToCBOR ( Stake crypto)
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => ToCBOR ( SnapShot crypto)
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => ToCBOR ( SnapShots crypto)
Instance details

Defined in Cardano.Ledger.Shelley.EpochBoundary

Crypto crypto => ToCBOR ( RewardProvenancePool crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => ToCBOR ( RewardProvenance crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Typeable era => ToCBOR ( Tx era)
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Crypto crypto => ToCBOR ( PoolParams crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => ToCBOR ( Wdrl crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

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

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => ToCBOR ( MIRTarget crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => ToCBOR ( MIRCert crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => ToCBOR ( DCert crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( Era era, FromCBOR ( PParamsDelta era), TransTxBody ToCBOR era) => ToCBOR ( TxBodyRaw era)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Era era => ToCBOR ( TxBody era)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => ToCBOR ( StakeCreds crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Typeable crypto => ToCBOR ( MultiSig crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Era era => ToCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

( Era era, ToCBOR ( PParamsDelta era)) => ToCBOR ( Update era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Era era => ToCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

( Era era, ToCBOR ( PParamsDelta era)) => ToCBOR ( ProposedPPUpdates era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Typeable era => ToCBOR ( Metadata era)
Instance details

Defined in Cardano.Ledger.Shelley.Metadata

Crypto crypto => ToCBOR ( BootstrapWitness crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Address.Bootstrap

( Typeable era, Crypto ( Crypto era), ToCBOR ( Value era), ToCBOR ( TxOut era), ToCBOR ( UTxOState era), ToCBOR ( PredicateFailure ( EraRule "PPUP" era))) => ToCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

Typeable era => ToCBOR ( TxBody era)
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

Typeable crypto => ToCBOR ( Timelock crypto)
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Typeable era => ToCBOR ( AuxiliaryData era)
Instance details

Defined in Cardano.Ledger.ShelleyMA.AuxiliaryData

Crypto crypto => ToCBOR ( PolicyID crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => ToCBOR ( Value crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => ToCBOR ( ChainDepState crypto)
Instance details

Defined in Cardano.Protocol.TPraos.API

Crypto crypto => ToCBOR ( PrtclState crypto)
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Prtcl

Crypto crypto => ToCBOR ( OBftSlot crypto)
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Overlay

Crypto crypto => ToCBOR ( HashHeader crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => ToCBOR ( PrevHash crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => ToCBOR ( BHBody crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => ToCBOR ( BHeader crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => ToCBOR ( LastAppliedBlock crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => ToCBOR ( OCert crypto)
Instance details

Defined in Cardano.Protocol.TPraos.OCert

( Serialise t, Typeable t) => ToCBOR ( WithOrigin t)
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR a => ToCBOR ( Vector a)
Instance details

Defined in Cardano.Binary.ToCBOR

ShelleyCompatible proto era => ToCBOR ( Header ( ShelleyBlock proto era))
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

PraosCrypto c => ToCBOR ( PraosState c)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => ToCBOR ( TPraosState c)
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Crypto crypto => ToCBOR ( HeaderBody crypto)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

Typeable crypto => ToCBOR ( Header crypto)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

Era era => ToCBOR ( CompactGenesis era)
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

Crypto crypto => ToCBOR ( ShelleyHash crypto)
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Abstract

( Typeable era, Ord ( Script era), Script era ~ Script era, ToCBOR ( Script era), Typeable ( Crypto era)) => ToCBOR (AuxiliaryDataRaw era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Methods

toCBOR :: AuxiliaryDataRaw era -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (AuxiliaryDataRaw era) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [AuxiliaryDataRaw era] -> Size Source #

ToCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

ToCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Crypto crypto => ToCBOR (HeaderRaw crypto)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

Methods

toCBOR :: HeaderRaw crypto -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (HeaderRaw crypto) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [HeaderRaw crypto] -> Size Source #

Crypto crypto => ToCBOR (CompactValue crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Methods

toCBOR :: CompactValue crypto -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (CompactValue crypto) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [CompactValue crypto] -> Size Source #

ToCBOR ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

ToCBOR ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

ToCBOR ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

ToCBOR ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

ToCBOR ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

( Typeable lang, HasTypeProxy lang) => ToCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

( ToCBOR a, ToCBOR b) => ToCBOR ( Either a b)
Instance details

Defined in Cardano.Binary.ToCBOR

( ToCBOR a, ToCBOR b) => ToCBOR (a, b)
Instance details

Defined in Cardano.Binary.ToCBOR

( Ord k, ToCBOR k, ToCBOR v) => ToCBOR ( Map k v)
Instance details

Defined in Cardano.Binary.ToCBOR

( VRFAlgorithm v, Typeable a) => ToCBOR ( CertifiedVRF v a)
Instance details

Defined in Cardano.Crypto.VRF.Class

( HashAlgorithm h, Typeable a) => ToCBOR ( Hash h a)
Instance details

Defined in Cardano.Crypto.Hash.Class

( Typeable algo, Typeable a, HashAlgorithm algo) => ToCBOR ( AbstractHash algo a)
Instance details

Defined in Cardano.Crypto.Hashing

( Era era, Typeable h) => ToCBOR ( Block h era)
Instance details

Defined in Cardano.Ledger.Block

( Typeable kr, Crypto crypto) => ToCBOR ( Credential kr crypto)
Instance details

Defined in Cardano.Ledger.Credential

( Crypto crypto, Typeable kd) => ToCBOR ( VKey kd crypto)
Instance details

Defined in Cardano.Ledger.Keys

( Crypto crypto, Typeable disc) => ToCBOR ( KeyHash disc crypto)
Instance details

Defined in Cardano.Ledger.Keys

( Typeable index, Crypto c) => ToCBOR ( SafeHash c index)
Instance details

Defined in Cardano.Ledger.SafeHash

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

Defined in Cardano.Ledger.Shelley.Tx

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

Defined in Cardano.Ledger.Shelley.TxBody

ShelleyCompatible proto era => ToCBOR ( ShelleyBlock proto era)
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

( ToCBOR a, Integral a, Bounded a, Typeable b, Typeable a) => ToCBOR (BoundedRatio b a)
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBOR :: BoundedRatio b a -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (BoundedRatio b a) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [BoundedRatio b a] -> Size Source #

( ToCBOR a, ToCBOR b, ToCBOR c) => ToCBOR (a, b, c)
Instance details

Defined in Cardano.Binary.ToCBOR

(Tbor coin, Tbor ptr, Ord ptr, ToCBOR pool) => ToCBOR ( Trip coin ptr pool)
Instance details

Defined in Data.UMap

( Ord a, Ord b, ToCBOR a, ToCBOR b) => ToCBOR ( BiMap b a b)
Instance details

Defined in Data.BiMap

( Typeable s, ToCBOR a) => ToCBOR ( Tagged s a)
Instance details

Defined in Cardano.Binary.ToCBOR

( ToCBOR k, ToCBOR v, Ord k, Vector kv k, Vector vv v, Typeable kv, Typeable vv) => ToCBOR ( KVVector kv vv (k, v))
Instance details

Defined in Data.VMap.KVVector

( ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d) => ToCBOR (a, b, c, d)
Instance details

Defined in Cardano.Binary.ToCBOR

(Tbor coin, Tbor ptr, Tbor cred, ToCBOR pool, Ord ptr) => ToCBOR ( UMap coin cred pool ptr)
Instance details

Defined in Data.UMap

Methods

toCBOR :: UMap coin cred pool ptr -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy ( UMap coin cred pool ptr) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [ UMap coin cred pool ptr] -> Size Source #

( Typeable kv, Typeable vv, ToCBOR k, ToCBOR v, Ord k, Vector kv k, Vector vv v) => ToCBOR ( VMap kv vv k v)
Instance details

Defined in Data.VMap

( ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e) => ToCBOR (a, b, c, d, e)
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e) -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (a, b, c, d, e) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [(a, b, c, d, e)] -> Size Source #

( ToCBOR a, ToCBOR b, ToCBOR c, ToCBOR d, ToCBOR e, ToCBOR f, ToCBOR g) => ToCBOR (a, b, c, d, e, f, g)
Instance details

Defined in Cardano.Binary.ToCBOR

Methods

toCBOR :: (a, b, c, d, e, f, g) -> Encoding Source #

encodedSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy (a, b, c, d, e, f, g) -> Size Source #

encodedListSizeExpr :: ( forall t. ToCBOR t => Proxy t -> Size ) -> Proxy [(a, b, c, d, e, f, g)] -> Size Source #

class Typeable a => FromCBOR a Source #

Minimal complete definition

fromCBOR

Instances

Instances details
FromCBOR Bool
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Float
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Int
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Int32
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Int64
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Integer
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Natural
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Word
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Word8
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Word16
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Word32
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Word64
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR ()
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR ByteString
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR ShortByteString
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR UTCTime
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Text
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Nano
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Pico
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Void
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR LByteString
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR Raw
Instance details

Defined in Cardano.Binary.Raw

FromCBOR SignKey
Instance details

Defined in Cardano.Crypto.VRF.Praos

FromCBOR VerKey
Instance details

Defined in Cardano.Crypto.VRF.Praos

FromCBOR Proof
Instance details

Defined in Cardano.Crypto.VRF.Praos

FromCBOR SigningKey
Instance details

Defined in Cardano.Crypto.Signing.SigningKey

FromCBOR VerificationKey
Instance details

Defined in Cardano.Crypto.Signing.VerificationKey

FromCBOR CompactRedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Compact

FromCBOR RedeemSigningKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.SigningKey

FromCBOR RedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.VerificationKey

FromCBOR ProtocolMagicId
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromCBOR RequiresNetworkMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromCBOR FailureDescription
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

FromCBOR TagMismatchDescription
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

FromCBOR PlutusDebug
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

FromCBOR IsValid
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

FromCBOR RdmrPtr
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

FromCBOR AlonzoGenesis
Instance details

Defined in Cardano.Ledger.Alonzo.Genesis

FromCBOR Tag
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

FromCBOR ExUnits
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

FromCBOR CostModels
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

FromCBOR Prices
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

FromCBOR Language
Instance details

Defined in Cardano.Ledger.Alonzo.Language

FromCBOR ApplyMempoolPayloadErr
Instance details

Defined in Cardano.Chain.Byron.API.Mempool

FromCBOR ChainValidationState
Instance details

Defined in Cardano.Chain.Block.Validation

FromCBOR TxValidationError
Instance details

Defined in Cardano.Chain.UTxO.Validation

FromCBOR UTxOValidationError
Instance details

Defined in Cardano.Chain.UTxO.Validation

FromCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Interface

FromCBOR State
Instance details

Defined in Cardano.Chain.Update.Validation.Interface

FromCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Interface

FromCBOR Config
Instance details

Defined in Cardano.Chain.Genesis.Config

FromCBOR BlockSignature
Instance details

Defined in Cardano.Chain.Block.Header

FromCBOR ToSign
Instance details

Defined in Cardano.Chain.Block.Header

FromCBOR Proof
Instance details

Defined in Cardano.Chain.Block.Proof

FromCBOR Body
Instance details

Defined in Cardano.Chain.Block.Body

FromCBOR Payload
Instance details

Defined in Cardano.Chain.Update.Payload

FromCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

FromCBOR Vote
Instance details

Defined in Cardano.Chain.Update.Vote

FromCBOR CandidateProtocolUpdate
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

FromCBOR Endorsement
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

FromCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Endorsement

FromCBOR ApplicationVersion
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR ProtocolUpdateProposal
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR SoftwareUpdateProposal
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR Error
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR Adopted
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR Proposal
Instance details

Defined in Cardano.Chain.Update.Proposal

FromCBOR ProposalBody
Instance details

Defined in Cardano.Chain.Update.Proposal

FromCBOR SystemTag
Instance details

Defined in Cardano.Chain.Update.SystemTag

FromCBOR SystemTagError
Instance details

Defined in Cardano.Chain.Update.SystemTag

FromCBOR SoftwareVersion
Instance details

Defined in Cardano.Chain.Update.SoftwareVersion

FromCBOR SoftwareVersionError
Instance details

Defined in Cardano.Chain.Update.SoftwareVersion

FromCBOR GenesisData
Instance details

Defined in Cardano.Chain.Genesis.Data

FromCBOR ProtocolParametersUpdate
Instance details

Defined in Cardano.Chain.Update.ProtocolParametersUpdate

FromCBOR ProtocolParameters
Instance details

Defined in Cardano.Chain.Update.ProtocolParameters

FromCBOR SoftforkRule
Instance details

Defined in Cardano.Chain.Update.SoftforkRule

FromCBOR ProtocolVersion
Instance details

Defined in Cardano.Chain.Update.ProtocolVersion

FromCBOR InstallerHash
Instance details

Defined in Cardano.Chain.Update.InstallerHash

FromCBOR ApplicationName
Instance details

Defined in Cardano.Chain.Update.ApplicationName

FromCBOR ApplicationNameError
Instance details

Defined in Cardano.Chain.Update.ApplicationName

FromCBOR UTxOConfiguration
Instance details

Defined in Cardano.Chain.UTxO.UTxOConfiguration

FromCBOR UTxO
Instance details

Defined in Cardano.Chain.UTxO.UTxO

FromCBOR UTxOError
Instance details

Defined in Cardano.Chain.UTxO.UTxO

FromCBOR TxProof
Instance details

Defined in Cardano.Chain.UTxO.TxProof

FromCBOR TxPayload
Instance details

Defined in Cardano.Chain.UTxO.TxPayload

FromCBOR TxAux
Instance details

Defined in Cardano.Chain.UTxO.TxAux

FromCBOR TxInWitness
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

FromCBOR TxSigData
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

FromCBOR CompactTxIn
Instance details

Defined in Cardano.Chain.UTxO.Compact

FromCBOR CompactTxId
Instance details

Defined in Cardano.Chain.UTxO.Compact

FromCBOR CompactTxOut
Instance details

Defined in Cardano.Chain.UTxO.Compact

FromCBOR Tx
Instance details

Defined in Cardano.Chain.UTxO.Tx

FromCBOR TxIn
Instance details

Defined in Cardano.Chain.UTxO.Tx

FromCBOR TxOut
Instance details

Defined in Cardano.Chain.UTxO.Tx

FromCBOR SscPayload
Instance details

Defined in Cardano.Chain.Ssc

FromCBOR SscProof
Instance details

Defined in Cardano.Chain.Ssc

FromCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Activation

FromCBOR Payload
Instance details

Defined in Cardano.Chain.Delegation.Payload

FromCBOR State
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR ScheduledDelegation
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR Error
Instance details

Defined in Cardano.Chain.Delegation.Validation.Scheduling

FromCBOR GenesisDelegation
Instance details

Defined in Cardano.Chain.Genesis.Delegation

FromCBOR Certificate
Instance details

Defined in Cardano.Chain.Delegation.Certificate

FromCBOR EpochAndSlotCount
Instance details

Defined in Cardano.Chain.Slotting.EpochAndSlotCount

FromCBOR EpochSlots
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

FromCBOR SlotNumber
Instance details

Defined in Cardano.Chain.Slotting.SlotNumber

FromCBOR SlotCount
Instance details

Defined in Cardano.Chain.Slotting.SlotCount

FromCBOR EpochNumber
Instance details

Defined in Cardano.Chain.Slotting.EpochNumber

FromCBOR GenesisNonAvvmBalances
Instance details

Defined in Cardano.Chain.Genesis.NonAvvmBalances

FromCBOR GenesisKeyHashes
Instance details

Defined in Cardano.Chain.Genesis.KeyHashes

FromCBOR GenesisHash
Instance details

Defined in Cardano.Chain.Genesis.Hash

FromCBOR GenesisAvvmBalances
Instance details

Defined in Cardano.Chain.Genesis.AvvmBalances

FromCBOR Map
Instance details

Defined in Cardano.Chain.Delegation.Map

FromCBOR TxFeePolicy
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

FromCBOR TxSizeLinear
Instance details

Defined in Cardano.Chain.Common.TxSizeLinear

FromCBOR CompactAddress
Instance details

Defined in Cardano.Chain.Common.Compact

FromCBOR Address'
Instance details

Defined in Cardano.Chain.Common.Address

FromCBOR Address
Instance details

Defined in Cardano.Chain.Common.Address

FromCBOR HDAddressPayload
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

FromCBOR NetworkMagic
Instance details

Defined in Cardano.Chain.Common.NetworkMagic

FromCBOR LovelacePortion
Instance details

Defined in Cardano.Chain.Common.LovelacePortion

FromCBOR Lovelace
Instance details

Defined in Cardano.Chain.Common.Lovelace

FromCBOR LovelaceError
Instance details

Defined in Cardano.Chain.Common.Lovelace

FromCBOR KeyHash
Instance details

Defined in Cardano.Chain.Common.KeyHash

FromCBOR ChainDifficulty
Instance details

Defined in Cardano.Chain.Common.ChainDifficulty

FromCBOR BlockCount
Instance details

Defined in Cardano.Chain.Common.BlockCount

FromCBOR AddrSpendingData
Instance details

Defined in Cardano.Chain.Common.AddrSpendingData

FromCBOR AddrType
Instance details

Defined in Cardano.Chain.Common.AddrSpendingData

FromCBOR Ptr
Instance details

Defined in Cardano.Ledger.Credential

FromCBOR ProtVer
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR NonNegativeInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR PositiveInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR PositiveUnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR UnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Nonce
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Url
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR DnsName
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Port
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR ActiveSlotCoeff
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Network
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR TxIx
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR CertIx
Instance details

Defined in Cardano.Ledger.BaseTypes

FromCBOR Coin
Instance details

Defined in Cardano.Ledger.Coin

FromCBOR DeltaCoin
Instance details

Defined in Cardano.Ledger.Coin

FromCBOR BlockNo
Instance details

Defined in Cardano.Slotting.Block

FromCBOR EpochSize
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR RewardInfoPool
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

FromCBOR RewardParams
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

FromCBOR VotingPeriod
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ppup

FromCBOR AccountState
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

FromCBOR LogWeight
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

FromCBOR Likelihood
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

FromCBOR PerformanceEstimate
Instance details

Defined in Cardano.Ledger.Shelley.PoolRank

FromCBOR RewardType
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

FromCBOR Desirability
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

FromCBOR PoolMetadata
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromCBOR StakePoolRelay
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromCBOR MIRPot
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromCBOR Metadatum
Instance details

Defined in Cardano.Ledger.Shelley.Metadata

FromCBOR ChainCode
Instance details

Defined in Cardano.Ledger.Shelley.Address.Bootstrap

FromCBOR ValidityInterval
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

FromCBOR AssetName
Instance details

Defined in Cardano.Ledger.Mary.Value

FromCBOR TicknState
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Tickn

FromCBOR KESPeriod
Instance details

Defined in Cardano.Protocol.TPraos.OCert

FromCBOR SystemStart
Instance details

Defined in Cardano.Slotting.Time

FromCBOR NominalDiffTime

For backwards compatibility we round pico precision to micro

Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR ByronHash
Instance details

Defined in Ouroboros.Consensus.Byron.Ledger.Block

FromCBOR Point
Instance details

Defined in Cardano.Crypto.VRF.Simple

FromCBOR ScriptData Source #
Instance details

Defined in Cardano.Api.ScriptData

FromCBOR ExecutionUnits Source #
Instance details

Defined in Cardano.Api.Script

FromCBOR AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

FromCBOR Lovelace Source #
Instance details

Defined in Cardano.Api.Value

FromCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR CostModel Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

FromCBOR ScriptValidity Source #
Instance details

Defined in Cardano.Api.TxBody

FromCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

FromCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

FromCBOR a => FromCBOR [a]
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR a => FromCBOR ( Maybe a)
Instance details

Defined in Cardano.Binary.FromCBOR

( Integral a, FromCBOR a) => FromCBOR ( Ratio a)
Instance details

Defined in Cardano.Binary.FromCBOR

( Ord a, FromCBOR a) => FromCBOR ( Set a)
Instance details

Defined in Cardano.Binary.FromCBOR

FromCBOR a => FromCBOR ( NonEmpty a)
Instance details

Defined in Cardano.Binary.FromCBOR

( Typeable t, FromCBOR ( Annotator t)) => FromCBOR ( Annotator ( MemoBytes t))
Instance details

Defined in Data.MemoBytes

( FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Script era)), FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( Witnesses era)), ToCBOR ( AuxiliaryData era), ToCBOR ( Script era), ToCBOR ( TxBody era), ToCBOR ( Witnesses era), ValidateScript era, Script era ~ Script era, Era era) => FromCBOR ( Annotator ( TxSeq era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxSeq

( Era era, FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era)), ValidateScript era, Script era ~ Script era) => FromCBOR ( Annotator ( ValidatedTx era))
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

Era era => FromCBOR ( Annotator ( Redeemers era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

( Era era, ValidateScript era, Script era ~ Script era) => FromCBOR ( Annotator ( TxWitness era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

Era era => FromCBOR ( Annotator ( TxDats era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), SerialisableData ( PParamsDelta era)) => FromCBOR ( Annotator ( TxBody era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

Typeable era => FromCBOR ( Annotator ( Data era))
Instance details

Defined in Cardano.Ledger.Alonzo.Data

( Era era, Ord ( Script era), FromCBOR ( Annotator ( Script era)), Script era ~ Script era) => FromCBOR ( Annotator ( AuxiliaryData era))
Instance details

Defined in Cardano.Ledger.Alonzo.Data

( Crypto ( Crypto era), Typeable ( Crypto era), Typeable era) => FromCBOR ( Annotator ( Script era))
Instance details

Defined in Cardano.Ledger.Alonzo.Scripts

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), SerialisableData ( PParamsDelta era)) => FromCBOR ( Annotator ( TxBody era))
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

( BlockAnn era, ValidateScript era, SupportsSegWit era, FromCBOR ( Annotator ( TxSeq era)), FromCBOR ( Annotator h), Typeable h) => FromCBOR ( Annotator ( Block h era))
Instance details

Defined in Cardano.Ledger.Block

( BlockAnn era, Typeable era) => FromCBOR ( Annotator ( TxSeq era))
Instance details

Defined in Cardano.Ledger.Shelley.BlockChain

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

Defined in Cardano.Ledger.Shelley.Tx

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

Defined in Cardano.Ledger.Shelley.Tx

( TransTxBody FromCBOR era, ToCBOR ( PParamsDelta era), Era era) => FromCBOR ( Annotator ( TxBodyRaw era))
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

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

Defined in Cardano.Ledger.Shelley.TxBody

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

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( Annotator ( MultiSig crypto))
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Typeable era => FromCBOR ( Annotator ( Metadata era))
Instance details

Defined in Cardano.Ledger.Shelley.Metadata

Crypto crypto => FromCBOR ( Annotator ( BootstrapWitness crypto))
Instance details

Defined in Cardano.Ledger.Shelley.Address.Bootstrap

FamsFrom era => FromCBOR ( Annotator ( TxBodyRaw era))
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

FamsFrom era => FromCBOR ( Annotator ( TxBody era))
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

Crypto crypto => FromCBOR ( Annotator ( Timelock crypto))
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

( Era era, AnnotatedData ( Script era)) => FromCBOR ( Annotator ( AuxiliaryData era))
Instance details

Defined in Cardano.Ledger.ShelleyMA.AuxiliaryData

Crypto crypto => FromCBOR ( Annotator ( BHeader crypto))
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

ShelleyCompatible proto era => FromCBOR ( Annotator ( Header ( ShelleyBlock proto era)))
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

Crypto crypto => FromCBOR ( Annotator ( Header crypto))
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

ShelleyCompatible proto era => FromCBOR ( Annotator ( ShelleyBlock proto era))
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Block

( Era era, ToCBOR ( Data era), ToCBOR ( Script era), Typeable ( Script era), ValidateScript era, Script era ~ Script era) => FromCBOR ( Annotator (TxWitnessRaw era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

Crypto crypto => FromCBOR ( Annotator (TimelockRaw crypto))
Instance details

Defined in Cardano.Ledger.ShelleyMA.Timelocks

Methods

fromCBOR :: Decoder s ( Annotator (TimelockRaw crypto)) Source #

label :: Proxy ( Annotator (TimelockRaw crypto)) -> Text Source #

( Era era, AnnotatedData ( Script era)) => FromCBOR ( Annotator (AuxiliaryDataRaw era))
Instance details

Defined in Cardano.Ledger.ShelleyMA.AuxiliaryData

Methods

fromCBOR :: Decoder s ( Annotator (AuxiliaryDataRaw era)) Source #

label :: Proxy ( Annotator (AuxiliaryDataRaw era)) -> Text Source #

( Era era, Ord ( Script era), FromCBOR ( Annotator ( Script era)), Script era ~ Script era) => FromCBOR ( Annotator (AuxiliaryDataRaw era))
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Methods

fromCBOR :: Decoder s ( Annotator (AuxiliaryDataRaw era)) Source #

label :: Proxy ( Annotator (AuxiliaryDataRaw era)) -> Text Source #

Crypto crypto => FromCBOR ( Annotator (HeaderRaw crypto))
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

( Typeable era, Era era) => FromCBOR ( Annotator (TxDatsRaw era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

Era era => FromCBOR ( Annotator (RedeemersRaw era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxWitness

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR ( Annotator (TxBodyRaw era))
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR ( Annotator (TxBodyRaw era))
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

( Era era, FromCBOR ( Annotator ( TxBody era)), FromCBOR ( Annotator ( AuxiliaryData era)), FromCBOR ( Annotator ( Witnesses era))) => FromCBOR ( Annotator (TxRaw era))
Instance details

Defined in Cardano.Ledger.Shelley.Tx

Crypto crypto => FromCBOR ( Annotator (MultiSigRaw crypto))
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

fromCBOR :: Decoder s ( Annotator (MultiSigRaw crypto)) Source #

label :: Proxy ( Annotator (MultiSigRaw crypto)) -> Text Source #

FromCBOR ( CertVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

FromCBOR ( CertVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

FromCBOR ( CertVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

FromCBOR ( SignKeyVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

FromCBOR ( SignKeyVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

FromCBOR ( SignKeyVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

FromCBOR ( VerKeyVRF MockVRF )
Instance details

Defined in Cardano.Crypto.VRF.Mock

FromCBOR ( VerKeyVRF SimpleVRF )
Instance details

Defined in Cardano.Crypto.VRF.Simple

FromCBOR ( VerKeyVRF PraosVRF )
Instance details

Defined in Cardano.Crypto.VRF.Praos

Typeable v => FromCBOR ( OutputVRF v)
Instance details

Defined in Cardano.Crypto.VRF.Class

FromCBOR ( SigDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

FromCBOR ( SigDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

FromCBOR ( SigDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

FromCBOR ( SigDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

FromCBOR ( SigDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

FromCBOR ( SigDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

FromCBOR ( SignKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

FromCBOR ( SignKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

FromCBOR ( SignKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

FromCBOR ( SignKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

FromCBOR ( SignKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

FromCBOR ( SignKeyDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

FromCBOR ( VerKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

FromCBOR ( VerKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

FromCBOR ( VerKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

FromCBOR ( VerKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

FromCBOR ( VerKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

FromCBOR ( VerKeyDSIGN Ed25519Bip32DSIGN ) Source #
Instance details

Defined in Cardano.Api.Crypto.Ed25519Bip32

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( SigKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => FromCBOR ( SigKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => FromCBOR ( SigKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( SigKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => FromCBOR ( SigKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => FromCBOR ( SigKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( SignKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => FromCBOR ( SignKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => FromCBOR ( SignKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( SignKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => FromCBOR ( SignKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => FromCBOR ( SignKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

( OptimizedKESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( VerKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => FromCBOR ( VerKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

( DSIGNAlgorithm d, Typeable d, KnownNat t, KnownNat ( SeedSizeDSIGN d * t)) => FromCBOR ( VerKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

( KESAlgorithm d, HashAlgorithm h, Typeable d) => FromCBOR ( VerKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => FromCBOR ( VerKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

KnownNat t => FromCBOR ( VerKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

Typeable a => FromCBOR ( Signature a)
Instance details

Defined in Cardano.Crypto.Signing.Signature

Typeable a => FromCBOR ( RedeemSignature a)
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Signature

( Era era, FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => FromCBOR ( UtxowPredicateFail era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxow

( Era era, FromCBOR ( TxOut era), FromCBOR ( Value era), FromCBOR ( PredicateFailure ( EraRule "UTXOS" era))) => FromCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxo

( Era era, FromCBOR ( PredicateFailure ( EraRule "PPUP" era))) => FromCBOR ( UtxosPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Utxos

Crypto crypto => FromCBOR ( CollectError crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.PlutusScriptApi

( Typeable era, FromCBOR ( BbodyPredicateFailure era)) => FromCBOR ( AlonzoBbodyPredFail era)
Instance details

Defined in Cardano.Ledger.Alonzo.Rules.Bbody

Crypto crypto => FromCBOR ( TxOutSource crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

Crypto crypto => FromCBOR ( TranslationError crypto)
Instance details

Defined in Cardano.Ledger.Alonzo.TxInfo

( Typeable c, Crypto c) => FromCBOR ( ScriptPurpose c)
Instance details

Defined in Cardano.Ledger.Alonzo.Tx

( Era era, DecodeNonNegative ( Value era), Show ( Value era), Compactible ( Value era)) => FromCBOR ( TxOut era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

Typeable era => FromCBOR ( BinaryData era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Era era => FromCBOR ( Datum era)
Instance details

Defined in Cardano.Ledger.Alonzo.Data

Era era => FromCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Era era => FromCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Alonzo.PParams

Crypto crypto => FromCBOR ( AuxiliaryDataHash crypto)
Instance details

Defined in Cardano.Ledger.AuxiliaryData

( Era era, Typeable era, FromCBOR ( TxOut era), FromCBOR ( Value era), FromCBOR ( PredicateFailure ( EraRule "UTXOS" era)), FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => FromCBOR ( BabbageUtxowPred era)
Instance details

Defined in Cardano.Ledger.Babbage.Rules.Utxow

( Era era, Typeable era, FromCBOR ( TxOut era), FromCBOR ( Value era), FromCBOR ( PredicateFailure ( EraRule "UTXOS" era)), FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => FromCBOR ( BabbageUtxoPred era)
Instance details

Defined in Cardano.Ledger.Babbage.Rules.Utxo

( Era era, DecodeNonNegative ( Value era), Show ( Value era), FromCBOR ( Annotator ( Script era)), Compactible ( Value era)) => FromCBOR ( TxOut era)
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Era era => FromCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Babbage.PParams

Era era => FromCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Babbage.PParams

FromCBOR ( ABlockSignature ByteSpan )
Instance details

Defined in Cardano.Chain.Block.Header

FromCBOR ( ABody ByteSpan )
Instance details

Defined in Cardano.Chain.Block.Body

FromCBOR ( APayload ByteSpan )
Instance details

Defined in Cardano.Chain.Update.Payload

FromCBOR ( AVote ByteSpan )
Instance details

Defined in Cardano.Chain.Update.Vote

FromCBOR n => FromCBOR ( TooLarge n)
Instance details

Defined in Cardano.Chain.Update.Validation.Registration

FromCBOR ( AProposal ByteSpan )
Instance details

Defined in Cardano.Chain.Update.Proposal

FromCBOR ( ATxPayload ByteSpan )
Instance details

Defined in Cardano.Chain.UTxO.TxPayload

FromCBOR ( ATxAux ByteSpan )
Instance details

Defined in Cardano.Chain.UTxO.TxAux

FromCBOR ( APayload ByteSpan )
Instance details

Defined in Cardano.Chain.Delegation.Payload

FromCBOR ( ACertificate ByteSpan )
Instance details

Defined in Cardano.Chain.Delegation.Certificate

FromCBOR a => FromCBOR ( MerkleRoot a)
Instance details

Defined in Cardano.Chain.Common.Merkle

( FromCBOR a, ToCBOR a) => FromCBOR ( MerkleTree a)
Instance details

Defined in Cardano.Chain.Common.Merkle

FromCBOR ( Attributes ())
Instance details

Defined in Cardano.Chain.Common.Attributes

FromCBOR ( Attributes AddrAttributes )
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

FromCBOR a => FromCBOR ( StrictMaybe a)
Instance details

Defined in Data.Maybe.Strict

Crypto crypto => FromCBOR ( TxId crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => FromCBOR ( TxIn crypto)
Instance details

Defined in Cardano.Ledger.TxIn

Crypto crypto => FromCBOR ( CompactAddr crypto)
Instance details

Defined in Cardano.Ledger.CompactAddress

Crypto crypto => FromCBOR ( Addr crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => FromCBOR ( RewardAcnt crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => FromCBOR ( BlocksMade crypto)
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => FromCBOR ( IndividualPoolStake crypto)
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto crypto => FromCBOR ( PoolDistr crypto)
Instance details

Defined in Cardano.Ledger.PoolDistr

Crypto crypto => FromCBOR ( GenDelegPair crypto)
Instance details

Defined in Cardano.Ledger.Keys

Crypto crypto => FromCBOR ( GenDelegs crypto)
Instance details

Defined in Cardano.Ledger.Keys

( FromCBORGroup a, ToCBORGroup a) => FromCBOR ( CBORGroup a)
Instance details

Defined in Cardano.Ledger.Serialization

FromCBOR a => FromCBOR ( CborSeq a)
Instance details

Defined in Cardano.Ledger.Serialization

FromCBOR a => FromCBOR ( Sized a)
Instance details

Defined in Cardano.Ledger.Serialization

Crypto crypto => FromCBOR ( ScriptHash crypto)
Instance details

Defined in Cardano.Ledger.Hashes

FromCBOR ( CompactForm Coin )
Instance details

Defined in Cardano.Ledger.Coin

FromCBOR ( CompactForm DeltaCoin )
Instance details

Defined in Cardano.Ledger.Coin

Crypto crypto => FromCBOR ( CompactForm ( Value crypto))
Instance details

Defined in Cardano.Ledger.Mary.Value

( Era era, FromCBOR ( PredicateFailure ( EraRule "LEDGER" era))) => FromCBOR ( ApplyTxError era)
Instance details

Defined in Cardano.Ledger.Shelley.API.Mempool

Crypto crypto => FromCBOR ( ShelleyGenesisStaking crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Era era => FromCBOR ( ShelleyGenesis era)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

( Era era, FromCBOR ( PredicateFailure ( EraRule "LEDGER" era))) => FromCBOR ( LedgersPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ledgers

( FromCBOR ( PredicateFailure ( EraRule "DELEGS" era)), FromCBOR ( PredicateFailure ( EraRule "UTXOW" era)), Era era) => FromCBOR ( LedgerPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ledger

( Era era, FromCBOR ( PredicateFailure ( EraRule "DELPL" era)), Typeable ( Script era)) => FromCBOR ( DelegsPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Delegs

( Era era, FromCBOR ( PredicateFailure ( EraRule "POOL" era)), FromCBOR ( PredicateFailure ( EraRule "DELEG" era)), Typeable ( Script era)) => FromCBOR ( DelplPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Delpl

( Era era, Typeable ( Script era)) => FromCBOR ( DelegPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Deleg

Era era => FromCBOR ( PoolPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Pool

( Era era, FromCBOR ( PredicateFailure ( EraRule "UTXO" era)), Typeable ( Script era), Typeable ( AuxiliaryData era)) => FromCBOR ( UtxowPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Utxow

( TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative ( Value era), Show ( Value era), FromCBOR ( PredicateFailure ( EraRule "PPUP" era))) => FromCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Utxo

Era era => FromCBOR ( PpupPredicateFailure era)
Instance details

Defined in Cardano.Ledger.Shelley.Rules.Ppup

Crypto crypto => FromCBOR ( FutureGenDeleg crypto)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( FromCBOR ( PParams era), TransValue FromCBOR era, HashAnnotated ( TxBody era) EraIndependentTxBody ( Crypto era), FromSharedCBOR ( TxOut era), Share ( TxOut era) ~ Interns ( Credential ' Staking ( Crypto era)), FromCBOR ( State ( EraRule "PPUP" era)), Era era) => FromCBOR ( EpochState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, FromCBOR ( PParamsDelta era)) => FromCBOR ( PPUPState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( Era era, FromCBOR ( PParams era), FromSharedCBOR ( TxOut era), Share ( TxOut era) ~ Interns ( Credential ' Staking ( Crypto era)), FromCBOR ( Value era), FromCBOR ( State ( EraRule "PPUP" era)), FromCBOR ( StashedAVVMAddresses era)) => FromCBOR ( NewEpochState era)
Instance details

Defined in Cardano.Ledger.Shelley.LedgerState

( FromCBOR ( TxOut era), Era era) => FromCBOR ( UTxO era)
Instance details

Defined in Cardano.Ledger.Shelley.UTxO

Crypto c => FromCBOR ( RewardAns c)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto c => FromCBOR ( Pulser c)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( RewardUpdate crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( RewardSnapShot crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( FreeVars crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( PulsingRewUpdate crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardUpdate

Crypto crypto => FromCBOR ( Reward crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => FromCBOR ( LeaderOnlyReward crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => FromCBOR ( PoolRewardInfo crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Rewards

Crypto crypto => FromCBOR ( RewardProvenancePool crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => FromCBOR ( RewardProvenance crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => FromCBOR ( PoolParams crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( Wdrl crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

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

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( MIRTarget crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( MIRCert crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( DCert crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( FromCBOR ( TxOut era), Era era, FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR ( TxBodyRaw era)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromCBOR ( StakeCreds crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Era era => FromCBOR ( PParams era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

( Era era, FromCBOR ( PParamsDelta era)) => FromCBOR ( Update era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

Era era => FromCBOR ( PParamsUpdate era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

( Era era, FromCBOR ( PParamsDelta era)) => FromCBOR ( ProposedPPUpdates era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

( TransValue FromCBOR era, TransUTxO FromCBOR era, DecodeNonNegative ( Value era), Show ( Value era), FromCBOR ( PredicateFailure ( EraRule "PPUP" era))) => FromCBOR ( UtxoPredicateFailure era)
Instance details

Defined in Cardano.Ledger.ShelleyMA.Rules.Utxo

FamsFrom era => FromCBOR ( TxBodyRaw era)
Instance details

Defined in Cardano.Ledger.ShelleyMA.TxBody

Crypto crypto => FromCBOR ( PolicyID crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => FromCBOR ( Value crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Crypto crypto => FromCBOR ( ChainDepState crypto)
Instance details

Defined in Cardano.Protocol.TPraos.API

Crypto crypto => FromCBOR ( PrtclState crypto)
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Prtcl

Crypto crypto => FromCBOR ( OBftSlot crypto)
Instance details

Defined in Cardano.Protocol.TPraos.Rules.Overlay

Crypto crypto => FromCBOR ( HashHeader crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => FromCBOR ( PrevHash crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => FromCBOR ( BHBody crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

Crypto crypto => FromCBOR ( LastAppliedBlock crypto)
Instance details

Defined in Cardano.Protocol.TPraos.BHeader

( Serialise t, Typeable t) => FromCBOR ( WithOrigin t)
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR a => FromCBOR ( Vector a)
Instance details

Defined in Cardano.Binary.FromCBOR

PraosCrypto c => FromCBOR ( PraosState c)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => FromCBOR ( TPraosState c)
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Crypto crypto => FromCBOR ( HeaderBody crypto)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

Era era => FromCBOR ( CompactGenesis era)
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Config

Crypto crypto => FromCBOR ( ShelleyHash crypto)
Instance details

Defined in Ouroboros.Consensus.Shelley.Protocol.Abstract

FromCBOR ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

Crypto crypto => FromCBOR (HeaderRaw crypto)
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Header

Methods

fromCBOR :: Decoder s (HeaderRaw crypto) Source #

label :: Proxy (HeaderRaw crypto) -> Text Source #

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR (TxBodyRaw era)
Instance details

Defined in Cardano.Ledger.Alonzo.TxBody

Methods

fromCBOR :: Decoder s (TxBodyRaw era) Source #

label :: Proxy (TxBodyRaw era) -> Text Source #

( Era era, Typeable ( Script era), Typeable ( AuxiliaryData era), Compactible ( Value era), Show ( Value era), DecodeNonNegative ( Value era), FromCBOR ( Annotator ( Script era)), FromCBOR ( PParamsDelta era), ToCBOR ( PParamsDelta era)) => FromCBOR (TxBodyRaw era)
Instance details

Defined in Cardano.Ledger.Babbage.TxBody

Methods

fromCBOR :: Decoder s (TxBodyRaw era) Source #

label :: Proxy (TxBodyRaw era) -> Text Source #

Crypto crypto => FromCBOR (CompactValue crypto)
Instance details

Defined in Cardano.Ledger.Mary.Value

Methods

fromCBOR :: Decoder s (CompactValue crypto) Source #

label :: Proxy (CompactValue crypto) -> Text Source #

FromCBOR ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

FromCBOR ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

FromCBOR ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

( Typeable lang, HasTypeProxy lang) => FromCBOR ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

( Typeable era, Era ( ShelleyLedgerEra era), FromCBOR ( PParams ( ShelleyLedgerEra era)), FromCBOR ( StashedAVVMAddresses ( ShelleyLedgerEra era)), FromCBOR ( Value ( ShelleyLedgerEra era)), FromCBOR ( State ( EraRule "PPUP" ( ShelleyLedgerEra era))), Share ( TxOut ( ShelleyLedgerEra era)) ~ Interns ( Credential ' Staking ( Crypto ( ShelleyLedgerEra era))), FromSharedCBOR ( TxOut ( ShelleyLedgerEra era))) => FromCBOR ( DebugLedgerState era) Source #
Instance details

Defined in Cardano.Api.Query

( FromCBOR a, FromCBOR b) => FromCBOR ( Either a b)
Instance details

Defined in Cardano.Binary.FromCBOR

( FromCBOR a, FromCBOR b) => FromCBOR (a, b)
Instance details

Defined in Cardano.Binary.FromCBOR

( Ord k, FromCBOR k, FromCBOR v) => FromCBOR ( Map k v)
Instance details

Defined in Cardano.Binary.FromCBOR

( VRFAlgorithm v, Typeable a) => FromCBOR ( CertifiedVRF v a)
Instance details

Defined in Cardano.Crypto.VRF.Class

( HashAlgorithm h, Typeable a) => FromCBOR ( Hash h a)
Instance details

Defined in Cardano.Crypto.Hash.Class

( Typeable algo, Typeable a, HashAlgorithm algo) => FromCBOR ( AbstractHash algo a)
Instance details

Defined in Cardano.Crypto.Hashing

( Typeable kr, Crypto crypto) => FromCBOR ( Credential kr crypto)
Instance details

Defined in Cardano.Ledger.Credential

( Crypto crypto, Typeable kd) => FromCBOR ( VKey kd crypto)
Instance details

Defined in Cardano.Ledger.Keys

( Crypto crypto, Typeable disc) => FromCBOR ( KeyHash disc crypto)
Instance details

Defined in Cardano.Ledger.Keys

( Typeable index, Crypto c) => FromCBOR ( SafeHash c index)
Instance details

Defined in Cardano.Ledger.SafeHash

( FromCBOR a, Bounded (BoundedRatio b a), Bounded a, Integral a, Typeable b, Typeable a, Show a) => FromCBOR (BoundedRatio b a)
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

fromCBOR :: Decoder s (BoundedRatio b a) Source #

label :: Proxy (BoundedRatio b a) -> Text Source #

( FromCBOR a, FromCBOR b, FromCBOR c) => FromCBOR (a, b, c)
Instance details

Defined in Cardano.Binary.FromCBOR

( Ord a, Ord b, FromCBOR a, FromCBOR b) => FromCBOR ( BiMap b a b)
Instance details

Defined in Data.BiMap

( Typeable s, FromCBOR a) => FromCBOR ( Tagged s a)
Instance details

Defined in Cardano.Binary.FromCBOR

( FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v, Typeable kv, Typeable vv) => FromCBOR ( KVVector kv vv (k, v))
Instance details

Defined in Data.VMap.KVVector

( FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d) => FromCBOR (a, b, c, d)
Instance details

Defined in Cardano.Binary.FromCBOR

( Typeable kv, Typeable vv, FromCBOR k, FromCBOR v, Ord k, Vector kv k, Vector vv v) => FromCBOR ( VMap kv vv k v)
Instance details

Defined in Data.VMap

( FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e) => FromCBOR (a, b, c, d, e)
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e) Source #

label :: Proxy (a, b, c, d, e) -> Text Source #

( FromCBOR a, FromCBOR b, FromCBOR c, FromCBOR d, FromCBOR e, FromCBOR f, FromCBOR g) => FromCBOR (a, b, c, d, e, f, g)
Instance details

Defined in Cardano.Binary.FromCBOR

Methods

fromCBOR :: Decoder s (a, b, c, d, e, f, g) Source #

label :: Proxy (a, b, c, d, e, f, g) -> Text Source #

JSON

class ToJSON a Source #

A type that can be converted to JSON.

Instances in general must specify toJSON and should (but don't need to) specify toEncoding .

An example type and instance:

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance ToJSON Coord where
  toJSON (Coord x y) = object ["x" .= x, "y" .= y]

  toEncoding (Coord x y) = pairs ("x" .= x <> "y" .= y)

Instead of manually writing your ToJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.
  • The compiler can provide a default generic implementation for toJSON .

To use the second, simply add a deriving Generic clause to your datatype and declare a ToJSON instance. If you require nothing other than defaultOptions , it is sufficient to write (and this is the only alternative where the default toJSON implementation is sufficient):

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance ToJSON Coord where
    toEncoding = genericToEncoding defaultOptions

If on the other hand you wish to customize the generic decoding, you have to implement both methods:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance ToJSON Coord where
    toJSON     = genericToJSON customOptions
    toEncoding = genericToEncoding customOptions

Previous versions of this library only had the toJSON method. Adding toEncoding had two reasons:

  1. toEncoding is more efficient for the common case that the output of toJSON is directly serialized to a ByteString . Further, expressing either method in terms of the other would be non-optimal.
  2. The choice of defaults allows a smooth transition for existing users: Existing instances that do not define toEncoding still compile and have the correct semantics. This is ensured by making the default implementation of toEncoding use toJSON . This produces correct results, but since it performs an intermediate conversion to a Value , it will be less efficient than directly emitting an Encoding . (this also means that specifying nothing more than instance ToJSON Coord would be sufficient as a generically decoding instance, but there probably exists no good reason to not specify toEncoding in new instances.)

Instances

Instances details
ToJSON Bool
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Char
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Double
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Float
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int8
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int16
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int32
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Int64
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Integer
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Natural
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Ordering
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word8
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word16
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word32
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Word64
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ()
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Version
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Scientific
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON UTCTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Text
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Value
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON DotNetTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Key
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Text
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Number
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Void
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ByteString64
Instance details

Defined in Data.ByteString.Base64.Type

ToJSON ByteSpan
Instance details

Defined in Cardano.Binary.Annotated

ToJSON VerificationKey
Instance details

Defined in Cardano.Crypto.Signing.VerificationKey

ToJSON CompactRedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Compact

ToJSON RedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.VerificationKey

ToJSON ProtocolMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON ProtocolMagicId
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON RequiresNetworkMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

ToJSON AlonzoGenesis
Instance details

Defined in Cardano.Ledger.Alonzo.Genesis

ToJSON Proof
Instance details

Defined in Cardano.Chain.Block.Proof

ToJSON ProposalBody
Instance details

Defined in Cardano.Chain.Update.Proposal

ToJSON SystemTag
Instance details

Defined in Cardano.Chain.Update.SystemTag

ToJSON SoftwareVersion
Instance details

Defined in Cardano.Chain.Update.SoftwareVersion

ToJSON ProtocolParametersUpdate
Instance details

Defined in Cardano.Chain.Update.ProtocolParametersUpdate

ToJSON SoftforkRule
Instance details

Defined in Cardano.Chain.Update.SoftforkRule

ToJSON ProtocolVersion
Instance details

Defined in Cardano.Chain.Update.ProtocolVersion

ToJSON InstallerHash
Instance details

Defined in Cardano.Chain.Update.InstallerHash

ToJSON ApplicationName
Instance details

Defined in Cardano.Chain.Update.ApplicationName

ToJSON TxProof
Instance details

Defined in Cardano.Chain.UTxO.TxProof

ToJSON TxInWitness
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

ToJSON TxSigData
Instance details

Defined in Cardano.Chain.UTxO.TxWitness

ToJSON Tx
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToJSON TxIn
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToJSON TxOut
Instance details

Defined in Cardano.Chain.UTxO.Tx

ToJSON SscPayload
Instance details

Defined in Cardano.Chain.Ssc

ToJSON SscProof
Instance details

Defined in Cardano.Chain.Ssc

ToJSON SlotNumber
Instance details

Defined in Cardano.Chain.Slotting.SlotNumber

ToJSON EpochNumber
Instance details

Defined in Cardano.Chain.Slotting.EpochNumber

ToJSON GenesisHash
Instance details

Defined in Cardano.Chain.Genesis.Hash

ToJSON TxFeePolicy
Instance details

Defined in Cardano.Chain.Common.TxFeePolicy

ToJSON TxSizeLinear
Instance details

Defined in Cardano.Chain.Common.TxSizeLinear

ToJSON Address
Instance details

Defined in Cardano.Chain.Common.Address

ToJSON AddrAttributes
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

ToJSON HDAddressPayload
Instance details

Defined in Cardano.Chain.Common.AddrAttributes

ToJSON NetworkMagic
Instance details

Defined in Cardano.Chain.Common.NetworkMagic

ToJSON LovelacePortion
Instance details

Defined in Cardano.Chain.Common.LovelacePortion

ToJSON Lovelace
Instance details

Defined in Cardano.Chain.Common.Lovelace

ToJSON ChainDifficulty
Instance details

Defined in Cardano.Chain.Common.ChainDifficulty

ToJSON UnparsedFields
Instance details

Defined in Cardano.Chain.Common.Attributes

ToJSON AddrType
Instance details

Defined in Cardano.Chain.Common.AddrSpendingData

ToJSON Ptr Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ProtVer
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON NonNegativeInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON PositiveUnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON UnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Nonce
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Url
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON DnsName
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Port
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Network
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON TxIx Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON CertIx Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON Coin
Instance details

Defined in Cardano.Ledger.Coin

ToJSON DeltaCoin Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON EpochSize
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

ToJSON RewardInfoPool
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

ToJSON RewardParams
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

ToJSON AccountState Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON Likelihood Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON RewardType Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON Desirability
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

ToJSON PoolMetadata
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToJSON StakePoolRelay
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToJSON AssetName Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON IntSet
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON SystemStart Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON DiffTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON NominalDiffTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON PeerAdvertise
Instance details

Defined in Ouroboros.Network.PeerSelection.Types

ToJSON CekMachineCosts
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

ToJSON ModelOneArgument
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelAddedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelSubtractedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelLinearSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelMultipliedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelMinSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelMaxSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelConstantOrLinear
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelConstantOrTwoArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelTwoArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelThreeArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelFourArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelFiveArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ModelSixArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

ToJSON ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

ToJSON ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

ToJSON SatInt
Instance details

Defined in Data.SatInt

ToJSON CoverageReport
Instance details

Defined in PlutusTx.Coverage

ToJSON CoverageData
Instance details

Defined in PlutusTx.Coverage

ToJSON CoverageIndex
Instance details

Defined in PlutusTx.Coverage

ToJSON CoverageAnnotation
Instance details

Defined in PlutusTx.Coverage

ToJSON Metadata
Instance details

Defined in PlutusTx.Coverage

ToJSON CoverageMetadata
Instance details

Defined in PlutusTx.Coverage

ToJSON CovLoc
Instance details

Defined in PlutusTx.Coverage

ToJSON StudentT
Instance details

Defined in Statistics.Distribution.StudentT

ToJSON ShortText

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ZonedTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON LocalTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON TimeOfDay
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CalendarDiffTime
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON SystemTime

Encoded as number

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON DayOfWeek
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Day
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON CalendarDiffDays
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON QuarterOfYear
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Quarter
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON Month
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON UUID
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

ToJSON TextEnvelope Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

ToJSON TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

ToJSON TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

ToJSON TxIx Source #
Instance details

Defined in Cardano.Api.TxIn

ToJSON TxIn Source #
Instance details

Defined in Cardano.Api.TxIn

ToJSON TxId Source #
Instance details

Defined in Cardano.Api.TxIn

ToJSON ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

ToJSON ExecutionUnits Source #
Instance details

Defined in Cardano.Api.Script

ToJSON ScriptInAnyLang Source #
Instance details

Defined in Cardano.Api.Script

ToJSON AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

ToJSON StakeCredential Source #
Instance details

Defined in Cardano.Api.Address

ToJSON StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

ToJSON ValueNestedRep Source #
Instance details

Defined in Cardano.Api.Value

ToJSON Value Source #
Instance details

Defined in Cardano.Api.Value

ToJSON AssetName Source #
Instance details

Defined in Cardano.Api.Value

ToJSON PolicyId Source #
Instance details

Defined in Cardano.Api.Value

ToJSON Quantity Source #
Instance details

Defined in Cardano.Api.Value

ToJSON Lovelace Source #
Instance details

Defined in Cardano.Api.Value

ToJSON CostModel Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON ProtocolParameters Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON ChainTip Source #
Instance details

Defined in Cardano.Api.Block

ToJSON a => ToJSON [a]
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Maybe a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, Integral a) => ToJSON ( Ratio a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( First a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Last a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Set a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( NonEmpty a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Identity a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Solo a)

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON v => ToJSON ( KeyMap v)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON v => ToJSON ( Tree v)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Min a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Max a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( WrappedMonoid a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Option a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( First a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Last a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Dual a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ( Signature w)
Instance details

Defined in Cardano.Crypto.Signing.Signature

ToJSON a => ToJSON ( RedeemSignature a)
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Signature

( Era era, Crypto era ~ StandardCrypto ) => ToJSON ( Datum era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( Script ( BabbageEra StandardCrypto )) Source #
Instance details

Defined in Cardano.Api.Orphans

( Era era, ToJSON ( Value era), ToJSON ( Datum era), ToJSON ( Script era), Crypto era ~ StandardCrypto ) => ToJSON ( TxOut era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( PParamsUpdate era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( PParams ( BabbageEra StandardCrypto )) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON a => ToJSON ( ABlock a)
Instance details

Defined in Cardano.Chain.Block.Block

ToJSON a => ToJSON ( ABlockOrBoundary a)
Instance details

Defined in Cardano.Chain.Block.Block

ToJSON a => ToJSON ( ABoundaryBody a)
Instance details

Defined in Cardano.Chain.Block.Block

ToJSON a => ToJSON ( ABoundaryBlock a)
Instance details

Defined in Cardano.Chain.Block.Block

ToJSON a => ToJSON ( AHeader a)
Instance details

Defined in Cardano.Chain.Block.Header

ToJSON a => ToJSON ( ABoundaryHeader a)
Instance details

Defined in Cardano.Chain.Block.Header

ToJSON a => ToJSON ( ABlockSignature a)
Instance details

Defined in Cardano.Chain.Block.Header

ToJSON a => ToJSON ( ABody a)
Instance details

Defined in Cardano.Chain.Block.Body

ToJSON a => ToJSON ( APayload a)
Instance details

Defined in Cardano.Chain.Update.Payload

ToJSON a => ToJSON ( AVote a)
Instance details

Defined in Cardano.Chain.Update.Vote

ToJSON a => ToJSON ( AProposal a)
Instance details

Defined in Cardano.Chain.Update.Proposal

ToJSON a => ToJSON ( ATxPayload a)
Instance details

Defined in Cardano.Chain.UTxO.TxPayload

ToJSON a => ToJSON ( ATxAux a)
Instance details

Defined in Cardano.Chain.UTxO.TxAux

ToJSON a => ToJSON ( APayload a)
Instance details

Defined in Cardano.Chain.Delegation.Payload

ToJSON a => ToJSON ( ACertificate a)
Instance details

Defined in Cardano.Chain.Delegation.Certificate

ToJSON a => ToJSON ( MerkleRoot a)
Instance details

Defined in Cardano.Chain.Common.Merkle

ToJSON a => ToJSON ( Attributes a)
Instance details

Defined in Cardano.Chain.Common.Attributes

ToJSON a => ToJSON ( StrictMaybe a)
Instance details

Defined in Data.Maybe.Strict

Crypto crypto => ToJSON ( UnifiedMap crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( TxIn crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( Addr crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => ToJSON ( RewardAcnt crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => ToJSON ( BlocksMade crypto)
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => ToJSON ( IndividualPoolStake crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( PoolDistr crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( GenDelegPair crypto)
Instance details

Defined in Cardano.Ledger.Keys

Crypto crypto => ToJSON ( GenDelegs crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( ScriptHash crypto)
Instance details

Defined in Cardano.Ledger.Hashes

Crypto crypto => ToJSON ( ShelleyGenesisStaking crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Era era => ToJSON ( ShelleyGenesis era)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto crypto => ToJSON ( FutureGenDeleg crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( InstantaneousRewards crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( DState crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( PState crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( DPState crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

( ShelleyBasedEra era, ToJSON ( TxOut era), ToJSON ( PParams era), ToJSON ( PParamsDelta era)) => ToJSON ( EpochState era) Source #
Instance details

Defined in Cardano.Api.Orphans

( ToJSON ( PParamsDelta era), UsesPParams era) => ToJSON ( PPUPState era) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( IncrementalStake crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

( ShelleyBasedEra era, ToJSON ( TxOut era), ToJSON ( PParamsDelta era)) => ToJSON ( UTxOState era) Source #
Instance details

Defined in Cardano.Api.Orphans

( ShelleyBasedEra era, ToJSON ( TxOut era), ToJSON ( PParamsDelta era)) => ToJSON ( LedgerState era) Source #
Instance details

Defined in Cardano.Api.Orphans

( ShelleyBasedEra era, ToJSON ( TxOut era)) => ToJSON ( UTxO era) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( RewardUpdate crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( PulsingRewUpdate crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( NonMyopic crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( Reward crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( Stake crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( SnapShot crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( SnapShots crypto) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( RewardProvenancePool crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => ToJSON ( RewardProvenance crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => ToJSON ( PoolParams crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

( ShelleyBasedEra era, ToJSON ( Value era)) => ToJSON ( TxOut era) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( StakeCreds crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

ToJSON ( PParams era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

ToJSON ( PParamsUpdate era) Source #
Instance details

Defined in Cardano.Api.Orphans

( ToJSON ( PParamsDelta era), UsesPParams era) => ToJSON ( ProposedPPUpdates era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( PolicyID era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON ( Value era) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON a => ToJSON ( Seq a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( IntMap a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON1 f => ToJSON ( Fix f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON1 f, Functor f) => ToJSON ( Mu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON1 f, Functor f) => ToJSON ( Nu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( DNonEmpty a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( DList a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( Prim a, ToJSON a) => ToJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( Storable a, ToJSON a) => ToJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( Vector Vector a, ToJSON a) => ToJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( HashSet a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( StrictSeq a)
Instance details

Defined in Data.Sequence.Strict

ToJSON ( BuiltinCostModelBase MCostingFun )
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON ( BuiltinCostModelBase CostingFun )
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON a => ToJSON ( MCostingFun a)
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

ToJSON model => ToJSON ( CostingFun model)
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

( Prim a, ToJSON a) => ToJSON ( PrimArray a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( SmallArray a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Array a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON d => ToJSON ( LinearTransform d)
Instance details

Defined in Statistics.Distribution.Transform

ToJSON a => ToJSON ( Maybe a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ( CardanoEra era) Source #
Instance details

Defined in Cardano.Api.Eras

ToJSON ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

ToJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

IsCardanoEra era => ToJSON ( ReferenceScript era) Source #
Instance details

Defined in Cardano.Api.Script

ToJSON ( SimpleScript lang) Source #
Instance details

Defined in Cardano.Api.Script

IsCardanoEra era => ToJSON ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

ToJSON ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

ToJSON ( MultiAssetSupportedInEra era) Source #
Instance details

Defined in Cardano.Api.TxBody

( IsShelleyBasedEra era, ShelleyLedgerEra era ~ ledgerera, ShelleyBasedEra ledgerera, ToJSON ( PParams ledgerera), ToJSON ( PParamsDelta ledgerera), ToJSON ( TxOut ledgerera), Share ( TxOut ( ShelleyLedgerEra era)) ~ Interns ( Credential ' Staking ( Crypto ( ShelleyLedgerEra era)))) => ToJSON ( DebugLedgerState era) Source #
Instance details

Defined in Cardano.Api.Query

IsCardanoEra era => ToJSON ( UTxO era) Source #
Instance details

Defined in Cardano.Api.Query

( ToJSON a, ToJSON b) => ToJSON ( Either a b)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b) => ToJSON (a, b)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON v, ToJSONKey k) => ToJSON ( Map k v)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON ( Proxy a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON v, ToJSONKey k) => ToJSON ( HashMap k v)
Instance details

Defined in Data.Aeson.Types.ToJSON

HasResolution a => ToJSON ( Fixed a)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON b => ToJSON ( Annotated b a)
Instance details

Defined in Cardano.Binary.Annotated

HashAlgorithm h => ToJSON ( Hash h a)
Instance details

Defined in Cardano.Crypto.Hash.Class

ToJSON ( AbstractHash algo a)
Instance details

Defined in Cardano.Crypto.Hashing

Crypto crypto => ToJSON ( Bimap Ptr ( Credential ' Staking crypto)) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( Credential kr crypto)
Instance details

Defined in Cardano.Ledger.Credential

Crypto crypto => ToJSON ( KeyHash disc crypto)
Instance details

Defined in Cardano.Ledger.Keys

Crypto c => ToJSON ( SafeHash c a) Source #
Instance details

Defined in Cardano.Api.Orphans

( ToJSON a, ToJSONKey k) => ToJSON ( MonoidalMap k a)
Instance details

Defined in Data.Map.Monoidal

( ToJSON a, ToJSON b) => ToJSON ( These a b)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b) => ToJSON ( Pair a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b) => ToJSON ( These a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b) => ToJSON ( Either a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON (BoundedRatio b Word64 )
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON ( EraInMode era mode) Source #
Instance details

Defined in Cardano.Api.Modes

ToJSON ( ScriptLanguageInEra lang era) Source #
Instance details

Defined in Cardano.Api.Script

IsCardanoEra era => ToJSON ( TxOut ctx era) Source #
Instance details

Defined in Cardano.Api.TxBody

( ToJSON a, ToJSON b, ToJSON c) => ToJSON (a, b, c)
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSON a => ToJSON ( Const a b)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON coin, ToJSON ptr, ToJSON pool) => ToJSON ( Trip coin ptr pool) Source #
Instance details

Defined in Cardano.Api.Orphans

ToJSON b => ToJSON ( Tagged a b)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON ( These1 f g a)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b, ToJSON c, ToJSON d) => ToJSON (a, b, c, d)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON ( Product f g a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON ( Sum f g a)
Instance details

Defined in Data.Aeson.Types.ToJSON

Crypto crypto => ToJSON ( VMap VB VB ( Credential ' Staking crypto) ( KeyHash ' StakePool crypto)) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( VMap VB VB ( KeyHash ' StakePool crypto) ( PoolParams crypto)) Source #
Instance details

Defined in Cardano.Api.Orphans

Crypto crypto => ToJSON ( VMap VB VP ( Credential ' Staking crypto) ( CompactForm Coin )) Source #
Instance details

Defined in Cardano.Api.Orphans

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e) => ToJSON (a, b, c, d, e)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e) -> Value Source #

toEncoding :: (a, b, c, d, e) -> Encoding Source #

toJSONList :: [(a, b, c, d, e)] -> Value Source #

toEncodingList :: [(a, b, c, d, e)] -> Encoding Source #

( ToJSON1 f, ToJSON1 g, ToJSON a) => ToJSON ( Compose f g a)
Instance details

Defined in Data.Aeson.Types.ToJSON

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f) => ToJSON (a, b, c, d, e, f)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f) -> Value Source #

toEncoding :: (a, b, c, d, e, f) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g) => ToJSON (a, b, c, d, e, f, g)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h) => ToJSON (a, b, c, d, e, f, g, h)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i) => ToJSON (a, b, c, d, e, f, g, h, i)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j) => ToJSON (a, b, c, d, e, f, g, h, i, j)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k) => ToJSON (a, b, c, d, e, f, g, h, i, j, k)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] -> Encoding Source #

( ToJSON a, ToJSON b, ToJSON c, ToJSON d, ToJSON e, ToJSON f, ToJSON g, ToJSON h, ToJSON i, ToJSON j, ToJSON k, ToJSON l, ToJSON m, ToJSON n, ToJSON o) => ToJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Value Source #

toEncoding :: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Encoding Source #

toJSONList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Value Source #

toEncodingList :: [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] -> Encoding Source #

class FromJSON a Source #

A type that can be converted from JSON, with the possibility of failure.

In many cases, you can get the compiler to generate parsing code for you (see below). To begin, let's cover writing an instance by hand.

There are various reasons a conversion could fail. For example, an Object could be missing a required key, an Array could be of the wrong size, or a value could be of an incompatible type.

The basic ways to signal a failed conversion are as follows:

  • fail yields a custom error message: it is the recommended way of reporting a failure;
  • empty (or mzero ) is uninformative: use it when the error is meant to be caught by some ( <|> ) ;
  • typeMismatch can be used to report a failure when the encountered value is not of the expected JSON type; unexpected is an appropriate alternative when more than one type may be expected, or to keep the expected type implicit.

prependFailure (or modifyFailure ) add more information to a parser's error messages.

An example type and instance using typeMismatch and prependFailure :

-- Allow ourselves to write Text literals.
{-# LANGUAGE OverloadedStrings #-}

data Coord = Coord { x :: Double, y :: Double }

instance FromJSON Coord where
    parseJSON (Object v) = Coord
        <$> v .: "x"
        <*> v .: "y"

    -- We do not expect a non-Object value here.
    -- We could use empty to fail, but typeMismatch
    -- gives a much more informative error message.
    parseJSON invalid    =
        prependFailure "parsing Coord failed, "
            (typeMismatch "Object" invalid)

For this common case of only being concerned with a single type of JSON value, the functions withObject , withScientific , etc. are provided. Their use is to be preferred when possible, since they are more terse. Using withObject , we can rewrite the above instance (assuming the same language extension and data type) as:

instance FromJSON Coord where
    parseJSON = withObject "Coord" $ \v -> Coord
        <$> v .: "x"
        <*> v .: "y"

Instead of manually writing your FromJSON instance, there are two options to do it automatically:

  • Data.Aeson.TH provides Template Haskell functions which will derive an instance at compile time. The generated instance is optimized for your type so it will probably be more efficient than the following option.
  • The compiler can provide a default generic implementation for parseJSON .

To use the second, simply add a deriving Generic clause to your datatype and declare a FromJSON instance for your datatype without giving a definition for parseJSON .

For example, the previous example can be simplified to just:

{-# LANGUAGE DeriveGeneric #-}

import GHC.Generics

data Coord = Coord { x :: Double, y :: Double } deriving Generic

instance FromJSON Coord

The default implementation will be equivalent to parseJSON = genericParseJSON defaultOptions ; if you need different options, you can customize the generic decoding by defining:

customOptions = defaultOptions
                { fieldLabelModifier = map toUpper
                }

instance FromJSON Coord where
    parseJSON = genericParseJSON customOptions

Instances

Instances details
FromJSON Bool
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Char
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Double
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Float
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int8
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int16
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int32
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Int64
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Integer

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Natural
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Ordering
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word8
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word16
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word32
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Word64
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ()
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Version
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Scientific
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON UTCTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Text
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Value
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON DotNetTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Key
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Text
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Void
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ByteString64
Instance details

Defined in Data.ByteString.Base64.Type

FromJSON VerificationKey
Instance details

Defined in Cardano.Crypto.Signing.VerificationKey

FromJSON CompactRedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Compact

FromJSON RedeemVerificationKey
Instance details

Defined in Cardano.Crypto.Signing.Redeem.VerificationKey

FromJSON ProtocolMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromJSON ProtocolMagicId
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromJSON RequiresNetworkMagic
Instance details

Defined in Cardano.Crypto.ProtocolMagic

FromJSON AlonzoGenesis
Instance details

Defined in Cardano.Ledger.Alonzo.Genesis

FromJSON ProtVer
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON NonNegativeInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON PositiveInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON PositiveUnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON UnitInterval
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Nonce
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Url
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON DnsName
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Port
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Network
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON Coin
Instance details

Defined in Cardano.Ledger.Coin

FromJSON EpochSize
Instance details

Defined in Cardano.Slotting.Slot

FromJSON EpochNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON SlotNo
Instance details

Defined in Cardano.Slotting.Slot

FromJSON RewardInfoPool
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

FromJSON RewardParams
Instance details

Defined in Cardano.Ledger.Shelley.API.Wallet

FromJSON Desirability
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

FromJSON PoolMetadata
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromJSON StakePoolRelay
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromJSON IntSet
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON SystemStart Source #
Instance details

Defined in Cardano.Api.Orphans

FromJSON DiffTime

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON NominalDiffTime

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON PeerAdvertise
Instance details

Defined in Ouroboros.Network.PeerSelection.Types

FromJSON CekMachineCosts
Instance details

Defined in UntypedPlutusCore.Evaluation.Machine.Cek.CekMachineCosts

FromJSON ModelOneArgument
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelAddedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelSubtractedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelLinearSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelMultipliedSizes
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelMinSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelMaxSize
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelConstantOrLinear
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelConstantOrTwoArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelTwoArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelThreeArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelFourArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelFiveArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ModelSixArguments
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON ExBudget
Instance details

Defined in PlutusCore.Evaluation.Machine.ExBudget

FromJSON ExMemory
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON ExCPU
Instance details

Defined in PlutusCore.Evaluation.Machine.ExMemory

FromJSON SatInt
Instance details

Defined in Data.SatInt

FromJSON CoverageReport
Instance details

Defined in PlutusTx.Coverage

FromJSON CoverageData
Instance details

Defined in PlutusTx.Coverage

FromJSON CoverageIndex
Instance details

Defined in PlutusTx.Coverage

FromJSON CoverageAnnotation
Instance details

Defined in PlutusTx.Coverage

FromJSON Metadata
Instance details

Defined in PlutusTx.Coverage

FromJSON CoverageMetadata
Instance details

Defined in PlutusTx.Coverage

FromJSON CovLoc
Instance details

Defined in PlutusTx.Coverage

FromJSON StudentT
Instance details

Defined in Statistics.Distribution.StudentT

FromJSON ShortText

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ZonedTime

Supported string formats:

YYYY-MM-DD HH:MM Z YYYY-MM-DD HH:MM:SS Z YYYY-MM-DD HH:MM:SS.SSS Z

The first space may instead be a T , and the second space is optional. The Z represents UTC. The Z may be replaced with a time zone offset of the form +0000 or -08:00 , where the first two digits are hours, the : is optional and the second two digits (also optional) are minutes.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON LocalTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON TimeOfDay
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CalendarDiffTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON SystemTime
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON DayOfWeek
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Day
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON CalendarDiffDays
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON QuarterOfYear
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Quarter
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON Month
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON UUID
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON AnyCardanoEra Source #
Instance details

Defined in Cardano.Api.Eras

FromJSON TextEnvelope Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

FromJSON TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

FromJSON TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

FromJSON TxIx Source #
Instance details

Defined in Cardano.Api.TxIn

FromJSON TxIn Source #
Instance details

Defined in Cardano.Api.TxIn

FromJSON TxId Source #
Instance details

Defined in Cardano.Api.TxIn

FromJSON ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

FromJSON ExecutionUnits Source #
Instance details

Defined in Cardano.Api.Script

FromJSON ScriptInAnyLang Source #
Instance details

Defined in Cardano.Api.Script

FromJSON AnyPlutusScriptVersion Source #
Instance details

Defined in Cardano.Api.Script

FromJSON StakePoolMetadata Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

FromJSON SocketPath Source #
Instance details

Defined in Cardano.Api.Environment

FromJSON StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

FromJSON ValueNestedRep Source #
Instance details

Defined in Cardano.Api.Value

FromJSON Value Source #
Instance details

Defined in Cardano.Api.Value

FromJSON AssetName Source #
Instance details

Defined in Cardano.Api.Value

FromJSON PolicyId Source #
Instance details

Defined in Cardano.Api.Value

FromJSON Quantity Source #
Instance details

Defined in Cardano.Api.Value

FromJSON Lovelace Source #
Instance details

Defined in Cardano.Api.Value

FromJSON CostModel Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON ExecutionUnitPrices Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON ProtocolParameters Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON a => FromJSON [a]
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Maybe a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, Integral a) => FromJSON ( Ratio a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( First a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Last a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( Ord a, FromJSON a) => FromJSON ( Set a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( NonEmpty a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Identity a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Solo a)

Since: aeson-2.0.2.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON v => FromJSON ( KeyMap v)

Since: aeson-2.0.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON v => FromJSON ( Tree v)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Min a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Max a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( WrappedMonoid a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Option a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( First a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Last a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Dual a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ( Signature w)
Instance details

Defined in Cardano.Crypto.Signing.Signature

FromJSON a => FromJSON ( RedeemSignature a)
Instance details

Defined in Cardano.Crypto.Signing.Redeem.Signature

FromJSON a => FromJSON ( StrictMaybe a)
Instance details

Defined in Data.Maybe.Strict

Crypto crypto => FromJSON ( Addr crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => FromJSON ( RewardAcnt crypto)
Instance details

Defined in Cardano.Ledger.Address

Crypto crypto => FromJSON ( BlocksMade crypto)
Instance details

Defined in Cardano.Ledger.BaseTypes

Crypto crypto => FromJSON ( GenDelegPair crypto)
Instance details

Defined in Cardano.Ledger.Keys

Crypto crypto => FromJSON ( ScriptHash crypto)
Instance details

Defined in Cardano.Ledger.Hashes

Crypto crypto => FromJSON ( ShelleyGenesisStaking crypto)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Era era => FromJSON ( ShelleyGenesis era)
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto crypto => FromJSON ( RewardProvenancePool crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => FromJSON ( RewardProvenance crypto)
Instance details

Defined in Cardano.Ledger.Shelley.RewardProvenance

Crypto crypto => FromJSON ( PoolParams crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

Crypto crypto => FromJSON ( StakeCreds crypto)
Instance details

Defined in Cardano.Ledger.Shelley.TxBody

FromJSON ( PParams era)
Instance details

Defined in Cardano.Ledger.Shelley.PParams

FromJSON a => FromJSON ( Seq a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( IntMap a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON1 f => FromJSON ( Fix f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, Functor f) => FromJSON ( Mu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, Functor f) => FromJSON ( Nu f)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( DNonEmpty a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( DList a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( Prim a, FromJSON a) => FromJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( Storable a, FromJSON a) => FromJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( Vector Vector a, FromJSON a) => FromJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( Eq a, Hashable a, FromJSON a) => FromJSON ( HashSet a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Vector a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( StrictSeq a)
Instance details

Defined in Data.Sequence.Strict

FromJSON ( BuiltinCostModelBase CostingFun )
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

FromJSON model => FromJSON ( CostingFun model)
Instance details

Defined in PlutusCore.Evaluation.Machine.BuiltinCostModel

( Prim a, FromJSON a) => FromJSON ( PrimArray a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( SmallArray a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Array a)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON d => FromJSON ( LinearTransform d)
Instance details

Defined in Statistics.Distribution.Transform

FromJSON a => FromJSON ( Maybe a)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromJSON ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

FromJSON ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

IsCardanoEra era => FromJSON ( ReferenceScript era) Source #
Instance details

Defined in Cardano.Api.Script

IsSimpleScriptLanguage lang => FromJSON ( SimpleScript lang) Source #
Instance details

Defined in Cardano.Api.Script

IsShelleyBasedEra era => FromJSON ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

IsCardanoEra era => FromJSON ( TxOutValue era) Source #
Instance details

Defined in Cardano.Api.TxBody

( IsCardanoEra era, IsShelleyBasedEra era, FromJSON ( TxOut CtxUTxO era)) => FromJSON ( UTxO era) Source #
Instance details

Defined in Cardano.Api.Query

( FromJSON a, FromJSON b) => FromJSON ( Either a b)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b) => FromJSON (a, b)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSONKey k, Ord k, FromJSON v) => FromJSON ( Map k v)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON ( Proxy a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON v, FromJSONKey k, Eq k, Hashable k) => FromJSON ( HashMap k v)
Instance details

Defined in Data.Aeson.Types.FromJSON

HasResolution a => FromJSON ( Fixed a)

This instance includes a bounds check to prevent maliciously large inputs to fill up the memory of the target system. You can newtype Scientific and provide your own instance using withScientific if you want to allow larger inputs.

Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON b => FromJSON ( Annotated b ())
Instance details

Defined in Cardano.Binary.Annotated

HashAlgorithm h => FromJSON ( Hash h a)
Instance details

Defined in Cardano.Crypto.Hash.Class

HashAlgorithm algo => FromJSON ( AbstractHash algo a)
Instance details

Defined in Cardano.Crypto.Hashing

Crypto crypto => FromJSON ( Credential kr crypto)
Instance details

Defined in Cardano.Ledger.Credential

Crypto crypto => FromJSON ( KeyHash disc crypto)
Instance details

Defined in Cardano.Ledger.Keys

( FromJSONKey k, Ord k, FromJSON a) => FromJSON ( MonoidalMap k a)
Instance details

Defined in Data.Map.Monoidal

( FromJSON a, FromJSON b) => FromJSON ( These a b)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b) => FromJSON ( Pair a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b) => FromJSON ( These a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b) => FromJSON ( Either a b)

Since: aeson-1.5.3.0

Instance details

Defined in Data.Aeson.Types.FromJSON

Bounded (BoundedRatio b Word64 ) => FromJSON (BoundedRatio b Word64 )
Instance details

Defined in Cardano.Ledger.BaseTypes

FromJSON ( EraInMode AlonzoEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode MaryEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode AllegraEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ShelleyEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ShelleyEra ShelleyMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ByronEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ByronEra ByronMode ) Source #
Instance details

Defined in Cardano.Api.Modes

( IsShelleyBasedEra era, IsCardanoEra era) => FromJSON ( TxOut CtxUTxO era) Source #
Instance details

Defined in Cardano.Api.TxBody

( IsShelleyBasedEra era, IsCardanoEra era) => FromJSON ( TxOut CtxTx era) Source #
Instance details

Defined in Cardano.Api.TxBody

( FromJSON a, FromJSON b, FromJSON c) => FromJSON (a, b, c)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON a => FromJSON ( Const a b)
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSON b => FromJSON ( Tagged a b)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON ( These1 f g a)

Since: aeson-1.5.1.0

Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b, FromJSON c, FromJSON d) => FromJSON (a, b, c, d)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON ( Product f g a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON ( Sum f g a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e) => FromJSON (a, b, c, d, e)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON1 f, FromJSON1 g, FromJSON a) => FromJSON ( Compose f g a)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f) => FromJSON (a, b, c, d, e, f)
Instance details

Defined in Data.Aeson.Types.FromJSON

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g) => FromJSON (a, b, c, d, e, f, g)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h) => FromJSON (a, b, c, d, e, f, g, h)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i) => FromJSON (a, b, c, d, e, f, g, h, i)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j) => FromJSON (a, b, c, d, e, f, g, h, i, j)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k) => FromJSON (a, b, c, d, e, f, g, h, i, j, k)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n)] Source #

( FromJSON a, FromJSON b, FromJSON c, FromJSON d, FromJSON e, FromJSON f, FromJSON g, FromJSON h, FromJSON i, FromJSON j, FromJSON k, FromJSON l, FromJSON m, FromJSON n, FromJSON o) => FromJSON (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) Source #

parseJSONList :: Value -> Parser [(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)] Source #

Bech32

class ( HasTypeProxy a, SerialiseAsRawBytes a) => SerialiseAsBech32 a Source #

Minimal complete definition

bech32PrefixFor, bech32PrefixesPermitted

Instances

Instances details
SerialiseAsBech32 StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsBech32 ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsBech32 ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsBech32 ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsBech32 ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsBech32 ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsBech32 ( Address ShelleyAddr ) Source #
Instance details

Defined in Cardano.Api.Address

data Bech32DecodeError Source #

Bech32 decoding error.

Constructors

Bech32DecodingError ! DecodingError

There was an error decoding the string as Bech32.

Bech32UnexpectedPrefix ! Text !( Set Text )

The human-readable prefix in the Bech32-encoded string is not one of the ones expected.

Bech32DataPartToBytesError ! Text

There was an error in extracting a ByteString from the data part of the Bech32-encoded string.

Bech32DeserialiseFromBytesError ! ByteString

There was an error in deserialising the bytes into a value of the expected type.

Bech32WrongPrefix ! Text ! Text

The human-readable prefix in the Bech32-encoded string does not correspond to the prefix that should be used for the payload value.

Addresses

Address serialisation is (sadly) special

class HasTypeProxy addr => SerialiseAddress addr Source #

Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.

In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.

Minimal complete definition

serialiseAddress , deserialiseAddress

Raw binary

Some types have a natural raw binary format.

class HasTypeProxy a => SerialiseAsRawBytes a Source #

Instances

Instances details
SerialiseAsRawBytes TxId Source #
Instance details

Defined in Cardano.Api.TxIn

SerialiseAsRawBytes ByronVote Source #
Instance details

Defined in Cardano.Api.SpecialByron

SerialiseAsRawBytes ByronUpdateProposal Source #
Instance details

Defined in Cardano.Api.SpecialByron

SerialiseAsRawBytes ScriptHash Source #
Instance details

Defined in Cardano.Api.Script

SerialiseAsRawBytes StakeAddress Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes AddressAny Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes AssetName Source #
Instance details

Defined in Cardano.Api.Value

SerialiseAsRawBytes PolicyId Source #
Instance details

Defined in Cardano.Api.Value

SerialiseAsRawBytes PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

SerialiseAsRawBytes ( Hash StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash ScriptData ) Source #
Instance details

Defined in Cardano.Api.ScriptData

SerialiseAsRawBytes ( Hash ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( Hash VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( Hash KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( Hash StakePoolMetadata ) Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

SerialiseAsRawBytes ( Hash BlockHeader ) Source #
Instance details

Defined in Cardano.Api.Block

SerialiseAsRawBytes ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

SerialiseAsRawBytes ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

SerialiseAsRawBytes ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

HasTypeProxy lang => SerialiseAsRawBytes ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

IsCardanoEra era => SerialiseAsRawBytes ( AddressInEra era) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes ( Address ShelleyAddr ) Source #
Instance details

Defined in Cardano.Api.Address

SerialiseAsRawBytes ( Address ByronAddr ) Source #
Instance details

Defined in Cardano.Api.Address

Text envelope

Support for a envelope file format with text headers and a hex-encoded binary payload.

class SerialiseAsCBOR a => HasTextEnvelope a where Source #

Minimal complete definition

textEnvelopeType

Instances

Instances details
HasTextEnvelope UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTextEnvelope Certificate Source #
Instance details

Defined in Cardano.Api.Certificate

HasTextEnvelope OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTextEnvelope OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTextEnvelope ( VerificationKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( VerificationKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( VerificationKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

HasTextEnvelope ( VerificationKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

HasTextEnvelope ( SigningKey StakePoolKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey StakeExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey StakeKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey PaymentExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey PaymentKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey ByronKeyLegacy ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( SigningKey ByronKey ) Source #
Instance details

Defined in Cardano.Api.KeysByron

HasTextEnvelope ( SigningKey VrfKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

HasTextEnvelope ( SigningKey KesKey ) Source #
Instance details

Defined in Cardano.Api.KeysPraos

(IsPlutusScriptLanguage lang, Typeable lang) => HasTextEnvelope ( PlutusScript lang) Source #
Instance details

Defined in Cardano.Api.Script

IsScriptLanguage lang => HasTextEnvelope ( Script lang) Source #
Instance details

Defined in Cardano.Api.Script

IsCardanoEra era => HasTextEnvelope ( TxBody era) Source #
Instance details

Defined in Cardano.Api.TxBody

IsCardanoEra era => HasTextEnvelope ( KeyWitness era) Source #
Instance details

Defined in Cardano.Api.Tx

IsCardanoEra era => HasTextEnvelope ( Tx era) Source #
Instance details

Defined in Cardano.Api.Tx

data TextEnvelope Source #

A TextEnvelope is a structured envelope for serialised binary values with an external format with a semi-readable textual format.

It contains a "type" field, e.g. "PublicKeyByron" or "TxSignedShelley" to indicate the type of the encoded data. This is used as a sanity check and to help readers.

It also contains a "title" field which is free-form, and could be used to indicate the role or purpose to a reader.

newtype TextEnvelopeType Source #

Instances

Instances details
Eq TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Show TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

IsString TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Semigroup TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

ToJSON TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

FromJSON TextEnvelopeType Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

data TextEnvelopeDescr Source #

Instances

Instances details
Eq TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Show TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

IsString TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Semigroup TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

ToJSON TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

FromJSON TextEnvelopeDescr Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Text envelope CDDL

Support for serialising values in the ledger's CDDL format. Note, this will be deprecated in the future in favour of a single API.

data FromSomeTypeCDDL c b where Source #

This GADT allows us to deserialise a tx or key witness without having to provide the era.

Constructors

FromCDDLTx

Fields

FromCDDLWitness

Fields

serialiseTxLedgerCddl :: forall era. IsCardanoEra era => Tx era -> TextEnvelopeCddl Source #

Reading one of several key types

data FromSomeType (c :: Type -> Constraint ) b where Source #

Constructors

FromSomeType :: c a => AsType a -> (a -> b) -> FromSomeType c b

Errors

class Show e => Error e where Source #

Instances

Instances details
Error () Source #
Instance details

Defined in Cardano.Api.Error

Error IOException Source #
Instance details

Defined in Cardano.Api.Error

Error JsonDecodeError Source #
Instance details

Defined in Cardano.Api.SerialiseJSON

Error TxMetadataJsonSchemaError Source #
Instance details

Defined in Cardano.Api.TxMetadata

Error TxMetadataJsonError Source #
Instance details

Defined in Cardano.Api.TxMetadata

Error TxMetadataRangeError Source #
Instance details

Defined in Cardano.Api.TxMetadata

Error TextEnvelopeError Source #
Instance details

Defined in Cardano.Api.SerialiseTextEnvelope

Error Bech32DecodeError Source #
Instance details

Defined in Cardano.Api.SerialiseBech32

Error ScriptDataJsonSchemaError Source #
Instance details

Defined in Cardano.Api.ScriptData

Error ScriptDataJsonError Source #
Instance details

Defined in Cardano.Api.ScriptData

Error ScriptDataRangeError Source #
Instance details

Defined in Cardano.Api.ScriptData

Error StakePoolMetadataValidationError Source #
Instance details

Defined in Cardano.Api.StakePoolMetadata

Error ProtocolParametersError Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Error TxBodyError Source #
Instance details

Defined in Cardano.Api.TxBody

Error TextEnvelopeCddlError Source #
Instance details

Defined in Cardano.Api.SerialiseLedgerCddl

Error OperationalCertIssueError Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

Error LeadershipError Source #
Instance details

Defined in Cardano.Api.LedgerState

Error MinimumUTxOError Source #
Instance details

Defined in Cardano.Api.Fees

Error TxBodyErrorAutoBalance Source #
Instance details

Defined in Cardano.Api.Fees

Error TransactionValidityError Source #
Instance details

Defined in Cardano.Api.Fees

Error ScriptExecutionError Source #
Instance details

Defined in Cardano.Api.Fees

Error e => Error ( FileError e) Source #
Instance details

Defined in Cardano.Api.Error

throwErrorAsException :: Error e => e -> IO a Source #

The preferred approach is to use Except or ExceptT , but you can if necessary use IO exceptions.

Node interaction

Operations that involve talking to a local Cardano node.

Queries

Submitting transactions

High level protocol interaction with a Cardano node

Initialization / Accumulation

initialLedgerState Source #

Arguments

:: FilePath

Path to the cardano-node config file (e.g. to cardano-node project configuration cardano/mainnet-config.json)

-> ExceptT InitialLedgerStateError IO ( Env , LedgerState )

The environment and initial ledger state

Get the environment and initial ledger state.

applyBlock Source #

Arguments

:: Env

The environment returned by initialLedgerState

-> LedgerState

The current ledger state

-> ValidationMode
-> Block era

Some block to apply

-> Either LedgerStateError ( LedgerState , [ LedgerEvent ])

The new ledger state (or an error).

Apply a single block to the current ledger state.

data ValidationMode Source #

How to do validation when applying a block to a ledger state.

Constructors

FullValidation

Do all validation implied by the ledger layer's applyBlock .

QuickValidation

Only check that the previous hash from the block matches the head hash of the ledger state.

Ledger Events

data LedgerEvent Source #

Constructors

PoolRegistration Certificate

The given pool is being registered for the first time on chain.

PoolReRegistration Certificate

The given pool already exists and is being re-registered.

IncrementalRewardsDistribution EpochNo ( Map StakeCredential ( Set ( Reward StandardCrypto )))

Incremental rewards are being computed.

RewardsDistribution EpochNo ( Map StakeCredential ( Set ( Reward StandardCrypto )))

Reward distribution has completed.

MIRDistribution MIRDistributionDetails

MIR are being distributed.

PoolReap PoolReapDetails

Pools have been reaped and deposits refunded.

data MIRDistributionDetails Source #

Details of fund transfers due to MIR certificates.

Note that the transfers from reserves to treasury and treasury to reserves are inverse; a transfer of 100 ADA in either direction will result in a net movement of 0, but we include both directions for assistance in debugging.

data PoolReapDetails Source #

Constructors

PoolReapDetails

Fields

Traversing the block chain

foldBlocks Source #

Arguments

:: forall a. FilePath

Path to the cardano-node config file (e.g. to cardano-node project configuration cardano/mainnet-config.json)

-> FilePath

Path to local cardano-node socket. This is the path specified by the --socket-path command line option when running the node.

-> ValidationMode
-> a

The initial accumulator state.

-> ( Env -> LedgerState -> [ LedgerEvent ] -> BlockInMode CardanoMode -> a -> IO a)

Accumulator function Takes:

  • Environment (this is a constant over the whole fold).
  • The Ledger state (with block i applied) at block i .
  • The Ledger events resulting from applying block i .
  • Block i .
  • The accumulator state at block i - 1 .

And returns:

  • The accumulator state at block i

Note: This function can safely assume no rollback will occur even though internally this is implemented with a client protocol that may require rollback. This is achieved by only calling the accumulator on states/blocks that are older than the security parameter, k. This has the side effect of truncating the last k blocks before the node's tip.

-> ExceptT FoldBlocksError IO a

The final state

Monadic fold over all blocks and ledger states. Stopping k blocks before the node's tip where k is the security parameter.

chainSyncClientWithLedgerState Source #

Arguments

:: forall m a. Monad m
=> Env
-> LedgerState

Initial ledger state

-> ValidationMode
-> ChainSyncClient ( BlockInMode CardanoMode , Either LedgerStateError ( LedgerState , [ LedgerEvent ])) ChainPoint ChainTip m a

A client to wrap. The block is annotated with a 'Either LedgerStateError LedgerState'. This is either an error from validating a block or the current LedgerState from applying the current block. If we trust the node, then we generally expect blocks to validate. Also note that after a block fails to validate we may still roll back to a validated block, in which case the valid LedgerState will be passed here again.

-> ChainSyncClient ( BlockInMode CardanoMode ) ChainPoint ChainTip m a

A client that acts just like the wrapped client but doesn't require the LedgerState annotation on the block type.

Wrap a ChainSyncClient with logic that tracks the ledger state.

Errors

data LedgerStateError Source #

Constructors

ApplyBlockHashMismatch Text

When using QuickValidation, the block hash did not match the expected block hash after applying a new block to the current ledger state.

ApplyBlockError ( HardForkLedgerError ( CardanoEras StandardCrypto ))

When using FullValidation, an error occurred when applying a new block to the current ledger state.

InvalidRollback

Encountered a rollback larger than the security parameter.

Fields

  • SlotNo

    Oldest known slot number that we can roll back to.

  • ChainPoint

    Rollback was attempted to this point.

data InitialLedgerStateError Source #

Constructors

ILSEConfigFile Text

Failed to read or parse the network config file.

ILSEGenesisFile GenesisConfigError

Failed to read or parse a genesis file linked from the network config file.

ILSELedgerConsensusConfig GenesisConfigError

Failed to derive the Ledger or Consensus config.

Low level protocol interaction with a Cardano node

connectToLocalNode :: LocalNodeConnectInfo mode -> LocalNodeClientProtocolsInMode mode -> IO () Source #

Establish a connection to a local node and execute the given set of protocol handlers.

connectToLocalNodeWithVersion :: LocalNodeConnectInfo mode -> ( NodeToClientVersion -> LocalNodeClientProtocolsInMode mode) -> IO () Source #

Establish a connection to a local node and execute the given set of protocol handlers parameterized on the negotiated node-to-client protocol version.

data ConsensusMode mode where Source #

This GADT provides a value-level representation of all the consensus modes. This enables pattern matching on the era to allow them to be treated in a non-uniform way.

data ConsensusModeIsMultiEra mode where Source #

The subset of consensus modes that consist of multiple eras. Some features are not supported in single-era modes (for exact compatibility without using the hard fork combination at all).

data ConsensusModeParams mode where Source #

The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.

It is in fact only the Byron era that requires extra parameters, but this is of course inherited by the CardanoMode that uses the Byron era. The reason this parameter is needed stems from unfortunate design decisions from the legacy Byron era. The slots per epoch are needed to be able to decode epoch boundary blocks from the Byron era.

It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.

data EraInMode era mode where Source #

A representation of which CardanoEra s are included in each ConsensusMode .

Instances

Instances details
Eq ( EraInMode era mode) Source #
Instance details

Defined in Cardano.Api.Modes

Show ( EraInMode era mode) Source #
Instance details

Defined in Cardano.Api.Modes

ToJSON ( EraInMode era mode) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode AlonzoEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode MaryEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode AllegraEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ShelleyEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ShelleyEra ShelleyMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ByronEra CardanoMode ) Source #
Instance details

Defined in Cardano.Api.Modes

FromJSON ( EraInMode ByronEra ByronMode ) Source #
Instance details

Defined in Cardano.Api.Modes

data LocalNodeClientProtocols block point tip slot tx txid txerr query m Source #

The protocols we can use with a local node. Use in conjunction with connectToLocalNode .

These protocols use the types from the rest of this API. The conversion to/from the types used by the underlying wire formats is handled by connectToLocalNode .

data LocalNodeClientParams where Source #

This type defines the boundary between the mode-parametrised style used in this API and the block-parametrised style used by the underlying network and consensus libraries.

This interface itself is in the block-parametrised style, with the block type itself being an hidden/existential type.

It bundles together all the necessary class instances, the consensus protocol client identifier, and the set of client side mini-protocol handlers for the node-to-client protocol.

mkLocalNodeClientParams :: forall mode block. ConsensusBlockForMode mode ~ block => ConsensusModeParams mode -> ( NodeToClientVersion -> LocalNodeClientProtocolsInMode mode) -> LocalNodeClientParams Source #

Convert from the mode-parametrised style to the block-parametrised style.

data CardanoMode Source #

The Cardano consensus mode consists of all the eras currently in use on the Cardano mainnet. This is currently: the ByronEra ; ShelleyEra , AllegraEra and MaryEra , in that order.

This mode will be extended with new eras as the Cardano mainnet develops.

Chain sync protocol

To construct a ChainSyncClient see Cardano.Api.Client or Cardano.Api.ClientPipelined .

newtype ChainSyncClient header point tip (m :: Type -> Type ) a Source #

A chain sync protocol client, on top of some effect m . The first choice of request is within that m .

Constructors

ChainSyncClient

Fields

newtype ChainSyncClientPipelined header point tip (m :: Type -> Type ) a Source #

Pipelined chain sync client. It can only pipeline MsgRequestNext messages, while the MsgFindIntersect are non pipelined. This has a penalty cost of an RTT, but they are send relatively seldom and their response might impact how many messages one would like to pipeline. It also simplifies the receiver callback.

data BlockInMode mode where Source #

A Block in one of the eras supported by a given protocol mode.

For multi-era modes such as the CardanoMode this type is a sum of the different block types for all the eras. It is used in the ChainSync protocol.

Constructors

BlockInMode :: IsCardanoEra era => Block era -> EraInMode era mode -> BlockInMode mode

Local tx submission

data TxInMode mode where Source #

A Tx in one of the eras supported by a given protocol mode.

For multi-era modes such as the CardanoMode this type is a sum of the different transaction types for all the eras. It is used in the LocalTxSubmission protocol.

Constructors

TxInMode :: Tx era -> EraInMode era mode -> TxInMode mode

Everything we consider a normal transaction.

TxInByronSpecial :: GenTx ByronBlock -> EraInMode ByronEra mode -> TxInMode mode

Byron has various things we can post to the chain which are not actually transactions. This covers: update proposals, votes and delegation certs.

data TxValidationErrorInMode mode where Source #

A TxValidationError in one of the eras supported by a given protocol mode.

This is used in the LocalStateQuery protocol.

Local state query

newtype LocalStateQueryClient block point (query :: Type -> Type ) (m :: Type -> Type ) a Source #

Constructors

LocalStateQueryClient

Fields

newtype SystemStart Source #

System start

Slots are counted from the system start.

Instances

Instances details
Eq SystemStart
Instance details

Defined in Cardano.Slotting.Time

Show SystemStart
Instance details

Defined in Cardano.Slotting.Time

Generic SystemStart
Instance details

Defined in Cardano.Slotting.Time

ToJSON SystemStart Source #
Instance details

Defined in Cardano.Api.Orphans

FromJSON SystemStart Source #
Instance details

Defined in Cardano.Api.Orphans

ToCBOR SystemStart
Instance details

Defined in Cardano.Slotting.Time

FromCBOR SystemStart
Instance details

Defined in Cardano.Slotting.Time

NoThunks SystemStart
Instance details

Defined in Cardano.Slotting.Time

Serialise SystemStart
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart = D1 (' MetaData "SystemStart" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" ' True ) ( C1 (' MetaCons "SystemStart" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getSystemStart") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 UTCTime )))

data QueryUTxOFilter Source #

Getting the whole UTxO is obviously not efficient since the result can be huge. Filtering by address is also not efficient because it requires a linear search.

The QueryUTxOFilterByTxIn is efficient since it fits with the structure of the UTxO (which is indexed by TxIn ).

Constructors

QueryUTxOWhole

O(n) time and space for utxo size n

QueryUTxOByAddress ( Set AddressAny )

O(n) time, O(m) space for utxo size n, and address set size m

QueryUTxOByTxIn ( Set TxIn )

O(m log n) time, O(m) space for utxo size n, and address set size m

executeQueryCardanoMode :: CardanoEra era -> NetworkId -> QueryInMode CardanoMode ( Either EraMismatch result) -> IO ( Either QueryConvenienceError result) Source #

Execute a query against the local node. The local node must be in CardanoMode.

Local tx monitoring

newtype LocalTxMonitorClient txid tx slot (m :: Type -> Type ) a Source #

A tx monitor client, on top of some effect m .

Constructors

LocalTxMonitorClient

Fields

data LocalTxMonitoringQuery mode Source #

Constructors

LocalTxMonitoringQueryTx (TxIdInMode mode)

Query if a particular tx exists in the mempool. Note that, the absence of a transaction does not imply anything about how the transaction was processed: it may have been dropped, or inserted in a block.

LocalTxMonitoringSendNextTx

The mempool is modeled as an ordered list of transactions and thus, can be traversed linearly. LocalTxMonitoringSendNextTx requests the next transaction from the current list. This must be a transaction that was not previously sent to the client for this particular snapshot.

LocalTxMonitoringMempoolInformation

Ask the server about the current mempool's capacity and sizes. This is fixed in a given snapshot.

data LocalTxMonitoringResult mode Source #

Constructors

LocalTxMonitoringTxExists TxId SlotNo

Slot number at which the mempool snapshot was taken

LocalTxMonitoringTxDoesNotExist TxId SlotNo

Slot number at which the mempool snapshot was taken

LocalTxMonitoringNextTx ( Maybe ( TxInMode mode)) SlotNo

Slot number at which the mempool snapshot was taken

LocalTxMonitoringMempoolSizeAndCapacity MempoolSizeAndCapacity SlotNo

Slot number at which the mempool snapshot was taken

data MempoolSizeAndCapacity Source #

Describes the MemPool sizes and capacity for a given snapshot.

Constructors

MempoolSizeAndCapacity

Fields

Instances

Instances details
Eq MempoolSizeAndCapacity
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type

Show MempoolSizeAndCapacity
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type

Generic MempoolSizeAndCapacity
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type

type Rep MempoolSizeAndCapacity
Instance details

Defined in Ouroboros.Network.Protocol.LocalTxMonitor.Type

type Rep MempoolSizeAndCapacity = D1 (' MetaData "MempoolSizeAndCapacity" "Ouroboros.Network.Protocol.LocalTxMonitor.Type" "ouroboros-network-0.1.0.1-2UgqzRSdBh49QYumtriFSI" ' False ) ( C1 (' MetaCons "MempoolSizeAndCapacity" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "capacityInBytes") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word32 ) :*: ( S1 (' MetaSel (' Just "sizeInBytes") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word32 ) :*: S1 (' MetaSel (' Just "numberOfTxs") ' NoSourceUnpackedness ' SourceStrict ' DecidedUnpack ) ( Rec0 Word32 ))))

Common queries

Node operation

Support for the steps needed to operate a node

Operational certificates

data OperationalCertificate Source #

Instances

Instances details
Eq OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

Show OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

ToCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

FromCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTypeProxy OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

SerialiseAsCBOR OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTextEnvelope OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificate Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

data OperationalCertificateIssueCounter Source #

Instances

Instances details
Eq OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

Show OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

ToCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

FromCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTypeProxy OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

SerialiseAsCBOR OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

HasTextEnvelope OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

data AsType OperationalCertificateIssueCounter Source #
Instance details

Defined in Cardano.Api.OperationalCertificate

Genesis file

Types and functions needed to inspect or create a genesis file.

data GenesisKey Source #

Instances

Instances details
HasTypeProxy GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey GenesisKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data GenesisExtendedKey Source #

Shelley-era genesis keys using extended ed25519 cryptographic keys.

These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.

The extended verification keys can be converted (via castVerificationKey ) to ordinary keys (i.e. VerificationKey GenesisKey ) but this is not the case for the signing keys. The signing keys can be used to witness transactions directly, with verification via their non-extended verification key ( VerificationKey GenesisKey ).

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey GenesisExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data GenesisDelegateKey Source #

Instances

Instances details
HasTypeProxy GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisDelegateKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey GenesisDelegateKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data GenesisDelegateExtendedKey Source #

Shelley-era genesis keys using extended ed25519 cryptographic keys.

These serve the same role as normal genesis keys, but are here to support legacy Byron genesis keys which used extended keys.

The extended verification keys can be converted (via castVerificationKey ) to ordinary keys (i.e. VerificationKey GenesisKey ) but this is not the case for the signing keys. The signing keys can be used to witness transactions directly, with verification via their non-extended verification key ( VerificationKey GenesisKey ).

This is a type level tag, used with other interfaces like Key .

Instances

Instances details
HasTypeProxy GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisDelegateExtendedKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey GenesisDelegateExtendedKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

data GenesisUTxOKey Source #

Instances

Instances details
HasTypeProxy GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Key GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Eq ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Ord ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

Show ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

IsString ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

ToCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

FromCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsCBOR ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( Hash GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

SerialiseAsRawBytes ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( VerificationKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

HasTextEnvelope ( SigningKey GenesisUTxOKey ) Source #
Instance details

Defined in Cardano.Api.KeysShelley

data AsType GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype Hash GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype VerificationKey GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

newtype SigningKey GenesisUTxOKey Source #
Instance details

Defined in Cardano.Api.KeysShelley

genesisUTxOPseudoTxIn :: NetworkId -> Hash GenesisUTxOKey -> TxIn Source #

Compute the TxIn of the initial UTxO pseudo-transaction corresponding to the given address in the genesis initial funds.

The Shelley initial UTxO is constructed from the sgInitialFunds which is not a full UTxO but just a map from addresses to coin values.

This gets turned into a UTxO by making a pseudo-transaction for each address, with the 0th output being the coin value. So to spend from the initial UTxO we need this same TxIn to use as an input to the spending transaction.

Genesis parameters

data GenesisParameters Source #

Constructors

GenesisParameters

Fields

Special transactions

There are various additional things that can be embedded in a transaction for special operations.

data MIRTarget Source #

The MIRTarget determines the target of a MIRCertificate . A MIRCertificate moves lovelace from either the reserves or the treasury to either a collection of stake credentials or to the other pot.

Constructors

StakeAddressesMIR [( StakeCredential , Lovelace )]

Use StakeAddressesMIR to make the target of a MIRCertificate a mapping of stake credentials to lovelace.

SendToReservesMIR Lovelace

Use SendToReservesMIR to make the target of a MIRCertificate the reserves pot.

SendToTreasuryMIR Lovelace

Use SendToTreasuryMIR to make the target of a MIRCertificate the treasury pot.

Protocol parameter updates

data UpdateProposal Source #

Instances

Instances details
Eq UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Show UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTypeProxy UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

SerialiseAsCBOR UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTextEnvelope UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

data AsType UpdateProposal Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

data ProtocolParametersUpdate Source #

The representation of a change in the ProtocolParameters .

Constructors

ProtocolParametersUpdate

Fields

Instances

Instances details
Eq ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Show ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Semigroup ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Monoid ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR ProtocolParametersUpdate Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

data PraosNonce Source #

Instances

Instances details
Eq PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Ord PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Show PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

IsString PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

Generic PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToJSON PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromJSON PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

ToCBOR PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

FromCBOR PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

HasTypeProxy PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

SerialiseAsRawBytes PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

type Rep PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

type Rep PraosNonce = D1 (' MetaData "PraosNonce" "Cardano.Api.ProtocolParameters" "cardano-api-1.35.4-Y6XVmaPLTVDMjVyvYWRRR" ' True ) ( C1 (' MetaCons "PraosNonce" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Hash StandardCrypto ByteString ))))
data AsType PraosNonce Source #
Instance details

Defined in Cardano.Api.ProtocolParameters

newtype NetworkMagic Source #

NetworkMagic is used to differentiate between different networks during the initial handshake.

Conversions

Node socket related

readEnvSocketPath :: IO ( Either EnvSocketError SocketPath ) Source #

Read the node socket path from the environment. Fails if the environment variable is not set.

data NodeToClientVersion Source #

Enumeration of node to client protocol versions.

Constructors

NodeToClientV_9

enabled CardanoNodeToClientVersion7 , i.e., Alonzo

NodeToClientV_10

added GetChainBlockNo and GetChainPoint queries

NodeToClientV_11

added GetRewardInfoPools Block query

NodeToClientV_12

added LocalTxMonitor mini-protocol

NodeToClientV_13

enabled CardanoNodeToClientVersion9 , i.e., Babbage

Instances

Instances details
Bounded NodeToClientVersion
Instance details

Defined in Ouroboros.Network.NodeToClient.Version

Enum NodeToClientVersion
Instance details

Defined in Ouroboros.Network.NodeToClient.Version

Eq NodeToClientVersion
Instance details

Defined in Ouroboros.Network.NodeToClient.Version

Ord NodeToClientVersion
Instance details

Defined in Ouroboros.Network.NodeToClient.Version

Show NodeToClientVersion
Instance details

Defined in Ouroboros.Network.NodeToClient.Version

Monadic queries

data LocalStateQueryExpr block point query r m a Source #

Monadic type for constructing local state query expressions.

Use queryExpr in a do block to construct queries of this type and convert the expression to a LocalStateQueryClient with setupLocalStateQueryExpr .

Some consideration was made to use Applicative instead of Monad as the abstraction in order to support pipelining, but we actually have a fair amount of code where the next query depends on the result of the former and therefore actually need Monad.

In order to make pipelining still possible we can explore the use of Selective Functors which would allow us to straddle both worlds.

Instances

Instances details
Monad ( LocalStateQueryExpr block point query r m) Source #
Instance details

Defined in Cardano.Api.IPC.Monad

Methods

(>>=) :: LocalStateQueryExpr block point query r m a -> (a -> LocalStateQueryExpr block point query r m b) -> LocalStateQueryExpr block point query r m b Source #

(>>) :: LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b -> LocalStateQueryExpr block point query r m b Source #

return :: a -> LocalStateQueryExpr block point query r m a Source #

Functor ( LocalStateQueryExpr block point query r m) Source #
Instance details

Defined in Cardano.Api.IPC.Monad

Methods

fmap :: (a -> b) -> LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b Source #

(<$) :: a -> LocalStateQueryExpr block point query r m b -> LocalStateQueryExpr block point query r m a Source #

Applicative ( LocalStateQueryExpr block point query r m) Source #
Instance details

Defined in Cardano.Api.IPC.Monad

Methods

pure :: a -> LocalStateQueryExpr block point query r m a Source #

(<*>) :: LocalStateQueryExpr block point query r m (a -> b) -> LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b Source #

liftA2 :: (a -> b -> c) -> LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b -> LocalStateQueryExpr block point query r m c Source #

(*>) :: LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b -> LocalStateQueryExpr block point query r m b Source #

(<*) :: LocalStateQueryExpr block point query r m a -> LocalStateQueryExpr block point query r m b -> LocalStateQueryExpr block point query r m a Source #

MonadIO m => MonadIO ( LocalStateQueryExpr block point query r m) Source #
Instance details

Defined in Cardano.Api.IPC.Monad

Methods

liftIO :: IO a -> LocalStateQueryExpr block point query r m a Source #

queryExpr :: QueryInMode mode a -> LocalStateQueryExpr block point ( QueryInMode mode) r IO a Source #

Use queryExpr in a do block to construct monadic local state queries.

determineEraExpr :: ConsensusModeParams mode -> LocalStateQueryExpr block point ( QueryInMode mode) r IO AnyCardanoEra Source #

A monad expression that determines what era the node is in.

Cast functions

class EraCast (f :: Type -> Type ) where Source #

Methods

eraCast :: ( IsCardanoEra fromEra, IsCardanoEra toEra) => CardanoEra toEra -> f fromEra -> Either EraCastError (f toEra) Source #

Instances

Instances details
EraCast ReferenceScript Source #
Instance details

Defined in Cardano.Api.Script

EraCast AddressInEra Source #
Instance details

Defined in Cardano.Api.Address

EraCast TxOutValue Source #
Instance details

Defined in Cardano.Api.TxBody

EraCast UTxO Source #
Instance details

Defined in Cardano.Api.Query

EraCast ( AddressTypeInEra addrtype) Source #
Instance details

Defined in Cardano.Api.Address

EraCast ( TxOutDatum ctx) Source #
Instance details

Defined in Cardano.Api.TxBody

EraCast ( TxOut ctx) Source #
Instance details

Defined in Cardano.Api.TxBody

data EraCastError Source #

Constructors

forall fromEra toEra value.( IsCardanoEra fromEra, IsCardanoEra toEra, Show value) => EraCastError

Convenience functions

Transaction construction

constructBalancedTx Source #

Arguments

:: IsShelleyBasedEra era
=> EraInMode era CardanoMode
-> TxBodyContent BuildTx era
-> AddressInEra era

Change address

-> Maybe Word

Override key witnesses

-> UTxO era

Just the transaction inputs, not the entire UTxO .

-> ProtocolParameters
-> EraHistory CardanoMode
-> SystemStart
-> Set PoolId

The set of registered stake pools

-> [ ShelleyWitnessSigningKey ]
-> Either TxBodyErrorAutoBalance ( Tx era)

Construct a balanced transaction. See Cardano.Api.Convenience.Query.queryStateForBalancedTx for a convenient way of querying the node to get the required arguements for constructBalancedTx.

Queries

queryStateForBalancedTx :: CardanoEra era -> NetworkId -> [ TxIn ] -> IO ( Either QueryConvenienceError ( UTxO era, ProtocolParameters , EraHistory CardanoMode , SystemStart , Set PoolId )) Source #

A convenience function to query the relevant information, from the local node, for Cardano.Api.Convenience.Construction.constructBalancedTx

Constraint satisfaction functions

Misc