import type { Address } from '@ton/ton';
import type { HexString, NormalizedHexString } from '@layerzerolabs/common-chain-model';
import type { Base58String, ChainsByEncoding, ChainType, InferChainNamesForChainType, InferChainTypeForChainName, InitiaString, NativeAddress, ResolvedEncodingForChainName } from '@layerzerolabs/layerzero-definitions';
import type { ChainNativeAddress } from '@layerzerolabs/layerzero-definitions';
import { ChainName } from '@layerzerolabs/layerzero-definitions';
import type { MaybeUndefinedMapped } from '@layerzerolabs/typescript-utils';
type NativeOrString<T extends ChainName> = ChainNativeAddress<T> | ResolvedEncodingForChainName<T>;
export declare enum AddressEncoding {
    HEX = "hex",
    BASE58 = "base58",
    TON = "ton",
    INITIA = "initia",
    STELLAR = "stellar"
}
export type ExtensionByChainType = {
    ton: {
        tonToNormalized: (tonAddress: Address) => NormalizedHexString;
    };
};
export type InferExtensionByChainName<T extends ChainName> = InferChainTypeForChainName<T> extends keyof ExtensionByChainType ? ExtensionByChainType[InferChainTypeForChainName<T>] : {};
export type AddressParser<T extends ChainName> = {
    normalizedToNative: <Address extends NormalizedHexString | undefined>(address: Address) => MaybeUndefinedMapped<Address, ChainNativeAddress<T>>;
    normalizedToNativeString: <Address extends NormalizedHexString | undefined>(address: Address) => MaybeUndefinedMapped<Address, ResolvedEncodingForChainName<T>>;
    nativeToNormalized: <Address extends NativeOrString<T> | undefined>(nativeAddress: Address) => MaybeUndefinedMapped<Address, NormalizedHexString>;
    nativeToBytes: <Address extends NativeOrString<T> | undefined>(nativeAddress: Address) => MaybeUndefinedMapped<Address, Uint8Array>;
    nativeToBytes32Hex: <Address extends NativeOrString<T> | undefined>(nativeAddress: Address) => MaybeUndefinedMapped<Address, HexString>;
    nativeToBytes32: <Address extends NativeOrString<T> | undefined>(nativeAddress: Address) => MaybeUndefinedMapped<Address, Uint8Array>;
    normalizedToBytes32Hex: <Address extends NormalizedHexString | undefined>(address: Address) => MaybeUndefinedMapped<Address, HexString>;
    normalizedToBytes32: <Address extends NormalizedHexString | undefined>(address: Address) => MaybeUndefinedMapped<Address, Uint8Array>;
    bytes32ToNormalized: <B extends HexString | undefined>(bytes32Hex: B) => MaybeUndefinedMapped<B, NormalizedHexString>;
    validateNative: (nativeAddress: string | undefined) => 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 | undefined) => NormalizedHexString;
    parseNativeToUnpaddedHex: (nativeAddress: string | undefined) => HexString;
    encoding: AddressEncoding;
} & InferExtensionByChainName<T>;
export declare function addressParser<T extends ChainName>(chainName: T): AddressParser<T>;
export declare namespace addressParser {
    const normalizedToUnpaddedString: (address: NormalizedHexString) => HexString;
    const normalizedToBigInt: (address: NormalizedHexString) => bigint;
    const parseNative: (nativeAddress: NativeAddress) => NormalizedHexString;
}
export declare const tonAddressParser: (chainName: InferChainNamesForChainType<ChainType.TON>) => AddressParser<InferChainNamesForChainType<ChainType.TON>>;
export declare const initiaAddressParser: (chainName: ChainsByEncoding[InitiaString]) => AddressParser<ChainsByEncoding[InitiaString]>;
export declare const base58AddressParser: (chainName: ChainsByEncoding[Base58String]) => AddressParser<ChainsByEncoding[Base58String]>;
export declare const hexAddressParser: (chainName: ChainsByEncoding[HexString]) => AddressParser<ChainsByEncoding[HexString]>;
export declare const stellarAddressParser: (chainName: InferChainNamesForChainType<ChainType.STELLAR>) => AddressParser<InferChainNamesForChainType<ChainType.STELLAR>>;
export declare const starknetAddressParser: (chainName: ChainsByEncoding[HexString]) => AddressParser<ChainsByEncoding[HexString]>;
export {};
//# sourceMappingURL=addressParser.d.ts.map