@skyware/firehose
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

@skyware/firehose

A simple client for consuming data from an AT Protocol Relay.

Documentation

Installation

npm install @skyware/firehose

Example Usage

import { Firehose } from "@skyware/firehose";

const firehose = new Firehose();
firehose.on("commit", (commit) => {
	for (const op of commit.ops) {
		console.log(op);
	}
});
firehose.start();

Events

Event Description
commit Represents a commit to a user's repository.
identity Represents a change to an account's identity. Could be an updated handle, signing key, or PDS hosting endpoint.
handle Represents an update of an account's handle, or transition to/from invalid state (may be deprecated in favor of identity).
tombstone Indicates that an account has been deleted (may be deprecated in favor of identity or a future account event).
info An informational message from the relay.
open Emitted when the websocket connection is opened.
close Emitted when the websocket connection is closed.
error Emitted when an error occurs while handling a message.
websocketError Emitted when an error occurs with the websocket connection.

Package Sidebar

Install

npm i @skyware/firehose

Weekly Downloads

309

Version

0.5.1

License

MPL-2.0

Unpacked Size

34.8 kB

Total Files

5

Last publish

Collaborators

  • futuristick