TransactionBuilder
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TransactionBuilder.type
Members list
Type members
Classlikes
An opaque context in which the builder operates.
An opaque context in which the builder operates.
TODO: make a class, remove toTuple()?
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Represents different types of authorized operations (except the spending, which goes separately).
A wrapper around a UTxO set that prevents adding conflicting pairs
A wrapper around a UTxO set that prevents adding conflicting pairs
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
ResolvedUtxos.type
Value members
Concrete methods
Balances the transaction using a diff handler to adjust the transaction.
Balances the transaction using a diff handler to adjust the transaction.
Invariants:
- both ADA and native tokens are adjusted by the diff handler
- fees never go below the initial fee
Attributes
Balances the transaction using a diff handler to adjust the transaction.
Balances the transaction using a diff handler to adjust the transaction.
Invariants:
- both ADA and native tokens are adjusted by the diff handler
- fees never go below the initial fee
Value parameters
- resolvedUtxo
-
The resolved UTXOs for inputs in the transaction.
Attributes
Build a transaction from scratch, starting with an "empty" transaction and no signers.
Build a transaction from scratch, starting with an "empty" transaction and no signers.
Attributes
Ensure collateral return output is set when beneficial.
Ensure collateral return output is set when beneficial.
Per Babbage spec (Figure 4), if script validation FAILS without collateralReturnOutput, ALL collateral ADA is taken as fees. With collateralReturnOutput set, only the difference (inputs - return) is taken as fees, and the return output is created.
This method creates a collateral return output when:
- Collateral contains tokens (MUST be returned per protocol)
- Excess ADA above required collateral can cover min ADA for return output
This prevents users from losing their entire collateral UTXO if a script fails.
This is the transaction-level version used within the balancing loop.
Attributes
Update the given transaction output to have the minimum required ada, only changing its Coin.
Update the given transaction output to have the minimum required ada, only changing its Coin.
Attributes
Modify a transaction within a context.
Modify a transaction within a context.
Attributes
Calculates the total value of all collateral inputs.
Calculates the total value of all collateral inputs.
This helper is shared between TransactionBuilder and TxBuilder to avoid code duplication.
Value parameters
- tx
-
the transaction containing collateral inputs
- utxos
-
resolved UTXOs to look up collateral input values
Attributes
- Returns
-
the sum of all collateral input values
Concrete fields
Modifications of tx's outputs (so far) is relatively "safe" operation in terms that it can't break the transaction validity as long as outputs are correct. Moreover, the DiffHandler to some extend does the same thing, so this lens is the only way to manually edit the tx' outputs in the context, which may be useful together with modify.
Modifications of tx's outputs (so far) is relatively "safe" operation in terms that it can't break the transaction validity as long as outputs are correct. Moreover, the DiffHandler to some extend does the same thing, so this lens is the only way to manually edit the tx' outputs in the context, which may be useful together with modify.
Attributes
Hydrozoa use case: tx upgrade that requires promoting a reference input into a spent input.
Hydrozoa use case: tx upgrade that requires promoting a reference input into a spent input.