A JavaScript/TypeScript implementation of Composable Event Stream Representation (CESR) for parsing and processing cryptographic event streams.
⚠️ Work in Progress: This package is currently under development and not intended for production use.
npm install cesr
Install using npm
npm install cesr
Parse a CESR stream from a URL:
import { parse } from "cesr";
const url = new URL("/lenkan/cesr-js/refs/heads/main/fixtures/geda.cesr", "https://raw.githubusercontent.com");
const response = await fetch(url);
if (response.body) {
for await (const message of parse(response.body)) {
console.log(message);
}
}
Install globally to use the CLI:
npm install -g cesr
# Show help
cesr --help
# Parse a CESR file from a URL
cesr https://raw.githubusercontent.com/lenkan/cesr-js/refs/heads/main/fixtures/geda.cesr
# Parse from stdin with pretty printing
curl https://example.com/stream.cesr | cesr --pretty -
# Parse a local file
cesr ./path/to/file.cesr
cesr/__unstable__ (experimental)This project is open source and contributions are welcome! Please feel free to:
This project is licensed under the terms specified in the LICENSE file.