Commit Graph

242 Commits

Author SHA1 Message Date
Maximilian Schneider cc7260914f Bump major version to 2, to match mango program 2021-06-09 11:39:44 -04:00
Tyler cb4741c7d8
Add new client version info to README.md 2021-06-08 10:15:42 -04:00
Tyler Shipe 17440187b1 update to npm to new major release version 2021-06-08 10:10:41 -04:00
Tyler Shipe 5bcff496cc Merge branch '5_tokens' into main 2021-06-08 10:09:52 -04:00
dd 9bf82ed3b1 adjusted tokenToDecimals in client.ts to correctly reflect coin_lot_size for SOL/USDC and SRM/USDC 2021-06-05 14:41:08 -04:00
dd e0627fcd34 new mango group with new oracles on mainnet 2021-06-05 12:58:29 -04:00
Maximilian Schneider 03f6c9aee2 Revert "Cex style api (#15)"
This reverts commit 3a2dbc889c.
2021-06-05 10:57:55 -04:00
feierabend654 3a2dbc889c
Cex style api (#15)
* a simple cex style client #14

* add empty line

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* fixes from code review

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* make margin account pk mandatory

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* load attached keypair

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* try actions for yarn test

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* refactor

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* more refactoring

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* export simple client

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* remove testing code

Signed-off-by: feierabend654 <feierabend654@gmail.com>

* detect and throw error

Signed-off-by: feierabend654 <feierabend654@gmail.com>

Co-authored-by: Maximilian Schneider <mail@maximilianschneider.net>
2021-06-05 10:23:20 -04:00
dd 6eaf842b9d Added support for AddMarginAccountInfo instruction but NOT TESTED 2021-06-05 09:46:37 -04:00
Ralfs 48b2fc7cf5 bugfix in ids.json 2021-06-03 16:28:43 +03:00
Ralfs 90ad36361b Updated ids.json for devnet 2021-06-03 13:56:59 +03:00
dd 6164366c55 deployed mango group on mainnet 2021-06-01 17:47:32 -04:00
dd 907e9d7e0c fixed mainnet ids; deployed new mango program id for 5 tokens on mainnet; mango group not yet deployed 2021-06-01 17:27:18 -04:00
Ralfs 19d8c34a17 Merge branch '5_tokens' of github.com:blockworks-foundation/mango-client-ts into 5_tokens 2021-06-01 22:46:27 +03:00
Ralfs bf5e71c272 Updated readme for testing 2021-06-01 22:46:10 +03:00
dd 2fa1557b56 Added forceCancelOrders before a partialLiquidate in tests 2021-06-01 09:51:58 -04:00
Ralfs e6f273410d Test social loss with 1 borrow 2021-06-01 16:14:29 +03:00
Ralfs 6952e68b82 Updated tests to be support more options 2021-06-01 00:04:13 +03:00
dd 87d09b0fa0 changed ids.json and uploaded new program 2021-05-31 13:07:38 -04:00
Ralfs b3c05851e2 Updated web3js dep 2021-05-25 19:12:11 +03:00
Riordan Panayides 1985bf60be Merge branch '5_tokens' of github.com:blockworks-foundation/mango-client-ts into 5_tokens 2021-05-24 22:32:04 +01:00
Riordan Panayides dc52a4b151 Fix padding length 2021-05-24 22:32:02 +01:00
Ralfs c1503e9b1d tsconfig path fix #3 2021-05-24 23:19:12 +03:00
Ralfs 68be4694a9 tsconfig path fix #2 2021-05-24 23:15:46 +03:00
Ralfs 80f7e5c826 tsconfig path fix 2021-05-24 21:54:37 +03:00
Ralfs e4acf7bec2 Separate tsconfig for tests and prod 2021-05-24 21:49:48 +03:00
Ralfs 1323c352ac Added tests 2021-05-24 20:30:37 +03:00
Ralfs ed129179de Added same group to mainnet to avoid errors on ui 2021-05-24 12:17:03 +03:00
Ralfs 5b50ab5ea1 Add USDC MangoGroup 2021-05-24 12:12:13 +03:00
Riordan Panayides 86788e2943 Fix type 2021-05-22 13:57:53 +01:00
Riordan Panayides 85e674385e Add function to get token decimals by index 2021-05-22 13:54:53 +01:00
Riordan Panayides 8236f057e4 Merge branch '5_tokens' of github.com:blockworks-foundation/mango-client-ts into 5_tokens 2021-05-20 21:49:05 +01:00
Riordan Panayides a51ac2a293 increase marginaccount padding 2021-05-20 21:49:00 +01:00
Ralfs e4d2998912 Merge branch '5_tokens' of github.com:blockworks-foundation/mango-client-ts into 5_tokens 2021-05-20 23:35:16 +03:00
Ralfs 6e5432ce87 Placed the new group ids in mainnet to avoid errors on ui 2021-05-20 23:34:49 +03:00
Riordan Panayides 90b5a0a2c0 add hasBorrows to marginaccount layout, add function to get all accounts with borrows 2021-05-20 21:25:31 +01:00
Riordan Panayides 3e1130c0c4 Add new token decimals, get token symbols from serum 2021-05-20 21:02:51 +01:00
Ralfs 0f47d83101 Updated ids and layout 2021-05-20 21:44:11 +03:00
Maximilian Schneider 0a528077e7
maintenance (#13)
* add commitment arg to getMultipleAccounts
* upgrade dependencies
* use sequence number to continuosly read out event queue ring buffer
* add test for market order
* version 0.1.19
2021-05-13 14:32:38 +03:00
Tyler Shipe d03fcdf0fe bump pkg version for new mainnet mango group 2021-04-30 11:25:01 -04:00
dafyddd 7dc12b8b2d
Merge pull request #11 from blockworks-foundation/reusable_srm_vault_ids
Implements the ids of the new reusable SRM vault
2021-04-30 11:13:58 -04:00
Maximilian Schneider bfb6f89952 add new ids for SOL/SRM/USDT 2021-04-30 14:50:28 +00:00
Ralfs 5c360a644a Implements the ids of the new reusable SRM vault 2021-04-30 16:52:41 +03:00
Tyler Shipe 47ad73f568 bump version 2021-04-29 17:45:44 -04:00
Tyler Shipe 2e30ca4824 remove rounding in deposit and borrow function 2021-04-29 17:22:31 -04:00
Ralfs 475b5cf30b
Add SOL and SRM to mainnet ids (#10)
* added SOL and SRM oracles to mainnet ids
* Added SRM/USDT spot market address
* remove unused USDC markets

Co-authored-by: Maximilian Schneider <mail@maximilianschneider.net>
2021-04-28 14:57:20 +03:00
Maximilian Schneider 4f120a56f7
Merge pull request #9 from lagzda/sol_srm_usdt_group
add SOL_SRM_USDT & BTC_ETH_USDT MangoGroup to devnet
2021-04-27 17:42:23 +03:00
Ralfs 8db1458dbe Added new BTC_ETH_USDT MangoGroup 2021-04-27 17:38:40 +03:00
Ralfs f371dde5c7 added SOL_SRM_USDT mango group 2021-04-27 10:53:05 +03:00
dd 87222de559 changed interest rate vars OPTIMAL_RATE and MAX_RATE 2021-04-26 14:11:14 -04:00