Jupiter Lending SDK
A Rust SDK for interacting with Jupiter Lending protocol on Solana.
Usage
Add this to your Cargo.toml:
[]
= "0.1.0"
= "1.0"
Example
use FromStr;
use ;
License
MIT
A Rust SDK for interacting with Jupiter Lending protocol on Solana.
Add this to your Cargo.toml:
[dependencies]
jup-lend-sdk = "0.1.0"
anyhow = "1.0"
use std::str::FromStr;
use jup_lend_sdk::{
Cluster, Pubkey,
borrow::instructions::{LiquidateParams, get_liquidate_ix},
};
fn main() -> anyhow::Result<()> {
let liquidate = get_liquidate_ix(LiquidateParams {
vault_id: 1,
debt_amt: 100,
col_per_unit_debt: 0,
absorb: true,
signer: Pubkey::new_unique(),
to: Pubkey::new_unique(),
cluster: Cluster::from_str("https://api.mainnet-beta.solana.com")?,
})?;
dbg!(liquidate);
Ok(())
}
MIT