Module spl_governance::tools::spl_token [−][src]
Expand description
General purpose SPL token utility functions
Functions
Asserts the given account_info represents a valid SPL Token account which is initialized and belongs to spl_token program
Asserts the given mint_info represents a valid SPL Token Mint account which is initialized and belongs to spl_token program
Asserts current mint authority matches the given authority and it’s signer of the transaction
Asserts current token owner matches the given owner and it’s signer of the transaction
Creates and initializes SPL token account with PDA using the provided PDA seeds
Computationally cheap method to get amount from a token account It reads amount without deserializing full account data
Computationally cheap method to get mint from a token account It reads mint without deserializing full account data
Computationally cheap method to just get authority from a mint without unpacking the whole object
Computationally cheap method to just get supply from a mint without unpacking the whole object
Computationally cheap method to get owner from a token account It reads owner without deserializing full account data
Sets new mint authority
Sets new token account owner
Transfers SPL Tokens
Transfers SPL Tokens from a token account owned by the provided PDA authority with seeds