import { Base64, SignMethod, UserAddress } from "../interfaces"; import { ChainId, ChainName } from "../wormhole"; import { ChainTools } from "./type"; export { ALGORAND_ZERO_ADDRESS_STRING } from "./algorand"; export { isValidEthereumAddress, toValidEthereumAddress } from "./evm"; declare const SUPPORTED_CHAIN_IDS: readonly [8, 2, 6, 23, 10003, 4, 1, 10002, 30, 24, 5, 10004, 10005]; declare const SUPPORTED_CHAIN_NAMES: readonly ["algorand", "ethereum", "avalanche", "arbitrum", "arbitrum_sepolia", "bsc", "solana", "sepolia", "polygon", "optimism", "optimism_sepolia", "base", "base_sepolia", "polygon"]; type SupportedChainId = typeof SUPPORTED_CHAIN_IDS[number]; type SupportedChainName = typeof SUPPORTED_CHAIN_NAMES[number]; declare const CHAIN_UTILS: Record; declare const C3_ACCOUNT_TYPE_ALGORAND = 0; declare const C3_ACCOUNT_TYPE_EVM = 1; declare const C3_ACCOUNT_TYPE_SOLANA = 2; declare const C3_ACCOUNT_TYPES: number[]; type C3AccountType = typeof C3_ACCOUNT_TYPES[number]; declare const CHAIN_ID_TO_ACCOUNT_TYPE: Record; declare const C3_ACCOUNT_TYPE_UTILS: Record; declare const isChainIdSupported: (chainId: ChainId | number) => chainId is 1 | 2 | 4 | 5 | 6 | 8 | 23 | 24 | 30 | 10002 | 10003 | 10004 | 10005; declare const isChainNameSupported: (chainName: string | ChainName) => chainName is "solana" | "ethereum" | "bsc" | "polygon" | "avalanche" | "algorand" | "arbitrum" | "optimism" | "base" | "sepolia" | "arbitrum_sepolia" | "base_sepolia" | "optimism_sepolia"; declare function toSupportedChainId(chainId: ChainId): SupportedChainId; declare function toSupportedChainIdFromChainName(chainName: string | ChainName): SupportedChainId; /** * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * @private and @internal Do not export this function * @param address User address * @returns {SupportedChainId} Chain id the address belongs to */ declare function findChainIdByAddress(address: UserAddress): SupportedChainId; /** * IMPORTANT!! * PLEASE, READ THIS BEFORE USING THIS FUNCTION!!! * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * Please, avoid using it. Safe way is using its respective chain utils function. * I.E: CHAIN_UTILS[chainId].isValidAddress * @param address Any supported chain address * @returns {boolean} True if address is valid */ declare function isValidAddress(address: UserAddress): boolean; /** * IMPORTANT!! * PLEASE, READ THIS BEFORE USING THIS FUNCTION!!! * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * Please, avoid using it. Safe way is using its respective chain utils function. * I.E: CHAIN_UTILS[chainId].getSigningMethod * @param address Any supported chain address * @returns {SignMethod} Sign method for the chain the address belongs to */ declare function getSigningMethodByAddress(address: UserAddress): SignMethod; /** * IMPORTANT!! * PLEASE, READ THIS BEFORE USING THIS FUNCTION!!! * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * Please, avoid using it. Safe way is using its respective chain utils function. * I.E: CHAIN_UTILS[chainId].getPublicKey * @param address Any supported chain address * @returns {Uint8Array} Public key for the chain the address belongs to */ declare function getPublicKeyByAddress(address: UserAddress): Uint8Array; /** * IMPORTANT!! * PLEASE, READ THIS BEFORE USING THIS FUNCTION!!! * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * Please, avoid using it. Safe way is using its respective chain utils function. * I.E: CHAIN_UTILS[chainId].getDataPrefix * @param address Any supported chain address * @param dataLength Length of the data to be signed * @returns {Uint8Array} Public key for the chain the address belongs to */ declare function getDataPrefixByAddress(address: UserAddress, dataLength: number): Uint8Array; /** * IMPORTANT!! * PLEASE, READ THIS BEFORE USING THIS FUNCTION!!! * @UNSAFE This function is unsafe because it does not return which chain the address belongs to. * Please, avoid using it. Safe way is using its respective chain utils function. * I.E: CHAIN_UTILS[chainId].verifySignature * @param signature Signature to be verified * @param data Data to be verified * @param address Any supported chain address * @returns {boolean} True if signature is valid */ declare function verifySignatureByAddress(signature: Uint8Array | Base64, data: Uint8Array | Base64, address: UserAddress): boolean; export type { SupportedChainId, SupportedChainName, C3AccountType }; export { SUPPORTED_CHAIN_IDS, SUPPORTED_CHAIN_NAMES, CHAIN_UTILS, C3_ACCOUNT_TYPES, C3_ACCOUNT_TYPE_ALGORAND, C3_ACCOUNT_TYPE_EVM, C3_ACCOUNT_TYPE_SOLANA, C3_ACCOUNT_TYPE_UTILS, CHAIN_ID_TO_ACCOUNT_TYPE, isChainIdSupported, isChainNameSupported, toSupportedChainId, toSupportedChainIdFromChainName, isValidAddress, getSigningMethodByAddress, getPublicKeyByAddress, getDataPrefixByAddress, verifySignatureByAddress, findChainIdByAddress }; //# sourceMappingURL=index.d.ts.map