JavaScript SDK¶
The JavaScript SDK provides programmatic access to EventSourcingDB from JavaScript applications. It offers a convenient interface for writing, reading, and observing events without having to interact with the HTTP API directly.
Official SDK
This SDK is officially developed and maintained by the native web GmbH, the creators of EventSourcingDB. It is aligned with the latest platform features and receives regular updates.
Installation¶
To install the SDK, run:
You can also find this SDK on npm.
Capabilities¶
This SDK intentionally focuses on application-level use cases. It provides core functionality for writing, reading, and observing events, and deliberately excludes operational concerns such as backup, restore, or health monitoring.
For a detailed explanation of the specific requirements behind each capability, see the Compliance Criteria.
Version Information
The list is based on SDK version 1.5.0, tested against EventSourcingDB 1.2.0, verified on November 3rd, 2025.
Essentials
✓ Initialize the Client
✓ Ping the Server
✓ Verify API Token
Writing Events
✓ Write Single Events
✓ Write Multiple Events
✓ Use isSubjectPristine
✓ Use isSubjectPopulated
✓ Use isSubjectOnEventId
✓ Use isEventQlQueryTrue
✓ Include OpenTelemetry Trace Context
Reading Events
✓ Read Events by Subject
✓ Read Recursively
✓ Read Chronological and Anti-Chronological
✓ Use Boundaries
✓ Use fromLatestEvent
Using EventQL
✓ Execute EventQL Queries
Observing Events
✓ Observe Events By Subject
✓ Observe Recursively
✓ Use Boundaries
✓ Use fromLatestEvent
Metadata and Discovery
✓ Register Event Schemas
✓ List Subjects
✓ List Event Types
✓ List a Specific Event Type
✓ Verify Event Hashes
✓ Verify Event Signatures
Testcontainers Support
✓ Start and Stop EventSourcingDB in Tests
✓ Use Custom Configuration (e.g., API Token, Port, …)
Documentation¶
Refer to the SDK's GitHub repository for detailed usage instructions, code examples, and API reference.
Further Resources¶
- Repository: thenativeweb/eventsourcingdb-client-javascript
- Registry: npm
- License (MIT): License file
- Issue tracker: GitHub Issues