Commit Graph

51 Commits

Author SHA1 Message Date
meep 11f17bae53
Upgrade Anchor (Typescript) dependency to 0.25 (#38)
- Updating the Anchor SDK dependency
- API changes on the parameters on WhirlpoolContext & WhirlpoolClient
2022-07-22 09:47:32 -04:00
Otto Cheung c33740ed3a v0.4.0 2022-07-21 15:26:09 -04:00
meep 025fbffdf0
Update typedocs and comments for swap refactor (#37) 2022-07-15 10:10:49 -04:00
meep 2df89bb552
[SDK] Refactoring swap-quote (#30)
- More accurate quote values - ported the swap logic from contract & add comprehensive unit-test suite to confirm quote values are identical to contract results
- More info available in quote - endTickIndex, sqrtPrice, feeAmount etc...
- Additional swapQuoteFromOutputToken to allow users to ask for a quote (and swap input parameters) based on the desired receive amount
- Bug fix on TickArray calculation that led to the annoying 0x1787 (InvalidTickArraySequence) error
- Addresses all errors in the old-swap quote where it fails to traverse tick-arrays in many cases
- Bug fix on WhirlpoolClient.swap where it incorrectly uses the quote.estimated values rather than the user defined tokenAmount value
2022-07-15 09:49:21 -04:00
meep 5798af2e51
Update comments and re-run yarn docs (#33) 2022-06-29 17:16:01 -04:00
Otto Cheung 266241f99b v0.3.1 2022-06-29 16:18:54 -04:00
meep b922062ccb
Change param ordering for Position's resolveATA (#32)
- Change parameter ordering for resolveATA as it is the most important parameter
- Default resolveATA to true. Power users who do not want to ping RPC constantly can manually turn it off
- Fix up some comments
2022-06-29 15:51:18 -04:00
meep 4416732e33
Add resolveATA option for Position's increase_liquidity (#31)
- Add an option to auto-generate ATA to perform increase_liquidity for Whirlpool's position class
2022-06-29 15:22:14 -04:00
Otto Cheung 537306c096 v0.2.3 2022-06-21 11:36:09 -05:00
Otto Cheung 3bcd4ee391 upgrade common-sdk to 0.0.7 2022-06-21 10:52:56 -05:00
meep a3ee117669
Upgrade initTickArrayForTicks for WhirlpoolClient (#28)
- Method will auto-check which tick-array requires initialization
- Will generate a list of initTickArray Ix for a transaction
- Modify test to send initTickArray + openPosition together
2022-06-21 10:51:18 -05:00
Otto Cheung dfcda482ba v0.2.2 2022-06-13 16:26:54 -07:00
meep 7c8dce249e
Add PoolUtil swap direction & token type util functions (#27)
Add util functions to PoolUtil to help identify swap direction & token A/B for token mints
2022-06-13 16:24:03 -07:00
Otto Cheung 09ddd60a34 Revert unexpected PoolUtil commits 2022-06-13 16:20:16 -07:00
Otto Cheung 076b1fc49a add return types 2022-06-13 16:17:02 -07:00
Otto Cheung 2feb023309 Revert "rename the old swapdirection in swap-quote"
This reverts commit 479acf26a2.
2022-06-13 10:50:50 -07:00
Otto Cheung 479acf26a2 rename the old swapdirection in swap-quote 2022-06-13 10:45:30 -07:00
Otto Cheung efa9daa623 add tests 2022-06-13 10:31:20 -07:00
Otto Cheung 8f387e52c2 revisions 2022-06-13 10:11:33 -07:00
Otto Cheung 0e0ff71fae additional poolutil changes 2022-06-10 12:32:56 -07:00
Otto Cheung bd7c2abd44 v0.2.1 2022-06-08 21:15:15 -07:00
Otto Cheung 34040c0645 v0.2.0 2022-06-08 20:07:59 -07:00
meep a266831d7c
[v0.2.0] Refactor swapQuote functions (#20) (#25)
- Refactor swapQuoteByInputToken as a convenience method to help users fetch the necessary information to perform the swap quote
- Add swapQuoteWithParams for the more advanced users who have previously fetched the data they need to perform the swap quote
2022-06-08 19:49:45 -07:00
meep f888d1cf20
[v0.2.0] Improve increase/decrease liquidity functions for SDK (#16)
- Add support for auto-resolving ATA accounts prior for decrease liquidity ix
- Removed sourceWallet support for increase_liquidity ix
- Add separate funder/payer support for Whirlpool/Position increase/decrease liquidity functions
- Add tests to verify functions work as intended
2022-06-08 19:36:48 -07:00
Otto Cheung efe85aa44d v0.1.7 2022-06-07 17:38:54 -07:00
Sohrab 1479717b73
fix(token): remove double clone()ing from CPI calls (#11) 2022-06-07 13:44:26 -07:00
tmoc e94d6a6314
Adding toBaseQuoteOrder method to pool-utils (#21)
* Adding toBaseQuoteOrder method to pool-utils and test

* Moving function to PoolUtil namespace

* Updating test to use PoolUtil namespace
2022-06-07 13:45:32 -04:00
tmoc 451a04040b
Variable name consistency in lib.rs and swap.rs. Regenerating IDL to pick up argument name change (#24) 2022-06-07 12:18:14 -04:00
meep c881abcc8b
Modify IncreaseLiquidity quote to use Address (#15) 2022-06-07 08:23:19 -07:00
meep 101307aa7d
update Cargo.toml to use new anchor sources (#23) 2022-06-07 08:22:20 -07:00
meep 49c8dd7c09
Fix build errors for increase/decrease liquidity Ix (#19)
Add new Increase/DecreaseLiquidityQuote type to add a layer of separation between Params and Quote
2022-06-07 08:22:01 -07:00
Jabur b4b976b802
Update anchor sources to git (#22)
Update anchor sources to git as the ones from cargo were yanked and people can't import it or face a build error.
2022-06-04 11:29:37 -07:00
meep 3d1db67b30
Add more helper classes for WhirlpoolClient classes (#18)
- Add getAddress for Whirlpool & Position helper class
- Add getFetcher for WhirlpoolClient helper class
2022-05-27 11:19:20 -07:00
meep 72666c9153
Add optional refresh parameter for whirlpoolclient (#17) 2022-05-26 10:00:01 -07:00
Otto Cheung 0ea0bb2d53 v0.1.6 2022-05-23 15:01:38 -07:00
Otto Cheung 3bef76527d v0.1.5 2022-05-23 15:00:48 -07:00
yugure 739268024c
Update whirlpool-client-impl.ts (#14)
* Fix incorrect fetch of mintA instead of mintB
2022-05-23 15:00:02 -07:00
Phil Chen f79dde5570
Add token estimates for liquidity quotes, group token resolution (#12)
- Add tokenEst to the increase/decrease liquidity quotes
- Add group token resolution to minimize RPC calls when resolving ATAs
2022-05-23 09:49:08 -07:00
meep f3f0ce24e7
Fix incorrect imports in the SDK (#13)
- Fix incorrect import for ZERO in decrease_liquidity_quote
- Fix incorrect toTx import in position_management.test.ts
- Confirmed that there are no other /sdk dependencies here
2022-05-23 09:27:15 -07:00
meep 15ccea3fec
Update package json with repository data (#10) 2022-05-13 10:22:44 -07:00
meep c0b7afc2ca
Update README.md (#8)
* Add Orca Development Portal URL
2022-05-13 08:58:54 -07:00
meep cb31d3c5b2
Update package license to Apache 2.0 (#9)
- Update package license to Apache 2.0
- Published v0.1.3
2022-05-13 08:58:23 -07:00
meep 5e800f24fb
Expose toTx function and rerun docs (#6)
- expose helper fn toTx function to help convert ix to transaction-builder
2022-05-12 10:47:00 -07:00
meep 4ed3036586
Add Orca Whirlpools constants (#7)
- Add Orca's Whirlpool program and WhirlpoolsConfig keys
2022-05-12 10:46:43 -07:00
meep 6d425a7bd3
Update License to new language (#5) 2022-05-12 08:35:04 -07:00
meep 2aabeb2595
Fix TypeDoc reference links (#4) 2022-05-11 09:22:12 -07:00
meep 8ab2e92313
Open Source Package Readiness (#3)
- License change to Apache 2.0
- Typedoc generation & path modification
- Add Typedoc & missing documentation on public methods
- Update package name to "@orca-so/whirlpools-sdk" and "0.1.0"
2022-05-09 11:09:52 -07:00
meep 1d7b482cbd
Refactor SDK and add formal documentation (#2)
- Add Typedoc integration to SDK
- Reorganize and finalize SDK structure
- Add documentation and categorize SDK public items (not all)
- Port quotes over from orca-sdk and provide sync options
- Port all utils over from orca-sdk and reorganize them into cleaner buckets
- Update test structure for integration tests and SDK tests
- Update README.md
- Add WhirlpoolClient to help construct the more complicated transactions
- Remove WhirlpoolIx Instruction's dependency on Transaction
2022-05-09 10:04:47 -07:00
meep 951f75d543
Update README.md 2022-05-02 20:40:57 -07:00
meep c55588a6ea
Open Source commit for Orca Whirlpools (#1) 2022-05-02 20:32:00 -07:00