# @jup-ag/core

> ![1*cXNgzu0Pvj4HwOLw4Akwqg](https://user-images.githubusercontent.com/34560707/145749257-e48cb199-521b-476e-9d81-f79bb45ef834.png)

Latest version **4.0.0-beta.21** (published 2023-07-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @jup-ag/core
pnpm add @jup-ag/core
yarn add @jup-ag/core
bun add @jup-ag/core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0-beta.21 |
| Published | 2023-07-13 |
| First published | 2021-11-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 31 |
| Unpacked size | 864.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | zhengyutay |
| Maintainers | jjsb, hjchan, arowana, siong, dicksonp, zhengyutay |

## Links

- npm: https://www.npmjs.com/package/@jup-ag/core
- npm.io page: https://npm.io/package/@jup-ag/core

## Dependencies (31)

- [jsbi](https://npm.io/package/jsbi.md) 4.3.0
- [bn.js](https://npm.io/package/bn.js.md) 5.2.1
- [fzstd](https://npm.io/package/fzstd.md) ~0.0.4
- [lru-cache](https://npm.io/package/lru-cache.md) ~7.14.1
- [decimal.js](https://npm.io/package/decimal.js.md) 10.4.2
- [cross-fetch](https://npm.io/package/cross-fetch.md) 3.1.6
- [@jup-ag/math](https://npm.io/package/@jup-ag/math.md) 4.0.0-beta.21
- [bignumber.js](https://npm.io/package/bignumber.js.md) 9.1.0
- [@noble/hashes](https://npm.io/package/@noble/hashes.md) 1.1.2
- [promise-retry](https://npm.io/package/promise-retry.md) 2.0.1
- [@jup-ag/common](https://npm.io/package/@jup-ag/common.md) 4.0.0-beta.21
- [@coral-xyz/anchor](https://npm.io/package/@coral-xyz/anchor.md) 0.28.0
- [@jup-ag/invariant](https://npm.io/package/@jup-ag/invariant.md) 0.9.35
- [@solana/spl-token](https://npm.io/package/@solana/spl-token.md) 0.1.8
- [@jup-ag/cykura-sdk](https://npm.io/package/@jup-ag/cykura-sdk.md) 0.1.25
- [@jup-ag/dradex-idl](https://npm.io/package/@jup-ag/dradex-idl.md) 0.2.1
- [@jup-ag/dradex-sdk](https://npm.io/package/@jup-ag/dradex-sdk.md) 0.2.3
- [@jup-ag/deltafi-sdk](https://npm.io/package/@jup-ag/deltafi-sdk.md) 0.0.2
- [@jup-ag/phoenix-sdk](https://npm.io/package/@jup-ag/phoenix-sdk.md) 1.4.4
- [@pythnetwork/client](https://npm.io/package/@pythnetwork/client.md) 2.7.3
- [@jup-ag/crema-sdk-v2](https://npm.io/package/@jup-ag/crema-sdk-v2.md) 2.1.6
- [@jup-ag/lifinity-sdk](https://npm.io/package/@jup-ag/lifinity-sdk.md) 0.1.72
- [@project-serum/serum](https://npm.io/package/@project-serum/serum.md) 0.13.65
- [@jup-ag/whirlpools-sdk](https://npm.io/package/@jup-ag/whirlpools-sdk.md) 0.7.2
- [@jup-ag/cykura-sdk-core](https://npm.io/package/@jup-ag/cykura-sdk-core.md) 0.1.8
- [@jup-ag/goosefx-ssl-sdk](https://npm.io/package/@jup-ag/goosefx-ssl-sdk.md) 1.2.17
- [@jup-ag/lifinity-sdk-v2](https://npm.io/package/@jup-ag/lifinity-sdk-v2.md) 1.0.8
- [@saberhq/stableswap-sdk](https://npm.io/package/@saberhq/stableswap-sdk.md) 1.13.6
- [@jup-ag/raydium-clmm-sdk](https://npm.io/package/@jup-ag/raydium-clmm-sdk.md) 1.0.6
- [@mercurial-finance/optimist](https://npm.io/package/@mercurial-finance/optimist.md) 0.2.1
- [@mercurial-finance/dynamic-amm-sdk](https://npm.io/package/@mercurial-finance/dynamic-amm-sdk.md) 0.3.10

## Recent versions

- 4.0.0-beta.21 (latest) — 2023-07-13
- 4.0.0-beta.19-test.1 (test) — 2023-06-22
- 3.0.0-beta.18 (v3-latest) — 2023-05-03
- 2.0.0-beta.10 (v2-latest) — 2023-03-20
- 1.0.0-beta.35 (v1-latest) — 2023-03-15
- 3.0.0-beta.4-test-log-1 (test-log) — 2022-11-05
- 3.0.0-beta.0-prerelease (prerelease) — 2022-09-29
- 0.0.0-alpha.16 (alpha) — 2021-11-24
- 4.0.0-beta.20 — 2023-06-22
- 4.0.0-beta.19-test.0 — 2023-06-22
- 4.0.0-beta.19 — 2023-06-14
- 4.0.0-beta.18-test.0 — 2023-05-19
- 4.0.0-beta.18 — 2023-05-03
- 4.0.0-beta.18-test — 2023-05-03
- 4.0.0-beta.17 — 2023-04-25
- … 178 more at https://npm.io/package/@jup-ag/core/versions

## README

# Jupiter Aggregator Core typescript library

![1*cXNgzu0Pvj4HwOLw4Akwqg](https://user-images.githubusercontent.com/34560707/145749257-e48cb199-521b-476e-9d81-f79bb45ef834.png)

<p align="center">
  <a href="https://jup.ag">Jupiter Aggregator (jup.ag)</a>
  <br/>
  The best swap aggregator on Solana.  Built for smart traders who like money.
</p>
<br/>

This repo is Jupiter Core SDK.


## Example
For Node, or build your own lib, use [Jupiter Core Example](https://github.com/mercurial-finance/jupiter-core-example)
## Integrate with React instead?
The quickest way to integrate Jupiter with your UI, use [Jupiter React Hook instead](https://www.npmjs.com/package/@jup-ag/react-hook)
## React Native?
Checkout [Jupiter React Native Example](https://github.com/mercurial-finance/jupiter-react-native)


# Installation

Yarn
```
yarn add @jup-ag/core
```

NPM
```
npm install @jup-ag/core
```

<br/>
<hr/>
<br/>

### Jupiter.load()
```
Initialize and load Jupiter instances
```

### jupiter.getRouteMap()
```
Get routeMap, which maps each tokenMint and their respective tokenMints that are swappable
```

### jupiter.computeRoutes()
```
Request Jupiter to compute the requested inputToken and outputToken, to query possible pairs, routes, amounts, slippage and more information.
```

---
_Source: https://npm.io/package/@jup-ag/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
