whirlpool

package
v0.0.0-...-7011322 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramName = "Whirlpool"

Variables

View Source
var (
	Instruction_InitializeConfig = ag_binary.TypeID([8]byte{208, 127, 21, 1, 194, 190, 196, 70})

	Instruction_InitializePool = ag_binary.TypeID([8]byte{95, 180, 10, 172, 84, 174, 232, 40})

	Instruction_InitializeTickArray = ag_binary.TypeID([8]byte{11, 188, 193, 214, 141, 91, 149, 184})

	Instruction_InitializeFeeTier = ag_binary.TypeID([8]byte{183, 74, 156, 160, 112, 2, 42, 30})

	Instruction_InitializeReward = ag_binary.TypeID([8]byte{95, 135, 192, 196, 242, 129, 230, 68})

	Instruction_SetRewardEmissions = ag_binary.TypeID([8]byte{13, 197, 86, 168, 109, 176, 27, 244})

	Instruction_OpenPosition = ag_binary.TypeID([8]byte{135, 128, 47, 77, 15, 152, 240, 49})

	Instruction_OpenPositionWithMetadata = ag_binary.TypeID([8]byte{242, 29, 134, 48, 58, 110, 14, 60})

	Instruction_IncreaseLiquidity = ag_binary.TypeID([8]byte{46, 156, 243, 118, 13, 205, 251, 178})

	Instruction_DecreaseLiquidity = ag_binary.TypeID([8]byte{160, 38, 208, 111, 104, 91, 44, 1})

	Instruction_UpdateFeesAndRewards = ag_binary.TypeID([8]byte{154, 230, 250, 13, 236, 209, 75, 223})

	Instruction_CollectFees = ag_binary.TypeID([8]byte{164, 152, 207, 99, 30, 186, 19, 182})

	Instruction_CollectReward = ag_binary.TypeID([8]byte{70, 5, 132, 87, 86, 235, 177, 34})

	Instruction_CollectProtocolFees = ag_binary.TypeID([8]byte{22, 67, 23, 98, 150, 178, 70, 220})

	Instruction_Swap = ag_binary.TypeID([8]byte{248, 198, 158, 145, 225, 117, 135, 200})

	Instruction_ClosePosition = ag_binary.TypeID([8]byte{123, 134, 81, 0, 49, 68, 98, 98})

	Instruction_SetDefaultFeeRate = ag_binary.TypeID([8]byte{118, 215, 214, 157, 182, 229, 208, 228})

	Instruction_SetDefaultProtocolFeeRate = ag_binary.TypeID([8]byte{107, 205, 249, 226, 151, 35, 86, 0})

	Instruction_SetFeeRate = ag_binary.TypeID([8]byte{53, 243, 137, 65, 8, 140, 158, 6})

	Instruction_SetProtocolFeeRate = ag_binary.TypeID([8]byte{95, 7, 4, 50, 154, 79, 156, 131})

	Instruction_SetFeeAuthority = ag_binary.TypeID([8]byte{31, 1, 50, 87, 237, 101, 97, 132})

	Instruction_SetCollectProtocolFeesAuthority = ag_binary.TypeID([8]byte{34, 150, 93, 244, 139, 225, 233, 67})

	Instruction_SetRewardAuthority = ag_binary.TypeID([8]byte{34, 39, 183, 252, 83, 28, 85, 127})

	Instruction_SetRewardAuthorityBySuperAuthority = ag_binary.TypeID([8]byte{240, 154, 201, 198, 148, 93, 56, 25})

	Instruction_SetRewardEmissionsSuperAuthority = ag_binary.TypeID([8]byte{207, 5, 200, 209, 122, 56, 82, 183})
)
View Source
var FeeTierDiscriminator = [8]byte{56, 75, 159, 76, 142, 68, 190, 105}
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.AnchorTypeIDEncoding,
	[]ag_binary.VariantType{
		{
			"initialize_config", (*InitializeConfig)(nil),
		},
		{
			"initialize_pool", (*InitializePool)(nil),
		},
		{
			"initialize_tick_array", (*InitializeTickArray)(nil),
		},
		{
			"initialize_fee_tier", (*InitializeFeeTier)(nil),
		},
		{
			"initialize_reward", (*InitializeReward)(nil),
		},
		{
			"set_reward_emissions", (*SetRewardEmissions)(nil),
		},
		{
			"open_position", (*OpenPosition)(nil),
		},
		{
			"open_position_with_metadata", (*OpenPositionWithMetadata)(nil),
		},
		{
			"increase_liquidity", (*IncreaseLiquidity)(nil),
		},
		{
			"decrease_liquidity", (*DecreaseLiquidity)(nil),
		},
		{
			"update_fees_and_rewards", (*UpdateFeesAndRewards)(nil),
		},
		{
			"collect_fees", (*CollectFees)(nil),
		},
		{
			"collect_reward", (*CollectReward)(nil),
		},
		{
			"collect_protocol_fees", (*CollectProtocolFees)(nil),
		},
		{
			"swap", (*Swap)(nil),
		},
		{
			"close_position", (*ClosePosition)(nil),
		},
		{
			"set_default_fee_rate", (*SetDefaultFeeRate)(nil),
		},
		{
			"set_default_protocol_fee_rate", (*SetDefaultProtocolFeeRate)(nil),
		},
		{
			"set_fee_rate", (*SetFeeRate)(nil),
		},
		{
			"set_protocol_fee_rate", (*SetProtocolFeeRate)(nil),
		},
		{
			"set_fee_authority", (*SetFeeAuthority)(nil),
		},
		{
			"set_collect_protocol_fees_authority", (*SetCollectProtocolFeesAuthority)(nil),
		},
		{
			"set_reward_authority", (*SetRewardAuthority)(nil),
		},
		{
			"set_reward_authority_by_super_authority", (*SetRewardAuthorityBySuperAuthority)(nil),
		},
		{
			"set_reward_emissions_super_authority", (*SetRewardEmissionsSuperAuthority)(nil),
		},
	},
)
View Source
var PositionDiscriminator = [8]byte{170, 188, 143, 228, 122, 64, 247, 208}
View Source
var TickArrayDiscriminator = [8]byte{69, 97, 189, 190, 110, 7, 66, 187}
View Source
var WhirlpoolDiscriminator = [8]byte{63, 149, 209, 12, 225, 128, 99, 9}
View Source
var WhirlpoolsConfigDiscriminator = [8]byte{157, 20, 49, 224, 217, 87, 193, 254}

Functions

func InstructionIDToName

func InstructionIDToName(id ag_binary.TypeID) string

InstructionIDToName returns the name of the instruction given its ID.

func SetProgramID

func SetProgramID(pubkey ag_solanago.PublicKey)

Types

type ClosePosition

type ClosePosition struct {

	// [0] = [SIGNER] positionAuthority
	//
	// [1] = [WRITE] receiver
	//
	// [2] = [WRITE] position
	//
	// [3] = [WRITE] positionMint
	//
	// [4] = [WRITE] positionTokenAccount
	//
	// [5] = [] tokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

ClosePosition is the `closePosition` instruction.

func NewClosePositionInstruction

func NewClosePositionInstruction(

	positionAuthority ag_solanago.PublicKey,
	receiver ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionMint ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey) *ClosePosition

NewClosePositionInstruction declares a new ClosePosition instruction with the provided parameters and accounts.

func NewClosePositionInstructionBuilder

func NewClosePositionInstructionBuilder() *ClosePosition

NewClosePositionInstructionBuilder creates a new `ClosePosition` instruction builder.

func (ClosePosition) Build

func (inst ClosePosition) Build() *Instruction

func (*ClosePosition) EncodeToTree

func (inst *ClosePosition) EncodeToTree(parent ag_treeout.Branches)

func (*ClosePosition) GetClosePositionAccounts

func (inst *ClosePosition) GetClosePositionAccounts() *ClosePositionAccounts

func (*ClosePosition) GetPositionAccount

func (inst *ClosePosition) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*ClosePosition) GetPositionAuthorityAccount

func (inst *ClosePosition) GetPositionAuthorityAccount() *ag_solanago.AccountMeta

GetPositionAuthorityAccount gets the "positionAuthority" account.

func (*ClosePosition) GetPositionMintAccount

func (inst *ClosePosition) GetPositionMintAccount() *ag_solanago.AccountMeta

GetPositionMintAccount gets the "positionMint" account.

func (*ClosePosition) GetPositionTokenAccountAccount

func (inst *ClosePosition) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*ClosePosition) GetReceiverAccount

func (inst *ClosePosition) GetReceiverAccount() *ag_solanago.AccountMeta

GetReceiverAccount gets the "receiver" account.

func (*ClosePosition) GetTokenProgramAccount

func (inst *ClosePosition) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (ClosePosition) MarshalWithEncoder

func (obj ClosePosition) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*ClosePosition) SetPositionAccount

func (inst *ClosePosition) SetPositionAccount(position ag_solanago.PublicKey) *ClosePosition

SetPositionAccount sets the "position" account.

func (*ClosePosition) SetPositionAuthorityAccount

func (inst *ClosePosition) SetPositionAuthorityAccount(positionAuthority ag_solanago.PublicKey) *ClosePosition

SetPositionAuthorityAccount sets the "positionAuthority" account.

func (*ClosePosition) SetPositionMintAccount

func (inst *ClosePosition) SetPositionMintAccount(positionMint ag_solanago.PublicKey) *ClosePosition

SetPositionMintAccount sets the "positionMint" account.

func (*ClosePosition) SetPositionTokenAccountAccount

func (inst *ClosePosition) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *ClosePosition

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*ClosePosition) SetReceiverAccount

func (inst *ClosePosition) SetReceiverAccount(receiver ag_solanago.PublicKey) *ClosePosition

SetReceiverAccount sets the "receiver" account.

func (*ClosePosition) SetTokenProgramAccount

func (inst *ClosePosition) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *ClosePosition

SetTokenProgramAccount sets the "tokenProgram" account.

func (*ClosePosition) UnmarshalWithDecoder

func (obj *ClosePosition) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*ClosePosition) Validate

func (inst *ClosePosition) Validate() error

func (ClosePosition) ValidateAndBuild

func (inst ClosePosition) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type ClosePositionAccounts

type ClosePositionAccounts struct {
	PositionAuthority    ag_solanago.PublicKey
	Receiver             ag_solanago.PublicKey
	Position             ag_solanago.PublicKey
	PositionMint         ag_solanago.PublicKey
	PositionTokenAccount ag_solanago.PublicKey
	TokenProgram         ag_solanago.PublicKey
}

type CollectFees

type CollectFees struct {

	// [0] = [] whirlpool
	//
	// [1] = [SIGNER] positionAuthority
	//
	// [2] = [WRITE] position
	//
	// [3] = [] positionTokenAccount
	//
	// [4] = [WRITE] tokenOwnerAccountA
	//
	// [5] = [WRITE] tokenVaultA
	//
	// [6] = [WRITE] tokenOwnerAccountB
	//
	// [7] = [WRITE] tokenVaultB
	//
	// [8] = [] tokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

CollectFees is the `collectFees` instruction.

func NewCollectFeesInstruction

func NewCollectFeesInstruction(

	whirlpool ag_solanago.PublicKey,
	positionAuthority ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	tokenOwnerAccountA ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenOwnerAccountB ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey) *CollectFees

NewCollectFeesInstruction declares a new CollectFees instruction with the provided parameters and accounts.

func NewCollectFeesInstructionBuilder

func NewCollectFeesInstructionBuilder() *CollectFees

NewCollectFeesInstructionBuilder creates a new `CollectFees` instruction builder.

func (CollectFees) Build

func (inst CollectFees) Build() *Instruction

func (*CollectFees) EncodeToTree

func (inst *CollectFees) EncodeToTree(parent ag_treeout.Branches)

func (*CollectFees) GetCollectFeesAccounts

func (inst *CollectFees) GetCollectFeesAccounts() *CollectFeesAccounts

func (*CollectFees) GetPositionAccount

func (inst *CollectFees) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*CollectFees) GetPositionAuthorityAccount

func (inst *CollectFees) GetPositionAuthorityAccount() *ag_solanago.AccountMeta

GetPositionAuthorityAccount gets the "positionAuthority" account.

func (*CollectFees) GetPositionTokenAccountAccount

func (inst *CollectFees) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*CollectFees) GetTokenOwnerAccountAAccount

func (inst *CollectFees) GetTokenOwnerAccountAAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountAAccount gets the "tokenOwnerAccountA" account.

func (*CollectFees) GetTokenOwnerAccountBAccount

func (inst *CollectFees) GetTokenOwnerAccountBAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountBAccount gets the "tokenOwnerAccountB" account.

func (*CollectFees) GetTokenProgramAccount

func (inst *CollectFees) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*CollectFees) GetTokenVaultAAccount

func (inst *CollectFees) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*CollectFees) GetTokenVaultBAccount

func (inst *CollectFees) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*CollectFees) GetWhirlpoolAccount

func (inst *CollectFees) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (CollectFees) MarshalWithEncoder

func (obj CollectFees) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*CollectFees) SetPositionAccount

func (inst *CollectFees) SetPositionAccount(position ag_solanago.PublicKey) *CollectFees

SetPositionAccount sets the "position" account.

func (*CollectFees) SetPositionAuthorityAccount

func (inst *CollectFees) SetPositionAuthorityAccount(positionAuthority ag_solanago.PublicKey) *CollectFees

SetPositionAuthorityAccount sets the "positionAuthority" account.

func (*CollectFees) SetPositionTokenAccountAccount

func (inst *CollectFees) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *CollectFees

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*CollectFees) SetTokenOwnerAccountAAccount

func (inst *CollectFees) SetTokenOwnerAccountAAccount(tokenOwnerAccountA ag_solanago.PublicKey) *CollectFees

SetTokenOwnerAccountAAccount sets the "tokenOwnerAccountA" account.

func (*CollectFees) SetTokenOwnerAccountBAccount

func (inst *CollectFees) SetTokenOwnerAccountBAccount(tokenOwnerAccountB ag_solanago.PublicKey) *CollectFees

SetTokenOwnerAccountBAccount sets the "tokenOwnerAccountB" account.

func (*CollectFees) SetTokenProgramAccount

func (inst *CollectFees) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *CollectFees

SetTokenProgramAccount sets the "tokenProgram" account.

func (*CollectFees) SetTokenVaultAAccount

func (inst *CollectFees) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *CollectFees

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*CollectFees) SetTokenVaultBAccount

func (inst *CollectFees) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *CollectFees

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*CollectFees) SetWhirlpoolAccount

func (inst *CollectFees) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *CollectFees

SetWhirlpoolAccount sets the "whirlpool" account.

func (*CollectFees) UnmarshalWithDecoder

func (obj *CollectFees) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*CollectFees) Validate

func (inst *CollectFees) Validate() error

func (CollectFees) ValidateAndBuild

func (inst CollectFees) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CollectFeesAccounts

type CollectFeesAccounts struct {
	Whirlpool            ag_solanago.PublicKey
	PositionAuthority    ag_solanago.PublicKey
	Position             ag_solanago.PublicKey
	PositionTokenAccount ag_solanago.PublicKey
	TokenOwnerAccountA   ag_solanago.PublicKey
	TokenVaultA          ag_solanago.PublicKey
	TokenOwnerAccountB   ag_solanago.PublicKey
	TokenVaultB          ag_solanago.PublicKey
	TokenProgram         ag_solanago.PublicKey
}

type CollectProtocolFees

type CollectProtocolFees struct {

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [WRITE] whirlpool
	//
	// [2] = [SIGNER] collectProtocolFeesAuthority
	//
	// [3] = [WRITE] tokenVaultA
	//
	// [4] = [WRITE] tokenVaultB
	//
	// [5] = [WRITE] tokenDestinationA
	//
	// [6] = [WRITE] tokenDestinationB
	//
	// [7] = [] tokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

CollectProtocolFees is the `collectProtocolFees` instruction.

func NewCollectProtocolFeesInstruction

func NewCollectProtocolFeesInstruction(

	whirlpoolsConfig ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	collectProtocolFeesAuthority ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	tokenDestinationA ag_solanago.PublicKey,
	tokenDestinationB ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey) *CollectProtocolFees

NewCollectProtocolFeesInstruction declares a new CollectProtocolFees instruction with the provided parameters and accounts.

func NewCollectProtocolFeesInstructionBuilder

func NewCollectProtocolFeesInstructionBuilder() *CollectProtocolFees

NewCollectProtocolFeesInstructionBuilder creates a new `CollectProtocolFees` instruction builder.

func (CollectProtocolFees) Build

func (inst CollectProtocolFees) Build() *Instruction

func (*CollectProtocolFees) EncodeToTree

func (inst *CollectProtocolFees) EncodeToTree(parent ag_treeout.Branches)

func (*CollectProtocolFees) GetCollectProtocolFeesAccounts

func (inst *CollectProtocolFees) GetCollectProtocolFeesAccounts() *CollectProtocolFeesAccounts

func (*CollectProtocolFees) GetCollectProtocolFeesAuthorityAccount

func (inst *CollectProtocolFees) GetCollectProtocolFeesAuthorityAccount() *ag_solanago.AccountMeta

GetCollectProtocolFeesAuthorityAccount gets the "collectProtocolFeesAuthority" account.

func (*CollectProtocolFees) GetTokenDestinationAAccount

func (inst *CollectProtocolFees) GetTokenDestinationAAccount() *ag_solanago.AccountMeta

GetTokenDestinationAAccount gets the "tokenDestinationA" account.

func (*CollectProtocolFees) GetTokenDestinationBAccount

func (inst *CollectProtocolFees) GetTokenDestinationBAccount() *ag_solanago.AccountMeta

GetTokenDestinationBAccount gets the "tokenDestinationB" account.

func (*CollectProtocolFees) GetTokenProgramAccount

func (inst *CollectProtocolFees) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*CollectProtocolFees) GetTokenVaultAAccount

func (inst *CollectProtocolFees) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*CollectProtocolFees) GetTokenVaultBAccount

func (inst *CollectProtocolFees) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*CollectProtocolFees) GetWhirlpoolAccount

func (inst *CollectProtocolFees) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (*CollectProtocolFees) GetWhirlpoolsConfigAccount

func (inst *CollectProtocolFees) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (CollectProtocolFees) MarshalWithEncoder

func (obj CollectProtocolFees) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*CollectProtocolFees) SetCollectProtocolFeesAuthorityAccount

func (inst *CollectProtocolFees) SetCollectProtocolFeesAuthorityAccount(collectProtocolFeesAuthority ag_solanago.PublicKey) *CollectProtocolFees

SetCollectProtocolFeesAuthorityAccount sets the "collectProtocolFeesAuthority" account.

func (*CollectProtocolFees) SetTokenDestinationAAccount

func (inst *CollectProtocolFees) SetTokenDestinationAAccount(tokenDestinationA ag_solanago.PublicKey) *CollectProtocolFees

SetTokenDestinationAAccount sets the "tokenDestinationA" account.

func (*CollectProtocolFees) SetTokenDestinationBAccount

func (inst *CollectProtocolFees) SetTokenDestinationBAccount(tokenDestinationB ag_solanago.PublicKey) *CollectProtocolFees

SetTokenDestinationBAccount sets the "tokenDestinationB" account.

func (*CollectProtocolFees) SetTokenProgramAccount

func (inst *CollectProtocolFees) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *CollectProtocolFees

SetTokenProgramAccount sets the "tokenProgram" account.

func (*CollectProtocolFees) SetTokenVaultAAccount

func (inst *CollectProtocolFees) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *CollectProtocolFees

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*CollectProtocolFees) SetTokenVaultBAccount

func (inst *CollectProtocolFees) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *CollectProtocolFees

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*CollectProtocolFees) SetWhirlpoolAccount

func (inst *CollectProtocolFees) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *CollectProtocolFees

SetWhirlpoolAccount sets the "whirlpool" account.

func (*CollectProtocolFees) SetWhirlpoolsConfigAccount

func (inst *CollectProtocolFees) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *CollectProtocolFees

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*CollectProtocolFees) UnmarshalWithDecoder

func (obj *CollectProtocolFees) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*CollectProtocolFees) Validate

func (inst *CollectProtocolFees) Validate() error

func (CollectProtocolFees) ValidateAndBuild

func (inst CollectProtocolFees) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CollectProtocolFeesAccounts

type CollectProtocolFeesAccounts struct {
	WhirlpoolsConfig             ag_solanago.PublicKey
	Whirlpool                    ag_solanago.PublicKey
	CollectProtocolFeesAuthority ag_solanago.PublicKey
	TokenVaultA                  ag_solanago.PublicKey
	TokenVaultB                  ag_solanago.PublicKey
	TokenDestinationA            ag_solanago.PublicKey
	TokenDestinationB            ag_solanago.PublicKey
	TokenProgram                 ag_solanago.PublicKey
}

type CollectReward

type CollectReward struct {
	RewardIndex *uint8

	// [0] = [] whirlpool
	//
	// [1] = [SIGNER] positionAuthority
	//
	// [2] = [WRITE] position
	//
	// [3] = [] positionTokenAccount
	//
	// [4] = [WRITE] rewardOwnerAccount
	//
	// [5] = [WRITE] rewardVault
	//
	// [6] = [] tokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

CollectReward is the `collectReward` instruction.

func NewCollectRewardInstruction

func NewCollectRewardInstruction(

	rewardIndex uint8,

	whirlpool ag_solanago.PublicKey,
	positionAuthority ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	rewardOwnerAccount ag_solanago.PublicKey,
	rewardVault ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey) *CollectReward

NewCollectRewardInstruction declares a new CollectReward instruction with the provided parameters and accounts.

func NewCollectRewardInstructionBuilder

func NewCollectRewardInstructionBuilder() *CollectReward

NewCollectRewardInstructionBuilder creates a new `CollectReward` instruction builder.

func (CollectReward) Build

func (inst CollectReward) Build() *Instruction

func (*CollectReward) EncodeToTree

func (inst *CollectReward) EncodeToTree(parent ag_treeout.Branches)

func (*CollectReward) GetCollectRewardAccounts

func (inst *CollectReward) GetCollectRewardAccounts() *CollectRewardAccounts

func (*CollectReward) GetPositionAccount

func (inst *CollectReward) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*CollectReward) GetPositionAuthorityAccount

func (inst *CollectReward) GetPositionAuthorityAccount() *ag_solanago.AccountMeta

GetPositionAuthorityAccount gets the "positionAuthority" account.

func (*CollectReward) GetPositionTokenAccountAccount

func (inst *CollectReward) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*CollectReward) GetRewardOwnerAccountAccount

func (inst *CollectReward) GetRewardOwnerAccountAccount() *ag_solanago.AccountMeta

GetRewardOwnerAccountAccount gets the "rewardOwnerAccount" account.

func (*CollectReward) GetRewardVaultAccount

func (inst *CollectReward) GetRewardVaultAccount() *ag_solanago.AccountMeta

GetRewardVaultAccount gets the "rewardVault" account.

func (*CollectReward) GetTokenProgramAccount

func (inst *CollectReward) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*CollectReward) GetWhirlpoolAccount

func (inst *CollectReward) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (CollectReward) MarshalWithEncoder

func (obj CollectReward) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*CollectReward) SetPositionAccount

func (inst *CollectReward) SetPositionAccount(position ag_solanago.PublicKey) *CollectReward

SetPositionAccount sets the "position" account.

func (*CollectReward) SetPositionAuthorityAccount

func (inst *CollectReward) SetPositionAuthorityAccount(positionAuthority ag_solanago.PublicKey) *CollectReward

SetPositionAuthorityAccount sets the "positionAuthority" account.

func (*CollectReward) SetPositionTokenAccountAccount

func (inst *CollectReward) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *CollectReward

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*CollectReward) SetRewardIndex

func (inst *CollectReward) SetRewardIndex(rewardIndex uint8) *CollectReward

SetRewardIndex sets the "rewardIndex" parameter.

func (*CollectReward) SetRewardOwnerAccountAccount

func (inst *CollectReward) SetRewardOwnerAccountAccount(rewardOwnerAccount ag_solanago.PublicKey) *CollectReward

SetRewardOwnerAccountAccount sets the "rewardOwnerAccount" account.

func (*CollectReward) SetRewardVaultAccount

func (inst *CollectReward) SetRewardVaultAccount(rewardVault ag_solanago.PublicKey) *CollectReward

SetRewardVaultAccount sets the "rewardVault" account.

func (*CollectReward) SetTokenProgramAccount

func (inst *CollectReward) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *CollectReward

SetTokenProgramAccount sets the "tokenProgram" account.

func (*CollectReward) SetWhirlpoolAccount

func (inst *CollectReward) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *CollectReward

SetWhirlpoolAccount sets the "whirlpool" account.

func (*CollectReward) UnmarshalWithDecoder

func (obj *CollectReward) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*CollectReward) Validate

func (inst *CollectReward) Validate() error

func (CollectReward) ValidateAndBuild

func (inst CollectReward) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type CollectRewardAccounts

type CollectRewardAccounts struct {
	Whirlpool            ag_solanago.PublicKey
	PositionAuthority    ag_solanago.PublicKey
	Position             ag_solanago.PublicKey
	PositionTokenAccount ag_solanago.PublicKey
	RewardOwnerAccount   ag_solanago.PublicKey
	RewardVault          ag_solanago.PublicKey
	TokenProgram         ag_solanago.PublicKey
}

type CurrIndex

type CurrIndex ag_binary.BorshEnum
const (
	CurrIndexBelow CurrIndex = iota
	CurrIndexInside
	CurrIndexAbove
)

func (CurrIndex) String

func (value CurrIndex) String() string

type DecreaseLiquidity

type DecreaseLiquidity struct {
	LiquidityAmount *ag_binary.Uint128
	TokenMinA       *uint64
	TokenMinB       *uint64

	// [0] = [WRITE] whirlpool
	//
	// [1] = [] tokenProgram
	//
	// [2] = [SIGNER] positionAuthority
	//
	// [3] = [WRITE] position
	//
	// [4] = [] positionTokenAccount
	//
	// [5] = [WRITE] tokenOwnerAccountA
	//
	// [6] = [WRITE] tokenOwnerAccountB
	//
	// [7] = [WRITE] tokenVaultA
	//
	// [8] = [WRITE] tokenVaultB
	//
	// [9] = [WRITE] tickArrayLower
	//
	// [10] = [WRITE] tickArrayUpper
	ag_solanago.AccountMetaSlice `bin:"-"`
}

DecreaseLiquidity is the `decreaseLiquidity` instruction.

func NewDecreaseLiquidityInstruction

func NewDecreaseLiquidityInstruction(

	liquidityAmount ag_binary.Uint128,
	tokenMinA uint64,
	tokenMinB uint64,

	whirlpool ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	positionAuthority ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	tokenOwnerAccountA ag_solanago.PublicKey,
	tokenOwnerAccountB ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	tickArrayLower ag_solanago.PublicKey,
	tickArrayUpper ag_solanago.PublicKey) *DecreaseLiquidity

NewDecreaseLiquidityInstruction declares a new DecreaseLiquidity instruction with the provided parameters and accounts.

func NewDecreaseLiquidityInstructionBuilder

func NewDecreaseLiquidityInstructionBuilder() *DecreaseLiquidity

NewDecreaseLiquidityInstructionBuilder creates a new `DecreaseLiquidity` instruction builder.

func (DecreaseLiquidity) Build

func (inst DecreaseLiquidity) Build() *Instruction

func (*DecreaseLiquidity) EncodeToTree

func (inst *DecreaseLiquidity) EncodeToTree(parent ag_treeout.Branches)

func (*DecreaseLiquidity) GetDecreaseLiquidityAccounts

func (inst *DecreaseLiquidity) GetDecreaseLiquidityAccounts() *DecreaseLiquidityAccounts

func (*DecreaseLiquidity) GetPositionAccount

func (inst *DecreaseLiquidity) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*DecreaseLiquidity) GetPositionAuthorityAccount

func (inst *DecreaseLiquidity) GetPositionAuthorityAccount() *ag_solanago.AccountMeta

GetPositionAuthorityAccount gets the "positionAuthority" account.

func (*DecreaseLiquidity) GetPositionTokenAccountAccount

func (inst *DecreaseLiquidity) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*DecreaseLiquidity) GetTickArrayLowerAccount

func (inst *DecreaseLiquidity) GetTickArrayLowerAccount() *ag_solanago.AccountMeta

GetTickArrayLowerAccount gets the "tickArrayLower" account.

func (*DecreaseLiquidity) GetTickArrayUpperAccount

func (inst *DecreaseLiquidity) GetTickArrayUpperAccount() *ag_solanago.AccountMeta

GetTickArrayUpperAccount gets the "tickArrayUpper" account.

func (*DecreaseLiquidity) GetTokenOwnerAccountAAccount

func (inst *DecreaseLiquidity) GetTokenOwnerAccountAAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountAAccount gets the "tokenOwnerAccountA" account.

func (*DecreaseLiquidity) GetTokenOwnerAccountBAccount

func (inst *DecreaseLiquidity) GetTokenOwnerAccountBAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountBAccount gets the "tokenOwnerAccountB" account.

func (*DecreaseLiquidity) GetTokenProgramAccount

func (inst *DecreaseLiquidity) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*DecreaseLiquidity) GetTokenVaultAAccount

func (inst *DecreaseLiquidity) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*DecreaseLiquidity) GetTokenVaultBAccount

func (inst *DecreaseLiquidity) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*DecreaseLiquidity) GetWhirlpoolAccount

func (inst *DecreaseLiquidity) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (DecreaseLiquidity) MarshalWithEncoder

func (obj DecreaseLiquidity) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*DecreaseLiquidity) SetLiquidityAmount

func (inst *DecreaseLiquidity) SetLiquidityAmount(liquidityAmount ag_binary.Uint128) *DecreaseLiquidity

SetLiquidityAmount sets the "liquidityAmount" parameter.

func (*DecreaseLiquidity) SetPositionAccount

func (inst *DecreaseLiquidity) SetPositionAccount(position ag_solanago.PublicKey) *DecreaseLiquidity

SetPositionAccount sets the "position" account.

func (*DecreaseLiquidity) SetPositionAuthorityAccount

func (inst *DecreaseLiquidity) SetPositionAuthorityAccount(positionAuthority ag_solanago.PublicKey) *DecreaseLiquidity

SetPositionAuthorityAccount sets the "positionAuthority" account.

func (*DecreaseLiquidity) SetPositionTokenAccountAccount

func (inst *DecreaseLiquidity) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *DecreaseLiquidity

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*DecreaseLiquidity) SetTickArrayLowerAccount

func (inst *DecreaseLiquidity) SetTickArrayLowerAccount(tickArrayLower ag_solanago.PublicKey) *DecreaseLiquidity

SetTickArrayLowerAccount sets the "tickArrayLower" account.

func (*DecreaseLiquidity) SetTickArrayUpperAccount

func (inst *DecreaseLiquidity) SetTickArrayUpperAccount(tickArrayUpper ag_solanago.PublicKey) *DecreaseLiquidity

SetTickArrayUpperAccount sets the "tickArrayUpper" account.

func (*DecreaseLiquidity) SetTokenMinA

func (inst *DecreaseLiquidity) SetTokenMinA(tokenMinA uint64) *DecreaseLiquidity

SetTokenMinA sets the "tokenMinA" parameter.

func (*DecreaseLiquidity) SetTokenMinB

func (inst *DecreaseLiquidity) SetTokenMinB(tokenMinB uint64) *DecreaseLiquidity

SetTokenMinB sets the "tokenMinB" parameter.

func (*DecreaseLiquidity) SetTokenOwnerAccountAAccount

func (inst *DecreaseLiquidity) SetTokenOwnerAccountAAccount(tokenOwnerAccountA ag_solanago.PublicKey) *DecreaseLiquidity

SetTokenOwnerAccountAAccount sets the "tokenOwnerAccountA" account.

func (*DecreaseLiquidity) SetTokenOwnerAccountBAccount

func (inst *DecreaseLiquidity) SetTokenOwnerAccountBAccount(tokenOwnerAccountB ag_solanago.PublicKey) *DecreaseLiquidity

SetTokenOwnerAccountBAccount sets the "tokenOwnerAccountB" account.

func (*DecreaseLiquidity) SetTokenProgramAccount

func (inst *DecreaseLiquidity) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *DecreaseLiquidity

SetTokenProgramAccount sets the "tokenProgram" account.

func (*DecreaseLiquidity) SetTokenVaultAAccount

func (inst *DecreaseLiquidity) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *DecreaseLiquidity

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*DecreaseLiquidity) SetTokenVaultBAccount

func (inst *DecreaseLiquidity) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *DecreaseLiquidity

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*DecreaseLiquidity) SetWhirlpoolAccount

func (inst *DecreaseLiquidity) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *DecreaseLiquidity

SetWhirlpoolAccount sets the "whirlpool" account.

func (*DecreaseLiquidity) UnmarshalWithDecoder

func (obj *DecreaseLiquidity) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*DecreaseLiquidity) Validate

func (inst *DecreaseLiquidity) Validate() error

func (DecreaseLiquidity) ValidateAndBuild

func (inst DecreaseLiquidity) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type DecreaseLiquidityAccounts

type DecreaseLiquidityAccounts struct {
	Whirlpool            ag_solanago.PublicKey
	TokenProgram         ag_solanago.PublicKey
	PositionAuthority    ag_solanago.PublicKey
	Position             ag_solanago.PublicKey
	PositionTokenAccount ag_solanago.PublicKey
	TokenOwnerAccountA   ag_solanago.PublicKey
	TokenOwnerAccountB   ag_solanago.PublicKey
	TokenVaultA          ag_solanago.PublicKey
	TokenVaultB          ag_solanago.PublicKey
	TickArrayLower       ag_solanago.PublicKey
	TickArrayUpper       ag_solanago.PublicKey
}

type Direction

type Direction ag_binary.BorshEnum
const (
	DirectionLeft Direction = iota
	DirectionRight
)

func (Direction) String

