Socket
Book a DemoInstallSign in
Socket

@jup-ag/lend

Package Overview
Dependencies
Maintainers
8
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jup-ag/lend

```sh npm install @jup-ag/lend ```

latest
npmnpm
Version
0.0.98
Version published
Weekly downloads
235
-50.32%
Maintainers
8
Weekly downloads
 
Created
Source

@jup-ag/lend

Installation

npm install @jup-ag/lend

Usage

Earning

import { getDepositIx, getWithdrawIx } from "@jup-ag/lend/earn";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const signer = new PublicKey("signerAddress");
const usdc = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");

const depositIx = await getDepositIx({
  amount: new BN(1000000),
  asset: usdc,

  signer,
  connection,
});

const withdrawIx = await getWithdrawIx({
  amount: new BN(10000),
  asset: usdc,

  signer,
  connection,
});

Borrowing

import { getOperateIx } from "@jup-ag/lend/borrow";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const signer = new PublicKey("signerAddress");

const { ixs, addressLookupTableAccounts } = await getOperateIx({
  vaultId: 1,
  positionId: 0,

  colAmount: new BN(1000000),
  debtAmount: new BN(1000),

  signer,
  connection,
});

API

import { Client } from "@jup-ag/lend/api";

const client = new Client(); // or new Client({ apiKey: "my-api-key" });

const lendingTokens = await client.earn.getTokens();

FAQs

Package last updated on 30 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts