Struct spl_token_client::token::Token
source ·
[−]pub struct Token<T, S> { /* private fields */ }Implementations
Get token address.
pub async fn create_mint<'a, S2: Signer>(
client: Arc<dyn ProgramClient<T>>,
payer: S,
mint_account: &'a S2,
mint_authority: &'a Pubkey,
freeze_authority: Option<&'a Pubkey>,
decimals: u8
) -> TokenResult<Self>
pub async fn create_mint<'a, S2: Signer>(
client: Arc<dyn ProgramClient<T>>,
payer: S,
mint_account: &'a S2,
mint_authority: &'a Pubkey,
freeze_authority: Option<&'a Pubkey>,
decimals: u8
) -> TokenResult<Self>
Create and initialize a token.
Get the address for the associated token account.
Create and initialize the associated account.
Retrive mint information.
Retrieve account information.
pub async fn get_or_create_associated_account_info(
&self,
owner: &Pubkey
) -> TokenResult<Account>
pub async fn get_or_create_associated_account_info(
&self,
owner: &Pubkey
) -> TokenResult<Account>
Retrieve the associated account or create one if not found.
Assign a new authority to the account.
Mint new tokens
Trait Implementations
Auto Trait Implementations
impl<T, S> !RefUnwindSafe for Token<T, S>
impl<T, S> !UnwindSafe for Token<T, S>
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