func (value Direction) String() string

type FeeTier

type FeeTier struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	TickSpacing      uint16
	DefaultFeeRate   uint16
}

func (FeeTier) MarshalWithEncoder

func (obj FeeTier) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*FeeTier) UnmarshalWithDecoder

func (obj *FeeTier) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type IncreaseLiquidity

type IncreaseLiquidity struct {
	LiquidityAmount *ag_binary.Uint128
	TokenMaxA       *uint64
	TokenMaxB       *uint64

	// [0] = [WRITE] whirlpool
	//
	// [1] = [] tokenProgram
	//
	// [2] = [SIGNER] positionAuthority
	//
	// [3] = [WRITE] position
	//
	// [4] = [] positionTokenAccount
	//
	// [5] = [WRITE] tokenOwnerAccountA
	//
	// [6] = [WRITE] tokenOwnerAccountB
	//
	// [7] = [WRITE] tokenVaultA
	//
	// [8] = [WRITE] tokenVaultB
	//
	// [9] = [WRITE] tickArrayLower
	//
	// [10] = [WRITE] tickArrayUpper
	ag_solanago.AccountMetaSlice `bin:"-"`
}

IncreaseLiquidity is the `increaseLiquidity` instruction.

func NewIncreaseLiquidityInstruction

func NewIncreaseLiquidityInstruction(

	liquidityAmount ag_binary.Uint128,
	tokenMaxA uint64,
	tokenMaxB uint64,

	whirlpool ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	positionAuthority ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	tokenOwnerAccountA ag_solanago.PublicKey,
	tokenOwnerAccountB ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	tickArrayLower ag_solanago.PublicKey,
	tickArrayUpper ag_solanago.PublicKey) *IncreaseLiquidity

NewIncreaseLiquidityInstruction declares a new IncreaseLiquidity instruction with the provided parameters and accounts.

func NewIncreaseLiquidityInstructionBuilder

func NewIncreaseLiquidityInstructionBuilder() *IncreaseLiquidity

NewIncreaseLiquidityInstructionBuilder creates a new `IncreaseLiquidity` instruction builder.

func (IncreaseLiquidity) Build

func (inst IncreaseLiquidity) Build() *Instruction

func (*IncreaseLiquidity) EncodeToTree

func (inst *IncreaseLiquidity) EncodeToTree(parent ag_treeout.Branches)

func (*IncreaseLiquidity) GetIncreaseLiquidityAccounts

func (inst *IncreaseLiquidity) GetIncreaseLiquidityAccounts() *IncreaseLiquidityAccounts

func (*IncreaseLiquidity) GetPositionAccount

func (inst *IncreaseLiquidity) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*IncreaseLiquidity) GetPositionAuthorityAccount

func (inst *IncreaseLiquidity) GetPositionAuthorityAccount() *ag_solanago.AccountMeta

GetPositionAuthorityAccount gets the "positionAuthority" account.

func (*IncreaseLiquidity) GetPositionTokenAccountAccount

func (inst *IncreaseLiquidity) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*IncreaseLiquidity) GetTickArrayLowerAccount

func (inst *IncreaseLiquidity) GetTickArrayLowerAccount() *ag_solanago.AccountMeta

GetTickArrayLowerAccount gets the "tickArrayLower" account.

func (*IncreaseLiquidity) GetTickArrayUpperAccount

func (inst *IncreaseLiquidity) GetTickArrayUpperAccount() *ag_solanago.AccountMeta

GetTickArrayUpperAccount gets the "tickArrayUpper" account.

func (*IncreaseLiquidity) GetTokenOwnerAccountAAccount

func (inst *IncreaseLiquidity) GetTokenOwnerAccountAAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountAAccount gets the "tokenOwnerAccountA" account.

func (*IncreaseLiquidity) GetTokenOwnerAccountBAccount

func (inst *IncreaseLiquidity) GetTokenOwnerAccountBAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountBAccount gets the "tokenOwnerAccountB" account.

func (*IncreaseLiquidity) GetTokenProgramAccount

func (inst *IncreaseLiquidity) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*IncreaseLiquidity) GetTokenVaultAAccount

func (inst *IncreaseLiquidity) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*IncreaseLiquidity) GetTokenVaultBAccount

func (inst *IncreaseLiquidity) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*IncreaseLiquidity) GetWhirlpoolAccount

func (inst *IncreaseLiquidity) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (IncreaseLiquidity) MarshalWithEncoder

func (obj IncreaseLiquidity) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*IncreaseLiquidity) SetLiquidityAmount

func (inst *IncreaseLiquidity) SetLiquidityAmount(liquidityAmount ag_binary.Uint128) *IncreaseLiquidity

SetLiquidityAmount sets the "liquidityAmount" parameter.

func (*IncreaseLiquidity) SetPositionAccount

func (inst *IncreaseLiquidity) SetPositionAccount(position ag_solanago.PublicKey) *IncreaseLiquidity

SetPositionAccount sets the "position" account.

func (*IncreaseLiquidity) SetPositionAuthorityAccount

func (inst *IncreaseLiquidity) SetPositionAuthorityAccount(positionAuthority ag_solanago.PublicKey) *IncreaseLiquidity

SetPositionAuthorityAccount sets the "positionAuthority" account.

func (*IncreaseLiquidity) SetPositionTokenAccountAccount

func (inst *IncreaseLiquidity) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *IncreaseLiquidity

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*IncreaseLiquidity) SetTickArrayLowerAccount

func (inst *IncreaseLiquidity) SetTickArrayLowerAccount(tickArrayLower ag_solanago.PublicKey) *IncreaseLiquidity

SetTickArrayLowerAccount sets the "tickArrayLower" account.

func (*IncreaseLiquidity) SetTickArrayUpperAccount

func (inst *IncreaseLiquidity) SetTickArrayUpperAccount(tickArrayUpper ag_solanago.PublicKey) *IncreaseLiquidity

SetTickArrayUpperAccount sets the "tickArrayUpper" account.

func (*IncreaseLiquidity) SetTokenMaxA

func (inst *IncreaseLiquidity) SetTokenMaxA(tokenMaxA uint64) *IncreaseLiquidity

SetTokenMaxA sets the "tokenMaxA" parameter.

func (*IncreaseLiquidity) SetTokenMaxB

func (inst *IncreaseLiquidity) SetTokenMaxB(tokenMaxB uint64) *IncreaseLiquidity

SetTokenMaxB sets the "tokenMaxB" parameter.

func (*IncreaseLiquidity) SetTokenOwnerAccountAAccount

func (inst *IncreaseLiquidity) SetTokenOwnerAccountAAccount(tokenOwnerAccountA ag_solanago.PublicKey) *IncreaseLiquidity

SetTokenOwnerAccountAAccount sets the "tokenOwnerAccountA" account.

func (*IncreaseLiquidity) SetTokenOwnerAccountBAccount

func (inst *IncreaseLiquidity) SetTokenOwnerAccountBAccount(tokenOwnerAccountB ag_solanago.PublicKey) *IncreaseLiquidity

SetTokenOwnerAccountBAccount sets the "tokenOwnerAccountB" account.

func (*IncreaseLiquidity) SetTokenProgramAccount

func (inst *IncreaseLiquidity) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *IncreaseLiquidity

SetTokenProgramAccount sets the "tokenProgram" account.

func (*IncreaseLiquidity) SetTokenVaultAAccount

func (inst *IncreaseLiquidity) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *IncreaseLiquidity

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*IncreaseLiquidity) SetTokenVaultBAccount

func (inst *IncreaseLiquidity) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *IncreaseLiquidity

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*IncreaseLiquidity) SetWhirlpoolAccount

func (inst *IncreaseLiquidity) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *IncreaseLiquidity

SetWhirlpoolAccount sets the "whirlpool" account.

func (*IncreaseLiquidity) UnmarshalWithDecoder

func (obj *IncreaseLiquidity) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*IncreaseLiquidity) Validate

func (inst *IncreaseLiquidity) Validate() error

func (IncreaseLiquidity) ValidateAndBuild

func (inst IncreaseLiquidity) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type IncreaseLiquidityAccounts

type IncreaseLiquidityAccounts struct {
	Whirlpool            ag_solanago.PublicKey
	TokenProgram         ag_solanago.PublicKey
	PositionAuthority    ag_solanago.PublicKey
	Position             ag_solanago.PublicKey
	PositionTokenAccount ag_solanago.PublicKey
	TokenOwnerAccountA   ag_solanago.PublicKey
	TokenOwnerAccountB   ag_solanago.PublicKey
	TokenVaultA          ag_solanago.PublicKey
	TokenVaultB          ag_solanago.PublicKey
	TickArrayLower       ag_solanago.PublicKey
	TickArrayUpper       ag_solanago.PublicKey
}

type InitializeConfig

type InitializeConfig struct {
	FeeAuthority                  *ag_solanago.PublicKey
	CollectProtocolFeesAuthority  *ag_solanago.PublicKey
	RewardEmissionsSuperAuthority *ag_solanago.PublicKey
	DefaultProtocolFeeRate        *uint16

	// [0] = [WRITE, SIGNER] config
	//
	// [1] = [WRITE, SIGNER] funder
	//
	// [2] = [] systemProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializeConfig is the `initializeConfig` instruction.

func NewInitializeConfigInstruction

func NewInitializeConfigInstruction(

	feeAuthority ag_solanago.PublicKey,
	collectProtocolFeesAuthority ag_solanago.PublicKey,
	rewardEmissionsSuperAuthority ag_solanago.PublicKey,
	defaultProtocolFeeRate uint16,

	config ag_solanago.PublicKey,
	funder ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey) *InitializeConfig

NewInitializeConfigInstruction declares a new InitializeConfig instruction with the provided parameters and accounts.

func NewInitializeConfigInstructionBuilder

func NewInitializeConfigInstructionBuilder() *InitializeConfig

NewInitializeConfigInstructionBuilder creates a new `InitializeConfig` instruction builder.

func (InitializeConfig) Build

func (inst InitializeConfig) Build() *Instruction

func (*InitializeConfig) EncodeToTree

func (inst *InitializeConfig) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeConfig) GetConfigAccount

func (inst *InitializeConfig) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (*InitializeConfig) GetFunderAccount

func (inst *InitializeConfig) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*InitializeConfig) GetInitializeConfigAccounts

func (inst *InitializeConfig) GetInitializeConfigAccounts() *InitializeConfigAccounts

func (*InitializeConfig) GetSystemProgramAccount

func (inst *InitializeConfig) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (InitializeConfig) MarshalWithEncoder

func (obj InitializeConfig) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeConfig) SetCollectProtocolFeesAuthority

func (inst *InitializeConfig) SetCollectProtocolFeesAuthority(collectProtocolFeesAuthority ag_solanago.PublicKey) *InitializeConfig

SetCollectProtocolFeesAuthority sets the "collectProtocolFeesAuthority" parameter.

func (*InitializeConfig) SetConfigAccount

func (inst *InitializeConfig) SetConfigAccount(config ag_solanago.PublicKey) *InitializeConfig

SetConfigAccount sets the "config" account.

func (*InitializeConfig) SetDefaultProtocolFeeRate

func (inst *InitializeConfig) SetDefaultProtocolFeeRate(defaultProtocolFeeRate uint16) *InitializeConfig

SetDefaultProtocolFeeRate sets the "defaultProtocolFeeRate" parameter.

func (*InitializeConfig) SetFeeAuthority

func (inst *InitializeConfig) SetFeeAuthority(feeAuthority ag_solanago.PublicKey) *InitializeConfig

SetFeeAuthority sets the "feeAuthority" parameter.

func (*InitializeConfig) SetFunderAccount

func (inst *InitializeConfig) SetFunderAccount(funder ag_solanago.PublicKey) *InitializeConfig

SetFunderAccount sets the "funder" account.

func (*InitializeConfig) SetRewardEmissionsSuperAuthority

func (inst *InitializeConfig) SetRewardEmissionsSuperAuthority(rewardEmissionsSuperAuthority ag_solanago.PublicKey) *InitializeConfig

SetRewardEmissionsSuperAuthority sets the "rewardEmissionsSuperAuthority" parameter.

func (*InitializeConfig) SetSystemProgramAccount

func (inst *InitializeConfig) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializeConfig

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializeConfig) UnmarshalWithDecoder

func (obj *InitializeConfig) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeConfig) Validate

func (inst *InitializeConfig) Validate() error

func (InitializeConfig) ValidateAndBuild

func (inst InitializeConfig) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeConfigAccounts

type InitializeConfigAccounts struct {
	Config        ag_solanago.PublicKey
	Funder        ag_solanago.PublicKey
	SystemProgram ag_solanago.PublicKey
}

type InitializeFeeTier

type InitializeFeeTier struct {
	TickSpacing    *uint16
	DefaultFeeRate *uint16

	// [0] = [] config
	//
	// [1] = [WRITE] feeTier
	//
	// [2] = [WRITE, SIGNER] funder
	//
	// [3] = [SIGNER] feeAuthority
	//
	// [4] = [] systemProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializeFeeTier is the `initializeFeeTier` instruction.

func NewInitializeFeeTierInstruction

func NewInitializeFeeTierInstruction(

	tickSpacing uint16,
	defaultFeeRate uint16,

	config ag_solanago.PublicKey,
	feeTier ag_solanago.PublicKey,
	funder ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey) *InitializeFeeTier

NewInitializeFeeTierInstruction declares a new InitializeFeeTier instruction with the provided parameters and accounts.

func NewInitializeFeeTierInstructionBuilder

func NewInitializeFeeTierInstructionBuilder() *InitializeFeeTier

NewInitializeFeeTierInstructionBuilder creates a new `InitializeFeeTier` instruction builder.

func (InitializeFeeTier) Build

func (inst InitializeFeeTier) Build() *Instruction

func (*InitializeFeeTier) EncodeToTree

func (inst *InitializeFeeTier) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeFeeTier) GetConfigAccount

func (inst *InitializeFeeTier) GetConfigAccount() *ag_solanago.AccountMeta

GetConfigAccount gets the "config" account.

func (*InitializeFeeTier) GetFeeAuthorityAccount

func (inst *InitializeFeeTier) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*InitializeFeeTier) GetFeeTierAccount

func (inst *InitializeFeeTier) GetFeeTierAccount() *ag_solanago.AccountMeta

GetFeeTierAccount gets the "feeTier" account.

func (*InitializeFeeTier) GetFunderAccount

func (inst *InitializeFeeTier) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*InitializeFeeTier) GetInitializeFeeTierAccounts

func (inst *InitializeFeeTier) GetInitializeFeeTierAccounts() *InitializeFeeTierAccounts

func (*InitializeFeeTier) GetSystemProgramAccount

func (inst *InitializeFeeTier) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (InitializeFeeTier) MarshalWithEncoder

func (obj InitializeFeeTier) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeFeeTier) SetConfigAccount

func (inst *InitializeFeeTier) SetConfigAccount(config ag_solanago.PublicKey) *InitializeFeeTier

SetConfigAccount sets the "config" account.

func (*InitializeFeeTier) SetDefaultFeeRate

func (inst *InitializeFeeTier) SetDefaultFeeRate(defaultFeeRate uint16) *InitializeFeeTier

SetDefaultFeeRate sets the "defaultFeeRate" parameter.

func (*InitializeFeeTier) SetFeeAuthorityAccount

func (inst *InitializeFeeTier) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *InitializeFeeTier

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*InitializeFeeTier) SetFeeTierAccount

func (inst *InitializeFeeTier) SetFeeTierAccount(feeTier ag_solanago.PublicKey) *InitializeFeeTier

SetFeeTierAccount sets the "feeTier" account.

func (*InitializeFeeTier) SetFunderAccount

func (inst *InitializeFeeTier) SetFunderAccount(funder ag_solanago.PublicKey) *InitializeFeeTier

SetFunderAccount sets the "funder" account.

func (*InitializeFeeTier) SetSystemProgramAccount

func (inst *InitializeFeeTier) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializeFeeTier

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializeFeeTier) SetTickSpacing

func (inst *InitializeFeeTier) SetTickSpacing(tickSpacing uint16) *InitializeFeeTier

SetTickSpacing sets the "tickSpacing" parameter.

func (*InitializeFeeTier) UnmarshalWithDecoder

func (obj *InitializeFeeTier) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeFeeTier) Validate

func (inst *InitializeFeeTier) Validate() error

func (InitializeFeeTier) ValidateAndBuild

func (inst InitializeFeeTier) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeFeeTierAccounts

type InitializeFeeTierAccounts struct {
	Config        ag_solanago.PublicKey
	FeeTier       ag_solanago.PublicKey
	Funder        ag_solanago.PublicKey
	FeeAuthority  ag_solanago.PublicKey
	SystemProgram ag_solanago.PublicKey
}

type InitializePool

