Documentation ¶
Index ¶
- Constants
- func CloseLookupTable(tableAddr, authorityAddr, recipientAddr solana.PublicKey) solana.Instruction
- func CreateLookupTable(authority, payer solana.PublicKey, recentSlot uint64) (solana.Instruction, solana.PublicKey, error)
- func DeactivateLookupTable(tableAddr, authorityAddr solana.PublicKey) solana.Instruction
- func ExtendLookupTable(tableAddr, authorityAddr solana.PublicKey, payerAddr *solana.PublicKey, ...) solana.Instruction
- func FreezeLookupTable(tableAddr, authorityAddr solana.PublicKey) solana.Instruction
- type LookupTableAccount
- type LookupTableMeta
- type ProgramStateType
Constants ¶
const ( InstructionCreateLookupTable uint32 = iota InstructionFreezeLookupTable InstructionExtendLookupTable InstructionDeactivateLookupTable InstructionCloseLookupTable )
const ( LOOKUP_TABLE_MAX_ADDRESSES = 256 LOOKUP_TABLE_META_SIZE = 56 )
Variables ¶
This section is empty.
Functions ¶
func CloseLookupTable ¶
func CloseLookupTable( tableAddr, authorityAddr, recipientAddr solana.PublicKey, ) solana.Instruction
Returns an instruction that closes an address lookup table account. The account will be deallocated and the lamports will be drained to the recipient address.
func CreateLookupTable ¶
func CreateLookupTable( authority, payer solana.PublicKey, recentSlot uint64, ) (solana.Instruction, solana.PublicKey, error)
Constructs an instruction to create a table account and returns the instruction and the table account's derived address.
func DeactivateLookupTable ¶
func DeactivateLookupTable( tableAddr, authorityAddr solana.PublicKey, ) solana.Instruction
Constructs an instruction that deactivates an address lookup table so that it cannot be extended again and will be unusable and eligible for closure after a short amount of time.
func ExtendLookupTable ¶
func ExtendLookupTable( tableAddr, authorityAddr solana.PublicKey, payerAddr *solana.PublicKey, addresses solana.PublicKeySlice, ) solana.Instruction
Constructs an instruction which extends an address lookup table account with new addresses.
func FreezeLookupTable ¶
func FreezeLookupTable( tableAddr, authorityAddr solana.PublicKey, ) solana.Instruction
Constructs an instruction that freezes an address lookup table so that it can never be closed or extended again. Empty lookup tables cannot be frozen.
Types ¶
type LookupTableAccount ¶
type LookupTableAccount struct { ProgramState ProgramStateType Meta LookupTableMeta Addresses solana.PublicKeySlice }
func DeserializeLookupTable ¶
func DeserializeLookupTable(data []byte) (*LookupTableAccount, error)
func (*LookupTableAccount) IsActive ¶
func (ac *LookupTableAccount) IsActive() bool
type LookupTableMeta ¶
type LookupTableMeta struct { // Lookup tables cannot be closed until the deactivation slot is // no longer "recent" (not accessible in the `SlotHashes` sysvar). DeactivationSlot uint64 //The slot that the table was last extended. Address tables may //only be used to lookup addresses that were extended before //the current bank's slot. LastExtendedSlot uint64 //The start index where the table was last extended from during //the `last_extended_slot`. LastExtendedSlotStartIndex uint8 //Authority address which must sign for each modification. Authority *solana.PublicKey // contains filtered or unexported fields }
type ProgramStateType ¶
type ProgramStateType uint32
const ( ProgramStateUninitialized ProgramStateType = iota ProgramStateLookupTable )