drip

package
v0.0.0-...-7d7e880 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ProgramName = "Drip"

Variables

View Source
var (
	Instruction_InitVaultProtoConfig = ag_binary.TypeID([8]byte{195, 96, 99, 29, 46, 21, 146, 219})

	Instruction_InitVaultPeriod = ag_binary.TypeID([8]byte{46, 103, 251, 142, 95, 43, 55, 27})

	Instruction_Deposit = ag_binary.TypeID([8]byte{242, 35, 198, 137, 82, 225, 242, 182})

	Instruction_DepositWithMetadata = ag_binary.TypeID([8]byte{66, 112, 168, 108, 67, 61, 27, 151})

	Instruction_WithdrawB = ag_binary.TypeID([8]byte{28, 146, 254, 247, 183, 161, 195, 149})

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

	Instruction_DripSplTokenSwap = ag_binary.TypeID([8]byte{129, 32, 61, 181, 42, 74, 219, 106})

	Instruction_DripOrcaWhirlpool = ag_binary.TypeID([8]byte{31, 217, 180, 147, 224, 40, 53, 88})

	Instruction_InitVault = ag_binary.TypeID([8]byte{77, 79, 85, 150, 33, 217, 52, 106})

	Instruction_SetVaultSwapWhitelist = ag_binary.TypeID([8]byte{215, 229, 51, 175, 90, 52, 232, 25})
)
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.AnchorTypeIDEncoding,
	[]ag_binary.VariantType{
		{
			"init_vault_proto_config", (*InitVaultProtoConfig)(nil),
		},
		{
			"init_vault_period", (*InitVaultPeriod)(nil),
		},
		{
			"deposit", (*Deposit)(nil),
		},
		{
			"deposit_with_metadata", (*DepositWithMetadata)(nil),
		},
		{
			"withdraw_b", (*WithdrawB)(nil),
		},
		{
			"close_position", (*ClosePosition)(nil),
		},
		{
			"drip_spl_token_swap", (*DripSplTokenSwap)(nil),
		},
		{
			"drip_orca_whirlpool", (*DripOrcaWhirlpool)(nil),
		},
		{
			"init_vault", (*InitVault)(nil),
		},
		{
			"set_vault_swap_whitelist", (*SetVaultSwapWhitelist)(nil),
		},
	},
)
View Source
var PositionDiscriminator = [8]byte{170, 188, 143, 228, 122, 64, 247, 208}
View Source
var VaultDiscriminator = [8]byte{211, 8, 232, 43, 2, 152, 117, 119}
View Source
var VaultPeriodDiscriminator = [8]byte{224, 196, 159, 18, 79, 227, 22, 122}
View Source
var VaultProtoConfigDiscriminator = [8]byte{173, 22, 36, 165, 190, 3, 142, 199}

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 {

	// ····· common: [0] = [WRITE, SIGNER] withdrawer
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [] vaultProtoConfig
	//
	// ············· [3] = [] vaultPeriodI
	//
	// ············· [4] = [] vaultPeriodJ
	//
	// ············· [5] = [WRITE] userPosition
	//
	// ············· [6] = [WRITE] userPositionNftAccount
	//
	// ············· [7] = [WRITE] vaultTokenBAccount
	//
	// ············· [8] = [WRITE] vaultTreasuryTokenBAccount
	//
	// ············· [9] = [WRITE] userTokenBAccount
	//
	// ············· [10] = [WRITE] referrer
	//
	// ············· [11] = [] tokenProgram
	//
	// [12] = [WRITE] vaultPeriodUserExpiry
	//
	// [13] = [WRITE] vaultTokenAAccount
	//
	// [14] = [WRITE] userTokenAAccount
	//
	// [15] = [WRITE] userPositionNftMint
	ag_solanago.AccountMetaSlice `bin:"-"`
}

ClosePosition is the `closePosition` instruction.

func NewClosePositionInstruction

func NewClosePositionInstruction(

	commonWithdrawer ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultProtoConfig ag_solanago.PublicKey,
	commonVaultPeriodI ag_solanago.PublicKey,
	commonVaultPeriodJ ag_solanago.PublicKey,
	commonUserPosition ag_solanago.PublicKey,
	commonUserPositionNftAccount ag_solanago.PublicKey,
	commonVaultTokenBAccount ag_solanago.PublicKey,
	commonVaultTreasuryTokenBAccount ag_solanago.PublicKey,
	commonUserTokenBAccount ag_solanago.PublicKey,
	commonReferrer ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey,
	vaultPeriodUserExpiry ag_solanago.PublicKey,
	vaultTokenAAccount ag_solanago.PublicKey,
	userTokenAAccount ag_solanago.PublicKey,
	userPositionNftMint 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) GetUserPositionNftMintAccount

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

GetUserPositionNftMintAccount gets the "userPositionNftMint" account.

func (*ClosePosition) GetUserTokenAAccountAccount

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

GetUserTokenAAccountAccount gets the "userTokenAAccount" account.

func (*ClosePosition) GetVaultPeriodUserExpiryAccount

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

GetVaultPeriodUserExpiryAccount gets the "vaultPeriodUserExpiry" account.

func (*ClosePosition) GetVaultTokenAAccountAccount

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

GetVaultTokenAAccountAccount gets the "vaultTokenAAccount" account.

func (ClosePosition) MarshalWithEncoder

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

func (*ClosePosition) SetCommonAccountsFromBuilder

func (inst *ClosePosition) SetCommonAccountsFromBuilder(closePositionCommonAccountsBuilder *ClosePositionCommonAccountsBuilder) *ClosePosition

func (*ClosePosition) SetUserPositionNftMintAccount

func (inst *ClosePosition) SetUserPositionNftMintAccount(userPositionNftMint ag_solanago.PublicKey) *ClosePosition

SetUserPositionNftMintAccount sets the "userPositionNftMint" account.

func (*ClosePosition) SetUserTokenAAccountAccount

func (inst *ClosePosition) SetUserTokenAAccountAccount(userTokenAAccount ag_solanago.PublicKey) *ClosePosition

SetUserTokenAAccountAccount sets the "userTokenAAccount" account.

func (*ClosePosition) SetVaultPeriodUserExpiryAccount

func (inst *ClosePosition) SetVaultPeriodUserExpiryAccount(vaultPeriodUserExpiry ag_solanago.PublicKey) *ClosePosition

SetVaultPeriodUserExpiryAccount sets the "vaultPeriodUserExpiry" account.

func (*ClosePosition) SetVaultTokenAAccountAccount

func (inst *ClosePosition) SetVaultTokenAAccountAccount(vaultTokenAAccount ag_solanago.PublicKey) *ClosePosition

SetVaultTokenAAccountAccount sets the "vaultTokenAAccount" 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 {
	Common struct {
		Withdrawer                 ag_solanago.PublicKey
		Vault                      ag_solanago.PublicKey
		VaultProtoConfig           ag_solanago.PublicKey
		VaultPeriodI               ag_solanago.PublicKey
		VaultPeriodJ               ag_solanago.PublicKey
		UserPosition               ag_solanago.PublicKey
		UserPositionNftAccount     ag_solanago.PublicKey
		VaultTokenBAccount         ag_solanago.PublicKey
		VaultTreasuryTokenBAccount ag_solanago.PublicKey
		UserTokenBAccount          ag_solanago.PublicKey
		Referrer                   ag_solanago.PublicKey
		TokenProgram               ag_solanago.PublicKey
	}
	VaultPeriodUserExpiry ag_solanago.PublicKey
	VaultTokenAAccount    ag_solanago.PublicKey
	UserTokenAAccount     ag_solanago.PublicKey
	UserPositionNftMint   ag_solanago.PublicKey
}

type ClosePositionCommonAccountsBuilder

type ClosePositionCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewClosePositionCommonAccountsBuilder

func NewClosePositionCommonAccountsBuilder() *ClosePositionCommonAccountsBuilder

func (*ClosePositionCommonAccountsBuilder) GetReferrerAccount

func (inst *ClosePositionCommonAccountsBuilder) GetReferrerAccount() *ag_solanago.AccountMeta

GetReferrerAccount gets the "referrer" account.

func (*ClosePositionCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*ClosePositionCommonAccountsBuilder) GetUserPositionAccount

func (inst *ClosePositionCommonAccountsBuilder) GetUserPositionAccount() *ag_solanago.AccountMeta

GetUserPositionAccount gets the "userPosition" account.

func (*ClosePositionCommonAccountsBuilder) GetUserPositionNftAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) GetUserPositionNftAccountAccount() *ag_solanago.AccountMeta

GetUserPositionNftAccountAccount gets the "userPositionNftAccount" account.

func (*ClosePositionCommonAccountsBuilder) GetUserTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) GetUserTokenBAccountAccount() *ag_solanago.AccountMeta

GetUserTokenBAccountAccount gets the "userTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultAccount

GetVaultAccount gets the "vault" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultPeriodIAccount

func (inst *ClosePositionCommonAccountsBuilder) GetVaultPeriodIAccount() *ag_solanago.AccountMeta

GetVaultPeriodIAccount gets the "vaultPeriodI" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultPeriodJAccount

func (inst *ClosePositionCommonAccountsBuilder) GetVaultPeriodJAccount() *ag_solanago.AccountMeta

GetVaultPeriodJAccount gets the "vaultPeriodJ" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultProtoConfigAccount

func (inst *ClosePositionCommonAccountsBuilder) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) GetVaultTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenBAccountAccount gets the "vaultTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) GetVaultTreasuryTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) GetVaultTreasuryTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTreasuryTokenBAccountAccount gets the "vaultTreasuryTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) GetWithdrawerAccount

