Publish a Name¶
With the name server¶
curl -X PUT http://nip05:8080/v1/names/finance-bot -H "Authorization: Bearer $NIP05_TOKEN" \
-H "Content-Type: application/json" -d '{"pubkey": "<64 hex digits>"}'
GET /v1/identity of the agent shows its key as nostr. Serve the name server under your domain with HTTPS.
With a static file¶
Any web server can publish names:
{"names": {"finance-bot": "<64 hex digits>"}}
Serve it at https://example.com/.well-known/nostr.json. The name is then finance-bot@example.com.
Enroll the agent¶
curl -X POST http://authority:8080/v1/enroll -H "Authorization: Bearer $AUTHORITY_TOKEN" \
-H "Content-Type: application/json" -d '{"aid": "<identifier>", "role": "agent"}' > credential.json
curl -X PUT http://agent:8080/v1/credential -H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" -d @credential.json
Rotate¶
POST /v1/rotate rotates the identity's keys. The agent publishes a new advertisement. Names, pins and petnames stay valid.