import * as z from 'zod'; export interface IdlParams { schema: z.core.$ZodType; value: unknown; } /** * Recursively converts a JavaScript value to its Candid IDL representation, * guided by a Zod schema. * * Discriminated unions are converted from `{ type: "active", owner: ... }` to * `{ active: { owner: ... } }` to match the Candid variant shape. * Optional and nullable fields are converted from `undefined` or `null` to `[]`, * and present values are wrapped in `[value]`. Objects and arrays are processed * recursively. Non-nullable primitives and unknown types are passed through as-is. * * @param {IdlParams} params - The schema and value to convert. * @param {z.core.$ZodType} params.schema - The Zod schema describing the value's structure. * @param {unknown} params.value - The JavaScript value to convert. * @returns {unknown} The value in Candid IDL format. */ export declare const schemaToIdl: ({ schema, value }: IdlParams) => unknown; /** * Recursively converts a Candid IDL value back to its JavaScript representation, * guided by a Zod schema. * * Discriminated unions are converted from `{ active: { owner: ... } }` back to * `{ type: "active", owner: ... }` to match the Zod discriminated union shape. * Optional and nullable fields are converted from `[]` to `undefined` and from * `[value]` to `value`. Objects and arrays are processed recursively. * Non-nullable primitives and unknown types are passed through as-is. * * @param {IdlParams} params - The schema and value to convert. * @param {z.core.$ZodType} params.schema - The Zod schema describing the value's structure. * @param {unknown} params.value - The Candid IDL value to convert. * @returns {unknown} The value in JavaScript representation. */ export declare const schemaFromIdl: ({ schema, value }: IdlParams) => unknown;