0.8.1-beta • Published 8 months ago

@renec-foundation/redex-sdk v0.8.1-beta

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

Whirlpools

Whirpools is an open-source concentrated liquidity AMM contract on the Solana blockchain. The Whirlpools Typescript SDK (@orca-so/whirlpools-sdk) allows for easy interaction with a deployed Whirlpools program.

The contract has been audited by Kudelski and Neodyme.

Whirlpool SDK

Use the SDK to interact with a deployed Whirlpools program via Typescript.

Installation

In your package, run:

yarn add `@orca-so/whirlpools-sdk`
yarn add "@project-serum/anchor"
yarn add "decimal.js"

Usage

Read instructions on how to use the SDK on the Orca Developer Portal.

Tests

To run tests for the SDK, follow steps below:

  1. Make sure your solana-cli version from 1.9 and above. You can replace v1.9.29 by another version in the future.
sh -c "$(curl -sSfL https://release.solana.com/v1.9.29/install)"
  1. Run anchor keys list to retrieve the declared_id and replace it to Anchor.toml, also replace in whirlpool/src/lib.rs
[programs.localnet]
whirlpool = "<declared_id>"
  1. Run solana config set --url localhost

  2. Open new terminal and run solana-test-validator

  3. Run

cd sdk
yarn install
anchor test 

License

Apache 2.0