func (inst *ClosePositionCommonAccountsBuilder) GetWithdrawerAccount() *ag_solanago.AccountMeta

GetWithdrawerAccount gets the "withdrawer" account.

func (*ClosePositionCommonAccountsBuilder) SetReferrerAccount

SetReferrerAccount sets the "referrer" account.

func (*ClosePositionCommonAccountsBuilder) SetTokenProgramAccount

SetTokenProgramAccount sets the "tokenProgram" account.

func (*ClosePositionCommonAccountsBuilder) SetUserPositionAccount

SetUserPositionAccount sets the "userPosition" account.

func (*ClosePositionCommonAccountsBuilder) SetUserPositionNftAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) SetUserPositionNftAccountAccount(userPositionNftAccount ag_solanago.PublicKey) *ClosePositionCommonAccountsBuilder

SetUserPositionNftAccountAccount sets the "userPositionNftAccount" account.

func (*ClosePositionCommonAccountsBuilder) SetUserTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) SetUserTokenBAccountAccount(userTokenBAccount ag_solanago.PublicKey) *ClosePositionCommonAccountsBuilder

SetUserTokenBAccountAccount sets the "userTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultPeriodIAccount

SetVaultPeriodIAccount sets the "vaultPeriodI" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultPeriodJAccount

SetVaultPeriodJAccount sets the "vaultPeriodJ" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultProtoConfigAccount

func (inst *ClosePositionCommonAccountsBuilder) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *ClosePositionCommonAccountsBuilder

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) SetVaultTokenBAccountAccount(vaultTokenBAccount ag_solanago.PublicKey) *ClosePositionCommonAccountsBuilder

SetVaultTokenBAccountAccount sets the "vaultTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) SetVaultTreasuryTokenBAccountAccount

func (inst *ClosePositionCommonAccountsBuilder) SetVaultTreasuryTokenBAccountAccount(vaultTreasuryTokenBAccount ag_solanago.PublicKey) *ClosePositionCommonAccountsBuilder

SetVaultTreasuryTokenBAccountAccount sets the "vaultTreasuryTokenBAccount" account.

func (*ClosePositionCommonAccountsBuilder) SetWithdrawerAccount

SetWithdrawerAccount sets the "withdrawer" account.

type Deposit

