Re-exports§
pub use solana_program::entrypoint;
Modules§
Macros§
- account
- declare_
id - Convenience macro to declare a static public key and functions to interact with it.
- entrypoint
- Declare the program entrypoint and set up global handlers.
- error
- event
- impl_
from_ bytes - impl_
instruction_ from_ bytes - impl_
to_ bytes - instruction
Structs§
- Account
Info - Account information
- Account
Meta - Describes a single account read or written by a program during instruction execution.
- Clock
- A representation of network time.
- Instruction
- A directive for a single invocation of a Solana program.
- Numeric
- A fixed-point number with 80 bits for the integer part and 48 bits for the fractional part.
- Pubkey
- The address of a Solana account.
Enums§
- Mint
- Program
Error - Reasons the program may fail
- Token
Account
Constants§
Traits§
- Account
Deserialize - Account
Header Deserialize - Account data is sometimes stored via a header and body type, where the former resolves the type of the latter (e.g. merkle trees with a generic size const). This trait parses a header type from the first N bytes of some data, and returns the remaining bytes, which are then available for further processing.
- Account
Info Validation - Account
Validation - AsAccount
- Performs:
- AsSpl
- Close
Account - Discriminator
- Lamport
Transfer - Loggable
- Supports logging.
- Pod
- Marker trait for “plain old data”.
- Sysvar
- A type that holds sysvar data.
- TryFrom
Primitive - Zeroable
- Trait for types that can be safely created with
zeroed.
Functions§
- allocate_
account - Allocates space for a new program account.
- allocate_
account_ with_ bump - Allocates space for a new program account with user-provided bump.
- approve
- /// Approves a delegate. A delegate is given the authority over tokens on behalf of the source account’s owner.
- approve_
checked - approve_
checked_ signed - approve_
checked_ signed_ with_ bump - approve_
signed - approve_
signed_ with_ bump - burn
- burn_
checked - burn_
checked_ signed - burn_
checked_ signed_ with_ bump - burn_
signed - burn_
signed_ with_ bump - bytes_
to_ string - Converts a fixed-size byte array into a String, handling null termination.
- close_
account - Closes an account and returns the remaining rent lamports to the provided recipient.
- close_
token_ account - close_
token_ account_ signed - close_
token_ account_ signed_ with_ bump - create_
account - Creates a new account.
- create_
associated_ token_ account - create_
program_ account - Creates a new program account.
- create_
program_ account_ with_ bump - Creates a new program account with user-provided bump.
- freeze
- freeze_
signed - freeze_
signed_ with_ bump - get_
account_ data_ size - initialize_
mint - initialize_
mint_ signed - initialize_
mint_ signed_ with_ bump - initialize_
multisig - Initializes a multisignature account with N provided signers.
- initialize_
multisig_ signed - initialize_
multisig_ signed_ with_ bump - invoke_
signed - Invokes a CPI with provided signer seeds and program id.
- invoke_
signed_ with_ bump - Invokes a CPI with the provided signer seeds and bump.
- log
- Logs a message.
- mint_
to_ checked_ signed - mint_
to_ checked_ signed_ with_ bump - mint_
to_ signed - mint_
to_ signed_ with_ bump - parse_
instruction - Parses an instruction from the instruction data.
- revoke
- Revoke
- revoke_
signed - Revoke with signer seeds
- revoke_
signed_ with_ bump - set_
authority - Set authority for an SPL token mint
- set_
authority_ signed - Set authority using signer seeds
- set_
authority_ signed_ with_ bump - string_
to_ bytes - Converts a string into a fixed-size byte array of length N.
- sync_
native - Like InitializeAccount2, but does not require the Rent sysvar to be provided
- sync_
native_ signed - sync_
native_ signed_ with_ bump - thaw_
account - Thaws a frozen SPL token account
- thaw_
account_ signed - Thaws a frozen SPL token account using signed account
- thaw_
account_ signed_ with_ bump - trace
- Logs the call trace and returns the error.
- transfer
- transfer_
checked - transfer_
checked_ signed - transfer_
checked_ signed_ with_ bump - transfer_
signed - transfer_
signed_ with_ bump
Type Aliases§
Derive Macros§
- Error
- Into
Primitive - Implements
Into<Primitive>for a#[repr(Primitive)] enum. - Pod
- Derive the
Podtrait for a struct - TryFrom
Primitive - Implements
TryFrom<Primitive>for a#[repr(Primitive)] enum. - Zeroable
- Derive the
Zeroabletrait for a type.