type InitializePool struct {
	Bumps            *WhirlpoolBumps
	TickSpacing      *uint16
	InitialSqrtPrice *ag_binary.Uint128

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [] tokenMintA
	//
	// [2] = [] tokenMintB
	//
	// [3] = [WRITE, SIGNER] funder
	//
	// [4] = [WRITE] whirlpool
	//
	// [5] = [WRITE, SIGNER] tokenVaultA
	//
	// [6] = [WRITE, SIGNER] tokenVaultB
	//
	// [7] = [] feeTier
	//
	// [8] = [] tokenProgram
	//
	// [9] = [] systemProgram
	//
	// [10] = [] rent
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializePool is the `initializePool` instruction.

func NewInitializePoolInstruction

func NewInitializePoolInstruction(

	bumps WhirlpoolBumps,
	tickSpacing uint16,
	initialSqrtPrice ag_binary.Uint128,

	whirlpoolsConfig ag_solanago.PublicKey,
	tokenMintA ag_solanago.PublicKey,
	tokenMintB ag_solanago.PublicKey,
	funder ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	feeTier ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey) *InitializePool

NewInitializePoolInstruction declares a new InitializePool instruction with the provided parameters and accounts.

func NewInitializePoolInstructionBuilder

func NewInitializePoolInstructionBuilder() *InitializePool

NewInitializePoolInstructionBuilder creates a new `InitializePool` instruction builder.

func (InitializePool) Build

func (inst InitializePool) Build() *Instruction

func (*InitializePool) EncodeToTree

func (inst *InitializePool) EncodeToTree(parent ag_treeout.Branches)

func (*InitializePool) GetFeeTierAccount

func (inst *InitializePool) GetFeeTierAccount() *ag_solanago.AccountMeta

GetFeeTierAccount gets the "feeTier" account.

func (*InitializePool) GetFunderAccount

func (inst *InitializePool) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*InitializePool) GetInitializePoolAccounts

func (inst *InitializePool) GetInitializePoolAccounts() *InitializePoolAccounts

func (*InitializePool) GetRentAccount

func (inst *InitializePool) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*InitializePool) GetSystemProgramAccount

func (inst *InitializePool) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitializePool) GetTokenMintAAccount

func (inst *InitializePool) GetTokenMintAAccount() *ag_solanago.AccountMeta

GetTokenMintAAccount gets the "tokenMintA" account.

func (*InitializePool) GetTokenMintBAccount

func (inst *InitializePool) GetTokenMintBAccount() *ag_solanago.AccountMeta

GetTokenMintBAccount gets the "tokenMintB" account.

func (*InitializePool) GetTokenProgramAccount

func (inst *InitializePool) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*InitializePool) GetTokenVaultAAccount

func (inst *InitializePool) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*InitializePool) GetTokenVaultBAccount

func (inst *InitializePool) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*InitializePool) GetWhirlpoolAccount

func (inst *InitializePool) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (*InitializePool) GetWhirlpoolsConfigAccount

func (inst *InitializePool) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (InitializePool) MarshalWithEncoder

func (obj InitializePool) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializePool) SetBumps

func (inst *InitializePool) SetBumps(bumps WhirlpoolBumps) *InitializePool

SetBumps sets the "bumps" parameter.

func (*InitializePool) SetFeeTierAccount

func (inst *InitializePool) SetFeeTierAccount(feeTier ag_solanago.PublicKey) *InitializePool

SetFeeTierAccount sets the "feeTier" account.

func (*InitializePool) SetFunderAccount

func (inst *InitializePool) SetFunderAccount(funder ag_solanago.PublicKey) *InitializePool

SetFunderAccount sets the "funder" account.

func (*InitializePool) SetInitialSqrtPrice

func (inst *InitializePool) SetInitialSqrtPrice(initialSqrtPrice ag_binary.Uint128) *InitializePool

SetInitialSqrtPrice sets the "initialSqrtPrice" parameter.

func (*InitializePool) SetRentAccount

func (inst *InitializePool) SetRentAccount(rent ag_solanago.PublicKey) *InitializePool

SetRentAccount sets the "rent" account.

func (*InitializePool) SetSystemProgramAccount

func (inst *InitializePool) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializePool

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializePool) SetTickSpacing

func (inst *InitializePool) SetTickSpacing(tickSpacing uint16) *InitializePool

SetTickSpacing sets the "tickSpacing" parameter.

func (*InitializePool) SetTokenMintAAccount

func (inst *InitializePool) SetTokenMintAAccount(tokenMintA ag_solanago.PublicKey) *InitializePool

SetTokenMintAAccount sets the "tokenMintA" account.

func (*InitializePool) SetTokenMintBAccount

func (inst *InitializePool) SetTokenMintBAccount(tokenMintB ag_solanago.PublicKey) *InitializePool

SetTokenMintBAccount sets the "tokenMintB" account.

func (*InitializePool) SetTokenProgramAccount

func (inst *InitializePool) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *InitializePool

SetTokenProgramAccount sets the "tokenProgram" account.

func (*InitializePool) SetTokenVaultAAccount

func (inst *InitializePool) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *InitializePool

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*InitializePool) SetTokenVaultBAccount

func (inst *InitializePool) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *InitializePool

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*InitializePool) SetWhirlpoolAccount

func (inst *InitializePool) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *InitializePool

SetWhirlpoolAccount sets the "whirlpool" account.

func (*InitializePool) SetWhirlpoolsConfigAccount

func (inst *InitializePool) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *InitializePool

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*InitializePool) UnmarshalWithDecoder

func (obj *InitializePool) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializePool) Validate

func (inst *InitializePool) Validate() error

func (InitializePool) ValidateAndBuild

func (inst InitializePool) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializePoolAccounts

type InitializePoolAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	TokenMintA       ag_solanago.PublicKey
	TokenMintB       ag_solanago.PublicKey
	Funder           ag_solanago.PublicKey
	Whirlpool        ag_solanago.PublicKey
	TokenVaultA      ag_solanago.PublicKey
	TokenVaultB      ag_solanago.PublicKey
	FeeTier          ag_solanago.PublicKey
	TokenProgram     ag_solanago.PublicKey
	SystemProgram    ag_solanago.PublicKey
	Rent             ag_solanago.PublicKey
}

type InitializeReward

type InitializeReward struct {
	RewardIndex *uint8

	// [0] = [SIGNER] rewardAuthority
	//
	// [1] = [WRITE, SIGNER] funder
	//
	// [2] = [WRITE] whirlpool
	//
	// [3] = [] rewardMint
	//
	// [4] = [WRITE, SIGNER] rewardVault
	//
	// [5] = [] tokenProgram
	//
	// [6] = [] systemProgram
	//
	// [7] = [] rent
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializeReward is the `initializeReward` instruction.

func NewInitializeRewardInstruction

func NewInitializeRewardInstruction(

	rewardIndex uint8,

	rewardAuthority ag_solanago.PublicKey,
	funder ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	rewardMint ag_solanago.PublicKey,
	rewardVault ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey) *InitializeReward

NewInitializeRewardInstruction declares a new InitializeReward instruction with the provided parameters and accounts.

func NewInitializeRewardInstructionBuilder

func NewInitializeRewardInstructionBuilder() *InitializeReward

NewInitializeRewardInstructionBuilder creates a new `InitializeReward` instruction builder.

func (InitializeReward) Build

func (inst InitializeReward) Build() *Instruction

func (*InitializeReward) EncodeToTree

func (inst *InitializeReward) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeReward) GetFunderAccount

func (inst *InitializeReward) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*InitializeReward) GetInitializeRewardAccounts

func (inst *InitializeReward) GetInitializeRewardAccounts() *InitializeRewardAccounts

func (*InitializeReward) GetRentAccount

func (inst *InitializeReward) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*InitializeReward) GetRewardAuthorityAccount

func (inst *InitializeReward) GetRewardAuthorityAccount() *ag_solanago.AccountMeta

GetRewardAuthorityAccount gets the "rewardAuthority" account.

func (*InitializeReward) GetRewardMintAccount

func (inst *InitializeReward) GetRewardMintAccount() *ag_solanago.AccountMeta

GetRewardMintAccount gets the "rewardMint" account.

func (*InitializeReward) GetRewardVaultAccount

func (inst *InitializeReward) GetRewardVaultAccount() *ag_solanago.AccountMeta

GetRewardVaultAccount gets the "rewardVault" account.

func (*InitializeReward) GetSystemProgramAccount

func (inst *InitializeReward) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitializeReward) GetTokenProgramAccount

func (inst *InitializeReward) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*InitializeReward) GetWhirlpoolAccount

func (inst *InitializeReward) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (InitializeReward) MarshalWithEncoder

func (obj InitializeReward) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeReward) SetFunderAccount

func (inst *InitializeReward) SetFunderAccount(funder ag_solanago.PublicKey) *InitializeReward

SetFunderAccount sets the "funder" account.

func (*InitializeReward) SetRentAccount

func (inst *InitializeReward) SetRentAccount(rent ag_solanago.PublicKey) *InitializeReward

SetRentAccount sets the "rent" account.

func (*InitializeReward) SetRewardAuthorityAccount

func (inst *InitializeReward) SetRewardAuthorityAccount(rewardAuthority ag_solanago.PublicKey) *InitializeReward

SetRewardAuthorityAccount sets the "rewardAuthority" account.

func (*InitializeReward) SetRewardIndex

func (inst *InitializeReward) SetRewardIndex(rewardIndex uint8) *InitializeReward

SetRewardIndex sets the "rewardIndex" parameter.

func (*InitializeReward) SetRewardMintAccount

func (inst *InitializeReward) SetRewardMintAccount(rewardMint ag_solanago.PublicKey) *InitializeReward

SetRewardMintAccount sets the "rewardMint" account.

func (*InitializeReward) SetRewardVaultAccount

func (inst *InitializeReward) SetRewardVaultAccount(rewardVault ag_solanago.PublicKey) *InitializeReward

SetRewardVaultAccount sets the "rewardVault" account.

func (*InitializeReward) SetSystemProgramAccount

func (inst *InitializeReward) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializeReward

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializeReward) SetTokenProgramAccount

func (inst *InitializeReward) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *InitializeReward

SetTokenProgramAccount sets the "tokenProgram" account.

func (*InitializeReward) SetWhirlpoolAccount

func (inst *InitializeReward) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *InitializeReward

SetWhirlpoolAccount sets the "whirlpool" account.

func (*InitializeReward) UnmarshalWithDecoder

func (obj *InitializeReward) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeReward) Validate

func (inst *InitializeReward) Validate() error

func (InitializeReward) ValidateAndBuild

func (inst InitializeReward) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeRewardAccounts

type InitializeRewardAccounts struct {
	RewardAuthority ag_solanago.PublicKey
	Funder          ag_solanago.PublicKey
	Whirlpool       ag_solanago.PublicKey
	RewardMint      ag_solanago.PublicKey
	RewardVault     ag_solanago.PublicKey
	TokenProgram    ag_solanago.PublicKey
	SystemProgram   ag_solanago.PublicKey
	Rent            ag_solanago.PublicKey
}

type InitializeTickArray

type InitializeTickArray struct {
	StartTickIndex *int32

	// [0] = [] whirlpool
	//
	// [1] = [WRITE, SIGNER] funder
	//
	// [2] = [WRITE] tickArray
	//
	// [3] = [] systemProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializeTickArray is the `initializeTickArray` instruction.

func NewInitializeTickArrayInstruction

func NewInitializeTickArrayInstruction(

	startTickIndex int32,

	whirlpool ag_solanago.PublicKey,
	funder ag_solanago.PublicKey,
	tickArray ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey) *InitializeTickArray

NewInitializeTickArrayInstruction declares a new InitializeTickArray instruction with the provided parameters and accounts.

func NewInitializeTickArrayInstructionBuilder

func NewInitializeTickArrayInstructionBuilder() *InitializeTickArray

NewInitializeTickArrayInstructionBuilder creates a new `InitializeTickArray` instruction builder.

func (InitializeTickArray) Build

func (inst InitializeTickArray) Build() *Instruction

func (*InitializeTickArray) EncodeToTree

func (inst *InitializeTickArray) EncodeToTree(parent ag_treeout.Branches)

func (*InitializeTickArray) GetFunderAccount

func (inst *InitializeTickArray) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*InitializeTickArray) GetInitializeTickArrayAccounts

func (inst *InitializeTickArray) GetInitializeTickArrayAccounts() *InitializeTickArrayAccounts

func (*InitializeTickArray) GetSystemProgramAccount

func (inst *InitializeTickArray) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitializeTickArray) GetTickArrayAccount

func (inst *InitializeTickArray) GetTickArrayAccount() *ag_solanago.AccountMeta

GetTickArrayAccount gets the "tickArray" account.

func (*InitializeTickArray) GetWhirlpoolAccount

func (inst *InitializeTickArray) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (InitializeTickArray) MarshalWithEncoder

func (obj InitializeTickArray) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*InitializeTickArray) SetFunderAccount

func (inst *InitializeTickArray) SetFunderAccount(funder ag_solanago.PublicKey) *InitializeTickArray

SetFunderAccount sets the "funder" account.

func (*InitializeTickArray) SetStartTickIndex

func (inst *InitializeTickArray) SetStartTickIndex(startTickIndex int32) *InitializeTickArray

SetStartTickIndex sets the "startTickIndex" parameter.

func (*InitializeTickArray) SetSystemProgramAccount

func (inst *InitializeTickArray) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *InitializeTickArray

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitializeTickArray) SetTickArrayAccount

func (inst *InitializeTickArray) SetTickArrayAccount(tickArray ag_solanago.PublicKey) *InitializeTickArray

SetTickArrayAccount sets the "tickArray" account.

func (*InitializeTickArray) SetWhirlpoolAccount

func (inst *InitializeTickArray) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *InitializeTickArray

SetWhirlpoolAccount sets the "whirlpool" account.

func (*InitializeTickArray) UnmarshalWithDecoder

func (obj *InitializeTickArray) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*InitializeTickArray) Validate

func (inst *InitializeTickArray) Validate() error

func (InitializeTickArray) ValidateAndBuild

func (inst InitializeTickArray) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type InitializeTickArrayAccounts

type InitializeTickArrayAccounts struct {
	Whirlpool     ag_solanago.PublicKey
	Funder        ag_solanago.PublicKey
	TickArray     ag_solanago.PublicKey
	SystemProgram ag_solanago.PublicKey
}

type Instruction

type Instruction struct {
	ag_binary.BaseVariant
}

func DecodeInstruction

func DecodeInstruction(accounts []*ag_solanago.AccountMeta, data []byte) (*Instruction, error)

func (*Instruction) Accounts

func (inst *Instruction) Accounts() (out []*ag_solanago.AccountMeta)

func (*Instruction) Data

func (inst *Instruction) Data() ([]byte, error)

func (*Instruction) EncodeToTree

func (inst *Instruction) EncodeToTree(parent ag_treeout.Branches)

func (*Instruction) MarshalWithEncoder

func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error

func (*Instruction) ProgramID

func (inst *Instruction) ProgramID() ag_solanago.PublicKey

func (*Instruction) TextEncode

func (inst *Instruction) TextEncode(encoder *ag_text.Encoder, option *ag_text.Option) error

func (*Instruction) UnmarshalWithDecoder

func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error

type OpenPosition

type OpenPosition struct {
	Bumps          *OpenPositionBumps
	TickLowerIndex *int32
	TickUpperIndex *int32

	// [0] = [WRITE, SIGNER] funder
	//
	// [1] = [] owner
	//
	// [2] = [WRITE] position
	//
	// [3] = [WRITE, SIGNER] positionMint
	//
	// [4] = [WRITE] positionTokenAccount
	//
	// [5] = [] whirlpool
	//
	// [6] = [] tokenProgram
	//
	// [7] = [] systemProgram
	//
	// [8] = [] rent
	//
	// [9] = [] associatedTokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

OpenPosition is the `openPosition` instruction.

func NewOpenPositionInstruction

func NewOpenPositionInstruction(

	bumps OpenPositionBumps,
	tickLowerIndex int32,
	tickUpperIndex int32,

	funder ag_solanago.PublicKey,
	owner ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionMint ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey,
	associatedTokenProgram ag_solanago.PublicKey) *OpenPosition

NewOpenPositionInstruction declares a new OpenPosition instruction with the provided parameters and accounts.

func NewOpenPositionInstructionBuilder

func NewOpenPositionInstructionBuilder() *OpenPosition

NewOpenPositionInstructionBuilder creates a new `OpenPosition` instruction builder.

func (OpenPosition) Build

func (inst OpenPosition) Build() *Instruction

func (*OpenPosition) EncodeToTree

func (inst *OpenPosition) EncodeToTree(parent ag_treeout.Branches)

func (*OpenPosition) GetAssociatedTokenProgramAccount

func (inst *OpenPosition) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta

GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.

func (*OpenPosition) GetFunderAccount

func (inst *OpenPosition) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*OpenPosition) GetOpenPositionAccounts

func (inst *OpenPosition) GetOpenPositionAccounts() *OpenPositionAccounts

func (*OpenPosition) GetOwnerAccount

func (inst *OpenPosition) GetOwnerAccount() *ag_solanago.AccountMeta

GetOwnerAccount gets the "owner" account.

func (*OpenPosition) GetPositionAccount

func (inst *OpenPosition) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*OpenPosition) GetPositionMintAccount

