Documentation Index
Fetch the complete documentation index at: https://docs.pulsy.app/llms.txt
Use this file to discover all available pages before exploring further.
Filters
A filter is the per-feed event handling step that runs against each payload from the feed’s selected data type. It is not the whole feed and it is not the whole workflow. It is the part of the feed that inspects the currentstream, decides whether this payload should emit, and can shape the object that gets emitted.
In the current runtime, filters are authored in JavaScript. A filter receives stream and returns either a result object or no output.
Required Shape
Every filter must definemain(stream). Atria calls this function for each payload assigned to the feed. Your code goes inside main.
Return Behavior
- Return
nullorundefinedto emit no output. - Return a JSON-serializable object to emit a result.
- Avoid returning very large objects. The default filter output limit is 8 MB, controlled by the runtime
MaxOutputSizeKBsetting.
Available Modules
Filters can use bundled runtime modules:ethersfor EVM encoding, decoding, units, and ABI helpers.@atria/sdkfor Atria helper functions such as EVM log decoding.@atria/kvfor feed-accessible key-value storage when enabled.
Execution Model
Filters run inside an embedded V8 engine. The runtime serializes input to JSON, callsmain, then deserializes the returned value.
The filter should be deterministic and quick. It should parse the incoming payload, check the event condition, and return a compact object that the next workflow step can understand. Keep heavier enrichment, integration-specific formatting, or optional business-specific computation in a function when that separation makes the feed easier to operate.
Learn more in runtime architecture and security and sandboxing.