UNPKG

minauth

Version:

A TypeScript library for building authentication systems on top of the Mina blockchain and other zero-knowledge proofs solutions.

20 lines 547 B
import { Field } from 'o1js'; import { z } from 'zod'; export const VerificationKeySchema = z.object({ data: z.string(), hash: z.string() }); export const verificationKey = { __interface_tag: 'ts', decode: (i) => { try { const vk = VerificationKeySchema.parse(i); return { data: vk.data, hash: Field.from(vk.hash) }; } catch { return undefined; } }, encode: (i) => ({ data: i.data, hash: i.hash.toString() }) }; //# sourceMappingURL=verificationkey.js.map