cesr
v0.0.22
Published
[](https://www.npmjs.com/package/cesr) [](https://github.com/lenkan/cesr-js/blob/main/LICENSE) [ for parsing and processing cryptographic event streams.
⚠️ Work in Progress: This package is currently under development and not intended for production use.
📖 Documentation
- API Reference - Complete API documentation
🚀 Installation
npm install cesr📋 Usage
Install using npm
npm install cesrBasic Example
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);
}
}🖥️ Command Line Interface
Install globally to use the CLI:
npm install -g cesrCLI Usage
# 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✨ Features
- ✅ CESR Frame Parsing - Complete support for CESR primitive parsing
- ✅ JSON Messages - Parse embedded JSON messages in streams
- ✅ Streaming Support - Process data incrementally as it arrives
- ✅ TypeScript Support - Full type definitions included
- ✅ Command Line Tool - Parse CESR streams from command line
- ⏳ MSGPACK Messages - Coming soon
- ⏳ CBOR Messages - Coming soon
- 🔧 Encoding/Decoding API - Available from
cesr/__unstable__(experimental)
🤝 Contributing
This project is open source and contributions are welcome! Please feel free to:
- Report bugs or issues
- Suggest new features
📄 License
This project is licensed under the terms specified in the LICENSE file.
