@renec-foundation/redex-sdk
v0.8.1-beta
Published
Typescript SDK to interact with Orca's Whirlpool program.
Downloads
27
Maintainers
Readme
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:
- 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)"
- Run
anchor keys list
to retrieve thedeclared_id
and replace it toAnchor.toml
, also replace inwhirlpool/src/lib.rs
[programs.localnet]
whirlpool = "<declared_id>"
Run
solana config set --url localhost
Open new terminal and run
solana-test-validator
Run
cd sdk
yarn install
anchor test