Signed

org.sigilaris.core.application.transactions.Signed
final case class Signed[+A <: Tx](sig: AccountSignature, value: A)

Signed transaction wrapper enforcing signature requirement at type level.

All blockchain transactions must be wrapped in Signed[A] to ensure they carry a valid signature. This is enforced at compile time - attempting to submit an unsigned transaction to a blueprint will result in a type error.

The covariant type parameter (+A <: Tx) allows Signed[CreateNamedAccount] to be used where Signed[Tx & ModuleRoutedTx] is expected, enabling flexible composition while maintaining type safety.

Type parameters

A

the transaction type (covariant)

Value parameters

sig

the account signature (account + cryptographic signature)

value

the actual transaction payload

Attributes

See also

AccountSignature for signature structure

ADR-0012 for design rationale

Example
// Creating a signed transaction
val tx = CreateNamedAccount(...)
val keyPair = CryptoOps.generate()
val account = Account.Named(Utf8("alice"))
// Sign the transaction
val signedTx: Either[SigilarisFailure, Signed[CreateNamedAccount]] =
 for
   sig <- keyPair.sign(tx)
 yield Signed(AccountSignature(account, sig), tx)
// Use in blueprint (requires Signed wrapper)
module.reducer.apply(signedTx)
Source
Model.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product