Skip to main content

Crate steel

Crate steel 

Source

Re-exports§

pub use solana_program::entrypoint;

Modules§

cpi
macros
mint
system_programDeprecated
The system native program.
sysvar
token
validation

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§

AccountInfo
Account information
AccountMeta
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
ProgramError
Reasons the program may fail
TokenAccount

Constants§

ERROR_INVALID_UTF8
ERROR_STRING_TOO_LONG

Traits§

AccountDeserialize
AccountHeaderDeserialize
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.
AccountInfoValidation
AccountValidation
AsAccount
Performs:
AsSpl
CloseAccount
Discriminator
LamportTransfer
Loggable
Supports logging.
Pod
Marker trait for “plain old data”.
Sysvar
A type that holds sysvar data.
TryFromPrimitive
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§

ProgramResult

Derive Macros§

Error
IntoPrimitive
Implements Into<Primitive> for a #[repr(Primitive)] enum.
Pod
Derive the Pod trait for a struct
TryFromPrimitive
Implements TryFrom<Primitive> for a #[repr(Primitive)] enum.
Zeroable
Derive the Zeroable trait for a type.