SignedTxBuilder

org.sigilaris.core.application.support.runtime.SignedTxBuilder

Helper utilities for building org.sigilaris.core.application.transactions.Signed transactions.

Tests and integration code frequently need to sign transactions with real key pairs. Repeating the same Hash/Sign workflow across the codebase is error-prone and obscures intent. This builder centralises the logic and exposes a single safe API that returns failures as Either.

Attributes

Source
SignedTxBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final class ForAccount

Builder that caches the signing context (account and key pair) for repeated use.

Builder that caches the signing context (account and key pair) for repeated use.

Attributes

Source
SignedTxBuilder.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def forAccount(account: Account, keyPair: KeyPair): ForAccount

Creates a reusable builder bound to a specific account/key pair.

Creates a reusable builder bound to a specific account/key pair.

Attributes

Source
SignedTxBuilder.scala
def sign[A <: Tx : Hash : Sign](tx: A, account: Account, keyPair: KeyPair): Either[SigilarisFailure, Signed[A]]

Signs a transaction using the supplied account and key pair.

Signs a transaction using the supplied account and key pair.

Type parameters

A

transaction type

Value parameters

account

logical account that owns the key pair

keyPair

key material used during signing

tx

transaction payload to sign

Attributes

Returns

either a org.sigilaris.core.application.transactions.Signed transaction or the signing failure

Source
SignedTxBuilder.scala