@orca-so/whirlpools-client
Version:
Typescript client to interact with Orca's on-chain Whirlpool program.
856 lines (821 loc) • 527 kB
TypeScript
import * as _solana_kit from '@solana/kit';
import { ReadonlyUint8Array, Address, FixedSizeEncoder, FixedSizeDecoder, FixedSizeCodec, EncodedAccount, Account, MaybeEncodedAccount, MaybeAccount, fetchEncodedAccount, FetchAccountConfig, fetchEncodedAccounts, FetchAccountsConfig, GetDiscriminatedUnionVariantContent, GetDiscriminatedUnionVariant, Encoder, Decoder, Codec, SolanaError, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, AccountMeta, Instruction, InstructionWithData, InstructionWithAccounts, WritableAccount, ReadonlyAccount, ReadonlySignerAccount, AccountSignerMeta, TransactionSigner, Option, OptionOrNullable, WritableSignerAccount, GetProgramAccountsMemcmpFilter, Rpc, GetProgramAccountsApi, ProgramDerivedAddress } from '@solana/kit';
declare const ADAPTIVE_FEE_TIER_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getAdaptiveFeeTierDiscriminatorBytes(): ReadonlyUint8Array;
type AdaptiveFeeTier = {
discriminator: ReadonlyUint8Array;
whirlpoolsConfig: Address;
feeTierIndex: number;
tickSpacing: number;
initializePoolAuthority: Address;
delegatedFeeAuthority: Address;
defaultBaseFeeRate: number;
filterPeriod: number;
decayPeriod: number;
reductionFactor: number;
adaptiveFeeControlFactor: number;
maxVolatilityAccumulator: number;
tickGroupSize: number;
majorSwapThresholdTicks: number;
};
type AdaptiveFeeTierArgs = {
whirlpoolsConfig: Address;
feeTierIndex: number;
tickSpacing: number;
initializePoolAuthority: Address;
delegatedFeeAuthority: Address;
defaultBaseFeeRate: number;
filterPeriod: number;
decayPeriod: number;
reductionFactor: number;
adaptiveFeeControlFactor: number;
maxVolatilityAccumulator: number;
tickGroupSize: number;
majorSwapThresholdTicks: number;
};
declare function getAdaptiveFeeTierEncoder(): FixedSizeEncoder<AdaptiveFeeTierArgs>;
declare function getAdaptiveFeeTierDecoder(): FixedSizeDecoder<AdaptiveFeeTier>;
declare function getAdaptiveFeeTierCodec(): FixedSizeCodec<AdaptiveFeeTierArgs, AdaptiveFeeTier>;
declare function decodeAdaptiveFeeTier<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<AdaptiveFeeTier, TAddress>;
declare function decodeAdaptiveFeeTier<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<AdaptiveFeeTier, TAddress>;
declare function fetchAdaptiveFeeTier<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<AdaptiveFeeTier, TAddress>>;
declare function fetchMaybeAdaptiveFeeTier<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<AdaptiveFeeTier, TAddress>>;
declare function fetchAllAdaptiveFeeTier(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<AdaptiveFeeTier>[]>;
declare function fetchAllMaybeAdaptiveFeeTier(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<AdaptiveFeeTier>[]>;
declare function getAdaptiveFeeTierSize(): number;
declare enum AccountsType {
TransferHookA = 0,
TransferHookB = 1,
TransferHookReward = 2,
TransferHookInput = 3,
TransferHookIntermediate = 4,
TransferHookOutput = 5,
SupplementalTickArrays = 6,
SupplementalTickArraysOne = 7,
SupplementalTickArraysTwo = 8,
TransferHookDepositA = 9,
TransferHookDepositB = 10,
TransferHookWithdrawalA = 11,
TransferHookWithdrawalB = 12
}
type AccountsTypeArgs = AccountsType;
declare function getAccountsTypeEncoder(): FixedSizeEncoder<AccountsTypeArgs>;
declare function getAccountsTypeDecoder(): FixedSizeDecoder<AccountsType>;
declare function getAccountsTypeCodec(): FixedSizeCodec<AccountsTypeArgs, AccountsType>;
type AdaptiveFeeConstants = {
filterPeriod: number;
decayPeriod: number;
reductionFactor: number;
adaptiveFeeControlFactor: number;
maxVolatilityAccumulator: number;
tickGroupSize: number;
majorSwapThresholdTicks: number;
reserved: ReadonlyUint8Array;
};
type AdaptiveFeeConstantsArgs = AdaptiveFeeConstants;
declare function getAdaptiveFeeConstantsEncoder(): FixedSizeEncoder<AdaptiveFeeConstantsArgs>;
declare function getAdaptiveFeeConstantsDecoder(): FixedSizeDecoder<AdaptiveFeeConstants>;
declare function getAdaptiveFeeConstantsCodec(): FixedSizeCodec<AdaptiveFeeConstantsArgs, AdaptiveFeeConstants>;
type AdaptiveFeeVariables = {
lastReferenceUpdateTimestamp: bigint;
lastMajorSwapTimestamp: bigint;
volatilityReference: number;
tickGroupIndexReference: number;
volatilityAccumulator: number;
reserved: ReadonlyUint8Array;
};
type AdaptiveFeeVariablesArgs = {
lastReferenceUpdateTimestamp: number | bigint;
lastMajorSwapTimestamp: number | bigint;
volatilityReference: number;
tickGroupIndexReference: number;
volatilityAccumulator: number;
reserved: ReadonlyUint8Array;
};
declare function getAdaptiveFeeVariablesEncoder(): FixedSizeEncoder<AdaptiveFeeVariablesArgs>;
declare function getAdaptiveFeeVariablesDecoder(): FixedSizeDecoder<AdaptiveFeeVariables>;
declare function getAdaptiveFeeVariablesCodec(): FixedSizeCodec<AdaptiveFeeVariablesArgs, AdaptiveFeeVariables>;
type ConfigFeatureFlag = {
__kind: 'TokenBadge';
fields: readonly [boolean];
};
type ConfigFeatureFlagArgs = ConfigFeatureFlag;
declare function getConfigFeatureFlagEncoder(): FixedSizeEncoder<ConfigFeatureFlagArgs>;
declare function getConfigFeatureFlagDecoder(): FixedSizeDecoder<ConfigFeatureFlag>;
declare function getConfigFeatureFlagCodec(): FixedSizeCodec<ConfigFeatureFlagArgs, ConfigFeatureFlag>;
declare function configFeatureFlag(kind: 'TokenBadge', data: GetDiscriminatedUnionVariantContent<ConfigFeatureFlagArgs, '__kind', 'TokenBadge'>['fields']): GetDiscriminatedUnionVariant<ConfigFeatureFlagArgs, '__kind', 'TokenBadge'>;
declare function isConfigFeatureFlag<K extends ConfigFeatureFlag['__kind']>(kind: K, value: ConfigFeatureFlag): value is ConfigFeatureFlag & {
__kind: K;
};
type DynamicTick = {
__kind: 'Uninitialized';
} | {
__kind: 'Initialized';
fields: readonly [DynamicTickData];
};
type DynamicTickArgs = {
__kind: 'Uninitialized';
} | {
__kind: 'Initialized';
fields: readonly [DynamicTickDataArgs];
};
declare function getDynamicTickEncoder(): Encoder<DynamicTickArgs>;
declare function getDynamicTickDecoder(): Decoder<DynamicTick>;
declare function getDynamicTickCodec(): Codec<DynamicTickArgs, DynamicTick>;
declare function dynamicTick(kind: 'Uninitialized'): GetDiscriminatedUnionVariant<DynamicTickArgs, '__kind', 'Uninitialized'>;
declare function dynamicTick(kind: 'Initialized', data: GetDiscriminatedUnionVariantContent<DynamicTickArgs, '__kind', 'Initialized'>['fields']): GetDiscriminatedUnionVariant<DynamicTickArgs, '__kind', 'Initialized'>;
declare function isDynamicTick<K extends DynamicTick['__kind']>(kind: K, value: DynamicTick): value is DynamicTick & {
__kind: K;
};
type DynamicTickData = {
liquidityNet: bigint;
liquidityGross: bigint;
feeGrowthOutsideA: bigint;
feeGrowthOutsideB: bigint;
rewardGrowthsOutside: Array<bigint>;
};
type DynamicTickDataArgs = {
liquidityNet: number | bigint;
liquidityGross: number | bigint;
feeGrowthOutsideA: number | bigint;
feeGrowthOutsideB: number | bigint;
rewardGrowthsOutside: Array<number | bigint>;
};
declare function getDynamicTickDataEncoder(): FixedSizeEncoder<DynamicTickDataArgs>;
declare function getDynamicTickDataDecoder(): FixedSizeDecoder<DynamicTickData>;
declare function getDynamicTickDataCodec(): FixedSizeCodec<DynamicTickDataArgs, DynamicTickData>;
type IncreaseLiquidityMethod = {
__kind: 'ByTokenAmounts';
tokenMaxA: bigint;
tokenMaxB: bigint;
minSqrtPrice: bigint;
maxSqrtPrice: bigint;
};
type IncreaseLiquidityMethodArgs = {
__kind: 'ByTokenAmounts';
tokenMaxA: number | bigint;
tokenMaxB: number | bigint;
minSqrtPrice: number | bigint;
maxSqrtPrice: number | bigint;
};
declare function getIncreaseLiquidityMethodEncoder(): FixedSizeEncoder<IncreaseLiquidityMethodArgs>;
declare function getIncreaseLiquidityMethodDecoder(): FixedSizeDecoder<IncreaseLiquidityMethod>;
declare function getIncreaseLiquidityMethodCodec(): FixedSizeCodec<IncreaseLiquidityMethodArgs, IncreaseLiquidityMethod>;
declare function increaseLiquidityMethod(kind: 'ByTokenAmounts', data: GetDiscriminatedUnionVariantContent<IncreaseLiquidityMethodArgs, '__kind', 'ByTokenAmounts'>): GetDiscriminatedUnionVariant<IncreaseLiquidityMethodArgs, '__kind', 'ByTokenAmounts'>;
declare function isIncreaseLiquidityMethod<K extends IncreaseLiquidityMethod['__kind']>(kind: K, value: IncreaseLiquidityMethod): value is IncreaseLiquidityMethod & {
__kind: K;
};
type LiquidityDecreased = {
whirlpool: Address;
position: Address;
tickLowerIndex: number;
tickUpperIndex: number;
liquidity: bigint;
tokenAAmount: bigint;
tokenBAmount: bigint;
tokenATransferFee: bigint;
tokenBTransferFee: bigint;
};
type LiquidityDecreasedArgs = {
whirlpool: Address;
position: Address;
tickLowerIndex: number;
tickUpperIndex: number;
liquidity: number | bigint;
tokenAAmount: number | bigint;
tokenBAmount: number | bigint;
tokenATransferFee: number | bigint;
tokenBTransferFee: number | bigint;
};
declare function getLiquidityDecreasedEncoder(): FixedSizeEncoder<LiquidityDecreasedArgs>;
declare function getLiquidityDecreasedDecoder(): FixedSizeDecoder<LiquidityDecreased>;
declare function getLiquidityDecreasedCodec(): FixedSizeCodec<LiquidityDecreasedArgs, LiquidityDecreased>;
type LiquidityIncreased = {
whirlpool: Address;
position: Address;
tickLowerIndex: number;
tickUpperIndex: number;
liquidity: bigint;
tokenAAmount: bigint;
tokenBAmount: bigint;
tokenATransferFee: bigint;
tokenBTransferFee: bigint;
};
type LiquidityIncreasedArgs = {
whirlpool: Address;
position: Address;
tickLowerIndex: number;
tickUpperIndex: number;
liquidity: number | bigint;
tokenAAmount: number | bigint;
tokenBAmount: number | bigint;
tokenATransferFee: number | bigint;
tokenBTransferFee: number | bigint;
};
declare function getLiquidityIncreasedEncoder(): FixedSizeEncoder<LiquidityIncreasedArgs>;
declare function getLiquidityIncreasedDecoder(): FixedSizeDecoder<LiquidityIncreased>;
declare function getLiquidityIncreasedCodec(): FixedSizeCodec<LiquidityIncreasedArgs, LiquidityIncreased>;
type LiquidityRepositioned = {
whirlpool: Address;
position: Address;
existingRangeTickLowerIndex: number;
existingRangeTickUpperIndex: number;
newRangeTickLowerIndex: number;
newRangeTickUpperIndex: number;
existingRangeLiquidity: bigint;
newRangeLiquidity: bigint;
existingRangeTokenAAmount: bigint;
existingRangeTokenBAmount: bigint;
newRangeTokenAAmount: bigint;
newRangeTokenBAmount: bigint;
tokenATransferAmount: bigint;
tokenATransferFee: bigint;
isTokenATransferFromOwner: boolean;
tokenBTransferAmount: bigint;
tokenBTransferFee: bigint;
isTokenBTransferFromOwner: boolean;
};
type LiquidityRepositionedArgs = {
whirlpool: Address;
position: Address;
existingRangeTickLowerIndex: number;
existingRangeTickUpperIndex: number;
newRangeTickLowerIndex: number;
newRangeTickUpperIndex: number;
existingRangeLiquidity: number | bigint;
newRangeLiquidity: number | bigint;
existingRangeTokenAAmount: number | bigint;
existingRangeTokenBAmount: number | bigint;
newRangeTokenAAmount: number | bigint;
newRangeTokenBAmount: number | bigint;
tokenATransferAmount: number | bigint;
tokenATransferFee: number | bigint;
isTokenATransferFromOwner: boolean;
tokenBTransferAmount: number | bigint;
tokenBTransferFee: number | bigint;
isTokenBTransferFromOwner: boolean;
};
declare function getLiquidityRepositionedEncoder(): FixedSizeEncoder<LiquidityRepositionedArgs>;
declare function getLiquidityRepositionedDecoder(): FixedSizeDecoder<LiquidityRepositioned>;
declare function getLiquidityRepositionedCodec(): FixedSizeCodec<LiquidityRepositionedArgs, LiquidityRepositioned>;
declare enum LockType {
Permanent = 0
}
type LockTypeArgs = LockType;
declare function getLockTypeEncoder(): FixedSizeEncoder<LockTypeArgs>;
declare function getLockTypeDecoder(): FixedSizeDecoder<LockType>;
declare function getLockTypeCodec(): FixedSizeCodec<LockTypeArgs, LockType>;
declare enum LockTypeLabel {
Permanent = 0
}
type LockTypeLabelArgs = LockTypeLabel;
declare function getLockTypeLabelEncoder(): FixedSizeEncoder<LockTypeLabelArgs>;
declare function getLockTypeLabelDecoder(): FixedSizeDecoder<LockTypeLabel>;
declare function getLockTypeLabelCodec(): FixedSizeCodec<LockTypeLabelArgs, LockTypeLabel>;
type PoolInitialized = {
whirlpool: Address;
whirlpoolsConfig: Address;
tokenMintA: Address;
tokenMintB: Address;
tickSpacing: number;
tokenProgramA: Address;
tokenProgramB: Address;
decimalsA: number;
decimalsB: number;
initialSqrtPrice: bigint;
};
type PoolInitializedArgs = {
whirlpool: Address;
whirlpoolsConfig: Address;
tokenMintA: Address;
tokenMintB: Address;
tickSpacing: number;
tokenProgramA: Address;
tokenProgramB: Address;
decimalsA: number;
decimalsB: number;
initialSqrtPrice: number | bigint;
};
declare function getPoolInitializedEncoder(): FixedSizeEncoder<PoolInitializedArgs>;
declare function getPoolInitializedDecoder(): FixedSizeDecoder<PoolInitialized>;
declare function getPoolInitializedCodec(): FixedSizeCodec<PoolInitializedArgs, PoolInitialized>;
type PositionOpened = {
whirlpool: Address;
position: Address;
tickLowerIndex: number;
tickUpperIndex: number;
};
type PositionOpenedArgs = PositionOpened;
declare function getPositionOpenedEncoder(): FixedSizeEncoder<PositionOpenedArgs>;
declare function getPositionOpenedDecoder(): FixedSizeDecoder<PositionOpened>;
declare function getPositionOpenedCodec(): FixedSizeCodec<PositionOpenedArgs, PositionOpened>;
type PositionRewardInfo = {
growthInsideCheckpoint: bigint;
amountOwed: bigint;
};
type PositionRewardInfoArgs = {
growthInsideCheckpoint: number | bigint;
amountOwed: number | bigint;
};
declare function getPositionRewardInfoEncoder(): FixedSizeEncoder<PositionRewardInfoArgs>;
declare function getPositionRewardInfoDecoder(): FixedSizeDecoder<PositionRewardInfo>;
declare function getPositionRewardInfoCodec(): FixedSizeCodec<PositionRewardInfoArgs, PositionRewardInfo>;
type RemainingAccountsInfo = {
slices: Array<RemainingAccountsSlice>;
};
type RemainingAccountsInfoArgs = {
slices: Array<RemainingAccountsSliceArgs>;
};
declare function getRemainingAccountsInfoEncoder(): Encoder<RemainingAccountsInfoArgs>;
declare function getRemainingAccountsInfoDecoder(): Decoder<RemainingAccountsInfo>;
declare function getRemainingAccountsInfoCodec(): Codec<RemainingAccountsInfoArgs, RemainingAccountsInfo>;
type RemainingAccountsSlice = {
accountsType: AccountsType;
length: number;
};
type RemainingAccountsSliceArgs = {
accountsType: AccountsTypeArgs;
length: number;
};
declare function getRemainingAccountsSliceEncoder(): FixedSizeEncoder<RemainingAccountsSliceArgs>;
declare function getRemainingAccountsSliceDecoder(): FixedSizeDecoder<RemainingAccountsSlice>;
declare function getRemainingAccountsSliceCodec(): FixedSizeCodec<RemainingAccountsSliceArgs, RemainingAccountsSlice>;
type RepositionLiquidityMethod = {
__kind: 'ByLiquidity';
newLiquidityAmount: bigint;
existingRangeTokenMinA: bigint;
existingRangeTokenMinB: bigint;
newRangeTokenMaxA: bigint;
newRangeTokenMaxB: bigint;
};
type RepositionLiquidityMethodArgs = {
__kind: 'ByLiquidity';
newLiquidityAmount: number | bigint;
existingRangeTokenMinA: number | bigint;
existingRangeTokenMinB: number | bigint;
newRangeTokenMaxA: number | bigint;
newRangeTokenMaxB: number | bigint;
};
declare function getRepositionLiquidityMethodEncoder(): FixedSizeEncoder<RepositionLiquidityMethodArgs>;
declare function getRepositionLiquidityMethodDecoder(): FixedSizeDecoder<RepositionLiquidityMethod>;
declare function getRepositionLiquidityMethodCodec(): FixedSizeCodec<RepositionLiquidityMethodArgs, RepositionLiquidityMethod>;
declare function repositionLiquidityMethod(kind: 'ByLiquidity', data: GetDiscriminatedUnionVariantContent<RepositionLiquidityMethodArgs, '__kind', 'ByLiquidity'>): GetDiscriminatedUnionVariant<RepositionLiquidityMethodArgs, '__kind', 'ByLiquidity'>;
declare function isRepositionLiquidityMethod<K extends RepositionLiquidityMethod['__kind']>(kind: K, value: RepositionLiquidityMethod): value is RepositionLiquidityMethod & {
__kind: K;
};
type Tick = {
initialized: boolean;
liquidityNet: bigint;
liquidityGross: bigint;
feeGrowthOutsideA: bigint;
feeGrowthOutsideB: bigint;
rewardGrowthsOutside: Array<bigint>;
};
type TickArgs = {
initialized: boolean;
liquidityNet: number | bigint;
liquidityGross: number | bigint;
feeGrowthOutsideA: number | bigint;
feeGrowthOutsideB: number | bigint;
rewardGrowthsOutside: Array<number | bigint>;
};
declare function getTickEncoder(): FixedSizeEncoder<TickArgs>;
declare function getTickDecoder(): FixedSizeDecoder<Tick>;
declare function getTickCodec(): FixedSizeCodec<TickArgs, Tick>;
type TokenBadgeAttribute = {
__kind: 'RequireNonTransferablePosition';
fields: readonly [boolean];
};
type TokenBadgeAttributeArgs = TokenBadgeAttribute;
declare function getTokenBadgeAttributeEncoder(): FixedSizeEncoder<TokenBadgeAttributeArgs>;
declare function getTokenBadgeAttributeDecoder(): FixedSizeDecoder<TokenBadgeAttribute>;
declare function getTokenBadgeAttributeCodec(): FixedSizeCodec<TokenBadgeAttributeArgs, TokenBadgeAttribute>;
declare function tokenBadgeAttribute(kind: 'RequireNonTransferablePosition', data: GetDiscriminatedUnionVariantContent<TokenBadgeAttributeArgs, '__kind', 'RequireNonTransferablePosition'>['fields']): GetDiscriminatedUnionVariant<TokenBadgeAttributeArgs, '__kind', 'RequireNonTransferablePosition'>;
declare function isTokenBadgeAttribute<K extends TokenBadgeAttribute['__kind']>(kind: K, value: TokenBadgeAttribute): value is TokenBadgeAttribute & {
__kind: K;
};
type Traded = {
whirlpool: Address;
aToB: boolean;
preSqrtPrice: bigint;
postSqrtPrice: bigint;
inputAmount: bigint;
outputAmount: bigint;
inputTransferFee: bigint;
outputTransferFee: bigint;
lpFee: bigint;
protocolFee: bigint;
};
type TradedArgs = {
whirlpool: Address;
aToB: boolean;
preSqrtPrice: number | bigint;
postSqrtPrice: number | bigint;
inputAmount: number | bigint;
outputAmount: number | bigint;
inputTransferFee: number | bigint;
outputTransferFee: number | bigint;
lpFee: number | bigint;
protocolFee: number | bigint;
};
declare function getTradedEncoder(): FixedSizeEncoder<TradedArgs>;
declare function getTradedDecoder(): FixedSizeDecoder<Traded>;
declare function getTradedCodec(): FixedSizeCodec<TradedArgs, Traded>;
type WhirlpoolRewardInfo = {
mint: Address;
vault: Address;
extension: ReadonlyUint8Array;
emissionsPerSecondX64: bigint;
growthGlobalX64: bigint;
};
type WhirlpoolRewardInfoArgs = {
mint: Address;
vault: Address;
extension: ReadonlyUint8Array;
emissionsPerSecondX64: number | bigint;
growthGlobalX64: number | bigint;
};
declare function getWhirlpoolRewardInfoEncoder(): FixedSizeEncoder<WhirlpoolRewardInfoArgs>;
declare function getWhirlpoolRewardInfoDecoder(): FixedSizeDecoder<WhirlpoolRewardInfo>;
declare function getWhirlpoolRewardInfoCodec(): FixedSizeCodec<WhirlpoolRewardInfoArgs, WhirlpoolRewardInfo>;
declare const DYNAMIC_TICK_ARRAY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getDynamicTickArrayDiscriminatorBytes(): ReadonlyUint8Array;
type DynamicTickArray = {
discriminator: ReadonlyUint8Array;
startTickIndex: number;
whirlpool: Address;
tickBitmap: bigint;
ticks: Array<DynamicTick>;
};
type DynamicTickArrayArgs = {
startTickIndex: number;
whirlpool: Address;
tickBitmap: number | bigint;
ticks: Array<DynamicTickArgs>;
};
declare function getDynamicTickArrayEncoder(): Encoder<DynamicTickArrayArgs>;
declare function getDynamicTickArrayDecoder(): Decoder<DynamicTickArray>;
declare function getDynamicTickArrayCodec(): Codec<DynamicTickArrayArgs, DynamicTickArray>;
declare function decodeDynamicTickArray<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<DynamicTickArray, TAddress>;
declare function decodeDynamicTickArray<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<DynamicTickArray, TAddress>;
declare function fetchDynamicTickArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<DynamicTickArray, TAddress>>;
declare function fetchMaybeDynamicTickArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<DynamicTickArray, TAddress>>;
declare function fetchAllDynamicTickArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<DynamicTickArray>[]>;
declare function fetchAllMaybeDynamicTickArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<DynamicTickArray>[]>;
declare const FEE_TIER_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getFeeTierDiscriminatorBytes(): ReadonlyUint8Array;
type FeeTier = {
discriminator: ReadonlyUint8Array;
whirlpoolsConfig: Address;
tickSpacing: number;
defaultFeeRate: number;
};
type FeeTierArgs = {
whirlpoolsConfig: Address;
tickSpacing: number;
defaultFeeRate: number;
};
declare function getFeeTierEncoder(): FixedSizeEncoder<FeeTierArgs>;
declare function getFeeTierDecoder(): FixedSizeDecoder<FeeTier>;
declare function getFeeTierCodec(): FixedSizeCodec<FeeTierArgs, FeeTier>;
declare function decodeFeeTier<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<FeeTier, TAddress>;
declare function decodeFeeTier<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<FeeTier, TAddress>;
declare function fetchFeeTier<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<FeeTier, TAddress>>;
declare function fetchMaybeFeeTier<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<FeeTier, TAddress>>;
declare function fetchAllFeeTier(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<FeeTier>[]>;
declare function fetchAllMaybeFeeTier(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<FeeTier>[]>;
declare function getFeeTierSize(): number;
declare const FIXED_TICK_ARRAY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getFixedTickArrayDiscriminatorBytes(): ReadonlyUint8Array;
type FixedTickArray = {
discriminator: ReadonlyUint8Array;
startTickIndex: number;
ticks: Array<Tick>;
whirlpool: Address;
};
type FixedTickArrayArgs = {
startTickIndex: number;
ticks: Array<TickArgs>;
whirlpool: Address;
};
declare function getFixedTickArrayEncoder(): FixedSizeEncoder<FixedTickArrayArgs>;
declare function getFixedTickArrayDecoder(): FixedSizeDecoder<FixedTickArray>;
declare function getFixedTickArrayCodec(): FixedSizeCodec<FixedTickArrayArgs, FixedTickArray>;
declare function decodeFixedTickArray<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<FixedTickArray, TAddress>;
declare function decodeFixedTickArray<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<FixedTickArray, TAddress>;
declare function fetchFixedTickArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<FixedTickArray, TAddress>>;
declare function fetchMaybeFixedTickArray<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<FixedTickArray, TAddress>>;
declare function fetchAllFixedTickArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<FixedTickArray>[]>;
declare function fetchAllMaybeFixedTickArray(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<FixedTickArray>[]>;
declare function getFixedTickArraySize(): number;
declare const LOCK_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getLockConfigDiscriminatorBytes(): ReadonlyUint8Array;
type LockConfig = {
discriminator: ReadonlyUint8Array;
position: Address;
positionOwner: Address;
whirlpool: Address;
lockedTimestamp: bigint;
lockType: LockTypeLabel;
};
type LockConfigArgs = {
position: Address;
positionOwner: Address;
whirlpool: Address;
lockedTimestamp: number | bigint;
lockType: LockTypeLabelArgs;
};
declare function getLockConfigEncoder(): FixedSizeEncoder<LockConfigArgs>;
declare function getLockConfigDecoder(): FixedSizeDecoder<LockConfig>;
declare function getLockConfigCodec(): FixedSizeCodec<LockConfigArgs, LockConfig>;
declare function decodeLockConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<LockConfig, TAddress>;
declare function decodeLockConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<LockConfig, TAddress>;
declare function fetchLockConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<LockConfig, TAddress>>;
declare function fetchMaybeLockConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<LockConfig, TAddress>>;
declare function fetchAllLockConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<LockConfig>[]>;
declare function fetchAllMaybeLockConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<LockConfig>[]>;
declare function getLockConfigSize(): number;
declare const ORACLE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getOracleDiscriminatorBytes(): ReadonlyUint8Array;
type Oracle = {
discriminator: ReadonlyUint8Array;
whirlpool: Address;
tradeEnableTimestamp: bigint;
adaptiveFeeConstants: AdaptiveFeeConstants;
adaptiveFeeVariables: AdaptiveFeeVariables;
reserved: ReadonlyUint8Array;
};
type OracleArgs = {
whirlpool: Address;
tradeEnableTimestamp: number | bigint;
adaptiveFeeConstants: AdaptiveFeeConstantsArgs;
adaptiveFeeVariables: AdaptiveFeeVariablesArgs;
reserved: ReadonlyUint8Array;
};
declare function getOracleEncoder(): FixedSizeEncoder<OracleArgs>;
declare function getOracleDecoder(): FixedSizeDecoder<Oracle>;
declare function getOracleCodec(): FixedSizeCodec<OracleArgs, Oracle>;
declare function decodeOracle<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Oracle, TAddress>;
declare function decodeOracle<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Oracle, TAddress>;
declare function fetchOracle<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Oracle, TAddress>>;
declare function fetchMaybeOracle<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Oracle, TAddress>>;
declare function fetchAllOracle(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Oracle>[]>;
declare function fetchAllMaybeOracle(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Oracle>[]>;
declare function getOracleSize(): number;
declare const POSITION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getPositionDiscriminatorBytes(): ReadonlyUint8Array;
type Position = {
discriminator: ReadonlyUint8Array;
whirlpool: Address;
positionMint: Address;
liquidity: bigint;
tickLowerIndex: number;
tickUpperIndex: number;
feeGrowthCheckpointA: bigint;
feeOwedA: bigint;
feeGrowthCheckpointB: bigint;
feeOwedB: bigint;
rewardInfos: Array<PositionRewardInfo>;
};
type PositionArgs = {
whirlpool: Address;
positionMint: Address;
liquidity: number | bigint;
tickLowerIndex: number;
tickUpperIndex: number;
feeGrowthCheckpointA: number | bigint;
feeOwedA: number | bigint;
feeGrowthCheckpointB: number | bigint;
feeOwedB: number | bigint;
rewardInfos: Array<PositionRewardInfoArgs>;
};
declare function getPositionEncoder(): FixedSizeEncoder<PositionArgs>;
declare function getPositionDecoder(): FixedSizeDecoder<Position>;
declare function getPositionCodec(): FixedSizeCodec<PositionArgs, Position>;
declare function decodePosition<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Position, TAddress>;
declare function decodePosition<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Position, TAddress>;
declare function fetchPosition<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Position, TAddress>>;
declare function fetchMaybePosition<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Position, TAddress>>;
declare function fetchAllPosition(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Position>[]>;
declare function fetchAllMaybePosition(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Position>[]>;
declare function getPositionSize(): number;
declare const POSITION_BUNDLE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getPositionBundleDiscriminatorBytes(): ReadonlyUint8Array;
type PositionBundle = {
discriminator: ReadonlyUint8Array;
positionBundleMint: Address;
positionBitmap: ReadonlyUint8Array;
};
type PositionBundleArgs = {
positionBundleMint: Address;
positionBitmap: ReadonlyUint8Array;
};
declare function getPositionBundleEncoder(): FixedSizeEncoder<PositionBundleArgs>;
declare function getPositionBundleDecoder(): FixedSizeDecoder<PositionBundle>;
declare function getPositionBundleCodec(): FixedSizeCodec<PositionBundleArgs, PositionBundle>;
declare function decodePositionBundle<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<PositionBundle, TAddress>;
declare function decodePositionBundle<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<PositionBundle, TAddress>;
declare function fetchPositionBundle<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<PositionBundle, TAddress>>;
declare function fetchMaybePositionBundle<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<PositionBundle, TAddress>>;
declare function fetchAllPositionBundle(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<PositionBundle>[]>;
declare function fetchAllMaybePositionBundle(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<PositionBundle>[]>;
declare function getPositionBundleSize(): number;
declare const TOKEN_BADGE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getTokenBadgeDiscriminatorBytes(): ReadonlyUint8Array;
type TokenBadge = {
discriminator: ReadonlyUint8Array;
whirlpoolsConfig: Address;
tokenMint: Address;
attributeRequireNonTransferablePosition: boolean;
};
type TokenBadgeArgs = {
whirlpoolsConfig: Address;
tokenMint: Address;
attributeRequireNonTransferablePosition: boolean;
};
declare function getTokenBadgeEncoder(): FixedSizeEncoder<TokenBadgeArgs>;
declare function getTokenBadgeDecoder(): FixedSizeDecoder<TokenBadge>;
declare function getTokenBadgeCodec(): FixedSizeCodec<TokenBadgeArgs, TokenBadge>;
declare function decodeTokenBadge<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<TokenBadge, TAddress>;
declare function decodeTokenBadge<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<TokenBadge, TAddress>;
declare function fetchTokenBadge<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<TokenBadge, TAddress>>;
declare function fetchMaybeTokenBadge<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<TokenBadge, TAddress>>;
declare function fetchAllTokenBadge(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<TokenBadge>[]>;
declare function fetchAllMaybeTokenBadge(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<TokenBadge>[]>;
declare function getTokenBadgeSize(): number;
declare const WHIRLPOOL_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getWhirlpoolDiscriminatorBytes(): ReadonlyUint8Array;
type Whirlpool = {
discriminator: ReadonlyUint8Array;
whirlpoolsConfig: Address;
whirlpoolBump: ReadonlyUint8Array;
tickSpacing: number;
feeTierIndexSeed: ReadonlyUint8Array;
feeRate: number;
protocolFeeRate: number;
liquidity: bigint;
sqrtPrice: bigint;
tickCurrentIndex: number;
protocolFeeOwedA: bigint;
protocolFeeOwedB: bigint;
tokenMintA: Address;
tokenVaultA: Address;
feeGrowthGlobalA: bigint;
tokenMintB: Address;
tokenVaultB: Address;
feeGrowthGlobalB: bigint;
rewardLastUpdatedTimestamp: bigint;
rewardInfos: Array<WhirlpoolRewardInfo>;
};
type WhirlpoolArgs = {
whirlpoolsConfig: Address;
whirlpoolBump: ReadonlyUint8Array;
tickSpacing: number;
feeTierIndexSeed: ReadonlyUint8Array;
feeRate: number;
protocolFeeRate: number;
liquidity: number | bigint;
sqrtPrice: number | bigint;
tickCurrentIndex: number;
protocolFeeOwedA: number | bigint;
protocolFeeOwedB: number | bigint;
tokenMintA: Address;
tokenVaultA: Address;
feeGrowthGlobalA: number | bigint;
tokenMintB: Address;
tokenVaultB: Address;
feeGrowthGlobalB: number | bigint;
rewardLastUpdatedTimestamp: number | bigint;
rewardInfos: Array<WhirlpoolRewardInfoArgs>;
};
declare function getWhirlpoolEncoder(): FixedSizeEncoder<WhirlpoolArgs>;
declare function getWhirlpoolDecoder(): FixedSizeDecoder<Whirlpool>;
declare function getWhirlpoolCodec(): FixedSizeCodec<WhirlpoolArgs, Whirlpool>;
declare function decodeWhirlpool<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<Whirlpool, TAddress>;
declare function decodeWhirlpool<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<Whirlpool, TAddress>;
declare function fetchWhirlpool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<Whirlpool, TAddress>>;
declare function fetchMaybeWhirlpool<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<Whirlpool, TAddress>>;
declare function fetchAllWhirlpool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<Whirlpool>[]>;
declare function fetchAllMaybeWhirlpool(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<Whirlpool>[]>;
declare function getWhirlpoolSize(): number;
declare const WHIRLPOOLS_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getWhirlpoolsConfigDiscriminatorBytes(): ReadonlyUint8Array;
type WhirlpoolsConfig = {
discriminator: ReadonlyUint8Array;
feeAuthority: Address;
collectProtocolFeesAuthority: Address;
rewardEmissionsSuperAuthority: Address;
defaultProtocolFeeRate: number;
featureFlags: number;
};
type WhirlpoolsConfigArgs = {
feeAuthority: Address;
collectProtocolFeesAuthority: Address;
rewardEmissionsSuperAuthority: Address;
defaultProtocolFeeRate: number;
featureFlags: number;
};
declare function getWhirlpoolsConfigEncoder(): FixedSizeEncoder<WhirlpoolsConfigArgs>;
declare function getWhirlpoolsConfigDecoder(): FixedSizeDecoder<WhirlpoolsConfig>;
declare function getWhirlpoolsConfigCodec(): FixedSizeCodec<WhirlpoolsConfigArgs, WhirlpoolsConfig>;
declare function decodeWhirlpoolsConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<WhirlpoolsConfig, TAddress>;
declare function decodeWhirlpoolsConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<WhirlpoolsConfig, TAddress>;
declare function fetchWhirlpoolsConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<WhirlpoolsConfig, TAddress>>;
declare function fetchMaybeWhirlpoolsConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<WhirlpoolsConfig, TAddress>>;
declare function fetchAllWhirlpoolsConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<WhirlpoolsConfig>[]>;
declare function fetchAllMaybeWhirlpoolsConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<WhirlpoolsConfig>[]>;
declare function getWhirlpoolsConfigSize(): number;
declare const WHIRLPOOLS_CONFIG_EXTENSION_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
declare function getWhirlpoolsConfigExtensionDiscriminatorBytes(): ReadonlyUint8Array;
type WhirlpoolsConfigExtension = {
discriminator: ReadonlyUint8Array;
whirlpoolsConfig: Address;
configExtensionAuthority: Address;
tokenBadgeAuthority: Address;
};
type WhirlpoolsConfigExtensionArgs = {
whirlpoolsConfig: Address;
configExtensionAuthority: Address;
tokenBadgeAuthority: Address;
};
declare function getWhirlpoolsConfigExtensionEncoder(): FixedSizeEncoder<WhirlpoolsConfigExtensionArgs>;
declare function getWhirlpoolsConfigExtensionDecoder(): FixedSizeDecoder<WhirlpoolsConfigExtension>;
declare function getWhirlpoolsConfigExtensionCodec(): FixedSizeCodec<WhirlpoolsConfigExtensionArgs, WhirlpoolsConfigExtension>;
declare function decodeWhirlpoolsConfigExtension<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<WhirlpoolsConfigExtension, TAddress>;
declare function decodeWhirlpoolsConfigExtension<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<WhirlpoolsConfigExtension, TAddress>;
declare function fetchWhirlpoolsConfigExtension<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<WhirlpoolsConfigExtension, TAddress>>;
declare function fetchMaybeWhirlpoolsConfigExtension<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<WhirlpoolsConfigExtension, TAddress>>;
declare function fetchAllWhirlpoolsConfigExtension(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<WhirlpoolsConfigExtension>[]>;
declare function fetchAllMaybeWhirlpoolsConfigExtension(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<WhirlpoolsConfigExtension>[]>;
declare function getWhirlpoolsConfigExtensionSize(): number;
declare const WHIRLPOOL_ERROR__INVALID_ENUM = 6000;
declare const WHIRLPOOL_ERROR__INVALID_START_TICK = 6001;
declare const WHIRLPOOL_ERROR__TICK_ARRAY_EXIST_IN_POOL = 6002;
declare const WHIRLPOOL_ERROR__TICK_ARRAY_INDEX_OUTOF_BOUNDS = 6003;
declare const WHIRLPOOL_ERROR__INVALID_TICK_SPACING = 6004;
declare const WHIRLPOOL_ERROR__CLOSE_POSITION_NOT_EMPTY = 6005;
declare const WHIRLPOOL_ERROR__DIVIDE_BY_ZERO = 6006;
declare const WHIRLPOOL_ERROR__NUMBER_CAST_ERROR = 6007;
declare const WHIRLPOOL_ERROR__NUMBER_DOWN_CAST_ERROR = 6008;
declare const WHIRLPOOL_ERROR__TICK_NOT_FOUND = 6009;
declare const WHIRLPOOL_ERROR__INVALID_TICK_INDEX = 6010;
declare const WHIRLPOOL_ERROR__SQRT_PRICE_OUT_OF_BOUNDS = 6011;
declare const WHIRLPOOL_ERROR__LIQUIDITY_ZERO = 6012;
declare const WHIRLPOOL_ERROR__LIQUIDITY_TOO_HIGH = 6013;
declare const WHIRLPOOL_ERROR__LIQUIDITY_OVERFLOW = 6014;
declare const WHIRLPOOL_ERROR__LIQUIDITY_UNDERFLOW = 6015;
declare const WHIRLPOOL_ERROR__LIQUIDITY_NET_ERROR = 6016;
declare const WHIRLPOOL_ERROR__TOKEN_MAX_EXCEEDED = 6017;
declare const WHIRLPOOL_ERROR__TOKEN_MIN_SUBCEEDED = 6018;
declare const WHIRLPOOL_ERROR__MISSING_OR_INVALID_DELEGATE = 6019;
declare const WHIRLPOOL_ERROR__INVALID_POSITION_TOKEN_AMOUNT = 6020;
declare const WHIRLPOOL_ERROR__INVALID_TIMESTAMP_CONVERSION = 6021;
declare const WHIRLPOOL_ERROR__INVALID_TIMESTAMP = 6022;
declare const WHIRLPOOL_ERROR__INVALID_TICK_ARRAY_SEQUENCE = 6023;
declare const WHIRLPOOL_ERROR__INVALID_TOKEN_MINT_ORDER = 6024;
declare const WHIRLPOOL_ERROR__REWARD_NOT_INITIALIZED = 6025;
declare const WHIRLPOOL_ERROR__INVALID_REWARD_INDEX = 6026;
declare const WHIRLPOOL_ERROR__REWARD_VAULT_AMOUNT_INSUFFICIENT = 6027;
declare const WHIRLPOOL_ERROR__FEE_RATE_MAX_EXCEEDED = 6028;
declare const WHIRLPOOL_ERROR__PROTOCOL_FEE_RATE_MAX_EXCEEDED = 6029;
declare const WHIRLPOOL_ERROR__MULTIPLICATION_SHIFT_RIGHT_OVERFLOW = 6030;
declare const WHIRLPOOL_ERROR__MUL_DIV_OVERFLOW = 6031;
declare const WHIRLPOOL_ERROR__MUL_DIV_INVALID_INPUT = 6032;
declare const WHIRLPOOL_ERROR__MULTIPLICATION_OVERFLOW = 6033;
declare const WHIRLPOOL_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION = 6034;
declare const WHIRLPOOL_ERROR__ZERO_TRADABLE_AMOUNT = 6035;
declare const WHIRLPOOL_ERROR__AMOUNT_OUT_BELOW_MINIMUM = 6036;
declare const WHIRLPOOL_ERROR__AMOUNT_IN_ABOVE_MAXIMUM = 6037;
declare const WHIRLPOOL_ERROR__TICK_ARRAY_SEQUENCE_INVALID_INDEX = 6038;
declare const WHIRLPOOL_ERROR__AMOUNT_CALC_OVERFLOW = 6039;
declare const WHIRLPOOL_ERROR__AMOUNT_REMAINING_OVERFLOW = 6040;
declare const WHIRLPOOL_ERROR__INVALID_INTERMEDIARY_MINT = 6041;
declare const WHIRLPOOL_ERROR__DUPLICATE_TWO_HOP_POOL = 6042;
declare const WHIRLPOOL_ERROR__INVALID_BUNDLE_INDEX = 6043;
declare const WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_OPENED = 6044;
declare const WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_CLOSED = 6045;
declare const WHIRLPOOL_ERROR__POSITION_BUNDLE_NOT_DELETABLE = 6046;
declare const WHIRLPOOL_ERROR__UNSUPPORTED_TOKEN_MINT = 6047;
declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE = 6048;
declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT = 6049;
declare const WHIRLPOOL_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK = 6050;
declare const WHIRLPOOL_ERROR__INTERMEDIATE_TOKEN_AMOUNT_MISMATCH = 6051;
declare const WHIRLPOOL_ERROR__TRANSFER_FEE_CALCULATION_ERROR = 6052;
declare const WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE = 6053;
declare const WHIRLPOOL_ERROR__FULL_RANGE_ONLY_POOL = 6054;
declare const WHIRLPOOL_ERROR__TOO_MANY_SUPPLEMENTAL_TICK_ARRAYS = 6055;
declare const WHIRLPOOL_ERROR__DIFFERENT_WHIRLPOOL_TICK_ARRAY_ACCOUNT = 6056;
declare const WHIRLPOOL_ERROR__PARTIAL_FILL_ERROR = 6057;
declare const WHIRLPOOL_ERROR__POSITION_NOT_LOCKABLE = 6058;
declare const WHIRLPOOL_ERROR__OPERATION_NOT_ALLOWED_ON_LOCKED_POSITION = 6059;
declare const WHIRLPOOL_ERROR__SAME_TICK_RANGE_NOT_ALLOWED = 6060;
declare const WHIRLPOOL_ERROR__INVALID_ADAPTIVE_FEE_CONSTANTS = 6061;
declare const WHIRLPOOL_ERROR__INVALID_FEE_TIER_INDEX = 6062;
declare const WHIRLPOOL_ERROR__INVALID_TRADE_ENABLE_TIMESTAMP = 6063;
declare const WHIRLPOOL_ERROR__TRADE_IS_NOT_ENABLED = 6064;
declare const WHIRLPOOL_ERROR__RENT_CALCULATION_ERROR = 6065;
declare const WHIRLPOOL_ERROR__FEATURE_IS_NOT_ENABLED = 6066;
declare const WHIRLPOOL_ERROR__POSITION_WITH_TOKEN_EXTENSIONS_REQUIRED = 6067;
declare const WHIRLPOOL_ERROR__ADAPTIVE_FEE_CONSTANTS_UNCHANGED = 6068;
declare const WHIRLPOOL_ERROR__PRICE_SLIPPAGE_OUT_OF_BOUNDS = 6069;
type WhirlpoolError = typeof WHIRLPOOL_ERROR__ADAPTIVE_FEE_CONSTANTS_UNCHANGED | typeof WHIRLPOOL_ERROR__AMOUNT_CALC_OVERFLOW | typeof WHIRLPOOL_ERROR__AMOUNT_IN_ABOVE_MAXIMUM | typeof WHIRLPOOL_ERROR__AMOUNT_OUT_BELOW_MINIMUM | typeof WHIRLPOOL_ERROR__AMOUNT_REMAINING_OVERFLOW | typeof WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_CLOSED | typeof WHIRLPOOL_ERROR__BUNDLED_POSITION_ALREADY_OPENED | typeof WHIRLPOOL_ERROR__CLOSE_POSITION_NOT_EMPTY | typeof WHIRLPOOL_ERROR__DIFFERENT_WHIRLPOOL_TICK_ARRAY_ACCOUNT | typeof WHIRLPOOL_ERROR__DIVIDE_BY_ZERO | typeof WHIRLPOOL_ERROR__DUPLICATE_TWO_HOP_POOL | typeof WHIRLPOOL_ERROR__FEATURE_IS_NOT_ENABLED | typeof WHIRLPOOL_ERROR__FEE_RATE_MAX_EXCEEDED | typeof WHIRLPOOL_ERROR__FULL_RANGE_ONLY_POOL | typeof WHIRLPOOL_ERROR__INTERMEDIATE_TOKEN_AMOUNT_MISMATCH | typeof WHIRLPOOL_ERROR__INVALID_ADAPTIVE_FEE_CONSTANTS | typeof WHIRLPOOL_ERROR__INVALID_BUNDLE_INDEX | typeof WHIRLPOOL_ERROR__INVALID_ENUM | typeof WHIRLPOOL_ERROR__INVALID_FEE_TIER_INDEX | typeof WHIRLPOOL_ERROR__INVALID_INTERMEDIARY_MINT | typeof WHIRLPOOL_ERROR__INVALID_POSITION_TOKEN_AMOUNT | typeof WHIRLPOOL_ERROR__INVALID_REWARD_INDEX | typeof WHIRLPOOL_ERROR__INVALID_SQRT_PRICE_LIMIT_DIRECTION | typeof WHIRLPOOL_ERROR__INVALID_START_TICK | typeof WHIRLPOOL_ERROR__INVALID_TICK_ARRAY_SEQUENCE | typeof WHIRLPOOL_ERROR__INVALID_TICK_INDEX | typeof WHIRLPOOL_ERROR__INVALID_TICK_SPACING | typeof WHIRLPOOL_ERROR__INVALID_TIMESTAMP | typeof WHIRLPOOL_ERROR__INVALID_TIMESTAMP_CONVERSION | typeof WHIRLPOOL_ERROR__INVALID_TOKEN_MINT_ORDER | typeof WHIRLPOOL_ERROR__INVALID_TRADE_ENABLE_TIMESTAMP | typeof WHIRLPOOL_ERROR__LIQUIDITY_NET_ERROR | typeof WHIRLPOOL_ERROR__LIQUIDITY_OVERFLOW | typeof WHIRLPOOL_ERROR__LIQUIDITY_TOO_HIGH | typeof WHIRLPOOL_ERROR__LIQUIDITY_UNDERFLOW | typeof WHIRLPOOL_ERROR__LIQUIDITY_ZERO | typeof WHIRLPOOL_ERROR__MISSING_OR_INVALID_DELEGATE | typeof WHIRLPOOL_ERROR__MUL_DIV_INVALID_INPUT | typeof WHIRLPOOL_ERROR__MUL_DIV_OVERFLOW | typeof WHIRLPOOL_ERROR__MULTIPLICATION_OVERFLOW | typeof WHIRLPOOL_ERROR__MULTIPLICATION_SHIFT_RIGHT_OVERFLOW | typeof WHIRLPOOL_ERROR__NO_EXTRA_ACCOUNTS_FOR_TRANSFER_HOOK | typeof WHIRLPOOL_ERROR__NUMBER_CAST_ERROR | typeof WHIRLPOOL_ERROR__NUMBER_DOWN_CAST_ERROR | typeof WHIRLPOOL_ERROR__OPERATION_NOT_ALLOWED_ON_LOCKED_POSITION | typeof WHIRLPOOL_ERROR__PARTIAL_FILL_ERROR | typeof WHIRLPOOL_ERROR__POSITION_BUNDLE_NOT_DELETABLE | typeof WHIRLPOOL_ERROR__POSITION_NOT_LOCKABLE | typeof WHIRLPOOL_ERROR__POSITION_WITH_TOKEN_EXTENSIONS_REQUIRED | typeof WHIRLPOOL_ERROR__PRICE_SLIPPAGE_OUT_OF_BOUNDS | typeof WHIRLPOOL_ERROR__PROTOCOL_FEE_RATE_MAX_EXCEEDED | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_DUPLICATED_ACCOUNTS_TYPE | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INSUFFICIENT | typeof WHIRLPOOL_ERROR__REMAINING_ACCOUNTS_INVALID_SLICE | typeof WHIRLPOOL_ERROR__RENT_CALCULATION_ERROR | typeof WHIRLPOOL_ERROR__REWARD_NOT_INITIALIZED | typeof WHIRLPOOL_ERROR__REWARD_VAULT_AMOUNT_INSUFFICIENT | typeof WHIRLPOOL_ERROR__SAME_TICK_RANGE_NOT_ALLOWED | typeof WHIRLPOOL_ERROR__SQRT_PRICE_OUT_OF_BOUNDS | typeof WHIRLPOOL_ERROR__TICK_ARRAY_EXIST_IN_POOL | typeof WHIRLPOOL_ERROR__TICK_ARRAY_INDEX_OUTOF_BOUNDS | typeof WHIRLPOOL_ERROR__TICK_ARRAY_SEQUENCE_INVALID_INDEX | typeof WHIRLPOOL_ERROR__TIC