/// import { Contracts } from '../lib/Contracts'; import { Address, BigNumberable, CallOptions, SendOptions, TxResult, ZeroExSwapResponse } from '../types'; export declare class Exchange { protected contracts: Contracts; constructor(contracts: Contracts); getAddress(): string; getProxyDepositAddress(): string; register({ ethAddress, starkKey, signature, }: { ethAddress: Address; starkKey: string; signature: string; }, options?: SendOptions): Promise; registerAndDeposit({ ethAddress, starkKey, signature, positionId, humanAmount, }: { ethAddress: Address; starkKey: string; signature: string; positionId: BigNumberable; humanAmount: BigNumberable; }, options?: SendOptions): Promise; deposit({ starkKey, positionId, humanAmount, }: { starkKey: string; positionId: BigNumberable; humanAmount: BigNumberable; }, options?: SendOptions): Promise; proxyDeposit({ humanAmount, starkKey, positionId, registerUserSignature, }: { humanAmount: string; starkKey: string; positionId: BigNumberable; registerUserSignature?: Buffer; }, options?: SendOptions): Promise; proxyDepositERC20({ humanMinUsdcAmount, starkKey, positionId, zeroExResponseObject, registerUserSignature, getTokenApproval, getExchangeApproval, }: { humanMinUsdcAmount: string; starkKey: string; positionId: BigNumberable; zeroExResponseObject: ZeroExSwapResponse; registerUserSignature?: Buffer; getTokenApproval?: boolean; getExchangeApproval?: boolean; }, options?: SendOptions): Promise; proxyDepositEth({ humanMinUsdcAmount, starkKey, positionId, zeroExResponseObject, registerUserSignature, }: { humanMinUsdcAmount: string; starkKey: string; positionId: BigNumberable; zeroExResponseObject: ZeroExSwapResponse; registerUserSignature?: Buffer; }, options?: SendOptions): Promise; /** * @description get expected and worst USDC for some amount of input sellToken. * @notice For eth pass in 'ETH' as the sellToken. */ estimateConversionAmount({ humanSellAmount, sellToken, decimals, slippagePercentage, zeroExApiKey, }: { humanSellAmount: string; sellToken: string; decimals: number; slippagePercentage?: string; zeroExApiKey: string; }): Promise<{ expectedUsdcHumanAmount: string; worstUsdcHumanAmount: string; zeroExResponseObject: ZeroExSwapResponse; }>; withdraw({ starkKey, }: { starkKey: string; }, options?: SendOptions): Promise; withdrawTo({ starkKey, recipient, }: { starkKey: string; recipient: Address; }, options?: SendOptions): Promise; forcedWithdrawalRequest({ starkKey, positionId, humanAmount, premiumCost, }: { starkKey: string; positionId: BigNumberable; humanAmount: BigNumberable; premiumCost: boolean; }, options?: SendOptions): Promise; setERC20Allowance({ tokenAddress, address, amount, }: { tokenAddress: Address; address: Address; amount: BigNumberable; }, options?: CallOptions): Promise; getEthKey({ starkKey, }: { starkKey: string; }, options?: CallOptions): Promise; getWithdrawalBalance({ starkKey, }: { starkKey: string; }, options?: CallOptions): Promise; hasCancellationRequest({ starkKey, vaultId, }: { starkKey: string; vaultId: BigNumberable; }, options?: CallOptions): Promise; hasForcedWithdrawalRequest({ starkKey, positionId, humanAmount, }: { starkKey: string; positionId: BigNumberable; humanAmount: BigNumberable; }, options?: CallOptions): Promise; hasForcedTradeRequest({ starkKeyA, starkKeyB, positionIdA, positionIdB, collateralId, syntheticId, amountCollateral, amountSynthetic, aIsBuyingSynthetic, nonce, }: { starkKeyA: string; starkKeyB: string; positionIdA: BigNumberable; positionIdB: BigNumberable; collateralId: string; syntheticId: string; amountCollateral: string; amountSynthetic: string; aIsBuyingSynthetic: boolean; nonce: string; }, options?: CallOptions): Promise; getERC20Allowance({ ownerAddress, spenderAddress, tokenAddress, decimals, }: { ownerAddress: Address; spenderAddress: Address; tokenAddress: Address; decimals: number; }, options?: CallOptions): Promise; private encodeZeroExExchangeData; }