singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.Registry.TxBuilder.Retract

Description

Builds the retract transaction that cancels a pending request. The requester spends their request UTxO (recovering locked ADA) while referencing the State UTxO. Validity interval is Phase 2.

Synopsis

Documentation

retractRequestImpl Source #

Arguments

:: CageConfig 
-> Session NoWitness IO 
-> TokenId

Token the request belongs to

-> TxIn

UTxO reference of the request to retract

-> Addr

Fee payer and change address

-> IO ConwayTx 

Build a retract-request transaction.

The requester spends their request UTxO while referencing the state UTxO. All its lovelace is paid to the request owner's key, with the consumed request reference as the return's inline datum. Wallet funding pays fees separately. Requires Phase 2 validity.

retractRequestAtTipImpl :: SlotNo -> CageConfig -> Session NoWitness IO -> TokenId -> TxIn -> Addr -> IO ConwayTx Source #

Use the caller's tip as the lower validity bound, while staying inside phase 2. Refuse lower-bound-ahead-of-view if that bound or the phase-two opening is later than the acquired view's own tip.