UNPKG

@macalinao/zod-solana

Version:

Zod schemas for Solana types with @solana/kit integration

12 lines (11 loc) 392 B
import "./constants.js"; import * as z from "zod"; //#region src/u8-schema.ts /** * A Zod schema for u8 values. * Validates that a number is between 0 and 255 (inclusive). */ const u8Schema = z.number().int("Value must be an integer").min(0, "Value must be at least 0").max(255, `Value must be at most ${String(255)}`); //#endregion export { u8Schema }; //# sourceMappingURL=u8-schema.js.map