Module solana_program

Source
Expand description

Export of the solana_program crate.

Modules§

account_info
Account information.
address_lookup_table
The address lookup table program.
alt_bn128
big_mod_exp
blake3
Hashing with the blake3 hash function.
borsh
Utilities for the borsh serialization format.
borsh0_10
Utilities for the borsh serialization format, version 0.10.
borsh1
Utilities for the borsh serialization format, version 1.
bpf_loader
The latest BPF loader native program.
bpf_loader_deprecated
The original and now deprecated Solana BPF loader.
bpf_loader_upgradeable
An upgradeable BPF loader native program.
clock
Information about the network’s clock, ticks, slots, etc.
compute_units
config
The config native program.
debug_account_data
Debug-formatting of account data.
decode_error
Converting custom error codes to enums.
ed25519_program
The ed25519 native program.
entrypoint
The Rust-based BPF program entrypoint supported by the latest BPF loader.
entrypoint_deprecated
The Rust-based BPF program entrypoint supported by the original BPF loader.
epoch_rewards
A type to hold data for the EpochRewards sysvar.
epoch_schedule
Configuration for epochs and slots.
epoch_stake
API for retrieving epoch stake information.
feature
Runtime features.
fee_calculator
Calculation of transaction fees.
hash
Hashing with the SHA-256 hash function, and a general Hash type.
incinerator
A designated address for burning lamports.
instruction
Types for directing the execution of Solana programs.
keccak
Hashing with the keccak (SHA-3) hash function.
lamports
Defines the LamportsError type.
last_restart_slot
Information about the last restart slot (hard fork).
loader_instruction
Instructions for the non-upgradable BPF loader.
loader_upgradeable_instruction
Instructions for the upgradable BPF loader.
loader_v4
The v4 built-in loader program.
loader_v4_instruction
Instructions for the v4 built-in loader program.
log
Logging utilities for Rust-based Solana programs.
message
Sequences of Instructions executed within a single transaction.
native_token
Definitions for the native SOL token and its fractional lamports.
nonce
Durable transaction nonces.
program
Cross-program invocation.
program_error
The ProgramError type and related definitions.
program_memory
Basic low-level memory operations.
program_option
A C representation of Rust’s Option, used across the FFI boundary for Solana program interfaces.
program_pack
The Pack serialization trait.
program_stubs
Implementations of syscalls used when solana-program is built for non-SBF targets.
program_utils
Contains a single utility function for deserializing from bincode.
pubkey
Solana account addresses.
rent
Configuration for network rent.
sanitize
A trait for sanitizing values and members of over the wire messages.
sdk_idsDeprecated
A vector of Solana SDK IDs.
secp256k1_program
The secp256k1 native program.
secp256k1_recover
Public key recovery from secp256k1 ECDSA signatures.
serde_varint
Integers that serialize to variable size.
serialize_utils
Helpers for reading and writing bytes.
short_vec
Compact serde-encoding of vectors with small length.
slot_hashes
A type to hold data for the SlotHashes sysvar.
slot_history
A type to hold data for the SlotHistory sysvar.
stake
The stake native program.
stake_history
A type to hold data for the StakeHistory sysvar.
syscalls
Declarations of Solana program syscalls.
system_instruction
Instructions and constructors for the system program.
system_program
The system native program.
sysvar
Access to special accounts with dynamically-updated data.
vote
The vote native program.

Macros§

custom_heap_default
Define the default global allocator.
custom_panic_default
Define the default global panic handler.
declare_deprecated_id
declare_deprecated_sysvar_id
Same as declare_sysvar_id except that it reports that this ID has been deprecated.
declare_id
declare_sysvar_id
Declares an ID that implements SysvarId.
entrypoint
Declare the program entrypoint and set up global handlers.
entrypoint_deprecated
Declare the program entrypoint.
impl_sysvar_get
Implements the Sysvar::get method for both SBF and host targets.
msg
Print a message to the log.
pubkey
unchecked_div_by_const
Convenience macro for doing integer division where the operation’s safety can be checked at compile-time.