/** * SCALE codec primitives. * * Thin wrappers over scale-ts that provide Polkadot-specific conveniences: * Hex strings, nullable values, status enums, lazy codecs, and error enums. * * Previously provided by @novasamatech/scale — inlined here to remove * the external dependency. */ import type { Codec } from "scale-ts"; import { Enum } from "scale-ts"; export { Enum }; /** * Optimized version of `Option(bool)` — encodes as a single u8: * 0 = undefined/null, 1 = false, 2 = true. */ export declare const OptionBool: Codec; export type HexString = `0x${string}`; /** * Assert that a string is a valid hex string (`0x...`). */ export declare function toHexString(value: string): HexString; /** * SCALE codec for hex-encoded byte strings (`0x...`). */ export declare function Hex(length?: number): Codec; /** * Enum without values — maps string labels to u8 indices. */ export declare function Status(...list: T[]): Codec; /** * Deferred codec for recursive types. */ export declare function lazy(fn: () => Codec): Codec; //# sourceMappingURL=primitives.d.ts.map