cardano-addresses-3.12.0: Library utilities for mnemonic generation and address derivation.
Safe HaskellNone
LanguageHaskell2010

Cardano.Address

Synopsis

Address

data Address Source #

An Address type representing Cardano addresses. Internals are irrevelant to the user.

Since: 1.0.0

Instances

Instances details
Eq Address Source # 
Instance details

Defined in Cardano.Address

Methods

(==) :: Address -> Address -> Bool #

(/=) :: Address -> Address -> Bool #

Ord Address Source # 
Instance details

Defined in Cardano.Address

Show Address Source # 
Instance details

Defined in Cardano.Address

Generic Address Source # 
Instance details

Defined in Cardano.Address

Associated Types

type Rep Address :: Type -> Type #

Methods

from :: Address -> Rep Address x #

to :: Rep Address x -> Address #

NFData Address Source # 
Instance details

Defined in Cardano.Address

Methods

rnf :: Address -> () #

type Rep Address Source # 
Instance details

Defined in Cardano.Address

type Rep Address = D1 ('MetaData "Address" "Cardano.Address" "cardano-addresses-3.12.0-CXdZXYlvM2IBJZenPvTIY5" 'True) (C1 ('MetaCons "Address" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

class HasNetworkDiscriminant key => PaymentAddress key where Source #

Encoding of addresses for certain key types and backend targets.

Since: 1.0.0

Methods

paymentAddress :: NetworkDiscriminant key -> key 'PaymentK XPub -> Address Source #

Convert a public key to a payment Address valid for the given network discrimination.

Since: 1.0.0

class HasNetworkDiscriminant key => StakeAddress key where Source #

Encoding of addresses for certain key types and backend targets.

Since: 2.0.0

Methods

stakeAddress :: NetworkDiscriminant key -> key 'DelegationK XPub -> Address Source #

Convert a delegation key to a stake Address (aka: reward account address) valid for the given network discrimination.

Since: 2.0.0

class PaymentAddress key => DelegationAddress key where Source #

Encoding of delegation addresses for certain key types and backend targets.

Since: 2.0.0

Methods

delegationAddress Source #

Arguments

:: NetworkDiscriminant key 
-> key 'PaymentK XPub

Payment key

-> key 'DelegationK XPub

Delegation key

-> Address 

Convert a public key and a delegation key to a delegation Address valid for the given network discrimination. Funds sent to this address will be delegated according to the delegation settings attached to the delegation key.

Since: 2.0.0

class PaymentAddress key => PointerAddress key where Source #

Encoding of pointer addresses for payment key type, pointer to delegation certificate in the blockchain and backend targets.

Since: 2.0.0

Methods

pointerAddress Source #

Arguments

:: NetworkDiscriminant key 
-> key 'PaymentK XPub

Payment key

-> ChainPointer

Pointer to locate delegation key in blockchain

-> Address 

Convert a payment public key and a pointer to delegation key in the blockchain to a delegation Address valid for the given network discrimination. Funds sent to this address will be delegated according to the delegation settings attached to the delegation key located by ChainPointer.

Since: 2.0.0

data ChainPointer Source #

A ChainPointer type representing location of some object in the blockchain (eg., delegation certificate). This can be achieved unambiguously by specifying slot number, transaction index and the index in the object list (eg., certification list). For delegation certificates, alternatively, the delegation key can be used and then DelegationAddress can be used.

Since: 2.0.0

Constructors

ChainPointer 

Fields

Instances

Instances details
Eq ChainPointer Source # 
Instance details

Defined in Cardano.Address

Ord ChainPointer Source # 
Instance details

Defined in Cardano.Address

Show ChainPointer Source # 
Instance details

Defined in Cardano.Address

Generic ChainPointer Source # 
Instance details

Defined in Cardano.Address

Associated Types

type Rep ChainPointer :: Type -> Type #

NFData ChainPointer Source # 
Instance details

Defined in Cardano.Address

Methods

rnf :: ChainPointer -> () #

ToJSON ChainPointer Source # 
Instance details

Defined in Cardano.Address

Methods

toJSON :: ChainPointer -> Value

toEncoding :: ChainPointer -> Encoding

toJSONList :: [ChainPointer] -> Value

toEncodingList :: [ChainPointer] -> Encoding

type Rep ChainPointer Source # 
Instance details

Defined in Cardano.Address

type Rep ChainPointer = D1 ('MetaData "ChainPointer" "Cardano.Address" "cardano-addresses-3.12.0-CXdZXYlvM2IBJZenPvTIY5" 'False) (C1 ('MetaCons "ChainPointer" 'PrefixI 'True) (S1 ('MetaSel ('Just "slotNum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: (S1 ('MetaSel ('Just "transactionIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural) :*: S1 ('MetaSel ('Just "outputIndex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural))))

Conversion From / To Text

base58 :: Address -> Text Source #

Encode an Address to a base58 Text.

Since: 1.0.0

fromBase58 :: Text -> Maybe Address Source #

Decode a base58-encoded Text into an Address

Since: 1.0.0

bech32 :: Address -> Text Source #

Encode a Shelley Address to bech32 Text, using addr or addr_test as a human readable prefix (depending on the network tag in the address).

Since: 1.0.0

bech32With :: HumanReadablePart -> Address -> Text Source #

Encode an Address to bech32 Text, using the specified human readable prefix.

Since: 2.0.0

fromBech32 :: Text -> Maybe Address Source #

Decode a bech32-encoded Text into an Address

Since: 1.0.0