import { Contract, Signer } from "ethers-6"; import { IChainInfo, ITransferExt } from "../types"; export declare const CrossAddressTypes: { "0x01": string; "0x02": string; "0x03": string; }; export declare class CrossAddress { private contractAddress; private provider; private signer; private networkId; private providerNetworkId?; constructor(signer: Signer, fromChainInfo: IChainInfo, contractAddress?: string); checkNetworkId(): Promise; /** * @param {Contract} contractErc20 */ getAllowance(contractErc20: Contract, contractAddress?: string): Promise; approveERC20(tokenAddress: string, amount: BigInt, contractAddress?: string): Promise; transfer(to: string, amount: string, ext: ITransferExt): Promise<{ hash: string; }>; /** * * @param {string} tokenAddress 0x... * @param {string} to * @param {ethers.BigNumber} amount * @param {{type: string, value: string} | undefined} ext * @return {Promise<{hash: string}>} */ transferERC20(tokenAddress: string, to: string, amount: BigInt, ext?: ITransferExt): Promise<{ hash: string; }>; contractApprove(tokenAddress: string, amount: BigInt, contractAddress?: string): Promise; static encodeExt(ext?: ITransferExt): string; static fix0xPadStartAddress(address: string, length: number): string; /** * * @param {string} hex * @returns {{type: string, value: string} | undefined} */ static decodeExt(hex: string): { type: string; value: string; } | undefined; /** * @param {string} input 0x... */ static parseTransferInput(input: string): { to: any; ext: { type: string; value: string; } | undefined; }; } //# sourceMappingURL=crossAddress.d.ts.map