@sonarwatch/portfolio-plugins 0.14.18 → 0.14.19

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.14.19](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.18...plugins-0.14.19) (2024-10-31)
6
+
7
+
8
+
5
9
  ## [0.14.18](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.17...plugins-0.14.18) (2024-10-30)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.18",
3
+ "version": "0.14.19",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -108,7 +108,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
108
108
  ? Number(a.pending) / Math.pow(10, tokenPrice.decimals)
109
109
  : undefined;
110
110
  if (pendingAmount) {
111
- assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, pendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice, undefined, {}));
111
+ assets.push((0, tokenPriceToAssetToken_1.default)(a.coinType, pendingAmount, portfolio_core_1.NetworkId.sui, tokenPrice, undefined, { isClaimable: true }));
112
112
  yields.push({
113
113
  apr: 0,
114
114
  apy: 0,
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAWoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,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CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,EAAE,WAAW,EAAE;gBACrB,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAWoC;AAGpC,2CAMqB;AAErB,iDAAmD;AACnD,iFAA8E;AAE9E,qGAA6E;AAC7E,uCAGmB;AAEnB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAClD,KAAK,CAAC,OAAO,CAA0B,qBAAS,EAAE;YAChD,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,KAAK,CAAC,OAAO,CAAa,wBAAY,EAAE;YACtC,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,YAAY,IAAI,CAAC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IACH,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  import { PublicKey } from '@solana/web3.js';
3
+ import { StrategyInfo } from './types';
3
4
  export declare const platformId = "vaultka";
4
5
  export declare const platform: Platform;
5
6
  export declare const lendingsCacheKey = "lendings";
6
7
  export declare const lendingProgramIds: PublicKey[];
7
8
  export declare const strategiesCacheKey = "strategies";
8
- export declare const strategies: string[];
9
+ export declare const strategies: StrategyInfo[];
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.strategies = exports.strategiesCacheKey = exports.lendingProgramIds = exports.lendingsCacheKey = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
+ const structs_1 = require("./structs");
5
6
  exports.platformId = 'vaultka';
6
7
  exports.platform = {
7
8
  id: exports.platformId,
@@ -20,12 +21,40 @@ exports.lendingProgramIds = [
20
21
  ];
21
22
  exports.strategiesCacheKey = `strategies`;
22
23
  exports.strategies = [
23
- '6UBsNdYq3MEao1m9NXQD1VEmXvptUXhfMwdHANGAo4bs',
24
- 'B3FS1X2PZPBrtBZiyAN9oqABnu3o5YWwdY5ioqoVh64P',
25
- 'SkFLfp7eSRsan13dEUZSVzMBj3vdyZnhaasFKQTzuiE',
26
- '6VwarrrqWVWAmZtNdgGafeyoXD3SsspKxuxkZVarZqTA',
27
- '9p5Sc5SvR8QpJCQV3U4q6zVUTupr4Tr9Jmf48sbcSjtX',
28
- 'FRyGij76xTvAg1nPPTaXHfa3QxUfZuKARuAyAaMyoLPo',
29
- 'A7PDwCJ3qcdVoZLqq7wHAwMq9yEKZU2vFx7Y9qbZ1dKJ',
24
+ {
25
+ pubkey: '6UBsNdYq3MEao1m9NXQD1VEmXvptUXhfMwdHANGAo4bs',
26
+ strategyStruct: structs_1.strategyStruct,
27
+ positionInfoStruct: structs_1.positionInfoStruct,
28
+ },
29
+ {
30
+ pubkey: 'B3FS1X2PZPBrtBZiyAN9oqABnu3o5YWwdY5ioqoVh64P',
31
+ strategyStruct: structs_1.strategyStruct,
32
+ positionInfoStruct: structs_1.positionInfoStruct,
33
+ },
34
+ {
35
+ pubkey: 'SkFLfp7eSRsan13dEUZSVzMBj3vdyZnhaasFKQTzuiE',
36
+ strategyStruct: structs_1.strategyStruct,
37
+ positionInfoStruct: structs_1.positionInfoStruct,
38
+ },
39
+ {
40
+ pubkey: '6VwarrrqWVWAmZtNdgGafeyoXD3SsspKxuxkZVarZqTA',
41
+ strategyStruct: structs_1.strategyStruct,
42
+ positionInfoStruct: structs_1.positionInfoStruct,
43
+ },
44
+ {
45
+ pubkey: '9p5Sc5SvR8QpJCQV3U4q6zVUTupr4Tr9Jmf48sbcSjtX',
46
+ strategyStruct: structs_1.lstStrategyStruct,
47
+ positionInfoStruct: structs_1.lstPositionInfoStruct,
48
+ },
49
+ {
50
+ pubkey: 'FRyGij76xTvAg1nPPTaXHfa3QxUfZuKARuAyAaMyoLPo',
51
+ strategyStruct: structs_1.lstStrategyStruct,
52
+ positionInfoStruct: structs_1.lstPositionInfoStruct,
53
+ },
54
+ {
55
+ pubkey: 'A7PDwCJ3qcdVoZLqq7wHAwMq9yEKZU2vFx7Y9qbZ1dKJ',
56
+ strategyStruct: structs_1.lstStrategyStruct,
57
+ positionInfoStruct: structs_1.lstPositionInfoStruct,
58
+ },
30
59
  ];
31
60
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GA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CAAC;CAC9D,CAAC;AAEW,QAAA,kBAAkB,GAAG,YAAY,CAAC;AAElC,QAAA,UAAU,GAAmB;IACxC;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,6CAA6C;QACrD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAd,wBAAc;QACd,kBAAkB,EAAlB,4BAAkB;KACnB;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;IACD;QACE,MAAM,EAAE,8CAA8C;QACtD,cAAc,EAAE,2BAAiB;QACjC,kBAAkB,EAAE,+BAAqB;KAC1C;CACF,CAAC"}
@@ -15,10 +15,9 @@ const constants_1 = require("./constants");
15
15
  const clients_1 = require("../../utils/clients");
16
16
  const solana_1 = require("../../utils/solana");
17
17
  const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
18
- const structs_1 = require("./structs");
19
18
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
20
19
  const connection = (0, clients_1.getClientSolana)();
21
- const positionInfos = yield Promise.all(constants_1.strategies.map((strategy) => (0, solana_1.getParsedProgramAccounts)(connection, structs_1.positionInfoStruct, new web3_js_1.PublicKey(strategy), [
20
+ const positionInfos = yield Promise.all(constants_1.strategies.map((strategy) => (0, solana_1.getParsedProgramAccounts)(connection, strategy.positionInfoStruct, new web3_js_1.PublicKey(strategy.pubkey), [
22
21
  {
23
22
  memcmp: {
24
23
  offset: 24,
@@ -36,24 +35,35 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
36
35
  return [];
37
36
  const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
38
37
  positionInfos.forEach((positionInfo, i) => {
39
- if (positionInfo[i] &&
40
- !positionInfo[i].liquidated &&
41
- !positionInfo[i].closed) {
38
+ if (positionInfo[0] &&
39
+ !positionInfo[0].liquidated &&
40
+ !positionInfo[0].closed) {
41
+ const strategy = strategiesInfo[i];
42
42
  const element = elementRegistry.addElementBorrowlend({
43
43
  label: 'Leverage',
44
44
  });
45
+ let borrowMint;
46
+ if (isLstStrategy(strategy)) {
47
+ borrowMint = strategy.collateral_mint;
48
+ }
49
+ else {
50
+ borrowMint = strategy.borrow_mint;
51
+ }
45
52
  element.addSuppliedAsset({
46
- address: strategiesInfo[i].token_mint,
47
- amount: positionInfo[i].position_amount,
53
+ address: strategy.collateral_mint,
54
+ amount: positionInfo[0].position_amount,
48
55
  });
49
56
  element.addBorrowedAsset({
50
- address: strategiesInfo[i].collateral_mint,
51
- amount: positionInfo[i].leverage_amount,
57
+ address: borrowMint,
58
+ amount: positionInfo[0].leverage_amount,
52
59
  });
53
60
  }
54
61
  });
55
62
  return elementRegistry.getElements(cache);
56
63
  });
64
+ function isLstStrategy(strategy) {
65
+ return !('borrow_mint' in strategy);
66
+ }
57
67
  const fetcher = {
58
68
  id: `${constants_1.platformId}-strategy`,
59
69
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAC7E,uCAAuE;AAEvE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,E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C,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;YACH,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,eAAe;gBAC1C,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAQ7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACrC,sBAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,IAAA,iCAAwB,EACtB,UAAU,EACV,QAAQ,CAAC,kBAAkB,EAC3B,IAAI,mBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC9B;QACE;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;KACF,CACF,CACF,CACF,CAAC;IAEF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,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AC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,SAAS,aAAa,CACpB,QAAgC;IAEhC,OAAO,CAAC,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -12,12 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
13
  const web3_js_1 = require("@solana/web3.js");
14
14
  const constants_1 = require("./constants");
15
- const structs_1 = require("./structs");
16
15
  const clients_1 = require("../../utils/clients");
17
16
  const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
18
17
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
18
  const connection = (0, clients_1.getClientSolana)();
20
- const strategys = yield Promise.all(constants_1.strategies.map((strategy) => (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.strategyStruct, web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('STRATEGY')], new web3_js_1.PublicKey(strategy))[0])));
19
+ const strategys = yield Promise.all(constants_1.strategies.map((strategy) => (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, strategy.strategyStruct, web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('STRATEGY')], new web3_js_1.PublicKey(strategy.pubkey))[0])));
21
20
  yield cache.setItem(constants_1.strategiesCacheKey, strategys, {
22
21
  prefix: constants_1.platformId,
23
22
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"strategyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAyE;AACzE,uCAA2C;AAC3C,iDAAsD;AACtD,kFAA+E;AAE/E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CACjC,sBAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,IAAA,2CAAoB,EAClB,UAAU,EACV,wBAAc,EACd,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EACzB,IAAI,mBAAS,CAAC,QAAQ,CAAC,CACxB,CAAC,CAAC,CAAC,CACL,CACF,CACF,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,8BAAkB,EAAE,SAAS,EAAE;QACjD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"strategyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAyE;AACzE,iDAAsD;AACtD,kFAA+E;AAE/E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CACjC,sBAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,IAAA,2CAAoB,EAClB,UAAU,EACV,QAAQ,CAAC,cAAc,EACvB,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EACzB,IAAI,mBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC/B,CAAC,CAAC,CAAC,CACL,CACF,CACF,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,8BAAkB,EAAE,SAAS,EAAE;QACjD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -25,7 +25,7 @@ export type PositionInfo = {
25
25
  amount: BigNumber;
26
26
  pos_id: BigNumber;
27
27
  user: PublicKey;
28
- leverage: number;
28
+ leverageNum: number;
29
29
  closed: boolean;
30
30
  liquidated: boolean;
31
31
  leverage_amount: BigNumber;
@@ -52,8 +52,53 @@ export type Strategy = {
52
52
  mfee_percent: BigNumber;
53
53
  usdt_usd_feed: number[];
54
54
  jlp_sol_feed: number[];
55
- token_mint: PublicKey;
56
- keeper_fees: BigNumber;
57
55
  collateral_mint: PublicKey;
56
+ keeper_fees: BigNumber;
57
+ borrow_mint: PublicKey;
58
58
  };
59
59
  export declare const strategyStruct: BeetStruct<Strategy, Partial<Strategy>>;
60
+ export type LstPositionInfo = {
61
+ buffer: Buffer;
62
+ amount: BigNumber;
63
+ pos_id: BigNumber;
64
+ user: PublicKey;
65
+ leverage: BigNumber;
66
+ closed: boolean;
67
+ liquidated: boolean;
68
+ leverage_amount: BigNumber;
69
+ is_in_deposit_request: boolean;
70
+ is_in_withdraw_request: boolean;
71
+ position_amount: BigNumber;
72
+ to_be_liquidated: boolean;
73
+ deposit_keeper_fee_paid: BigNumber;
74
+ withdraw_keeper_fee_paid: BigNumber;
75
+ open_timestamp: BigNumber;
76
+ close_timestamp: BigNumber;
77
+ sol_price_open: BigNumber;
78
+ sol_price_close: BigNumber;
79
+ close_received_sol_amount: BigNumber;
80
+ expected_amount_out_lst: BigNumber;
81
+ expected_amount_out_sol: BigNumber;
82
+ };
83
+ export declare const lstPositionInfoStruct: BeetStruct<LstPositionInfo, Partial<LstPositionInfo>>;
84
+ export type LstStrategy = {
85
+ buffer: Buffer;
86
+ keeper: PublicKey;
87
+ keeper_ata: PublicKey;
88
+ next_position_id: BigNumber;
89
+ dtv_limit: BigNumber;
90
+ leverage_limit: BigNumber;
91
+ fixed_fee_split: BigNumber;
92
+ mfee_percent: BigNumber;
93
+ sol_usd_feed: number[];
94
+ lst_feed: number[];
95
+ collateral_mint: PublicKey;
96
+ keeper_fees: BigNumber;
97
+ lst_price: BigNumber;
98
+ is_manual_price_update: boolean;
99
+ slippage_control: BigNumber;
100
+ lst_price_control_slippage: BigNumber;
101
+ admin: PublicKey;
102
+ maturity_time: BigNumber;
103
+ };
104
+ export declare const lstStrategyStruct: BeetStruct<LstStrategy, Partial<LstStrategy>>;
@@ -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;IACnB,CAAC,QAAQ,EAAE,aAAI,CAAC;CACjB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAeW,QAAA,aAAa,GAAG,IAAI,iBAAU,CACzC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,iBAAiB,EAAE,aAAI,CAAC;IACzB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,cAAc,EAAE,aAAI,CAAC;IACtB,CAAC,sBAAsB,EAAE,YAAG,CAAC;IAC7B,CAAC,oBAAoB,EAAE,uBAAS,CAAC;IACjC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,2BAA2B,EAAE,uBAAS,CAAC;IACxC,CAAC,MAAM,EAAE,uBAAS,CAAC;CACpB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAe,CAC1B,CAAC;AAuBW,QAAA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S,CAAC;IACrB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC,iBAAiB,EAAE,uBAAS,CAAC;IAC9B,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,wBAAwB,EAAE,WAAI,CAAC;IAChC,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,4BAA4B,EAAE,YAAG,CAAC;IACnC,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":""}