mesh-peer-registry
A small, shared, language-agnostic peer registry for the mesh network used by hermes-mesh and openclaw-mesh.
Peers register with an Ed25519 public key and a webhook URL, then discover each other over a simple HTTP API. The server never holds private keys.
About
mesh-peer-registry provides a centralized but state-light way for mesh agents to announce themselves to one another:
- Peers register an Ed25519 public key and a webhook URL under a unique name.
- Registration and deregistration requests are signed by the peer's private key, so the registry can trust the public key it stores.
- Other peers query the registry to find a recipient's webhook URL and public key.
- Mesh messages are signed by the sender and verified by the receiver against the sender's public key from the registry.
The signing protocol uses compact, deterministic, sorted-key JSON, making it straightforward to implement in other runtimes (e.g. the Node.js implementation in openclaw-mesh).
Features
- HTTP API for register, list, get, and deregister operations.
- Ed25519 signatures on all mutating requests.
- In-memory store by default, or file-backed persistence via
--store. - CLI server launcher.
- Python client (
RegistryClient) with built-in signing. - No private keys kept by the registry.
Quick start
Install and run the server:
pip install mesh-peer-registry
mesh-peer-registry --port 8646 --store ./registry.json
The server will listen on http://127.0.0.1:8646.
API
POST /register— register or update a peer (signed with the peer's private key).GET /peers— list all peers.GET /peers/{name}— get one peer.DELETE /peers/{name}— deregister a peer (signed with the peer's private key).
All registration/deregistration requests must include a valid Ed25519 signature in the X-Mesh-Signature header.
Python client
from mesh_peer_registry.crypto import generate_keypair
from mesh_peer_registry.client import RegistryClient
private, public = generate_keypair()
client = RegistryClient("http://127.0.0.1:8646", private, public)
client.register(
"agent0",
"http://127.0.0.1:8645/mesh/receive",
role="operator",
description="Hermes operator node",
)
print(client.list_peers())
Verifying a message
from mesh_peer_registry.crypto import verify_message
from mesh_peer_registry.client import RegistryClient
client = RegistryClient("http://127.0.0.1:8646", "", "")
peer = client.get_peer("agent0")
# body is the raw request body; signature is from the X-Mesh-Signature header.
ok = verify_message(peer.public_key, body, signature)
Development
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mesh_peer_registry-0.1.0.tar.gz.
File metadata
- Download URL: mesh_peer_registry-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa8e68ce6768afca02c07ee84d8a7811e810cb4c0af1773b96c6457696935cc8
|
|
| MD5 |
10240b177ff319d2e561713e1c934f38
|
|
| BLAKE2b-256 |
a1f1ab82d6bd3ac3a18632ffbdebcdaeebc6488a9f58650499714194d344113b
|
File details
Details for the file mesh_peer_registry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mesh_peer_registry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
581d98f63d31b590ff8b05cd581c5ccd841abcab837cf3ccd4c767d0cc5363af
|
|
| MD5 |
e499658f209586214f2ae988077fa259
|
|
| BLAKE2b-256 |
4efc239acc8959f33184db0c89cf24dc58e9bd0a98b14cb94147f5c772527c37
|