pub trait SplSwap {
    fn create_swap(
        &self,
        swap_program_id: &Pubkey,
        swap_account: &Keypair,
        swap_authority_address: &Pubkey,
        swap_authority_nonce: u8,
        pool_token_mint_address: &Pubkey,
        token_a_address: &Pubkey,
        token_b_address: &Pubkey,
        owner_address: &Pubkey,
        fees: Fees,
        fee_owner_address: &Pubkey
    ) -> ClientResult<(Keypair, Keypair)>;
fn create_swap_and_init(
        &self,
        swap_program_id: &Pubkey,
        owner: &Keypair,
        token_a_mint_address: &Pubkey,
        token_a_maker: Option<impl Fn(&Pubkey) -> ClientResult<Keypair>>,
        token_b_mint_address: &Pubkey,
        token_b_maker: Option<impl Fn(&Pubkey) -> ClientResult<Keypair>>,
        pool_token_decimals: u8,
        fees: Fees,
        fee_owner_address: &Pubkey
    ) -> ClientResult<SwapKeys>;
fn swap(
        &self,
        swap_program_id: &Pubkey,
        swap_account_address: &Pubkey,
        swap_authority_address: &Pubkey,
        user_transfer_authority: &Keypair,
        source_address: &Pubkey,
        pool_source_address: &Pubkey,
        pool_destination_address: &Pubkey,
        destination_address: &Pubkey,
        pool_token_mint_address: &Pubkey,
        fee_account_address: &Pubkey,
        amount_in: u64,
        minimum_amount_out: u64
    ) -> ClientResult<()>; }

Required methods

Implementors