solana_kit_sysvars library

Classes

FeeCalculator
A fee calculator containing the lamports per signature cost.
RecentBlockhashEntry
An entry in the recent blockhashes sysvar.
SlotHashEntry
An entry in the slot hashes sysvar.
StakeHistoryData
Stake activation/deactivation data for a single epoch.
StakeHistoryEntry
An entry in the stake history sysvar.
SysvarClock
Contains data on cluster time, including the current slot, epoch, and estimated wall-clock Unix timestamp. It is updated every slot.
SysvarEpochRewards
Tracks whether the rewards period (including calculation and distribution) is in progress, as well as the details needed to resume distribution when starting from a snapshot during the rewards period.
SysvarEpochSchedule
Includes the number of slots per epoch, timing of leader schedule selection, and information about epoch warm-up time.
SysvarLastRestartSlot
Information about the last restart slot (hard fork).
SysvarRent
Configuration for network rent.
SysvarSlotHistory
A bitvector of slots present over the last epoch.

Constants

bitvecDiscriminator → const int
The bitvector discriminator value.
bitvecLength → const int
The length of the bitvector in 64-bit blocks.
bitvecNumBits → const int
Max number of bits in the bitvector.
sysvarClockAddress → const Address
The address of the Clock sysvar.
sysvarClockSize → const int
The size in bytes of the Clock sysvar account data.
sysvarEpochRewardsAddress → const Address
The address of the EpochRewards sysvar.
sysvarEpochRewardsSize → const int
The size in bytes of the EpochRewards sysvar account data.
sysvarEpochScheduleAddress → const Address
The address of the EpochSchedule sysvar.
sysvarEpochScheduleSize → const int
The size in bytes of the EpochSchedule sysvar account data.
sysvarInstructionsAddress → const Address
The address of the Instructions sysvar.
sysvarLastRestartSlotAddress → const Address
The address of the LastRestartSlot sysvar.
sysvarLastRestartSlotSize → const int
The size in bytes of the LastRestartSlot sysvar account data.
sysvarRecentBlockhashesAddress → const Address
The address of the RecentBlockhashes sysvar.
sysvarRentAddress → const Address
The address of the Rent sysvar.
sysvarRentSize → const int
The size in bytes of the Rent sysvar account data.
sysvarSlotHashesAddress → const Address
The address of the SlotHashes sysvar.
sysvarSlotHistoryAddress → const Address
The address of the SlotHistory sysvar.
sysvarSlotHistorySize → const int
The size in bytes of the SlotHistory sysvar account data.
sysvarStakeHistoryAddress → const Address
The address of the StakeHistory sysvar.

Functions

