Registry / security / zser

zser

JSON →
library0.0.1jsnpmunverified

zser is a security-oriented serialization format with novel authentication properties based on Merkleized data structures. The JavaScript/TypeScript implementation (version 0.0.1) targets ES2017+ and provides parsing and serialization APIs. It is currently in early development with no recent updates. The library ships TypeScript types and is designed for use cases requiring authenticated data serialization, such as credential and token handling.

security
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ESM-only; CommonJS require is not supported.

import zser from 'zser'

Named export for the main class.

import { Zser } from 'zser'

Type import for TypeScript users.

import type { ParseOptions } from 'zser'

Parses a Uint8Array into an object and serializes an object back to Uint8Array, with hex encoding/decoding.

import zser from 'zser'; import { Buffer } from 'node:buffer'; // Assume we have a Uint8Array containing a serialized zser message const message = new Uint8Array([0x15, 0x07, 0x02, 0x03, 0x55]); // Parse the message const parsed = zser.parse(message); console.log(parsed); // { '1': { '24': 42 } } // Serialize an object const obj = { foo: { bar: [1, 2, 3] } }; const serialized = zser.serialize(obj); console.log(serialized); // Uint8Array // Encode/decode to/from hex string const hex = zser.encode(serialized); console.log(hex); // hex string const decoded = zser.decode(hex); console.log(decoded); // Uint8Array
Debug
Known footguns
breakingThis library is targeting ES2017 and may require transpilation for older environments.
gotchaThe library is in early development (v0.0.1) and the API may change without notice.
gotchaThe default export is zser, but there is also a named export Zser. Depending on the bundler, import { Zser } may yield undefined if only default is provided.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
bytedance
6
gptbot
3
ahrefsbot
2
Resources
packagezser