import { type Keypair } from "@mysten/sui/cryptography"; import type React from "react"; /** * The result of an input validation. */ export type ValidationResult = { err: string | null; val: T | undefined; }; /** * A function that validates a raw input string and returns an error message or the value. * Runs after the hook's internal validation. */ export type InputValidator = (input: string) => ValidationResult; /** * A function that validates a processed value and returns an error message or the value. * Runs after the hook's internal validation and after the user-provided `validateInput`. */ export type ValueValidator = (val: T) => ValidationResult; /** * Common props for all kinds of inputs. */ export type CommonInputProps = { label?: React.ReactNode; msgRequired?: string; onChangeVal?: (val: T | undefined) => void; validateInput?: InputValidator; validateValue?: ValueValidator; }; /** * The state and rendered element returned by input hooks. */ export type InputResult = { str: string; val: T | undefined; err: string | null; input: React.ReactElement; clear: () => void; }; /** * Props for `` fields. */ export type InputProps = CommonInputProps & { html?: React.InputHTMLAttributes; }; /** * A base hook for creating `` fields. */ export declare const useInputBase: (props: InputProps & { validate: InputValidator; deps: React.DependencyList; }) => InputResult; /** * An input field for strings. */ export declare const useInputString: (props: InputProps & { minLength?: number; maxLength?: number; minBytes?: number; maxBytes?: number; msgTooShort?: string; msgTooLong?: string; }) => InputResult; /** * An input field for Sui addresses (or object IDs). */ export declare const useInputAddress: (props: InputProps) => InputResult; /** * An input field for Sui private keys that produces a Sui Keypair. */ export declare const useInputPrivateKey: (props: InputProps) => InputResult; /** * An input field for positive integers. */ export declare const useInputUnsignedInt: (props: InputProps & { min?: number; max?: number; msgTooSmall?: string; msgTooLarge?: string; }) => InputResult; /** * Input field for positive Coin balances. Handles decimals (e.g. `"1 SUI"` → `1_000_000_000`). */ export declare const useInputUnsignedBalance: (props: InputProps & { decimals: number; min?: bigint; max?: bigint; msgTooSmall?: string; msgTooLarge?: string; }) => InputResult; /** * Props for `