loaderv3

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ProgramName = "SolanaLoaderV3Program"

Variables

View Source
var (
	Instruction_InitializeBuffer = ag_binary.TypeID([8]byte{43, 127, 69, 196, 129, 6, 159, 210})

	Instruction_Write = ag_binary.TypeID([8]byte{235, 116, 91, 200, 206, 170, 144, 120})

	Instruction_DeployWithMaxDataLen = ag_binary.TypeID([8]byte{6, 193, 138, 220, 154, 134, 213, 101})

	Instruction_Upgrade = ag_binary.TypeID([8]byte{239, 238, 57, 74, 205, 87, 165, 26})

	Instruction_SetAuthority = ag_binary.TypeID([8]byte{133, 250, 37, 21, 110, 163, 26, 121})

	Instruction_Close = ag_binary.TypeID([8]byte{98, 165, 201, 177, 108, 65, 206, 96})

	Instruction_ExtendProgram = ag_binary.TypeID([8]byte{143, 117, 164, 255, 235, 226, 17, 239})

	Instruction_SetAuthorityChecked = ag_binary.TypeID([8]byte{243, 78, 23, 0, 230, 196, 124, 128})
)
View Source
var InstructionImplDef = ag_binary.NewVariantDefinition(
	ag_binary.Uint32TypeIDEncoding,
	[]ag_binary.VariantType{
		{
			Name: "initialize_buffer", Type: (*InitializeBuffer)(nil),
		},
		{
			Name: "write", Type: (*Write)(nil),
		},
		{
			Name: "deploy_with_max_data_len", Type: (*DeployWithMaxDataLen)(nil),
		},
		{
			Name: "upgrade", Type: (*Upgrade)(nil),
		},
		{
			Name: "set_authority", Type: (*SetAuthority)(nil),
		},
		{
			Name: "close", Type: (*Close)(nil),
		},
		{
			Name: "extend_program", Type: (*ExtendProgram)(nil),
		},
		{
			Name: "set_authority_checked", Type: (*SetAuthorityChecked)(nil),
		},
	},
)
View Source
var ProgramID ag_solanago.PublicKey = ag_solanago.MustPublicKeyFromBase58("CoreBPFLoaderUpgradeab1e1111111111111111111")

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 Close

type Close struct {

	// [0] = [WRITE] bufferOrProgramDataAccount
	// ··········· Buffer or ProgramData account to close.
	//
	// [1] = [WRITE] destinationAccount
	// ··········· Destination account for reclaimed lamports.
	//
	// [2] = [SIGNER] authority
	// ··········· Authority (optional).
	//
	// [3] = [] programAccount
	// ··········· Program account (optional).
	ag_solanago.AccountMetaSlice `bin:"-"`
}

Close is the `Close` instruction.

func NewCloseInstruction

func NewCloseInstruction(

	bufferOrProgramDataAccount ag_solanago.PublicKey,
	destinationAccount ag_solanago.PublicKey,
	authority ag_solanago.PublicKey,
	programAccount ag_solanago.PublicKey) *Close

NewCloseInstruction declares a new Close instruction with the provided parameters and accounts.

func NewCloseInstructionBuilder

func NewCloseInstructionBuilder() *Close

NewCloseInstructionBuilder creates a new `Close` instruction builder.

func (Close) Build

func (inst Close) Build() *Instruction

func (*Close) EncodeToTree

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

func (*Close) GetAuthorityAccount

func (inst *Close) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account. Authority (optional).

func (*Close) GetBufferOrProgramDataAccountAccount

func (inst *Close) GetBufferOrProgramDataAccountAccount() *ag_solanago.AccountMeta

GetBufferOrProgramDataAccountAccount gets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account to close.

func (*Close) GetDestinationAccountAccount

func (inst *Close) GetDestinationAccountAccount() *ag_solanago.AccountMeta

GetDestinationAccountAccount gets the "destinationAccount" account. Destination account for reclaimed lamports.

