Cardano.Pool

Handling Cardano values.

type alias Id =

Phantom type for pool ID. This is a 28-bytes Blake2b-224 hash.

toBech32 : Bytes Id -> String

Convert a Pool Id to its Bech32 representation.

fromBech32 : String -> Maybe (Bytes Id)

Convert a Pool Id from its Bech32 representation.

type alias Params =
{ operator : Bytes Id
, vrfKeyHash : Bytes VrfKeyHash
, pledge : Natural
, cost : Natural
, margin : UnitInterval
, rewardAccount : StakeAddress
, poolOwners : List (Bytes CredentialHash)
, relays : List Relay
, poolMetadata : Maybe Metadata
}

Parameters for stake pool registration.

Phantom type for VRF key hash. This is a 32-bytes Blake2b-256 hash.

type Relay
= SingleHostAddr
{ port_ : Maybe Int
, ipv4 : Maybe (Bytes IpV4)
, ipv6 : Maybe (Bytes IpV6)
}
| SingleHostName
{ port_ : Maybe Int
, dnsName : String
}
| MultiHostName { dnsName : String }

A pool's relay information.

type IpV4

Phantom type for 4-bytes IPV4 addresses.

type IpV6

Phantom type for 16-bytes IPV6 addresses.

type alias Metadata =
{ url : String
, poolMetadataHash : Bytes MetadataHash
}

A pool's metadata hash.

Phantom type for 32-bytes pool metadata hash. This is a Blacke2b-256 hash.

encodeParams : Params -> List Encoder

Encode all Pool parameters.

decodeParams : Decoder Params

Decode all Pool parameters.