Skip to main content
The actions below are complete: paste the code as a trigger’s action_code (see Creating Triggers). For flows that need a contract, a deploy step, and an off-chain client, see the full demos.

1. Echo a webhook payload

The simplest trigger action — returns what it received. Useful to confirm a webhook is wired up and to see the exact params shape.
Create it as a webhook trigger, then POST /webhook/<id> with any JSON body — the body comes back under event, and the safe request headers under header_keys.

2. Notarize a payload with a keyless signature

Take any webhook payload, compute a deterministic digest, and sign it with the action’s own wallet — a key held by the Lit network, not by any server. The result is a tamper-evident receipt that only this exact action code could have produced. This is the building block the on-chain demos extend.
Verify a receipt anywhere:

3. Sign a scheduled heartbeat

A schedule trigger that signs a timestamped heartbeat each tick — a minimal “signed cron” you can post on-chain or to an external monitor.

4. React to a chain event

A chain-event trigger that reads ABI-decoded args from a matched log. Pair the Transfer(address,address,uint256) signature with an ERC-20 contract to watch transfers; decoded.arg2 is the amount.
This reads decoded directly, which is fine for observing (notifying, logging). But anyone with the usage key can run the action with a fabricated decoded payload, so do not sign or transact on these values as-is. If the action acts on the event, re-fetch the log by transaction_hash + log_index from a pinned source RPC and verify the emitter — the hostname-pinned RPC trust-anchor pattern, as the chainlink-feed-mirror demo below does.

Full demos

These need more than one file to run — a Solidity contract, a deploy script, an end-to-end client — and live under examples/lit-triggers/ in the repo: Each ships a hardened action, a one-shot setup script (action CID, scoped key, contract deploy where applicable, trigger creation), and an end-to-end client. (uptime-insurance has no contract — its “pool” is the action wallet’s balance.)
Want an agent to wire any of these up for you? Point it at https://triggers.litprotocol.com/SKILL.md.