Signed
org.sigilaris.core.application.transactions.Signed
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 Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article