@sonarwatch/portfolio-plugins 0.14.18 → 0.14.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/CHANGELOG.md +1664 -1656
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/drift-market-maker-vault/constants.d.ts +5 -1
  6. package/src/plugins/drift-market-maker-vault/constants.js +25 -4
  7. package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
  8. package/src/plugins/drift-market-maker-vault/depositsFetcher.js +1 -1
  9. package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
  10. package/src/plugins/drift-market-maker-vault/index.js +6 -1
  11. package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
  12. package/src/plugins/drift-market-maker-vault/vaultsJob.js +1 -1
  13. package/src/plugins/drift-market-maker-vault/vaultsJob.js.map +1 -1
  14. package/src/plugins/elixir/positionsFetcher.js +1 -1
  15. package/src/plugins/elixir/positionsFetcher.js.map +1 -1
  16. package/src/plugins/sushiswap/helpers.js +24 -24
  17. package/src/plugins/uniswap-v2/helpers.js +22 -22
  18. package/src/plugins/vaultka/constants.d.ts +2 -1
  19. package/src/plugins/vaultka/constants.js +36 -7
  20. package/src/plugins/vaultka/constants.js.map +1 -1
  21. package/src/plugins/vaultka/strategyFetcher.js +19 -9
  22. package/src/plugins/vaultka/strategyFetcher.js.map +1 -1
  23. package/src/plugins/vaultka/strategyJob.js +1 -2
  24. package/src/plugins/vaultka/strategyJob.js.map +1 -1
  25. package/src/plugins/vaultka/structs.d.ts +48 -3
  26. package/src/plugins/vaultka/structs.js +46 -3
  27. package/src/plugins/vaultka/structs.js.map +1 -1
  28. package/src/plugins/vaultka/types.d.ts +7 -0
  29. package/src/plugins/vaultka/types.js +3 -0
  30. package/src/plugins/vaultka/types.js.map +1 -0
  31. package/src/plugins/zeta/airdropFetcher.js +14 -14
  32. package/src/utils/sei/constants.js +8 -8
  33. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.strategyStruct = exports.positionInfoStruct = exports.lendingStruct = exports.userInfoStruct = void 0;
3
+ exports.lstStrategyStruct = exports.lstPositionInfoStruct = exports.strategyStruct = exports.positionInfoStruct = exports.lendingStruct = exports.userInfoStruct = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../utils/solana");
@@ -25,7 +25,7 @@ exports.positionInfoStruct = new beet_1.BeetStruct([
25
25
  ['amount', solana_1.u64],
26
26
  ['pos_id', solana_1.u64],
27
27
  ['user', beet_solana_1.publicKey],
28
- ['leverage', beet_1.u8],
28
+ ['leverageNum', beet_1.u8],
29
29
  ['closed', beet_1.bool],
30
30
  ['liquidated', beet_1.bool],
31
31
  ['leverage_amount', solana_1.u64],
@@ -51,8 +51,51 @@ exports.strategyStruct = new beet_1.BeetStruct([
51
51
  ['mfee_percent', solana_1.u64],
52
52
  ['usdt_usd_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
53
53
  ['jlp_sol_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
54
- ['token_mint', beet_solana_1.publicKey],
54
+ ['collateral_mint', beet_solana_1.publicKey],
55
55
  ['keeper_fees', solana_1.u64],
56
+ ['borrow_mint', beet_solana_1.publicKey],
57
+ ], (args) => args);
58
+ exports.lstPositionInfoStruct = new beet_1.BeetStruct([
59
+ ['buffer', (0, solana_1.blob)(8)],
60
+ ['amount', solana_1.u64],
61
+ ['pos_id', solana_1.u64],
62
+ ['user', beet_solana_1.publicKey],
63
+ ['leverage', solana_1.u64],
64
+ ['closed', beet_1.bool],
65
+ ['liquidated', beet_1.bool],
66
+ ['leverage_amount', solana_1.u64],
67
+ ['is_in_deposit_request', beet_1.bool],
68
+ ['is_in_withdraw_request', beet_1.bool],
69
+ ['position_amount', solana_1.u64],
70
+ ['to_be_liquidated', beet_1.bool],
71
+ ['deposit_keeper_fee_paid', solana_1.u64],
72
+ ['withdraw_keeper_fee_paid', solana_1.u64],
73
+ ['open_timestamp', solana_1.i64],
74
+ ['close_timestamp', solana_1.i64],
75
+ ['sol_price_open', solana_1.u128],
76
+ ['sol_price_close', solana_1.u128],
77
+ ['close_received_sol_amount', solana_1.u64],
78
+ ['expected_amount_out_lst', solana_1.u64],
79
+ ['expected_amount_out_sol', solana_1.u64],
80
+ ], (args) => args);
81
+ exports.lstStrategyStruct = new beet_1.BeetStruct([
82
+ ['buffer', (0, solana_1.blob)(8)],
83
+ ['keeper', beet_solana_1.publicKey],
84
+ ['keeper_ata', beet_solana_1.publicKey],
85
+ ['next_position_id', solana_1.u64],
86
+ ['dtv_limit', solana_1.u64],
87
+ ['leverage_limit', solana_1.u64],
88
+ ['fixed_fee_split', solana_1.u64],
89
+ ['mfee_percent', solana_1.u64],
90
+ ['sol_usd_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
91
+ ['lst_feed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
56
92
  ['collateral_mint', beet_solana_1.publicKey],
93
+ ['keeper_fees', solana_1.u64],
94
+ ['lst_price', solana_1.u64],
95
+ ['is_manual_price_update', beet_1.bool],
96
+ ['slippage_control', solana_1.u64],
97
+ ['lst_price_control_slippage', solana_1.u64],
98
+ ['admin', beet_solana_1.publicKey],
99
+ ['maturity_time', solana_1.i64],
57
100
  ], (args) => args);
58
101
  //# sourceMappingURL=structs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AAGnC,kEAA6D;AAC7D,+CAA0D;AAO7C,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;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C,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,eAAe,EAAE,YAAG,CAAC;CACvB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { BeetStruct } from '@metaplex-foundation/beet';
2
+ import { LstPositionInfo, LstStrategy, PositionInfo, Strategy } from './structs';
3
+ export type StrategyInfo = {
4
+ pubkey: string;
5
+ strategyStruct: BeetStruct<Strategy | LstStrategy>;
6
+ positionInfoStruct: BeetStruct<PositionInfo | LstPositionInfo>;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/types.ts"],"names":[],"mappings":""}
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;