Documentation Index
Fetch the complete documentation index at: https://vincent-glitch003-lit-triggers-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
What is Lit Triggers?
A Lit Action runs when you call it. Lit Triggers runs one for you when something happens:- Webhook — an external service POSTs to a generated URL.
- Schedule — a cron expression fires the action automatically.
- Chain event — an EVM log matching a chain / contract / event signature fires the action.
Lit.Actions.getLitActionPrivateKey()), a trigger turns a Lit Action into an
autonomous actor: it reacts to an event, evaluates trusted data, and signs
or sends a transaction — with no server or human holding the signing key, and
no separate keeper or oracle to trust. Edit the action by a byte and its CID,
signer address, and every downstream authorization change with it.
How it fits together
The action contract
The runtime wraps your code and invokesmain(params) itself, then wraps the
returned value in Lit.Actions.setResponse(). Define main and return a value —
do not call main() yourself.
params depends on the trigger type:
| Trigger | params |
|---|---|
| webhook | { source: "webhook", event: <parsed JSON body>, event_raw: <raw body string>, headers: { ... } } |
| schedule | { source: "schedule", scheduled_at: "<RFC3339>", cron: "<expr>" } |
| chain_event | { source: "chain_event", event: { chain_key, chain_id, decoded: { arg0, arg1, ... }, raw_log, transaction_hash, log_index, topic0, topics, block_number, ... } } |
ethers (v5), fetch, crypto, and the
Lit.Actions SDK (getLitActionPrivateKey,
getLitActionWalletAddress, Encrypt, Decrypt, setResponse). viem is not
available — use ethers.
Security model
- Your Lit/Chipotle admin API key stays with you — never send it to the lit-triggers backend.
- lit-triggers stores only scoped usage API keys, encrypted at rest. A scoped key must be permitted to execute the target action’s group. Mint one in the Dashboard or via the API.
- The action’s signing key is never configured — it is derived from the action’s CID by the Lit network at run time.
- For secrets the action needs (e.g. a webhook HMAC secret), prefer
Lit.Actions.Encrypt/Decryptover plaintext trigger params.
Next steps
- Creating Triggers — authorize an agent, create webhook / schedule / chain-event triggers, inspect runs.
- Examples — copy-paste actions, plus links to full runnable demos (contracts + setup + e2e) in the repo.