Testnet only (Arkiv Tiramisu). OpenTrigger 0.1 has not had an outside audit.
OpenTrigger

Entities

Every entity OpenTrigger writes, with its attributes, payload and lifetime.

The format's rules:

  • Searchable fields are attributes; everything else is a JSON payload. Attribute names are lowercase (the node rejects uppercase), so the block to fire at is fireat.
  • Every compared number is a u64. A bare number is an i32 and silently never matches a u64 range.
  • Addresses and keys in attributes are lowercase hex, so equality matches however callers wrote them.
  • Every entity has type and v (format version, i32, currently 1).
  • Who wrote it is Arkiv's $creator, never an attribute.
typeWritten byLifetime
trg.ruleThe rule's creatorUntil its deadline + 7 days, at least 1 day
trg.claimA worker60 seconds (30 blocks)
trg.receiptA worker30 days
trg.workerA worker5 minutes, renewed every minute

trg.rule

AttributeTypeNotes
type, vstr, i32trg.rule, 1
appstrLets an app find only its own rules (default arkiv-triggers)
onstrexpire or block
targetstrexpire only: the entity whose expiry fires the rule
fireatu64block only: the block that fires it
offsetu64Fire this many blocks early; 0 is on time
actionstrtelegram, webhook, receipt, extend
workerstrany or one worker's address
repeatstronce (the only value in v1)

Payload: { name, message, chat, url, extendDays, retries }, each when relevant.

trg.claim

AttributeTypeNotes
type, vstr, i32trg.claim, 1
rulestrThe rule's key
workerstrThe claiming worker (also its $creator)
deadlineu64The deadline being claimed

No payload. The earliest $createdAt wins; ties go to the lowest entity key.

trg.receipt

AttributeTypeNotes
type, vstr, i32trg.receipt, 1
rulestrThe rule's key
rulecreatorstrThe rule's $creator
actionstrThe action that ran
statusstrok, failed or skipped
deadlineu64The block the rule was due
firedatu64The block it fired

Payload: { "reason": "target expired", "result": { "code": 200, "latencyMs": 412, "attempts": 1 } }. result may hold code, messageId, newExpiresAt, error, latencyMs, attempts.

trg.worker

AttributeTypeNotes
type, vstr, i32trg.worker, 1
versionstrarkiv-triggers/0.1.1
modestrany or own
lastblocku64Last block fully processed
actionsstrComma-separated actions it can run
operatorstrOptional: the owner's main wallet

Payload: { "sealKey": "0x…", "operatorSig": "0x…" }.

Queries

WhoPurposeQuery
WorkerRules it might firetype = "trg.rule"
WorkerLive claimstype = "trg.claim"
Worker, SDKReceipts since a blocktype = "trg.receipt" && firedat >= u64(n)
SDKMy rulestype = "trg.rule", created by me
SDKReceipts for my rulestype = "trg.receipt" && rulecreator = "0x…"
SDKOne rule's receipts and claimstype = … && rule = "0x…"
SDK, dashboardWorkerstype = "trg.worker" (optionally && operator = "0x…")

Queries page 200 at a time, pinned to one block so a page cursor stays valid.

On this page