// developers · sample app
A compatible app in one file.
examples/app.mjs is the smallest app that works with a Semora vault: plain Node 20+, the same crypto file as the site, no account. Use it as it is, or copy its five steps into your own tool. It is an HTTP client with signed requests; no other integration ships here.
$ node examples/app.mjs init --name "Research helper"Makes the app's keys in .semora-app-key.json and prints a pairing code + fingerprint.
$ open /vault/apps, paste the codeCompare the fingerprint, pick one folder, read and/or propose, an end date. Optionally record it on chain.
$ node examples/app.mjs pull --server https://<this site>Fetches every active grant, opens it with the app's key, prints the notes.
$ node examples/app.mjs propose --grant <id> --title "…" --body "…"Seals a suggestion to the vault owner. It waits in their inbox.
$ node examples/app.mjs check --rpc <url> --ledger 0x… --grant <n>Reads check() on SemoraAccessLedger: 0, or the reasons it is refused.
$ node examples/app.mjs unpair --vault <vault id>Leaves a vault (frees the pairing slot).
| method | path | signed by | what |
|---|---|---|---|
| GET | /api/app/grants | app | Active grants for the signing app (sealed folders), refused ones with reason bits. Each read is logged. |
| POST | /api/app/proposals | app | { grantId, sealed } with a box sealed to the owner key from the grant. |
| DELETE | /api/app/vaults/<vault> | app | Unpair from a vault. |
| GET / PUT | /api/vault/<id> | owner | The encrypted vault document, with revision checks. |
| GET / POST | /api/vault/<id>/grants | owner | List grants; create one (first grant to an app needs its pairing code). |
| PUT / DELETE | /api/vault/<id>/grants/<gid> | owner | Re-seal / change expiry / note the chain id; revoke. |
| GET | /api/vault/<id>/inbox · /log | owner | Pending sealed proposals; the access log with salts for sealing. |
| GET | /api/status · /api/chain | anyone | Storage mode and counts; live Robinhood Chain block, gas and ETH/USD. |
// signing a request
message = "semora/v1/request\n" + METHOD + "\n" + path + "\n" + timeMs + "\n" + sha256hex(body)
headers: x-semora-key ed25519 public key (hex)
x-semora-ts timeMs (within 2 minutes)
x-semora-sig ed25519 signature (hex)
x-semora-box x25519 public key (hex, apps only)Connectors for specific AI assistants (an MCP server, browser extension) are Concept.