cardano-ledger-api-1.13.0.0: Public API for the cardano ledger codebase
Safe HaskellNone
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

DecCBOR Addr 
Instance details

Defined in Cardano.Ledger.Address

EncCBOR Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

encCBORAddrEncoding Source #

NFData Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfAddr → () #

Generic Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

fromAddrRep Addr x #

toRep Addr x → Addr #

Show Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

showsPrecIntAddrShowS #

showAddrString #

showList ∷ [Addr] → ShowS #

Eq Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

(==)AddrAddrBool #

(/=)AddrAddrBool #

Ord Addr 
Instance details

Defined in Cardano.Ledger.Address

Methods

compareAddrAddrOrdering #

(<)AddrAddrBool #

(<=)AddrAddrBool #

(>)AddrAddrBool #

(>=)AddrAddrBool #

maxAddrAddrAddr #

minAddrAddrAddr #

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
NFData BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfBootstrapAddress → () #

Generic BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep BootstrapAddress 
Instance details

Defined in Cardano.Ledger.Address

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

Defined in Cardano.Ledger.Address

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.19.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, which means that address will be decoded with Ptr that has all values clamped to zero.

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

Methods

showsPrecIntDecAddrShowS #

showDecAddrString #

showList ∷ [DecAddr] → ShowS #

Eq DecAddr Source # 
Instance details

Defined in Cardano.Ledger.Api.Tx.Address

Methods

(==)DecAddrDecAddrBool #

(/=)DecAddrDecAddrBool #

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

Account Address

data AccountAddress Source #

An account based address for rewards

Constructors

AccountAddress 

Instances

Instances details
FromJSON AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

FromJSONKey AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

ToJSON AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

ToJSONKey AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

DecCBOR AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

EncCBOR AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

Default AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

NFData AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfAccountAddress → () #

Generic AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountAddress = D1 ('MetaData "AccountAddress" "Cardano.Ledger.Address" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "AccountAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "aaNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "aaAccountId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AccountId)))
Show AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

Eq AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

Ord AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

NoThunks AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountAddress 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountAddress = D1 ('MetaData "AccountAddress" "Cardano.Ledger.Address" "cardano-ledger-core-1.19.0.0-inplace" 'False) (C1 ('MetaCons "AccountAddress" 'PrefixI 'True) (S1 ('MetaSel ('Just "aaNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "aaAccountId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AccountId)))

newtype AccountId Source #

Constructors

AccountId 

Instances

Instances details
FromJSON AccountId 
Instance details

Defined in Cardano.Ledger.Address

ToJSON AccountId 
Instance details

Defined in Cardano.Ledger.Address

DecCBOR AccountId 
Instance details

Defined in Cardano.Ledger.Address

EncCBOR AccountId 
Instance details

Defined in Cardano.Ledger.Address

NFData AccountId 
Instance details

Defined in Cardano.Ledger.Address

Methods

rnfAccountId → () #

Generic AccountId 
Instance details

Defined in Cardano.Ledger.Address

Associated Types

type Rep AccountId 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountId = D1 ('MetaData "AccountId" "Cardano.Ledger.Address" "cardano-ledger-core-1.19.0.0-inplace" 'True) (C1 ('MetaCons "AccountId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAccountId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Credential 'Staking))))

Methods

fromAccountIdRep AccountId x #

toRep AccountId x → AccountId #

Show AccountId 
Instance details

Defined in Cardano.Ledger.Address

Methods

showsPrecIntAccountIdShowS #

showAccountIdString #

showList ∷ [AccountId] → ShowS #

Eq AccountId 
Instance details

Defined in Cardano.Ledger.Address

Methods

(==)AccountIdAccountIdBool #

(/=)AccountIdAccountIdBool #

Ord AccountId 
Instance details

Defined in Cardano.Ledger.Address

NoThunks AccountId 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountId 
Instance details

Defined in Cardano.Ledger.Address

type Rep AccountId = D1 ('MetaData "AccountId" "Cardano.Ledger.Address" "cardano-ledger-core-1.19.0.0-inplace" 'True) (C1 ('MetaCons "AccountId" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAccountId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Credential 'Staking))))

serialiseAccountAddressAccountAddressByteString Source #

Serialise an account address to the external format.

deserialiseAccountAddressByteStringMaybe AccountAddress Source #

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

Deprecated - Reward Account (use Account Address instead)

pattern RewardAccountNetworkCredential 'StakingAccountAddress Source #

Deprecated pattern synonym for backward compatibility