YAK:// Protocol

Mesh-Native URL Scheme

Custom URL protocol for mesh-native addressing. Escape HTTP entirely with content-addressed, bookmark-enhanced navigation.

v2.8.2

URL Structure

yak://<target>[/path][?query]
yak://dashboard — Built-in node dashboard
yak://peers — Connected peers list
yak://content/abc123 — Content by hash
yak://mybookmark — Personal bookmark
yak://node-id/path — Remote node content

Built-in Routes

URL Description
yak://dashboardNode monitoring dashboard
yak://peersConnected peer list
yak://oracleOracle status and integrity
yak://networkNetwork identity info
yak://content/<hash>Fetch content by hash
yak://geoGeographic proof status

Local Bookmarks

Personal "pet names" for YAK:// addresses. No global registry — bookmarks are local to your node.

CLI Commands
# Add a bookmark
yakmesh bookmark add docs yak://site/documentation

# List all bookmarks
yakmesh bookmark list

# Use the bookmark
yakmesh open yak://docs

# Remove a bookmark
yakmesh bookmark rm docs
REST API
# List bookmarks
GET /bookmarks

# Add bookmark
POST /bookmarks
{ "name": "docs", "target": "yak://site/documentation" }

# Get specific bookmark
GET /bookmarks/docs

# Remove bookmark
DELETE /bookmarks/docs

Remote Bookmarks (Mesh Sync)

Share bookmark lists between nodes via gossip protocol. Subscribe to trusted nodes and receive their bookmarks automatically.

Subscribe

Follow another node's bookmarks. Their updates sync to you automatically.

Publish

Share your bookmarks with the mesh. Subscribers receive your updates.

import { RemoteBookmarkSync } from 'yakmesh/protocol/yak-protocol';

const sync = new RemoteBookmarkSync({ nodeId: 'my-node' });

// Subscribe to a trusted node's bookmarks
await sync.subscribe('trusted-node-id');

// Publish your bookmarks to the mesh
await sync.publish('my-list', ['docs', 'tools', 'friends']);

// Resolve a remote bookmark
const target = sync.resolveRemote('docs');

// Priority: Local bookmarks always override remote
REST API
# Remote bookmark status
GET /bookmarks/remote/status

# List remote bookmarks
GET /bookmarks/remote

# Subscribe to a node
POST /bookmarks/remote/subscribe
{ "nodeId": "node-abc-123" }

# Publish your bookmarks
POST /bookmarks/remote/publish
{ "listName": "public", "bookmarks": ["docs", "tools"] }

DOKO Revocation

Emergency revocation system for compromised DOKO identities. Recover from key compromise without losing your network presence.

Self-Revocation

Sign revocation with your own key (if still accessible)

Emergency Certificate

Pre-generated "break-glass" certificate stored offline

Mesh Broadcast

Revocation propagates via gossip to all peers

Revocation Reasons
KEY_COMPROMISED — Key leaked/stolen
DOKO_SUPERSEDED — Replaced with new DOKO
IDENTITY_RETIRED — Voluntary retirement
LOST_ACCESS — Cannot access keys
AFFILIATION_ENDED — Left organization
import { DOKORevocation, REVOCATION_REASONS } from 'yakmesh/security/doko-identity';

// Generate emergency cert when creating DOKO (store offline!)
const emergencyCert = DOKORevocation.generateEmergencyCertificate(doko, privateKey);

// Self-revoke if key is compromised but accessible
const revocation = DOKORevocation.createSelfRevocation(
  doko, 
  privateKey, 
  REVOCATION_REASONS.KEY_COMPROMISED
);

// Activate emergency revocation if key is lost
DOKORevocation.activateEmergencyRevocation(emergencyCert);

// Check if a DOKO is revoked
const isRevoked = DOKORevocation.isRevoked(dokoId);

SSL/TLS Certificate Binding

Bind SSL certificates to DOKO identities for enhanced domain verification.

Cryptographic Chain

Domain SSL Certificate DOKO Identity Mesh Verification
import { DOKOCertBinding } from 'yakmesh/security/doko-identity';

// Compute certificate fingerprint
const fingerprint = DOKOCertBinding.computeFingerprint(pemCertificate);

// Create SSL binding for domain
const binding = DOKOCertBinding.createBinding({
  domain: 'example.com',
  fingerprint,
  expires: Date.now() + 365 * 24 * 60 * 60 * 1000
});

// Add binding to DOKO
DOKOCertBinding.addBinding(doko, binding);

// Verify certificate matches binding
const valid = DOKOCertBinding.verifyBinding(binding, certificate);