UNPKG

@zlattice/lattice-js

Version:

Lattice blockchain TypeScript SDK with dual module support (CJS + ESM)

16 lines 698 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UInt64Schema = exports.AddressSchema = exports.HashSchema = void 0; const zod_1 = require("zod"); exports.HashSchema = zod_1.z .string() .regex(/^0x[0-9a-fA-F]{64}$/, "Invalid hash"); exports.AddressSchema = zod_1.z.union([ zod_1.z.string().regex(/^0x[0-9a-fA-F]{40}$/, "Invalid eth address"), zod_1.z.string().regex(/^zltc_[0-9a-fA-F]{33}$/, "Invalid zltc address") ]); exports.UInt64Schema = zod_1.z .number() .refine((val) => val >= 0, "Must be positive or zero") .refine((val) => val <= Number.MAX_SAFE_INTEGER, "Value too large for uint64"); //# sourceMappingURL=type.alias.js.map