Documentation
¶
Index ¶
- Variables
- func FindMeteoraAMMMarketAddress(ctx context.Context, cli *rpc.Client, tokenAMint solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- func FindMeteoraDLMMMarketAddress(ctx context.Context, cli *rpc.Client, tokenXMint solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- func FindPumpfunAmmCoinCreatorVault(creator solana.PublicKey, mintPublicKey solana.PublicKey) (solana.PublicKey, solana.PublicKey)
- func FindPumpfunAmmMarketAddress(ctx context.Context, cli *rpc.Client, mintPublicKey solana.PublicKey) (rpc.GetProgramAccountsResult, error)
- func FindPumpfunBondingCurveAddress(mintPublicKey solana.PublicKey) (solana.PublicKey, error)
- func FindRaydiumCLMMPoolsMarketAddress(ctx context.Context, cli *rpc.Client, tokenMintA solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- func FindRaydiumCPMMMarketAddress(ctx context.Context, cli *rpc.Client, token0Mint solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- func FindRaydiumLiquidityPoolV4MarketAddress(ctx context.Context, cli *rpc.Client, baseMint solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- func FindWhirlPoolsMarketAddress(ctx context.Context, cli *rpc.Client, tokenMintA solana.PublicKey, ...) (rpc.GetProgramAccountsResult, error)
- type Bootstrapping
- type Collection
- type Creator
- type Data
- type MetaplexAccountData
- type MeteoraAmmLayout
- type MeteoraLayout
- type Padding
- type PartnerInfo
- type PoolFees
- type PoolType
- type ProtocolFee
- type PumpfunAMM
- type PumpfunBondingCurve
- type RaydiumCLMMLayout
- type RaydiumCLMMRewardInfo
- type RaydiumCPMM
- type RaydiumLiquidityStateLayoutV4
- type RewardInfo
- type StaticParameters
- type TokenMetadata
- type TokenStandard
- type UseMethod
- type Uses
- type VariableParameters
- type WhirlpoolsLayout
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MeteoraAMMProgramId = solana.MustPublicKeyFromBase58("Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB")
)
View Source
var (
MeteoraDLMMProgramId = solana.MustPublicKeyFromBase58("LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo")
)
View Source
var (
PumpAMMProgramId = solana.MustPublicKeyFromBase58("pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA")
)
View Source
var (
PumpfunProgramId = solana.MustPublicKeyFromBase58("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P")
)
View Source
var (
RaydiumCLMMProgramId = solana.MustPublicKeyFromBase58("CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK")
)
View Source
var (
RaydiumCPMMProgramId = solana.MustPublicKeyFromBase58("CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C")
)
View Source
var (
RaydiumLiquidityPoolV4ProgramId = solana.MustPublicKeyFromBase58("675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8")
)
View Source
var (
WhirlpoolsProgramId = solana.MustPublicKeyFromBase58("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")
)
Functions ¶
func FindMeteoraAMMMarketAddress ¶ added in v0.1.0
func FindMeteoraDLMMMarketAddress ¶ added in v0.0.6
func FindPumpfunAmmCoinCreatorVault ¶ added in v0.1.5
func FindPumpfunAmmCoinCreatorVault(creator solana.PublicKey, mintPublicKey solana.PublicKey) (solana.PublicKey, solana.PublicKey)
func FindPumpfunBondingCurveAddress ¶
func FindPumpfunBondingCurveAddress(mintPublicKey solana.PublicKey) (solana.PublicKey, error)
func FindRaydiumCLMMPoolsMarketAddress ¶ added in v0.1.4
func FindRaydiumCPMMMarketAddress ¶ added in v0.0.9
func FindRaydiumLiquidityPoolV4MarketAddress ¶ added in v0.0.4
func FindWhirlPoolsMarketAddress ¶ added in v0.1.3
Types ¶
type Bootstrapping ¶ added in v0.1.0
type Bootstrapping struct { ActivationPoint uint64 WhitelistedVault solana.PublicKey PoolCreator solana.PublicKey ActivationType uint8 }
func (*Bootstrapping) UnmarshalWithDecoder ¶ added in v0.1.0
func (obj *Bootstrapping) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type Collection ¶ added in v0.0.2
type Collection struct { Verified bool Address solana.PublicKey }
type MetaplexAccountData ¶ added in v0.0.3
type MetaplexAccountData struct { Key uint8 UpdateAuthority sol.PublicKey Mint sol.PublicKey Data Data PrimarySaleHappened bool IsMutable bool EditionNonce *uint8 TokenStandard *TokenStandard Collection *Collection Uses *Uses }
func (*MetaplexAccountData) GetTokenMetadata ¶ added in v0.0.3
func (m *MetaplexAccountData) GetTokenMetadata() (*TokenMetadata, error)
type MeteoraAmmLayout ¶ added in v0.1.0
type MeteoraAmmLayout struct { Discriminator uint64 // 账户类型识别码,用于区分不同类型的账户,占用 8 字节 LpMint solana.PublicKey TokenAMint solana.PublicKey TokenBMint solana.PublicKey AVault solana.PublicKey BVault solana.PublicKey AVaultLp solana.PublicKey BVaultLp solana.PublicKey AVaultLpBump uint8 Enabled bool ProtocolTokenAFee solana.PublicKey ProtocolTokenBFee solana.PublicKey FeeLastUpdatedAt uint64 Padding0 [24]uint8 Fees PoolFees PoolType PoolType Stake solana.PublicKey TotalLockedLp uint64 Bootstrapping Bootstrapping PartnerInfo PartnerInfo Padding Padding CurveType [3]uint64 }
func (*MeteoraAmmLayout) Offset ¶ added in v0.1.0
func (l *MeteoraAmmLayout) Offset(value string) uint64
func (*MeteoraAmmLayout) Span ¶ added in v0.1.0
func (l *MeteoraAmmLayout) Span() uint64
func (*MeteoraAmmLayout) UnmarshalWithDecoder ¶ added in v0.1.0
func (obj *MeteoraAmmLayout) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type MeteoraLayout ¶ added in v0.0.6
type MeteoraLayout struct { Padding [8]byte StaticParametersPadding StaticParameters VariableParametersPadding VariableParameters BumpSeed [1]uint8 BinStepSeed [2]uint8 PairType uint8 ActiveId int32 BinStep uint16 Status uint8 RequireBaseFactorSeed uint8 BaseFactorSeed [2]uint8 ActivationType uint8 CreatorPoolOnOffControl uint8 TokenXMint solana.PublicKey TokenYMint solana.PublicKey ReserveX solana.PublicKey ReserveY solana.PublicKey ProtocolFee ProtocolFee Padding1 [32]uint8 RewardInfos [2]RewardInfo Oracle solana.PublicKey BinArrayBitmap [16]uint64 LastUpdatedAt int64 Padding2 [32]uint8 PreActivationSwapAddress solana.PublicKey BaseKey solana.PublicKey ActivationPoint uint64 PreActivationDuration uint64 Padding3 [8]uint8 Padding4 uint64 Creator solana.PublicKey TokenMintXProgramFlag uint8 TokenMintYProgramFlag uint8 Reserved [22]uint8 }
func (*MeteoraLayout) Offset ¶ added in v0.0.6
func (l *MeteoraLayout) Offset(value string) uint64
func (*MeteoraLayout) Span ¶ added in v0.0.6
func (l *MeteoraLayout) Span() uint64
func (*MeteoraLayout) UnmarshalWithDecoder ¶ added in v0.0.6
func (obj *MeteoraLayout) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type Padding ¶ added in v0.1.0
type PartnerInfo ¶ added in v0.1.0
type PartnerInfo struct { FeeNumerator uint64 PartnerAuthority solana.PublicKey PendingFeeA uint64 PendingFeeB uint64 }
func (*PartnerInfo) UnmarshalWithDecoder ¶ added in v0.1.0
func (obj *PartnerInfo) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type PoolFees ¶ added in v0.1.0
type ProtocolFee ¶ added in v0.0.6
type PumpfunAMM ¶
type PumpfunAMM struct { PoolBump uint8 Index uint16 Creator sol.PublicKey BaseMint sol.PublicKey QuoteMint sol.PublicKey LpMint sol.PublicKey PoolBaseTokenAccount sol.PublicKey PoolQuoteTokenAccount sol.PublicKey LpSupply uint64 CoinCreator sol.PublicKey }
func (*PumpfunAMM) UnmarshalWithDecoder ¶
func (obj *PumpfunAMM) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type PumpfunBondingCurve ¶
type PumpfunBondingCurve struct { VirtualTokenReserves uint64 VirtualSolReserves uint64 RealTokenReserves uint64 RealSolReserves uint64 TokenTotalSupply uint64 Complete bool }
func (*PumpfunBondingCurve) UnmarshalWithDecoder ¶
func (obj *PumpfunBondingCurve) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type RaydiumCLMMLayout ¶ added in v0.1.4
type RaydiumCLMMLayout struct { Skip [8]byte Bump [1]uint8 AmmConfig solana.PublicKey Owner solana.PublicKey /// Token pair of the pool, where token_mint_0 address < token_mint_1 address TokenMint0 solana.PublicKey TokenMint1 solana.PublicKey /// Token pair vault TokenVault0 solana.PublicKey TokenVault1 solana.PublicKey /// observation account key ObservationKey solana.PublicKey /// mint0 and mint1 decimals MintDecimals0 uint8 MintDecimals1 uint8 /// The minimum number of ticks between initialized ticks TickSpacing uint16 /// The currently in range liquidity available to the pool. Liquidity uint128.Uint128 /// The current price of the pool as a sqrt(token_1/token_0) Q64.64 value SqrtPriceX64 uint128.Uint128 /// The current tick of the pool, i.e. according to the last tick transition that was run. TickCurrent int32 Padding3 uint16 Padding4 uint16 /// The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per /// unit of liquidity for the entire life of the pool. FeeGrowthGlobal0X64 uint128.Uint128 FeeGrowthGlobal1X64 uint128.Uint128 /// The amounts of token_0 and token_1 that are owed to the protocol. ProtocolFeesToken0 uint64 ProtocolFeesToken1 uint64 /// The amounts in and out of swap token_0 and token_1 SwapInAmountToken0 uint128.Uint128 SwapOutAmountToken1 uint128.Uint128 SwapInAmountToken1 uint128.Uint128 SwapOutAmountToken0 uint128.Uint128 /// Bitwise representation of the state of the pool /// bit0, 1: disable open position and increase liquidity, 0: normal /// bit1, 1: disable decrease liquidity, 0: normal /// bit2, 1: disable collect fee, 0: normal /// bit3, 1: disable collect reward, 0: normal /// bit4, 1: disable swap, 0: normal Status uint8 /// Leave blank for future use Padding [7]uint8 RewardInfos [3]RaydiumCLMMRewardInfo // /// Packed initialized tick array state TickArrayBitmap [16]uint64 /// except protocol_fee and fund_fee TotalFeesToken0 uint64 /// except protocol_fee and fund_fee TotalFeesClaimedtoken_0 uint64 TotalFeesToken1 uint64 TotalFeesClaimedToken1 uint64 FundFeesToken0 uint64 FundFeesToken1 uint64 // The timestamp allowed for swap in the pool. // Note: The open_time is disabled for now. OpenTime uint64 // account recent update epoch RecentEpoch uint64 // Unused bytes for future upgrades. Padding1 [24]uint64 Padding2 [32]uint64 }
func (*RaydiumCLMMLayout) Offset ¶ added in v0.1.4
func (l *RaydiumCLMMLayout) Offset(value string) uint64
func (*RaydiumCLMMLayout) Span ¶ added in v0.1.4
func (l *RaydiumCLMMLayout) Span() uint64
func (*RaydiumCLMMLayout) UnmarshalWithDecoder ¶ added in v0.1.4
func (obj *RaydiumCLMMLayout) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type RaydiumCLMMRewardInfo ¶ added in v0.1.4
type RaydiumCLMMRewardInfo struct { // / Reward state RewardState uint8 // / Reward open time OpenTime uint64 // / Reward end time EndTime uint64 // / Reward last update time LastUpdateTime uint64 // / Q64.64 number indicates how many tokens per second are earned per unit of liquidity. EmissionsPerSecondX64 uint128.Uint128 // / The total amount of reward emissioned RewardTotalEmissioned uint64 // / The total amount of claimed reward RewardClaimed uint64 // / Reward token mint. TokenMint solana.PublicKey // / Reward vault token account. TokenVault solana.PublicKey // / The owner that has permission to set reward param Authority solana.PublicKey // / Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward // / emissions were turned on. RewardGrowthGlobalX64 uint128.Uint128 }
type RaydiumCPMM ¶ added in v0.0.9
type RaydiumCPMM struct { Discriminator uint64 // 账户类型识别码,用于区分不同类型的账户,占用 8 字节 AmmConfig solana.PublicKey PoolCreator solana.PublicKey Token0Vault solana.PublicKey Token1Vault solana.PublicKey LpMint solana.PublicKey Token0Mint solana.PublicKey Token1Mint solana.PublicKey Token0Program solana.PublicKey Token1Program solana.PublicKey ObservationKey solana.PublicKey AuthBump uint8 Status uint8 LpMintDecimals uint8 Mint0Decimals uint8 Mint1Decimals uint8 LpSupply uint64 ProtocolFeesToken0 uint64 ProtocolFeesToken1 uint64 FundFeesToken0 uint64 FundFeesToken1 uint64 OpenTime uint64 RecentEpoch uint64 Padding [31]uint64 }
func (*RaydiumCPMM) Offset ¶ added in v0.0.9
func (l *RaydiumCPMM) Offset(value string) uint64
func (*RaydiumCPMM) Span ¶ added in v0.0.9
func (l *RaydiumCPMM) Span() uint64
func (*RaydiumCPMM) UnmarshalWithDecoder ¶ added in v0.0.9
func (obj *RaydiumCPMM) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type RaydiumLiquidityStateLayoutV4 ¶ added in v0.0.4
type RaydiumLiquidityStateLayoutV4 struct { Status uint64 Nonce uint64 MaxOrder uint64 Depth uint64 BaseDecimal uint64 QuoteDecimal uint64 State uint64 ResetFlag uint64 MinSize uint64 VolMaxCutRatio uint64 AmountWaveRatio uint64 BaseLotSize uint64 QuoteLotSize uint64 MinPriceMultiplier uint64 MaxPriceMultiplier uint64 SystemDecimalValue uint64 MinSeparateNumerator uint64 MinSeparateDenominator uint64 TradeFeeNumerator uint64 TradeFeeDenominator uint64 PnlNumerator uint64 PnlDenominator uint64 SwapFeeNumerator uint64 SwapFeeDenominator uint64 BaseNeedTakePnl uint64 QuoteNeedTakePnl uint64 QuoteTotalPnl uint64 BaseTotalPnl uint64 PoolOpenTime uint64 PunishPcAmount uint64 PunishCoinAmount uint64 OrderbookToInitTime uint64 SwapBaseInAmount uint128.Uint128 SwapQuoteOutAmount uint128.Uint128 SwapBase2QuoteFee uint64 SwapQuoteInAmount uint128.Uint128 SwapBaseOutAmount uint128.Uint128 SwapQuote2BaseFee uint64 BaseVault solana.PublicKey QuoteVault solana.PublicKey BaseMint solana.PublicKey QuoteMint solana.PublicKey LpMint solana.PublicKey OpenOrders solana.PublicKey MarketId solana.PublicKey MarketProgramId solana.PublicKey TargetOrders solana.PublicKey WithdrawQueue solana.PublicKey LpVault solana.PublicKey Owner solana.PublicKey LpReserve uint64 Padding [3]uint64 }
func (*RaydiumLiquidityStateLayoutV4) Offset ¶ added in v0.0.4
func (l *RaydiumLiquidityStateLayoutV4) Offset(value string) uint64
func (*RaydiumLiquidityStateLayoutV4) Span ¶ added in v0.0.4
func (l *RaydiumLiquidityStateLayoutV4) Span() uint64
func (*RaydiumLiquidityStateLayoutV4) UnmarshalWithDecoder ¶ added in v0.0.4
func (obj *RaydiumLiquidityStateLayoutV4) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
type RewardInfo ¶ added in v0.0.6
type StaticParameters ¶ added in v0.0.6
type TokenMetadata ¶ added in v0.0.3
type TokenStandard ¶ added in v0.0.2
type TokenStandard uint8
type VariableParameters ¶ added in v0.0.6
type WhirlpoolsLayout ¶ added in v0.1.3
type WhirlpoolsLayout struct { Padding [8]byte WhirlpoolsConfig solana.PublicKey WhirlpoolBump [1]uint8 TickSpacing uint16 FeeTierIndexSeed [2]uint8 FeeRate uint16 ProtocolFeeRate uint16 Liquidity uint128.Uint128 SqrtPrice uint128.Uint128 TickCurrentIndex int32 ProtocolFeeOwedA uint64 ProtocolFeeOwedB uint64 TokenMintA solana.PublicKey TokenVaultA solana.PublicKey FeeGrowthGlobalA uint128.Uint128 TokenMintB solana.PublicKey TokenVaultB solana.PublicKey FeeGrowthGlobalB uint128.Uint128 RewardLastUpdatedTimestamp uint64 }
func (*WhirlpoolsLayout) Offset ¶ added in v0.1.3
func (l *WhirlpoolsLayout) Offset(value string) uint64
func (*WhirlpoolsLayout) Span ¶ added in v0.1.3
func (l *WhirlpoolsLayout) Span() uint64
func (*WhirlpoolsLayout) UnmarshalWithDecoder ¶ added in v0.1.3
func (obj *WhirlpoolsLayout) UnmarshalWithDecoder(decoder *bin.Decoder) (err error)
Source Files
¶
- metadata_account_data.go
- meteora_amm.go
- meteora_amm_account_data.go
- meteora_dlmm.go
- meteora_dlmm_account_data.go
- pumpfun_amm.go
- pumpfun_amm_account_data.go
- pumpfun_bonding_curve.go
- pumpfun_bonding_curve_account_data.go
- raydium_clmm.go
- raydium_clmm_account_data.go
- raydium_cpmm.go
- raydium_cpmm_account_data.go
- raydium_liquidity_pool_v4.go
- raydium_liquidity_pool_v4_account_data.go
- whirlpools.go
- whirlpools_account_data.go
Click to show internal directories.
Click to hide internal directories.