Skip to content

Filters

Filters narrow event streams and trigger conditions. The current top-level event filter is EventFilterBox, which can match these event families:

  • Pipeline
  • Data
  • Time
  • ExecuteTrigger
  • TriggerCompleted

Use the narrowest filter that matches the workflow. Broad filters such as DataEventFilter::Any are useful for diagnostics, but they make every event pay the cost of trigger or subscriber matching.

Data Event Filters

DataEventFilter matches ledger data events. Its current variants include:

VariantEvent family
AnyAny data event
PeerPeer lifecycle events
DomainDomain lifecycle and metadata events
AccountAccount lifecycle, metadata, alias, and identity events
AssetAsset balance and metadata events
AssetDefinitionAsset definition lifecycle, policy, and metadata events
NftNFT lifecycle and metadata events
RwaReal-world-asset lifecycle events
TriggerTrigger lifecycle and metadata events
RoleRole lifecycle events
ConfigurationOn-chain configuration events
ExecutorRuntime executor events
ProofProof verification lifecycle events
ConfidentialConfidential asset events
VerifyingKeyVerifying-key registry events
RuntimeUpgradeRuntime upgrade events
SoradnsResolver directory governance events
SorafsSoraFS gateway compliance events
SpaceDirectorySpace Directory manifest lifecycle events
EscrowNative asset escrow lifecycle events
OfflineOffline settlement events
OracleOracle feed events
SocialViral incentive events
BridgeBridge events
GovernanceGovernance events when the governance feature is enabled

Most concrete filters also allow an optional ID matcher and an event-set mask. For example, an asset filter can match one asset or one class of asset events, while a trigger filter can match a trigger ID and a trigger event set.

Pipeline Filters

Pipeline filters match processing events such as block, transaction, merge, and witness events. Use them for operational subscriptions, block-processing dashboards, and triggers that react to pipeline state rather than ledger data objects.

Trigger Filters

Triggers store their condition as an EventFilterBox. A trigger action also stores:

  • an executable
  • a repetition policy
  • an authority account
  • an optional time-trigger retry policy
  • metadata

The trigger authority must have the permissions required by the executable. Prefer dedicated technical accounts for long-lived triggers.

Query Filters

Query filters are separate from event filters. Iterable queries can expose predicate and selector support. Use query-specific typed filters from the SDK so the filter input matches the query output type.

See also: