singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.Registry.TxBuilder.Boot

Description

Builds the minting transaction for a new cage token. Picks a wallet UTxO as seed for asset-name derivation, mints +1 token at the cage policy, and creates a State UTxO with empty root and configured default parameters. The state validator is resolved through its published reference output; a wallet without one is refused StateValidatorNotPublished.

Synopsis

Documentation

bootTokenImpl :: CageConfig -> Session NoWitness IO -> Addr -> IO ConwayTx Source #

Build a boot-token minting transaction.

Refuses StateValidatorNotPublished when the payer's wallet holds no publication of the state validator.

bootTokenFrom :: CageConfig -> (TxIn, TxOut ConwayEra) -> Session NoWitness IO -> Addr -> IO ConwayTx Source #

Build a boot-token minting transaction that resolves the state validator through this reference output, wherever it sits: the caller found it and checked the script it carries. The seed and the funding still come from the payer's wallet.

bootCostBound :: PParams ConwayEra -> (TxIn, TxOut ConwayEra) -> Integer Source #

The most a boot takes from the payer's spending inputs: the lovelace its state output locks, and a fee allowance for one maximum-size transaction at the execution limit referencing this state carrier (protocolFeeReserve). A create checks its publications against what the boot leaves with it, before anything is submitted.

data BootRefusal Source #

Why a boot is refused before any transaction is built.

StateValidatorNotPublished: the payer's wallet holds no reference output carrying this configuration's state validator. The boot resolves that validator through the publication and never carries it inline, so the caller publishes it first (publishStateRef) and boots again.

Instances

Instances details
Exception BootRefusal Source # 
Instance details

Defined in Singular.Registry.TxBuilder.Boot

Methods

toException :: BootRefusal -> SomeException Source #

fromException :: SomeException -> Maybe BootRefusal Source #

displayException :: BootRefusal -> String Source #

backtraceDesired :: BootRefusal -> Bool Source #

Show BootRefusal Source # 
Instance details

Defined in Singular.Registry.TxBuilder.Boot

Methods

showsPrec :: Int -> BootRefusal -> ShowS Source #

show :: BootRefusal -> String Source #

showList :: [BootRefusal] -> ShowS Source #

Eq BootRefusal Source # 
Instance details

Defined in Singular.Registry.TxBuilder.Boot

Methods

(==) :: BootRefusal -> BootRefusal -> Bool Source #

(/=) :: BootRefusal -> BootRefusal -> Bool Source #