Documentation
¶
Index ¶
- Constants
- Variables
- func SetProgramID(pubkey ag_solanago.PublicKey)
- type BuildParams
- type Close
- func (inst Close) Build() *Instruction
- func (inst *Close) GetAccounts() (out []*ag_solanago.AccountMeta)
- func (inst *Close) GetAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Close) GetDataAccountAccount() *ag_solanago.AccountMeta
- func (inst *Close) GetProgramAddressAccount() *ag_solanago.AccountMeta
- func (inst *Close) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Close) SetAccounts(accounts []*ag_solanago.AccountMeta) error
- func (inst *Close) SetAuthorityAccount(authority ag_solanago.PublicKey) *Close
- func (inst *Close) SetDataAccountAccount(dataAccount ag_solanago.PublicKey) *Close
- func (inst *Close) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Close
- func (inst *Close) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- func (inst *Close) Validate() error
- func (inst Close) ValidateAndBuild() (*Instruction, error)
- type Initialize
- func (inst Initialize) Build() *Instruction
- func (inst *Initialize) GetAccounts() (out []*ag_solanago.AccountMeta)
- func (inst *Initialize) GetAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) GetBuildParamsAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) GetProgramAddressAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Initialize) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Initialize) SetAccounts(accounts []*ag_solanago.AccountMeta) error
- func (inst *Initialize) SetAuthorityAccount(authority ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) SetBuildParamsAccount(buildParams ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) SetParams(params InputParams) *Initialize
- func (inst *Initialize) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Initialize
- func (inst *Initialize) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- func (inst *Initialize) Validate() error
- func (inst Initialize) ValidateAndBuild() (*Instruction, error)
- type InputParams
- type Instruction
- func (inst *Instruction) Accounts() (out []*ag_solanago.AccountMeta)
- func (inst *Instruction) Data() ([]byte, error)
- func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Instruction) ProgramID() ag_solanago.PublicKey
- func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- type OtterVerifyEvent
- type Update
- func (inst Update) Build() *Instruction
- func (inst *Update) GetAccounts() (out []*ag_solanago.AccountMeta)
- func (inst *Update) GetAuthorityAccount() *ag_solanago.AccountMeta
- func (inst *Update) GetBuildParamsAccount() *ag_solanago.AccountMeta
- func (inst *Update) GetProgramAddressAccount() *ag_solanago.AccountMeta
- func (inst *Update) GetSystemProgramAccount() *ag_solanago.AccountMeta
- func (inst *Update) MarshalWithEncoder(encoder *ag_binary.Encoder) error
- func (inst *Update) SetAccounts(accounts []*ag_solanago.AccountMeta) error
- func (inst *Update) SetAuthorityAccount(authority ag_solanago.PublicKey) *Update
- func (inst *Update) SetBuildParamsAccount(buildParams ag_solanago.PublicKey) *Update
- func (inst *Update) SetParams(params InputParams) *Update
- func (inst *Update) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Update
- func (inst *Update) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Update
- func (inst *Update) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
- func (inst *Update) Validate() error
- func (inst Update) ValidateAndBuild() (*Instruction, error)
Constants ¶
const ProgramName = "OtterVerify"
Variables ¶
var ( Instruction_3_Count uint32 = 3 InstructionImplDef = ag_binary.NewVariantDefinition( ag_binary.AnchorTypeIDEncoding, []ag_binary.VariantType{ { Name: "close", Type: (*Close)(nil), }, { Name: "initialize", Type: (*Initialize)(nil), }, { Name: "update", Type: (*Update)(nil), }, }, ) )
var BuildParamsDiscriminator = []byte{206, 101, 194, 136, 135, 113, 115, 12}
var CloseDiscriminator = []byte{98, 165, 201, 177, 108, 65, 206, 96}
var InitializeDiscriminator = []byte{175, 175, 109, 31, 13, 152, 155, 237}
var ProgramID ag_solanago.PublicKey = ag_solanago.MustPublicKeyFromBase58("verifycLy8mB96wd9wqq3WDXQwM4oU6r42Th37Db9fC")
var UpdateDiscriminator = []byte{219, 200, 88, 176, 158, 63, 253, 127}
Functions ¶
func SetProgramID ¶
func SetProgramID(pubkey ag_solanago.PublicKey)
Types ¶
type BuildParams ¶
type BuildParams struct {
Discriminator [8]uint8
Address ag_solanago.PublicKey
Signer ag_solanago.PublicKey
Version string
GitUrl string
Commit string
Args []string
DeploySlot uint64
Bump uint8
}
func (*BuildParams) MarshalWithEncoder ¶
func (obj *BuildParams) MarshalWithEncoder(encoder *ag_binary.Encoder) error
func (*BuildParams) UnmarshalWithDecoder ¶
func (obj *BuildParams) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
type Close ¶
type Close struct {
// [0] = [WRITE] DataAccount
// [1] = [WRITE, SIGNER] Authority
// [2] = [] ProgramAddress
ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}
Close is the `Close` instruction.
func NewCloseInstructionBuilder ¶
func NewCloseInstructionBuilder() *Close
NewCloseInstructionBuilder creates a new `Close` instruction builder.
func (Close) Build ¶
func (inst Close) Build() *Instruction
func (*Close) GetAccounts ¶
func (inst *Close) GetAccounts() (out []*ag_solanago.AccountMeta)
func (*Close) GetAuthorityAccount ¶
func (inst *Close) GetAuthorityAccount() *ag_solanago.AccountMeta
GetAuthorityAccount gets the "authority" account.
func (*Close) GetDataAccountAccount ¶
func (inst *Close) GetDataAccountAccount() *ag_solanago.AccountMeta
GetDataAccountAccount gets the "data_account" account.
func (*Close) GetProgramAddressAccount ¶
func (inst *Close) GetProgramAddressAccount() *ag_solanago.AccountMeta
GetProgramAddressAccount gets the "program_address" account.
func (*Close) MarshalWithEncoder ¶
func (*Close) SetAccounts ¶
func (inst *Close) SetAccounts(accounts []*ag_solanago.AccountMeta) error
func (*Close) SetAuthorityAccount ¶
func (inst *Close) SetAuthorityAccount(authority ag_solanago.PublicKey) *Close
SetAuthorityAccount sets the "authority" account.
func (*Close) SetDataAccountAccount ¶
func (inst *Close) SetDataAccountAccount(dataAccount ag_solanago.PublicKey) *Close
SetDataAccountAccount sets the "data_account" account.
func (*Close) SetProgramAddressAccount ¶
func (inst *Close) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Close
SetProgramAddressAccount sets the "program_address" account.
func (*Close) UnmarshalWithDecoder ¶
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 Initialize ¶
type Initialize struct {
// [0] = [WRITE] BuildParams
// [1] = [WRITE, SIGNER] Authority
// [2] = [] ProgramAddress
// [3] = [] SystemProgram
ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
Params InputParams
}
Initialize is the `Initialize` instruction.
func NewInitializeInstructionBuilder ¶
func NewInitializeInstructionBuilder() *Initialize
NewInitializeInstructionBuilder creates a new `Initialize` instruction builder.
func (Initialize) Build ¶
func (inst Initialize) Build() *Instruction
func (*Initialize) GetAccounts ¶
func (inst *Initialize) GetAccounts() (out []*ag_solanago.AccountMeta)
func (*Initialize) GetAuthorityAccount ¶
func (inst *Initialize) GetAuthorityAccount() *ag_solanago.AccountMeta
GetAuthorityAccount gets the "authority" account.
func (*Initialize) GetBuildParamsAccount ¶
func (inst *Initialize) GetBuildParamsAccount() *ag_solanago.AccountMeta
GetBuildParamsAccount gets the "build_params" account.
func (*Initialize) GetProgramAddressAccount ¶
func (inst *Initialize) GetProgramAddressAccount() *ag_solanago.AccountMeta
GetProgramAddressAccount gets the "program_address" account.
func (*Initialize) GetSystemProgramAccount ¶
func (inst *Initialize) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "system_program" account.
func (*Initialize) MarshalWithEncoder ¶
func (inst *Initialize) MarshalWithEncoder(encoder *ag_binary.Encoder) error
func (*Initialize) SetAccounts ¶
func (inst *Initialize) SetAccounts(accounts []*ag_solanago.AccountMeta) error
func (*Initialize) SetAuthorityAccount ¶
func (inst *Initialize) SetAuthorityAccount(authority ag_solanago.PublicKey) *Initialize
SetAuthorityAccount sets the "authority" account.
func (*Initialize) SetBuildParamsAccount ¶
func (inst *Initialize) SetBuildParamsAccount(buildParams ag_solanago.PublicKey) *Initialize
SetBuildParamsAccount sets the "build_params" account.
func (*Initialize) SetParams ¶
func (inst *Initialize) SetParams(params InputParams) *Initialize
SetParams sets the "params" parameter.
func (*Initialize) SetProgramAddressAccount ¶
func (inst *Initialize) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Initialize
SetProgramAddressAccount sets the "program_address" account.
func (*Initialize) SetSystemProgramAccount ¶
func (inst *Initialize) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Initialize
SetSystemProgramAccount sets the "system_program" account.
func (*Initialize) UnmarshalWithDecoder ¶
func (inst *Initialize) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
func (*Initialize) Validate ¶
func (inst *Initialize) Validate() error
func (Initialize) ValidateAndBuild ¶
func (inst Initialize) 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 InputParams ¶
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) MarshalWithEncoder ¶
func (inst *Instruction) MarshalWithEncoder(encoder *ag_binary.Encoder) error
func (*Instruction) ProgramID ¶
func (inst *Instruction) ProgramID() ag_solanago.PublicKey
func (*Instruction) UnmarshalWithDecoder ¶
func (inst *Instruction) UnmarshalWithDecoder(decoder *ag_binary.Decoder) error
type OtterVerifyEvent ¶
type OtterVerifyEvent struct {
Signer ag_solanago.PublicKey
Program ag_solanago.PublicKey
Params InputParams
}
type Update ¶
type Update struct {
// [0] = [WRITE] BuildParams
// [1] = [WRITE, SIGNER] Authority
// [2] = [] ProgramAddress
// [3] = [] SystemProgram
ag_solanago.AccountMetaSlice `bin:"-" borsh_skip:"true"`
Params InputParams
}
Update is the `Update` instruction.
func NewUpdateInstructionBuilder ¶
func NewUpdateInstructionBuilder() *Update
NewUpdateInstructionBuilder creates a new `Update` instruction builder.
func (Update) Build ¶
func (inst Update) Build() *Instruction
func (*Update) GetAccounts ¶
func (inst *Update) GetAccounts() (out []*ag_solanago.AccountMeta)
func (*Update) GetAuthorityAccount ¶
func (inst *Update) GetAuthorityAccount() *ag_solanago.AccountMeta
GetAuthorityAccount gets the "authority" account.
func (*Update) GetBuildParamsAccount ¶
func (inst *Update) GetBuildParamsAccount() *ag_solanago.AccountMeta
GetBuildParamsAccount gets the "build_params" account.
func (*Update) GetProgramAddressAccount ¶
func (inst *Update) GetProgramAddressAccount() *ag_solanago.AccountMeta
GetProgramAddressAccount gets the "program_address" account.
func (*Update) GetSystemProgramAccount ¶
func (inst *Update) GetSystemProgramAccount() *ag_solanago.AccountMeta
GetSystemProgramAccount gets the "system_program" account.
func (*Update) MarshalWithEncoder ¶
func (*Update) SetAccounts ¶
func (inst *Update) SetAccounts(accounts []*ag_solanago.AccountMeta) error
func (*Update) SetAuthorityAccount ¶
func (inst *Update) SetAuthorityAccount(authority ag_solanago.PublicKey) *Update
SetAuthorityAccount sets the "authority" account.
func (*Update) SetBuildParamsAccount ¶
func (inst *Update) SetBuildParamsAccount(buildParams ag_solanago.PublicKey) *Update
SetBuildParamsAccount sets the "build_params" account.
func (*Update) SetParams ¶
func (inst *Update) SetParams(params InputParams) *Update
SetParams sets the "params" parameter.
func (*Update) SetProgramAddressAccount ¶
func (inst *Update) SetProgramAddressAccount(programAddress ag_solanago.PublicKey) *Update
SetProgramAddressAccount sets the "program_address" account.
func (*Update) SetSystemProgramAccount ¶
func (inst *Update) SetSystemProgramAccount(systemProgram ag_solanago.PublicKey) *Update
SetSystemProgramAccount sets the "system_program" account.
func (*Update) UnmarshalWithDecoder ¶
func (Update) ValidateAndBuild ¶
func (inst Update) 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.