Skip to content

sprksocial/atp

Repository files navigation

ATP

JSR @atp

A suite of TypeScript libraries for the AT Protocol, built on web standards.

Overview

This monorepo provides modular, standards-based TypeScript implementations of core AT Protocol components, based on the @atproto NPM packages.

Each package is designed to work across JavaScript runtimes (Deno, Node.js, Bun, Cloudflare Workers) and can be used independently or together.

Packages

Hono-based XRPC server implementation with lexicon validation, authentication, rate limiting, and WebSocket streaming support. Works across JavaScript runtimes with comprehensive error handling and type safety.

XRPC client library for calling AT Protocol services with lexicon schema validation.

Tools for syncing data from AT Protocol, including firehose (relay) subscriptions with authentication and filtering.

Command-line tool for generating documentation, servers, and clients from AT Protocol lexicon files.

Cryptographic primitives for AT Protocol supporting P-256 and K-256 (secp256k1) elliptic curves. Includes key generation, signing, verification, DID key serialization, and hashing utilities.

Decentralized identity resolution for DIDs and handles. Resolves handles to DIDs, DIDs to DID documents, and provides caching and verification methods.

Validation utilities for AT Protocol lexicons. Validates records, XRPC parameters, inputs, and outputs against lexicon schemas.

Repository utilities including the Merkle Search Tree (MST) implementation. Handles signed key/value stores with CBOR-encoded data records, CAR files, and repo synchronization.

Validation and parsing for AT Protocol string formats including DIDs, handles, NSIDs, AT URIs, TIDs, record keys, and datetimes.

Shared utilities for server-oriented applications, including IPLD handling, streams, async helpers, obfuscation, retry logic, and TID generation.

Simple Uint8Array utilities including allocation, comparison, concatenation, string conversion (with multibase encoding support), and XOR operations. Based on the uint8arrays npm package.

Installation

Each package can be installed independently from JSR:

# deno
deno add jsr:@atp/crypto jsr:@atp/xrpc-server

# pnpm 10.9+
pnpm add jsr:@atp/crypto jsr:@atp/identity jsr:@atp/xrpc

# yarn 4.9+
yarn add jsr:@atp/crypto jsr:@atp/identity jsr:@atp/xrpc

# npm, bun, and older versions of yarn or pnpm
npx jsr add @atp/xrpc-server # replace npx with any of yarn dlx, pnpm dlx, or bunx

Development

Ensure you have the latest version of Deno installed.

deno test

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •