TransactionBuilder

scalus.cardano.txbuilder.TransactionBuilder

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class Context(transaction: Transaction, redeemers: Seq[DetachedRedeemer], network: Network, expectedSigners: Set[ExpectedSigner], resolvedUtxos: ResolvedUtxos, delayedRedeemerSpecs: Seq[DelayedRedeemerSpec] = ...)

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Context

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Context.type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
trait HasWitnessKind[A]

TODO: this is a good candidate to be removed, we use it only in assertCredentialMatchesWitness.

TODO: this is a good candidate to be removed, we use it only in assertCredentialMatchesWitness.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Operation

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Operation.type
sealed trait Operation

Represents different types of authorized operations (except the spending, which goes separately).

Represents different types of authorized operations (except the spending, which goes separately).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Minting
class Proposing
class Voting
class Withdraw
case class ResolvedUtxos

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ResolvedUtxos

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type BuilderM[A] = EitherT[[X] =>> State[Context, X], StepError | RedeemerIndexingInternalError, A]

Transaction builder monad. Retains context at point of failure, if tehre's any.

Transaction builder monad. Retains context at point of failure, if tehre's any.

Attributes

Value members

Concrete methods

def build(network: Network, steps: Seq[TransactionBuilderStep]): Either[SomeBuildError, Context]

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

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

def liftF0[A](either: Either[StepError | RedeemerIndexingInternalError, A]): BuilderM[A]
def modify(ctx: Context, steps: Seq[TransactionBuilderStep]): Either[SomeBuildError, Context]

Modify a transaction within a context.

Modify a transaction within a context.

Attributes

def modify0(f: Context => Context): BuilderM[Unit]
def pure0[A](value: A): BuilderM[A]

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.

Attributes