export type PromiseHandle = { resolve: (value: T | PromiseLike) => void; reject: (reason?: unknown) => void; promise: Promise; }; export declare function promiseCreator(): PromiseHandle; export declare const sleep: (ms: number) => Promise; export declare const formatPublicKey: (publicKey: string) => string; export type PublicKeyValidationResult = { ok: true; format: 'pem' | 'base64'; normalizedKey: string; } | { ok: false; reason: string; }; export declare function validateAndNormalizePublicKey(input: string): PublicKeyValidationResult; /** * Returns a random number. Don't use for cryptographic purposes. * @returns a random number */ export declare const randomId: () => string; export declare const bigIntReplacer: (_key: string, value: unknown) => unknown; /** * Creates a window features string for `window.open`, based on the current screen size. * It tries to center the window and limits the size to the given max width and height. * Slightly reduces the size to avoid browser auto-resizing. */ export declare const getWindowFeatures: (maxWidth: number, maxHeight: number) => string; export declare const isPWA: () => boolean; export declare const isIOS: () => boolean; export declare const truncateAddress: (address: string, headLength?: number, tailLength?: number) => string;