- Agent generates a local key.
- Agent sends a deep link to the user.
- User authorizes the key on
id.nuwa.devand sends back DID text. - Agent verifies key binding and sends DID-authenticated requests.
nuwa-idCLI from@nuwa-ai/identity-kitdid-checkservice athttps://did-check.nuwa.dev
Prerequisites
- Node.js 18+
- Access to Rooch mainnet
Install CLI
Step 1: Initialize local key material
~/.config/nuwa-did:
config.jsonkeys/default.json
keys/ is private key material. Do not share it.
Step 2: Generate deep link for user authorization
The user opens the link in a browser, logs in on
id.nuwa.dev, and approves adding the agent key.
Step 3: Collect DID from user
After approval, the user sends DID text back to the agent, for example:Step 4: Persist DID and verify key binding
Save DID into active profile:Step 5: Send DID-authenticated request
With the DID saved and key verified, you can now send a DID-authenticated request. Generate header only:Defaults
- Network:
main - CADOP domain:
https://id.nuwa.dev - Key fragment: loaded from active profile in config
Optional: manage profiles
Troubleshooting
agent key not initialized: runnuwa-id initdid is not set: runnuwa-id set-did --did DIDverification method not found: user has not authorized the agent key yet, or sent the wrong DID401 Unauthorizedfrom/whoami: regenerate auth header and ensure URL/method match exactly
--key-fragment is omitted on nuwa-id init, the CLI generates a timestamp-based fragment.
