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
EpochRewardssysvar. - 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
Hashtype. - incinerator
- A designated address for burning lamports.
- instruction
- keccak
- Hashing with the keccak (SHA-3) hash function.
- lamports
- Re-exports the
LamportsErrortype 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-cpiwith 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
Packserialization 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-programis 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_ids
Deprecated - 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
StakeHistorysysvar. - 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_idexcept that it reports that this ID has been deprecated. - declare_
deprecated_ sysvar_ id - Same as
declare_sysvar_idexcept 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::getmethod 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.