/** An encoding/decoding alphabet using the numbers 0-9. */ export declare const decimal = "0123456789"; /** An encoding/decoding alphabet using ASCII letters only (no numbers). */ export declare const alpha = "abcdefghijklmnopqrstuvwxyz"; /** * An encoding/decoding alphabet using decimal numbers and lowercase letters. */ export declare const base36 = "0123456789abcdefghijklmnopqrstuvwxyz"; /** * An encoding/decoding alphabet using decimal numbers, lowercase letters, * uppercase letters, underscores, and dashes. */ export declare const base64 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; /** * An encoding/decoding alphabet similar to base64, but with some letters and * numbers strategically removed to improve readability (avoids lookalike * characters) and curb accidental profanity. */ export declare const base48Safe = "2345679bcdfghjkmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ"; /** * Encodes/decodes a string from the given "from" alphabet to the given "to" * alphabet. The process is symmetric, so to decode the string, call the same * function with the "from" and "to" alphabets swapped. Throws an error if a * character within the input string is not in the "from" alphabet. * @param input The string to encode/decode. * @param fromAlpha The alphabet the input string is using, e.g. decimal. * @param toAlpha The alphabet the output string should use, e.g. base-64. */ export declare function reencode(input: string, fromAlpha: string, toAlpha: string): string; /** * Encodes/decodes a string from the given "from" alphabet to the given "to" * alphabet. The process is symmetric, so to decode the string, call the same * function with the "from" and "to" alphabets swapped. Returns null if a * character within the input string is not in the "from" alphabet. * @param input The string to encode/decode. * @param fromAlpha The alphabet the input string is using, e.g. decimal. * @param toAlpha The alphabet the output string should use, e.g. base-64. */ export declare function tryReencode(input: string, fromAlpha: string, toAlpha: string): string | null;