evx-sdk
Version:
The Evx SDK is a developer toolkit designed to simplify interaction with the Evx decentralized liquidity protocol. It provides an abstraction layer over the smart contracts, allowing developers to easily build applications, integrate liquidity pools, fetc
1,010 lines (953 loc) • 150 kB
TypeScript
import { IBaseContract as IBaseContract$1 } from './interfaces/contracts/IBaseContract';
import { chains as chains$1 } from '@resources';
import { ChainName as ChainName$1, ContractName as ContractName$1, ChainId as ChainId$1, ChainMetadata as ChainMetadata$1, IBaseQueryParams as IBaseQueryParams$2 } from '@interfaces';
import { Signer, ethers, JsonRpcProvider, BigNumberish } from 'ethers';
import { RPC as RPC$1 } from '@providers';
import { IBurnCommandParams as IBurnCommandParams$1 } from './interfaces/commands/params/IBurnCommandParams';
import { IBaseCommand as IBaseCommand$1 } from './interfaces/commands/IBaseCommand';
import { PositionManagerContract as PositionManagerContract$1, FactoryContract as FactoryContract$1, PairFlashContract as PairFlashContract$1, SwapRouterContract as SwapRouterContract$1, GovernanceContract as GovernanceContract$1, OrderExecutorContract as OrderExecutorContract$1, TickLensContract as TickLensContract$1, PoolContract as PoolContract$1 } from '@contracts';
import { ICollectCommandParams as ICollectCommandParams$1 } from './interfaces/commands/params/ICollectCommandParams';
import { IDecreaseLiquidityCommandParams as IDecreaseLiquidityCommandParams$1 } from './interfaces/commands/params/IDecreaseLiquidityCommandParams';
import { IIncreaseLiquidityCommandParams as IIncreaseLiquidityCommandParams$1 } from './interfaces/commands/params/IIncreaseLiquidityCommandParams';
import { IMintCommandParams as IMintCommandParams$1 } from './interfaces/commands/params/IMintCommandParams';
import { ICreateAndInitializePoolCommandParams as ICreateAndInitializePoolCommandParams$1 } from './interfaces/commands/params/ICreateAndInitializePoolCommandParams';
import { ICreatePoolCommandOutput as ICreatePoolCommandOutput$1 } from './interfaces/commands/outputs/ICreatePoolCommandOutput';
import { ICreatePoolCommandParams as ICreatePoolCommandParams$1 } from './interfaces/commands/params/ICreatePoolCommandParams';
import { IEnableFeeAmountCommandParams as IEnableFeeAmountCommandParams$1 } from './interfaces/commands/params/IEnableFeeAmountCommandParams';
import { IInitializeOnlyPoolCommandParams as IInitializeOnlyPoolCommandParams$1 } from './interfaces/commands/params/IInitializePoolCommandParams';
import { IInitFlashCommandParams as IInitFlashCommandParams$1 } from './interfaces/commands/params/IInitFlashCommandParams';
import { ISwapExactInputCommandParams as ISwapExactInputCommandParams$1 } from './interfaces/commands/params/ISwapExactInputCommandParams';
import { ISwapExactOutputCommandParams as ISwapExactOutputCommandParams$1 } from './interfaces/commands/params/ISwapExactOutputCommandParams';
import { ISwapExactInputSingleCommandParams as ISwapExactInputSingleCommandParams$1 } from './interfaces/commands/params/ISwapExactInputSingleCommandParams';
import { ISwapExactOutputSingleCommandParams as ISwapExactOutputSingleCommandParams$1 } from './interfaces/commands/params/ISwapExactOutputSingleCommandParams';
import { ICancelCommandParams as ICancelCommandParams$1 } from './interfaces/commands/params/ICancelCommandParams';
import { IExecuteCommandParams as IExecuteCommandParams$1 } from './interfaces/commands/params/IExecuteCommandParams';
import { ICastOverrideVoteCommandParams as ICastOverrideVoteCommandParams$1 } from './interfaces/commands/params/ICastOverrideVoteCommandParams';
import { ICastOverrideVoteBySigCommandParams as ICastOverrideVoteBySigCommandParams$1 } from './interfaces/commands/params/ICastOverrideVoteBySigCommandParams';
import { ICastVoteCommandParams as ICastVoteCommandParams$1 } from './interfaces/commands/params/ICastVoteCommandParams';
import { ICastVoteBySigCommandParams as ICastVoteBySigCommandParams$1 } from './interfaces/commands/params/ICastVoteBySigCommandParams';
import { ICastVoteWithReasonCommandParams as ICastVoteWithReasonCommandParams$1 } from './interfaces/commands/params/ICastVoteWithReasonCommandParams';
import { ICastVoteWithReasonAndParamsCommandParams as ICastVoteWithReasonAndParamsCommandParams$1 } from './interfaces/commands/params/ICastVoteWithReasonAndParamsCommandParams';
import { ICastVoteWithReasonAndParamsBySigCommandParams as ICastVoteWithReasonAndParamsBySigCommandParams$1 } from './interfaces/commands/params/ICastVoteWithReasonAndParamsBySigCommandParams';
import { IHashProposalCommandParams as IHashProposalCommandParams$1 } from './interfaces/commands/params/IHashProposalCommandParams';
import { IProposeCommandParams as IProposeCommandParams$1 } from './interfaces/commands/params/IProposeCommandParams';
import { IQueueCommandParams as IQueueCommandParams$1 } from './interfaces/commands/params/IQueueCommandParams';
import { IRelayCommandParams as IRelayCommandParams$1 } from './interfaces/commands/params/IRelayCommandParams';
import { IUpdateQuorumNumeratorCommandParams as IUpdateQuorumNumeratorCommandParams$1 } from './interfaces/commands/params/IUpdateQuorumNumeratorCommandParams';
import { IUpdateTimelockCommandParams as IUpdateTimelockCommandParams$1 } from './interfaces/commands/params/IUpdateTimelockCommandParams';
import { ICreateOrderCommandParams as ICreateOrderCommandParams$1 } from './interfaces/commands/params/ICreateOrderCommandParams';
import { ICreateOrderCommandOutput as ICreateOrderCommandOutput$1 } from './interfaces/commands/outputs/ICreateOrderCommandOutput';
import { ICancelOrderCommandParams as ICancelOrderCommandParams$1 } from './interfaces/commands/params/ICancelOrderCommandParams';
import { ICancelOrderCommandOutput as ICancelOrderCommandOutput$1 } from './interfaces/commands/outputs/ICancelOrderCommandOutput';
import { IRPC as IRPC$1 } from './interfaces/providers/IRPC';
import { IBallotTypeHashQueryParams as IBallotTypeHashQueryParams$1 } from './interfaces/queries/params/IBallotTypeHashQueryParams';
import { IBaseQuery as IBaseQuery$1 } from './interfaces/queries/IBaseQuery';
import { IClockModeQueryParams as IClockModeQueryParams$1 } from './interfaces/queries/params/IClockModeQueryParams';
import { IClockQueryParams as IClockQueryParams$1 } from './interfaces/queries/params/IClockQueryParams';
import { ICountingModeQueryParams as ICountingModeQueryParams$1 } from './interfaces/queries/params/ICountingModeQueryParams';
import { IExtendedBallotTypeHashQueryParams as IExtendedBallotTypeHashQueryParams$1 } from './interfaces/queries/params/IExtendedBallotTypeHashQueryParams';
import { IGetProposalIdQueryParams as IGetProposalIdQueryParams$1 } from './interfaces/queries/params/IGetProposalIdQueryParams';
import { IGetQuorumDenominatorQueryParams as IGetQuorumDenominatorQueryParams$1 } from './interfaces/queries/params/IGetQuorumDenominatorQueryParams';
import { IGetQuorumNumeratorQueryParams as IGetQuorumNumeratorQueryParams$1 } from './interfaces/queries/params/IGetQuorumNumeratorQueryParams';
import { IGetQuorumQueryParams as IGetQuorumQueryParams$1 } from './interfaces/queries/params/IGetQuorumQueryParams';
import { IGetStateQueryParams as IGetStateQueryParams$1 } from './interfaces/queries/params/IGetStateQueryParams';
import { ProposalState } from './enums/ProposalState';
import { IGetVotesQueryParams as IGetVotesQueryParams$1 } from './interfaces/queries/params/IGetVotesQueryParams';
import { IGetVotesWithParamsQueryParams as IGetVotesWithParamsQueryParams$1 } from './interfaces/queries/params/IGetVotesWithParamsQueryParams';
import { IGetVotingDelayQueryParams as IGetVotingDelayQueryParams$1 } from './interfaces/queries/params/IGetVotingDelayQueryParams';
import { IGetVotingPeriodQueryParams as IGetVotingPeriodQueryParams$1 } from './interfaces/queries/params/IGetVotingPeriodQueryParams';
import { IHasVotedQueryParams as IHasVotedQueryParams$1 } from './interfaces/queries/params/IHasVotedQueryParams';
import { IHasVotedOverrideQueryParams as IHasVotedOverrideQueryParams$1 } from './interfaces/queries/params/IHasVotedOverrideQueryParams';
import { IOverrideBallotTypeHashQueryParams as IOverrideBallotTypeHashQueryParams$1 } from './interfaces/queries/params/IOverrideBallotTypeHashQueryParams';
import { IProposalDeadlineQueryParams as IProposalDeadlineQueryParams$1 } from './interfaces/queries/params/IProposalDeadlineQueryParams';
import { IProposalEtaQueryParams as IProposalEtaQueryParams$1 } from './interfaces/queries/params/IProposalEtaQueryParams';
import { IProposalNeedsQueuingQueryParams as IProposalNeedsQueuingQueryParams$1 } from './interfaces/queries/params/IProposalNeedsQueuingQueryParams';
import { IGetProposerQueryParams as IGetProposerQueryParams$1 } from './interfaces/queries/params/IGetProposerQueryParams';
import { IProposalSnapshotQueryParams as IProposalSnapshotQueryParams$1 } from './interfaces/queries/params/IProposalSnapshotQueryParams';
import { IProposalThresholdQueryParams as IProposalThresholdQueryParams$1 } from './interfaces/queries/params/IProposalThresholdQueryParams';
import { IGetProposalVotesQueryParams as IGetProposalVotesQueryParams$1 } from './interfaces/queries/params/IGetProposalVotesQueryParams';
import { IGetProposalVotesResult as IGetProposalVotesResult$1 } from './interfaces/queries/IGetProposalVotesResult';
import { IEip712DomainQueryParams as IEip712DomainQueryParams$1 } from './interfaces/queries/params/IEip712DomainQueryParams';
import { IEip712DomainQueryOutput as IEip712DomainQueryOutput$1 } from './interfaces/queries/outputs/IEip712DomainQueryOutput';
import { INameQueryParams as INameQueryParams$1 } from './interfaces/queries/params/INameQueryParams';
import { IProtocolTokenQueryParams as IProtocolTokenQueryParams$1 } from './interfaces/queries/params/IProtocolTokenQueryParams';
import { INoncesQueryParams as INoncesQueryParams$1 } from './interfaces/queries/params/INoncesQueryParams';
import { ISupportsInterfaceQueryParams as ISupportsInterfaceQueryParams$1 } from './interfaces/queries/params/ISupportsInterfaceQueryParams';
import { ITimelockQueryParams as ITimelockQueryParams$1 } from './interfaces/queries/params/ITimelockQueryParams';
import { ITokenQueryParams as ITokenQueryParams$1 } from './interfaces/queries/params/ITokenQueryParams';
import { IVersionQueryParams as IVersionQueryParams$1 } from './interfaces/queries/params/IVersionQueryParams';
import { IGetPositionParams as IGetPositionParams$1 } from './interfaces/queries/params/IGetPositionParams';
import { IGetPositionOutput as IGetPositionOutput$1 } from './interfaces/queries/outputs/IGetPositionOutput';
import { IGetTokenURIQueryParams as IGetTokenURIQueryParams$1 } from './interfaces/queries/params/IGetTokenURIQueryParams';
import { IGetTokenURIQueryOutput as IGetTokenURIQueryOutput$1 } from './interfaces/queries/outputs/IGetTokenURIQueryOutput';
import { IGetFeeAmountTickSpacingQueryParams as IGetFeeAmountTickSpacingQueryParams$1 } from './interfaces/queries/params/IGetFeeAmountTickSpacingQueryParams';
import { ICheckPoolExistsQueryParams as ICheckPoolExistsQueryParams$1 } from './interfaces/queries/params/ICheckPoolExistsQueryParams';
import { ICheckPoolExistsOutput as ICheckPoolExistsOutput$1 } from './interfaces/queries/outputs/ICheckPoolExistsOutput';
import { IGetPoolOutput as IGetPoolOutput$1 } from './interfaces/queries/outputs/IGetPoolOutput';
import { IGetPoolParams as IGetPoolParams$1 } from './interfaces/queries/params/IGetPoolParams';
import { IGetSlot0QueryParams as IGetSlot0QueryParams$1 } from './interfaces/queries/params/IGetSlot0QueryParams';
import { IGetSlot0Output as IGetSlot0Output$1 } from './interfaces/queries/outputs/IGetSlot0Output';
import { IGetPositionFeeParams as IGetPositionFeeParams$1 } from './interfaces/queries/params/IGetPositionFeeParams';
import { IGetPositionFeeOutput as IGetPositionFeeOutput$1 } from './interfaces/queries/outputs/IGetPositionFeeOutput';
import { IQuoteExactInputQueryParams as IQuoteExactInputQueryParams$1 } from './interfaces/queries/params/IQuoteExactInputQueryParams';
import { IQuoteExactInputOutput as IQuoteExactInputOutput$1 } from './interfaces/queries/outputs/IQuoteExactInputOutput';
import { IQuoteExactInputSingleQueryParams as IQuoteExactInputSingleQueryParams$1 } from './interfaces/queries/params/IQuoteExactInputSingleQueryParams';
import { IQuoteExactInputSingleOutput as IQuoteExactInputSingleOutput$1 } from './interfaces/queries/outputs/IQuoteExactInputSingleOutput';
import { IQuoteExactOutputQueryParams as IQuoteExactOutputQueryParams$1 } from './interfaces/queries/params/IQuoteExactOutputQueryParams';
import { IQuoteExactOutputOutput as IQuoteExactOutputOutput$1 } from './interfaces/queries/outputs/IQuoteExactOutputOutput';
import { IQuoteExactOutputSingleQueryParams as IQuoteExactOutputSingleQueryParams$1 } from './interfaces/queries/params/IQuoteExactOutputSingleQueryParams';
import { IQuoteExactOutputSingleOutput as IQuoteExactOutputSingleOutput$1 } from './interfaces/queries/outputs/IQuoteExactOutputSingleOutput';
import { IGetPopulatedTicksQueryParams as IGetPopulatedTicksQueryParams$1 } from './interfaces/queries/params/IGetPopulatedTicksQueryParams';
import { IGetPopulatedTicksOutput as IGetPopulatedTicksOutput$1 } from './interfaces/queries/outputs/IGetPopulatedTicksOutput';
import { IGetTicksFromPriceRangeQueryParams as IGetTicksFromPriceRangeQueryParams$1 } from './interfaces/queries/params/IGetTicksFromPriceRangeQueryParams';
import { IGetTicksFromPriceRangeOutput as IGetTicksFromPriceRangeOutput$1 } from './interfaces/queries/outputs/IGetTicksFromPriceRangeOutput';
import { ITokenPair as ITokenPair$1 } from './interfaces/utils/ITokenPair';
import { Pool as Pool$1, TradingPath as TradingPath$1, EncodedPath as EncodedPath$1 } from './interfaces/utils';
import { IBaseCommandParams as IBaseCommandParams$1 } from './interfaces/commands/params/IBaseCommandParams';
import { VoteSupport } from './enums/VoteSupport';
import { IBaseQueryParams as IBaseQueryParams$1 } from './interfaces/queries/IBaseQueryParams';
import { IEventListener as IEventListener$1 } from './interfaces/listeners/IEventListener';
import { IPoolCreatedEvent as IPoolCreatedEvent$1 } from './interfaces/events/factory/IPoolCreatedEvent';
import { IFeeAmountEnabledEvent as IFeeAmountEnabledEvent$1 } from './interfaces/events/factory/IFeeAmountEnabledEvent';
import { IProposalCanceledEvent as IProposalCanceledEvent$1 } from './interfaces/events/governance/IProposalCanceledEvent';
import { IProposalCreatedEvent as IProposalCreatedEvent$1 } from './interfaces/events/governance/IProposalCreatedEvent';
import { IProposalExecutedEvent as IProposalExecutedEvent$1 } from './interfaces/events/governance/IProposalExecutedEvent';
import { IProposalQueuedEvent as IProposalQueuedEvent$1 } from './interfaces/events/governance/IProposalQueuedEvent';
import { IQuorumNumeratorUpdatedEvent as IQuorumNumeratorUpdatedEvent$1 } from './interfaces/events/governance/IQuorumNumeratorUpdatedEvent';
import { IVoteCastEvent as IVoteCastEvent$1 } from './interfaces/events/governance/IVoteCastEvent';
import { IVoteCastWithParamsEvent as IVoteCastWithParamsEvent$1 } from './interfaces/events/governance/IVoteCastWithParamsEvent';
import { IVoteReducedEvent as IVoteReducedEvent$1 } from './interfaces/events/governance/IVoteReducedEvent';
import { IOverrideVoteCastEvent as IOverrideVoteCastEvent$1 } from './interfaces/events/governance/IOverrideVoteCastEvent';
import { IBurnEvent as IBurnEvent$1 } from './interfaces/events/pool/IBurnEvent';
import { ICollectEvent as ICollectEvent$1 } from './interfaces/events/pool/ICollectEvent';
import { ICollectProtocolEvent as ICollectProtocolEvent$1 } from './interfaces/events/pool/ICollectProtocolEvent';
import { IFlashEvent as IFlashEvent$1 } from './interfaces/events/pool/IFlashEvent';
import { IIncreaseObservationCardinalityNextEvent as IIncreaseObservationCardinalityNextEvent$1 } from './interfaces/events/pool/IIncreaseObservationCardinalityNextEvent';
import { IInitializeObservationEvent as IInitializeObservationEvent$1 } from './interfaces/events/pool/IInitializeObservationEvent';
import { IMintEvent as IMintEvent$1 } from './interfaces/events/pool/IMintEvent';
import { ISetFeeProtocolEvent as ISetFeeProtocolEvent$1 } from './interfaces/events/pool/ISetFeeProtocolEvent';
import { ISwapEvent as ISwapEvent$1 } from './interfaces/events/pool/ISwapEvent';
import { ICollectPositionEvent as ICollectPositionEvent$1 } from './interfaces/events/positionManager/ICollectPositionEvent';
import { IDecreaseLiquidityEvent as IDecreaseLiquidityEvent$1 } from './interfaces/events/positionManager/IDecreaseLiquidityEvent';
import { IIncreaseLiquidityEvent as IIncreaseLiquidityEvent$1 } from './interfaces/events/positionManager/IIncreaseLiquidityEvent';
/**
* @title Base Contract
* @notice Base class for all contract interactions
* @dev Provides common functionality for contract instances including signer management and chain switching
*/
declare abstract class BaseContract implements IBaseContract$1 {
signer: Signer | null | undefined;
chain: ChainName$1;
instance: ethers.Contract;
name: ContractName$1;
rpc: RPC$1;
abi: any;
/**
* @notice Creates a new contract instance
* @param name The name of the contract
* @param rpc The RPC provider instance
* @param abi The contract ABI
*/
constructor(name: ContractName$1, rpc: RPC$1, abi: any);
/**
* @notice Sets the signer for contract interactions
* @param signer The signer to use for transactions
*/
setSigner(signer?: Signer | null): Promise<void>;
/**
* @notice Sets the chain for contract interactions
* @param chain The chain to use for contract interactions
*/
setChain(chain: keyof typeof chains$1): void;
/**
* @notice Gets the contract address for the current chain
* @returns The contract address
* @throws Error if address is not found for the current chain
*/
getAddress(): string;
}
/**
* @title Factory Contract
* @notice Contract wrapper for Evx Factory interactions
* @dev Provides methods to interact with the factory contract for pool creation
*/
declare class FactoryContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new factory contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Pool Contract
* @notice Contract wrapper for Evx Pool interactions
* @dev Provides methods to interact with a specific pool instance
*/
declare class PoolContract {
instance: ethers.Contract;
rpc: RPC$1;
address: string;
/**
* @notice Creates a new pool contract instance
* @param address The address of the pool contract
*/
constructor(address: string);
/**
* @notice Sets the signer for pool contract interactions
* @param signer The signer to use for transactions
*/
setSigner(signer?: Signer | null): Promise<void>;
}
/**
* @title Position Manager Contract
* @notice Contract wrapper for Evx Position Manager interactions
* @dev Provides methods to interact with the position manager contract for position management
*/
declare class PositionManagerContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new position manager contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Position Lens Contract
* @notice Contract for interacting with the Position Lens contract
* @dev Extends BaseContract to provide position lens functionality
*/
declare class PositionLensContract extends BaseContract {
readonly rpc: RPC$1;
constructor(rpc: RPC$1);
}
/**
* @title Pair Flash Contract
* @notice Contract for handling flash loans
* @dev This contract interacts with the PairFlash contract
*/
declare class PairFlashContract extends BaseContract {
constructor(rpc: RPC$1);
}
/**
* @title SwapRouter Contract
* @notice Contract wrapper for the SwapRouter contract
* @dev Extends BaseContract to provide swap functionality
*/
declare class SwapRouterContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new SwapRouter contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Quoter Contract
* @notice Contract for getting quotes for swaps
* @dev This contract is used to get quotes for swaps without executing them
*/
declare class QuoterContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new Quoter contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Tick Lens Contract
* @notice Contract for getting tick data from pools
* @dev This contract is used to get tick data from pools
*/
declare class TickLensContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new Tick Lens contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Governance Contract
* @notice Contract wrapper for the Governance contract
* @dev Extends BaseContract to provide governance functionality
*/
declare class GovernanceContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new Governance contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title OrderExecutor Contract
* @notice Contract wrapper for the OrderExecutor contract
* @dev Extends BaseContract to provide order creation and execution functionality
*/
declare class OrderExecutorContract extends BaseContract {
readonly rpc: RPC$1;
/**
* @notice Creates a new OrderExecutor contract instance
* @param rpc The RPC provider instance
*/
constructor(rpc: RPC$1);
}
/**
* @title Burn Command
* @notice Burns a position and removes all liquidity
* @dev This command interacts with the PositionManager contract to burn a position
*/
declare class BurnCommand implements IBaseCommand$1<IBurnCommandParams$1, void> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the burn command
* @param params The parameters for burning a position
*/
execute(params: IBurnCommandParams$1): Promise<void>;
}
/**
* @title Collect Command
* @notice Collects fees and rewards from a position
* @dev This command interacts with the PositionManager contract to collect fees
*/
declare class CollectCommand implements IBaseCommand$1<ICollectCommandParams$1, void> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the collect command
* @param params The parameters for collecting fees
*/
execute(params: ICollectCommandParams$1): Promise<void>;
}
/**
* @title Decrease Liquidity Command
* @notice Decreases liquidity from a position
* @dev This command interacts with the PositionManager contract to decrease liquidity
*/
declare class DecreaseLiquidityCommand implements IBaseCommand$1<IDecreaseLiquidityCommandParams$1, void> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the decrease liquidity command
* @param params The parameters for decreasing liquidity
*/
execute(params: IDecreaseLiquidityCommandParams$1): Promise<void>;
}
/**
* @title Increase Liquidity Command
* @notice Increases liquidity for an existing position
* @dev This command interacts with the PositionManager contract to add liquidity
*/
declare class IncreaseLiquidityCommand implements IBaseCommand$1<IIncreaseLiquidityCommandParams$1, void> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the increase liquidity command
* @param params The parameters for increasing liquidity
*/
execute(params: IIncreaseLiquidityCommandParams$1): Promise<void>;
}
/**
* @title Mint Command
* @notice Creates a new position by providing liquidity to a pool
* @dev This command interacts with the PositionManager contract to mint a new position
*/
declare class MintCommand implements IBaseCommand$1<IMintCommandParams$1, void> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the mint command
* @param params The parameters for minting a position
*/
execute(params: IMintCommandParams$1): Promise<void>;
}
/**
* @title Create and Initialize Pool Command
* @notice Creates and initializes a pool if necessary
* @dev This command interacts with the PositionManager contract to create and initialize a pool
*/
declare class CreateAndInitializePoolCommand implements IBaseCommand$1<ICreateAndInitializePoolCommandParams$1, ICreatePoolCommandOutput$1> {
private readonly positionManager;
constructor(positionManager: PositionManagerContract$1);
/**
* @notice Executes the create and initialize pool command
* @param params The parameters for creating and initializing the pool
* @returns The output containing the pool address
*/
execute(params: ICreateAndInitializePoolCommandParams$1): Promise<ICreatePoolCommandOutput$1>;
}
/**
* @title Create Pool Command
* @notice Creates a new pool with the given tokens and fee
* @dev This command interacts with the Factory contract to create a pool
*/
declare class CreatePoolCommand implements IBaseCommand$1<ICreatePoolCommandParams$1, void> {
private readonly factory;
constructor(factory: FactoryContract$1);
/**
* @notice Executes the create pool command
* @param params The parameters for creating the pool
*/
execute(params: ICreatePoolCommandParams$1): Promise<void>;
}
/**
* @title Enable Fee Amount Command
* @notice Enables a fee amount with its corresponding tick spacing
* @dev This command interacts with the Factory contract to enable a fee amount
*/
declare class EnableFeeAmountCommand implements IBaseCommand$1<IEnableFeeAmountCommandParams$1, void> {
private readonly factory;
constructor(factory: FactoryContract$1);
/**
* @notice Executes the enable fee amount command
* @param params The parameters for enabling the fee amount
*/
execute(params: IEnableFeeAmountCommandParams$1): Promise<void>;
}
/**
* @title Initialize Pool Command
* @notice Initializes a pool with the given price
* @dev This command interacts with the PoolContract to initialize the pool
*/
declare class InitializePoolCommand implements IBaseCommand$1<IInitializeOnlyPoolCommandParams$1, void> {
/**
* @notice Executes the initialize pool command
* @param params The parameters for initializing the pool
*/
execute(params: IInitializeOnlyPoolCommandParams$1): Promise<void>;
}
/**
* @title Init Flash Command
* @notice Initializes a flash loan
* @dev This command interacts with the PairFlash contract to initialize a flash loan
*/
declare class InitFlashCommand implements IBaseCommand$1<IInitFlashCommandParams$1, void> {
private readonly pairFlash;
constructor(pairFlash: PairFlashContract$1);
/**
* @notice Executes the init flash command
* @param params The parameters for initializing the flash loan
*/
execute(params: IInitFlashCommandParams$1): Promise<void>;
}
/**
* @title Swap Exact Input Command
* @notice Executes a swap with exact input amount
* @dev This command interacts with the SwapRouter contract to execute a swap
*/
declare class SwapExactInputCommand implements IBaseCommand$1<ISwapExactInputCommandParams$1, void> {
private readonly swapRouter;
constructor(swapRouter: SwapRouterContract$1);
/**
* @notice Executes the swap exact input command
* @param params The parameters for executing the swap
*/
execute(params: ISwapExactInputCommandParams$1): Promise<void>;
}
/**
* @title Swap Exact Output Command
* @notice Executes a swap with exact output amount
* @dev This command interacts with the SwapRouter contract to execute a swap with exact output
*/
declare class SwapExactOutputCommand implements IBaseCommand$1<ISwapExactOutputCommandParams$1, void> {
private readonly swapRouter;
constructor(swapRouter: SwapRouterContract$1);
/**
* @notice Executes the swap exact output command
* @param params The parameters for executing the swap
*/
execute(params: ISwapExactOutputCommandParams$1): Promise<void>;
}
/**
* @title Swap Exact Input Single Command
* @notice Executes a swap with exact input amount for a single hop
* @dev This command interacts with the SwapRouter contract to execute a single hop swap
*/
declare class SwapExactInputSingleCommand implements IBaseCommand$1<ISwapExactInputSingleCommandParams$1, void> {
private readonly swapRouter;
constructor(swapRouter: SwapRouterContract$1);
/**
* @notice Executes the swap exact input single command
* @param params The parameters for executing the swap
*/
execute(params: ISwapExactInputSingleCommandParams$1): Promise<void>;
}
/**
* @title Swap Exact Output Single Command
* @notice Executes a swap with exact output amount for a single hop
* @dev This command interacts with the SwapRouter contract to execute a single hop swap with exact output
*/
declare class SwapExactOutputSingleCommand implements IBaseCommand$1<ISwapExactOutputSingleCommandParams$1, void> {
private readonly swapRouter;
constructor(swapRouter: SwapRouterContract$1);
/**
* @notice Executes the swap exact output single command
* @param params The parameters for executing the swap
*/
execute(params: ISwapExactOutputSingleCommandParams$1): Promise<void>;
}
/**
* @title Cancel Command
* @notice Executes a cancel operation on a governance proposal
* @dev This command interacts with the Governance contract to cancel a proposal
*/
declare class CancelCommand implements IBaseCommand$1<ICancelCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cancel command
* @param params The parameters for executing the cancel operation
*/
execute(params: ICancelCommandParams$1): Promise<void>;
}
/**
* @title Execute Command
* @notice Executes a governance proposal
* @dev This command interacts with the Governance contract to execute a proposal
*/
declare class ExecuteCommand implements IBaseCommand$1<IExecuteCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the execute command
* @param params The parameters for executing the governance proposal
*/
execute(params: IExecuteCommandParams$1): Promise<void>;
}
/**
* @title Cast Override Vote Command
* @notice Executes a cast override vote operation on a governance proposal
* @dev This command interacts with the Governance contract to cast an override vote
*/
declare class CastOverrideVoteCommand implements IBaseCommand$1<ICastOverrideVoteCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast override vote command
* @param params The parameters for executing the cast override vote operation
*/
execute(params: ICastOverrideVoteCommandParams$1): Promise<void>;
}
/**
* @title Cast Override Vote By Signature Command
* @notice Executes a cast override vote by signature operation on a governance proposal
* @dev This command interacts with the Governance contract to cast an override vote using a signature
*/
declare class CastOverrideVoteBySigCommand implements IBaseCommand$1<ICastOverrideVoteBySigCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast override vote by signature command
* @param params The parameters for executing the cast override vote by signature operation
*/
execute(params: ICastOverrideVoteBySigCommandParams$1): Promise<void>;
}
/**
* @title Cast Vote Command
* @notice Executes a cast vote operation on a governance proposal
* @dev This command interacts with the Governance contract to cast a vote
*/
declare class CastVoteCommand implements IBaseCommand$1<ICastVoteCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast vote command
* @param params The parameters for executing the cast vote operation
*/
execute(params: ICastVoteCommandParams$1): Promise<void>;
}
/**
* @title Cast Vote By Sig Command
* @notice Executes a cast vote by signature operation on a governance proposal
* @dev This command interacts with the Governance contract to cast a vote by signature
*/
declare class CastVoteBySigCommand implements IBaseCommand$1<ICastVoteBySigCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast vote by sig command
* @param params The parameters for executing the cast vote by sig operation
*/
execute(params: ICastVoteBySigCommandParams$1): Promise<void>;
}
/**
* @title Cast Vote With Reason Command
* @notice Executes a cast vote with reason operation on a governance proposal
* @dev This command interacts with the Governance contract to cast a vote with a reason
*/
declare class CastVoteWithReasonCommand implements IBaseCommand$1<ICastVoteWithReasonCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast vote with reason command
* @param params The parameters for executing the cast vote with reason operation
*/
execute(params: ICastVoteWithReasonCommandParams$1): Promise<void>;
}
/**
* @title Cast Vote With Reason And Params Command
* @notice Executes a cast vote with reason and params operation on a governance proposal
* @dev This command interacts with the Governance contract to cast a vote with reason and additional parameters
*/
declare class CastVoteWithReasonAndParamsCommand implements IBaseCommand$1<ICastVoteWithReasonAndParamsCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast vote with reason and params command
* @param params The parameters for executing the cast vote with reason and params operation
*/
execute(params: ICastVoteWithReasonAndParamsCommandParams$1): Promise<void>;
}
/**
* @title Cast Vote With Reason And Params By Sig Command
* @notice Executes a cast vote with reason and params by signature operation on a governance proposal
* @dev This command interacts with the Governance contract to cast a vote with reason and additional parameters by signature
*/
declare class CastVoteWithReasonAndParamsBySigCommand implements IBaseCommand$1<ICastVoteWithReasonAndParamsBySigCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the cast vote with reason and params by sig command
* @param params The parameters for executing the cast vote with reason and params by sig operation
*/
execute(params: ICastVoteWithReasonAndParamsBySigCommandParams$1): Promise<void>;
}
/**
* @title Hash Proposal Command
* @notice Executes a hash proposal operation to calculate the proposal ID
* @dev This command interacts with the Governance contract to hash proposal parameters
*/
declare class HashProposalCommand implements IBaseCommand$1<IHashProposalCommandParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the hash proposal command
* @param params The parameters for executing the hash proposal operation
* @returns The calculated proposal ID as a bigint
*/
execute(params: IHashProposalCommandParams$1): Promise<bigint>;
}
/**
* @title Propose Command
* @notice Executes a propose operation on a governance proposal
* @dev This command interacts with the Governance contract to propose a new governance action
*/
declare class ProposeCommand implements IBaseCommand$1<IProposeCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the propose command
* @param params The parameters for executing the propose operation
*/
execute(params: IProposeCommandParams$1): Promise<void>;
}
/**
* @title Queue Command
* @notice Executes a queue operation on a governance proposal
* @dev This command interacts with the Governance contract to queue a proposal for execution
*/
declare class QueueCommand implements IBaseCommand$1<IQueueCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the queue command
* @param params The parameters for executing the queue operation
*/
execute(params: IQueueCommandParams$1): Promise<void>;
}
/**
* @title Relay Command
* @notice Executes a relay operation in governance
* @dev This command interacts with the Governance contract to relay calls to other contracts
*/
declare class RelayCommand implements IBaseCommand$1<IRelayCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the relay command
* @param params The parameters for executing the relay operation
*/
execute(params: IRelayCommandParams$1): Promise<void>;
}
/**
* @title Update Quorum Numerator Command
* @notice Executes an update quorum numerator operation in governance
* @dev This command interacts with the Governance contract to update the quorum numerator
*/
declare class UpdateQuorumNumeratorCommand implements IBaseCommand$1<IUpdateQuorumNumeratorCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the update quorum numerator command
* @param params The parameters for executing the update quorum numerator operation
*/
execute(params: IUpdateQuorumNumeratorCommandParams$1): Promise<void>;
}
/**
* @title Update Timelock Command
* @notice Executes an update timelock operation in governance
* @dev This command interacts with the Governance contract to update the timelock address
*/
declare class UpdateTimelockCommand implements IBaseCommand$1<IUpdateTimelockCommandParams$1, void> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the update timelock command
* @param params The parameters for executing the update timelock operation
*/
execute(params: IUpdateTimelockCommandParams$1): Promise<void>;
}
/**
* @title Create Order Command
* @notice Creates a new order in the OrderExecutor contract
* @dev This command interacts with the OrderExecutor contract to create a new order
*/
declare class CreateOrderCommand implements IBaseCommand$1<ICreateOrderCommandParams$1, ICreateOrderCommandOutput$1> {
private readonly orderExecutor;
constructor(orderExecutor: OrderExecutorContract$1);
/**
* @notice Executes the create order command
* @param params The parameters for creating the order
* @returns The order ID
*/
execute(params: ICreateOrderCommandParams$1): Promise<ICreateOrderCommandOutput$1>;
}
/**
* @title Cancel Order Command
* @notice Cancels an existing order in the OrderExecutor contract
* @dev This command interacts with the OrderExecutor contract to cancel an order
*/
declare class CancelOrderCommand implements IBaseCommand$1<ICancelOrderCommandParams$1, ICancelOrderCommandOutput$1> {
private readonly orderExecutor;
constructor(orderExecutor: OrderExecutorContract$1);
/**
* @notice Executes the cancel order command
* @param params The parameters for canceling the order
* @returns Confirmation that the order was cancelled
*/
execute(params: ICancelOrderCommandParams$1): Promise<ICancelOrderCommandOutput$1>;
}
/**
* @title RPC Provider
* @notice Manages the RPC connection for the SDK
* @dev Provides a singleton instance of JsonRpcProvider for blockchain interactions
*/
declare class RPC implements IRPC$1 {
provider: JsonRpcProvider | null;
/**
* @notice Creates a new RPC provider instance
* @dev Initializes with a default localhost provider
*/
constructor();
/**
* @notice Sets a new RPC provider URL
* @param newRPC The new RPC URL to connect to
*/
setProvider(newRPC: string): void;
}
/**
* @title Ballot Type Hash Query
* @notice Retrieves the ballot type hash from the Governance contract
* @dev Queries the governance contract to get the BALLOT_TYPEHASH for EIP-712 signatures
*/
declare class BallotTypeHashQuery implements IBaseQuery$1<IBallotTypeHashQueryParams$1, string> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the ballot type hash
* @param params The parameters for the query (empty for BALLOT_TYPEHASH function)
* @returns The ballot type hash as a string
*/
execute(_?: IBallotTypeHashQueryParams$1): Promise<string>;
}
/**
* @title Clock Mode Query
* @notice Retrieves the clock mode of the governance contract
* @dev Queries the governance contract to get the clock mode (e.g., "mode=blocknumber&from=default")
*/
declare class ClockModeQuery implements IBaseQuery$1<IClockModeQueryParams$1, string> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the clock mode
* @param params The parameters for the query (empty for CLOCK_MODE function)
* @returns The clock mode as a string
*/
execute(_?: IClockModeQueryParams$1): Promise<string>;
}
/**
* @title Clock Query
* @notice Retrieves the current clock value from the Governance contract
* @dev Queries the governance contract to get the current timepoint/clock value
*/
declare class ClockQuery implements IBaseQuery$1<IClockQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the current clock value
* @param params The parameters for the query (empty for clock function)
* @returns The current clock value as a bigint
*/
execute(_?: IClockQueryParams$1): Promise<bigint>;
}
/**
* @title Counting Mode Query
* @notice Retrieves the counting mode of the governance contract
* @dev Queries the governance contract to get the counting mode (e.g., "=bravo&from=default")
*/
declare class CountingModeQuery implements IBaseQuery$1<ICountingModeQueryParams$1, string> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the counting mode
* @param params The parameters for the query (empty for COUNTING_MODE function)
* @returns The counting mode as a string
*/
execute(_?: ICountingModeQueryParams$1): Promise<string>;
}
/**
* @title Extended Ballot Type Hash Query
* @notice Retrieves the extended ballot type hash from the Governance contract
* @dev Queries the governance contract to get the EXTENDED_BALLOT_TYPEHASH for extended EIP-712 signatures
*/
declare class ExtendedBallotTypeHashQuery implements IBaseQuery$1<IExtendedBallotTypeHashQueryParams$1, string> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the extended ballot type hash
* @param params The parameters for the query (empty for EXTENDED_BALLOT_TYPEHASH function)
* @returns The extended ballot type hash as a string
*/
execute(_?: IExtendedBallotTypeHashQueryParams$1): Promise<string>;
}
/**
* @title Get Proposal ID Query
* @notice Retrieves the proposal ID for given proposal parameters
* @dev Queries the governance contract to calculate the proposal ID from proposal details
*/
declare class GetProposalIdQuery implements IBaseQuery$1<IGetProposalIdQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the proposal ID
* @param params The parameters for the query containing proposal details
* @returns The calculated proposal ID as a bigint
*/
execute(params: IGetProposalIdQueryParams$1): Promise<bigint>;
}
/**
* @title Get Quorum Denominator Query
* @notice Retrieves the quorum denominator
* @dev Queries the governance contract to get the denominator used in quorum calculations
*/
declare class GetQuorumDenominatorQuery implements IBaseQuery$1<IGetQuorumDenominatorQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the quorum denominator
* @param params The parameters for the query (empty for this query)
* @returns The quorum denominator as a bigint
*/
execute(_?: IGetQuorumDenominatorQueryParams$1): Promise<bigint>;
}
/**
* @title Get Quorum Numerator Query
* @notice Retrieves the quorum numerator for a specific timepoint or current
* @dev Queries the governance contract to get the numerator used in quorum calculations
*/
declare class GetQuorumNumeratorQuery implements IBaseQuery$1<IGetQuorumNumeratorQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the quorum numerator
* @param params The parameters for the query containing optional timepoint
* @returns The quorum numerator as a bigint
*/
execute(params: IGetQuorumNumeratorQueryParams$1): Promise<bigint>;
}
/**
* @title Get Quorum Query
* @notice Retrieves the quorum for a specific block number
* @dev Queries the governance contract to get the minimum voting power required for a proposal to pass
*/
declare class GetQuorumQuery implements IBaseQuery$1<IGetQuorumQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the quorum for a specific block number
* @param params The parameters for the query containing block number
* @returns The quorum value as a bigint
*/
execute(params: IGetQuorumQueryParams$1): Promise<bigint>;
}
/**
* @title Get State Query
* @notice Retrieves the current state of a specific proposal
* @dev Queries the governance contract to get the current state of a proposal
*/
declare class GetStateQuery implements IBaseQuery$1<IGetStateQueryParams$1, ProposalState> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the proposal state
* @param params The parameters for the query containing proposal ID
* @returns The proposal state as a ProposalState enum value
*/
execute(params: IGetStateQueryParams$1): Promise<ProposalState>;
}
/**
* @title Get Votes Query
* @notice Retrieves the voting power for a given account at a specific block number
* @dev Queries the governance contract to get the voting power of an account at a historical block
*/
declare class GetVotesQuery implements IBaseQuery$1<IGetVotesQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the voting power
* @param params The parameters for the query containing account address and block number
* @returns The voting power as a bigint
*/
execute(params: IGetVotesQueryParams$1): Promise<bigint>;
}
/**
* @title Get Votes With Params Query
* @notice Retrieves the voting power for a given account at a specific timepoint with additional parameters
* @dev Queries the governance contract to get the voting power of an account at a historical timepoint with custom parameters
*/
declare class GetVotesWithParamsQuery implements IBaseQuery$1<IGetVotesWithParamsQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the voting power with parameters
* @param params The parameters for the query containing account address, timepoint and additional params
* @returns The voting power as a bigint
*/
execute(params: IGetVotesWithParamsQueryParams$1): Promise<bigint>;
}
/**
* @title Get Voting Delay Query
* @notice Retrieves the voting delay
* @dev Queries the governance contract to get the delay between proposal creation and voting start
*/
declare class GetVotingDelayQuery implements IBaseQuery$1<IGetVotingDelayQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceContract$1);
/**
* @notice Executes the query to get the voting delay
* @param params The parameters for the query (empty for this query)
* @returns The voting delay as a bigint
*/
execute(_?: IGetVotingDelayQueryParams$1): Promise<bigint>;
}
/**
* @title Get Voting Period Query
* @notice Retrieves the voting period
* @dev Queries the governance contract to get the duration of the voting period
*/
declare class GetVotingPeriodQuery implements IBaseQuery$1<IGetVotingPeriodQueryParams$1, bigint> {
private readonly governance;
constructor(governance: GovernanceCo