address_lookup_table

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LOOKUP_TABLE_MAX_ADDRESSES uint = 256
View Source
const LOOKUP_TABLE_META_SIZE uint = 56

Variables

View Source
var (
	ErrInvalidAccountOwner    = errors.New("invalid account owner")
	ErrInvalidAccountDataSize = errors.New("invalid account data size")
	ErrInvalidAccountData     = errors.New("invalid account data")
)

Functions

func CloseLookupTable

func CloseLookupTable(params CloseLookupTableParams) types.Instruction

func CreateLookupTable

func CreateLookupTable(params CreateLookupTableParams) types.Instruction

func DeactivateLookupTable

func DeactivateLookupTable(params DeactivateLookupTableParams) types.Instruction

func DeriveLookupTableAddress

func DeriveLookupTableAddress(authorityAddr common.PublicKey, recentBlockSlot uint64) (common.PublicKey, uint8)

func ExtendLookupTable

func ExtendLookupTable(params ExtendLookupTableParams) types.Instruction

func FreezeLookupTable

func FreezeLookupTable(params FreezeLookupTableParams) types.Instruction

Types

type AddressLookupTable

type AddressLookupTable struct {
	ProgramState               ProgramStateEnum
	DeactivationSlot           uint64
	LastExtendedSlot           uint64
	LastExtendedSlotStartIndex uint8
	Authority                  *common.PublicKey

	Addresses []common.PublicKey
	// contains filtered or unexported fields
}

func DeserializeLookupTable

func DeserializeLookupTable(data []byte, accountOwner common.PublicKey) (AddressLookupTable, error)

type CloseLookupTableParams

type CloseLookupTableParams struct {
	LookupTable common.PublicKey
	Authority   common.PublicKey
	Recipient   common.PublicKey
}

type CreateLookupTableParams

type CreateLookupTableParams struct {
	LookupTable common.PublicKey
	Authority   common.PublicKey
	Payer       common.PublicKey
	RecentSlot  uint64
	BumpSeed    uint8
}

type DeactivateLookupTableParams

type DeactivateLookupTableParams struct {
	LookupTable common.PublicKey
	Authority   common.PublicKey
}

type ExtendLookupTableParams

type ExtendLookupTableParams struct {
	LookupTable common.PublicKey
	Authority   common.PublicKey
	Payer       *common.PublicKey
	Addresses   []common.PublicKey
}

type FreezeLookupTableParams

type FreezeLookupTableParams struct {
	LookupTable common.PublicKey
	Authority   common.PublicKey
}

type Instruction

type Instruction uint32
const (
	InstructionCreateLookupTable Instruction = iota
	InstructionFreezeLookupTable
	InstructionExtendLookupTable
	InstructionDeactivateLookupTable
	InstructionCloseLookupTable
)

type ProgramStateEnum

type ProgramStateEnum uint32
const (
	ProgramStateUninitialized ProgramStateEnum = iota
	ProgramStateLookupTable
)

Jump to

Keyboard shortcuts

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