Own a DID-LLM with a key instead of a wallet
Every DID-LLM has an owner, who proves it once by signing one message. Most people use a wallet ("My wallet" on the Get a DID-LLM page). AI agents use their own Ed25519 key ("My agent's public key"), and their software signs by itself.
The owner-key tool, did-owner-key.py, is for anyone who wants a key
without a wallet app: it makes an Ed25519 owner key on your own computer and signs the
message for you. The private key never leaves your computer: only the public key and the
signature are sent to the gateway.
On the staging server (tests)? The commands below are for the real service (https://id.debitmydata.io). On staging, see Staging first: one setting goes in front of the
proveanddirectorycommands.
What you need
-
Python 3.10 or later, and the
cryptographypackage (Debian/Ubuntu:sudo apt install python3-cryptography; elsewhere:pip install cryptography). -
The tool itself, from the gateway:
curl -fsSLo did-owner-key.py https://api.debitmydata.io/tools/did-owner-key.pyIt is one short file with no other dependencies: read it before running it. Its SHA-256 (
sha256sum did-owner-key.py) isbf91d85bc8bbd9f37d0f86e4fffb5e358a67b772d55570d29ee6b2177f73de56.
Steps
-
Make the key (once):
mkdir -p -m 700 ~/did-keys python3 did-owner-key.py new ~/did-keys/my-agent.keyIt prints the public key (
ed25519:z6Mk...). The key file is readable by you only, and the tool never overwrites an existing one. -
Back up the key file (for example in your password manager). It is the only proof that the DID-LLM is yours: whoever has it can act as the owner, and nobody can recover it for you.
-
On the Get a DID-LLM page (https://id.debitmydata.io): choose My agent's public key, paste the public key, choose how to pay, then Continue to payment and pay.
-
Once the page shows the payment as received (step 3, "Prove it's yours"), the page shows the command with your registration ID. Copy it and run it:
python3 did-owner-key.py prove ~/did-keys dmd_did_intent_...~/did-keysis the folder of your key files: the tool uses the one that owns this registration and says which (you can also give one key file). It asks the gateway for the message, checks that it is for this registration, this key and this gateway, signs it and sends the signature. It prints "Signed and accepted". If none of your key files owns the registration, it says so and signs nothing. -
Back on the page, click Continue (under the command; or reload the page and click Continue): the DID-LLM is issued. Nothing needs pasting: the tool already sent the signature.
The page's own countdown at step 3 does not matter here: the tool always asks for a fresh message.
List it in the directory (optional)
Once the DID-LLM is issued, its owner can list it in the DID-LLM directory. On the directory's List your DID-LLM page, fill in the profile and click Sign and publish, then run the command the page shows:
python3 did-owner-key.py directory ~/did-keys dmd_challenge_...
The tool finds the key file that owns the DID-LLM in ~/did-keys, shows what will be published and asks you to confirm before it signs. Then click
Continue on the page. Changing or removing the listing works the same way. On staging the
page's command starts with DMD_GATEWAY_API=https://staging-api.debitmydata.io: without it,
the tool asks the production gateway, which does not know staging's messages.
Change the owner key, or add a wallet
On the page: https://id.debitmydata.io/manage ("My DID-LLM" in the top bar) changes the owners of a DID-LLM, or revokes it, for owners with a wallet or a key. It prepares the change and shows each message to sign: wallets sign there, and keys with the tool, which signs what your keys can sign in a change made on the page:
python3 did-owner-key.py sign-change ~/did-keys did:web:api.debitmydata.io:agents:... dmd_owner_change_...
The page shows this command with the change's ID filled in: copy it, run it, then click Continue. The rest of this section does it all from the tool.
To move the DID-LLM to a new key (a key that may have leaked, a new machine), make the new key, then name every owner the DID-LLM will have afterwards:
python3 did-owner-key.py new ~/did-keys/new.key
python3 did-owner-key.py change-owner ~/did-keys did:web:api.debitmydata.io:agents:... ~/did-keys/new.key
- The tool shows the owners now and the new ones, and asks you to confirm. Then the current key
approves the change and the new key accepts it: both are in
~/did-keys, so it signs both, and the change applies at once. - To keep the current key and add a wallet, name both:
... change-owner ~/did-keys did:web:... ed25519:z6Mk<the current key> 0x<the wallet>. The tool shows the wallet's message: sign it in the wallet (personal_sign) and paste the signature when it asks. - Once applied, only the new owners can sign for the DID-LLM; every sign-in made before ends (agents and apps sign in again). Its credential, entitlements and directory listing stay.
- Everything happens within 15 minutes; a change not finished by then expires. Through the MCP
server, the tool is
debitmydata_change_owner. - With no owner key or wallet left that can sign, nothing can be changed: keep a backup of the key file.
- A smart wallet (a contract wallet, such as a Coinbase Smart Wallet) can be an owner, but the production sign-in service checks signatures with no network and cannot check a smart wallet's. So when a key is an owner, let the key approve the change: a change only a smart wallet approved cannot be checked there, and the DID-LLM can no longer sign in to apps or as an agent (its DID document, credential and directory listing are not affected).
Revoke the DID-LLM for good
If the DID-LLM must end (a key that leaked with no other owner to move to, an agent retired), its owner revokes it:
python3 did-owner-key.py revoke ~/did-keys did:web:api.debitmydata.io:agents:...
The tool shows the message and asks you to type REVOKE. It cannot be undone: the DID-LLM, its
credential and its entitlements stop working forever (MCP: debitmydata_revoke_did). The
"Manage your DID-LLM" page does it too: a wallet signs there, a key with this command.
Sign in as the DID-LLM (OAuth)
With DebitMyData's authorization server (auth.debitmydata.io; on staging
staging-auth.debitmydata.io), the same key signs the DID-LLM in and gets an access token for the Agentic Superhighway
(the MCP server), valid for 10 minutes:
DMD_GATEWAY_API=https://staging-api.debitmydata.io python3 did-owner-key.py token ~/did-keys did:web:staging-api.debitmydata.io:agents:...
-
The tool reads the DID-LLM's public key from its DID document, finds the key file that owns it, signs a short request valid for one minute and used once, and sends it to the authorization server next to the gateway (
staging-auth.forstaging-api.,auth.forapi.;DMD_AUTH_SERVERsets another). -
It prints who signed in, for which address and for how long.
--showat the end also prints the token itself: keep it private, whoever holds it can act as the DID-LLM until it expires. -
whoamiinstead oftokensigns in, then asks the Agentic Superhighway who it is signed in as: the whole sign-in, checked from start to end (the token is never printed):DMD_GATEWAY_API=https://staging-api.debitmydata.io python3 did-owner-key.py whoami ~/did-keys did:web:staging-api.debitmydata.io:agents:... -
--identityat the end (oftokenorwhoami) signs in for the Agentic Superhighway's identity endpoint (.../agenticsuperhighway/identity) instead: its tokens are its own. -
Signing in to an app (ChatGPT, Claude...) happens on DebitMyData's sign-in page: for a DID-LLM owned by a key, the page shows a command with its own address, to run as is:
python3 did-owner-key.py sign-in ~/did-keys https://staging-auth.debitmydata.io/authorize/dmd_signin_...The tool shows which app asks and what for, asks you to confirm, signs and sends the signature; then click Continue on the page. A DID-LLM owned by a wallet signs on the page itself, with the wallet.
Staging (the test server)
Staging (https://staging-api.debitmydata.io) is the gateway's test copy: test coins, test
DID-LLMs, nothing real. The tool talks to the real gateway unless told otherwise, so on staging
put DMD_GATEWAY_API=https://staging-api.debitmydata.io in front of prove and directory:
DMD_GATEWAY_API=https://staging-api.debitmydata.io python3 did-owner-key.py prove ~/did-keys dmd_did_intent_...
DMD_GATEWAY_API=https://staging-api.debitmydata.io python3 did-owner-key.py directory ~/did-keys dmd_challenge_...
- Staging's pages show their commands with it already: copy them as they are.
- Without it, the tool asks the real gateway, which does not know staging's registrations: the tool then says it asked the real gateway and how to point it at staging.
newneeds nothing: a key can own DID-LLMs on both. Each DID-LLM belongs to the server that issued it (its DID says which:did:web:staging-api.debitmydata.io:...on staging).- Staging's guided test page (
/docs) makes its own throwaway key, which only that page has. A DID-LLM made there cannot be signed for afterwards, so it cannot be listed in the directory: to try the directory, make the DID-LLM on staging's Get a DID-LLM page with your own key.
Good to know
- Safety checks: the tool only talks to
https://gateways, refuses to sign a message for another gateway or for a registration owned by another key, and never shows the private key. - Which key? Each DID-LLM can only be signed for with the key it was registered with. A DID-LLM made on staging's guided test page has a throwaway key that only that page had: nobody can sign for it afterwards, so it cannot be listed.
- Developers and AI agents: every step is also an API call, described in https://api.debitmydata.io/llms.txt; agents usually sign with their own software.