sysprog

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Deprecated: please use github.com/portto/solana-go-sdk/program/system

Index

Constants

View Source
const FeeCalculatorSize = 8
View Source
const NonceAccountSize = 80

Variables

This section is empty.

Functions

func AdvanceNonceAccount

func AdvanceNonceAccount(param AdvanceNonceAccountParam) types.Instruction

func Allocate

func Allocate(param AllocateParam) types.Instruction

func AllocateWithSeed

func AllocateWithSeed(param AllocateWithSeedParam) types.Instruction

func Assign

func Assign(param AssignParam) types.Instruction

func AssignWithSeed

func AssignWithSeed(param AssignWithSeedParam) types.Instruction

func AuthorizeNonceAccount

func AuthorizeNonceAccount(param AuthorizeNonceAccountParam) types.Instruction

func CreateAccount

func CreateAccount(param CreateAccountParam) types.Instruction

func CreateAccountWithSeed

func CreateAccountWithSeed(param CreateAccountWithSeedParam) types.Instruction

func InitializeNonceAccount

func InitializeNonceAccount(param InitializeNonceAccountParam) types.Instruction

func Transfer

func Transfer(param TransferParam) types.Instruction

func TransferWithSeed

func TransferWithSeed(param TransferWithSeedParam) types.Instruction

func UpgradeNonceAccount added in v1.18.0

func UpgradeNonceAccount(param UpgradeNonceAccountParam) types.Instruction

func WithdrawNonceAccount

func WithdrawNonceAccount(param WithdrawNonceAccountParam) types.Instruction

Types

type AdvanceNonceAccountParam added in v1.9.0

type AdvanceNonceAccountParam struct {
	Nonce common.PublicKey
	Auth  common.PublicKey
}

type AllocateParam added in v1.9.0

type AllocateParam struct {
	Account common.PublicKey
	Space   uint64
}

type AllocateWithSeedParam added in v1.9.0

type AllocateWithSeedParam struct {
	Account common.PublicKey
	Base    common.PublicKey
	Owner   common.PublicKey
	Seed    string
	Space   uint64
}

type AssignParam added in v1.9.0

type AssignParam struct {
	From  common.PublicKey
	Owner common.PublicKey
}

type AssignWithSeedParam added in v1.9.0

type AssignWithSeedParam struct {
	Account common.PublicKey
	Owner   common.PublicKey
	Base    common.PublicKey
	Seed    string
}

type AuthorizeNonceAccountParam added in v1.9.0

type AuthorizeNonceAccountParam struct {
	Nonce   common.PublicKey
	Auth    common.PublicKey
	NewAuth common.PublicKey
}

type CreateAccountParam added in v1.9.0

type CreateAccountParam struct {
	From     common.PublicKey
	New      common.PublicKey
	Owner    common.PublicKey
	Lamports uint64
	Space    uint64
}

type CreateAccountWithSeedParam added in v1.9.0

type CreateAccountWithSeedParam struct {
	From     common.PublicKey
	New      common.PublicKey
	Base     common.PublicKey
	Owner    common.PublicKey
	Seed     string
	Lamports uint64
	Space    uint64
}

type FeeCalculator

type FeeCalculator struct {
	LamportsPerSignature uint64
}

func FeeCalculatorDeserialize

func FeeCalculatorDeserialize(data []byte) (FeeCalculator, error)

type InitializeNonceAccountParam added in v1.9.0

type InitializeNonceAccountParam struct {
	Nonce common.PublicKey
	Auth  common.PublicKey
}

type Instruction

type Instruction uint32
const (
	InstructionCreateAccount Instruction = iota
	InstructionAssign
	InstructionTransfer
	InstructionCreateAccountWithSeed
	InstructionAdvanceNonceAccount
	InstructionWithdrawNonceAccount
	InstructionInitializeNonceAccount
	InstructionAuthorizeNonceAccount
	InstructionAllocate
	InstructionAllocateWithSeed
	InstructionAssignWithSeed
	InstructionTransferWithSeed
	InstructionUpgradeNonceAccount
)

type NonceAccount

type NonceAccount struct {
	Version          uint32
	State            uint32
	AuthorizedPubkey common.PublicKey
	Nonce            common.PublicKey
	FeeCalculator    FeeCalculator
}

func NonceAccountDeserialize

func NonceAccountDeserialize(data []byte) (NonceAccount, error)

type TransferParam added in v1.9.0

type TransferParam struct {
	From   common.PublicKey
	To     common.PublicKey
	Amount uint64
}

type TransferWithSeedParam added in v1.9.0

type TransferWithSeedParam struct {
	From   common.PublicKey
	To     common.PublicKey
	Base   common.PublicKey
	Owner  common.PublicKey
	Seed   string
	Amount uint64
}

type UpgradeNonceAccountParam added in v1.18.0

type UpgradeNonceAccountParam struct {
	NonceAccountPubkey common.PublicKey
}

type WithdrawNonceAccountParam added in v1.9.0

type WithdrawNonceAccountParam struct {
	Nonce  common.PublicKey
	Auth   common.PublicKey
	To     common.PublicKey
	Amount uint64
}

Jump to

Keyboard shortcuts

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