fetchEncodedSysvarAccount(Rpc rpc, Address address, {FetchAccountConfig? config}) Future<MaybeEncodedAccount>
Fetches an encoded sysvar account.
fetchSysvarClock(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarClock>
Fetches the Clock sysvar account using the provided RPC client.
fetchSysvarEpochRewards(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarEpochRewards>
Fetches the EpochRewards sysvar account using the provided RPC client.
fetchSysvarEpochSchedule(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarEpochSchedule>
Fetches the EpochSchedule sysvar account using the provided RPC client.
fetchSysvarLastRestartSlot(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarLastRestartSlot>
Fetches the LastRestartSlot sysvar account using the provided RPC client.
fetchSysvarRecentBlockhashes(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarRecentBlockhashes>
Fetches the RecentBlockhashes sysvar account using the provided RPC client.
fetchSysvarRent(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarRent>
Fetches the Rent sysvar account using the provided RPC client.
fetchSysvarSlotHashes(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarSlotHashes>
Fetches the SlotHashes sysvar account using the provided RPC client.
fetchSysvarSlotHistory(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarSlotHistory>
Fetches the SlotHistory sysvar account using the provided RPC client.
fetchSysvarStakeHistory(Rpc rpc, {FetchAccountConfig? config}) Future<SysvarStakeHistory>
Fetches the StakeHistory sysvar account using the provided RPC client.
getSysvarClockCodec() → FixedSizeCodec<SysvarClock, SysvarClock>
Returns a fixed-size codec for the SysvarClock sysvar.
getSysvarClockDecoder() → FixedSizeDecoder<SysvarClock>
Returns a fixed-size decoder for the SysvarClock sysvar.
getSysvarClockEncoder() → FixedSizeEncoder<SysvarClock>
Returns a fixed-size encoder for the SysvarClock sysvar.
getSysvarEpochRewardsCodec() → FixedSizeCodec<SysvarEpochRewards, SysvarEpochRewards>
Returns a fixed-size codec for the SysvarEpochRewards sysvar.
getSysvarEpochRewardsDecoder() → FixedSizeDecoder<SysvarEpochRewards>
Returns a fixed-size decoder for the SysvarEpochRewards sysvar.
getSysvarEpochRewardsEncoder() → FixedSizeEncoder<SysvarEpochRewards>
Returns a fixed-size encoder for the SysvarEpochRewards sysvar.
getSysvarEpochScheduleCodec() → FixedSizeCodec<SysvarEpochSchedule, SysvarEpochSchedule>
Returns a fixed-size codec for the SysvarEpochSchedule sysvar.
getSysvarEpochScheduleDecoder() → FixedSizeDecoder<SysvarEpochSchedule>
Returns a fixed-size decoder for the SysvarEpochSchedule sysvar.
getSysvarEpochScheduleEncoder() → FixedSizeEncoder<SysvarEpochSchedule>
Returns a fixed-size encoder for the SysvarEpochSchedule sysvar.
getSysvarLastRestartSlotCodec() → FixedSizeCodec<SysvarLastRestartSlot, SysvarLastRestartSlot>
Returns a fixed-size codec for the SysvarLastRestartSlot sysvar.
getSysvarLastRestartSlotDecoder() → FixedSizeDecoder<SysvarLastRestartSlot>
Returns a fixed-size decoder for the SysvarLastRestartSlot sysvar.
getSysvarLastRestartSlotEncoder() → FixedSizeEncoder<SysvarLastRestartSlot>
Returns a fixed-size encoder for the SysvarLastRestartSlot sysvar.
getSysvarRecentBlockhashesCodec() → VariableSizeCodec<SysvarRecentBlockhashes, SysvarRecentBlockhashes>
Returns a variable-size codec for the SysvarRecentBlockhashes sysvar.
getSysvarRecentBlockhashesDecoder() → VariableSizeDecoder<SysvarRecentBlockhashes>
Returns a variable-size decoder for the SysvarRecentBlockhashes sysvar.
getSysvarRecentBlockhashesEncoder() → VariableSizeEncoder<SysvarRecentBlockhashes>
Returns a variable-size encoder for the SysvarRecentBlockhashes sysvar.
getSysvarRentCodec() → FixedSizeCodec<SysvarRent, SysvarRent>
Returns a fixed-size codec for the SysvarRent sysvar.
getSysvarRentDecoder() → FixedSizeDecoder<SysvarRent>
Returns a fixed-size decoder for the SysvarRent sysvar.
getSysvarRentEncoder() → FixedSizeEncoder<SysvarRent>
Returns a fixed-size encoder for the SysvarRent sysvar.
getSysvarSlotHashesCodec() → VariableSizeCodec<SysvarSlotHashes, SysvarSlotHashes>
Returns a variable-size codec for the SysvarSlotHashes sysvar.
getSysvarSlotHashesDecoder() → VariableSizeDecoder<SysvarSlotHashes>
Returns a variable-size decoder for the SysvarSlotHashes sysvar.
getSysvarSlotHashesEncoder() → VariableSizeEncoder<SysvarSlotHashes>
Returns a variable-size encoder for the SysvarSlotHashes sysvar.
getSysvarSlotHistoryCodec() → FixedSizeCodec<SysvarSlotHistory, SysvarSlotHistory>
Returns a fixed-size codec for the SysvarSlotHistory sysvar.
getSysvarSlotHistoryDecoder() → FixedSizeDecoder<SysvarSlotHistory>
Returns a fixed-size decoder for the SysvarSlotHistory sysvar.
getSysvarSlotHistoryEncoder() → FixedSizeEncoder<SysvarSlotHistory>
Returns a fixed-size encoder for the SysvarSlotHistory sysvar.
getSysvarStakeHistoryCodec() → VariableSizeCodec<SysvarStakeHistory, SysvarStakeHistory>
Returns a variable-size codec for the SysvarStakeHistory sysvar.
getSysvarStakeHistoryDecoder() → VariableSizeDecoder<SysvarStakeHistory>
Returns a variable-size decoder for the SysvarStakeHistory sysvar.
getSysvarStakeHistoryEncoder() → VariableSizeEncoder<SysvarStakeHistory>
Returns a variable-size encoder for the SysvarStakeHistory sysvar.

Typedefs

SysvarRecentBlockhashes = List<RecentBlockhashEntry>
Information about recent blocks and their fee calculators.
SysvarSlotHashes = List<SlotHashEntry>
The most recent hashes of a slot's parent banks.
SysvarStakeHistory = List<StakeHistoryEntry>
History of stake activations and de-activations.