API Reference proto_rune v#0.5.2

Copy Markdown

Modules

Main API for ProtoRune - Elixir SDK for AT Protocol.

Implements AT Protocol identity management operations.

Defines the behaviour for AT Protocol identity management operations.

Provides caching for AT Protocol identity resolution results.

Handles DID resolution for AT Protocol identities.

Handles AT Protocol handle resolution to DIDs through DNS and HTTPS methods.

AT Protocol OAuth 2.0 authorization flow.

An AT Protocol OAuth public client.

DPoP (Demonstrating Proof of Possession, RFC 9449) support for the AT Protocol OAuth flow.

Proof Key for Code Exchange (PKCE) helpers for the AT Protocol OAuth flow.

An OAuth-authenticated AT Protocol session.

A GenServer that keeps an OAuth session fresh for long-running applications.

Low-level com.atproto.repo operations.

An authenticated AT Protocol session.

Low-level com.atproto.sync read operations.

The ProtoRune.Bot module provides the foundational behavior and macros for building bots in the ProtoRune ecosystem. It defines the basic structure for bots and ensures that every bot adheres to a consistent interface, with customizable event handling, identifier, and password retrieval.

A GenServer module that streams real-time events from the ATProto firehose and dispatches them to the bot server.

A GenServer module that handles periodic polling of notifications for a bot, and dispatches these notifications to the appropriate handler functions within the bot.

The ProtoRune.Bot.Server module is responsible for managing bot processes in ProtoRune. It handles bot initialization, session management, and event/message dispatching. This module also integrates with the polling system to retrieve real-time notifications from ATProto and Bluesky services.

High-level Bluesky API helpers.

Reader for CAR (Content Addressable aRchive) v1 data.

Minimal CBOR (RFC 8949) decoder.

CID (Content Identifier) values as they appear in the ATProto event stream.

Yeah, in house string casing

The ProtoRune.Config module provides configuration options for the ProtoRune library.

Real-time event stream client for the ATProto firehose.

A single event decoded from the ATProto firehose.

Decodes firehose WebSocket frames into ProtoRune.Firehose.Event structs.

Behaviour for the WebSocket transport used by ProtoRune.Firehose.

The HTTPClient module handles HTTP requests to external services. It provides a simple interface for making GET and POST requests and handling responses.

The HTTPClient.Adapter module provides an adapter interface for HTTP clients. It defines the behaviour that must be implemented by any HTTP client adapter.

The HTTPClient.Adapters.Req module provides an adapter for the Req library. It implements the HTTPClient.Adapter behaviour and defines the request/3 function to make HTTP requests using Req.

Pure helpers to compute retry delays for rate limited (HTTP 429) responses.

Tracks outgoing requests per key (usually the target host) in fixed one-minute windows and throttles callers once a configurable limit is reached.

Consumer for the AT Protocol Jetstream, the filtered JSON re-encode of the repo firehose.

A single event decoded from a Jetstream JSON message.

Type definitions for the Intermediate Representation (IR) of AT Protocol Lexicons. This structure serves as a bridge between raw lexicon JSON and generated Elixir code.

Generates Elixir modules with Peri schemas from AT Protocol lexicon definitions.

Maps ATProto lexicon types to Peri schema types.

Traversal of the Merkle Search Tree inside a repository checkout.

Builder for AT Protocol rich text with facets.

Safe defaults for persisting AT Protocol session tokens.

Authenticated encryption utilities for session tokens at rest.

Behaviour for pluggable token storage backends.

Behaviour unifying the session types that can authenticate XRPC requests.

Unsigned LEB128 variable-length integer encoding.

The XRPC.Client module handles executing queries and procedures in the XRPC system. It interacts with external services through HTTP requests and performs response validation and schema parsing. The client supports both GET and POST requests, depending on whether the request is a query or a procedure.

Provides fallback configuration for XRPC when service URL is not explicit.

The XRPC.DSL module provides macros to define queries and procedures for interacting with the XRPC system, simplifying the creation of API methods for querying or performing procedures. It supports building custom XRPC queries and procedures by encoding method names and dynamically generating functions based on user-defined parameters.

The XRPC.Procedure module represents a procedure in the XRPC system, encapsulating the method name, request body, and a parser for validating the body. It provides functions to create and manipulate procedure structures.

The XRPC.Query module is responsible for defining and managing queries in the XRPC system. It encapsulates the method, parameters, headers, and an optional parser, providing functions to create and manipulate query structures.

Mix Tasks

Generates Peri schema modules from ATProto lexicon JSON files.