Crate safe_token_2022
source · [−]Expand description
An ERC20-like Token program for the Safecoin blockchain
Re-exports
pub use safecoin_program;
pub use safe_zk_token_sdk;
Modules
Error types
Extensions available to token mints and accounts
Generic Token Account, copied from safe_token::state
Instruction types
The Mint that represents the native token
Safecoin program utilities for Plain Old Data types
Program state processor
State transition types
Statics
The static program ID
Functions
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
Convert a raw amount to its UI representation (using the decimals field defined in its mint)
Convert a raw amount to its UI representation using the given decimals field
Excess zeroes or unneeded decimal point are trimmed.
Confirms that a given pubkey is equivalent to the program ID
Checks that the supplied program ID is correct for safe-token-2022
Checks that the supplied program ID is corect for safe-token or safe-token-2022
Checks two pubkeys for equality in a computationally cheap way using
sol_memcmp
Returns the program ID
Try to convert a UI represenation of a token amount to its raw amount using the given decimals
field
Convert the UI representation of a token amount (using the decimals field defined in its mint)
to the raw amount