#solana #anchor #cpi #jupiter

jupiter-cpi

Anchor CPI client for the Jupiter program

5 stable releases

4.0.3 Apr 13, 2023
4.0.2 Feb 16, 2023
4.0.1 Nov 3, 2022
4.0.0 Oct 21, 2022
3.0.0 Jul 26, 2022

#14 in #jupiter

29 downloads per month

Apache-2.0

6KB
102 lines

jupiter-cpi

CPI helpers for the Jupiter program.

This crate is using anchor-gen to automatically generate a crate from the Jupiter Anchor JSON IDL.

How-to

let swap_ix = Instruction {
    program_id: jupiter_cpi::ID,
    accounts,
    data: jupiter_override::Route {
        swap_leg,
        in_amount: quote_response.in_amount,
        quoted_out_amount: 0,
        slippage_bps: 0,
        platform_fee_bps: 0,
    }
    .data(),
};

License

Apache 2.0

Dependencies

~21–30MB
~517K SLoC