Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
eac2a4d
chore: update oxlint config to ts
ChiefWoods Aug 30, 2026
0c8d81c
chore: replace prettier with oxfmt
ChiefWoods Aug 30, 2026
9626459
feat: add jupiter-api-ts
ChiefWoods Aug 30, 2026
3354c41
feat: add rpcUrl field in config
ChiefWoods Aug 30, 2026
1a13d9f
feat: add SolanaRpc lib
ChiefWoods Aug 30, 2026
1d3eb40
feat: add dry-run flag
ChiefWoods Aug 30, 2026
e38c138
feat: add JupiterApi lib
ChiefWoods Aug 30, 2026
995c432
refactor: replace asset helpers using JupiterDatapi
ChiefWoods Aug 30, 2026
66594a2
feat: add @solana-program/token-2022
ChiefWoods Aug 30, 2026
2393822
feat: add getScaledUiMultiplier method to SolanaRpc
ChiefWoods Aug 30, 2026
b8f7b1a
feat: add getTokenProgram method to SolanaRpc
ChiefWoods Aug 30, 2026
d89bc77
refactor: use Datapi client and SolanaRpc
ChiefWoods Aug 30, 2026
a1215a8
docs: update readme
ChiefWoods Aug 30, 2026
21f7899
refactor: replace handrolled clients with API-backed clients
ChiefWoods Aug 30, 2026
622fd7c
chore: use unambiguous fallback methods
ChiefWoods Aug 31, 2026
afc8dc4
feat: add SolanaTransactions lib
ChiefWoods Aug 31, 2026
15f2c89
chore: update signTransaction method to accept Base64EncodedWireTrans…
ChiefWoods Aug 31, 2026
178b55b
feat: add getTokenPrograms and getTokenAccountsByOwner methods
ChiefWoods Aug 31, 2026
008e494
docs: update readme on dry-run
ChiefWoods Aug 31, 2026
9a2ca84
refactor: replace UltraClient and use primitives for transfer and rec…
ChiefWoods Aug 31, 2026
89b3f84
chore: remove old clients
ChiefWoods Aug 31, 2026
f3522cd
refactor: use RPC primitive and remove request builder
ChiefWoods Aug 31, 2026
30339e4
feat: lift portfolio, transfer and reclaim to top level, update spot …
ChiefWoods Aug 31, 2026
833d2dc
refactor: replace Datapi searchAssets with getTokensV2Search
ChiefWoods Aug 31, 2026
ddaa585
refactor: replace parallel API calls with single call
ChiefWoods Aug 31, 2026
37473aa
feat: add support for negative chain amount
ChiefWoods Aug 31, 2026
c8d648e
chore: fallback to config active key if address is not passed for len…
ChiefWoods Aug 31, 2026
be7312d
feat: add lend borrow commands
ChiefWoods Aug 31, 2026
60fc9df
feat: add dca commands
ChiefWoods Aug 31, 2026
44b63aa
feat: add signTransactionWith method
ChiefWoods Aug 31, 2026
28b659b
feat: add invite commands
ChiefWoods Aug 31, 2026
70f0d02
feat: add jlp commands
ChiefWoods Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .oxlintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

10 changes: 6 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bun run dev
bun build src/index.ts --compile --outfile jup

# Format code
bunx prettier --write .
bun run fmt

# Run all tests: lint, typecheck, tests
bun run ci
Expand All @@ -30,11 +30,11 @@ bun run ci

- `ConfigCommand` — `config list`, `config set`
- `KeysCommand` — `keys list/add/delete/edit/use/solana-import`
- `LendCommand` — `lend earn tokens/positions/deposit/withdraw`
- `LendCommand` — `lend earn tokens/positions/deposit/withdraw`, `lend borrow vaults/positions/operate`
- `PerpsCommand` — `perps positions/markets/open/set/close`
- `PredictionsCommand` — `predictions events/positions/open/close/history`
- `SignCommand` — `sign --tx <base64>`
- `SpotCommand` — `spot tokens/quote/swap/portfolio/transfer/reclaim`
- `SpotCommand` — `spot tokens/quote/swap/history`, `portfolio`, `transfer`, `reclaim`
- `UpdateCommand` — `update` (self-update CLI to latest version)
- `VrfdCommand` — `vrfd check/submit`

Expand Down Expand Up @@ -63,6 +63,8 @@ bun run ci

