UNPKG

@orca-so/wavebreak

Version:

The wavebreak JS client for interacting with the wavebreak program.

50 lines (49 loc) 1.66 kB
import { Address, Codec, Decoder, Encoder, ReadonlyUint8Array } from '@solana/kit'; import { WhirlpoolRewardInfo, WhirlpoolRewardInfoArgs } from '.'; export type Whirlpool = { discriminator: ReadonlyUint8Array; whirlpoolConfig: Address; whirlpoolBump: number; tickSpacing: number; feeTierIndex: number; 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>; }; export type WhirlpoolArgs = { discriminator: ReadonlyUint8Array; whirlpoolConfig: Address; whirlpoolBump: number; tickSpacing: number; feeTierIndex: number; 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>; }; export declare function getWhirlpoolEncoder(): Encoder<WhirlpoolArgs>; export declare function getWhirlpoolDecoder(): Decoder<Whirlpool>; export declare function getWhirlpoolCodec(): Codec<WhirlpoolArgs, Whirlpool>;