system

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 85

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InstructionImplDef = bin.NewVariantDefinition(bin.Uint32TypeIDEncoding, []bin.VariantType{
	{"create_account", (*CreateAccount)(nil)},
	{"assign", (*Assign)(nil)},
	{"transfer", (*Transfer)(nil)},
})
View Source
var PROGRAM_ID = solana.MustPublicKeyFromBase58("11111111111111111111111111111111")

Functions

This section is empty.

Types

type AdvanceNonceAccount

type AdvanceNonceAccount struct {
}

type Allocate

type Allocate struct {
	// Prefix with 0x08
	Space bin.Uint64
}

type AllocateWithSeed

type AllocateWithSeed struct {
	// Prefixed with byte 0x09
	Base     solana.PublicKey
	SeedSize int `bin:"sizeof=Seed"`
	Seed     string
	Space    bin.Uint64
	Owner    solana.PublicKey
}

type Assign

type Assign struct {
	// prefixed with byte 0x01
	Owner solana.PublicKey
}

type AssignWithSeed

type AssignWithSeed struct {
	// Prefixed with byte 0x0a
	Base     solana.PublicKey
	SeedSize int `bin:"sizeof=Seed"`
	Seed     string
	Owner    solana.PublicKey
}

type AuthorizeNonceAccount

type AuthorizeNonceAccount struct {
	// Prefix with 0x07
	AuthorizeAccount solana.PublicKey
}

type CreateAccount

type CreateAccount struct {
	Lamports bin.Uint64
	Space    bin.Uint64
	Owner    solana.PublicKey
	Accounts *CreateAccountAccounts `bin:"-"`
}

func (*CreateAccount) SetAccounts

func (i *CreateAccount) SetAccounts(accounts []*solana.AccountMeta) error

type CreateAccountAccounts

type CreateAccountAccounts struct {
	From *solana.AccountMeta `text:"linear,notype"`
	New  *solana.AccountMeta `text:"linear,notype"`
}

type CreateAccountWithSeed

type CreateAccountWithSeed struct {
	// Prefixed with byte 0x03
	Base     solana.PublicKey
	SeedSize int `bin:"sizeof=Seed"`
	Seed     string
	Lamports bin.Uint64
	Space    bin.Uint64
	Owner    solana.PublicKey
}

type InitializeNonceAccount

type InitializeNonceAccount struct {
	// Prefix with 0x06
	AuthorizedAccount solana.PublicKey
}

type Instruction

type Instruction struct {
	bin.BaseVariant
}

func DecodeInstruction

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

func NewCreateAccountInstruction

func NewCreateAccountInstruction(lamports uint64, space uint64, owner, from, to solana.PublicKey) *Instruction

func (*Instruction) Accounts

func (i *Instruction) Accounts() (out []*solana.AccountMeta)

func (*Instruction) Data

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

func (*Instruction) MarshalBinary

func (i *Instruction) MarshalBinary(encoder *bin.Encoder) error

func (*Instruction) ProgramID

func (i *Instruction) ProgramID() solana.PublicKey

func (*Instruction) TextEncode

func (i *Instruction) TextEncode(encoder *text.Encoder, option *text.Option) error

func (*Instruction) UnmarshalBinary

func (i *Instruction) UnmarshalBinary(decoder *bin.Decoder) error

type Transfer

type Transfer struct {
	// Prefixed with byte 0x02
	Lamports bin.Uint64
	Accounts *TransferAccounts `bin:"-"`
}

func (*Transfer) SetAccounts

func (i *Transfer) SetAccounts(accounts []*solana.AccountMeta) error

type TransferAccounts

type TransferAccounts struct {
	From *solana.AccountMeta `text:"linear,notype"`
	To   *solana.AccountMeta `text:"linear,notype"`
}

type WithdrawNonceAccount

type WithdrawNonceAccount struct {
	// Prefix with 0x05
	Lamports bin.Uint64
}

Jump to

Keyboard shortcuts

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