func (inst *OpenPosition) GetPositionMintAccount() *ag_solanago.AccountMeta

GetPositionMintAccount gets the "positionMint" account.

func (*OpenPosition) GetPositionTokenAccountAccount

func (inst *OpenPosition) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*OpenPosition) GetRentAccount

func (inst *OpenPosition) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*OpenPosition) GetSystemProgramAccount

func (inst *OpenPosition) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*OpenPosition) GetTokenProgramAccount

func (inst *OpenPosition) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*OpenPosition) GetWhirlpoolAccount

func (inst *OpenPosition) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (OpenPosition) MarshalWithEncoder

func (obj OpenPosition) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*OpenPosition) SetAssociatedTokenProgramAccount

func (inst *OpenPosition) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *OpenPosition

SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.

func (*OpenPosition) SetBumps

func (inst *OpenPosition) SetBumps(bumps OpenPositionBumps) *OpenPosition

SetBumps sets the "bumps" parameter.

func (*OpenPosition) SetFunderAccount

func (inst *OpenPosition) SetFunderAccount(funder ag_solanago.PublicKey) *OpenPosition

SetFunderAccount sets the "funder" account.

func (*OpenPosition) SetOwnerAccount

func (inst *OpenPosition) SetOwnerAccount(owner ag_solanago.PublicKey) *OpenPosition

SetOwnerAccount sets the "owner" account.

func (*OpenPosition) SetPositionAccount

func (inst *OpenPosition) SetPositionAccount(position ag_solanago.PublicKey) *OpenPosition

SetPositionAccount sets the "position" account.

func (*OpenPosition) SetPositionMintAccount

func (inst *OpenPosition) SetPositionMintAccount(positionMint ag_solanago.PublicKey) *OpenPosition

SetPositionMintAccount sets the "positionMint" account.

func (*OpenPosition) SetPositionTokenAccountAccount

func (inst *OpenPosition) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *OpenPosition

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*OpenPosition) SetRentAccount

func (inst *OpenPosition) SetRentAccount(rent ag_solanago.PublicKey) *OpenPosition

SetRentAccount sets the "rent" account.

func (*OpenPosition) SetSystemProgramAccount

func (inst *OpenPosition) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *OpenPosition

SetSystemProgramAccount sets the "systemProgram" account.

func (*OpenPosition) SetTickLowerIndex

func (inst *OpenPosition) SetTickLowerIndex(tickLowerIndex int32) *OpenPosition

SetTickLowerIndex sets the "tickLowerIndex" parameter.

func (*OpenPosition) SetTickUpperIndex

func (inst *OpenPosition) SetTickUpperIndex(tickUpperIndex int32) *OpenPosition

SetTickUpperIndex sets the "tickUpperIndex" parameter.

func (*OpenPosition) SetTokenProgramAccount

func (inst *OpenPosition) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *OpenPosition

SetTokenProgramAccount sets the "tokenProgram" account.

func (*OpenPosition) SetWhirlpoolAccount

func (inst *OpenPosition) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *OpenPosition

SetWhirlpoolAccount sets the "whirlpool" account.

func (*OpenPosition) UnmarshalWithDecoder

func (obj *OpenPosition) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*OpenPosition) Validate

func (inst *OpenPosition) Validate() error

func (OpenPosition) ValidateAndBuild

func (inst OpenPosition) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type OpenPositionAccounts

type OpenPositionAccounts struct {
	Funder                 ag_solanago.PublicKey
	Owner                  ag_solanago.PublicKey
	Position               ag_solanago.PublicKey
	PositionMint           ag_solanago.PublicKey
	PositionTokenAccount   ag_solanago.PublicKey
	Whirlpool              ag_solanago.PublicKey
	TokenProgram           ag_solanago.PublicKey
	SystemProgram          ag_solanago.PublicKey
	Rent                   ag_solanago.PublicKey
	AssociatedTokenProgram ag_solanago.PublicKey
}

type OpenPositionBumps

type OpenPositionBumps struct {
	PositionBump uint8
}

func (OpenPositionBumps) MarshalWithEncoder

func (obj OpenPositionBumps) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*OpenPositionBumps) UnmarshalWithDecoder

func (obj *OpenPositionBumps) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type OpenPositionWithMetadata

type OpenPositionWithMetadata struct {
	Bumps          *OpenPositionWithMetadataBumps
	TickLowerIndex *int32
	TickUpperIndex *int32

	// [0] = [WRITE, SIGNER] funder
	//
	// [1] = [] owner
	//
	// [2] = [WRITE] position
	//
	// [3] = [WRITE, SIGNER] positionMint
	//
	// [4] = [WRITE] positionMetadataAccount
	//
	// [5] = [WRITE] positionTokenAccount
	//
	// [6] = [] whirlpool
	//
	// [7] = [] tokenProgram
	//
	// [8] = [] systemProgram
	//
	// [9] = [] rent
	//
	// [10] = [] associatedTokenProgram
	//
	// [11] = [] metadataProgram
	//
	// [12] = [] metadataUpdateAuth
	ag_solanago.AccountMetaSlice `bin:"-"`
}

OpenPositionWithMetadata is the `openPositionWithMetadata` instruction.

func NewOpenPositionWithMetadataInstruction

func NewOpenPositionWithMetadataInstruction(

	bumps OpenPositionWithMetadataBumps,
	tickLowerIndex int32,
	tickUpperIndex int32,

	funder ag_solanago.PublicKey,
	owner ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	positionMint ag_solanago.PublicKey,
	positionMetadataAccount ag_solanago.PublicKey,
	positionTokenAccount ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey,
	associatedTokenProgram ag_solanago.PublicKey,
	metadataProgram ag_solanago.PublicKey,
	metadataUpdateAuth ag_solanago.PublicKey) *OpenPositionWithMetadata

NewOpenPositionWithMetadataInstruction declares a new OpenPositionWithMetadata instruction with the provided parameters and accounts.

func NewOpenPositionWithMetadataInstructionBuilder

func NewOpenPositionWithMetadataInstructionBuilder() *OpenPositionWithMetadata

NewOpenPositionWithMetadataInstructionBuilder creates a new `OpenPositionWithMetadata` instruction builder.

func (OpenPositionWithMetadata) Build

func (inst OpenPositionWithMetadata) Build() *Instruction

func (*OpenPositionWithMetadata) EncodeToTree

func (inst *OpenPositionWithMetadata) EncodeToTree(parent ag_treeout.Branches)

func (*OpenPositionWithMetadata) GetAssociatedTokenProgramAccount

func (inst *OpenPositionWithMetadata) GetAssociatedTokenProgramAccount() *ag_solanago.AccountMeta

GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.

func (*OpenPositionWithMetadata) GetFunderAccount

func (inst *OpenPositionWithMetadata) GetFunderAccount() *ag_solanago.AccountMeta

GetFunderAccount gets the "funder" account.

func (*OpenPositionWithMetadata) GetMetadataProgramAccount

func (inst *OpenPositionWithMetadata) GetMetadataProgramAccount() *ag_solanago.AccountMeta

GetMetadataProgramAccount gets the "metadataProgram" account.

func (*OpenPositionWithMetadata) GetMetadataUpdateAuthAccount

func (inst *OpenPositionWithMetadata) GetMetadataUpdateAuthAccount() *ag_solanago.AccountMeta

GetMetadataUpdateAuthAccount gets the "metadataUpdateAuth" account.

func (*OpenPositionWithMetadata) GetOpenPositionWithMetadataAccounts

func (inst *OpenPositionWithMetadata) GetOpenPositionWithMetadataAccounts() *OpenPositionWithMetadataAccounts

func (*OpenPositionWithMetadata) GetOwnerAccount

func (inst *OpenPositionWithMetadata) GetOwnerAccount() *ag_solanago.AccountMeta

GetOwnerAccount gets the "owner" account.

func (*OpenPositionWithMetadata) GetPositionAccount

func (inst *OpenPositionWithMetadata) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*OpenPositionWithMetadata) GetPositionMetadataAccountAccount

func (inst *OpenPositionWithMetadata) GetPositionMetadataAccountAccount() *ag_solanago.AccountMeta

GetPositionMetadataAccountAccount gets the "positionMetadataAccount" account.

func (*OpenPositionWithMetadata) GetPositionMintAccount

func (inst *OpenPositionWithMetadata) GetPositionMintAccount() *ag_solanago.AccountMeta

GetPositionMintAccount gets the "positionMint" account.

func (*OpenPositionWithMetadata) GetPositionTokenAccountAccount

func (inst *OpenPositionWithMetadata) GetPositionTokenAccountAccount() *ag_solanago.AccountMeta

GetPositionTokenAccountAccount gets the "positionTokenAccount" account.

func (*OpenPositionWithMetadata) GetRentAccount

func (inst *OpenPositionWithMetadata) GetRentAccount() *ag_solanago.AccountMeta

GetRentAccount gets the "rent" account.

func (*OpenPositionWithMetadata) GetSystemProgramAccount

func (inst *OpenPositionWithMetadata) GetSystemProgramAccount() *ag_solanago.AccountMeta

GetSystemProgramAccount gets the "systemProgram" account.

func (*OpenPositionWithMetadata) GetTokenProgramAccount

func (inst *OpenPositionWithMetadata) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*OpenPositionWithMetadata) GetWhirlpoolAccount

func (inst *OpenPositionWithMetadata) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (OpenPositionWithMetadata) MarshalWithEncoder

func (obj OpenPositionWithMetadata) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*OpenPositionWithMetadata) SetAssociatedTokenProgramAccount

func (inst *OpenPositionWithMetadata) SetAssociatedTokenProgramAccount(associatedTokenProgram ag_solanago.PublicKey) *OpenPositionWithMetadata

SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.

func (*OpenPositionWithMetadata) SetBumps

SetBumps sets the "bumps" parameter.

func (*OpenPositionWithMetadata) SetFunderAccount

SetFunderAccount sets the "funder" account.

func (*OpenPositionWithMetadata) SetMetadataProgramAccount

func (inst *OpenPositionWithMetadata) SetMetadataProgramAccount(metadataProgram ag_solanago.PublicKey) *OpenPositionWithMetadata

SetMetadataProgramAccount sets the "metadataProgram" account.

func (*OpenPositionWithMetadata) SetMetadataUpdateAuthAccount

func (inst *OpenPositionWithMetadata) SetMetadataUpdateAuthAccount(metadataUpdateAuth ag_solanago.PublicKey) *OpenPositionWithMetadata

SetMetadataUpdateAuthAccount sets the "metadataUpdateAuth" account.

func (*OpenPositionWithMetadata) SetOwnerAccount

SetOwnerAccount sets the "owner" account.

func (*OpenPositionWithMetadata) SetPositionAccount

func (inst *OpenPositionWithMetadata) SetPositionAccount(position ag_solanago.PublicKey) *OpenPositionWithMetadata

SetPositionAccount sets the "position" account.

func (*OpenPositionWithMetadata) SetPositionMetadataAccountAccount

func (inst *OpenPositionWithMetadata) SetPositionMetadataAccountAccount(positionMetadataAccount ag_solanago.PublicKey) *OpenPositionWithMetadata

SetPositionMetadataAccountAccount sets the "positionMetadataAccount" account.

func (*OpenPositionWithMetadata) SetPositionMintAccount

func (inst *OpenPositionWithMetadata) SetPositionMintAccount(positionMint ag_solanago.PublicKey) *OpenPositionWithMetadata

SetPositionMintAccount sets the "positionMint" account.

func (*OpenPositionWithMetadata) SetPositionTokenAccountAccount

func (inst *OpenPositionWithMetadata) SetPositionTokenAccountAccount(positionTokenAccount ag_solanago.PublicKey) *OpenPositionWithMetadata

SetPositionTokenAccountAccount sets the "positionTokenAccount" account.

func (*OpenPositionWithMetadata) SetRentAccount

SetRentAccount sets the "rent" account.

func (*OpenPositionWithMetadata) SetSystemProgramAccount

func (inst *OpenPositionWithMetadata) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *OpenPositionWithMetadata

SetSystemProgramAccount sets the "systemProgram" account.

func (*OpenPositionWithMetadata) SetTickLowerIndex

func (inst *OpenPositionWithMetadata) SetTickLowerIndex(tickLowerIndex int32) *OpenPositionWithMetadata

SetTickLowerIndex sets the "tickLowerIndex" parameter.

func (*OpenPositionWithMetadata) SetTickUpperIndex

func (inst *OpenPositionWithMetadata) SetTickUpperIndex(tickUpperIndex int32) *OpenPositionWithMetadata

SetTickUpperIndex sets the "tickUpperIndex" parameter.

func (*OpenPositionWithMetadata) SetTokenProgramAccount

func (inst *OpenPositionWithMetadata) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *OpenPositionWithMetadata

SetTokenProgramAccount sets the "tokenProgram" account.

func (*OpenPositionWithMetadata) SetWhirlpoolAccount

func (inst *OpenPositionWithMetadata) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *OpenPositionWithMetadata

SetWhirlpoolAccount sets the "whirlpool" account.

func (*OpenPositionWithMetadata) UnmarshalWithDecoder

func (obj *OpenPositionWithMetadata) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*OpenPositionWithMetadata) Validate

func (inst *OpenPositionWithMetadata) Validate() error

func (OpenPositionWithMetadata) ValidateAndBuild

func (inst OpenPositionWithMetadata) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type OpenPositionWithMetadataAccounts

type OpenPositionWithMetadataAccounts struct {
	Funder                  ag_solanago.PublicKey
	Owner                   ag_solanago.PublicKey
	Position                ag_solanago.PublicKey
	PositionMint            ag_solanago.PublicKey
	PositionMetadataAccount ag_solanago.PublicKey
	PositionTokenAccount    ag_solanago.PublicKey
	Whirlpool               ag_solanago.PublicKey
	TokenProgram            ag_solanago.PublicKey
	SystemProgram           ag_solanago.PublicKey
	Rent                    ag_solanago.PublicKey
	AssociatedTokenProgram  ag_solanago.PublicKey
	MetadataProgram         ag_solanago.PublicKey
	MetadataUpdateAuth      ag_solanago.PublicKey
}

type OpenPositionWithMetadataBumps

type OpenPositionWithMetadataBumps struct {
	PositionBump uint8
	MetadataBump uint8
}

func (OpenPositionWithMetadataBumps) MarshalWithEncoder

func (obj OpenPositionWithMetadataBumps) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*OpenPositionWithMetadataBumps) UnmarshalWithDecoder

func (obj *OpenPositionWithMetadataBumps) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type Position

type Position struct {
	Whirlpool            ag_solanago.PublicKey
	PositionMint         ag_solanago.PublicKey
	Liquidity            ag_binary.Uint128
	TickLowerIndex       int32
	TickUpperIndex       int32
	FeeGrowthCheckpointA ag_binary.Uint128
	FeeOwedA             uint64
	FeeGrowthCheckpointB ag_binary.Uint128
	FeeOwedB             uint64
	RewardInfos          [3]PositionRewardInfo
}

func (Position) MarshalWithEncoder

func (obj Position) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Position) UnmarshalWithDecoder

func (obj *Position) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type PositionRewardInfo

type PositionRewardInfo struct {
	GrowthInsideCheckpoint ag_binary.Uint128
	AmountOwed             uint64
}

func (PositionRewardInfo) MarshalWithEncoder

func (obj PositionRewardInfo) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*PositionRewardInfo) UnmarshalWithDecoder

func (obj *PositionRewardInfo) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type SetCollectProtocolFeesAuthority

type SetCollectProtocolFeesAuthority struct {

	// [0] = [WRITE] whirlpoolsConfig
	//
	// [1] = [SIGNER] collectProtocolFeesAuthority
	//
	// [2] = [] newCollectProtocolFeesAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetCollectProtocolFeesAuthority is the `setCollectProtocolFeesAuthority` instruction.

func NewSetCollectProtocolFeesAuthorityInstruction

func NewSetCollectProtocolFeesAuthorityInstruction(

	whirlpoolsConfig ag_solanago.PublicKey,
	collectProtocolFeesAuthority ag_solanago.PublicKey,
	newCollectProtocolFeesAuthority ag_solanago.PublicKey) *SetCollectProtocolFeesAuthority

NewSetCollectProtocolFeesAuthorityInstruction declares a new SetCollectProtocolFeesAuthority instruction with the provided parameters and accounts.

func NewSetCollectProtocolFeesAuthorityInstructionBuilder

func NewSetCollectProtocolFeesAuthorityInstructionBuilder() *SetCollectProtocolFeesAuthority

NewSetCollectProtocolFeesAuthorityInstructionBuilder creates a new `SetCollectProtocolFeesAuthority` instruction builder.

func (SetCollectProtocolFeesAuthority) Build

func (*SetCollectProtocolFeesAuthority) EncodeToTree

func (inst *SetCollectProtocolFeesAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*SetCollectProtocolFeesAuthority) GetCollectProtocolFeesAuthorityAccount

func (inst *SetCollectProtocolFeesAuthority) GetCollectProtocolFeesAuthorityAccount() *ag_solanago.AccountMeta

GetCollectProtocolFeesAuthorityAccount gets the "collectProtocolFeesAuthority" account.

func (*SetCollectProtocolFeesAuthority) GetNewCollectProtocolFeesAuthorityAccount

func (inst *SetCollectProtocolFeesAuthority) GetNewCollectProtocolFeesAuthorityAccount() *ag_solanago.AccountMeta

GetNewCollectProtocolFeesAuthorityAccount gets the "newCollectProtocolFeesAuthority" account.

func (*SetCollectProtocolFeesAuthority) GetSetCollectProtocolFeesAuthorityAccounts

func (inst *SetCollectProtocolFeesAuthority) GetSetCollectProtocolFeesAuthorityAccounts() *SetCollectProtocolFeesAuthorityAccounts

func (*SetCollectProtocolFeesAuthority) GetWhirlpoolsConfigAccount

func (inst *SetCollectProtocolFeesAuthority) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetCollectProtocolFeesAuthority) MarshalWithEncoder

func (obj SetCollectProtocolFeesAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetCollectProtocolFeesAuthority) SetCollectProtocolFeesAuthorityAccount

func (inst *SetCollectProtocolFeesAuthority) SetCollectProtocolFeesAuthorityAccount(collectProtocolFeesAuthority ag_solanago.PublicKey) *SetCollectProtocolFeesAuthority

SetCollectProtocolFeesAuthorityAccount sets the "collectProtocolFeesAuthority" account.

func (*SetCollectProtocolFeesAuthority) SetNewCollectProtocolFeesAuthorityAccount

func (inst *SetCollectProtocolFeesAuthority) SetNewCollectProtocolFeesAuthorityAccount(newCollectProtocolFeesAuthority ag_solanago.PublicKey) *SetCollectProtocolFeesAuthority

SetNewCollectProtocolFeesAuthorityAccount sets the "newCollectProtocolFeesAuthority" account.

func (*SetCollectProtocolFeesAuthority) SetWhirlpoolsConfigAccount

func (inst *SetCollectProtocolFeesAuthority) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetCollectProtocolFeesAuthority

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetCollectProtocolFeesAuthority) UnmarshalWithDecoder

func (obj *SetCollectProtocolFeesAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetCollectProtocolFeesAuthority) Validate

func (inst *SetCollectProtocolFeesAuthority) Validate() error

func (SetCollectProtocolFeesAuthority) ValidateAndBuild

func (inst SetCollectProtocolFeesAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetCollectProtocolFeesAuthorityAccounts

type SetCollectProtocolFeesAuthorityAccounts struct {
	WhirlpoolsConfig                ag_solanago.PublicKey
	CollectProtocolFeesAuthority    ag_solanago.PublicKey
	NewCollectProtocolFeesAuthority ag_solanago.PublicKey
}

type SetDefaultFeeRate

type SetDefaultFeeRate struct {
	DefaultFeeRate *uint16

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [WRITE] feeTier
	//
	// [2] = [SIGNER] feeAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetDefaultFeeRate is the `setDefaultFeeRate` instruction.

func NewSetDefaultFeeRateInstruction

func NewSetDefaultFeeRateInstruction(

	defaultFeeRate uint16,

	whirlpoolsConfig ag_solanago.PublicKey,
	feeTier ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey) *SetDefaultFeeRate

NewSetDefaultFeeRateInstruction declares a new SetDefaultFeeRate instruction with the provided parameters and accounts.

func NewSetDefaultFeeRateInstructionBuilder

func NewSetDefaultFeeRateInstructionBuilder() *SetDefaultFeeRate

NewSetDefaultFeeRateInstructionBuilder creates a new `SetDefaultFeeRate` instruction builder.

func (SetDefaultFeeRate) Build

func (inst SetDefaultFeeRate) Build() *Instruction

func (*SetDefaultFeeRate) EncodeToTree

func (inst *SetDefaultFeeRate) EncodeToTree(parent ag_treeout.Branches)

func (*SetDefaultFeeRate) GetFeeAuthorityAccount

func (inst *SetDefaultFeeRate) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*SetDefaultFeeRate) GetFeeTierAccount

func (inst *SetDefaultFeeRate) GetFeeTierAccount() *ag_solanago.AccountMeta

GetFeeTierAccount gets the "feeTier" account.

func (*SetDefaultFeeRate) GetSetDefaultFeeRateAccounts

func (inst *SetDefaultFeeRate) GetSetDefaultFeeRateAccounts() *SetDefaultFeeRateAccounts

func (*SetDefaultFeeRate) GetWhirlpoolsConfigAccount

func (inst *SetDefaultFeeRate) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetDefaultFeeRate) MarshalWithEncoder

func (obj SetDefaultFeeRate) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetDefaultFeeRate) SetDefaultFeeRate

func (inst *SetDefaultFeeRate) SetDefaultFeeRate(defaultFeeRate uint16) *SetDefaultFeeRate

SetDefaultFeeRate sets the "defaultFeeRate" parameter.

func (*SetDefaultFeeRate) SetFeeAuthorityAccount

func (inst *SetDefaultFeeRate) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *SetDefaultFeeRate

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*SetDefaultFeeRate) SetFeeTierAccount

func (inst *SetDefaultFeeRate) SetFeeTierAccount(feeTier ag_solanago.PublicKey) *SetDefaultFeeRate

SetFeeTierAccount sets the "feeTier" account.

func (*SetDefaultFeeRate) SetWhirlpoolsConfigAccount

func (inst *SetDefaultFeeRate) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetDefaultFeeRate

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetDefaultFeeRate) UnmarshalWithDecoder

func (obj *SetDefaultFeeRate) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetDefaultFeeRate) Validate

func (inst *SetDefaultFeeRate) Validate() error

func (SetDefaultFeeRate) ValidateAndBuild

func (inst SetDefaultFeeRate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetDefaultFeeRateAccounts

type SetDefaultFeeRateAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	FeeTier          ag_solanago.PublicKey
	FeeAuthority     ag_solanago.PublicKey
}

type SetDefaultProtocolFeeRate

type SetDefaultProtocolFeeRate struct {
	DefaultProtocolFeeRate *uint16

	// [0] = [WRITE] whirlpoolsConfig
	//
	// [1] = [SIGNER] feeAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetDefaultProtocolFeeRate is the `setDefaultProtocolFeeRate` instruction.

func NewSetDefaultProtocolFeeRateInstruction

func NewSetDefaultProtocolFeeRateInstruction(

	defaultProtocolFeeRate uint16,

	whirlpoolsConfig ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey) *SetDefaultProtocolFeeRate

NewSetDefaultProtocolFeeRateInstruction declares a new SetDefaultProtocolFeeRate instruction with the provided parameters and accounts.

func NewSetDefaultProtocolFeeRateInstructionBuilder

func NewSetDefaultProtocolFeeRateInstructionBuilder() *SetDefaultProtocolFeeRate

NewSetDefaultProtocolFeeRateInstructionBuilder creates a new `SetDefaultProtocolFeeRate` instruction builder.

func (SetDefaultProtocolFeeRate) Build

func (inst SetDefaultProtocolFeeRate) Build() *Instruction

func (*SetDefaultProtocolFeeRate) EncodeToTree

func (inst *SetDefaultProtocolFeeRate) EncodeToTree(parent ag_treeout.Branches)

func (*SetDefaultProtocolFeeRate) GetFeeAuthorityAccount

func (inst *SetDefaultProtocolFeeRate) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*SetDefaultProtocolFeeRate) GetSetDefaultProtocolFeeRateAccounts

func (inst *SetDefaultProtocolFeeRate) GetSetDefaultProtocolFeeRateAccounts() *SetDefaultProtocolFeeRateAccounts

func (*SetDefaultProtocolFeeRate) GetWhirlpoolsConfigAccount

func (inst *SetDefaultProtocolFeeRate) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetDefaultProtocolFeeRate) MarshalWithEncoder

func (obj SetDefaultProtocolFeeRate) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetDefaultProtocolFeeRate) SetDefaultProtocolFeeRate

func (inst *SetDefaultProtocolFeeRate) SetDefaultProtocolFeeRate(defaultProtocolFeeRate uint16) *SetDefaultProtocolFeeRate

SetDefaultProtocolFeeRate sets the "defaultProtocolFeeRate" parameter.

func (*SetDefaultProtocolFeeRate) SetFeeAuthorityAccount

func (inst *SetDefaultProtocolFeeRate) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *SetDefaultProtocolFeeRate

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*SetDefaultProtocolFeeRate) SetWhirlpoolsConfigAccount

func (inst *SetDefaultProtocolFeeRate) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetDefaultProtocolFeeRate

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetDefaultProtocolFeeRate) UnmarshalWithDecoder

func (obj *SetDefaultProtocolFeeRate) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetDefaultProtocolFeeRate) Validate

func (inst *SetDefaultProtocolFeeRate) Validate() error

func (SetDefaultProtocolFeeRate) ValidateAndBuild

func (inst SetDefaultProtocolFeeRate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetDefaultProtocolFeeRateAccounts

type SetDefaultProtocolFeeRateAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	FeeAuthority     ag_solanago.PublicKey
}

type SetFeeAuthority

type SetFeeAuthority struct {

	// [0] = [WRITE] whirlpoolsConfig
	//
	// [1] = [SIGNER] feeAuthority
	//
	// [2] = [] newFeeAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetFeeAuthority is the `setFeeAuthority` instruction.

func NewSetFeeAuthorityInstruction

func NewSetFeeAuthorityInstruction(

	whirlpoolsConfig ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey,
	newFeeAuthority ag_solanago.PublicKey) *SetFeeAuthority

NewSetFeeAuthorityInstruction declares a new SetFeeAuthority instruction with the provided parameters and accounts.

func NewSetFeeAuthorityInstructionBuilder

func NewSetFeeAuthorityInstructionBuilder() *SetFeeAuthority

NewSetFeeAuthorityInstructionBuilder creates a new `SetFeeAuthority` instruction builder.

func (SetFeeAuthority) Build

func (inst SetFeeAuthority) Build() *Instruction

func (*SetFeeAuthority) EncodeToTree

func (inst *SetFeeAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*SetFeeAuthority) GetFeeAuthorityAccount

func (inst *SetFeeAuthority) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*SetFeeAuthority) GetNewFeeAuthorityAccount

func (inst *SetFeeAuthority) GetNewFeeAuthorityAccount() *ag_solanago.AccountMeta

GetNewFeeAuthorityAccount gets the "newFeeAuthority" account.

func (*SetFeeAuthority) GetSetFeeAuthorityAccounts

func (inst *SetFeeAuthority) GetSetFeeAuthorityAccounts() *SetFeeAuthorityAccounts

func (*SetFeeAuthority) GetWhirlpoolsConfigAccount

func (inst *SetFeeAuthority) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetFeeAuthority) MarshalWithEncoder

func (obj SetFeeAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetFeeAuthority) SetFeeAuthorityAccount

func (inst *SetFeeAuthority) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *SetFeeAuthority

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*SetFeeAuthority) SetNewFeeAuthorityAccount

func (inst *SetFeeAuthority) SetNewFeeAuthorityAccount(newFeeAuthority ag_solanago.PublicKey) *SetFeeAuthority

SetNewFeeAuthorityAccount sets the "newFeeAuthority" account.

func (*SetFeeAuthority) SetWhirlpoolsConfigAccount

func (inst *SetFeeAuthority) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetFeeAuthority

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetFeeAuthority) UnmarshalWithDecoder

func (obj *SetFeeAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetFeeAuthority) Validate

func (inst *SetFeeAuthority) Validate() error

func (SetFeeAuthority) ValidateAndBuild

func (inst SetFeeAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetFeeAuthorityAccounts

type SetFeeAuthorityAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	FeeAuthority     ag_solanago.PublicKey
	NewFeeAuthority  ag_solanago.PublicKey
}

type SetFeeRate

type SetFeeRate struct {
	FeeRate *uint16

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [WRITE] whirlpool
	//
	// [2] = [SIGNER] feeAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetFeeRate is the `setFeeRate` instruction.

func NewSetFeeRateInstruction

func NewSetFeeRateInstruction(

	feeRate uint16,

	whirlpoolsConfig ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey) *SetFeeRate

NewSetFeeRateInstruction declares a new SetFeeRate instruction with the provided parameters and accounts.

func NewSetFeeRateInstructionBuilder

func NewSetFeeRateInstructionBuilder() *SetFeeRate

NewSetFeeRateInstructionBuilder creates a new `SetFeeRate` instruction builder.

func (SetFeeRate) Build

func (inst SetFeeRate) Build() *Instruction

func (*SetFeeRate) EncodeToTree

func (inst *SetFeeRate) EncodeToTree(parent ag_treeout.Branches)

func (*SetFeeRate) GetFeeAuthorityAccount

func (inst *SetFeeRate) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*SetFeeRate) GetSetFeeRateAccounts

func (inst *SetFeeRate) GetSetFeeRateAccounts() *SetFeeRateAccounts

func (*SetFeeRate) GetWhirlpoolAccount

func (inst *SetFeeRate) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (*SetFeeRate) GetWhirlpoolsConfigAccount

func (inst *SetFeeRate) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetFeeRate) MarshalWithEncoder

func (obj SetFeeRate) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetFeeRate) SetFeeAuthorityAccount

func (inst *SetFeeRate) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *SetFeeRate

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*SetFeeRate) SetFeeRate

func (inst *SetFeeRate) SetFeeRate(feeRate uint16) *SetFeeRate

SetFeeRate sets the "feeRate" parameter.

func (*SetFeeRate) SetWhirlpoolAccount

func (inst *SetFeeRate) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *SetFeeRate

SetWhirlpoolAccount sets the "whirlpool" account.

func (*SetFeeRate) SetWhirlpoolsConfigAccount

func (inst *SetFeeRate) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetFeeRate

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetFeeRate) UnmarshalWithDecoder

func (obj *SetFeeRate) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetFeeRate) Validate

func (inst *SetFeeRate) Validate() error

func (SetFeeRate) ValidateAndBuild

func (inst SetFeeRate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetFeeRateAccounts

type SetFeeRateAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	Whirlpool        ag_solanago.PublicKey
	FeeAuthority     ag_solanago.PublicKey
}

type SetProtocolFeeRate

type SetProtocolFeeRate struct {
	ProtocolFeeRate *uint16

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [WRITE] whirlpool
	//
	// [2] = [SIGNER] feeAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetProtocolFeeRate is the `setProtocolFeeRate` instruction.

func NewSetProtocolFeeRateInstruction

func NewSetProtocolFeeRateInstruction(

	protocolFeeRate uint16,

	whirlpoolsConfig ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	feeAuthority ag_solanago.PublicKey) *SetProtocolFeeRate

NewSetProtocolFeeRateInstruction declares a new SetProtocolFeeRate instruction with the provided parameters and accounts.

func NewSetProtocolFeeRateInstructionBuilder

func NewSetProtocolFeeRateInstructionBuilder() *SetProtocolFeeRate

NewSetProtocolFeeRateInstructionBuilder creates a new `SetProtocolFeeRate` instruction builder.

func (SetProtocolFeeRate) Build

func (inst SetProtocolFeeRate) Build() *Instruction

func (*SetProtocolFeeRate) EncodeToTree

func (inst *SetProtocolFeeRate) EncodeToTree(parent ag_treeout.Branches)

func (*SetProtocolFeeRate) GetFeeAuthorityAccount

func (inst *SetProtocolFeeRate) GetFeeAuthorityAccount() *ag_solanago.AccountMeta

GetFeeAuthorityAccount gets the "feeAuthority" account.

func (*SetProtocolFeeRate) GetSetProtocolFeeRateAccounts

func (inst *SetProtocolFeeRate) GetSetProtocolFeeRateAccounts() *SetProtocolFeeRateAccounts

func (*SetProtocolFeeRate) GetWhirlpoolAccount

func (inst *SetProtocolFeeRate) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (*SetProtocolFeeRate) GetWhirlpoolsConfigAccount

func (inst *SetProtocolFeeRate) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetProtocolFeeRate) MarshalWithEncoder

func (obj SetProtocolFeeRate) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetProtocolFeeRate) SetFeeAuthorityAccount

func (inst *SetProtocolFeeRate) SetFeeAuthorityAccount(feeAuthority ag_solanago.PublicKey) *SetProtocolFeeRate

SetFeeAuthorityAccount sets the "feeAuthority" account.

func (*SetProtocolFeeRate) SetProtocolFeeRate

func (inst *SetProtocolFeeRate) SetProtocolFeeRate(protocolFeeRate uint16) *SetProtocolFeeRate

SetProtocolFeeRate sets the "protocolFeeRate" parameter.

func (*SetProtocolFeeRate) SetWhirlpoolAccount

func (inst *SetProtocolFeeRate) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *SetProtocolFeeRate

SetWhirlpoolAccount sets the "whirlpool" account.

func (*SetProtocolFeeRate) SetWhirlpoolsConfigAccount

func (inst *SetProtocolFeeRate) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetProtocolFeeRate

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetProtocolFeeRate) UnmarshalWithDecoder

func (obj *SetProtocolFeeRate) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetProtocolFeeRate) Validate

func (inst *SetProtocolFeeRate) Validate() error

