DomainEvent

sealed class DomainEvent

Telemetry surface for on-chain spend lifecycle events. Emitted by the trust-domain control plane (org.trustweave.trust.domain.TrustedDomainManager and org.trustweave.trust.domain.treasury.DomainTreasury implementations) so SaaS billing, dashboards, and audit pipelines can subscribe without coupling to ledger internals.

Events are fire-and-forget from the producer's perspective: a sink that throws or hangs must not break treasury operations. Sinks are responsible for their own backpressure and persistence.

Inheritors

Types

Link copied to clipboard
data class OnChainSpendCancelled(val domainId: DomainId, val chainId: String, val correlationId: String) : DomainEvent

Reservation released without spend (caller-initiated rollback or TTL sweep).

Link copied to clipboard
data class OnChainSpendFailed(val domainId: DomainId, val chainId: String, val correlationId: String, val reason: String) : DomainEvent

Submission attempted but failed; surfaced for alerting / SLO accounting.

Link copied to clipboard
data class OnChainSpendReserved(val domainId: DomainId, val chainId: String, val correlationId: String, val estimate: TokenAmount) : DomainEvent

Funds locked against a ChainAccount for an upcoming on-chain operation.

Link copied to clipboard
data class OnChainSpendSettled(val domainId: DomainId, val chainId: String, val correlationId: String, val actualFee: TokenAmount, val txHash: String?, val payerAddress: String?) : DomainEvent

Operation submitted successfully; reservation closed against the real fee.

Properties

Link copied to clipboard
abstract val chainId: String
Link copied to clipboard
abstract val correlationId: String
Link copied to clipboard
abstract val domainId: DomainId