cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Pool.Parameters

Description

Typed stake-pool registration parameters. Validate hashes, relays, metadata and margin once, then assemble or update the record without effects.

parameters { metadata = Nothing } removes an optional metadata reference.

Synopsis

Documentation

data PoolParameters Source #

Registration parameters. Assembly and record updates are total because constrained fields are validated values. Equality is semantic (numeric margin, unordered owners, ordered relays); Show is diagnostic. No ledger-era admission, minimum cost, pledge funding, or BLS proof verification is implied.

Constructors

PoolParameters 

Fields

Instances

Instances details
Show PoolParameters Source # 
Instance details

Defined in Cometa.Internal.Pool

Eq PoolParameters Source # 
Instance details

Defined in Cometa.Internal.Pool

Ord PoolParameters Source # 
Instance details

Defined in Cometa.Internal.Pool

data VrfKeyHash Source #

Exact 32-byte VRF verification-key hash. Importing does not verify a key.

Instances

Instances details
Show VrfKeyHash Source # 
Instance details

Defined in Cometa.Internal.Pool

Eq VrfKeyHash Source # 
Instance details

Defined in Cometa.Internal.Pool

Ord VrfKeyHash Source # 
Instance details

Defined in Cometa.Internal.Pool

vrfKeyHashFromBytes :: ByteString -> Either Error VrfKeyHash Source #

Import exactly 32 VRF digest bytes without hashing; other lengths return InvalidPoolHashLength with the actual byte count.

vrfKeyHashBytes :: VrfKeyHash -> ByteString Source #

Exact VRF digest bytes.

encodeCbor :: PoolParameters -> ByteString Source #

Fresh definite CBOR array containing the nine pool fields, or ten when a BLS key is present after the VRF hash. Owners are sorted and tagged 258; relay order and duplicates remain. Re-encoding semantic data may change transaction identity.

encodeCborWith :: SetEncoding -> PoolParameters -> ByteString Source #

Fresh definite parameters with the requested tag on the sorted owner set. Other fields use their usual encoding. This re-encodes semantic data; it is not an edit to an imported transaction's exact bytes.

decodeCbor :: ByteString -> Either Error PoolParameters Source #

Decode the complete array. Definite or indefinite arrays and nonminimal unsigned integers are accepted. All field bounds, arities, UTF-8 and trailing bytes are checked; violations return InvalidPoolCbor. The original encoding is not retained. Duplicate owners are rejected; untagged owner sets are accepted. A null BLS placeholder is accepted and omitted on re-encoding.