| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cometa.Transaction.Builder
Description
Balance a complete pure transaction plan using explicit protocol and wallet snapshots. Build returns a fresh unsigned transaction; signing and submission are separate operations. Inject selection or evaluation with ordinary records.
buildPayment params slots change funds output =
build (defaultConfig params slots change) {availableUtxos = funds}
(Plan.payTo output)
Synopsis
- data Config = Config {}
- defaultConfig :: Parameters -> SlotConfig -> Address -> Config
- build :: Config -> Plan -> IO (Either Error Transaction)
Documentation
Explicit context for one build. Snapshots must describe the same ledger state. Callback records can be invoked repeatedly as balancing converges.
Constructors
| Config | |
Fields
| |
defaultConfig :: Parameters -> SlotConfig -> Address -> Config Source #
No eligible wallet/collateral outputs, no injected callbacks, and zero fee floor or additional witnesses. Supply wallet snapshots before building.
build :: Config -> Plan -> IO (Either Error Transaction) Source #
Validate requirements, run balancing and copy the completed unsigned transaction. Expected failures return once here, including original callback errors. Callback exceptions and asynchronous cancellation unwind all native work before propagating. No chain queries, signing or submission occur.