type Deposit struct {
	Params *DepositParams

	// ····· common: [0] = [WRITE, SIGNER] depositor
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [WRITE] vaultPeriodEnd
	//
	// ············· [3] = [WRITE] vaultTokenAAccount
	//
	// ············· [4] = [WRITE] userTokenAAccount
	//
	// ············· [5] = [WRITE] userPosition
	//
	// ············· [6] = [WRITE, SIGNER] userPositionNftMint
	//
	// ············· [7] = [WRITE] userPositionNftAccount
	//
	// ············· [8] = [] referrer
	//
	// ············· [9] = [] tokenProgram
	//
	// ············· [10] = [] associatedTokenProgram
	//
	// ············· [11] = [] rent
	//
	// ············· [12] = [] systemProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

Deposit is the `deposit` instruction.

func NewDepositInstruction

func NewDepositInstruction(

	params DepositParams,

	commonDepositor ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultPeriodEnd ag_solanago.PublicKey,
	commonVaultTokenAAccount ag_solanago.PublicKey,
	commonUserTokenAAccount ag_solanago.PublicKey,
	commonUserPosition ag_solanago.PublicKey,
	commonUserPositionNftMint ag_solanago.PublicKey,
	commonUserPositionNftAccount ag_solanago.PublicKey,
	commonReferrer ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey,
	commonAssociatedTokenProgram ag_solanago.PublicKey,
	commonRent ag_solanago.PublicKey,
	commonSystemProgram ag_solanago.PublicKey) *Deposit

NewDepositInstruction declares a new Deposit instruction with the provided parameters and accounts.

func NewDepositInstructionBuilder

func NewDepositInstructionBuilder() *Deposit

NewDepositInstructionBuilder creates a new `Deposit` instruction builder.

func (Deposit) Build

func (inst Deposit) Build() *Instruction

func (*Deposit) EncodeToTree

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

func (*Deposit) GetDepositAccounts

func (inst *Deposit) GetDepositAccounts() *DepositAccounts

func (Deposit) MarshalWithEncoder

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

func (*Deposit) SetCommonAccountsFromBuilder

func (inst *Deposit) SetCommonAccountsFromBuilder(depositCommonAccountsBuilder *DepositCommonAccountsBuilder) *Deposit

func (*Deposit) SetParams

func (inst *Deposit) SetParams(params DepositParams) *Deposit

SetParams sets the "params" parameter.

func (*Deposit) UnmarshalWithDecoder

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

func (*Deposit) Validate

func (inst *Deposit) Validate() error

func (Deposit) ValidateAndBuild

func (inst Deposit) 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 DepositAccounts

type DepositAccounts struct {
	Common struct {
		Depositor              ag_solanago.PublicKey
		Vault                  ag_solanago.PublicKey
		VaultPeriodEnd         ag_solanago.PublicKey
		VaultTokenAAccount     ag_solanago.PublicKey
		UserTokenAAccount      ag_solanago.PublicKey
		UserPosition           ag_solanago.PublicKey
		UserPositionNftMint    ag_solanago.PublicKey
		UserPositionNftAccount ag_solanago.PublicKey
		Referrer               ag_solanago.PublicKey
		TokenProgram           ag_solanago.PublicKey
		AssociatedTokenProgram ag_solanago.PublicKey
		Rent                   ag_solanago.PublicKey
		SystemProgram          ag_solanago.PublicKey
	}
}

type DepositCommonAccountsBuilder

type DepositCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewDepositCommonAccountsBuilder

func NewDepositCommonAccountsBuilder() *DepositCommonAccountsBuilder

func (*DepositCommonAccountsBuilder) GetAssociatedTokenProgramAccount

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

GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.

func (*DepositCommonAccountsBuilder) GetDepositorAccount

func (inst *DepositCommonAccountsBuilder) GetDepositorAccount() *ag_solanago.AccountMeta

GetDepositorAccount gets the "depositor" account.

func (*DepositCommonAccountsBuilder) GetReferrerAccount

func (inst *DepositCommonAccountsBuilder) GetReferrerAccount() *ag_solanago.AccountMeta

GetReferrerAccount gets the "referrer" account.

func (*DepositCommonAccountsBuilder) GetRentAccount

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

GetRentAccount gets the "rent" account.

func (*DepositCommonAccountsBuilder) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account.

func (*DepositCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*DepositCommonAccountsBuilder) GetUserPositionAccount

func (inst *DepositCommonAccountsBuilder) GetUserPositionAccount() *ag_solanago.AccountMeta

GetUserPositionAccount gets the "userPosition" account.

func (*DepositCommonAccountsBuilder) GetUserPositionNftAccountAccount

func (inst *DepositCommonAccountsBuilder) GetUserPositionNftAccountAccount() *ag_solanago.AccountMeta

GetUserPositionNftAccountAccount gets the "userPositionNftAccount" account.

func (*DepositCommonAccountsBuilder) GetUserPositionNftMintAccount

func (inst *DepositCommonAccountsBuilder) GetUserPositionNftMintAccount() *ag_solanago.AccountMeta

GetUserPositionNftMintAccount gets the "userPositionNftMint" account.

func (*DepositCommonAccountsBuilder) GetUserTokenAAccountAccount

func (inst *DepositCommonAccountsBuilder) GetUserTokenAAccountAccount() *ag_solanago.AccountMeta

GetUserTokenAAccountAccount gets the "userTokenAAccount" account.

func (*DepositCommonAccountsBuilder) GetVaultAccount

func (inst *DepositCommonAccountsBuilder) GetVaultAccount() *ag_solanago.AccountMeta

GetVaultAccount gets the "vault" account.

func (*DepositCommonAccountsBuilder) GetVaultPeriodEndAccount

func (inst *DepositCommonAccountsBuilder) GetVaultPeriodEndAccount() *ag_solanago.AccountMeta

GetVaultPeriodEndAccount gets the "vaultPeriodEnd" account.

func (*DepositCommonAccountsBuilder) GetVaultTokenAAccountAccount

func (inst *DepositCommonAccountsBuilder) GetVaultTokenAAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenAAccountAccount gets the "vaultTokenAAccount" account.

func (*DepositCommonAccountsBuilder) SetAssociatedTokenProgramAccount

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

SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.

func (*DepositCommonAccountsBuilder) SetDepositorAccount

SetDepositorAccount sets the "depositor" account.

func (*DepositCommonAccountsBuilder) SetReferrerAccount

SetReferrerAccount sets the "referrer" account.

func (*DepositCommonAccountsBuilder) SetRentAccount

SetRentAccount sets the "rent" account.

func (*DepositCommonAccountsBuilder) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account.

func (*DepositCommonAccountsBuilder) SetTokenProgramAccount

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

SetTokenProgramAccount sets the "tokenProgram" account.

func (*DepositCommonAccountsBuilder) SetUserPositionAccount

func (inst *DepositCommonAccountsBuilder) SetUserPositionAccount(userPosition ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetUserPositionAccount sets the "userPosition" account.

func (*DepositCommonAccountsBuilder) SetUserPositionNftAccountAccount

func (inst *DepositCommonAccountsBuilder) SetUserPositionNftAccountAccount(userPositionNftAccount ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetUserPositionNftAccountAccount sets the "userPositionNftAccount" account.

func (*DepositCommonAccountsBuilder) SetUserPositionNftMintAccount

func (inst *DepositCommonAccountsBuilder) SetUserPositionNftMintAccount(userPositionNftMint ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetUserPositionNftMintAccount sets the "userPositionNftMint" account.

func (*DepositCommonAccountsBuilder) SetUserTokenAAccountAccount

func (inst *DepositCommonAccountsBuilder) SetUserTokenAAccountAccount(userTokenAAccount ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetUserTokenAAccountAccount sets the "userTokenAAccount" account.

func (*DepositCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*DepositCommonAccountsBuilder) SetVaultPeriodEndAccount

func (inst *DepositCommonAccountsBuilder) SetVaultPeriodEndAccount(vaultPeriodEnd ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetVaultPeriodEndAccount sets the "vaultPeriodEnd" account.

func (*DepositCommonAccountsBuilder) SetVaultTokenAAccountAccount

func (inst *DepositCommonAccountsBuilder) SetVaultTokenAAccountAccount(vaultTokenAAccount ag_solanago.PublicKey) *DepositCommonAccountsBuilder

SetVaultTokenAAccountAccount sets the "vaultTokenAAccount" account.

type DepositParams

type DepositParams struct {
	TokenADepositAmount uint64
	NumberOfSwaps       uint64
}

func (DepositParams) MarshalWithEncoder

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

func (*DepositParams) UnmarshalWithDecoder

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

type DepositWithMetadata

type DepositWithMetadata struct {
	Params *DepositParams

	// ····· common: [0] = [WRITE, SIGNER] depositor
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [WRITE] vaultPeriodEnd
	//
	// ············· [3] = [WRITE] vaultTokenAAccount
	//
	// ············· [4] = [WRITE] userTokenAAccount
	//
	// ············· [5] = [WRITE] userPosition
	//
	// ············· [6] = [WRITE, SIGNER] userPositionNftMint
	//
	// ············· [7] = [WRITE] userPositionNftAccount
	//
	// ············· [8] = [] referrer
	//
	// ············· [9] = [] tokenProgram
	//
	// ············· [10] = [] associatedTokenProgram
	//
	// ············· [11] = [] rent
	//
	// ············· [12] = [] systemProgram
	//
	// [13] = [WRITE] positionMetadataAccount
	//
	// [14] = [] metadataProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

DepositWithMetadata is the `depositWithMetadata` instruction.

func NewDepositWithMetadataInstruction

func NewDepositWithMetadataInstruction(

	params DepositParams,

	commonDepositor ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultPeriodEnd ag_solanago.PublicKey,
	commonVaultTokenAAccount ag_solanago.PublicKey,
	commonUserTokenAAccount ag_solanago.PublicKey,
	commonUserPosition ag_solanago.PublicKey,
	commonUserPositionNftMint ag_solanago.PublicKey,
	commonUserPositionNftAccount ag_solanago.PublicKey,
	commonReferrer ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey,
	commonAssociatedTokenProgram ag_solanago.PublicKey,
	commonRent ag_solanago.PublicKey,
	commonSystemProgram ag_solanago.PublicKey,
	positionMetadataAccount ag_solanago.PublicKey,
	metadataProgram ag_solanago.PublicKey) *DepositWithMetadata

NewDepositWithMetadataInstruction declares a new DepositWithMetadata instruction with the provided parameters and accounts.

func NewDepositWithMetadataInstructionBuilder

func NewDepositWithMetadataInstructionBuilder() *DepositWithMetadata

NewDepositWithMetadataInstructionBuilder creates a new `DepositWithMetadata` instruction builder.

func (DepositWithMetadata) Build

func (inst DepositWithMetadata) Build() *Instruction

func (*DepositWithMetadata) EncodeToTree

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

func (*DepositWithMetadata) GetDepositWithMetadataAccounts

func (inst *DepositWithMetadata) GetDepositWithMetadataAccounts() *DepositWithMetadataAccounts

func (*DepositWithMetadata) GetMetadataProgramAccount

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

GetMetadataProgramAccount gets the "metadataProgram" account.

func (*DepositWithMetadata) GetPositionMetadataAccountAccount

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

GetPositionMetadataAccountAccount gets the "positionMetadataAccount" account.

func (DepositWithMetadata) MarshalWithEncoder

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

func (*DepositWithMetadata) SetCommonAccountsFromBuilder

func (inst *DepositWithMetadata) SetCommonAccountsFromBuilder(depositWithMetadataCommonAccountsBuilder *DepositWithMetadataCommonAccountsBuilder) *DepositWithMetadata

func (*DepositWithMetadata) SetMetadataProgramAccount

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

SetMetadataProgramAccount sets the "metadataProgram" account.

func (*DepositWithMetadata) SetParams

func (inst *DepositWithMetadata) SetParams(params DepositParams) *DepositWithMetadata

SetParams sets the "params" parameter.

func (*DepositWithMetadata) SetPositionMetadataAccountAccount

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

SetPositionMetadataAccountAccount sets the "positionMetadataAccount" account.

func (*DepositWithMetadata) UnmarshalWithDecoder

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

func (*DepositWithMetadata) Validate

func (inst *DepositWithMetadata) Validate() error

func (DepositWithMetadata) ValidateAndBuild

func (inst DepositWithMetadata) 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 DepositWithMetadataAccounts

type DepositWithMetadataAccounts struct {
	Common struct {
		Depositor              ag_solanago.PublicKey
		Vault                  ag_solanago.PublicKey
		VaultPeriodEnd         ag_solanago.PublicKey
		VaultTokenAAccount     ag_solanago.PublicKey
		UserTokenAAccount      ag_solanago.PublicKey
		UserPosition           ag_solanago.PublicKey
		UserPositionNftMint    ag_solanago.PublicKey
		UserPositionNftAccount ag_solanago.PublicKey
		Referrer               ag_solanago.PublicKey
		TokenProgram           ag_solanago.PublicKey
		AssociatedTokenProgram ag_solanago.PublicKey
		Rent                   ag_solanago.PublicKey
		SystemProgram          ag_solanago.PublicKey
	}
	PositionMetadataAccount ag_solanago.PublicKey
	MetadataProgram         ag_solanago.PublicKey
}

type DepositWithMetadataCommonAccountsBuilder

type DepositWithMetadataCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewDepositWithMetadataCommonAccountsBuilder

func NewDepositWithMetadataCommonAccountsBuilder() *DepositWithMetadataCommonAccountsBuilder

func (*DepositWithMetadataCommonAccountsBuilder) GetAssociatedTokenProgramAccount

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

GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetDepositorAccount

GetDepositorAccount gets the "depositor" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetReferrerAccount

GetReferrerAccount gets the "referrer" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetRentAccount

GetRentAccount gets the "rent" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetUserPositionAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetUserPositionAccount() *ag_solanago.AccountMeta

GetUserPositionAccount gets the "userPosition" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetUserPositionNftAccountAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetUserPositionNftAccountAccount() *ag_solanago.AccountMeta

GetUserPositionNftAccountAccount gets the "userPositionNftAccount" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetUserPositionNftMintAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetUserPositionNftMintAccount() *ag_solanago.AccountMeta

GetUserPositionNftMintAccount gets the "userPositionNftMint" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetUserTokenAAccountAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetUserTokenAAccountAccount() *ag_solanago.AccountMeta

GetUserTokenAAccountAccount gets the "userTokenAAccount" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetVaultAccount

GetVaultAccount gets the "vault" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetVaultPeriodEndAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetVaultPeriodEndAccount() *ag_solanago.AccountMeta

GetVaultPeriodEndAccount gets the "vaultPeriodEnd" account.

func (*DepositWithMetadataCommonAccountsBuilder) GetVaultTokenAAccountAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) GetVaultTokenAAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenAAccountAccount gets the "vaultTokenAAccount" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetAssociatedTokenProgramAccount

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

SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetDepositorAccount

SetDepositorAccount sets the "depositor" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetReferrerAccount

SetReferrerAccount sets the "referrer" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetRentAccount

SetRentAccount sets the "rent" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetSystemProgramAccount

SetSystemProgramAccount sets the "systemProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetTokenProgramAccount

SetTokenProgramAccount sets the "tokenProgram" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetUserPositionAccount

SetUserPositionAccount sets the "userPosition" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetUserPositionNftAccountAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) SetUserPositionNftAccountAccount(userPositionNftAccount ag_solanago.PublicKey) *DepositWithMetadataCommonAccountsBuilder

SetUserPositionNftAccountAccount sets the "userPositionNftAccount" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetUserPositionNftMintAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) SetUserPositionNftMintAccount(userPositionNftMint ag_solanago.PublicKey) *DepositWithMetadataCommonAccountsBuilder

SetUserPositionNftMintAccount sets the "userPositionNftMint" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetUserTokenAAccountAccount

SetUserTokenAAccountAccount sets the "userTokenAAccount" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetVaultPeriodEndAccount

SetVaultPeriodEndAccount sets the "vaultPeriodEnd" account.

func (*DepositWithMetadataCommonAccountsBuilder) SetVaultTokenAAccountAccount

func (inst *DepositWithMetadataCommonAccountsBuilder) SetVaultTokenAAccountAccount(vaultTokenAAccount ag_solanago.PublicKey) *DepositWithMetadataCommonAccountsBuilder

SetVaultTokenAAccountAccount sets the "vaultTokenAAccount" account.

type DripOrcaWhirlpool

type DripOrcaWhirlpool struct {

	// ····· common: [0] = [SIGNER] dripTriggerSource
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [] vaultProtoConfig
	//
	// ············· [3] = [] lastVaultPeriod
	//
	// ············· [4] = [WRITE] currentVaultPeriod
	//
	// ············· [5] = [WRITE] vaultTokenAAccount
	//
	// ············· [6] = [WRITE] vaultTokenBAccount
	//
	// ············· [7] = [WRITE] swapTokenAAccount
	//
	// ············· [8] = [WRITE] swapTokenBAccount
	//
	// ············· [9] = [WRITE] dripFeeTokenAAccount
	//
	// ············· [10] = [] tokenProgram
	//
	// [11] = [WRITE] whirlpool
	//
	// [12] = [WRITE] tickArray0
	//
	// [13] = [WRITE] tickArray1
	//
	// [14] = [WRITE] tickArray2
	//
	// [15] = [] oracle
	//
	// [16] = [] whirlpoolProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

DripOrcaWhirlpool is the `dripOrcaWhirlpool` instruction.

func NewDripOrcaWhirlpoolInstruction

func NewDripOrcaWhirlpoolInstruction(

	commonDripTriggerSource ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultProtoConfig ag_solanago.PublicKey,
	commonLastVaultPeriod ag_solanago.PublicKey,
	commonCurrentVaultPeriod ag_solanago.PublicKey,
	commonVaultTokenAAccount ag_solanago.PublicKey,
	commonVaultTokenBAccount ag_solanago.PublicKey,
	commonSwapTokenAAccount ag_solanago.PublicKey,
	commonSwapTokenBAccount ag_solanago.PublicKey,
	commonDripFeeTokenAAccount ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey,
	whirlpool ag_solanago.PublicKey,
	tickArray0 ag_solanago.PublicKey,
	tickArray1 ag_solanago.PublicKey,
	tickArray2 ag_solanago.PublicKey,
	oracle ag_solanago.PublicKey,
	whirlpoolProgram ag_solanago.PublicKey) *DripOrcaWhirlpool

NewDripOrcaWhirlpoolInstruction declares a new DripOrcaWhirlpool instruction with the provided parameters and accounts.

func NewDripOrcaWhirlpoolInstructionBuilder

func NewDripOrcaWhirlpoolInstructionBuilder() *DripOrcaWhirlpool

NewDripOrcaWhirlpoolInstructionBuilder creates a new `DripOrcaWhirlpool` instruction builder.

func (DripOrcaWhirlpool) Build

func (inst DripOrcaWhirlpool) Build() *Instruction

func (*DripOrcaWhirlpool) EncodeToTree

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

func (*DripOrcaWhirlpool) GetDripOrcaWhirlpoolAccounts

func (inst *DripOrcaWhirlpool) GetDripOrcaWhirlpoolAccounts() *DripOrcaWhirlpoolAccounts

func (*DripOrcaWhirlpool) GetOracleAccount

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

GetOracleAccount gets the "oracle" account.

func (*DripOrcaWhirlpool) GetTickArray0Account

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

GetTickArray0Account gets the "tickArray0" account.

func (*DripOrcaWhirlpool) GetTickArray1Account

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

GetTickArray1Account gets the "tickArray1" account.

func (*DripOrcaWhirlpool) GetTickArray2Account

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

GetTickArray2Account gets the "tickArray2" account.

func (*DripOrcaWhirlpool) GetWhirlpoolAccount

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

GetWhirlpoolAccount gets the "whirlpool" account.

func (*DripOrcaWhirlpool) GetWhirlpoolProgramAccount

func (inst *DripOrcaWhirlpool) GetWhirlpoolProgramAccount() *ag_solanago.AccountMeta

GetWhirlpoolProgramAccount gets the "whirlpoolProgram" account.

func (DripOrcaWhirlpool) MarshalWithEncoder

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

func (*DripOrcaWhirlpool) SetCommonAccountsFromBuilder

func (inst *DripOrcaWhirlpool) SetCommonAccountsFromBuilder(dripOrcaWhirlpoolCommonAccountsBuilder *DripOrcaWhirlpoolCommonAccountsBuilder) *DripOrcaWhirlpool

func (*DripOrcaWhirlpool) SetOracleAccount

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

SetOracleAccount sets the "oracle" account.

func (*DripOrcaWhirlpool) SetTickArray0Account

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

SetTickArray0Account sets the "tickArray0" account.

func (*DripOrcaWhirlpool) SetTickArray1Account

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

SetTickArray1Account sets the "tickArray1" account.

func (*DripOrcaWhirlpool) SetTickArray2Account

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

SetTickArray2Account sets the "tickArray2" account.

func (*DripOrcaWhirlpool) SetWhirlpoolAccount

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

SetWhirlpoolAccount sets the "whirlpool" account.

func (*DripOrcaWhirlpool) SetWhirlpoolProgramAccount

func (inst *DripOrcaWhirlpool) SetWhirlpoolProgramAccount(whirlpoolProgram ag_solanago.PublicKey) *DripOrcaWhirlpool

SetWhirlpoolProgramAccount sets the "whirlpoolProgram" account.

func (*DripOrcaWhirlpool) UnmarshalWithDecoder

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

func (*DripOrcaWhirlpool) Validate

func (inst *DripOrcaWhirlpool) Validate() error

func (DripOrcaWhirlpool) ValidateAndBuild

func (inst DripOrcaWhirlpool) 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 DripOrcaWhirlpoolAccounts

type DripOrcaWhirlpoolAccounts struct {
	Common struct {
		DripTriggerSource    ag_solanago.PublicKey
		Vault                ag_solanago.PublicKey
		VaultProtoConfig     ag_solanago.PublicKey
		LastVaultPeriod      ag_solanago.PublicKey
		CurrentVaultPeriod   ag_solanago.PublicKey
		VaultTokenAAccount   ag_solanago.PublicKey
		VaultTokenBAccount   ag_solanago.PublicKey
		SwapTokenAAccount    ag_solanago.PublicKey
		SwapTokenBAccount    ag_solanago.PublicKey
		DripFeeTokenAAccount ag_solanago.PublicKey
		TokenProgram         ag_solanago.PublicKey
	}
	Whirlpool        ag_solanago.PublicKey
	TickArray0       ag_solanago.PublicKey
	TickArray1       ag_solanago.PublicKey
	TickArray2       ag_solanago.PublicKey
	Oracle           ag_solanago.PublicKey
	WhirlpoolProgram ag_solanago.PublicKey
}

type DripOrcaWhirlpoolCommonAccountsBuilder

type DripOrcaWhirlpoolCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewDripOrcaWhirlpoolCommonAccountsBuilder

func NewDripOrcaWhirlpoolCommonAccountsBuilder() *DripOrcaWhirlpoolCommonAccountsBuilder

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetCurrentVaultPeriodAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetCurrentVaultPeriodAccount() *ag_solanago.AccountMeta

GetCurrentVaultPeriodAccount gets the "currentVaultPeriod" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetDripFeeTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetDripFeeTokenAAccountAccount() *ag_solanago.AccountMeta

GetDripFeeTokenAAccountAccount gets the "dripFeeTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetDripTriggerSourceAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetDripTriggerSourceAccount() *ag_solanago.AccountMeta

GetDripTriggerSourceAccount gets the "dripTriggerSource" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetLastVaultPeriodAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetLastVaultPeriodAccount() *ag_solanago.AccountMeta

GetLastVaultPeriodAccount gets the "lastVaultPeriod" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetSwapTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetSwapTokenAAccountAccount() *ag_solanago.AccountMeta

GetSwapTokenAAccountAccount gets the "swapTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetSwapTokenBAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetSwapTokenBAccountAccount() *ag_solanago.AccountMeta

GetSwapTokenBAccountAccount gets the "swapTokenBAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultAccount

GetVaultAccount gets the "vault" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultProtoConfigAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultTokenAAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenAAccountAccount gets the "vaultTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultTokenBAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) GetVaultTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenBAccountAccount gets the "vaultTokenBAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetCurrentVaultPeriodAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetCurrentVaultPeriodAccount(currentVaultPeriod ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetCurrentVaultPeriodAccount sets the "currentVaultPeriod" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetDripFeeTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetDripFeeTokenAAccountAccount(dripFeeTokenAAccount ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetDripFeeTokenAAccountAccount sets the "dripFeeTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetDripTriggerSourceAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetDripTriggerSourceAccount(dripTriggerSource ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetDripTriggerSourceAccount sets the "dripTriggerSource" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetLastVaultPeriodAccount

SetLastVaultPeriodAccount sets the "lastVaultPeriod" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetSwapTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetSwapTokenAAccountAccount(swapTokenAAccount ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetSwapTokenAAccountAccount sets the "swapTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetSwapTokenBAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetSwapTokenBAccountAccount(swapTokenBAccount ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetSwapTokenBAccountAccount sets the "swapTokenBAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetTokenProgramAccount

SetTokenProgramAccount sets the "tokenProgram" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultProtoConfigAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultTokenAAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultTokenAAccountAccount(vaultTokenAAccount ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetVaultTokenAAccountAccount sets the "vaultTokenAAccount" account.

func (*DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultTokenBAccountAccount

func (inst *DripOrcaWhirlpoolCommonAccountsBuilder) SetVaultTokenBAccountAccount(vaultTokenBAccount ag_solanago.PublicKey) *DripOrcaWhirlpoolCommonAccountsBuilder

SetVaultTokenBAccountAccount sets the "vaultTokenBAccount" account.

type DripSplTokenSwap

type DripSplTokenSwap struct {

	// ····· common: [0] = [SIGNER] dripTriggerSource
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [] vaultProtoConfig
	//
	// ············· [3] = [] lastVaultPeriod
	//
	// ············· [4] = [WRITE] currentVaultPeriod
	//
	// ············· [5] = [WRITE] vaultTokenAAccount
	//
	// ············· [6] = [WRITE] vaultTokenBAccount
	//
	// ············· [7] = [WRITE] swapTokenAAccount
	//
	// ············· [8] = [WRITE] swapTokenBAccount
	//
	// ············· [9] = [WRITE] dripFeeTokenAAccount
	//
	// ············· [10] = [] tokenProgram
	//
	// [11] = [] swap
	//
	// [12] = [WRITE] swapTokenMint
	//
	// [13] = [WRITE] swapFeeAccount
	//
	// [14] = [] swapAuthority
	//
	// [15] = [] tokenSwapProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

DripSplTokenSwap is the `dripSplTokenSwap` instruction.

func NewDripSplTokenSwapInstruction

func NewDripSplTokenSwapInstruction(

	commonDripTriggerSource ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultProtoConfig ag_solanago.PublicKey,
	commonLastVaultPeriod ag_solanago.PublicKey,
	commonCurrentVaultPeriod ag_solanago.PublicKey,
	commonVaultTokenAAccount ag_solanago.PublicKey,
	commonVaultTokenBAccount ag_solanago.PublicKey,
	commonSwapTokenAAccount ag_solanago.PublicKey,
	commonSwapTokenBAccount ag_solanago.PublicKey,
	commonDripFeeTokenAAccount ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey,
	swap ag_solanago.PublicKey,
	swapTokenMint ag_solanago.PublicKey,
	swapFeeAccount ag_solanago.PublicKey,
	swapAuthority ag_solanago.PublicKey,
	tokenSwapProgram ag_solanago.PublicKey) *DripSplTokenSwap

NewDripSplTokenSwapInstruction declares a new DripSplTokenSwap instruction with the provided parameters and accounts.

func NewDripSplTokenSwapInstructionBuilder

func NewDripSplTokenSwapInstructionBuilder() *DripSplTokenSwap

NewDripSplTokenSwapInstructionBuilder creates a new `DripSplTokenSwap` instruction builder.

func (DripSplTokenSwap) Build

func (inst DripSplTokenSwap) Build() *Instruction

func (*DripSplTokenSwap) EncodeToTree

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

func (*DripSplTokenSwap) GetDripSplTokenSwapAccounts

func (inst *DripSplTokenSwap) GetDripSplTokenSwapAccounts() *DripSplTokenSwapAccounts

func (*DripSplTokenSwap) GetSwapAccount

func (inst *DripSplTokenSwap) GetSwapAccount() *ag_solanago.AccountMeta

GetSwapAccount gets the "swap" account.

func (*DripSplTokenSwap) GetSwapAuthorityAccount

func (inst *DripSplTokenSwap) GetSwapAuthorityAccount() *ag_solanago.AccountMeta

GetSwapAuthorityAccount gets the "swapAuthority" account.

func (*DripSplTokenSwap) GetSwapFeeAccountAccount

func (inst *DripSplTokenSwap) GetSwapFeeAccountAccount() *ag_solanago.AccountMeta

GetSwapFeeAccountAccount gets the "swapFeeAccount" account.

func (*DripSplTokenSwap) GetSwapTokenMintAccount

func (inst *DripSplTokenSwap) GetSwapTokenMintAccount() *ag_solanago.AccountMeta

GetSwapTokenMintAccount gets the "swapTokenMint" account.

func (*DripSplTokenSwap) GetTokenSwapProgramAccount

func (inst *DripSplTokenSwap) GetTokenSwapProgramAccount() *ag_solanago.AccountMeta

GetTokenSwapProgramAccount gets the "tokenSwapProgram" account.

func (DripSplTokenSwap) MarshalWithEncoder

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

func (*DripSplTokenSwap) SetCommonAccountsFromBuilder

func (inst *DripSplTokenSwap) SetCommonAccountsFromBuilder(dripSplTokenSwapCommonAccountsBuilder *DripSplTokenSwapCommonAccountsBuilder) *DripSplTokenSwap

func (*DripSplTokenSwap) SetSwapAccount

func (inst *DripSplTokenSwap) SetSwapAccount(swap ag_solanago.PublicKey) *DripSplTokenSwap

SetSwapAccount sets the "swap" account.

func (*DripSplTokenSwap) SetSwapAuthorityAccount

func (inst *DripSplTokenSwap) SetSwapAuthorityAccount(swapAuthority ag_solanago.PublicKey) *DripSplTokenSwap

SetSwapAuthorityAccount sets the "swapAuthority" account.

func (*DripSplTokenSwap) SetSwapFeeAccountAccount

func (inst *DripSplTokenSwap) SetSwapFeeAccountAccount(swapFeeAccount ag_solanago.PublicKey) *DripSplTokenSwap

SetSwapFeeAccountAccount sets the "swapFeeAccount" account.

func (*DripSplTokenSwap) SetSwapTokenMintAccount

func (inst *DripSplTokenSwap) SetSwapTokenMintAccount(swapTokenMint ag_solanago.PublicKey) *DripSplTokenSwap

SetSwapTokenMintAccount sets the "swapTokenMint" account.

func (*DripSplTokenSwap) SetTokenSwapProgramAccount

func (inst *DripSplTokenSwap) SetTokenSwapProgramAccount(tokenSwapProgram ag_solanago.PublicKey) *DripSplTokenSwap

SetTokenSwapProgramAccount sets the "tokenSwapProgram" account.

func (*DripSplTokenSwap) UnmarshalWithDecoder

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

func (*DripSplTokenSwap) Validate

func (inst *DripSplTokenSwap) Validate() error

func (DripSplTokenSwap) ValidateAndBuild

func (inst DripSplTokenSwap) 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 DripSplTokenSwapAccounts

type DripSplTokenSwapAccounts struct {
	Common struct {
		DripTriggerSource    ag_solanago.PublicKey
		Vault                ag_solanago.PublicKey
		VaultProtoConfig     ag_solanago.PublicKey
		LastVaultPeriod      ag_solanago.PublicKey
		CurrentVaultPeriod   ag_solanago.PublicKey
		VaultTokenAAccount   ag_solanago.PublicKey
		VaultTokenBAccount   ag_solanago.PublicKey
		SwapTokenAAccount    ag_solanago.PublicKey
		SwapTokenBAccount    ag_solanago.PublicKey
		DripFeeTokenAAccount ag_solanago.PublicKey
		TokenProgram         ag_solanago.PublicKey
	}
	Swap             ag_solanago.PublicKey
	SwapTokenMint    ag_solanago.PublicKey
	SwapFeeAccount   ag_solanago.PublicKey
	SwapAuthority    ag_solanago.PublicKey
	TokenSwapProgram ag_solanago.PublicKey
}

type DripSplTokenSwapCommonAccountsBuilder

type DripSplTokenSwapCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewDripSplTokenSwapCommonAccountsBuilder

func NewDripSplTokenSwapCommonAccountsBuilder() *DripSplTokenSwapCommonAccountsBuilder

func (*DripSplTokenSwapCommonAccountsBuilder) GetCurrentVaultPeriodAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetCurrentVaultPeriodAccount() *ag_solanago.AccountMeta

GetCurrentVaultPeriodAccount gets the "currentVaultPeriod" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetDripFeeTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetDripFeeTokenAAccountAccount() *ag_solanago.AccountMeta

GetDripFeeTokenAAccountAccount gets the "dripFeeTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetDripTriggerSourceAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetDripTriggerSourceAccount() *ag_solanago.AccountMeta

GetDripTriggerSourceAccount gets the "dripTriggerSource" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetLastVaultPeriodAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetLastVaultPeriodAccount() *ag_solanago.AccountMeta

GetLastVaultPeriodAccount gets the "lastVaultPeriod" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetSwapTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetSwapTokenAAccountAccount() *ag_solanago.AccountMeta

GetSwapTokenAAccountAccount gets the "swapTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetSwapTokenBAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetSwapTokenBAccountAccount() *ag_solanago.AccountMeta

GetSwapTokenBAccountAccount gets the "swapTokenBAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetVaultAccount

GetVaultAccount gets the "vault" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetVaultProtoConfigAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetVaultTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetVaultTokenAAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenAAccountAccount gets the "vaultTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) GetVaultTokenBAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) GetVaultTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenBAccountAccount gets the "vaultTokenBAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetCurrentVaultPeriodAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetCurrentVaultPeriodAccount(currentVaultPeriod ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetCurrentVaultPeriodAccount sets the "currentVaultPeriod" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetDripFeeTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetDripFeeTokenAAccountAccount(dripFeeTokenAAccount ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetDripFeeTokenAAccountAccount sets the "dripFeeTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetDripTriggerSourceAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetDripTriggerSourceAccount(dripTriggerSource ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetDripTriggerSourceAccount sets the "dripTriggerSource" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetLastVaultPeriodAccount

SetLastVaultPeriodAccount sets the "lastVaultPeriod" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetSwapTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetSwapTokenAAccountAccount(swapTokenAAccount ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetSwapTokenAAccountAccount sets the "swapTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetSwapTokenBAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetSwapTokenBAccountAccount(swapTokenBAccount ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetSwapTokenBAccountAccount sets the "swapTokenBAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetTokenProgramAccount

SetTokenProgramAccount sets the "tokenProgram" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetVaultProtoConfigAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetVaultTokenAAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetVaultTokenAAccountAccount(vaultTokenAAccount ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetVaultTokenAAccountAccount sets the "vaultTokenAAccount" account.

func (*DripSplTokenSwapCommonAccountsBuilder) SetVaultTokenBAccountAccount

func (inst *DripSplTokenSwapCommonAccountsBuilder) SetVaultTokenBAccountAccount(vaultTokenBAccount ag_solanago.PublicKey) *DripSplTokenSwapCommonAccountsBuilder

SetVaultTokenBAccountAccount sets the "vaultTokenBAccount" account.

type InitVault

type InitVault struct {
	Params *InitializeVaultParams

	// [0] = [WRITE, SIGNER] creator
	//
	// [1] = [WRITE] vault
	//
	// [2] = [] vaultProtoConfig
	//
	// [3] = [WRITE] tokenAAccount
	//
	// [4] = [WRITE] tokenBAccount
	//
	// [5] = [] treasuryTokenBAccount
	//
	// [6] = [] tokenAMint
	//
	// [7] = [] tokenBMint
	//
	// [8] = [] tokenProgram
	//
	// [9] = [] associatedTokenProgram
	//
	// [10] = [] systemProgram
	//
	// [11] = [] rent
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitVault is the `initVault` instruction.

func NewInitVaultInstruction

func NewInitVaultInstruction(

	params InitializeVaultParams,

	creator ag_solanago.PublicKey,
	vault ag_solanago.PublicKey,
	vaultProtoConfig ag_solanago.PublicKey,
	tokenAAccount ag_solanago.PublicKey,
	tokenBAccount ag_solanago.PublicKey,
	treasuryTokenBAccount ag_solanago.PublicKey,
	tokenAMint ag_solanago.PublicKey,
	tokenBMint ag_solanago.PublicKey,
	tokenProgram ag_solanago.PublicKey,
	associatedTokenProgram ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	rent ag_solanago.PublicKey) *InitVault

NewInitVaultInstruction declares a new InitVault instruction with the provided parameters and accounts.

func NewInitVaultInstructionBuilder

func NewInitVaultInstructionBuilder() *InitVault

NewInitVaultInstructionBuilder creates a new `InitVault` instruction builder.

func (InitVault) Build

func (inst InitVault) Build() *Instruction

func (*InitVault) EncodeToTree

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

func (*InitVault) GetAssociatedTokenProgramAccount

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

GetAssociatedTokenProgramAccount gets the "associatedTokenProgram" account.

func (*InitVault) GetCreatorAccount

func (inst *InitVault) GetCreatorAccount() *ag_solanago.AccountMeta

GetCreatorAccount gets the "creator" account.

func (*InitVault) GetInitVaultAccounts

func (inst *InitVault) GetInitVaultAccounts() *InitVaultAccounts

func (*InitVault) GetRentAccount

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

GetRentAccount gets the "rent" account.

func (*InitVault) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitVault) GetTokenAAccountAccount

func (inst *InitVault) GetTokenAAccountAccount() *ag_solanago.AccountMeta

GetTokenAAccountAccount gets the "tokenAAccount" account.

func (*InitVault) GetTokenAMintAccount

func (inst *InitVault) GetTokenAMintAccount() *ag_solanago.AccountMeta

GetTokenAMintAccount gets the "tokenAMint" account.

func (*InitVault) GetTokenBAccountAccount

func (inst *InitVault) GetTokenBAccountAccount() *ag_solanago.AccountMeta

GetTokenBAccountAccount gets the "tokenBAccount" account.

func (*InitVault) GetTokenBMintAccount

func (inst *InitVault) GetTokenBMintAccount() *ag_solanago.AccountMeta

GetTokenBMintAccount gets the "tokenBMint" account.

func (*InitVault) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*InitVault) GetTreasuryTokenBAccountAccount

func (inst *InitVault) GetTreasuryTokenBAccountAccount() *ag_solanago.AccountMeta

GetTreasuryTokenBAccountAccount gets the "treasuryTokenBAccount" account.

func (*InitVault) GetVaultAccount

func (inst *InitVault) GetVaultAccount() *ag_solanago.AccountMeta

GetVaultAccount gets the "vault" account.

func (*InitVault) GetVaultProtoConfigAccount

func (inst *InitVault) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (InitVault) MarshalWithEncoder

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

func (*InitVault) SetAssociatedTokenProgramAccount

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

SetAssociatedTokenProgramAccount sets the "associatedTokenProgram" account.

func (*InitVault) SetCreatorAccount

func (inst *InitVault) SetCreatorAccount(creator ag_solanago.PublicKey) *InitVault

SetCreatorAccount sets the "creator" account.

func (*InitVault) SetParams

func (inst *InitVault) SetParams(params InitializeVaultParams) *InitVault

SetParams sets the "params" parameter.

func (*InitVault) SetRentAccount

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

SetRentAccount sets the "rent" account.

func (*InitVault) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitVault) SetTokenAAccountAccount

func (inst *InitVault) SetTokenAAccountAccount(tokenAAccount ag_solanago.PublicKey) *InitVault

SetTokenAAccountAccount sets the "tokenAAccount" account.

func (*InitVault) SetTokenAMintAccount

func (inst *InitVault) SetTokenAMintAccount(tokenAMint ag_solanago.PublicKey) *InitVault

SetTokenAMintAccount sets the "tokenAMint" account.

func (*InitVault) SetTokenBAccountAccount

func (inst *InitVault) SetTokenBAccountAccount(tokenBAccount ag_solanago.PublicKey) *InitVault

SetTokenBAccountAccount sets the "tokenBAccount" account.

func (*InitVault) SetTokenBMintAccount

func (inst *InitVault) SetTokenBMintAccount(tokenBMint ag_solanago.PublicKey) *InitVault

SetTokenBMintAccount sets the "tokenBMint" account.

func (*InitVault) SetTokenProgramAccount

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

SetTokenProgramAccount sets the "tokenProgram" account.

func (*InitVault) SetTreasuryTokenBAccountAccount

func (inst *InitVault) SetTreasuryTokenBAccountAccount(treasuryTokenBAccount ag_solanago.PublicKey) *InitVault

SetTreasuryTokenBAccountAccount sets the "treasuryTokenBAccount" account.

func (*InitVault) SetVaultAccount

func (inst *InitVault) SetVaultAccount(vault ag_solanago.PublicKey) *InitVault

SetVaultAccount sets the "vault" account.

func (*InitVault) SetVaultProtoConfigAccount

func (inst *InitVault) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *InitVault

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*InitVault) UnmarshalWithDecoder

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

func (*InitVault) Validate

func (inst *InitVault) Validate() error

func (InitVault) ValidateAndBuild

func (inst InitVault) 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 InitVaultAccounts

type InitVaultAccounts struct {
	Creator                ag_solanago.PublicKey
	Vault                  ag_solanago.PublicKey
	VaultProtoConfig       ag_solanago.PublicKey
	TokenAAccount          ag_solanago.PublicKey
	TokenBAccount          ag_solanago.PublicKey
	TreasuryTokenBAccount  ag_solanago.PublicKey
	TokenAMint             ag_solanago.PublicKey
	TokenBMint             ag_solanago.PublicKey
	TokenProgram           ag_solanago.PublicKey
	AssociatedTokenProgram ag_solanago.PublicKey
	SystemProgram          ag_solanago.PublicKey
	Rent                   ag_solanago.PublicKey
}

type InitVaultPeriod

type InitVaultPeriod struct {
	Params *InitializeVaultPeriodParams

	// [0] = [WRITE] vaultPeriod
	//
	// [1] = [] vault
	//
	// [2] = [WRITE, SIGNER] creator
	//
	// [3] = [] systemProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitVaultPeriod is the `initVaultPeriod` instruction.

func NewInitVaultPeriodInstruction

func NewInitVaultPeriodInstruction(

	params InitializeVaultPeriodParams,

	vaultPeriod ag_solanago.PublicKey,
	vault ag_solanago.PublicKey,
	creator ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey) *InitVaultPeriod

NewInitVaultPeriodInstruction declares a new InitVaultPeriod instruction with the provided parameters and accounts.

func NewInitVaultPeriodInstructionBuilder

func NewInitVaultPeriodInstructionBuilder() *InitVaultPeriod

NewInitVaultPeriodInstructionBuilder creates a new `InitVaultPeriod` instruction builder.

func (InitVaultPeriod) Build

func (inst InitVaultPeriod) Build() *Instruction

func (*InitVaultPeriod) EncodeToTree

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

func (*InitVaultPeriod) GetCreatorAccount

func (inst *InitVaultPeriod) GetCreatorAccount() *ag_solanago.AccountMeta

GetCreatorAccount gets the "creator" account.

func (*InitVaultPeriod) GetInitVaultPeriodAccounts

func (inst *InitVaultPeriod) GetInitVaultPeriodAccounts() *InitVaultPeriodAccounts

func (*InitVaultPeriod) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitVaultPeriod) GetVaultAccount

func (inst *InitVaultPeriod) GetVaultAccount() *ag_solanago.AccountMeta

GetVaultAccount gets the "vault" account.

func (*InitVaultPeriod) GetVaultPeriodAccount

func (inst *InitVaultPeriod) GetVaultPeriodAccount() *ag_solanago.AccountMeta

GetVaultPeriodAccount gets the "vaultPeriod" account.

func (InitVaultPeriod) MarshalWithEncoder

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

func (*InitVaultPeriod) SetCreatorAccount

func (inst *InitVaultPeriod) SetCreatorAccount(creator ag_solanago.PublicKey) *InitVaultPeriod

SetCreatorAccount sets the "creator" account.

func (*InitVaultPeriod) SetParams

SetParams sets the "params" parameter.

func (*InitVaultPeriod) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitVaultPeriod) SetVaultAccount

func (inst *InitVaultPeriod) SetVaultAccount(vault ag_solanago.PublicKey) *InitVaultPeriod

SetVaultAccount sets the "vault" account.

func (*InitVaultPeriod) SetVaultPeriodAccount

func (inst *InitVaultPeriod) SetVaultPeriodAccount(vaultPeriod ag_solanago.PublicKey) *InitVaultPeriod

SetVaultPeriodAccount sets the "vaultPeriod" account.

func (*InitVaultPeriod) UnmarshalWithDecoder

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

func (*InitVaultPeriod) Validate

func (inst *InitVaultPeriod) Validate() error

func (InitVaultPeriod) ValidateAndBuild

func (inst InitVaultPeriod) 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 InitVaultPeriodAccounts

type InitVaultPeriodAccounts struct {
	VaultPeriod   ag_solanago.PublicKey
	Vault         ag_solanago.PublicKey
	Creator       ag_solanago.PublicKey
	SystemProgram ag_solanago.PublicKey
}

type InitVaultProtoConfig

type InitVaultProtoConfig struct {
	Params *InitializeVaultProtoConfigParams

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

InitVaultProtoConfig is the `initVaultProtoConfig` instruction.

func NewInitVaultProtoConfigInstruction

func NewInitVaultProtoConfigInstruction(

	params InitializeVaultProtoConfigParams,

	creator ag_solanago.PublicKey,
	vaultProtoConfig ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey) *InitVaultProtoConfig

NewInitVaultProtoConfigInstruction declares a new InitVaultProtoConfig instruction with the provided parameters and accounts.

func NewInitVaultProtoConfigInstructionBuilder

func NewInitVaultProtoConfigInstructionBuilder() *InitVaultProtoConfig

NewInitVaultProtoConfigInstructionBuilder creates a new `InitVaultProtoConfig` instruction builder.

func (InitVaultProtoConfig) Build

func (inst InitVaultProtoConfig) Build() *Instruction

func (*InitVaultProtoConfig) EncodeToTree

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

func (*InitVaultProtoConfig) GetCreatorAccount

func (inst *InitVaultProtoConfig) GetCreatorAccount() *ag_solanago.AccountMeta

GetCreatorAccount gets the "creator" account.

func (*InitVaultProtoConfig) GetInitVaultProtoConfigAccounts

func (inst *InitVaultProtoConfig) GetInitVaultProtoConfigAccounts() *InitVaultProtoConfigAccounts

func (*InitVaultProtoConfig) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account.

func (*InitVaultProtoConfig) GetVaultProtoConfigAccount

func (inst *InitVaultProtoConfig) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (InitVaultProtoConfig) MarshalWithEncoder

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

func (*InitVaultProtoConfig) SetCreatorAccount

func (inst *InitVaultProtoConfig) SetCreatorAccount(creator ag_solanago.PublicKey) *InitVaultProtoConfig

SetCreatorAccount sets the "creator" account.

func (*InitVaultProtoConfig) SetParams

SetParams sets the "params" parameter.

func (*InitVaultProtoConfig) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account.

func (*InitVaultProtoConfig) SetVaultProtoConfigAccount

func (inst *InitVaultProtoConfig) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *InitVaultProtoConfig

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*InitVaultProtoConfig) UnmarshalWithDecoder

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

func (*InitVaultProtoConfig) Validate

func (inst *InitVaultProtoConfig) Validate() error

func (InitVaultProtoConfig) ValidateAndBuild

func (inst InitVaultProtoConfig) 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 InitVaultProtoConfigAccounts

type InitVaultProtoConfigAccounts struct {
	Creator          ag_solanago.PublicKey
	VaultProtoConfig ag_solanago.PublicKey
	SystemProgram    ag_solanago.PublicKey
}

type InitializeVaultParams

type InitializeVaultParams struct {
	MaxSlippageBps   uint16
	WhitelistedSwaps []ag_solanago.PublicKey
}

func (InitializeVaultParams) MarshalWithEncoder

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

func (*InitializeVaultParams) UnmarshalWithDecoder

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

type InitializeVaultPeriodParams

type InitializeVaultPeriodParams struct {
	PeriodId uint64
}

func (InitializeVaultPeriodParams) MarshalWithEncoder

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

func (*InitializeVaultPeriodParams) UnmarshalWithDecoder

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

type InitializeVaultProtoConfigParams

type InitializeVaultProtoConfigParams struct {
	Granularity             uint64
	TokenADripTriggerSpread uint16
	TokenBWithdrawalSpread  uint16
	TokenBReferralSpread    uint16
	Admin                   ag_solanago.PublicKey
}

func (InitializeVaultProtoConfigParams) MarshalWithEncoder

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

func (*InitializeVaultProtoConfigParams) UnmarshalWithDecoder

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

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 Position

type Position struct {
	Vault                     ag_solanago.PublicKey
	PositionAuthority         ag_solanago.PublicKey
	Referrer                  ag_solanago.PublicKey
	DepositedTokenAAmount     uint64
	WithdrawnTokenBAmount     uint64
	DepositTimestamp          int64
	DripPeriodIdBeforeDeposit uint64
	NumberOfSwaps             uint64
	PeriodicDripAmount        uint64
	IsClosed                  bool
	Bump                      uint8
}

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 SetVaultSwapWhitelist

type SetVaultSwapWhitelist struct {
	Params *UpdateVaultWhitelistedSwapsParams

	// [0] = [WRITE, SIGNER] admin
	//
	// [1] = [WRITE] vault
	//
	// [2] = [] vaultProtoConfig
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetVaultSwapWhitelist is the `setVaultSwapWhitelist` instruction.

func NewSetVaultSwapWhitelistInstruction

func NewSetVaultSwapWhitelistInstruction(

	params UpdateVaultWhitelistedSwapsParams,

	admin ag_solanago.PublicKey,
	vault ag_solanago.PublicKey,
	vaultProtoConfig ag_solanago.PublicKey) *SetVaultSwapWhitelist

NewSetVaultSwapWhitelistInstruction declares a new SetVaultSwapWhitelist instruction with the provided parameters and accounts.

func NewSetVaultSwapWhitelistInstructionBuilder

func NewSetVaultSwapWhitelistInstructionBuilder() *SetVaultSwapWhitelist

NewSetVaultSwapWhitelistInstructionBuilder creates a new `SetVaultSwapWhitelist` instruction builder.

func (SetVaultSwapWhitelist) Build

func (inst SetVaultSwapWhitelist) Build() *Instruction

func (*SetVaultSwapWhitelist) EncodeToTree

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

func (*SetVaultSwapWhitelist) GetAdminAccount

func (inst *SetVaultSwapWhitelist) GetAdminAccount() *ag_solanago.AccountMeta

GetAdminAccount gets the "admin" account.

func (*SetVaultSwapWhitelist) GetSetVaultSwapWhitelistAccounts

func (inst *SetVaultSwapWhitelist) GetSetVaultSwapWhitelistAccounts() *SetVaultSwapWhitelistAccounts

func (*SetVaultSwapWhitelist) GetVaultAccount

func (inst *SetVaultSwapWhitelist) GetVaultAccount() *ag_solanago.AccountMeta

GetVaultAccount gets the "vault" account.

func (*SetVaultSwapWhitelist) GetVaultProtoConfigAccount

func (inst *SetVaultSwapWhitelist) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (SetVaultSwapWhitelist) MarshalWithEncoder

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

func (*SetVaultSwapWhitelist) SetAdminAccount

func (inst *SetVaultSwapWhitelist) SetAdminAccount(admin ag_solanago.PublicKey) *SetVaultSwapWhitelist

SetAdminAccount sets the "admin" account.

func (*SetVaultSwapWhitelist) SetParams

SetParams sets the "params" parameter.

func (*SetVaultSwapWhitelist) SetVaultAccount

func (inst *SetVaultSwapWhitelist) SetVaultAccount(vault ag_solanago.PublicKey) *SetVaultSwapWhitelist

SetVaultAccount sets the "vault" account.

func (*SetVaultSwapWhitelist) SetVaultProtoConfigAccount

func (inst *SetVaultSwapWhitelist) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *SetVaultSwapWhitelist

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*SetVaultSwapWhitelist) UnmarshalWithDecoder

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

func (*SetVaultSwapWhitelist) Validate

func (inst *SetVaultSwapWhitelist) Validate() error

func (SetVaultSwapWhitelist) ValidateAndBuild

func (inst SetVaultSwapWhitelist) 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 SetVaultSwapWhitelistAccounts

type SetVaultSwapWhitelistAccounts struct {
	Admin            ag_solanago.PublicKey
	Vault            ag_solanago.PublicKey
	VaultProtoConfig ag_solanago.PublicKey
}

type UpdateVaultWhitelistedSwapsParams

type UpdateVaultWhitelistedSwapsParams struct {
	WhitelistedSwaps []ag_solanago.PublicKey
}

func (UpdateVaultWhitelistedSwapsParams) MarshalWithEncoder

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

func (*UpdateVaultWhitelistedSwapsParams) UnmarshalWithDecoder

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

type Vault

type Vault struct {
	ProtoConfig             ag_solanago.PublicKey
	TokenAMint              ag_solanago.PublicKey
	TokenBMint              ag_solanago.PublicKey
	TokenAAccount           ag_solanago.PublicKey
	TokenBAccount           ag_solanago.PublicKey
	TreasuryTokenBAccount   ag_solanago.PublicKey
	WhitelistedSwaps        [5]ag_solanago.PublicKey
	LastDripPeriod          uint64
	DripAmount              uint64
	DripActivationTimestamp int64
	Bump                    uint8
	LimitSwaps              bool
	MaxSlippageBps          uint16
}

func (Vault) MarshalWithEncoder

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

func (*Vault) UnmarshalWithDecoder

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

type VaultPeriod

type VaultPeriod struct {
	Vault         ag_solanago.PublicKey
	PeriodId      uint64
	Dar           uint64
	Twap          ag_binary.Uint128
	DripTimestamp int64
	Bump          uint8
}

func (VaultPeriod) MarshalWithEncoder

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

func (*VaultPeriod) UnmarshalWithDecoder

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

type VaultProtoConfig

type VaultProtoConfig struct {
	Granularity             uint64
	TokenADripTriggerSpread uint16
	TokenBWithdrawalSpread  uint16
	TokenBReferralSpread    uint16
	Admin                   ag_solanago.PublicKey
}

func (VaultProtoConfig) MarshalWithEncoder

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

func (*VaultProtoConfig) UnmarshalWithDecoder

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

type WithdrawB

type WithdrawB struct {

	// ····· common: [0] = [WRITE, SIGNER] withdrawer
	//
	// ············· [1] = [WRITE] vault
	//
	// ············· [2] = [] vaultProtoConfig
	//
	// ············· [3] = [] vaultPeriodI
	//
	// ············· [4] = [] vaultPeriodJ
	//
	// ············· [5] = [WRITE] userPosition
	//
	// ············· [6] = [WRITE] userPositionNftAccount
	//
	// ············· [7] = [WRITE] vaultTokenBAccount
	//
	// ············· [8] = [WRITE] vaultTreasuryTokenBAccount
	//
	// ············· [9] = [WRITE] userTokenBAccount
	//
	// ············· [10] = [WRITE] referrer
	//
	// ············· [11] = [] tokenProgram
	ag_solanago.AccountMetaSlice `bin:"-"`
}

WithdrawB is the `withdrawB` instruction.

func NewWithdrawBInstruction

func NewWithdrawBInstruction(

	commonWithdrawer ag_solanago.PublicKey,
	commonVault ag_solanago.PublicKey,
	commonVaultProtoConfig ag_solanago.PublicKey,
	commonVaultPeriodI ag_solanago.PublicKey,
	commonVaultPeriodJ ag_solanago.PublicKey,
	commonUserPosition ag_solanago.PublicKey,
	commonUserPositionNftAccount ag_solanago.PublicKey,
	commonVaultTokenBAccount ag_solanago.PublicKey,
	commonVaultTreasuryTokenBAccount ag_solanago.PublicKey,
	commonUserTokenBAccount ag_solanago.PublicKey,
	commonReferrer ag_solanago.PublicKey,
	commonTokenProgram ag_solanago.PublicKey) *WithdrawB

NewWithdrawBInstruction declares a new WithdrawB instruction with the provided parameters and accounts.

func NewWithdrawBInstructionBuilder

func NewWithdrawBInstructionBuilder() *WithdrawB

NewWithdrawBInstructionBuilder creates a new `WithdrawB` instruction builder.

func (WithdrawB) Build

func (inst WithdrawB) Build() *Instruction

func (*WithdrawB) EncodeToTree

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

func (*WithdrawB) GetWithdrawBAccounts

func (inst *WithdrawB) GetWithdrawBAccounts() *WithdrawBAccounts

func (WithdrawB) MarshalWithEncoder

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

func (*WithdrawB) SetCommonAccountsFromBuilder

func (inst *WithdrawB) SetCommonAccountsFromBuilder(withdrawBCommonAccountsBuilder *WithdrawBCommonAccountsBuilder) *WithdrawB

func (*WithdrawB) UnmarshalWithDecoder

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

func (*WithdrawB) Validate

func (inst *WithdrawB) Validate() error

func (WithdrawB) ValidateAndBuild

func (inst WithdrawB) 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 WithdrawBAccounts

type WithdrawBAccounts struct {
	Common struct {
		Withdrawer                 ag_solanago.PublicKey
		Vault                      ag_solanago.PublicKey
		VaultProtoConfig           ag_solanago.PublicKey
		VaultPeriodI               ag_solanago.PublicKey
		VaultPeriodJ               ag_solanago.PublicKey
		UserPosition               ag_solanago.PublicKey
		UserPositionNftAccount     ag_solanago.PublicKey
		VaultTokenBAccount         ag_solanago.PublicKey
		VaultTreasuryTokenBAccount ag_solanago.PublicKey
		UserTokenBAccount          ag_solanago.PublicKey
		Referrer                   ag_solanago.PublicKey
		TokenProgram               ag_solanago.PublicKey
	}
}

type WithdrawBCommonAccountsBuilder

type WithdrawBCommonAccountsBuilder struct {
	ag_solanago.AccountMetaSlice `bin:"-"`
}

func NewWithdrawBCommonAccountsBuilder

func NewWithdrawBCommonAccountsBuilder() *WithdrawBCommonAccountsBuilder

func (*WithdrawBCommonAccountsBuilder) GetReferrerAccount

func (inst *WithdrawBCommonAccountsBuilder) GetReferrerAccount() *ag_solanago.AccountMeta

GetReferrerAccount gets the "referrer" account.

func (*WithdrawBCommonAccountsBuilder) GetTokenProgramAccount

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

GetTokenProgramAccount gets the "tokenProgram" account.

func (*WithdrawBCommonAccountsBuilder) GetUserPositionAccount

func (inst *WithdrawBCommonAccountsBuilder) GetUserPositionAccount() *ag_solanago.AccountMeta

GetUserPositionAccount gets the "userPosition" account.

func (*WithdrawBCommonAccountsBuilder) GetUserPositionNftAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) GetUserPositionNftAccountAccount() *ag_solanago.AccountMeta

GetUserPositionNftAccountAccount gets the "userPositionNftAccount" account.

func (*WithdrawBCommonAccountsBuilder) GetUserTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) GetUserTokenBAccountAccount() *ag_solanago.AccountMeta

GetUserTokenBAccountAccount gets the "userTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultAccount() *ag_solanago.AccountMeta

GetVaultAccount gets the "vault" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultPeriodIAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultPeriodIAccount() *ag_solanago.AccountMeta

GetVaultPeriodIAccount gets the "vaultPeriodI" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultPeriodJAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultPeriodJAccount() *ag_solanago.AccountMeta

GetVaultPeriodJAccount gets the "vaultPeriodJ" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultProtoConfigAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultProtoConfigAccount() *ag_solanago.AccountMeta

GetVaultProtoConfigAccount gets the "vaultProtoConfig" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTokenBAccountAccount gets the "vaultTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) GetVaultTreasuryTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) GetVaultTreasuryTokenBAccountAccount() *ag_solanago.AccountMeta

GetVaultTreasuryTokenBAccountAccount gets the "vaultTreasuryTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) GetWithdrawerAccount

func (inst *WithdrawBCommonAccountsBuilder) GetWithdrawerAccount() *ag_solanago.AccountMeta

GetWithdrawerAccount gets the "withdrawer" account.

func (*WithdrawBCommonAccountsBuilder) SetReferrerAccount

SetReferrerAccount sets the "referrer" account.

func (*WithdrawBCommonAccountsBuilder) SetTokenProgramAccount

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

SetTokenProgramAccount sets the "tokenProgram" account.

func (*WithdrawBCommonAccountsBuilder) SetUserPositionAccount

func (inst *WithdrawBCommonAccountsBuilder) SetUserPositionAccount(userPosition ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetUserPositionAccount sets the "userPosition" account.

func (*WithdrawBCommonAccountsBuilder) SetUserPositionNftAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) SetUserPositionNftAccountAccount(userPositionNftAccount ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetUserPositionNftAccountAccount sets the "userPositionNftAccount" account.

func (*WithdrawBCommonAccountsBuilder) SetUserTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) SetUserTokenBAccountAccount(userTokenBAccount ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetUserTokenBAccountAccount sets the "userTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultAccount

SetVaultAccount sets the "vault" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultPeriodIAccount

func (inst *WithdrawBCommonAccountsBuilder) SetVaultPeriodIAccount(vaultPeriodI ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetVaultPeriodIAccount sets the "vaultPeriodI" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultPeriodJAccount

func (inst *WithdrawBCommonAccountsBuilder) SetVaultPeriodJAccount(vaultPeriodJ ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetVaultPeriodJAccount sets the "vaultPeriodJ" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultProtoConfigAccount

func (inst *WithdrawBCommonAccountsBuilder) SetVaultProtoConfigAccount(vaultProtoConfig ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetVaultProtoConfigAccount sets the "vaultProtoConfig" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) SetVaultTokenBAccountAccount(vaultTokenBAccount ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetVaultTokenBAccountAccount sets the "vaultTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) SetVaultTreasuryTokenBAccountAccount

func (inst *WithdrawBCommonAccountsBuilder) SetVaultTreasuryTokenBAccountAccount(vaultTreasuryTokenBAccount ag_solanago.PublicKey) *WithdrawBCommonAccountsBuilder

SetVaultTreasuryTokenBAccountAccount sets the "vaultTreasuryTokenBAccount" account.

func (*WithdrawBCommonAccountsBuilder) SetWithdrawerAccount

SetWithdrawerAccount sets the "withdrawer" account.

Jump to

Keyboard shortcuts

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