Build trust applications on the P2P Trust Stack. v0.2.0 is released and open source:
the stack is published to npm as @p2p-trust-stack/core and
@p2p-trust-stack/app-api, and the API Reference
documents every method, grouped by the four Trust over IP layers. The reference and infrastructure
applications are published too — see
Published Reference & Infrastructure Applications.
The trust stack is published to npm as two packages: @p2p-trust-stack/core — the
protocol engine (cryptographic primitives, DID infrastructure, the Trust Spanning Protocol,
relationships, the encrypted keystore, and the VTC/VRC governance framework) — and
@p2p-trust-stack/app-api — the application-facing agent API, which depends on
core.
Both are dual-licensed: GPL-3.0 for open use, or a commercial license where GPL-3.0 obligations are not acceptable. Requires Node.js ≥ 22.5, and is Node-only (no browser build).
# application developers — core comes with it
npm install @p2p-trust-stack/app-api
# protocol-only embedders
npm install @p2p-trust-stack/core
core on npm ↗ · app-api on npm ↗ · GitHub repository ↗ · CHANGELOG ↗ · Commercial license ↗
The API Reference documents every method — grouped by the four Trust over IP layers, with a module-by-module reference for the core protocol layer.
The following flows are operational in the P2P Trust Stack testbed. Each is built on open W3C and IETF standards (DIDs, Verifiable Credentials, HPKE) and was demonstrated at the August 2026 trust stack demo.
Create a self-certifying did:scid:vh identity with Ed25519/X25519 key pairs and hash-chained verifiable history. No ledger dependency.
Register a human-readable name cryptographically bound to a did:scid:vh identity via two-phase commit over the Trust Spanning Protocol.
Authenticate as a VTA using Ed25519-signed challenge-response with single-use nonces and SHA-256 expiry verification.
Look up an agent name to retrieve the associated DID Document with service endpoints for messaging and discovery.
Retrieve profile-card data. The API catalog describes per-claim disclosure settings; these settings do not, by themselves, establish credential wrapping, update verification, or a zero-knowledge presentation flow.
Authenticated messaging with optional end-to-end encryption for confidential content. Recipients apply the protocol’s sender-authentication checks when processing messages.
Two peers confirm their relationship in a mutual acknowledgment ceremony. This records their acknowledgment; it does not establish unique-human identity. The draft’s VRC model uses two reciprocal credentials, one issued by each peer, for a complete relationship edge.
The Layer 2 Trust Spanning Protocol implementation is functionally complete, with a full two-node direct-mode demo and comprehensive test coverage across all subsystems. As of v0.2.0 the implemented surface spans all four layers: DID infrastructure and rotation (Layer 1), TSP, relationships, and confidential messaging (Layer 2), the Credential Factory, Governance Guard, Policy Engine, and trust-task ceremonies (Layer 3), plus the reference applications (Layer 4).
did:scid:vh and did:peer:4 VID creation, resolution, and cryptographic verification. Self-certifying identifiers with hash-chained verifiable history and no registry dependency.
TSP message sealing and opening for signed application payloads and optional confidential messaging. See the API Reference for package interfaces and message operations.
Peer relationship establishment, OOBI-based out-of-band introduction, and a persistent relationship store.
libp2p-based transport layer with noise protocol encryption, yamux multiplexing, and the /tsp/1.0.0 protocol handler.
SQLite-backed keystore with AES-256-GCM encryption and Argon2id key derivation. Secure local storage for VID key pairs.
Ed25519 signing, X25519 key agreement, and HPKE helpers are documented in the cryptographic API. CESR is a separate encoding mechanism, not a signing or encryption algorithm.
Alongside the npm packages, the P2P Trust Stack ships a set of open-source applications that
exercise the stack end-to-end: two reference applications that show how to build on
the app-api, and two infrastructure applications that provide the
network services a trust network needs. All four are published to GitHub under the same dual
license as the stack, and each carries its own README covering build, configuration, and usage.
They are reference and infrastructure builds rather than supported products — read them, run them,
fork them.
Reference application — desktop
The desktop reference agent: a terminal UI and a browser UI over a single agent runtime. It
creates and manages self-certifying VTAs, exchanges OOBI handshakes, chats over the Trust
Spanning Protocol, manages profiles, issues and verifies credentials, and runs VTC/VRC
ceremonies — programming against @p2p-trust-stack/app-api only.
Reference application — Android & iOS
A minimal, working Android and iOS example built on the stack with Capacitor. It takes a
username and a passphrase, creates a self-certifying VTA, and registers it with a utility
server — with multi-account login, agent-name registration and lookup, and status display. It
is a deliberate subset of the Agent App, using the same app-api surface.
Infrastructure application
The first utility server for the stack: a standalone TypeScript/Node application backed by YugabyteDB that implements the full trust data schema as a layer-by-layer REST API — identities and DID documents, relationships and TSP messaging, credentials, governance, and composed application views. It is also a first-class VTA on the network, reusing the same transport, crypto, DID, and TSP componentry as every other node.
Infrastructure application
A standalone libp2p bootstrap server with a terminal dashboard, providing peer discovery and circuit relay for the stack. Its peer ID is derived deterministically from a 24-word BIP-39 phrase, so clients can dial it without a prior identify exchange.
New to the trust stack? The glossary defines all key terms: VTA, VTC, VRC, VID, DID, TSP, OOBI, HPKE, CESR, did:scid:vh, did:peer:4, R-Card, VidMethod, Witness VTC, and more.
View Glossary →