cardano-addresses-3.11.0: Library utilities for mnemonic generation and address derivation.
Safe Haskell None
Language Haskell2010

Cardano.Address

Synopsis

Address

data Address Source #

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

Since: 1.0.0

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

ToJSON ChainPointer Source #
Instance details

Defined in Cardano.Address

NFData ChainPointer Source #
Instance details

Defined in Cardano.Address

type Rep ChainPointer Source #
Instance details

Defined in Cardano.Address

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