Crate safe_token_2022

Source
Expand description

An ERC20-like Token program for the Safecoin blockchain

Re-exports§

pub use solana_program;
pub use safe_zk_token_sdk;

Modules§

error
Error types
extension
Extensions available to token mints and accounts
generic_token_account
Generic Token Account, copied from safe_token::state
instruction
Instruction types
native_mint
The Mint that represents the native token
pod
Safecoin program utilities for Plain Old Data types
processor
Program state processor
state
State transition types

Statics§

ID
The static program ID

Functions§

amount_to_ui_amount
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
amount_to_ui_amount_string
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
amount_to_ui_amount_string_trimmed
Convert a raw amount to its UI representation using the given decimals field Excess zeroes or unneeded decimal point are trimmed.
check_id
Confirms that a given pubkey is equivalent to the program ID
check_program_account
Checks that the supplied program ID is correct for safe-token-2022
check_safe_token_program_account
Checks that the supplied program ID is corect for safe-token or safe-token-2022
cmp_pubkeys
Checks two pubkeys for equality in a computationally cheap way using sol_memcmp
id
Returns the program ID
try_ui_amount_into_amount
Try to convert a UI representation of a token amount to its raw amount using the given decimals field
ui_amount_to_amount
Convert the UI representation of a token amount (using the decimals field defined in its mint) to the raw amount