Skip to content

Getting Started

1. Start witnesses and watchers

From the src directory:

support/deploy/scripts/up.sh witness watcher
set -a; . support/deploy/.state/secrets.env; . support/deploy/.state/ids.env; set +a

2. Create a tenant

curl -s -X POST http://127.0.0.1:7620/v1/admin/tenants -H "Authorization: Bearer $WATCHER_ADMIN" -d '{"id":"acme"}'
{"api_key":"...","id":"acme"}

3. Watch an identity

curl -s -X PUT http://127.0.0.1:7620/v1/aids/<aid> -H "Authorization: Bearer <api key>"

The identity must be known to the witnesses. The watcher polls them every POLL_SECONDS.

4. Ask about it

curl -s "http://127.0.0.1:7620/v1/identity/<aid>?nonce=$(openssl rand -hex 16)"

The answer is an envelope. Its payload contains:

{"aid": "...", "nonce": "...", "ts": 0, "known": true, "state": {}, "witnessed": true, "highest_observed": 0, "conflict": false, "alerts": []}

Verify sig with the watcher's identifier, and compare the nonce. The watcher's identifier is in WATCHERS.

5. See a fork detected

The end-to-end checks create a fork and recover from it. They need notaries and the keri-agent image:

docker build -t keri-agent:dev keri-system/python
support/deploy/scripts/up.sh notary
support/deploy/scripts/e2e.sh