func (SetProtocolFeeRate) ValidateAndBuild

func (inst SetProtocolFeeRate) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetProtocolFeeRateAccounts

type SetProtocolFeeRateAccounts struct {
	WhirlpoolsConfig ag_solanago.PublicKey
	Whirlpool        ag_solanago.PublicKey
	FeeAuthority     ag_solanago.PublicKey
}

type SetRewardAuthority

type SetRewardAuthority struct {
	RewardIndex *uint8

	// [0] = [WRITE] whirlpool
	//
	// [1] = [SIGNER] rewardAuthority
	//
	// [2] = [] newRewardAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetRewardAuthority is the `setRewardAuthority` instruction.

func NewSetRewardAuthorityInstruction

func NewSetRewardAuthorityInstruction(

	rewardIndex uint8,

	whirlpool ag_solanago.PublicKey,
	rewardAuthority ag_solanago.PublicKey,
	newRewardAuthority ag_solanago.PublicKey) *SetRewardAuthority

NewSetRewardAuthorityInstruction declares a new SetRewardAuthority instruction with the provided parameters and accounts.

func NewSetRewardAuthorityInstructionBuilder

func NewSetRewardAuthorityInstructionBuilder() *SetRewardAuthority

NewSetRewardAuthorityInstructionBuilder creates a new `SetRewardAuthority` instruction builder.

func (SetRewardAuthority) Build

func (inst SetRewardAuthority) Build() *Instruction

func (*SetRewardAuthority) EncodeToTree

func (inst *SetRewardAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*SetRewardAuthority) GetNewRewardAuthorityAccount

func (inst *SetRewardAuthority) GetNewRewardAuthorityAccount() *ag_solanago.AccountMeta

GetNewRewardAuthorityAccount gets the "newRewardAuthority" account.

func (*SetRewardAuthority) GetRewardAuthorityAccount

func (inst *SetRewardAuthority) GetRewardAuthorityAccount() *ag_solanago.AccountMeta

GetRewardAuthorityAccount gets the "rewardAuthority" account.

func (*SetRewardAuthority) GetSetRewardAuthorityAccounts

func (inst *SetRewardAuthority) GetSetRewardAuthorityAccounts() *SetRewardAuthorityAccounts

func (*SetRewardAuthority) GetWhirlpoolAccount

func (inst *SetRewardAuthority) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (SetRewardAuthority) MarshalWithEncoder

func (obj SetRewardAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetRewardAuthority) SetNewRewardAuthorityAccount

func (inst *SetRewardAuthority) SetNewRewardAuthorityAccount(newRewardAuthority ag_solanago.PublicKey) *SetRewardAuthority

SetNewRewardAuthorityAccount sets the "newRewardAuthority" account.

func (*SetRewardAuthority) SetRewardAuthorityAccount

func (inst *SetRewardAuthority) SetRewardAuthorityAccount(rewardAuthority ag_solanago.PublicKey) *SetRewardAuthority

SetRewardAuthorityAccount sets the "rewardAuthority" account.

func (*SetRewardAuthority) SetRewardIndex

func (inst *SetRewardAuthority) SetRewardIndex(rewardIndex uint8) *SetRewardAuthority

SetRewardIndex sets the "rewardIndex" parameter.

func (*SetRewardAuthority) SetWhirlpoolAccount

func (inst *SetRewardAuthority) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *SetRewardAuthority

SetWhirlpoolAccount sets the "whirlpool" account.

func (*SetRewardAuthority) UnmarshalWithDecoder

func (obj *SetRewardAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetRewardAuthority) Validate

func (inst *SetRewardAuthority) Validate() error

func (SetRewardAuthority) ValidateAndBuild

func (inst SetRewardAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetRewardAuthorityAccounts

type SetRewardAuthorityAccounts struct {
	Whirlpool          ag_solanago.PublicKey
	RewardAuthority    ag_solanago.PublicKey
	NewRewardAuthority ag_solanago.PublicKey
}

type SetRewardAuthorityBySuperAuthority

type SetRewardAuthorityBySuperAuthority struct {
	RewardIndex *uint8

	// [0] = [] whirlpoolsConfig
	//
	// [1] = [WRITE] whirlpool
	//
	// [2] = [SIGNER] rewardEmissionsSuperAuthority
	//
	// [3] = [] newRewardAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetRewardAuthorityBySuperAuthority is the `setRewardAuthorityBySuperAuthority` instruction.

func NewSetRewardAuthorityBySuperAuthorityInstruction

func NewSetRewardAuthorityBySuperAuthorityInstruction(

	rewardIndex uint8,

	whirlpoolsConfig ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	rewardEmissionsSuperAuthority ag_solanago.PublicKey,
	newRewardAuthority ag_solanago.PublicKey) *SetRewardAuthorityBySuperAuthority

NewSetRewardAuthorityBySuperAuthorityInstruction declares a new SetRewardAuthorityBySuperAuthority instruction with the provided parameters and accounts.

func NewSetRewardAuthorityBySuperAuthorityInstructionBuilder

func NewSetRewardAuthorityBySuperAuthorityInstructionBuilder() *SetRewardAuthorityBySuperAuthority

NewSetRewardAuthorityBySuperAuthorityInstructionBuilder creates a new `SetRewardAuthorityBySuperAuthority` instruction builder.

func (SetRewardAuthorityBySuperAuthority) Build

func (*SetRewardAuthorityBySuperAuthority) EncodeToTree

func (inst *SetRewardAuthorityBySuperAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*SetRewardAuthorityBySuperAuthority) GetNewRewardAuthorityAccount

func (inst *SetRewardAuthorityBySuperAuthority) GetNewRewardAuthorityAccount() *ag_solanago.AccountMeta

GetNewRewardAuthorityAccount gets the "newRewardAuthority" account.

func (*SetRewardAuthorityBySuperAuthority) GetRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardAuthorityBySuperAuthority) GetRewardEmissionsSuperAuthorityAccount() *ag_solanago.AccountMeta

GetRewardEmissionsSuperAuthorityAccount gets the "rewardEmissionsSuperAuthority" account.

func (*SetRewardAuthorityBySuperAuthority) GetSetRewardAuthorityBySuperAuthorityAccounts

func (inst *SetRewardAuthorityBySuperAuthority) GetSetRewardAuthorityBySuperAuthorityAccounts() *SetRewardAuthorityBySuperAuthorityAccounts

func (*SetRewardAuthorityBySuperAuthority) GetWhirlpoolAccount

func (inst *SetRewardAuthorityBySuperAuthority) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (*SetRewardAuthorityBySuperAuthority) GetWhirlpoolsConfigAccount

func (inst *SetRewardAuthorityBySuperAuthority) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetRewardAuthorityBySuperAuthority) MarshalWithEncoder

func (obj SetRewardAuthorityBySuperAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetRewardAuthorityBySuperAuthority) SetNewRewardAuthorityAccount

func (inst *SetRewardAuthorityBySuperAuthority) SetNewRewardAuthorityAccount(newRewardAuthority ag_solanago.PublicKey) *SetRewardAuthorityBySuperAuthority

SetNewRewardAuthorityAccount sets the "newRewardAuthority" account.

func (*SetRewardAuthorityBySuperAuthority) SetRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardAuthorityBySuperAuthority) SetRewardEmissionsSuperAuthorityAccount(rewardEmissionsSuperAuthority ag_solanago.PublicKey) *SetRewardAuthorityBySuperAuthority

SetRewardEmissionsSuperAuthorityAccount sets the "rewardEmissionsSuperAuthority" account.

func (*SetRewardAuthorityBySuperAuthority) SetRewardIndex

SetRewardIndex sets the "rewardIndex" parameter.

func (*SetRewardAuthorityBySuperAuthority) SetWhirlpoolAccount

SetWhirlpoolAccount sets the "whirlpool" account.

func (*SetRewardAuthorityBySuperAuthority) SetWhirlpoolsConfigAccount

func (inst *SetRewardAuthorityBySuperAuthority) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetRewardAuthorityBySuperAuthority

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetRewardAuthorityBySuperAuthority) UnmarshalWithDecoder

func (obj *SetRewardAuthorityBySuperAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetRewardAuthorityBySuperAuthority) Validate

func (inst *SetRewardAuthorityBySuperAuthority) Validate() error

func (SetRewardAuthorityBySuperAuthority) ValidateAndBuild

func (inst SetRewardAuthorityBySuperAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetRewardAuthorityBySuperAuthorityAccounts

type SetRewardAuthorityBySuperAuthorityAccounts struct {
	WhirlpoolsConfig              ag_solanago.PublicKey
	Whirlpool                     ag_solanago.PublicKey
	RewardEmissionsSuperAuthority ag_solanago.PublicKey
	NewRewardAuthority            ag_solanago.PublicKey
}

type SetRewardEmissions

type SetRewardEmissions struct {
	RewardIndex           *uint8
	EmissionsPerSecondX64 *ag_binary.Uint128

	// [0] = [WRITE] whirlpool
	//
	// [1] = [SIGNER] rewardAuthority
	//
	// [2] = [] rewardVault
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetRewardEmissions is the `setRewardEmissions` instruction.

func NewSetRewardEmissionsInstruction

func NewSetRewardEmissionsInstruction(

	rewardIndex uint8,
	emissionsPerSecondX64 ag_binary.Uint128,

	whirlpool ag_solanago.PublicKey,
	rewardAuthority ag_solanago.PublicKey,
	rewardVault ag_solanago.PublicKey) *SetRewardEmissions

NewSetRewardEmissionsInstruction declares a new SetRewardEmissions instruction with the provided parameters and accounts.

func NewSetRewardEmissionsInstructionBuilder

func NewSetRewardEmissionsInstructionBuilder() *SetRewardEmissions

NewSetRewardEmissionsInstructionBuilder creates a new `SetRewardEmissions` instruction builder.

func (SetRewardEmissions) Build

func (inst SetRewardEmissions) Build() *Instruction

func (*SetRewardEmissions) EncodeToTree

func (inst *SetRewardEmissions) EncodeToTree(parent ag_treeout.Branches)

func (*SetRewardEmissions) GetRewardAuthorityAccount

func (inst *SetRewardEmissions) GetRewardAuthorityAccount() *ag_solanago.AccountMeta

GetRewardAuthorityAccount gets the "rewardAuthority" account.

func (*SetRewardEmissions) GetRewardVaultAccount

func (inst *SetRewardEmissions) GetRewardVaultAccount() *ag_solanago.AccountMeta

GetRewardVaultAccount gets the "rewardVault" account.

func (*SetRewardEmissions) GetSetRewardEmissionsAccounts

func (inst *SetRewardEmissions) GetSetRewardEmissionsAccounts() *SetRewardEmissionsAccounts

func (*SetRewardEmissions) GetWhirlpoolAccount

func (inst *SetRewardEmissions) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (SetRewardEmissions) MarshalWithEncoder

func (obj SetRewardEmissions) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetRewardEmissions) SetEmissionsPerSecondX64

func (inst *SetRewardEmissions) SetEmissionsPerSecondX64(emissionsPerSecondX64 ag_binary.Uint128) *SetRewardEmissions

SetEmissionsPerSecondX64 sets the "emissionsPerSecondX64" parameter.

func (*SetRewardEmissions) SetRewardAuthorityAccount

func (inst *SetRewardEmissions) SetRewardAuthorityAccount(rewardAuthority ag_solanago.PublicKey) *SetRewardEmissions

SetRewardAuthorityAccount sets the "rewardAuthority" account.

func (*SetRewardEmissions) SetRewardIndex

func (inst *SetRewardEmissions) SetRewardIndex(rewardIndex uint8) *SetRewardEmissions

SetRewardIndex sets the "rewardIndex" parameter.

func (*SetRewardEmissions) SetRewardVaultAccount

func (inst *SetRewardEmissions) SetRewardVaultAccount(rewardVault ag_solanago.PublicKey) *SetRewardEmissions

SetRewardVaultAccount sets the "rewardVault" account.

func (*SetRewardEmissions) SetWhirlpoolAccount

func (inst *SetRewardEmissions) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *SetRewardEmissions

SetWhirlpoolAccount sets the "whirlpool" account.

func (*SetRewardEmissions) UnmarshalWithDecoder

func (obj *SetRewardEmissions) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetRewardEmissions) Validate

func (inst *SetRewardEmissions) Validate() error

func (SetRewardEmissions) ValidateAndBuild

func (inst SetRewardEmissions) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetRewardEmissionsAccounts

type SetRewardEmissionsAccounts struct {
	Whirlpool       ag_solanago.PublicKey
	RewardAuthority ag_solanago.PublicKey
	RewardVault     ag_solanago.PublicKey
}

type SetRewardEmissionsSuperAuthority

type SetRewardEmissionsSuperAuthority struct {

	// [0] = [WRITE] whirlpoolsConfig
	//
	// [1] = [SIGNER] rewardEmissionsSuperAuthority
	//
	// [2] = [] newRewardEmissionsSuperAuthority
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetRewardEmissionsSuperAuthority is the `setRewardEmissionsSuperAuthority` instruction.

func NewSetRewardEmissionsSuperAuthorityInstruction

func NewSetRewardEmissionsSuperAuthorityInstruction(

	whirlpoolsConfig ag_solanago.PublicKey,
	rewardEmissionsSuperAuthority ag_solanago.PublicKey,
	newRewardEmissionsSuperAuthority ag_solanago.PublicKey) *SetRewardEmissionsSuperAuthority

NewSetRewardEmissionsSuperAuthorityInstruction declares a new SetRewardEmissionsSuperAuthority instruction with the provided parameters and accounts.

func NewSetRewardEmissionsSuperAuthorityInstructionBuilder

func NewSetRewardEmissionsSuperAuthorityInstructionBuilder() *SetRewardEmissionsSuperAuthority

NewSetRewardEmissionsSuperAuthorityInstructionBuilder creates a new `SetRewardEmissionsSuperAuthority` instruction builder.

func (SetRewardEmissionsSuperAuthority) Build

func (*SetRewardEmissionsSuperAuthority) EncodeToTree

func (inst *SetRewardEmissionsSuperAuthority) EncodeToTree(parent ag_treeout.Branches)

func (*SetRewardEmissionsSuperAuthority) GetNewRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardEmissionsSuperAuthority) GetNewRewardEmissionsSuperAuthorityAccount() *ag_solanago.AccountMeta

GetNewRewardEmissionsSuperAuthorityAccount gets the "newRewardEmissionsSuperAuthority" account.

func (*SetRewardEmissionsSuperAuthority) GetRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardEmissionsSuperAuthority) GetRewardEmissionsSuperAuthorityAccount() *ag_solanago.AccountMeta

GetRewardEmissionsSuperAuthorityAccount gets the "rewardEmissionsSuperAuthority" account.

func (*SetRewardEmissionsSuperAuthority) GetSetRewardEmissionsSuperAuthorityAccounts

func (inst *SetRewardEmissionsSuperAuthority) GetSetRewardEmissionsSuperAuthorityAccounts() *SetRewardEmissionsSuperAuthorityAccounts

func (*SetRewardEmissionsSuperAuthority) GetWhirlpoolsConfigAccount

func (inst *SetRewardEmissionsSuperAuthority) GetWhirlpoolsConfigAccount() *ag_solanago.AccountMeta

GetWhirlpoolsConfigAccount gets the "whirlpoolsConfig" account.

func (SetRewardEmissionsSuperAuthority) MarshalWithEncoder

func (obj SetRewardEmissionsSuperAuthority) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*SetRewardEmissionsSuperAuthority) SetNewRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardEmissionsSuperAuthority) SetNewRewardEmissionsSuperAuthorityAccount(newRewardEmissionsSuperAuthority ag_solanago.PublicKey) *SetRewardEmissionsSuperAuthority

SetNewRewardEmissionsSuperAuthorityAccount sets the "newRewardEmissionsSuperAuthority" account.

func (*SetRewardEmissionsSuperAuthority) SetRewardEmissionsSuperAuthorityAccount

func (inst *SetRewardEmissionsSuperAuthority) SetRewardEmissionsSuperAuthorityAccount(rewardEmissionsSuperAuthority ag_solanago.PublicKey) *SetRewardEmissionsSuperAuthority

SetRewardEmissionsSuperAuthorityAccount sets the "rewardEmissionsSuperAuthority" account.

func (*SetRewardEmissionsSuperAuthority) SetWhirlpoolsConfigAccount

func (inst *SetRewardEmissionsSuperAuthority) SetWhirlpoolsConfigAccount(whirlpoolsConfig ag_solanago.PublicKey) *SetRewardEmissionsSuperAuthority

SetWhirlpoolsConfigAccount sets the "whirlpoolsConfig" account.

func (*SetRewardEmissionsSuperAuthority) UnmarshalWithDecoder

func (obj *SetRewardEmissionsSuperAuthority) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*SetRewardEmissionsSuperAuthority) Validate

func (inst *SetRewardEmissionsSuperAuthority) Validate() error

func (SetRewardEmissionsSuperAuthority) ValidateAndBuild

func (inst SetRewardEmissionsSuperAuthority) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SetRewardEmissionsSuperAuthorityAccounts

