How pohi-protocol/pohi works
Purpose and Package Topology
PoHI is a TypeScript/Solidity monorepo for binding proof-of-personhood (PoP) evidence to a specific software action—principally a repository commit—and independently verifying that approval. It provides reusable protocol libraries, CI integrations, optional EVM recording, and a live demonstration. Root package orchestration is in package.json; protocol behavior is specified in SPEC.md and docs/architecture.md.
Core Attestation Model
The chain-neutral core creates, hashes, and validates attestations containing the approved subject and human-verification evidence. It is the primary trust boundary: provider-specific evidence enters here, while consumers receive normalized types and validation results.
• packages/core/src/attestation.ts
• packages/core/src/types.ts
• packages/core/src/index.ts
The core binds proofs to repository/commit signals to resist replay. It intentionally has zero dependencies, enabling use in local tools and ephemeral CI runners.
Proof-of-Personhood Provider Layer
Provider adapters verify or normalize evidence from distinct identity systems behind a shared verification interface. World ID-style ZK proofs, Gitcoin Passport, BrightID, Civic, Proof of Humanity, Holonym, Idena, Coinbase attestations, and Humanity Protocol are integration boundaries with external identity networks.
• packages/core/src/providers.ts
• packages/core/src/verification/index.ts
• packages/core/src/verification/gitcoin-passport.ts
Developer and CI Entry Points
The CLI exposes attestation, verification, status, and configuration workflows for operators. Hosted-CI adapters invoke equivalent protocol checks inside GitHub Actions, GitLab pipelines, and Bitbucket Pipe containers, then report approval status to their respective source-control platform.
• packages/cli/src/index.ts
• packages/action/src/index.ts
• packages/gitlab-ci/src/index.ts
• packages/bitbucket-pipe/src/index.ts
GitHub-specific API interaction is isolated in packages/action/src/github.ts; Bitbucket uses its own Dockerized Pipe definition at packages/bitbucket-pipe/pipe/Dockerfile.
EVM and On-Chain Transparency
Optional EVM support separates chain encoding/hashing utilities, client-side contract access, and the on-chain registry. This layer can add immutable attestation recording but is not required for off-chain validation.
• packages/evm/src/index.ts
• packages/sdk/src/client.ts
• packages/contracts/src/PoHIRegistry.sol
The SDK targets World Chain configuration and ABI interaction through packages/sdk/src/chains.ts and packages/sdk/src/abi.ts. Solidity deployment and testing use Foundry, centered on packages/contracts/foundry.toml and packages/contracts/script/Deploy.s.sol.
Demo Application and Human Interaction
The deployable demo is a Next.js application, with browser UI for provider selection and approval plus server routes for verification/status. It is the main interactive reference implementation, deployed through Vercel configuration.
• packages/demo/src/app/page.tsx
• packages/demo/src/app/api/verify/route.ts
• packages/demo/src/components/ProviderSelector.tsx
• vercel.json
The UI/provider boundary is represented by provider-specific verification components, while server-side integrations such as GitHub/webhooks and rate limiting remain under packages/demo/src/lib/.
Runtime and Infrastructure
Node.js 18+ runs the workspace packages; the development container supplies Node.js 20, Foundry, and Playwright via .devcontainer/Dockerfile. Runtime targets include npm-distributed libraries/CLI, GitHub Actions, GitLab CI, Bitbucket Pipelines Docker containers, Next.js/Vercel, World ID and other PoP services, source-control APIs, and optionally World Chain/EVM RPC infrastructure. CI and release-facing validation are defined in .github/workflows/ci.yml.
Main entry points: src/index.ts Core public API · providers.ts Provider verification adapters · attestation.ts Attestation hashing & validation · src/index.ts GitHub Action
Components 19
Protocol core
Chain-neutral attestation trust boundary.
- Normalized attestation types
packages/core/src/types.ts - Attestation hashing & validation · Binds proof evidence to repository and commit signals.
packages/core/src/attestation.ts - Provider verification adapters · Shared interface for provider-specific evidence.
packages/core/src/providers.ts - Verification implementations
packages/core/src/verification/index.ts - Core public API · Zero-dependency protocol library.
packages/core/src/index.ts
Developer integrations
- Operator CLI
packages/cli/src/index.ts - GitHub Action
packages/action/src/index.ts - GitLab CI adapter
packages/gitlab-ci/src/index.ts - Bitbucket Pipe
packages/bitbucket-pipe/src/index.ts
Optional EVM
- EVM encoding & hashing
packages/evm/src/index.ts - World Chain SDK client · Uses configured chain and ABI to access the registry.
packages/sdk/src/client.ts - PoHI Registry · Immutable on-chain attestation records.
packages/contracts/src/PoHIRegistry.sol
Demo application
- Demo approval UI · Interactive provider selection and approval.
packages/demo/src/app/page.tsx - Provider selector
packages/demo/src/components/ProviderSelector.tsx - Demo verification API · Server endpoint for verification and status.
packages/demo/src/app/api/verify/route.ts - Vercel deployment
vercel.json
Other components
- PoP identity networks · World ID, Passport, BrightID, Civic, and other proof providers.
- Source-control platforms · GitHub, GitLab, and Bitbucket commit and status APIs.
- World Chain / EVM RPC
Connections 21
- PoP identity networks → Provider verification adapters: proof evidence
- Provider verification adapters → Verification implementations: delegates checks
- Verification implementations → Attestation hashing & validation: validated evidence
- Normalized attestation types → Attestation hashing & validation: attestation model
- Attestation hashing & validation → Core public API: exports protocol operations
- Provider verification adapters → Core public API: exports provider interface
- Operator CLI → Core public API: attest and verify
- GitHub Action → Core public API: CI protocol checks
- GitLab CI adapter → Core public API: CI protocol checks
- Bitbucket Pipe → Core public API: containerized checks
- GitHub Action → Source-control platforms: commit status
- GitLab CI adapter → Source-control platforms: pipeline status
- Bitbucket Pipe → Source-control platforms: pipe status
- Core public API → EVM encoding & hashing: optional recording payload
- EVM encoding & hashing → World Chain SDK client: encoded attestation
- World Chain SDK client → PoHI Registry: contract calls
- PoHI Registry → World Chain / EVM RPC: deployed on
- Demo approval UI → Provider selector: renders
- Provider selector → Demo verification API: submits proof
- Demo verification API → Core public API: verifies attestation
- Vercel deployment → Demo approval UI: hosts