Module orca_whirlpool.internal.accounts.types
Expand source code
import dataclasses
from typing import Optional
from solders.pubkey import Pubkey
from ..anchor.types import WhirlpoolRewardInfo, Tick, PositionRewardInfo
@dataclasses.dataclass(frozen=True)
class WhirlpoolsConfig:
# keyed
pubkey: Pubkey
# WhirlpoolsConfig
fee_authority: Pubkey
collect_protocol_fees_authority: Pubkey
reward_emissions_super_authority: Pubkey
default_protocol_fee_rate: int
@dataclasses.dataclass(frozen=True)
class FeeTier:
# keyed
pubkey: Pubkey
# FeeTier
whirlpools_config: Pubkey
tick_spacing: int
default_fee_rate: int
@dataclasses.dataclass(frozen=True)
class Whirlpool:
# keyed
pubkey: Pubkey
# Whirlpool
whirlpools_config: Pubkey
whirlpool_bump: list[int]
tick_spacing: int
tick_spacing_seed: list[int]
fee_rate: int
protocol_fee_rate: int
liquidity: int
sqrt_price: int
tick_current_index: int
protocol_fee_owed_a: int
protocol_fee_owed_b: int
token_mint_a: Pubkey
token_vault_a: Pubkey
fee_growth_global_a: int
token_mint_b: Pubkey
token_vault_b: Pubkey
fee_growth_global_b: int
reward_last_updated_timestamp: int
reward_infos: list[WhirlpoolRewardInfo]
@dataclasses.dataclass(frozen=True)
class TickArray:
# keyed
pubkey: Pubkey
# TickArray
start_tick_index: int
ticks: list[Tick]
whirlpool: Pubkey
@dataclasses.dataclass(frozen=True)
class Position:
# keyed
pubkey: Pubkey
# Position
whirlpool: Pubkey
position_mint: Pubkey
liquidity: int
tick_lower_index: int
tick_upper_index: int
fee_growth_checkpoint_a: int
fee_owed_a: int
fee_growth_checkpoint_b: int
fee_owed_b: int
reward_infos: list[PositionRewardInfo]
@dataclasses.dataclass(frozen=True)
class PositionBundle:
# keyed
pubkey: Pubkey
# PositionBundle
position_bundle_mint: Pubkey
position_bitmap: list[int]
@dataclasses.dataclass(frozen=True)
class WhirlpoolsConfigExtension:
# keyed
pubkey: Pubkey
# WhirlpoolsConfigExtension
whirlpools_config: Pubkey
config_extension_authority: Pubkey
token_badge_authority: Pubkey
@dataclasses.dataclass(frozen=True)
class TokenBadge:
# keyed
pubkey: Pubkey
# TokenBadge
whirlpools_config: Pubkey
token_mint: Pubkey
@dataclasses.dataclass(frozen=True)
class AccountInfo:
# keyed
pubkey: Pubkey
# token program id
token_program_id: Pubkey
# AccountInfo
mint: Pubkey
owner: Pubkey
amount: int
delegate: Optional[Pubkey]
delegated_amount: int
is_initialized: bool
is_frozen: bool
is_native: bool
close_authority: Optional[Pubkey]
tlv_data: bytes
@dataclasses.dataclass(frozen=True)
class MintInfo:
# keyed
pubkey: Pubkey
# token program id
token_program_id: Pubkey
# MintInfo
mint_authority: Optional[Pubkey]
supply: int
decimals: int
is_initialized: bool
freeze_authority: Optional[Pubkey]
tlv_data: bytes
Classes
class AccountInfo (pubkey: solders.pubkey.Pubkey, token_program_id: solders.pubkey.Pubkey, mint: solders.pubkey.Pubkey, owner: solders.pubkey.Pubkey, amount: int, delegate: Optional[solders.pubkey.Pubkey], delegated_amount: int, is_initialized: bool, is_frozen: bool, is_native: bool, close_authority: Optional[solders.pubkey.Pubkey], tlv_data: bytes)-
AccountInfo(pubkey: solders.pubkey.Pubkey, token_program_id: solders.pubkey.Pubkey, mint: solders.pubkey.Pubkey, owner: solders.pubkey.Pubkey, amount: int, delegate: Optional[solders.pubkey.Pubkey], delegated_amount: int, is_initialized: bool, is_frozen: bool, is_native: bool, close_authority: Optional[solders.pubkey.Pubkey], tlv_data: bytes)
Expand source code
@dataclasses.dataclass(frozen=True) class AccountInfo: # keyed pubkey: Pubkey # token program id token_program_id: Pubkey # AccountInfo mint: Pubkey owner: Pubkey amount: int delegate: Optional[Pubkey] delegated_amount: int is_initialized: bool is_frozen: bool is_native: bool close_authority: Optional[Pubkey] tlv_data: bytesClass variables
var amount : intvar delegate : Optional[solders.pubkey.Pubkey]var delegated_amount : intvar is_frozen : boolvar is_initialized : boolvar is_native : boolvar mint : solders.pubkey.Pubkeyvar owner : solders.pubkey.Pubkeyvar pubkey : solders.pubkey.Pubkeyvar tlv_data : bytesvar token_program_id : solders.pubkey.Pubkey
class FeeTier (pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, tick_spacing: int, default_fee_rate: int)-
FeeTier(pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, tick_spacing: int, default_fee_rate: int)
Expand source code
@dataclasses.dataclass(frozen=True) class FeeTier: # keyed pubkey: Pubkey # FeeTier whirlpools_config: Pubkey tick_spacing: int default_fee_rate: intClass variables
var default_fee_rate : intvar pubkey : solders.pubkey.Pubkeyvar tick_spacing : intvar whirlpools_config : solders.pubkey.Pubkey
class MintInfo (pubkey: solders.pubkey.Pubkey, token_program_id: solders.pubkey.Pubkey, mint_authority: Optional[solders.pubkey.Pubkey], supply: int, decimals: int, is_initialized: bool, freeze_authority: Optional[solders.pubkey.Pubkey], tlv_data: bytes)-
MintInfo(pubkey: solders.pubkey.Pubkey, token_program_id: solders.pubkey.Pubkey, mint_authority: Optional[solders.pubkey.Pubkey], supply: int, decimals: int, is_initialized: bool, freeze_authority: Optional[solders.pubkey.Pubkey], tlv_data: bytes)
Expand source code
@dataclasses.dataclass(frozen=True) class MintInfo: # keyed pubkey: Pubkey # token program id token_program_id: Pubkey # MintInfo mint_authority: Optional[Pubkey] supply: int decimals: int is_initialized: bool freeze_authority: Optional[Pubkey] tlv_data: bytesClass variables
var decimals : intvar is_initialized : boolvar pubkey : solders.pubkey.Pubkeyvar supply : intvar tlv_data : bytesvar token_program_id : solders.pubkey.Pubkey
class Position (pubkey: solders.pubkey.Pubkey, whirlpool: solders.pubkey.Pubkey, position_mint: solders.pubkey.Pubkey, liquidity: int, tick_lower_index: int, tick_upper_index: int, fee_growth_checkpoint_a: int, fee_owed_a: int, fee_growth_checkpoint_b: int, fee_owed_b: int, reward_infos: list[PositionRewardInfo])-
Position(pubkey: solders.pubkey.Pubkey, whirlpool: solders.pubkey.Pubkey, position_mint: solders.pubkey.Pubkey, liquidity: int, tick_lower_index: int, tick_upper_index: int, fee_growth_checkpoint_a: int, fee_owed_a: int, fee_growth_checkpoint_b: int, fee_owed_b: int, reward_infos: list[orca_whirlpool.internal.anchor.types.position_reward_info.PositionRewardInfo])
Expand source code
@dataclasses.dataclass(frozen=True) class Position: # keyed pubkey: Pubkey # Position whirlpool: Pubkey position_mint: Pubkey liquidity: int tick_lower_index: int tick_upper_index: int fee_growth_checkpoint_a: int fee_owed_a: int fee_growth_checkpoint_b: int fee_owed_b: int reward_infos: list[PositionRewardInfo]Class variables
var fee_growth_checkpoint_a : intvar fee_growth_checkpoint_b : intvar fee_owed_a : intvar fee_owed_b : intvar liquidity : intvar position_mint : solders.pubkey.Pubkeyvar pubkey : solders.pubkey.Pubkeyvar reward_infos : list[PositionRewardInfo]var tick_lower_index : intvar tick_upper_index : intvar whirlpool : solders.pubkey.Pubkey
class PositionBundle (pubkey: solders.pubkey.Pubkey, position_bundle_mint: solders.pubkey.Pubkey, position_bitmap: list[int])-
PositionBundle(pubkey: solders.pubkey.Pubkey, position_bundle_mint: solders.pubkey.Pubkey, position_bitmap: list[int])
Expand source code
@dataclasses.dataclass(frozen=True) class PositionBundle: # keyed pubkey: Pubkey # PositionBundle position_bundle_mint: Pubkey position_bitmap: list[int]Class variables
var position_bitmap : list[int]var position_bundle_mint : solders.pubkey.Pubkeyvar pubkey : solders.pubkey.Pubkey
class TickArray (pubkey: solders.pubkey.Pubkey, start_tick_index: int, ticks: list[Tick], whirlpool: solders.pubkey.Pubkey)-
TickArray(pubkey: solders.pubkey.Pubkey, start_tick_index: int, ticks: list[orca_whirlpool.internal.anchor.types.tick.Tick], whirlpool: solders.pubkey.Pubkey)
Expand source code
@dataclasses.dataclass(frozen=True) class TickArray: # keyed pubkey: Pubkey # TickArray start_tick_index: int ticks: list[Tick] whirlpool: PubkeyClass variables
var pubkey : solders.pubkey.Pubkeyvar start_tick_index : intvar ticks : list[Tick]var whirlpool : solders.pubkey.Pubkey
class TokenBadge (pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, token_mint: solders.pubkey.Pubkey)-
TokenBadge(pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, token_mint: solders.pubkey.Pubkey)
Expand source code
@dataclasses.dataclass(frozen=True) class TokenBadge: # keyed pubkey: Pubkey # TokenBadge whirlpools_config: Pubkey token_mint: PubkeyClass variables
var pubkey : solders.pubkey.Pubkeyvar token_mint : solders.pubkey.Pubkeyvar whirlpools_config : solders.pubkey.Pubkey
class Whirlpool (pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, whirlpool_bump: list[int], tick_spacing: int, tick_spacing_seed: list[int], fee_rate: int, protocol_fee_rate: int, liquidity: int, sqrt_price: int, tick_current_index: int, protocol_fee_owed_a: int, protocol_fee_owed_b: int, token_mint_a: solders.pubkey.Pubkey, token_vault_a: solders.pubkey.Pubkey, fee_growth_global_a: int, token_mint_b: solders.pubkey.Pubkey, token_vault_b: solders.pubkey.Pubkey, fee_growth_global_b: int, reward_last_updated_timestamp: int, reward_infos: list[WhirlpoolRewardInfo])-
Whirlpool(pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, whirlpool_bump: list[int], tick_spacing: int, tick_spacing_seed: list[int], fee_rate: int, protocol_fee_rate: int, liquidity: int, sqrt_price: int, tick_current_index: int, protocol_fee_owed_a: int, protocol_fee_owed_b: int, token_mint_a: solders.pubkey.Pubkey, token_vault_a: solders.pubkey.Pubkey, fee_growth_global_a: int, token_mint_b: solders.pubkey.Pubkey, token_vault_b: solders.pubkey.Pubkey, fee_growth_global_b: int, reward_last_updated_timestamp: int, reward_infos: list[orca_whirlpool.internal.anchor.types.whirlpool_reward_info.WhirlpoolRewardInfo])
Expand source code
@dataclasses.dataclass(frozen=True) class Whirlpool: # keyed pubkey: Pubkey # Whirlpool whirlpools_config: Pubkey whirlpool_bump: list[int] tick_spacing: int tick_spacing_seed: list[int] fee_rate: int protocol_fee_rate: int liquidity: int sqrt_price: int tick_current_index: int protocol_fee_owed_a: int protocol_fee_owed_b: int token_mint_a: Pubkey token_vault_a: Pubkey fee_growth_global_a: int token_mint_b: Pubkey token_vault_b: Pubkey fee_growth_global_b: int reward_last_updated_timestamp: int reward_infos: list[WhirlpoolRewardInfo]Class variables
var fee_growth_global_a : intvar fee_growth_global_b : intvar fee_rate : intvar liquidity : intvar protocol_fee_owed_a : intvar protocol_fee_owed_b : intvar protocol_fee_rate : intvar pubkey : solders.pubkey.Pubkeyvar reward_infos : list[WhirlpoolRewardInfo]var reward_last_updated_timestamp : intvar sqrt_price : intvar tick_current_index : intvar tick_spacing : intvar tick_spacing_seed : list[int]var token_mint_a : solders.pubkey.Pubkeyvar token_mint_b : solders.pubkey.Pubkeyvar token_vault_a : solders.pubkey.Pubkeyvar token_vault_b : solders.pubkey.Pubkeyvar whirlpool_bump : list[int]var whirlpools_config : solders.pubkey.Pubkey
class WhirlpoolsConfig (pubkey: solders.pubkey.Pubkey, fee_authority: solders.pubkey.Pubkey, collect_protocol_fees_authority: solders.pubkey.Pubkey, reward_emissions_super_authority: solders.pubkey.Pubkey, default_protocol_fee_rate: int)-
WhirlpoolsConfig(pubkey: solders.pubkey.Pubkey, fee_authority: solders.pubkey.Pubkey, collect_protocol_fees_authority: solders.pubkey.Pubkey, reward_emissions_super_authority: solders.pubkey.Pubkey, default_protocol_fee_rate: int)
Expand source code
@dataclasses.dataclass(frozen=True) class WhirlpoolsConfig: # keyed pubkey: Pubkey # WhirlpoolsConfig fee_authority: Pubkey collect_protocol_fees_authority: Pubkey reward_emissions_super_authority: Pubkey default_protocol_fee_rate: intClass variables
var default_protocol_fee_rate : intvar pubkey : solders.pubkey.Pubkey
class WhirlpoolsConfigExtension (pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, config_extension_authority: solders.pubkey.Pubkey, token_badge_authority: solders.pubkey.Pubkey)-
WhirlpoolsConfigExtension(pubkey: solders.pubkey.Pubkey, whirlpools_config: solders.pubkey.Pubkey, config_extension_authority: solders.pubkey.Pubkey, token_badge_authority: solders.pubkey.Pubkey)
Expand source code
@dataclasses.dataclass(frozen=True) class WhirlpoolsConfigExtension: # keyed pubkey: Pubkey # WhirlpoolsConfigExtension whirlpools_config: Pubkey config_extension_authority: Pubkey token_badge_authority: PubkeyClass variables
var pubkey : solders.pubkey.Pubkeyvar whirlpools_config : solders.pubkey.Pubkey