{"id":42366,"library":"zser","title":"zser","description":"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.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/zcred/zser","tags":["javascript","authentication","authorization","credential","serialization","token","typescript"],"install":[{"cmd":"npm install zser","lang":"bash","label":"npm"},{"cmd":"yarn add zser","lang":"bash","label":"yarn"},{"cmd":"pnpm add zser","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; CommonJS require is not supported.","wrong":"const zser = require('zser')","symbol":"default","correct":"import zser from 'zser'"},{"note":"Named export for the main class.","wrong":null,"symbol":"Zser","correct":"import { Zser } from 'zser'"},{"note":"Type import for TypeScript users.","wrong":null,"symbol":"ParseOptions","correct":"import type { ParseOptions } from 'zser'"}],"quickstart":{"code":"import zser from 'zser';\nimport { Buffer } from 'node:buffer';\n\n// Assume we have a Uint8Array containing a serialized zser message\nconst message = new Uint8Array([0x15, 0x07, 0x02, 0x03, 0x55]);\n\n// Parse the message\nconst parsed = zser.parse(message);\nconsole.log(parsed); // { '1': { '24': 42 } }\n\n// Serialize an object\nconst obj = { foo: { bar: [1, 2, 3] } };\nconst serialized = zser.serialize(obj);\nconsole.log(serialized); // Uint8Array\n\n// Encode/decode to/from hex string\nconst hex = zser.encode(serialized);\nconsole.log(hex); // hex string\nconst decoded = zser.decode(hex);\nconsole.log(decoded); // Uint8Array","lang":"typescript","description":"Parses a Uint8Array into an object and serializes an object back to Uint8Array, with hex encoding/decoding."},"warnings":[{"fix":"Use a transpiler like Babel with ES2017 preset, or upgrade your runtime.","message":"This library is targeting ES2017 and may require transpilation for older environments.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Pin to a specific version and test thoroughly before upgrading.","message":"The library is in early development (v0.0.1) and the API may change without notice.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use default import unless you are sure your bundler handles both.","message":"The 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.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.1':23 'api':31 'authent':12,54,64 'author':65 'base':14 'case':52 'credenti':59,66 'current':34 'data':17,55 'design':49 'develop':37 'earli':36 'es2017':25 'format':9 'handl':62 'implement':21 'javascript':63 'javascript/typescript':20 'librari':43 'merkleiz':16 'novel':11 'orient':7 'pars':28 'properti':13 'provid':27 'recent':40 'requir':53 'secur':6 'security-ori':5 'serial':8,30,56,67 'ship':44 'structur':18 'target':24 'token':61,68 'type':46 'typescript':45,69 'updat':41 'use':51 'version':22 'zser':1,2","created_at":"2026-06-04T18:56:54.723003+00:00","updated_at":"2026-06-04T18:56:54.723003+00:00","problems":[{"fix":"Change import { zser } from 'zser' to import zser from 'zser'.","cause":"Misunderstanding of import: using named import where default import is needed.","error":"TypeError: zser.parse is not a function"},{"fix":"Switch to ES module imports: import zser from 'zser'.","cause":"Using CommonJS require() on an ESModule package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Use Uint8Array directly instead of Buffer, or include a polyfill.","cause":"Browser environment missing Node.js Buffer.","error":"ReferenceError: Buffer is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/zcred/zser#readme","github":"https://github.com/zcred/zser","docs":null,"changelog":null,"pypi":null,"npm":"zser","openapi_spec":null,"status_page":null,"smithery":null,"categories":["security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}