func (*Close) GetProgramAccountAccount

func (inst *Close) GetProgramAccountAccount() *ag_solanago.AccountMeta

GetProgramAccountAccount gets the "programAccount" account. Program account (optional).

func (Close) MarshalWithEncoder

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

func (*Close) SetAuthorityAccount

func (inst *Close) SetAuthorityAccount(authority ag_solanago.PublicKey) *Close

SetAuthorityAccount sets the "authority" account. Authority (optional).

func (*Close) SetBufferOrProgramDataAccountAccount

func (inst *Close) SetBufferOrProgramDataAccountAccount(bufferOrProgramDataAccount ag_solanago.PublicKey) *Close

SetBufferOrProgramDataAccountAccount sets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account to close.

func (*Close) SetDestinationAccountAccount

func (inst *Close) SetDestinationAccountAccount(destinationAccount ag_solanago.PublicKey) *Close

SetDestinationAccountAccount sets the "destinationAccount" account. Destination account for reclaimed lamports.

func (*Close) SetProgramAccountAccount

func (inst *Close) SetProgramAccountAccount(programAccount ag_solanago.PublicKey) *Close

SetProgramAccountAccount sets the "programAccount" account. Program account (optional).

func (*Close) UnmarshalWithDecoder

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

func (*Close) Validate

func (inst *Close) Validate() error

func (Close) ValidateAndBuild

func (inst Close) 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 DeployWithMaxDataLen

