Skip to main content

Module actions

Module actions 

Source
Expand description

Clean action interfaces for Light Token operations.

These actions provide simple, ergonomic interfaces for common Light Token operations.

All actions use a params struct pattern with an execute method:

Transfer {
    source,
    destination,
    amount: 1000,
    ..Default::default()
}.execute(&mut rpc, &payer, &authority).await?;

Re-exports§

pub use approve::Approve;
pub use create_ata::CreateAta;
pub use create_mint::CreateMint;
pub use create_mint::TokenMetadata;
pub use mint_to::MintTo;
pub use revoke::Revoke;
pub use transfer::Transfer;
pub use transfer_checked::TransferChecked;
pub use transfer_interface::TransferInterface;
pub use unwrap::Unwrap;
pub use wrap::Wrap;

Modules§

approve
Approve delegation action for Light Token.
create_ata
Create Associated Token Account actions for Light Token.
create_mint
Create mint action for Light Token.
mint_to
Mint tokens action for Light Token.
revoke
Revoke delegation action for Light Token.
transfer
Transfer actions for Light Token.
transfer_checked
Transfer checked action for Light Token.
transfer_interface
Transfer interface action for Light Token.
unwrap
Unwrap Light Token to SPL tokens action.
wrap
Wrap SPL tokens to Light Token action.

Functions§

derive_associated_token_account
get_associated_token_address
Returns the associated token address for a given owner and mint.
get_associated_token_address_and_bump
Returns the associated token address and bump for a given owner and mint.