import type { Wallet as SolanaWallet } from "@coral-xyz/anchor"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import type { WalletContextState } from "@solana/wallet-adapter-react"; import { PublicKey } from "@solana/web3.js"; import type { Signer, Wallet } from "ethers"; import { Chains } from "../../../types/client.types"; interface ZetaChainClientParamsBase { chains?: Chains; contracts?: LocalnetAddress[] | MainnetTestnetAddress[]; network?: string; } type ZetaChainClientParams = ZetaChainClientParamsBase & ({ signer: Signer | SignerWithAddress; solanaAdapter?: never; solanaWallet?: never; wallet?: never; } | { signer?: never; solanaAdapter: WalletContextState; solanaWallet?: never; wallet?: never; } | { signer?: never; solanaAdapter?: never; solanaWallet: SolanaWallet; wallet?: never; } | { signer?: never; solanaAdapter?: never; solanaWallet?: never; wallet: Wallet; } | { signer?: undefined; solanaAdapter?: undefined; solanaWallet?: undefined; wallet?: undefined; }); interface MainnetTestnetAddress { address: string; asset?: string; category: string; chain_id: string; chain_name: string; coin_type?: string; decimals?: number; description?: string; foreign_chain_id?: string; symbol?: string; type: string; } interface LocalnetAddress { address: string; chain: string; type: string; } export declare class ZetaChainClient { chains: Chains; network: string; wallet: Wallet | undefined; signer: Signer | SignerWithAddress | undefined; solanaWallet: SolanaWallet | undefined; solanaAdapter: WalletContextState | undefined; private contracts; /** * Initializes ZetaChainClient instance. * * ```ts * new ZetaChainClient({ * network: "testnet" * }) * ``` * * With an Ethers.js wallet: * * ```ts * const client = new ZetaChainClient({ * network: "testnet", * wallet: ethers.Wallet.fromMnemonic(process.env.MNEMONIC as string), * }); * ``` * * With a signer: * * ```ts * const client = new ZetaChainClient({ * network: "testnet", * signer: await ethers.getSigners(), * }); * ``` * * Use a custom RPC endpoint for ZetaChain or any connected chain: * * ```ts * const client = new ZetaChainClient({ * network: "testnet", * chains: { * zeta_testnet: { * api: { * url: "https://zetachain-testnet-archive.allthatnode.com:8545/${process.env.KEY}", * type: "evm", * }, * }, * }, * }); * ``` * * @param params */ constructor(params: ZetaChainClientParams); private mergeChains; getGatewayAddress(): Promise; getChains(): Chains; isSolanaWalletConnected(): boolean; getSolanaPublicKey(): PublicKey | null; getEndpoint: (this: ZetaChainClient, type: string, network: string) => string; getBalances: (this: ZetaChainClient, { evmAddress, btcAddress, solanaAddress, suiAddress, tonAddress, }: { btcAddress?: string; evmAddress?: string; solanaAddress?: string; suiAddress?: string; tonAddress?: string; }) => Promise; getForeignCoins: (this: ZetaChainClient) => Promise; getSupportedChains: (this: ZetaChainClient) => Promise; getFees: (this: ZetaChainClient, gas: number) => Promise<{ messaging: Array<{ [key: string]: string; }>; omnichain: Array; }>; getPools: (this: ZetaChainClient) => Promise; trackCCTX: (this: ZetaChainClient, { hash, json, emitter, timeoutSeconds, }: { emitter: import("../../../types/trackCCTX.types").Emitter | null; hash: string; json: boolean; timeoutSeconds?: number; }) => Promise; sendZeta: (this: ZetaChainClient, { chain, destination, recipient, gasLimit, amount, }: { amount: string; chain: string; destination: string; gasLimit?: number; recipient: string; }) => Promise; getChainId: (this: ZetaChainClient, chainNameOrAlias: string) => number | null; getQuote: (this: ZetaChainClient, inputAmount: string, inputToken: string, outputToken: string) => Promise<{ amount: bigint; decimals: number; }>; getWithdrawFeeInInputToken: (this: ZetaChainClient, inputZRC20: string, outputZRC20: string) => Promise<{ amount: bigint; decimals: number; }>; getRefundFee: (this: ZetaChainClient, inputZRC20: string) => Promise<{ amount: bigint; decimals: number; }>; getZRC20FromERC20: (this: ZetaChainClient, erc20: string) => Promise; getZRC20GasToken: (this: ZetaChainClient, network: string) => Promise; solanaDeposit: (this: ZetaChainClient, args: { amount: number; receiver: string; }) => Promise; solanaDepositAndCall: (this: ZetaChainClient, args: { amount: number; receiver: string; types: string[]; values: import("../../../types/parseAbiValues.types").ParseAbiValuesReturnType; }) => Promise; zetachainWithdrawAndCall: (this: ZetaChainClient, args: { amount: string; callOptions: import("../../../types/contracts.types").CallOptions; data?: string; function?: string; gatewayZetaChain?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; types?: string[]; values?: import("../../../types/parseAbiValues.types").ParseAbiValuesReturnType; zrc20: string; }) => Promise<{ gasFee: bigint; gasZRC20: string; tx: import("ethers").ContractTransactionResponse; }>; zetachainWithdraw: (this: ZetaChainClient, args: { amount: string; gatewayZetaChain?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; zrc20: string; }) => Promise<{ gasFee: bigint; gasZRC20: string; tx: import("ethers").ContractTransactionResponse; }>; zetachainCall: (this: ZetaChainClient, args: { callOptions: import("../../../types/contracts.types").CallOptions; data?: string; function?: string; gatewayZetaChain?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; types?: string[]; values?: import("../../../types/parseAbiValues.types").ParseAbiValuesReturnType; zrc20: string; }) => Promise<{ gasFee: bigint; gasZRC20: string; tx: import("ethers").ContractTransactionResponse; }>; evmDepositAndCall: (this: ZetaChainClient, args: { amount: string; erc20?: string; gatewayEvm?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; types: string[]; values: import("../../../types/parseAbiValues.types").ParseAbiValuesReturnType; }) => Promise; evmCall: (this: ZetaChainClient, args: { gatewayEvm?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; types: string[]; values: import("../../../types/parseAbiValues.types").ParseAbiValuesReturnType; }) => Promise; evmDeposit: (this: ZetaChainClient, args: { amount: string; erc20?: string; gatewayEvm?: string; receiver: string; revertOptions: import("../../../types/contracts.types").RevertOptions; txOptions: import("../../../types/contracts.types").TxOptions; }) => Promise; } export {};