Documentation
¶
Index ¶
- Constants
- Variables
- func SetProgramID(pubkey solana.PublicKey)
- type Authorize
- type InitializeAccount
- type Instruction
- func (inst *Instruction) Accounts() (out []*solana.AccountMeta)
- func (inst *Instruction) Data() ([]byte, error)
- func (inst *Instruction) EncodeToTree(parent treeout.Branches)
- func (inst Instruction) MarshalWithEncoder(encoder *bin.Encoder) error
- func (inst *Instruction) ProgramID() solana.PublicKey
- func (inst *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error
- func (inst *Instruction) UnmarshalWithDecoder(decoder *bin.Decoder) error
- type Vote
Constants ¶
View Source
const ProgramName = "Vote"
Variables ¶
View Source
var InstructionImplDef = bin.NewVariantDefinition( bin.Uint32TypeIDEncoding, []bin.VariantType{ { "InitializeAccount", (*InitializeAccount)(nil), }, { "Authorize", (*Authorize)(nil), }, { "Vote", (*Vote)(nil), }, }, )
View Source
var ProgramID solana.PublicKey = solana.VoteProgramID
Functions ¶
func SetProgramID ¶
Types ¶
type Authorize ¶
type Authorize struct {
// [0] = [WRITE] VoteAccount
// ··········· Unitialized vote account
//
// [1] = [] SysVarClock
// ··········· Clock sysvar
//
// [2] = [SIGNER] Authority
// ··········· Vote or withdraw authority
solana.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}
type InitializeAccount ¶
type InitializeAccount struct {
// [0] = [WRITE] VoteAccount
// ··········· Vote account to vote with
//
// [1] = [] SysVarSlotHashes
// ··········· Slot hashes sysvar
//
// [2] = [] SysVarClock
// ··········· Clock sysvar
//
// [3] = [SIGNER] VoteAuthority
// ··········· New validator identity (node_pubkey)
solana.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}
type Instruction ¶
type Instruction struct {
bin.BaseVariant
}
func DecodeInstruction ¶
func DecodeInstruction(accounts []*solana.AccountMeta, data []byte) (*Instruction, error)
func (*Instruction) Accounts ¶
func (inst *Instruction) Accounts() (out []*solana.AccountMeta)
func (*Instruction) Data ¶
func (inst *Instruction) Data() ([]byte, error)
func (*Instruction) EncodeToTree ¶
func (inst *Instruction) EncodeToTree(parent treeout.Branches)
func (Instruction) MarshalWithEncoder ¶
func (inst Instruction) MarshalWithEncoder(encoder *bin.Encoder) error
func (*Instruction) ProgramID ¶
func (inst *Instruction) ProgramID() solana.PublicKey
func (*Instruction) TextEncode ¶
func (*Instruction) UnmarshalWithDecoder ¶
func (inst *Instruction) UnmarshalWithDecoder(decoder *bin.Decoder) error
type Vote ¶
type Vote struct {
Slots []uint64
Hash solana.Hash
Timestamp *int64
// [0] = [WRITE] VoteAccount
// ··········· Vote account to vote with
//
// [1] = [] SysVarSlotHashes
// ··········· Slot hashes sysvar
//
// [2] = [] SysVarClock
// ··········· Clock sysvar
//
// [3] = [SIGNER] VoteAuthority
// ··········· Vote authority
solana.AccountMetaSlice `bin:"-" borsh_skip:"true"`
}
func (*Vote) EncodeToTree ¶
Click to show internal directories.
Click to hide internal directories.