🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@peac/disc

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peac/disc

PEAC discovery with ≤20 lines enforcement

Source
npmnpm
Version
0.12.8
Version published
Weekly downloads
45
32.35%
Maintainers
1
Weekly downloads
 
Created
Source

@peac/disc

PEAC issuer discovery: ABNF-compliant .well-known/peac.txt parser, generator, and remote fetcher.

Installation

pnpm add @peac/disc

What It Does

@peac/disc parses and generates .well-known/peac.txt discovery documents that allow verifiers to find an issuer's public keys and policy information. It enforces the normative 20-line limit, validates document structure against the ABNF grammar, and provides a convenience discover() function for remote resolution.

How Do I Use It?

Parse a discovery document

import { parse, validate } from '@peac/disc';

const result = parse(`
version: peac/0.1
issuer: https://example.com
jwks: https://example.com/.well-known/jwks.json
`);

if (result.valid) {
  console.log(result.discovery.issuer); // 'https://example.com'
}

Generate a discovery document

import { emit } from '@peac/disc';

const txt = emit({
  version: 'peac/0.1',
  issuer: 'https://example.com',
  jwks_uri: 'https://example.com/.well-known/jwks.json',
});

// Serve at /.well-known/peac.txt

Fetch and parse from a remote origin

import { discover, WELL_KNOWN_PATH } from '@peac/disc';

const result = await discover('https://example.com');
if (result.valid) {
  console.log(result.discovery);
}

console.log(WELL_KNOWN_PATH); // '/.well-known/peac.txt'

Integrates With

  • @peac/policy-kit: Policy compilation generates peac.txt artifacts
  • @peac/protocol (Layer 3): Issuer resolution during receipt verification
  • @peac/jwks-cache: Fetches JWKS from the URI discovered via peac.txt

For Agent Developers

If you are building an AI agent or MCP server that needs evidence receipts:

  • Start with @peac/mcp-server for a ready-to-use MCP tool server
  • Use @peac/protocol for programmatic receipt issuance and verification
  • See the llms.txt for a concise overview

License

Apache-2.0

PEAC Protocol is an open source project stewarded by Originary and community contributors.

Docs | GitHub | Originary

Keywords

peac

FAQs

Package last updated on 10 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts