Skip to main content

Crate x402_identity

Crate x402_identity 

Source
Expand description

§tempo-x402-identity

Identity management for x402 node instances.

Handles the full identity lifecycle: wallet key generation, filesystem persistence (with restricted file permissions), faucet funding, and parent node registration.

With the erc8004 feature (default), adds on-chain agent identity via ERC-8004 NFTs: contract deployment, identity minting, reputation feedback, peer discovery, and recovery proofs.

§Bootstrap

Call bootstrap() at startup to generate or load an identity. It injects EVM_ADDRESS, FACILITATOR_PRIVATE_KEY, and FACILITATOR_SHARED_SECRET as environment variables (only if not already set).

Part of the tempo-x402 workspace.

Re-exports§

pub use discovery::PeerInfo;
pub use types::AgentId;
pub use types::AgentMetadata;
pub use types::ReputationScore;

Modules§

contracts
Solidity ABI bindings for ERC-8004 contracts. Solidity ABI bindings for ERC-8004 registries.
deploy
Self-deployment of ERC-8004 contracts from embedded bytecode. Self-deployment of ERC-8004 contracts.
discovery
Decentralized peer discovery via on-chain agent registry. Decentralized peer discovery via on-chain agent registry.
onchain
On-chain agent NFT operations (mint, metadata, recovery). Agent identity operations — mint, query, metadata, recovery address.
recovery
Recovery proof construction and verification. Recovery proof construction and verification.
reputation
Reputation feedback submission and queries. Agent reputation operations — submit feedback, query reputation.
types
Domain types: AgentId, ReputationScore, AgentMetadata. Types for ERC-8004 agent identity, reputation, and validation.
validation
Validator hooks (deferred — contracts are complex). Agent validation operations — register/remove validators, execute with validation.

Structs§

InstanceIdentity
Core identity for a running instance.

Enums§

IdentityError

Functions§

auto_mint_enabled
Check whether ERC-8004 identity minting is enabled.
bootstrap
Bootstrap an instance identity.
identity_registry
Get the identity registry contract address.
load_persisted_registries
Load previously deployed registry addresses from a JSON file and inject as env vars.
recovery_address
Get the configured recovery address (if any).
register_with_parent
Register this instance with its parent by POSTing to {parent_url}/instance/register.
reputation_enabled
Check whether reputation submission is enabled.
reputation_registry
Get the reputation registry contract address.
request_faucet_funds
Request faucet funding via the Tempo tempo_fundAddress JSON-RPC method.
save_agent_token_id
Update the persisted identity file with a new agent token ID.
save_deployed_registries
Persist deployed registry addresses to a JSON file.
validation_registry
Get the validation registry contract address.