import { OTC } from "../services/types"; import { RestService, SocketService } from "../services"; import { AxelarAssetTransferConfig, Environment, TxOption } from "./types"; import { ethers, Signer } from "ethers"; import { AxelarQueryAPI } from "./AxelarQueryAPI"; import { EncodeObject, OfflineDirectSigner } from "@cosmjs/proto-signing"; import { StdFee } from "@cosmjs/stargate"; interface GetDepositAddressOptions { /** @deprecated Ignored. */ _traceId?: string; /** @deprecated Native unwrap deposit addresses are not supported. */ shouldUnwrapIntoNative?: boolean; refundAddress?: string; erc20DepositAddressType?: "network" | "offline"; } interface EVMSendTokenOptions { signer: Signer; provider: ethers.providers.Provider; txOptions?: TxOption; approveSendForMe?: boolean; } export type PopulateTransactionParams = SendTokenParams | undefined; interface CosmosSendTokenOptions { cosmosDirectSigner: OfflineDirectSigner; rpcUrl: string; timeoutHeight?: any; timeoutTimestamp?: number | undefined; fee: StdFee | "auto" | number; } interface GetDepositAddressParams { fromChain: string; toChain: string; destinationAddress: string; asset: string; options?: GetDepositAddressOptions; } export interface SendTokenParams { fromChain: string; toChain: string; destinationAddress: string; asset: { denom?: string; symbol?: string; }; amountInAtomicUnits: string; options?: { evmOptions?: EVMSendTokenOptions; cosmosOptions?: CosmosSendTokenOptions; }; } export declare class AxelarAssetTransfer { readonly environment: Environment; readonly axelarQueryApi: AxelarQueryAPI; private evmDenomMap; private staticInfo; private chains; constructor(config: AxelarAssetTransferConfig); /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ get resourceUrl(): string; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ get api(): RestService; /** @deprecated Throws: the deposit service is decommissioned. */ get depositServiceApi(): RestService; /** @deprecated Throws: the deposit service is decommissioned. */ getDepositAddressForNativeWrap(fromChain: string, toChain: string, destinationAddress: string, refundAddress?: string): Promise; /** @deprecated Throws: native unwrap depends on the decommissioned nest-server deposit-address API. */ getDepositAddressForNativeUnwrap(fromChain: string, toChain: string, destinationAddress: string, fromChainModule?: "evm" | "axelarnet", refundAddress?: string): Promise; /** @deprecated Throws: the deposit service is decommissioned. */ getOfflineDepositAddressForERC20Transfer(fromChain: string, toChain: string, destinationAddress: string, fromChainModule: "evm" | "axelarnet" | undefined, tokenSymbol: string, refundAddress?: string): Promise; /** @deprecated Throws: the deposit service is decommissioned. */ getDepositAddressFromRemote(type: "erc20" | "wrap" | "unwrap", fromChain: string | undefined, toChain: string | undefined, destinationAddress: string, refundAddress: string, hexSalt: string, tokenSymbol?: string | undefined): Promise<{ address: string; }>; /** @deprecated Throws: the deposit service that processes these addresses is decommissioned. */ validateOfflineDepositAddress(wrapOrUnWrap: "wrap" | "unwrap", fromChain: string, toChain: string, destinationAddress: string, refundAddress: string, hexSalt: string): Promise; /** * @param {Object} requestParams * @param {string} requestParams.fromChain - Source chain identifier eg: avalanche, moonbeam ethereum-2, terra-2 ... * @param {string} requestParams.toChain - Destination chain identifier eg: avalanche, moonbeam ethereum-2, terra-2 ... * @param {string} requestParams.destinationAddress - Address where the asset should be transferred to on the destination chain * @param {Object} requestParams.options */ sendToken(requestParams: SendTokenParams): Promise; sendTokenFromEvmChain(requestParams: SendTokenParams): Promise; private getChains; sendTokenFromCosmosChain(requestParams: SendTokenParams): Promise; populateUnsignedTx(): { sendToken: (params: SendTokenParams) => Promise; getTx(): EncodeObject[]; }; private generateUnsignedSendTokenTx; /** * @deprecated Rejects on every path: the nest-server deposit-address API and the deposit service are decommissioned. * @param {Object} requestParams * @param {string} requestParams.fromChain - Source chain identifier eg: avalanche, moonbeam ethereum-2, terra-2 ... * @param {string} requestParams.toChain - Destination chain identifier eg: avalanche, moonbeam ethereum-2, terra-2 ... * @param {string} requestParams.destinationAddress - Address where the asset should be transferred to on the destination chain * @param {string} requestParams.asset - Asset denomination eg: uausdc, uaxl ... If the asset specific is native cxy (e.g. ETH, AVAX, etc), the ERC20 version of the asset will appear on the dest chain * @param {Object} requestParams.options * @param {boolean} requestParams.options.shouldUnwrapIntoNative - when sending wrapped native asset back to its home chain (e.g. WETH back to Ethereum), specify "true" to receive native ETH; otherwise will received ERC20 version * @param {string} requestParams.options.refundAddress - recipient where funds can be refunded if wrong ERC20 asset is deposited; ONLY AVAILABLE FOR WRAP/UNWRAP SERVICE */ getDepositAddress(requestParamsOrFromChain: GetDepositAddressParams | string, _toChain?: string, _destinationAddress?: string, _asset?: string, _options?: GetDepositAddressOptions): Promise; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ getOneTimeCode(signerAddress: string, traceId: string): Promise; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ getInitRoomId(fromChain: string, toChain: string, destinationAddress: string, asset: string, publicAddress: string, signature: string, traceId: string): Promise; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ getLinkEvent(roomId: string, sourceChain: string, destinationChain: string, destinationAddress: string): Promise; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ getSocketService(): SocketService; /** @deprecated Throws: the nest-server deposit-address API is decommissioned. */ extractDepositAddress(roomId: string): any; getERC20Denom(chainId: string): Promise; getStaticInfo(): Promise>; } export {}; //# sourceMappingURL=AxelarAssetTransfer.d.ts.map