v0.2.0 released The P2P Trust Stack is now open source — install it from npm →

The P2P Trust Stack

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.

What is the Trust Stack?

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:

  • Verifiable Trust Agents (VTAs) — digital agents representing DTG nodes, such as people, organizations, communities, and software agents
  • Verifiable Relationship Credentials (VRCs) — credentials attesting to one direction of a peer relationship; two reciprocal VRCs form the complete edge in Working Draft 0.6.0
  • Verifiable Trust Communities (VTCs) — community entities identified by VIDs and represented digitally by VTAs, with shared governance rules

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.

From identifiers to applications

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.

  1. 4 Applications

    Reference Agent Apps and other applications use the application-facing API (@p2p-trust-stack/app-api).

  2. 3 Credentials and community policy

    Credentials, relationship records, and community policy supply evidence and rules for application decisions.

  3. 2 TSP messaging

    Authenticated messaging with optional confidential messaging.

    Planned TSP Routed Mode through protocol intermediaries.

  4. 1 Identifiers and keys

    DID methods, verification material, keys, and rotation support identifier control and signature checks.

libp2p transport

Connections, peer discovery, and transport relay carry TSP messages. A libp2p circuit relay is distinct from TSP Routed Mode.

Services alongside the layers

Utility Server

Provides hosted APIs and storage for identifiers, relationships, credentials, and governance. It also participates as a VTA and uses capabilities from several layers.

Bootstrap Server

Provides libp2p peer discovery and circuit relay. It supports transport connectivity; it does not implement TSP Routed Mode.

A conceptual capability map, not a process or deployment diagram. Applications and services may compose capabilities from several layers. CESR encodes and frames data; signature and encryption mechanisms provide the cryptographic checks.

Reference applications and infrastructure →

Stack Status

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

Explore Each Layer

🏗️

Layer 1 — Trust Support

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 →
🔐

Layer 2 — Trust Spanning

Active — Released in v0.2.0

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 →
✅

Layer 3 — Trust Tasks

Foundations Laid — Released in v0.2.0

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 →
📱

Layer 4 — Trust Applications

Active — Reference Apps Built

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 →

How the Layers Interact

Each layer builds on the one below it, but is designed to be independently implementable and upgradeable:

  • Layer 1 supplies DID methods, verification material, and key lifecycle mechanisms. A VID identifies a participant; a VTA is the digital agent representing that participant.
  • Layer 2 uses verification material to authenticate TSP messages and supports optional confidential messaging. libp2p provides the transport beneath this protocol.
  • Layer 3 handles credentials, relationship records, and community policy. Proof verification, applicable status checks, and policy evaluation serve distinct purposes. Applications decide whether to rely on the resulting evidence.
  • Layer 4 presents these capabilities to users through the application-facing API. The reference Agent App demonstrates registration, relationships, community operations, and chat.

Start building on v0.2.0. Install the agent API — core comes with it:

npm install @p2p-trust-stack/app-api

See the API Reference for every method, and the GitHub repository for source, tests, and the changelog. Requires Node.js ≥ 22.5 (Node-only).