type DeployWithMaxDataLen struct {
	MaxDataLen *uint64

	// [0] = [WRITE, SIGNER] payerAccount
	// ··········· Payer account that will pay to create the ProgramData account.
	//
	// [1] = [WRITE] programDataAccount
	// ··········· ProgramData account (uninitialized).
	//
	// [2] = [WRITE] programAccount
	// ··········· Program account (uninitialized).
	//
	// [3] = [WRITE] bufferAccount
	// ··········· Buffer account where the program data has been written.
	//
	// [4] = [] rentSysvar
	// ··········· Rent sysvar.
	//
	// [5] = [] clockSysvar
	// ··········· Clock sysvar.
	//
	// [6] = [] systemProgram
	// ··········· System program.
	//
	// [7] = [SIGNER] authority
	// ··········· Authority.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

DeployWithMaxDataLen is the `DeployWithMaxDataLen` instruction.

func NewDeployWithMaxDataLenInstruction

func NewDeployWithMaxDataLenInstruction(

	maxDataLen uint64,

	payerAccount ag_solanago.PublicKey,
	programDataAccount ag_solanago.PublicKey,
	programAccount ag_solanago.PublicKey,
	bufferAccount ag_solanago.PublicKey,
	rentSysvar ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *DeployWithMaxDataLen

NewDeployWithMaxDataLenInstruction declares a new DeployWithMaxDataLen instruction with the provided parameters and accounts.

func NewDeployWithMaxDataLenInstructionBuilder

func NewDeployWithMaxDataLenInstructionBuilder() *DeployWithMaxDataLen

NewDeployWithMaxDataLenInstructionBuilder creates a new `DeployWithMaxDataLen` instruction builder.

func (DeployWithMaxDataLen) Build

func (inst DeployWithMaxDataLen) Build() *Instruction

func (*DeployWithMaxDataLen) EncodeToTree

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

func (*DeployWithMaxDataLen) GetAuthorityAccount

func (inst *DeployWithMaxDataLen) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account. Authority.

func (*DeployWithMaxDataLen) GetBufferAccountAccount

func (inst *DeployWithMaxDataLen) GetBufferAccountAccount() *ag_solanago.AccountMeta

GetBufferAccountAccount gets the "bufferAccount" account. Buffer account where the program data has been written.

func (*DeployWithMaxDataLen) GetClockSysvarAccount

func (inst *DeployWithMaxDataLen) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar.

func (*DeployWithMaxDataLen) GetPayerAccountAccount

func (inst *DeployWithMaxDataLen) GetPayerAccountAccount() *ag_solanago.AccountMeta

GetPayerAccountAccount gets the "payerAccount" account. Payer account that will pay to create the ProgramData account.

func (*DeployWithMaxDataLen) GetProgramAccountAccount

func (inst *DeployWithMaxDataLen) GetProgramAccountAccount() *ag_solanago.AccountMeta

GetProgramAccountAccount gets the "programAccount" account. Program account (uninitialized).

func (*DeployWithMaxDataLen) GetProgramDataAccountAccount

func (inst *DeployWithMaxDataLen) GetProgramDataAccountAccount() *ag_solanago.AccountMeta

GetProgramDataAccountAccount gets the "programDataAccount" account. ProgramData account (uninitialized).

func (*DeployWithMaxDataLen) GetRentSysvarAccount

func (inst *DeployWithMaxDataLen) GetRentSysvarAccount() *ag_solanago.AccountMeta

GetRentSysvarAccount gets the "rentSysvar" account. Rent sysvar.

func (*DeployWithMaxDataLen) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account. System program.

func (DeployWithMaxDataLen) MarshalWithEncoder

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

func (*DeployWithMaxDataLen) SetAuthorityAccount

func (inst *DeployWithMaxDataLen) SetAuthorityAccount(authority ag_solanago.PublicKey) *DeployWithMaxDataLen

SetAuthorityAccount sets the "authority" account. Authority.

func (*DeployWithMaxDataLen) SetBufferAccountAccount

func (inst *DeployWithMaxDataLen) SetBufferAccountAccount(bufferAccount ag_solanago.PublicKey) *DeployWithMaxDataLen

SetBufferAccountAccount sets the "bufferAccount" account. Buffer account where the program data has been written.

func (*DeployWithMaxDataLen) SetClockSysvarAccount

func (inst *DeployWithMaxDataLen) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *DeployWithMaxDataLen

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar.

func (*DeployWithMaxDataLen) SetMaxDataLen

func (inst *DeployWithMaxDataLen) SetMaxDataLen(maxDataLen uint64) *DeployWithMaxDataLen

SetMaxDataLen sets the "maxDataLen" parameter.

func (*DeployWithMaxDataLen) SetPayerAccountAccount

func (inst *DeployWithMaxDataLen) SetPayerAccountAccount(payerAccount ag_solanago.PublicKey) *DeployWithMaxDataLen

SetPayerAccountAccount sets the "payerAccount" account. Payer account that will pay to create the ProgramData account.

func (*DeployWithMaxDataLen) SetProgramAccountAccount

func (inst *DeployWithMaxDataLen) SetProgramAccountAccount(programAccount ag_solanago.PublicKey) *DeployWithMaxDataLen

SetProgramAccountAccount sets the "programAccount" account. Program account (uninitialized).

func (*DeployWithMaxDataLen) SetProgramDataAccountAccount

func (inst *DeployWithMaxDataLen) SetProgramDataAccountAccount(programDataAccount ag_solanago.PublicKey) *DeployWithMaxDataLen

SetProgramDataAccountAccount sets the "programDataAccount" account. ProgramData account (uninitialized).

func (*DeployWithMaxDataLen) SetRentSysvarAccount

func (inst *DeployWithMaxDataLen) SetRentSysvarAccount(rentSysvar ag_solanago.PublicKey) *DeployWithMaxDataLen

SetRentSysvarAccount sets the "rentSysvar" account. Rent sysvar.

func (*DeployWithMaxDataLen) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account. System program.

func (*DeployWithMaxDataLen) UnmarshalWithDecoder

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

func (*DeployWithMaxDataLen) Validate

func (inst *DeployWithMaxDataLen) Validate() error

func (DeployWithMaxDataLen) ValidateAndBuild

func (inst DeployWithMaxDataLen) 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 ExtendProgram

type ExtendProgram struct {
	AdditionalBytes *uint32

	// [0] = [WRITE] programDataAccount
	// ··········· ProgramData account.
	//
	// [1] = [WRITE] programAccount
	// ··········· Program account.
	//
	// [2] = [] systemProgram
	// ··········· System program (optional).
	//
	// [3] = [WRITE, SIGNER] payer
	// ··········· Payer.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

ExtendProgram is the `ExtendProgram` instruction.

func NewExtendProgramInstruction

func NewExtendProgramInstruction(

	additionalBytes uint32,

	programDataAccount ag_solanago.PublicKey,
	programAccount ag_solanago.PublicKey,
	systemProgram ag_solanago.PublicKey,
	payer ag_solanago.PublicKey) *ExtendProgram

NewExtendProgramInstruction declares a new ExtendProgram instruction with the provided parameters and accounts.

func NewExtendProgramInstructionBuilder

func NewExtendProgramInstructionBuilder() *ExtendProgram

NewExtendProgramInstructionBuilder creates a new `ExtendProgram` instruction builder.

func (ExtendProgram) Build

func (inst ExtendProgram) Build() *Instruction

func (*ExtendProgram) EncodeToTree

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

func (*ExtendProgram) GetPayerAccount

func (inst *ExtendProgram) GetPayerAccount() *ag_solanago.AccountMeta

GetPayerAccount gets the "payer" account. Payer.

func (*ExtendProgram) GetProgramAccountAccount

func (inst *ExtendProgram) GetProgramAccountAccount() *ag_solanago.AccountMeta

GetProgramAccountAccount gets the "programAccount" account. Program account.

func (*ExtendProgram) GetProgramDataAccountAccount

func (inst *ExtendProgram) GetProgramDataAccountAccount() *ag_solanago.AccountMeta

GetProgramDataAccountAccount gets the "programDataAccount" account. ProgramData account.

func (*ExtendProgram) GetSystemProgramAccount

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

GetSystemProgramAccount gets the "systemProgram" account. System program (optional).

func (ExtendProgram) MarshalWithEncoder

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

func (*ExtendProgram) SetAdditionalBytes

func (inst *ExtendProgram) SetAdditionalBytes(additionalBytes uint32) *ExtendProgram

SetAdditionalBytes sets the "additionalBytes" parameter.

func (*ExtendProgram) SetPayerAccount

func (inst *ExtendProgram) SetPayerAccount(payer ag_solanago.PublicKey) *ExtendProgram

SetPayerAccount sets the "payer" account. Payer.

func (*ExtendProgram) SetProgramAccountAccount

func (inst *ExtendProgram) SetProgramAccountAccount(programAccount ag_solanago.PublicKey) *ExtendProgram

SetProgramAccountAccount sets the "programAccount" account. Program account.

func (*ExtendProgram) SetProgramDataAccountAccount

func (inst *ExtendProgram) SetProgramDataAccountAccount(programDataAccount ag_solanago.PublicKey) *ExtendProgram

SetProgramDataAccountAccount sets the "programDataAccount" account. ProgramData account.

func (*ExtendProgram) SetSystemProgramAccount

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

SetSystemProgramAccount sets the "systemProgram" account. System program (optional).

func (*ExtendProgram) UnmarshalWithDecoder

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

func (*ExtendProgram) Validate

func (inst *ExtendProgram) Validate() error

func (ExtendProgram) ValidateAndBuild

func (inst ExtendProgram) 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 InitializeBuffer

type InitializeBuffer struct {

	// [0] = [WRITE] sourceAccount
	// ··········· Source account to initialize.
	//
	// [1] = [] bufferAuthority
	// ··········· Buffer authority.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

InitializeBuffer is the `InitializeBuffer` instruction.

func NewInitializeBufferInstruction

func NewInitializeBufferInstruction(

	sourceAccount ag_solanago.PublicKey,
	bufferAuthority ag_solanago.PublicKey) *InitializeBuffer

NewInitializeBufferInstruction declares a new InitializeBuffer instruction with the provided parameters and accounts.

func NewInitializeBufferInstructionBuilder

func NewInitializeBufferInstructionBuilder() *InitializeBuffer

NewInitializeBufferInstructionBuilder creates a new `InitializeBuffer` instruction builder.

func (InitializeBuffer) Build

func (inst InitializeBuffer) Build() *Instruction

func (*InitializeBuffer) EncodeToTree

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

func (*InitializeBuffer) GetBufferAuthorityAccount

func (inst *InitializeBuffer) GetBufferAuthorityAccount() *ag_solanago.AccountMeta

GetBufferAuthorityAccount gets the "bufferAuthority" account. Buffer authority.

func (*InitializeBuffer) GetSourceAccountAccount

func (inst *InitializeBuffer) GetSourceAccountAccount() *ag_solanago.AccountMeta

GetSourceAccountAccount gets the "sourceAccount" account. Source account to initialize.

func (InitializeBuffer) MarshalWithEncoder

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

func (*InitializeBuffer) SetBufferAuthorityAccount

func (inst *InitializeBuffer) SetBufferAuthorityAccount(bufferAuthority ag_solanago.PublicKey) *InitializeBuffer

SetBufferAuthorityAccount sets the "bufferAuthority" account. Buffer authority.

func (*InitializeBuffer) SetSourceAccountAccount

func (inst *InitializeBuffer) SetSourceAccountAccount(sourceAccount ag_solanago.PublicKey) *InitializeBuffer

SetSourceAccountAccount sets the "sourceAccount" account. Source account to initialize.

func (*InitializeBuffer) UnmarshalWithDecoder

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

func (*InitializeBuffer) Validate

func (inst *InitializeBuffer) Validate() error

func (InitializeBuffer) ValidateAndBuild

func (inst InitializeBuffer) 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 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 SetAuthority

type SetAuthority struct {

	// [0] = [WRITE] bufferOrProgramDataAccount
	// ··········· Buffer or ProgramData account.
	//
	// [1] = [SIGNER] currentAuthority
	// ··········· Current authority.
	//
	// [2] = [] newAuthority
	// ··········· New authority (optional).
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetAuthority is the `SetAuthority` instruction.

func NewSetAuthorityInstruction

func NewSetAuthorityInstruction(

	bufferOrProgramDataAccount ag_solanago.PublicKey,
	currentAuthority ag_solanago.PublicKey,
	newAuthority ag_solanago.PublicKey) *SetAuthority

NewSetAuthorityInstruction declares a new SetAuthority instruction with the provided parameters and accounts.

func NewSetAuthorityInstructionBuilder

func NewSetAuthorityInstructionBuilder() *SetAuthority

NewSetAuthorityInstructionBuilder creates a new `SetAuthority` instruction builder.

func (SetAuthority) Build

func (inst SetAuthority) Build() *Instruction

func (*SetAuthority) EncodeToTree

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

func (*SetAuthority) GetBufferOrProgramDataAccountAccount

func (inst *SetAuthority) GetBufferOrProgramDataAccountAccount() *ag_solanago.AccountMeta

GetBufferOrProgramDataAccountAccount gets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account.

func (*SetAuthority) GetCurrentAuthorityAccount

func (inst *SetAuthority) GetCurrentAuthorityAccount() *ag_solanago.AccountMeta

GetCurrentAuthorityAccount gets the "currentAuthority" account. Current authority.

func (*SetAuthority) GetNewAuthorityAccount

func (inst *SetAuthority) GetNewAuthorityAccount() *ag_solanago.AccountMeta

GetNewAuthorityAccount gets the "newAuthority" account. New authority (optional).

func (SetAuthority) MarshalWithEncoder

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

func (*SetAuthority) SetBufferOrProgramDataAccountAccount

func (inst *SetAuthority) SetBufferOrProgramDataAccountAccount(bufferOrProgramDataAccount ag_solanago.PublicKey) *SetAuthority

SetBufferOrProgramDataAccountAccount sets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account.

func (*SetAuthority) SetCurrentAuthorityAccount

func (inst *SetAuthority) SetCurrentAuthorityAccount(currentAuthority ag_solanago.PublicKey) *SetAuthority

SetCurrentAuthorityAccount sets the "currentAuthority" account. Current authority.

func (*SetAuthority) SetNewAuthorityAccount

func (inst *SetAuthority) SetNewAuthorityAccount(newAuthority ag_solanago.PublicKey) *SetAuthority

SetNewAuthorityAccount sets the "newAuthority" account. New authority (optional).

func (*SetAuthority) UnmarshalWithDecoder

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

func (*SetAuthority) Validate

func (inst *SetAuthority) Validate() error

func (SetAuthority) ValidateAndBuild

func (inst SetAuthority) 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 SetAuthorityChecked

type SetAuthorityChecked struct {

	// [0] = [WRITE] bufferOrProgramDataAccount
	// ··········· Buffer or ProgramData account to change the authority of.
	//
	// [1] = [SIGNER] currentAuthority
	// ··········· Current authority.
	//
	// [2] = [SIGNER] newAuthority
	// ··········· New authority.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

SetAuthorityChecked is the `SetAuthorityChecked` instruction.

func NewSetAuthorityCheckedInstruction

func NewSetAuthorityCheckedInstruction(

	bufferOrProgramDataAccount ag_solanago.PublicKey,
	currentAuthority ag_solanago.PublicKey,
	newAuthority ag_solanago.PublicKey) *SetAuthorityChecked

NewSetAuthorityCheckedInstruction declares a new SetAuthorityChecked instruction with the provided parameters and accounts.

func NewSetAuthorityCheckedInstructionBuilder

func NewSetAuthorityCheckedInstructionBuilder() *SetAuthorityChecked

NewSetAuthorityCheckedInstructionBuilder creates a new `SetAuthorityChecked` instruction builder.

func (SetAuthorityChecked) Build

func (inst SetAuthorityChecked) Build() *Instruction

func (*SetAuthorityChecked) EncodeToTree

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

func (*SetAuthorityChecked) GetBufferOrProgramDataAccountAccount

func (inst *SetAuthorityChecked) GetBufferOrProgramDataAccountAccount() *ag_solanago.AccountMeta

GetBufferOrProgramDataAccountAccount gets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account to change the authority of.

func (*SetAuthorityChecked) GetCurrentAuthorityAccount

func (inst *SetAuthorityChecked) GetCurrentAuthorityAccount() *ag_solanago.AccountMeta

GetCurrentAuthorityAccount gets the "currentAuthority" account. Current authority.

func (*SetAuthorityChecked) GetNewAuthorityAccount

func (inst *SetAuthorityChecked) GetNewAuthorityAccount() *ag_solanago.AccountMeta

GetNewAuthorityAccount gets the "newAuthority" account. New authority.

func (SetAuthorityChecked) MarshalWithEncoder

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

func (*SetAuthorityChecked) SetBufferOrProgramDataAccountAccount

func (inst *SetAuthorityChecked) SetBufferOrProgramDataAccountAccount(bufferOrProgramDataAccount ag_solanago.PublicKey) *SetAuthorityChecked

SetBufferOrProgramDataAccountAccount sets the "bufferOrProgramDataAccount" account. Buffer or ProgramData account to change the authority of.

func (*SetAuthorityChecked) SetCurrentAuthorityAccount

func (inst *SetAuthorityChecked) SetCurrentAuthorityAccount(currentAuthority ag_solanago.PublicKey) *SetAuthorityChecked

SetCurrentAuthorityAccount sets the "currentAuthority" account. Current authority.

func (*SetAuthorityChecked) SetNewAuthorityAccount

func (inst *SetAuthorityChecked) SetNewAuthorityAccount(newAuthority ag_solanago.PublicKey) *SetAuthorityChecked

SetNewAuthorityAccount sets the "newAuthority" account. New authority.

func (*SetAuthorityChecked) UnmarshalWithDecoder

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

func (*SetAuthorityChecked) Validate

func (inst *SetAuthorityChecked) Validate() error

func (SetAuthorityChecked) ValidateAndBuild

func (inst SetAuthorityChecked) 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 Upgrade

type Upgrade struct {

	// [0] = [WRITE] programDataAccount
	// ··········· ProgramData account.
	//
	// [1] = [WRITE] programAccount
	// ··········· Program account.
	//
	// [2] = [WRITE] bufferAccount
	// ··········· Buffer account where the new program data has been written.
	//
	// [3] = [WRITE] spillAccount
	// ··········· Spill account.
	//
	// [4] = [] rentSysvar
	// ··········· Rent sysvar.
	//
	// [5] = [] clockSysvar
	// ··········· Clock sysvar.
	//
	// [6] = [SIGNER] authority
	// ··········· Authority.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

Upgrade is the `Upgrade` instruction.

func NewUpgradeInstruction

func NewUpgradeInstruction(

	programDataAccount ag_solanago.PublicKey,
	programAccount ag_solanago.PublicKey,
	bufferAccount ag_solanago.PublicKey,
	spillAccount ag_solanago.PublicKey,
	rentSysvar ag_solanago.PublicKey,
	clockSysvar ag_solanago.PublicKey,
	authority ag_solanago.PublicKey) *Upgrade

NewUpgradeInstruction declares a new Upgrade instruction with the provided parameters and accounts.

func NewUpgradeInstructionBuilder

func NewUpgradeInstructionBuilder() *Upgrade

NewUpgradeInstructionBuilder creates a new `Upgrade` instruction builder.

func (Upgrade) Build

func (inst Upgrade) Build() *Instruction

func (*Upgrade) EncodeToTree

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

func (*Upgrade) GetAuthorityAccount

func (inst *Upgrade) GetAuthorityAccount() *ag_solanago.AccountMeta

GetAuthorityAccount gets the "authority" account. Authority.

func (*Upgrade) GetBufferAccountAccount

func (inst *Upgrade) GetBufferAccountAccount() *ag_solanago.AccountMeta

GetBufferAccountAccount gets the "bufferAccount" account. Buffer account where the new program data has been written.

func (*Upgrade) GetClockSysvarAccount

func (inst *Upgrade) GetClockSysvarAccount() *ag_solanago.AccountMeta

GetClockSysvarAccount gets the "clockSysvar" account. Clock sysvar.

func (*Upgrade) GetProgramAccountAccount

func (inst *Upgrade) GetProgramAccountAccount() *ag_solanago.AccountMeta

GetProgramAccountAccount gets the "programAccount" account. Program account.

func (*Upgrade) GetProgramDataAccountAccount

func (inst *Upgrade) GetProgramDataAccountAccount() *ag_solanago.AccountMeta

GetProgramDataAccountAccount gets the "programDataAccount" account. ProgramData account.

func (*Upgrade) GetRentSysvarAccount

func (inst *Upgrade) GetRentSysvarAccount() *ag_solanago.AccountMeta

GetRentSysvarAccount gets the "rentSysvar" account. Rent sysvar.

func (*Upgrade) GetSpillAccountAccount

func (inst *Upgrade) GetSpillAccountAccount() *ag_solanago.AccountMeta

GetSpillAccountAccount gets the "spillAccount" account. Spill account.

func (Upgrade) MarshalWithEncoder

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

func (*Upgrade) SetAuthorityAccount

func (inst *Upgrade) SetAuthorityAccount(authority ag_solanago.PublicKey) *Upgrade

SetAuthorityAccount sets the "authority" account. Authority.

func (*Upgrade) SetBufferAccountAccount

func (inst *Upgrade) SetBufferAccountAccount(bufferAccount ag_solanago.PublicKey) *Upgrade

SetBufferAccountAccount sets the "bufferAccount" account. Buffer account where the new program data has been written.

func (*Upgrade) SetClockSysvarAccount

func (inst *Upgrade) SetClockSysvarAccount(clockSysvar ag_solanago.PublicKey) *Upgrade

SetClockSysvarAccount sets the "clockSysvar" account. Clock sysvar.

func (*Upgrade) SetProgramAccountAccount

func (inst *Upgrade) SetProgramAccountAccount(programAccount ag_solanago.PublicKey) *Upgrade

SetProgramAccountAccount sets the "programAccount" account. Program account.

func (*Upgrade) SetProgramDataAccountAccount

func (inst *Upgrade) SetProgramDataAccountAccount(programDataAccount ag_solanago.PublicKey) *Upgrade

SetProgramDataAccountAccount sets the "programDataAccount" account. ProgramData account.

func (*Upgrade) SetRentSysvarAccount

func (inst *Upgrade) SetRentSysvarAccount(rentSysvar ag_solanago.PublicKey) *Upgrade

SetRentSysvarAccount sets the "rentSysvar" account. Rent sysvar.

func (*Upgrade) SetSpillAccountAccount

func (inst *Upgrade) SetSpillAccountAccount(spillAccount ag_solanago.PublicKey) *Upgrade

SetSpillAccountAccount sets the "spillAccount" account. Spill account.

func (*Upgrade) UnmarshalWithDecoder

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

func (*Upgrade) Validate

func (inst *Upgrade) Validate() error

func (Upgrade) ValidateAndBuild

func (inst Upgrade) 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 Write

type Write struct {
	Offset *uint32
	Bytes  *[]byte

	// [0] = [WRITE] bufferAccount
	// ··········· Buffer account.
	//
	// [1] = [SIGNER] bufferAuthority
	// ··········· Buffer authority.
	ag_solanago.AccountMetaSlice `bin:"-"`
}

Write is the `Write` instruction.

func NewWriteInstruction

func NewWriteInstruction(

	offset uint32,
	bytes []byte,

	bufferAccount ag_solanago.PublicKey,
	bufferAuthority ag_solanago.PublicKey) *Write

NewWriteInstruction declares a new Write instruction with the provided parameters and accounts.

func NewWriteInstructionBuilder

func NewWriteInstructionBuilder() *Write

NewWriteInstructionBuilder creates a new `Write` instruction builder.

func (Write) Build

func (inst Write) Build() *Instruction

func (*Write) EncodeToTree

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

func (*Write) GetBufferAccountAccount

func (inst *Write) GetBufferAccountAccount() *ag_solanago.AccountMeta

GetBufferAccountAccount gets the "bufferAccount" account. Buffer account.

func (*Write) GetBufferAuthorityAccount

func (inst *Write) GetBufferAuthorityAccount() *ag_solanago.AccountMeta

GetBufferAuthorityAccount gets the "bufferAuthority" account. Buffer authority.

func (Write) MarshalWithEncoder

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

func (*Write) SetBufferAccountAccount

func (inst *Write) SetBufferAccountAccount(bufferAccount ag_solanago.PublicKey) *Write

SetBufferAccountAccount sets the "bufferAccount" account. Buffer account.

func (*Write) SetBufferAuthorityAccount

func (inst *Write) SetBufferAuthorityAccount(bufferAuthority ag_solanago.PublicKey) *Write

SetBufferAuthorityAccount sets the "bufferAuthority" account. Buffer authority.

func (*Write) SetBytes

func (inst *Write) SetBytes(bytes []byte) *Write

SetBytes sets the "bytes" parameter.

func (*Write) SetOffset

func (inst *Write) SetOffset(offset uint32) *Write

SetOffset sets the "offset" parameter.

func (*Write) UnmarshalWithDecoder

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

func (*Write) Validate

func (inst *Write) Validate() error

func (Write) ValidateAndBuild

func (inst Write) 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.

Jump to

Keyboard shortcuts

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