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: bytes
Class variables
var amount : int
var delegate : Optional[solders.pubkey.Pubkey]
var delegated_amount : int
var is_frozen : bool
var is_initialized : bool
var is_native : bool
var mint : solders.pubkey.Pubkey
var owner : solders.pubkey.Pubkey
var pubkey : solders.pubkey.Pubkey
var tlv_data : bytes
var 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: int
Class variables
var default_fee_rate : int
var pubkey : solders.pubkey.Pubkey
var tick_spacing : int
var 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: bytes
Class variables
var decimals : int
var is_initialized : bool
var pubkey : solders.pubkey.Pubkey
var supply : int
var tlv_data : bytes
var 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 : int
var fee_growth_checkpoint_b : int
var fee_owed_a : int
var fee_owed_b : int
var liquidity : int
var position_mint : solders.pubkey.Pubkey
var pubkey : solders.pubkey.Pubkey
var reward_infos : list[PositionRewardInfo]
var tick_lower_index : int
var tick_upper_index : int
var 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.Pubkey
var 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: Pubkey
Class variables
var pubkey : solders.pubkey.Pubkey
var start_tick_index : int
var 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: Pubkey
Class variables
var pubkey : solders.pubkey.Pubkey
var token_mint : solders.pubkey.Pubkey
var 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 : int
var fee_growth_global_b : int
var fee_rate : int
var liquidity : int
var protocol_fee_owed_a : int
var protocol_fee_owed_b : int
var protocol_fee_rate : int
var pubkey : solders.pubkey.Pubkey
var reward_infos : list[WhirlpoolRewardInfo]
var reward_last_updated_timestamp : int
var sqrt_price : int
var tick_current_index : int
var tick_spacing : int
var tick_spacing_seed : list[int]
var token_mint_a : solders.pubkey.Pubkey
var token_mint_b : solders.pubkey.Pubkey
var token_vault_a : solders.pubkey.Pubkey
var token_vault_b : solders.pubkey.Pubkey
var 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: int
Class variables
var default_protocol_fee_rate : int
var 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: Pubkey
Class variables
var pubkey : solders.pubkey.Pubkey
var whirlpools_config : solders.pubkey.Pubkey