Agentity EVM bridge — publish DID events on-chain and verify cross-registry
Project description
agentity-evm
EVM cross-registry bridge for the Agentity Protocol. Publish DID registration and revocation events on-chain via a Solidity smart contract, and verify agent identity status across registries using read-only EVM queries.
Components
- Solidity contract (
contracts/Registry.sol) — On-chain DID registry - EvmPublisher — Python client for writing to the contract
- EvmVerifier — Python client for reading from the contract
Installation
pip install agentity-evm
Solidity contract
contract AgentityRegistry {
function register(string calldata did, bytes32 fingerprint, string calldata providerDid) external;
function revoke(string calldata did) external;
function rotate(string calldata oldDid, string calldata newDid) external;
function getStatus(string calldata did) external view returns (string memory);
function getFingerprint(string calldata did) external view returns (bytes32);
}
Events: DIDRegistered, DIDRevoked, DIDRotated
Usage
Publisher
from agentity_evm import EvmPublisher
publisher = EvmPublisher()
publisher.connect()
# Register a DID on-chain
tx_hash = publisher.register(
did="did:agentity:agent:7Xj3...",
fingerprint_hex="a1b2c3...",
provider_did="did:agentity:provider:stripe",
)
print(f"Transaction: {tx_hash}")
# Revoke
tx_hash = publisher.revoke("did:agentity:agent:7Xj3...")
Verifier
from agentity_evm import EvmVerifier
verifier = EvmVerifier(
rpc_url="http://localhost:8545",
contract_address="0x1234...",
)
result = verifier.verify("did:agentity:agent:7Xj3...")
# {"did": "...", "status": "active", "fingerprint": "0x...", "source": "evm"}
Configuration
| Env var | Default | Description |
|---|---|---|
AGENTITY_EVM_RPC_URL |
http://localhost:8545 |
EVM RPC endpoint |
AGENTITY_EVM_CONTRACT |
— | Deployed contract address |
AGENTITY_EVM_PRIVATE_KEY |
— | Wallet private key for signing |
AGENTITY_EVM_CHAIN_ID |
1337 |
Chain ID (Anvil default) |
Integration with registry
The agentity-registry automatically publishes to EVM when AGENTITY_EVM_RPC_URL is set:
AGENTITY_EVM_RPC_URL=http://localhost:8545 \
AGENTITY_EVM_CONTRACT=0x... \
AGENTITY_EVM_PRIVATE_KEY=0x... \
uvicorn agentity_registry.main:app --port 8000
Deploy the contract
# Using Foundry (cast)
forge create --rpc-url http://localhost:8545 \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
contracts/Registry.sol:AgentityRegistry
License: Apache 2.0
Project details
Release history Release notifications | RSS feed
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 agentity_evm-0.1.1.tar.gz.
File metadata
- Download URL: agentity_evm-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
823b3725c4840c6bd1ae945b8e0066bca131dac91a099a583669aea634815ecf
|
|
| MD5 |
58a2175e777e5b6c4e002f1d7198f340
|
|
| BLAKE2b-256 |
38f7b7266c836ae14c68539d671b15296626b693efa12eea7d7bfd4e39e002ac
|
File details
Details for the file agentity_evm-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentity_evm-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3ed627f8c9c67362f34b26317104ee9d44d1f575d5e7b416fd9aa422828a53
|
|
| MD5 |
cd982260ea567adc547dd6ec0b6b3696
|
|
| BLAKE2b-256 |
82e1e37a8b556d516f0dcda9053ff95084fabc3df534544b29ca5bcc55f9139c
|