Signing Agent API¶
All endpoints need Authorization: Bearer <AGENT_TOKEN>.
| Method and path | Body | Purpose |
|---|---|---|
GET /v1/identity |
Public key | |
POST /v1/sign-packet |
hash (hex) |
Sign a packet |
POST /v1/sign-ping |
l2_id, status, nonce, ts_ms |
Sign a ping answer |
POST /v1/verify-ping |
the answer | Verify it. It must be younger than one minute |
POST /v1/publish |
kind, content, tags |
Sign an event and publish it. Only for the allowed kinds |
POST /v1/query |
kinds, since |
Verified events of all relays |
Configuration¶
| Variable | Meaning |
|---|---|
AGENT_TOKEN |
Access token |
RELAYS |
Relays, separated by commas |
KINDS |
Event kinds that may be published |
KEY_FILE |
Key file. /keys/key by default |
GENERATE_KEY |
true creates the key if it does not exist |
WALLET_URL, WALLET_TOKEN |
Use a wallet instead of a key file |
Give a node's agent no KINDS, so that it can sign packets but not announce aggregators.