Transaction

scalus.cardano.ledger.Transaction
See theTransaction companion object
case class Transaction(body: KeepRaw[TransactionBody], witnessSetRaw: KeepRaw[TransactionWitnessSet], isValid: Boolean, auxiliaryData: Option[KeepRaw[AuxiliaryData]])

Represents a complete transaction in Cardano

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def toCbor: Array[Byte]

Returns the CBOR encoding of this transaction.

Returns the CBOR encoding of this transaction.

A transaction decoded with Transaction.fromCbor and not changed since encodes to the bytes it was decoded from, so a 3-element transaction without the isValid flag stays 3 elements. Any other transaction, including one returned by copy, withBody or withWitness, encodes as [body, witnesses, isValid, auxiliary data].

Attributes

def toCborForFeeCalculation: Array[Byte]

Returns CBOR encoding for transaction size/fee calculation.

Returns CBOR encoding for transaction size/fee calculation.

This encoding omits the isValid field for backward compatibility with Mary era, matching Cardano ledger's toCBORForSizeComputation function.

Attributes

See also

Cardano.Ledger.Alonzo.Tx.toCBORForSizeComputation

def utxos: Utxos

Returns UTXOs that would be created by this transaction.

Returns UTXOs that would be created by this transaction.

Returns a map of TransactionInput -> TransactionOutput for all outputs, allowing them to be used as inputs in subsequent chained transactions.

Attributes

The transaction's validity interval (start slot and TTL)

The transaction's validity interval (start slot and TTL)

Attributes

Returns a copy with the body replaced

Returns a copy with the body replaced

Attributes

Returns a copy with the body transformed by the given function

Returns a copy with the body transformed by the given function

Attributes

Returns a copy with the witness set replaced

Returns a copy with the witness set replaced

Attributes

Returns a copy with the witness set transformed by the given function

Returns a copy with the witness set transformed by the given function

Attributes

The unwrapped witness set

The unwrapped witness set

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val id: TransactionHash

The transaction hash (blake2b-256 of the serialized body)

The transaction hash (blake2b-256 of the serialized body)

Attributes