cardano-ledger-api-1.11.0.0: Public API for the cardano ledger codebase
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Api.Tx.Address

Synopsis

Address

data Addr Source #

An address for UTxO.

Contents of Addr data type are intentionally left as lazy, otherwise operating on compact form of an address will result in redundant work.

Instances

Instances details
FromJSON Addr 
Instance details

Defined in Cardano.Ledger.Address

FromJSONKey Addr 
Instance details

Defined in Cardano.Ledger.Address

ToJSON Addr 
Instance details

Defined in Cardano.Ledger.Address

ToJSONKey Addr 
Instance details

Defined in Cardano.Ledger.Address

Generic Addr 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep AddrTypeType Source #

Methods

fromAddrRep Addr x Source #

toRep Addr x → Addr Source #

Show Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

showsPrecIntAddrShowS Source #

showAddrString Source #

showList ∷ [Addr] → ShowS Source #

DecCBOR Addr 
Instance details

Defined in Cardano.Ledger.Address

EncCBOR Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

encCBORAddrEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy AddrSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Addr] → Size Source #

NFData Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfAddr → () Source #

Eq Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

(==)AddrAddrBool Source #

(/=)AddrAddrBool Source #

Ord Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

compareAddrAddrOrdering Source #

(<)AddrAddrBool Source #

(<=)AddrAddrBool Source #

(>)AddrAddrBool Source #

(>=)AddrAddrBool Source #

maxAddrAddrAddr Source #

minAddrAddrAddr Source #

NoThunks Addr 
Instance details

Defined in Cardano.Ledger.Address

type Rep Addr 
Instance details

Defined in Cardano.Ledger.Address

getNetworkAddrNetwork Source #

Lookup a Network Id for an Address

newtype BootstrapAddress Source #

Instances

Instances details
Generic BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep BootstrapAddressTypeType Source #

Show BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

NFData BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfBootstrapAddress → () Source #

Eq BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

Ord BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

NoThunks BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

type Rep BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

type Rep BootstrapAddress = D1 ('MetaData "BootstrapAddress" "Cardano.Ledger.Address" "cardano-ledger-core-1.17.0.0-inplace" 'True) (C1 ('MetaCons "BootstrapAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBootstrapAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Address)))

serialiseAddrAddrByteString Source #

Serialise an address to the external format.

Strict decoders

Decoders below will only decode addresses that are allowed to be placed on chain today. Historically there were a few bugs in the decoder which allowed a few malformed addressed to be placed on chain. If you need backwards compatibility, reach out for decodeAddrLenient.

decodeAddrMonadFail m ⇒ ByteString → m Addr Source #

Strict decoder for an address from a ByteString. This will not let you decode some of the buggy addresses that have been placed on chain. This decoder is intended for addresses that are to be placed on chian today.

decodeAddrEitherByteStringEither String Addr Source #

Same as decodeAddr, but produces an Either result

Lenient decoders

These lenient decoders do not fail for addresses with known bugs

data DecAddr Source #

Decoded Address.

Constructors

DecAddr Addr

Address was decoded with no problems

DecAddrBadPtr Addr

Address was decoded, but it contains an invalid Ptr

DecAddrUnconsumed

Address was decoded, but not all of input was consumed

Fields

Instances

Instances details
Show DecAddr Source # 
Instance details

Defined in Cardano.Ledger.Api.Tx.Address

Eq DecAddr Source # 
Instance details

Defined in Cardano.Ledger.Api.Tx.Address

Methods

(==)DecAddrDecAddrBool Source #

(/=)DecAddrDecAddrBool Source #

decodeAddrLenientMonadFail m ⇒ ByteString → m Addr Source #

This is a lenient decoder that will disregard known bugs in the address deserialization. This function is intended for clients that need to deal with historical data that has already been placed on chain. If you also require information on what exactly is bad in the address, or you would like to guard only against a specific bug, you should use decodeAddrLenientEither instead.

Since: 1.8.0

decodeAddrLenientEitherByteStringEither String DecAddr Source #

Decode an address and fail only for addresses that could have never been placed on chain, while decoding addresses with information about potential problems in them. Similar to decodeAddrLenient, this function is not intended for addresses that will be placed into a new transaction.

Since: 1.8.0

Reward Account

data RewardAccount Source #

An account based address for rewards

Constructors

RewardAccount 

Instances

Instances details
FromJSON RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

FromJSONKey RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

ToJSON RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

ToJSONKey RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

Generic RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep RewardAccountTypeType Source #

Show RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

DecCBOR RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

EncCBOR RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

Default RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

NFData RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfRewardAccount → () Source #

Eq RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

Ord RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

NoThunks RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

type Rep RewardAccount 
Instance details

Defined in Cardano.Ledger.Address

type Rep RewardAccount = D1 ('MetaData "RewardAccount" "Cardano.Ledger.Address" "cardano-ledger-core-1.17.0.0-inplace" 'False) (C1 ('MetaCons "RewardAccount" 'PrefixI 'True) (S1 ('MetaSel ('Just "raNetwork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "raCredential") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Credential 'Staking))))

serialiseRewardAccountRewardAccountByteString Source #

Serialise a reward account to the external format.

deserialiseRewardAccountByteStringMaybe RewardAccount Source #

Deserialise a reward account from the external format. This will fail if the input data is not in the right format (or if there is trailing data).