type SetRewardEmissionsSuperAuthorityAccounts struct {
	WhirlpoolsConfig                 ag_solanago.PublicKey
	RewardEmissionsSuperAuthority    ag_solanago.PublicKey
	NewRewardEmissionsSuperAuthority ag_solanago.PublicKey
}

type Swap

type Swap struct {
	Amount                 *uint64
	OtherAmountThreshold   *uint64
	SqrtPriceLimit         *ag_binary.Uint128
	AmountSpecifiedIsInput *bool
	AToB                   *bool

	// [0] = [] tokenProgram
	//
	// [1] = [SIGNER] tokenAuthority
	//
	// [2] = [WRITE] whirlpool
	//
	// [3] = [WRITE] tokenOwnerAccountA
	//
	// [4] = [WRITE] tokenVaultA
	//
	// [5] = [WRITE] tokenOwnerAccountB
	//
	// [6] = [WRITE] tokenVaultB
	//
	// [7] = [WRITE] tickArray0
	//
	// [8] = [WRITE] tickArray1
	//
	// [9] = [WRITE] tickArray2
	//
	// [10] = [] oracle
	ag_solanago.AccountMetaSlice `bin:"-"`
}

Swap is the `swap` instruction.

func NewSwapInstruction

func NewSwapInstruction(

	amount uint64,
	otherAmountThreshold uint64,
	sqrtPriceLimit ag_binary.Uint128,
	amountSpecifiedIsInput bool,
	aToB bool,

	tokenProgram ag_solanago.PublicKey,
	tokenAuthority ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	tokenOwnerAccountA ag_solanago.PublicKey,
	tokenVaultA ag_solanago.PublicKey,
	tokenOwnerAccountB ag_solanago.PublicKey,
	tokenVaultB ag_solanago.PublicKey,
	tickArray0 ag_solanago.PublicKey,
	tickArray1 ag_solanago.PublicKey,
	tickArray2 ag_solanago.PublicKey,
	oracle ag_solanago.PublicKey) *Swap

NewSwapInstruction declares a new Swap instruction with the provided parameters and accounts.

func NewSwapInstructionBuilder

func NewSwapInstructionBuilder() *Swap

NewSwapInstructionBuilder creates a new `Swap` instruction builder.

func (Swap) Build

func (inst Swap) Build() *Instruction

func (*Swap) EncodeToTree

func (inst *Swap) EncodeToTree(parent ag_treeout.Branches)

func (*Swap) GetOracleAccount

func (inst *Swap) GetOracleAccount() *ag_solanago.AccountMeta

GetOracleAccount gets the "oracle" account.

func (*Swap) GetSwapAccounts

func (inst *Swap) GetSwapAccounts() *SwapAccounts

func (*Swap) GetTickArray0Account

func (inst *Swap) GetTickArray0Account() *ag_solanago.AccountMeta

GetTickArray0Account gets the "tickArray0" account.

func (*Swap) GetTickArray1Account

func (inst *Swap) GetTickArray1Account() *ag_solanago.AccountMeta

GetTickArray1Account gets the "tickArray1" account.

func (*Swap) GetTickArray2Account

func (inst *Swap) GetTickArray2Account() *ag_solanago.AccountMeta

GetTickArray2Account gets the "tickArray2" account.

func (*Swap) GetTokenAuthorityAccount

func (inst *Swap) GetTokenAuthorityAccount() *ag_solanago.AccountMeta

GetTokenAuthorityAccount gets the "tokenAuthority" account.

func (*Swap) GetTokenOwnerAccountAAccount

func (inst *Swap) GetTokenOwnerAccountAAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountAAccount gets the "tokenOwnerAccountA" account.

func (*Swap) GetTokenOwnerAccountBAccount

func (inst *Swap) GetTokenOwnerAccountBAccount() *ag_solanago.AccountMeta

GetTokenOwnerAccountBAccount gets the "tokenOwnerAccountB" account.

func (*Swap) GetTokenProgramAccount

func (inst *Swap) GetTokenProgramAccount() *ag_solanago.AccountMeta

GetTokenProgramAccount gets the "tokenProgram" account.

func (*Swap) GetTokenVaultAAccount

func (inst *Swap) GetTokenVaultAAccount() *ag_solanago.AccountMeta

GetTokenVaultAAccount gets the "tokenVaultA" account.

func (*Swap) GetTokenVaultBAccount

func (inst *Swap) GetTokenVaultBAccount() *ag_solanago.AccountMeta

GetTokenVaultBAccount gets the "tokenVaultB" account.

func (*Swap) GetWhirlpoolAccount

func (inst *Swap) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (Swap) MarshalWithEncoder

func (obj Swap) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Swap) SetAToB

func (inst *Swap) SetAToB(aToB bool) *Swap

SetAToB sets the "aToB" parameter.

func (*Swap) SetAmount

func (inst *Swap) SetAmount(amount uint64) *Swap

SetAmount sets the "amount" parameter.

func (*Swap) SetAmountSpecifiedIsInput

func (inst *Swap) SetAmountSpecifiedIsInput(amountSpecifiedIsInput bool) *Swap

SetAmountSpecifiedIsInput sets the "amountSpecifiedIsInput" parameter.

func (*Swap) SetOracleAccount

func (inst *Swap) SetOracleAccount(oracle ag_solanago.PublicKey) *Swap

SetOracleAccount sets the "oracle" account.

func (*Swap) SetOtherAmountThreshold

func (inst *Swap) SetOtherAmountThreshold(otherAmountThreshold uint64) *Swap

SetOtherAmountThreshold sets the "otherAmountThreshold" parameter.

func (*Swap) SetSqrtPriceLimit

func (inst *Swap) SetSqrtPriceLimit(sqrtPriceLimit ag_binary.Uint128) *Swap

SetSqrtPriceLimit sets the "sqrtPriceLimit" parameter.

func (*Swap) SetTickArray0Account

func (inst *Swap) SetTickArray0Account(tickArray0 ag_solanago.PublicKey) *Swap

SetTickArray0Account sets the "tickArray0" account.

func (*Swap) SetTickArray1Account

func (inst *Swap) SetTickArray1Account(tickArray1 ag_solanago.PublicKey) *Swap

SetTickArray1Account sets the "tickArray1" account.

func (*Swap) SetTickArray2Account

func (inst *Swap) SetTickArray2Account(tickArray2 ag_solanago.PublicKey) *Swap

SetTickArray2Account sets the "tickArray2" account.

func (*Swap) SetTokenAuthorityAccount

func (inst *Swap) SetTokenAuthorityAccount(tokenAuthority ag_solanago.PublicKey) *Swap

SetTokenAuthorityAccount sets the "tokenAuthority" account.

func (*Swap) SetTokenOwnerAccountAAccount

func (inst *Swap) SetTokenOwnerAccountAAccount(tokenOwnerAccountA ag_solanago.PublicKey) *Swap

SetTokenOwnerAccountAAccount sets the "tokenOwnerAccountA" account.

func (*Swap) SetTokenOwnerAccountBAccount

func (inst *Swap) SetTokenOwnerAccountBAccount(tokenOwnerAccountB ag_solanago.PublicKey) *Swap

SetTokenOwnerAccountBAccount sets the "tokenOwnerAccountB" account.

func (*Swap) SetTokenProgramAccount

func (inst *Swap) SetTokenProgramAccount(tokenProgram ag_solanago.PublicKey) *Swap

SetTokenProgramAccount sets the "tokenProgram" account.

func (*Swap) SetTokenVaultAAccount

func (inst *Swap) SetTokenVaultAAccount(tokenVaultA ag_solanago.PublicKey) *Swap

SetTokenVaultAAccount sets the "tokenVaultA" account.

func (*Swap) SetTokenVaultBAccount

func (inst *Swap) SetTokenVaultBAccount(tokenVaultB ag_solanago.PublicKey) *Swap

SetTokenVaultBAccount sets the "tokenVaultB" account.

func (*Swap) SetWhirlpoolAccount

func (inst *Swap) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *Swap

SetWhirlpoolAccount sets the "whirlpool" account.

func (*Swap) UnmarshalWithDecoder

func (obj *Swap) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*Swap) Validate

func (inst *Swap) Validate() error

func (Swap) ValidateAndBuild

func (inst Swap) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type SwapAccounts

type SwapAccounts struct {
	TokenProgram       ag_solanago.PublicKey
	TokenAuthority     ag_solanago.PublicKey
	Whirlpool          ag_solanago.PublicKey
	TokenOwnerAccountA ag_solanago.PublicKey
	TokenVaultA        ag_solanago.PublicKey
	TokenOwnerAccountB ag_solanago.PublicKey
	TokenVaultB        ag_solanago.PublicKey
	TickArray0         ag_solanago.PublicKey
	TickArray1         ag_solanago.PublicKey
	TickArray2         ag_solanago.PublicKey
	Oracle             ag_solanago.PublicKey
}

type Tick

type Tick struct {
	Initialized          bool
	LiquidityNet         ag_binary.Int128
	LiquidityGross       ag_binary.Uint128
	FeeGrowthOutsideA    ag_binary.Uint128
	FeeGrowthOutsideB    ag_binary.Uint128
	RewardGrowthsOutside [3]ag_binary.Uint128
}

func (Tick) MarshalWithEncoder

func (obj Tick) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Tick) UnmarshalWithDecoder

func (obj *Tick) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type TickArray

type TickArray struct {
	StartTickIndex int32
	Ticks          [88]Tick
	Whirlpool      ag_solanago.PublicKey
}

func (TickArray) MarshalWithEncoder

func (obj TickArray) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*TickArray) UnmarshalWithDecoder

func (obj *TickArray) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type TickLabel

type TickLabel ag_binary.BorshEnum
const (
	TickLabelUpper TickLabel = iota
	TickLabelLower
)

func (TickLabel) String

func (value TickLabel) String() string

type UpdateFeesAndRewards

type UpdateFeesAndRewards struct {

	// [0] = [WRITE] whirlpool
	//
	// [1] = [WRITE] position
	//
	// [2] = [] tickArrayLower
	//
	// [3] = [] tickArrayUpper
	ag_solanago.AccountMetaSlice `bin:"-"`
}

UpdateFeesAndRewards is the `updateFeesAndRewards` instruction.

func NewUpdateFeesAndRewardsInstruction

func NewUpdateFeesAndRewardsInstruction(

	whirlpool ag_solanago.PublicKey,
	position ag_solanago.PublicKey,
	tickArrayLower ag_solanago.PublicKey,
	tickArrayUpper ag_solanago.PublicKey) *UpdateFeesAndRewards

NewUpdateFeesAndRewardsInstruction declares a new UpdateFeesAndRewards instruction with the provided parameters and accounts.

func NewUpdateFeesAndRewardsInstructionBuilder

func NewUpdateFeesAndRewardsInstructionBuilder() *UpdateFeesAndRewards

NewUpdateFeesAndRewardsInstructionBuilder creates a new `UpdateFeesAndRewards` instruction builder.

func (UpdateFeesAndRewards) Build

func (inst UpdateFeesAndRewards) Build() *Instruction

func (*UpdateFeesAndRewards) EncodeToTree

func (inst *UpdateFeesAndRewards) EncodeToTree(parent ag_treeout.Branches)

func (*UpdateFeesAndRewards) GetPositionAccount

func (inst *UpdateFeesAndRewards) GetPositionAccount() *ag_solanago.AccountMeta

GetPositionAccount gets the "position" account.

func (*UpdateFeesAndRewards) GetTickArrayLowerAccount

func (inst *UpdateFeesAndRewards) GetTickArrayLowerAccount() *ag_solanago.AccountMeta

GetTickArrayLowerAccount gets the "tickArrayLower" account.

func (*UpdateFeesAndRewards) GetTickArrayUpperAccount

func (inst *UpdateFeesAndRewards) GetTickArrayUpperAccount() *ag_solanago.AccountMeta

GetTickArrayUpperAccount gets the "tickArrayUpper" account.

func (*UpdateFeesAndRewards) GetUpdateFeesAndRewardsAccounts

func (inst *UpdateFeesAndRewards) GetUpdateFeesAndRewardsAccounts() *UpdateFeesAndRewardsAccounts

func (*UpdateFeesAndRewards) GetWhirlpoolAccount

func (inst *UpdateFeesAndRewards) GetWhirlpoolAccount() *ag_solanago.AccountMeta

GetWhirlpoolAccount gets the "whirlpool" account.

func (UpdateFeesAndRewards) MarshalWithEncoder

func (obj UpdateFeesAndRewards) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*UpdateFeesAndRewards) SetPositionAccount

func (inst *UpdateFeesAndRewards) SetPositionAccount(position ag_solanago.PublicKey) *UpdateFeesAndRewards

SetPositionAccount sets the "position" account.

func (*UpdateFeesAndRewards) SetTickArrayLowerAccount

func (inst *UpdateFeesAndRewards) SetTickArrayLowerAccount(tickArrayLower ag_solanago.PublicKey) *UpdateFeesAndRewards

SetTickArrayLowerAccount sets the "tickArrayLower" account.

func (*UpdateFeesAndRewards) SetTickArrayUpperAccount

func (inst *UpdateFeesAndRewards) SetTickArrayUpperAccount(tickArrayUpper ag_solanago.PublicKey) *UpdateFeesAndRewards

SetTickArrayUpperAccount sets the "tickArrayUpper" account.

func (*UpdateFeesAndRewards) SetWhirlpoolAccount

func (inst *UpdateFeesAndRewards) SetWhirlpoolAccount(whirlpool ag_solanago.PublicKey) *UpdateFeesAndRewards

SetWhirlpoolAccount sets the "whirlpool" account.

func (*UpdateFeesAndRewards) UnmarshalWithDecoder

func (obj *UpdateFeesAndRewards) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

func (*UpdateFeesAndRewards) Validate

func (inst *UpdateFeesAndRewards) Validate() error

func (UpdateFeesAndRewards) ValidateAndBuild

func (inst UpdateFeesAndRewards) ValidateAndBuild() (*Instruction, error)

ValidateAndBuild validates the instruction parameters and accounts; if there is a validation error, it returns the error. Otherwise, it builds and returns the instruction.

type UpdateFeesAndRewardsAccounts

type UpdateFeesAndRewardsAccounts struct {
	Whirlpool      ag_solanago.PublicKey
	Position       ag_solanago.PublicKey
	TickArrayLower ag_solanago.PublicKey
	TickArrayUpper ag_solanago.PublicKey
}

type Whirlpool

type Whirlpool struct {
	WhirlpoolsConfig           ag_solanago.PublicKey
	WhirlpoolBump              [1]uint8
	TickSpacing                uint16
	TickSpacingSeed            [2]uint8
	FeeRate                    uint16
	ProtocolFeeRate            uint16
	Liquidity                  ag_binary.Uint128
	SqrtPrice                  ag_binary.Uint128
	TickCurrentIndex           int32
	ProtocolFeeOwedA           uint64
	ProtocolFeeOwedB           uint64
	TokenMintA                 ag_solanago.PublicKey
	TokenVaultA                ag_solanago.PublicKey
	FeeGrowthGlobalA           ag_binary.Uint128
	TokenMintB                 ag_solanago.PublicKey
	TokenVaultB                ag_solanago.PublicKey
	FeeGrowthGlobalB           ag_binary.Uint128
	RewardLastUpdatedTimestamp uint64
	RewardInfos                [3]WhirlpoolRewardInfo
}

func (Whirlpool) MarshalWithEncoder

func (obj Whirlpool) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*Whirlpool) UnmarshalWithDecoder

func (obj *Whirlpool) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type WhirlpoolBumps

type WhirlpoolBumps struct {
	WhirlpoolBump uint8
}

func (WhirlpoolBumps) MarshalWithEncoder

func (obj WhirlpoolBumps) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*WhirlpoolBumps) UnmarshalWithDecoder

func (obj *WhirlpoolBumps) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type WhirlpoolRewardInfo

type WhirlpoolRewardInfo struct {
	Mint                  ag_solanago.PublicKey
	Vault                 ag_solanago.PublicKey
	Authority             ag_solanago.PublicKey
	EmissionsPerSecondX64 ag_binary.Uint128
	GrowthGlobalX64       ag_binary.Uint128
}

func (WhirlpoolRewardInfo) MarshalWithEncoder

func (obj WhirlpoolRewardInfo) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*WhirlpoolRewardInfo) UnmarshalWithDecoder

func (obj *WhirlpoolRewardInfo) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

type WhirlpoolsConfig

type WhirlpoolsConfig struct {
	FeeAuthority                  ag_solanago.PublicKey
	CollectProtocolFeesAuthority  ag_solanago.PublicKey
	RewardEmissionsSuperAuthority ag_solanago.PublicKey
	DefaultProtocolFeeRate        uint16
}

func (WhirlpoolsConfig) MarshalWithEncoder

func (obj WhirlpoolsConfig) MarshalWithEncoder(encoder *ag_binary.Encoder) (err error)

func (*WhirlpoolsConfig) UnmarshalWithDecoder

func (obj *WhirlpoolsConfig) UnmarshalWithDecoder(decoder *ag_binary.Decoder) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL