TrustedDomainManager
Orchestrates the payment plane for one Trusted Domain. The single broker between caller code and the anchor SPI: every ledger-touching operation that should be billed to a domain treasury flows through anchor.
Lifecycle of one call (see the design doc, §6):
resolve the active DomainTreasury for domainId
pick a FeeStrategy (caller-supplied, defaults to
DomainPays)estimate the fee against the corresponding BlockchainAnchorClient
enforce caller-cap, per-op cap, per-window cap, sponsor allow-list (delegated to DomainTreasury.reserve)
reserve funds → handed-down PaymentContext
call
client.writePayload(payload, ctx)settle on success (or cancel on failure)
Construction takes one treasury per domain; multi-tenant deployments wrap this in a registry keyed by DomainId.
Constructors
Properties
Functions
Anchor payload on chainId paid for by this domain's treasury (by default). Returns the AnchorResult from the underlying plugin; the fee actually charged is reflected on the result and in the treasury ledger.
Direct access to the underlying treasury — for inspection / dashboards.