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.
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.
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
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
keccak
Hashing with the keccak (SHA-3) hash function.
lamports
Re-exports the LamportsError type for backwards compatibility.
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
Wrappers around solana-cpi with support for overwriting syscall stubs
program_error
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 This is a specific serialization API that is used by many older programs in the Solana Program Library to manage account state. It is not generally recommended for new code since it does not define a language-independent serialization format.
program_stubs
Implementations of syscalls used when solana-program is built for non-SBF targets.
program_utils
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
slot_history
stable_layout
Types with stable memory layouts
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
Same as declare_id except that it reports that this ID has been deprecated.
declare_deprecated_sysvar_id
Same as declare_sysvar_id except that it reports that this ID has been deprecated.
declare_id
Convenience macro to declare a static public key and functions to interact with it.
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.
entrypoint_no_alloc
Declare the program entrypoint and set up global handlers.
impl_sysvar_get
Implements the Sysvar::get method for both SBF and host targets.
msg
Print a message to the log.
pubkey
Convenience macro to define a static public key.
unchecked_div_by_const
Convenience macro for doing integer division where the operation’s safety can be checked at compile-time.