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 a 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:

The following envvars are optional

The following environment variables are optional:

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

Commit Events

Stream Events

Observe Events

Query Events