# @jup-ag/deltafi-sdk

> This repository contains deltafi-dex-v2 anchor client and example to do swap on deltafi-dex-v2.

Latest version **0.0.2** (published 2022-09-01) · ISC license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-09-01 |
| First published | 2022-09-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 256.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | arowana, siong, dicksonp, zhengyutay |
| Keywords | deltafi, sdk |

## Links

- npm: https://www.npmjs.com/package/@jup-ag/deltafi-sdk
- Repository: https://github.com/delta-fi/deltafi-sdk
- Homepage: https://github.com/delta-fi/deltafi-sdk#readme
- Issues: https://github.com/delta-fi/deltafi-sdk/issues
- npm.io page: https://npm.io/package/@jup-ag/deltafi-sdk

## Dependencies (6)

- [bn.js](https://npm.io/package/bn.js.md) ^5.2.0
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.1.0
- [bigint-buffer](https://npm.io/package/bigint-buffer.md) ^1.1.5
- [@solana/spl-token](https://npm.io/package/@solana/spl-token.md) ^0.1.8
- [@pythnetwork/client](https://npm.io/package/@pythnetwork/client.md) ^2.5.1
- [@project-serum/anchor](https://npm.io/package/@project-serum/anchor.md) ~0.24.2

## Recent versions

- 0.0.2 (latest) — 2022-09-01
- 0.0.1-test.2 — 2022-09-01
- 0.0.1-test.1 — 2022-09-01
- 0.0.1-test — 2022-09-01
- 0.0.1 — 2022-09-01

## README

# deltafi-sdk

This repository contains deltafi-dex-v2 anchor client and example to do swap on deltafi-dex-v2.

## Instruction to run the example

Install packages first:
``` 
yarn install
```

Then run the example with test keypair on testnet
```
yarn ts-node src/example/example.ts swap -k ./keypairs/testnet-keypair.json -n testnet
```

You can also use your own keypair on mainnet-beta to swap `1` token between `USDC` and `USDT`
```
yarn ts-node src/example/example.ts swap -k <your_keypair> -n mainnet-beta
```

Deposit `1` token to `USDC-USDT` pool.
```
yarn ts-node src/example/example.ts deposit -k <your_keypair> -n mainnet-beta
```

Withdraw `1` token from `USDC-USDT` pool.
```
yarn ts-node src/example/example.ts withdraw -k <your_keypair> -n mainnet-beta
```

The config in this repo may not be up to date. You can read the latest config with our public api.
```
yarn ts-node src/example/example.ts get-config
```
The response will contain all available swap pools.

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