UNPKG

@cloudflare/zkp-ecdsa

Version:

zkp-ecdsa: A Typescript Implementation of ZKAttest

16 lines 412 B
import { TypedJSON } from 'typedjson'; export function readJson(type, text) { const ser = new TypedJSON(type, { errorHandler: (e) => { throw e; }, }), obj = ser.parse(text); if (obj) { return obj; } throw new Error('bad parsing'); } export function writeJson(type, object) { return TypedJSON.stringify(object, type); } //# sourceMappingURL=serde.js.map