TransactionEditor
scalus.cardano.txbuilder.TransactionEditor
object TransactionEditor
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
TransactionEditor.type
Members list
Value members
Concrete methods
Edit a transaction, ensuring proper handling of redeemers.
Edit a transaction, ensuring proper handling of redeemers.
You can insert or delete inputs, certificates, mints or reward withdrawals: regardless of the changes, the redeemers will be re-indexed to point to the correct transaction components.
- If you add any new redeemers, and they point to the transaction components correctly, they are guaranteed to have correct indices in the output tx.
- If some component that has a redeemer pointing to it is removed, the corresponding redeemer will be removed as well from the resulting transaction.
Value parameters
- f
-
endomorphism
- tx
-
source transaction
Attributes
- Returns
-
target transaction
def editTransactionSafe(f: Transaction => Transaction)(tx: Transaction): Either[Redeemer, Transaction]
Like editTransaction, but fails if:
Like editTransaction, but fails if:
- the input transaction's redeemers have invalid
indexpointers - the resulting transaction's redeemers have invalid
indexpointers
The first problematic redeemer will be returned as an error value.
Value parameters
- f
-
endomorphism
- tx
-
source transaction
Attributes
- Returns
-
target transaction
In this article