Expand description
An ERC20-like Token program for the Solana blockchain
Re-exports§
pub use solana_program;
pub use solana_zk_sdk;
Modules§
- Error types
- Extensions available to token mints and accounts
- Generic Token Account, copied from spl_token::state
- Instruction types
- The Mint that represents the native token
- Offchain helper for fetching required accounts to build instructions
- On-chain program invoke helper to perform on-chain
transfer_checked
with correct accounts - Rewrites of the base state types represented as Pods
- Rewrites of the instruction data types represented as Pods
- Program state processor
- State transition types
Constants§
- The const 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.
- Returns
true
if given pubkey is the program ID. - Checks that the supplied program ID is correct for spl-token-2022
- Checks that the supplied program ID is correct for spl-token or spl-token-2022
- Checks if the spplied program ID is that of the system program
- Checks that the supplied program ID is correct for the ZK ElGamal proof program
- Returns the program ID.
- Try to convert a UI representation 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