**Lend deposit/withdraw flow:** LendClient.getTokens → resolve jlToken → Swap.execute → LendClient.getPositions (updated state)

**Lend borrow flow:** listBorrowVaults / listBorrowPositions → buildBorrowOperateTransaction → Signer.signTransaction → RPC send

**Predictions flow:** PredictionsClient.postOrder → Signer.signTransaction → PredictionsClient.postExecute

**Vrfd flow:** VrfdClient.checkEligibility → VrfdClient.craftTxn → Signer.signTransaction → VrfdClient.execute
Expand All @@ -87,7 +89,7 @@ When adding new commands, both input (options/arguments) and output (JSON/table)

## Code Style

- Prettier with default config (double quotes, semicolons, 80 char width, trailing commas in ES5 positions)
- Oxfmt with double quotes, semicolons, 80 character line width, and trailing commas in ES5 positions
- TypeScript strict mode, ESNext target, bundler module resolution
- All core modules use static methods (no instantiation for Config, Output, NumberConverter, clients)
- Signer and KeyPair use instance methods with static factory constructors
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,23 @@ jup keys add key1 --seed-phrase "word1 word2 ..." --derivation-path "m/44'/501'/
# Or import from a private key (accepts hex, base58, base64, or JSON byte array)
jup keys add key1 --private-key <key>

# Sign a base64 transaction returned from --dry-run
jup sign --tx <base64-transaction>

# View your spot portfolio
jup spot portfolio
# View your portfolio
jup portfolio
# View your spot trade history (does not require a Jupiter Core API key)
jup spot history
# Swap 1 SOL to USDC
jup spot swap --from SOL --to USDC --amount 1
# Reclaim rent from empty token accounts
jup spot reclaim
jup reclaim

# Create a daily DCA order for ten 10-USDC purchases of SOL
jup dca create --from USDC --to SOL --amount 100 --interval 86400 --orders 10

# Send a 10-USDC invite
jup invite send --token USDC --amount 10

# Show JLP pool statistics
jup jlp info

# Open a 3x long SOL position with 10 USDC
jup perps open --asset SOL --side long --amount 10 --input USDC --leverage 3
Expand All @@ -52,6 +60,10 @@ jup lend earn tokens
jup lend earn deposit --token USDC --amount 100
# View your lending positions
jup lend earn positions
# View borrow vaults
jup lend borrow vaults
# Deposit collateral and borrow in one transaction
jup lend borrow operate --vault 1 --collateral 0.03 --debt 1.1

# Browse prediction markets
jup predictions events --category crypto
Expand All @@ -71,18 +83,21 @@ jup vrfd submit --token <mint-address> --project-twitter @projecthandle --descri
> [!NOTE]
> This CLI is designed to be LLM friendly and **all commands are non-interactive**. Set JSON output mode globally for structured responses: `jup config set --output json`, or use `-f json` flag on individual commands.
>
> Use `--dry-run` on any transacting command to preview the result without signing or submitting on-chain. In JSON mode, the response includes the unsigned base64 `transaction`, which can be signed with the `sign` command.
> Use `--dry-run` on any transacting command to sign and simulate the transaction without submitting it. In JSON mode, the response includes the signed serialized transaction and concise simulation result. Configure the RPC used for simulation and direct on-chain submissions with `jup config set --rpc-url <url>`.

[Read the docs](./docs/) for specific guides, examples, and workflows:

- [Setup](docs/setup.md): Installation of the CLI
- [Update](docs/update.md): Self-update the CLI
- [Config](docs/config.md): CLI settings and configurations
- [Keys](docs/keys.md): Private key management
- [Sign](docs/sign.md): Sign transactions from `--dry-run`
- [Sign](docs/sign.md): Sign an externally supplied transaction
- [Spot](docs/spot.md): Spot trading, transfers, token search and portfolio data
- [DCA](docs/dca.md): Time-based recurring orders
- [Invite](docs/invite.md): Jupiter Send token invites
- [JLP](docs/jlp.md): JLP pool information, minting, and burning
- [Perps](docs/perps.md): Perps trading (leveraged longs/shorts)
- [Lend](docs/lend.md): Lending and yield farming
- [Lend](docs/lend.md): Lending, borrowing, and yield farming
- [Predictions](docs/predictions.md): Prediction markets
- [Vrfd](docs/vrfd.md): Token verification

Expand Down
Loading