Test on a local chain
The guides were written against a local-chain project: IdentityRegistry
and HandleEscrow on anvil, with test verifiers
that accept any binding without a proof, and a few test handles bound. That
project is not published yet. Until it is, you can:
- run the read-only code against a public network, or
- deploy the full libID stack to anvil with
libid-deploy. It starts with nothing bound.
Read from a public network
Section titled “Read from a public network”The code in the guides reads RPC_URL, IDENTITY_REGISTRY and
HANDLE_ESCROW, and the events guide reads FROM_BLOCK. Point them at
the Eden testnet:
export RPC_URL=https://ev-reth-eden-testnet.binarybuilders.services:8545export IDENTITY_REGISTRY=0x58ac0cd5ec19c850a75d6183b3c3b2de692fb20dexport HANDLE_ESCROW=0xf3f81c31c889ddf1ec83b91b3dfed601c04f5e50export FROM_BLOCK=291663483The guides’ test handles and addresses are not bound there, so you get
null or an empty list where a guide shows output. Use a handle or an
address that has bound an identity instead.
Sepolia has the same contract addresses; see Sepolia. Ethereum mainnet runs an older version, which the guides do not match. See Network status.
Deploy the stack to anvil
Section titled “Deploy the stack to anvil”chain-configurations
has a network file for anvil, local-dev.toml, and the libid-deploy tool
that applies it. No libid-deploy release ships v0.19.0 yet, so build it
from the repository with Rust:
cargo install --locked --git https://github.com/libid-org/chain-configurations libid-deployThen download the network file:
curl -LO https://raw.githubusercontent.com/libid-org/chain-configurations/main/networks/local-dev.tomlStart anvil in its own terminal:
anvilThen deploy:
libid-deploy apply --network local-dev.toml \ --rpc-url http://127.0.0.1:8545 --yes --confirm-fresh-deployIt deploys every libID contract with the real verifiers, owned by anvil’s first account. The addresses are fixed; see Addresses. Set the guides’ variables:
export RPC_URL=http://127.0.0.1:8545export IDENTITY_REGISTRY=0x155090a3a2dded2fbdf385bac8cffeb3a51a18aeexport HANDLE_ESCROW=0x1297ddf98efc4d72ce4c5799e057dd61052cfe29export PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690dexport CAROL_KEY=0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6The keys are anvil’s public test keys. Never use them on a real network.
Nothing is bound on this stack, and a binding needs a real proof. So the
lookups return null, and you can deploy contracts and send to the escrow,
but not bind a handle or claim from it.
The guides’ test data
Section titled “The guides’ test data”Where a guide shows output, it comes from the local-chain project. It sets
RPC_URL, IDENTITY_REGISTRY, HANDLE_ESCROW, PRIVATE_KEY and
CAROL_KEY as above, with its own registry and escrow
addresses, and binds:
| Handle | Id | Holder | Primary handle |
|---|---|---|---|
GitHub octocat | 583231 | 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC | yes |
GitHub alice-dev | 1001 | 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | yes |
X alice_x | 2244994945 | 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | no, revealed only |
PRIVATE_KEY’s address holds alice-dev and alice_x. A wallet has one
primary handle, so its name is alice-dev.
It also has ./bind.sh, which binds a handle without a proof:
./bind.sh github 777 carol $CAROL_KEYThe arguments are the platform, the id, the handle, and the key of the holder to bind it to. The handle becomes that holder’s primary handle.