import type { BridgeDepositOptions, BridgeInterface, CompleteBridgeWithdrawOptions, InitiateBridgeWithdrawOptions } from "../../bridge/types/BridgeInterface.js"; import { type Address, Amount, type BridgeDepositFeeEstimation, type EthereumAddress, EthereumBridgeToken, type ExternalAddress, type ExternalTransactionResponse } from "../../types/index.js"; import { type EthereumTokenInterface } from "../../bridge/ethereum/EtherToken.js"; import { type ApprovalFeeEstimation, type EthereumCompleteWithdrawFeeEstimation, type EthereumTransactionDetails, type EthereumWalletConfig } from "../../bridge/ethereum/types.js"; import type { InterfaceAbi } from "ethers"; import { Contract, type ContractTransaction, type ContractTransactionResponse, type TransactionRequest } from "ethers"; import type { WalletInterface } from "../../wallet/index.js"; import type { Tx } from "../../tx/index.js"; import { type Call } from "starknet"; import { Erc20 } from "../../erc20/index.js"; import { type StarkZapLogger } from "../../logger/index.js"; export declare abstract class EthereumBridge implements BridgeInterface { protected readonly bridgeToken: EthereumBridgeToken; protected readonly config: EthereumWalletConfig; readonly starknetWallet: WalletInterface; protected readonly logger: StarkZapLogger; static readonly ALLOWANCE_CACHE_TTL = 60000; static readonly GAS_LIMIT_SAFE_MULTIPLIER = 1.5; private allowanceCache; protected readonly token: EthereumTokenInterface; protected readonly starknetToken: Erc20; protected readonly bridge: Contract; constructor(bridgeToken: EthereumBridgeToken, config: EthereumWalletConfig, starknetWallet: WalletInterface, logger: StarkZapLogger, bridgeAbi?: InterfaceAbi); abstract deposit(recipient: Address, amount: Amount, options?: BridgeDepositOptions): Promise; abstract getDepositFeeEstimate(_options?: BridgeDepositOptions): Promise; getAvailableDepositBalance(account: EthereumAddress): Promise; getAllowance(): Promise; /** * Initiate a withdrawal from Starknet to Ethereum by calling * `initiate_token_withdraw` on the L2 bridge contract. * * The `ExecuteOptions` portion of `options` is forwarded to * `starknetWallet.execute` unchanged; the bridge-internal `fastTransfer` * flag is consumed by protocol-specific overrides (e.g. CCTP fee tier) * and does not affect the Starknet transaction itself. */ initiateWithdraw(recipient: ExternalAddress, amount: Amount, options?: InitiateBridgeWithdrawOptions): Promise; getAvailableWithdrawBalance(account: Address): Promise; completeWithdraw(recipient: ExternalAddress, amount: Amount, _options?: CompleteBridgeWithdrawOptions): Promise; getCompleteWithdrawFeeEstimate(amount: Amount, recipient: ExternalAddress, _options?: CompleteBridgeWithdrawOptions): Promise; protected abstract getAllowanceSpender(): Promise; protected getEthereumGasPrice(): Promise; protected approveSpendingOf(amount: Amount): Promise; protected execute(tx: TransactionRequest): Promise; protected populateTransaction(details: EthereumTransactionDetails): Promise; protected ethAmount(value: bigint): Amount; protected estimateApprovalFee(): Promise; protected estimateEthereumSafeGasLimitForTx(tx: ContractTransaction): Promise; protected clearCachedAllowance(): void; protected buildInitiateWithdrawCall(recipient: string, amount: Amount): Call; protected buildCompleteWithdrawCall(recipient: ExternalAddress, amount: Amount): Promise; private setCachedAllowance; private updateAllowanceFromReceipt; } //# sourceMappingURL=EthereumBridge.d.ts.map