singular-registry
Safe HaskellNone
LanguageGHC2021

Naming.Register

Description

The ledger derivations for the genuine insert flow (issue #77): the insert-approval asset name bound at mint and recomputed at fold, and the representative asset name the fold mints under the representative policy.

Both mirror validator code in naming-onchainvalidatorsapplication.ak (insert_approval_name, representative_name); the agreement executes on every insert fold — a Haskell/Aiken mismatch fails phase-2 validation — and is pinned by the fixture vectors in Naming.RegisterSpec.

Synopsis

Documentation

insertApprovalDomain :: ByteString Source #

Domain separator of the insert-approval hash, in the style of the next-control commitment's own domain.

insertApprovalName :: ByteString -> ByteString -> ByteString Source #

The insert-approval asset name: BLAKE2b-256(domain || 0x00 || control || commitment) — 32 bytes, so never a canonical address and never confusable with a withdraw approval. control is the record's control-address bytes and commitment its 32-byte next-control commitment.

registryAssetId :: ByteString -> ByteString -> ByteString Source #

The registry asset identity (NOTE-007008009): the FULL native asset identity — state policy id bytes (28, fixed) followed by cage token name bytes (variable) — concatenated with no framing and no textual hex step (the same bytes the ledger pairs in every Value; fixed 28-byte policy prefix keeps the parse unambiguous for hashing). The ONE place the registry parameter is formed off chain; the policy checks the same bytes through application.ak:registry_asset_id. The state policy is 28 bytes.

representativeName :: ByteString -> ByteString Source #

The representative asset name is BLAKE2b-256 of the spelling bytes. Registry identity is carried by the applied representative policy.

overMarkerFor :: ByteString -> ByteString Source #

The Over marker for a burned representative (NOTE-031): the Update value a genuine retirement request writes. Mirrors `naming.over_marker_for` byte-for-byte: constant "over" prefix (distinct from insert values, which are bare representative names) committing to the exact held asset.