SIGNEDBYME Python SDK
Human-Controlled Identity for Autonomous Agents
What is SIGNEDBYME?
SIGNEDBYME is the identity layer for autonomous agents. Agents prove membership in enterprise-authorized groups using Groth16 zero-knowledge proofs — without revealing which agent they are. The enterprise gets a boolean: authorized. No identity revealed.
This SDK enables agents to generate cryptographic identity, produce zero-knowledge proofs, and authenticate to enterprises via NOSTR and OIDC.
Installation
pip install signedby
Quick Start
from signedby import AgentIdentity, EncryptedFileStorage, MembershipProver, NostrClient
# Initialize secure storage
storage = EncryptedFileStorage("./agent_data")
# Create agent identity (one-time setup)
identity = AgentIdentity(storage)
state = identity.initialize()
print(f"Agent npub: {state.agent_npub}")
print(f"Leaf commitment: {state.leaf_commitment}")
# Generate Groth16 proof for authentication
prover = MembershipProver.from_circuits_dir("./circuits")
leaf_secret = identity.get_leaf_secret()
witness = load_witness(storage, "acme")
proof = prover.generate_proof(leaf_secret, witness)
print(f"Proof generated in {proof.proof_time_ms}ms")
# Publish proof to NOSTR (async)
client = await NostrClient.connect(identity)
await client.publish_proof_event(proof_data)
Features
- DID Generation: secp256k1 keypair in secure storage (OS keyring, Keychain, DPAPI), never extractable
- Groth16 ZK Proofs: BN254 curve, ~101K constraints, <3s on ARM64 via native Rust core (PyO3)
- Bitcoin-Backed: Identity fused with Lightning payment at creation via NWC (NIP-47)
- NOSTR Integration: Publish kinds 28101 (proof), 28102 (delegation ack), 28103 (revocation ack); poll for kinds 28200/28250/28251; NIP-42 relay authentication; decentralized audit trail on public relays
- Witness Caching: Merkle path cached locally, auto-refresh when root rotates out of 30-root window
Modules
| Module | Purpose |
|---|---|
signedby.AgentIdentity |
DID generation, leaf_secret derivation |
signedby.EncryptedFileStorage |
Encrypted storage with OS keyring (ChaCha20-Poly1305) |
signedby.MembershipProver |
Groth16 proof generation via native Rust |
signedby.NostrClient |
NOSTR relay client with NIP-42 auth |
signedby.EnrollmentBootstrap |
Three-gate genesis flow |
signedby.DelegationValidator |
Delegation validation (kind 28250/28251) |
signedby.NwcWallet |
NWC wallet integration (NIP-47) |
SDK Lifecycle
One-Time Initialization
- Generate DID in secure storage
- Derive leaf_secret (5 BN254 field elements)
- Compute leaf_commitment = Poseidon2(leaf_secret)
- Load Groth16 proving key (~88MB)
- Initialize NWC wallet for Lightning
Enrollment per Enterprise
Three-gate genesis flow — runs once per enterprise:
- Gate 1: Email + token verification via kind 28202
- Gate 2: Human signs kind 28250 delegation
- Gate 3: Leaf appended to Merkle tree
Authentication
- Generate Groth16 proof from leaf_secret + cached witness
- Publish kind 28101 to NOSTR
- Enterprise validates and calls API
- Agent receives OIDC id_token
Requirements
- Python 3.9+
- Native libraries bundled for supported platforms
Supported Platforms
- Linux x64 (glibc)
- Linux ARM64 (glibc)
- macOS x64 (Intel)
- macOS ARM64 (Apple Silicon)
- Windows x64
Documentation
License
SSAL-1.0 (SIGNEDBYME Source-Available License)
Links
Metadata
Release files for signedby 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| signedby-1.0.1.tar.gz | 12.6 kB | Without provenance | Details for signedby-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| signedby-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.34+ x86-64 | Details for signedby-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl |
Total release size: 298.3 kB
Release files / signedby-1.0.1.tar.gz
| Download URL | signedby-1.0.1.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b31c1924901dcc13873a30dedb72a97c3ebc9872106fc8294cabbafbd5da87d4
|
|
BLAKE2b-256 checksum How to use checksums |
13ceea3eec1c874e6de05caec097e429ea58356975f256a92dbbad36d8893130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Release files / signedby-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
| Download URL | signedby-1.0.1-cp311-cp311-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 285.7 kB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
8d01b2b9c649dbc98ee38fc20d6baae57d88bded9a62296b1385bc48fa475785
|
|
BLAKE2b-256 checksum How to use checksums |
12a8046ff67f9eaf16cd224633f5b482ce6e87cce3107f496cf2b09f2f1060a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.3
|
Security for signedby 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.