AccountsReducer

org.sigilaris.core.application.feature.accounts.module.AccountsReducer
class AccountsReducer[F[_]] extends StateReducer0[F, AccountsSchema, EmptyTuple]

Accounts state reducer (path-agnostic).

Implements transaction logic for account management:

  • CreateNamedAccount
  • UpdateAccount
  • AddKeyIds
  • RemoveKeyIds
  • RemoveAccount

Signature verification follows ADR-0012 and is delegated to the shared SignatureVerifier utility to guarantee consistent key recovery and expiration checks.

Type parameters

F

the effect type

Attributes

Source
AccountsBlueprint.scala
Graph
Supertypes
trait StateReducer0[F, AccountsSchema, EmptyTuple]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply[T <: Tx](signedTx: Signed[T])(using requiresReads: Requires[signedTx.value.Reads, AccountsSchema], requiresWrites: Requires[signedTx.value.Writes, AccountsSchema], ownsTables: Tables[F, AccountsSchema], provider: TablesProvider[F, EmptyTuple]): StoreF[F][(signedTx.value.Result, List[signedTx.value.Event])]

Verify transaction signature according to ADR-0012.

Verify transaction signature according to ADR-0012.

Verification steps:

  • Compute transaction hash
  • Recover public key from signature
  • Derive KeyId20 from recovered public key
  • Verify KeyId20 is registered for the signing account
  • Check key expiration for named accounts using deterministic timestamp

NOTE: This only verifies that the signature is valid for the claimed signer. For account mutation operations, you must also call verifyAuthorization to ensure the signer has permission to modify the target account.

Value parameters

hashT

typeclass instance to hash the transaction

ownsTables

the owned tables for account/key lookups

recoverT

typeclass instance to recover the signing public key

signedTx

the signed transaction to verify

Attributes

Returns

Either verification failure or Unit on success

Source
AccountsBlueprint.scala