hanzo-identity

Hanzo Identity (hanzoai/identity) is a decentralized identity (DID) registration system with Solidity smart contracts and a Next.js frontend.

Hanzo Identity - Decentralized Identity (DID) System

Category: Hanzo Ecosystem Related Skills: hanzo/hanzo-iam.md, hanzo/hanzo-id.md, hanzo/hanzo-contracts.md

Not the login system. This skill is on-chain DID (blockchain identity, W3C did: + NFT). It is distinct from the OIDC auth stack — do not confuse the three:

The @lux.id / @zoo.id display strings below are on-chain DID namespaces (a chain's DID method), NOT the IAM issuer hosts (whose brand serverUrls are hanzo.id / lux.id / zoolabs.id / pars.id).

Overview

Hanzo Identity (hanzoai/identity) is a decentralized identity (DID) registration system with Solidity smart contracts and a Next.js frontend. It implements W3C DID identifiers across the Lux/Hanzo/Zoo/Pars chains, with an NFT bound to DID ownership. Core DID contracts live in @luxfi/standard; this repo provides the registration UI, deployment scripts, and Foundry build tooling.

What it actually is

DID format

did:lux:alice # W3C canonical format
[email protected] # Display format
alice.lux.id # Web subdomain

Supported chains

| Chain | ID | DID Method | Display | |-------|-----|------------|---------| | Lux | 96369 | did:lux: | @lux.id | | Pars | 494949 | did:pars: | @pars.id | | Zoo | 200200 | did:zoo: | @zoo.id | | Hanzo | 36963 | did:hanzo: | @hanzo.id |

When to use

Quick reference

| Item | Value | |------|-------| | Repo | github.com/hanzoai/identity | | Branch | main | | Contracts package | identity-contracts v1.0.0 | | Frontend package | @hanzo/identity-dapp v1.0.0 | | Solidity | 0.8.31 (Foundry) | | Core DID contracts | @luxfi/standard/contracts/did/ | | Frontend | Next.js 16, React 19 | | Wallet | RainbowKit 2, wagmi 2, viem 2 | | UI library | @hanzo/ui | | Local chain | Anvil (port 8545, chain 31337) | | Static server | port 3100 | | Frontend dev | cd app && pnpm dev (port 3000) | | Test | node test-all.js (contracts), npx playwright test (e2e) | | Deploy | GitHub Pages (auto on push to main) | | License | Proprietary (Hanzo AI Inc.) |

Project structure

hanzoai/identity/
 package.json # identity-contracts 1.0.0
 foundry.toml # Foundry config (solc 0.8.31, via_ir)
 server.js # Static file server (port 3100)
 index.html # Contract interaction UI
 test-all.js # Contract test suite
 soul.md # Hanzo AI identity and values
 playwright.config.js # E2E test config
 script/
 DeployLocal.s.sol # Forge deployment script (local)
 deploy.sol # Forge deployment script (production)
 scripts/
 deploy.js # ethers.js deployment (generic)
 deploy-local.js # ethers.js deployment (Anvil)
 deploy-final.js # ethers.js deployment (mainnet)
 deploy-with-cast.sh # cast-based deployment (shell)
 deploy-with-proxy.js # Proxy deployment (upgradeable)
 register-test-identities.js # Register test DIDs
 run-all-tests.sh # Full test runner
 run-with-ui.sh # Start Anvil + UI together
 app/ # Next.js frontend
 package.json # @hanzo/identity-dapp 1.0.0
 next.config.js
 src/
 app/ # Next.js app router pages
 components/ # React components
 lib/ # Contract interaction helpers
 types/ # TypeScript types
 public/ # Static assets
 docs/ # Documentation
 tests/ # Playwright e2e tests

Dependencies

Contracts (root package.json)

Frontend (app/package.json)

Quickstart

Local development (contracts)

git clone https://github.com/hanzoai/identity.git
cd identity
npm install

# Start Anvil local chain + deploy contracts
npm run dev
# Anvil on port 8545, static server on port 3100

# Or separately:
npm run anvil # Local chain
node scripts/deploy-local.js # Deploy contracts
npm run serve # Static UI on 3100

Frontend development

cd app
pnpm install
cp .env.example .env.local
# Edit .env.local with contract addresses and RPC URL
pnpm dev
# Open http://localhost:3000

Testing

# Contract tests
npm test # node test-all.js

# E2E tests
npm run test:e2e # Playwright headless
npm run test:e2e:headed # Playwright with browser

# Full suite
npm run test:all
bash scripts/run-all-tests.sh

Deployment

# Forge (Solidity scripting)
forge script script/deploy.sol --rpc-url $RPC_URL --broadcast

# cast (shell)
bash scripts/deploy-with-cast.sh

# ethers.js
node scripts/deploy.js

# Upgradeable proxy
node scripts/deploy-with-proxy.js

Foundry configuration

[profile.default]
src = "contracts/src"
out = "artifacts"
libs = ["node_modules"]
solc = "0.8.31"
via_ir = true
optimizer = true
optimizer_runs = 200
remappings = [
 "@luxfi/standard/=node_modules/@luxfi/standard/contracts/",
 "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
 "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/"
]

Troubleshooting

Related Skills


Last Updated: 2026-03-13 Category: Hanzo Ecosystem Related: did, identity, solidity, foundry, web3, nft, lux Prerequisites: Node.js, Foundry (forge/anvil), pnpm (for app/)