/// import * as wormholeSdk from "@certusone/wormhole-sdk"; import { ChainId, EVMChainId, SignedVaa } from "@certusone/wormhole-sdk"; import { ParsedVaaWithBytes } from "./application.js"; export type MakeOptional = Omit & Partial>> & Partial>; export declare function encodeEmitterAddress(chainId: wormholeSdk.ChainId, emitterAddressStr: string): string; export declare const strip0x: (str: string) => string; export declare function sleep(ms: number): Promise; /** * Simple object check. * @param item * @returns {boolean} */ export declare function isObject(item: T): item is T & ({} | null); export declare function parseVaaWithBytes(bytes: SignedVaa): ParsedVaaWithBytes; /** * Deep merge two objects. * @param target * @param ...sources */ export declare function mergeDeep(target: Partial, sources: Partial[], maxDepth?: number): T; export declare const second = 1000; export declare const minute: number; export declare const hour: number; export declare class EngineError extends Error { args?: Record | undefined; constructor(msg: string, args?: Record | undefined); } export declare function maybeConcat(...arrs: (T[] | undefined)[]): T[]; export declare function nnull(x: T | undefined | null, errMsg?: string): T; export declare function assertStr(x: any, fieldName?: string): string; export declare function assertInt(x: any, fieldName?: string): number; export declare function assertArray(x: any, name: string, elemsPred?: (x: any) => boolean): T[]; export declare function assertBool(x: any, fieldName?: string): boolean; export declare function wormholeBytesToHex(address: Buffer | Uint8Array): string; export declare function assertEvmChainId(chainId: number): EVMChainId; export declare function assertChainId(chainId: number): ChainId; export declare function dbg(x: T, msg?: string): T; export declare function mapConcurrent(arr: any[], fn: (...args: any[]) => Promise, concurrency?: number): Promise; export declare function printError(error: unknown): string; export declare function min(lhs: bigint, rhs: bigint): bigint; export declare function max(lhs: bigint, rhs: bigint): bigint;