/** * Splits `total` into `count` parts, each inside `[minimum, maximum]`. * * Used where a format's length is the sum of its segments — an IPv4 octet spans * one to three digits, an IPv6 group one to four — so a requested total length * is realized by choosing how many characters each segment contributes instead * of redrawing whole addresses and hoping one lands in the window (issue * #2284). * * The caller guarantees `count * minimum <= total <= count * maximum`; each * part is drawn from the range that still leaves the remaining parts * satisfiable. Counts, lengths and segment bounds are nonnegative integers. * * @evidence contracts/common.md#principled-implementation A total is split into parts within a range by drawing each part from the interval that still leaves the remaining parts satisfiable, so the caller's guarantee that the total is within `count * minimum` and `count * maximum` yields a valid composition without retrying. * @evidence contracts/common.md#clear-and-simple-design One function. * @evidence contracts/common.md#prohibited-implementation-shortcuts The method is constructive and not a redraw loop. * @evidence contracts/common.md#meaningful-documentation The doc states the guarantee and the use for formats. */ export declare const __randomComposition: (props: { total: number; count: number; minimum: number; maximum: number; }) => number[]; /** * Draws `length` characters of the base64 alphabet. * * The caller passes a multiple of four, which `format: "byte"` accepts without * padding; every character below is in the alphabet its validator spells out, * so the result needs no encoding step. * * @evidence contracts/common.md#principled-implementation Each character is drawn from the 64-symbol alphabet, which is the alphabet the byte validator accepts, so a multiple-of-four length is valid without an encoder. * @evidence contracts/common.md#clear-and-simple-design One loop. * @evidence contracts/common.md#prohibited-implementation-shortcuts The alphabet is the format's. * @evidence contracts/common.md#meaningful-documentation The doc states the multiple-of-four precondition. */ export declare const __randomBase64: (length: number) => string; /** * Draws `length` decimal digits, leading zeros included. * * @evidence contracts/common.md#principled-implementation Each character is a digit from zero to nine, leading zeros included. * @evidence contracts/common.md#clear-and-simple-design One loop. * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the shared integer generator. * @evidence contracts/common.md#meaningful-documentation A one-line doc states the digits. */ export declare const __randomDigits: (length: number) => string; /** * Draws a positive integer count of decimal digits; a single digit may be zero. * * @evidence contracts/common.md#principled-implementation A number of the requested digit count without a leading zero, with one digit allowed to be zero, built from a nonzero first digit and random digits. * @evidence contracts/common.md#clear-and-simple-design One expression over the digit helper. * @evidence contracts/common.md#prohibited-implementation-shortcuts It uses the shared integer generator. * @evidence contracts/common.md#meaningful-documentation A one-line doc states the digit count. */ export declare const __randomNumeric: (length: number) => string;