import type { HexString, NormalizedHexString } from '@layerzerolabs/common-chain-model';
import type { Base58String, ChainsByEncoding, NativeAddress, ResolvedEncodingForChainName, TonString } from '@layerzerolabs/layerzero-definitions';
import type { ChainNativeAddress } from '@layerzerolabs/layerzero-definitions';
import { ChainName } from '@layerzerolabs/layerzero-definitions';
type NativeOrString<T extends ChainName | `${ChainName}`> = ChainNativeAddress<T> | ResolvedEncodingForChainName<T>;
export declare enum AddressEncoding {
    HEX = "hex",
    BASE58 = "base58",
    TON = "ton"
}
export interface AddressParser<T extends ChainName | `${ChainName}`> {
    normalizedToNative: (address: NormalizedHexString) => ChainNativeAddress<T>;
    normalizedToNativeString: (address: NormalizedHexString) => ResolvedEncodingForChainName<T>;
    nativeToNormalized: (nativeAddress: NativeOrString<T>) => NormalizedHexString;
    nativeToBytes: (nativeAddress: NativeOrString<T>) => Uint8Array;
    nativeToBytes32Hex: (nativeAddress: NativeOrString<T>) => HexString;
    nativeToBytes32: (nativeAddress: NativeOrString<T>) => Uint8Array;
    validateNative: (nativeAddress: string) => nativeAddress is ResolvedEncodingForChainName<T>;
    /**
     * Parse a native address to a string if it is valid.
     * Throws an error if the native address is invalid.
     * @param nativeAddress - The native address to parse.
     * @returns The parsed native address.
     */
    parseNative: (nativeAddress: string) => NormalizedHexString;
    parseNativeToHex: (nativeAddress: string) => HexString;
    encoding: AddressEncoding;
}
export declare function addressParser<T extends ChainName | `${ChainName}`>(chainName: T): AddressParser<T>;
export declare namespace addressParser {
    const normalizedToBytes32Hex: (address: NormalizedHexString) => `0x${string}`;
    const normalizedToBytes32: (address: NormalizedHexString) => Uint8Array<ArrayBufferLike>;
    const normalizedToBigInt: (address: NormalizedHexString) => bigint;
    const parseNative: (nativeAddress: NativeAddress) => NormalizedHexString;
}
export declare const tonAddressParser: (chainName: ChainsByEncoding[TonString]) => AddressParser<ChainsByEncoding[TonString]>;
export declare const base58AddressParser: (chainName: ChainsByEncoding[Base58String]) => AddressParser<ChainsByEncoding[Base58String]>;
export declare const hexAddressParser: (chainName: ChainsByEncoding[HexString]) => AddressParser<ChainsByEncoding[HexString]>;
export {};
//# sourceMappingURL=addressParser.d.ts.map