A four-layer architecture for DID-based identifiers, signed relationship records, authenticated messaging,
and end-to-end encryption, using W3C standards and the Trust over IP (ToIP) model.
v0.2.0 is released: the protocol engine (@p2p-trust-stack/core)
and application-facing API (@p2p-trust-stack/app-api) are open source and published to npm.
The internet was designed to move data, not to establish trust. Every layer of the modern internet — from DNS to HTTP to OAuth — was bolted on after the fact, creating a patchwork of centralized identity silos — fragile, privacy-invasive, and a single point of failure: one breach, policy change, or outage affects everyone who depends on them.
The P2P Trust Stack is a ground-up redesign of how trust works on the internet. It follows the Trust over IP (ToIP) four-layer model, with distinct layers for identifier and key infrastructure, authenticated messaging and relationship establishment, trust tasks such as credential exchange, and application logic. Version 0.2.0 is the current open source release, with working, published components across all four layers.
The core primitives are:
These primitives — VTAs, VTCs, and VRCs — are defined by the Decentralized Trust Graph (DTG) working group.
Around those primitives sit the stack's engines: a Credential Factory for issuing, verifying, and displaying supported credential workflows through a shared interface; a Governance Guard that validates governance rules for ceremonies, memberships, and credential issuance; and a data-driven Policy Engine whose rules live in the database, not in code, so a community can change what it allows without a redeploy.
The goal is a decentralized trust graph of VTAs, VRCs, and VTCs, connecting verifiable identities and relationships without a single owner or gatekeeper. Different implementations can take different technical approaches while using shared standards and compatible protocols to work together.
Work bridging the layers is now well underway. A method-agnostic way of representing identities exists so the stack isn't locked to any single DID approach; heterogeneous multi-step trust operations (a community founding, a credential issuance, a peer relationship) run as trust-task ceremonies — ordered sequences of policy gates and effects catalogued in the database and driven by code; and the governance decisions those ceremonies enforce are policy documents evaluated by the Policy Engine. See the Layer 1–3 pages below for the details, framed from each layer's perspective.
The stack groups capabilities into four areas: identifier and key infrastructure; authenticated messaging; credentials and community policy; and applications.
DTG defines the agent, relationship, community, and credential concepts. TSP provides the messaging protocol, while libp2p supplies transport capabilities.
Reference Agent Apps and other applications use the application-facing API
(@p2p-trust-stack/app-api).
Credentials, relationship records, and community policy supply evidence and rules for application decisions.
Authenticated messaging with optional confidential messaging.
Planned TSP Routed Mode through protocol intermediaries.
DID methods, verification material, keys, and rotation support identifier control and signature checks.
Connections, peer discovery, and transport relay carry TSP messages. A libp2p circuit relay is distinct from TSP Routed Mode.
Provides hosted APIs and storage for identifiers, relationships, credentials, and governance. It also participates as a VTA and uses capabilities from several layers.
Provides libp2p peer discovery and circuit relay. It supports transport connectivity; it does not implement TSP Routed Mode.
Current implementation status for each layer of the P2P Trust Stack. Click any layer for detailed documentation.
Active implemented, exercised end-to-end, and released · Foundations Laid core mechanisms working today, being hardened and extended · In Progress under active implementation · Planned designed, not yet built
| Layer | Name & Role | Technology | Status |
|---|---|---|---|
| 4 |
PNM / CNM / Developer Apps
|
End-user UI/UX for creating, joining, and managing trust applications, communities, and networks. Personal Network Manager (PNM), Community Network Manager (CNM), and developer-facing app tooling. The Agent App reference applications (web + TUI, plus a mobile Android/iOS example) are built and operational: register VTAs, found and administer VTCs, issue VRCs, manage community rules, send invitations, and chat. The stack is already being embedded in other test applications. | Active — Reference Apps Built |
| 3 |
VTCs & VRCs
|
W3C Verifiable Credentials issued through the unified Credential Factory. The Governance Guard and data-driven Policy Engine enforce community rules at issuance and crystallization, and a database-backed trust-task ceremony model drives multi-step operations — VTC establishment, membership onboarding, mutual acknowledgment, and policy evaluation all run today. Shipped in v0.2.0. The Trust Tasks framework's conventions — peer-scoped task type identifiers, a conformant JSON request/response envelope, and its document and decision vocabulary — have been incorporated in anticipation of supporting interoperability; that interop is not implemented yet (see the Roadmap). | Foundations Laid |
| 2 |
VTAs & TSP
|
Trust Spanning Protocol (TSP) over libp2p transport, DID-based identifiers, signed messages, optional end-to-end encryption, and peer relationship establishment. Direct Mode complete and released in v0.2.0. | Active — Released in v0.2.0 |
| 1 |
DID Infrastructure
|
DID method infrastructure, key rotation, and witness proofs. Built in TypeScript
with a peer-to-peer, libp2p-native approach to decentralized identifiers.
Released in v0.2.0 as @p2p-trust-stack/core.
|
Active — Released in v0.2.0 |
The DID infrastructure layer: decentralized identifiers, key management, and witness proofs. Built in TypeScript with a peer-to-peer, libp2p-native approach. Shipped in v0.2.0.
Layer 1 Details →The Trust Spanning Protocol (TSP) layer: authenticated and optionally confidential messaging between VTAs, with peer relationship establishment. Direct Mode complete and released in v0.2.0.
Layer 2 Details →VTCs and VRCs: the credential layer where trust tasks are defined, executed, and verified using W3C Verifiable Credentials, with the Credential Factory, Governance Guard, and Policy Engine enforcing community rules. Released in v0.2.0 and now exercising real community ceremonies.
Layer 3 Details →End-user applications built on the trust stack: Personal Network Manager, Community Network Manager, and developer-facing tooling. The Agent App reference build (web + TUI) now registers VTAs, founds and administers VTCs, issues VRCs, manages community rules, sends invitations, and chats — and is being integrated into other test applications.
Layer 4 Details →Each layer builds on the one below it, but is designed to be independently implementable and upgradeable:
Start building on v0.2.0. Install the agent API — core comes with it:
npm install @p2p-trust-stack/app-apiSee the API Reference for every method, and the GitHub repository for source, tests, and the changelog. Requires Node.js ≥ 22.5 (Node-only).