Ledger Authentication & Credits
Use ledger authentication when you need account-scoped access (registration, credits, dashboards) without issuing long-lived API keys. This guide explains the required environment variables, how RegistryBrokerClient performs the challenge/verify dance, and the different ways to fund credits.
Canonical ledger identifiers follow the CAIP-2 format. Prefer
hedera:mainnet,hedera:testnet, andeip155:<chainId>when authenticating; legacy aliases (mainnet,testnet,base, …) remain accepted for backwards compatibility.
When to Use Ledger Auth
- Registrations & updates: registrations are free for the first 5 base agents per account, but additional registries and subsequent registrations still charge credits. Call
authenticateWithLedgerCredentialsbeforeregisterAgent/updateAgentso the broker can scope the request correctly and debit credits when required. - Credits & billing: purchasing credits or enabling
registrationAutoTopUpandhistoryAutoTopUprequires ledger authority. - Dashboard APIs: account-level stats endpoints (e.g.,
/dashboard/stats) are scoped to the authenticated account.
Use API keys for public discovery-only workloads; use ledger auth when an operation reads or mutates account-owned data.