Skip to main content

Module command

Module command 

Source
Expand description

Engine command and output types.

Every state mutation enters the engine as an EngineCommand. The engine processes commands synchronously and returns an ApplyOutput containing the events produced and a state hash for replication.

apply(state, EngineCommand) -> ApplyOutput { events, hash }

Commands are the only way to change engine state. The engine never reads from external services, databases, or the network during command processing.

Structsยง

AccruePmSettlementInterestCommand
ApplyOutput
Output from apply(): the events produced and a state hash.
ApplyPmSettlementRepaymentCommand
JournalPmRecoveryPlanCommand
MarkPmRecoveryActionSubmittedCommand
MarketActionCommand
PmRecoveryActionCommand
PmRecoveryPlanCommand
PmSettlementEventKey
RecordPmVaultDepositCommand
RequestPmVaultWithdrawalCommand
ResolvePmRecoveryActionCommand
RfqExecuteCommand
RfqExecuteLeg
SetPmSettlementPoolConfigCommand
TickExpiryContext
TickExpiryDueGroup
TickExpiryPendingGroup
TickExpiryPmSettlement
TickExpirySettlementPrice
TickExpiryWalletMarginMode

Enumsยง

EngineCommand
Commands that mutate engine state.
PmRecoveryActionKind
PmRecoveryActionResult
PmRecoveryExternalKind
PmRecoveryReason
PmRecoveryTrigger
RfqExecuteResult

Functionsยง

update_len_prefixed ๐Ÿ”’
update_pm_recovery_plan_hash ๐Ÿ”’
update_tick_expiry_context_hash ๐Ÿ”’