import type { AddressTypes } from "../models/addresses/addressTypes"; import type { IRent } from "../models/IRent"; import type { ITypeBase } from "../models/ITypeBase"; /** * The validation result object. */ export interface IValidationResult { /** * Is the subject valid. */ isValid: boolean; /** * The validation failure messages, in case on invalid subject. */ error?: string; } /** * Fail validation with error message. * @param withError The error message. * @throws Error with message. */ export declare function failValidation(withError: string): void; /** * Validates the array is composed of distinct elements. * @param elements The elements. * @param containerName The name of the parent object to use in the error message. * @param elementName The name of the validation subject to use in the error message. * @throws Error if the validation fails. */ export declare function validateDistinct(elements: string[] | number[], containerName: string, elementName: string): void; /** * Validates that the array of objects is in ascending order relative to the objects type. * @param arrayToValidate The subject to validate the ascending order for. * @param containerName The name of the parent object to use in the error message. * @param elementName The name of the validation subject to use in the error message. * @throws Error if the validation fails. */ export declare function validateAscendingOrder(arrayToValidate: ITypeBase[], containerName: string, elementName: string): void; /** * Calculates the minimum required storage deposit of an output. * @param address The address to calculate min storage deposit. * @param rentStructure Rent cost of objects which take node resources. * @returns The required storage deposit. */ export declare function getMinStorageDeposit(address: AddressTypes, rentStructure: IRent): number; /** * Validate the count is within allowed boundries. * @param count The number to validate. * @param min The maximum allowed value. * @param max The maximum allowed value. * @param elementName The name of the validation subject to use in the error message. * @throws Error if the validation fails. */ export declare function validateCount(count: number, min: number, max: number, elementName: string): void;