Documentation
Everything you need to know about Genesis DB.
JavaScript/TypeScript SDK
Official Genesis DB Client for JavaScript and TypeScript

Getting Started

This SDK gives you seamless access to Genesis DB from any JavaScript or TypeScript environment. Stream events, commit new ones, observe events and query events - all over an simple HTTP interface. Fully type-safe, zero boilerplate, and CloudEvents-native. Whether you're building backends, CLIs, or reactive frontends, this SDK gets out of your way and lets you focus on the event-driven logic that matters.

Installation

To install the SDK, run the following command:

The following envvars are required

The following environment variables are required to run Genesis DB:

Usage

To use the SDK, you need to create a client and connect to the Genesis DB instance. The client will handle the connection and the authentication.

Instantiate the client

Stream Events

Stream Events from lower bound

Stream Events with latest by event type

Commit Events

Commit events with preconditions

Usage of referenced data (GDPR)

Deleting referenced data (GDPR)

Observe Events

Observe Events from lower bound (Message queue)

Query Events

Health Checks