Re-exports§
pub use crate::utils::get_associated_token_address_with_program_id_address;
Modules§
- account
- The Solana
Accounttype. - account_
info - Account information.
- big_
mod_ exp - blake3
- Hashing with the blake3 hash function.
- blockhash_
query - 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.
- bs58
- Another Base58 codec implementation.
- client_
error - clock
- Information about the network’s clock, ticks, slots, etc.
- config
- The config native program.
- connection_
cache - deserialize_
utils - Serde helpers.
- 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_
info - Information about the current epoch.
- epoch_
rewards - A type to hold data for the
EpochRewardssysvar. - epoch_
rewards_ hasher - epoch_
schedule - error
- fee
- Fee structures.
- fee_
calculator - Calculation of transaction fees.
- hash
- Hashing with the SHA-256 hash function, and a general
Hashtype. - incinerator
- inflation
- configuration for network inflation
- instruction
- keccak
- Hashing with the keccak (SHA-3) hash function.
- lamports
- Re-exports the
LamportsErrortype for backwards compatibility. - log
- message
- Sequences of
Instructions executed within a single transaction. - mock_
sender_ for_ cli - native_
loader - The native loader native program.
- native_
token - Definitions for the native SOL token and its fractional lamports.
- nonblocking
- nonce_
utils - Durable transaction nonce helpers.
- offchain_
message - Off-chain message container for storing non-transaction messages.
- 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. - pubkey
- pubsub_
client - rent
- Configuration for network rent.
- rpc
- rpc_
client - Communication with a Solana node over RPC.
- rpc_
config - rpc_
custom_ error - Implementation defined RPC server errors
- rpc_
filter - rpc_
request - rpc_
response - rpc_
sender - A transport for RPC calls.
- sanitize
- A trait for sanitizing values and members of over the wire messages.
- secp256k1_
program - The secp256k1 native program.
- send_
and_ confirm_ transactions_ in_ parallel - 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.
- shred_
version - Calculation of shred versions.
- signature
- Functionality for public and private keys.
- signer
- simple_
vote_ transaction_ checker - slot_
hashes - slot_
history - stable_
layout - Types with stable memory layouts
- system_
instruction - Instructions and constructors for the system program.
- sysvar
- timing
std::timeutility functions.- token
- tpu_
client - transaction
- transaction_
executor - transport
- Defines the
TransportErrortype. - utils
Macros§
- address
- Convenience macro to define a static
Addressvalue. - 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_idexcept that it reports that this ID has been deprecated. - declare_
id - declare_
sysvar_ id - Declares an ID that implements
SysvarId. - 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
Addressvalue. - pubkeys
- unchecked_
div_ by_ const - Convenience macro for doing integer division where the operation’s safety can be checked at compile-time.
Structs§
- Address
- The address of a Solana account.
- Address
Hasher - A faster, but less collision resistant hasher for addresses.
- Address
Hasher Builder - A builder for faster, but less collision resistant hasher for addresses.
- Parsed
Account - UiAccount
- A duplicate representation of an Account for pretty JSON serialization
- UiData
Slice Config
Enums§
- Cluster
Type - Compute
Budget Instruction - Compute Budget Instructions
- UiAccount
Data - UiAccount
Encoding
Constants§
- ADDRESS_
BYTES - Number of bytes in an address.
- ASSOCIATED_
TOKEN_ PROGRAM_ ID - Associated Token Account program (interface crate) — same address
- ID
- The const program ID.
- MAX_
SEEDS - Maximum number of seeds
- MAX_
SEED_ LEN - maximum length of derived
Addressseed - METAPLEX_
METADATA_ ADDRESS - MPL_
TOKEN_ METADATA_ PROGRAM_ ID - Metaplex Token Metadata
- SPL_
ASSOCIATED_ TOKEN_ ACCOUNT_ PROGRAM_ ID - Associated Token Account program (classic crate)
- SPL_
TOKEN_ PROGRAM_ ID - SPL Token (legacy)
- SPL_
TOKEN_ PROGRAM_ ID_ 2022 - SPL Token-2022
- SYSTEM_
PROGRAM_ ID - System Program
- SYSVAR_
RENT_ ID - Sysvar: Rent
Functions§
- bytes_
are_ curve_ point - check_
id - Returns
trueif given pubkey is the program ID. - get_
associated_ token_ address - Derives the associated token account address for the given wallet address and token mint
- get_
associated_ token_ address_ with_ program_ id - Derives the associated token account address for the given wallet address, token mint and token program id
- id
- Returns the program ID.