Functions
Live on testnetRuns on OutLayer
A function is Rust compiled to WASI. OutLayer runs it in a TEE worker, and the contract keeps a registry of your functions and a record of every result. A function can hold a secret and make outbound HTTPS calls. There is no JavaScript runtime.
Commands
quay functions deploy moderate
quay secrets set MOD_API_KEY --fn moderate
quay functions invoke digest '{}'
quay functions logs moderateHow Harbour Board uses it
- A member adds a post. The
postscollection hason_add: moderate, so the contract asks OutLayer to run it. moderategets the post and theMOD_API_KEYsecret. It checks blocked words and fetches a preview for any link.- The result lands in the
_fncollection. A post markedhide: trueleaves/and/api/posts.
The result moderate wrote for run 24, read from the _fn collection:
{
"name": "moderate",
"caller": "e2e-4eb351a1.harbour-board.testnet",
"ok": true,
"output": {
"auth": "ok",
"hide": false,
"key_sha256_prefix": "f48adad6c4c4",
"preview": { "title": "Example Domain", "url": "https://example.com/" },
"reason": "ok"
}
}
Proof on testnet
| The function deployed | AyEpD8Lf… |
|---|---|
| The secret stored | 3cZfXHtL…; the value was never printed, and only a sha256 prefix is kept |
digest run by hand | 9vX1o2oD… and its attestation |
| A post hidden | Run 17, from promo-bot: hide: true, blocked words. /posts/9 answers 404. |
Check it without a key: view fn_list '{}' and view db_list '{"collection":"_fn","query":{"limit":3,"order":"desc"}}'. The view helper is in the repository README, and scripts/judge.sh runs these checks.
What you trust
OutLayer is one operator's TEE network. Secrets are decrypted inside its enclave, so you trust that enclave and that operator. There is no drop-in replacement. Run the same logic on your own server, or leave functions out. Without them, posts still land, previews stay empty and scheduled results stop.
Limits
| Language | Rust compiled to WASI. No JavaScript runtime. |
|---|---|
| Time | 30 seconds per call on the Board. Runs took 5 to 17 seconds. |
| Cost | 0.005 NEAR attached per call, paid by the site |
Every flag is in the command reference, generated from quay functions --help, quay secrets --help.