Skip to main content
Deposit and withdraw assets from Jupiter Earn vaults using Privy embedded wallets, allowing your users to earn yield without managing their own private keys.

Prerequisites


Setup

Shared setup for both deposit and withdraw operations.
Authorization keys: Generate a P-256 key pair via the Privy dashboard, generateP256KeyPair() from @privy-io/node, or OpenSSL. The dashboard/API returns a key ID (AUTH_KEY_ID) used to identify the key when configuring wallet ownership. The private key (AUTH_KEY_PRIVATE) is used in the authorization_context when signing transactions. See the Privy authorization keys docs for details.

Deposit

1

Build Deposit Instructions

2

Sign and Send


Withdraw

1

Build Withdraw Instructions

To withdraw the entire balance instead of a fixed amount, use the Read SDK to fetch the position:
This requires @jup-ag/lend-read: npm install @jup-ag/lend-read
2

Sign and Send


Deposit to Earn

Standard Earn deposit with keypair signing

Borrow with Privy

Create positions and borrow using Privy wallets