@sonarwatch/portfolio-plugins 0.14.163 → 0.14.165

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/package.json +1 -3
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/citrus/constants.d.ts +0 -2
  6. package/src/plugins/citrus/constants.js +1 -7
  7. package/src/plugins/citrus/constants.js.map +1 -1
  8. package/src/plugins/citrus/loansFetcher.js +25 -16
  9. package/src/plugins/citrus/loansFetcher.js.map +1 -1
  10. package/src/plugins/citrus/structs.d.ts +59 -0
  11. package/src/plugins/citrus/structs.js +59 -0
  12. package/src/plugins/citrus/structs.js.map +1 -0
  13. package/src/plugins/citrus/types.d.ts +0 -48
  14. package/src/plugins/divvy/housePoolFetcher.js +0 -1
  15. package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
  16. package/src/plugins/drift/perpHelpers/idls.d.ts +0 -2
  17. package/src/plugins/drift/perpHelpers/idls.js +1 -6
  18. package/src/plugins/drift/perpHelpers/idls.js.map +1 -1
  19. package/src/plugins/drift/perpHelpers/pythPull.js +9 -16
  20. package/src/plugins/drift/perpHelpers/pythPull.js.map +1 -1
  21. package/src/plugins/famousfoxfederation/constants.d.ts +0 -3
  22. package/src/plugins/famousfoxfederation/constants.js +1 -13
  23. package/src/plugins/famousfoxfederation/constants.js.map +1 -1
  24. package/src/plugins/famousfoxfederation/helpers.d.ts +1 -1
  25. package/src/plugins/famousfoxfederation/stakingFetcher.js +6 -11
  26. package/src/plugins/famousfoxfederation/stakingFetcher.js.map +1 -1
  27. package/src/plugins/famousfoxfederation/stakingJob.js +2 -1
  28. package/src/plugins/famousfoxfederation/stakingJob.js.map +1 -1
  29. package/src/plugins/famousfoxfederation/structs.d.ts +40 -0
  30. package/src/plugins/famousfoxfederation/structs.js +39 -0
  31. package/src/plugins/famousfoxfederation/structs.js.map +1 -0
  32. package/src/plugins/famousfoxfederation/tokenMarketFetcher.js +7 -10
  33. package/src/plugins/famousfoxfederation/tokenMarketFetcher.js.map +1 -1
  34. package/src/plugins/futarchy/constants.d.ts +2 -0
  35. package/src/plugins/futarchy/constants.js +33 -1
  36. package/src/plugins/futarchy/constants.js.map +1 -1
  37. package/src/plugins/futarchy/daosJob.js +18 -42
  38. package/src/plugins/futarchy/daosJob.js.map +1 -1
  39. package/src/plugins/jupiter/constants.d.ts +8 -0
  40. package/src/plugins/jupiter/constants.js +10 -0
  41. package/src/plugins/jupiter/constants.js.map +1 -0
  42. package/src/plugins/jupiter/governance/asrAirdropFetcher.js +2 -1
  43. package/src/plugins/jupiter/governance/asrAirdropFetcher.js.map +1 -1
  44. package/src/plugins/jupiter/governance/constants.js +9 -9
  45. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  46. package/src/plugins/jupiter/governance/voteFetcher.js +7 -7
  47. package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -1
  48. package/src/plugins/jupiter/helpers.js +3 -2
  49. package/src/plugins/jupiter/helpers.js.map +1 -1
  50. package/src/plugins/jupiter/launchpad/constants.d.ts +0 -8
  51. package/src/plugins/jupiter/launchpad/constants.js +8 -13
  52. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  53. package/src/plugins/jupiter/pricingJob.js +2 -2
  54. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  55. package/src/plugins/loopscale/loansFetcher.js +1 -1
  56. package/src/plugins/loopscale/loansFetcher.js.map +1 -1
  57. package/src/plugins/loopscale/structs.d.ts +6 -1
  58. package/src/plugins/loopscale/structs.js +7 -1
  59. package/src/plugins/loopscale/structs.js.map +1 -1
  60. package/src/plugins/nirvana/constants.d.ts +11 -0
  61. package/src/plugins/nirvana/constants.js +13 -0
  62. package/src/plugins/nirvana/constants.js.map +1 -0
  63. package/src/plugins/nirvana/depositFetcher.d.ts +3 -0
  64. package/src/plugins/nirvana/depositFetcher.js +64 -0
  65. package/src/plugins/nirvana/depositFetcher.js.map +1 -0
  66. package/src/plugins/nirvana/index.d.ts +4 -0
  67. package/src/plugins/nirvana/index.js +10 -0
  68. package/src/plugins/nirvana/index.js.map +1 -0
  69. package/src/plugins/nirvana/structs.d.ts +47 -0
  70. package/src/plugins/nirvana/structs.js +40 -0
  71. package/src/plugins/nirvana/structs.js.map +1 -0
  72. package/src/plugins/nxfinance/constants.d.ts +0 -4
  73. package/src/plugins/nxfinance/constants.js +1 -19
  74. package/src/plugins/nxfinance/constants.js.map +1 -1
  75. package/src/plugins/nxfinance/helpers.d.ts +6 -5
  76. package/src/plugins/nxfinance/helpers.js +6 -5
  77. package/src/plugins/nxfinance/helpers.js.map +1 -1
  78. package/src/plugins/nxfinance/lendingPoolsJob.js +2 -1
  79. package/src/plugins/nxfinance/lendingPoolsJob.js.map +1 -1
  80. package/src/plugins/nxfinance/positionsFetcher.js +18 -18
  81. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
  82. package/src/plugins/nxfinance/solayerPoolsJob.js +6 -12
  83. package/src/plugins/nxfinance/solayerPoolsJob.js.map +1 -1
  84. package/src/plugins/nxfinance/stakingFetcher.js +3 -2
  85. package/src/plugins/nxfinance/stakingFetcher.js.map +1 -1
  86. package/src/plugins/nxfinance/stakingPoolJob.js +4 -1
  87. package/src/plugins/nxfinance/stakingPoolJob.js.map +1 -1
  88. package/src/plugins/nxfinance/structs.d.ts +156 -0
  89. package/src/plugins/nxfinance/structs.js +143 -0
  90. package/src/plugins/nxfinance/structs.js.map +1 -0
  91. package/src/plugins/nxfinance/types.d.ts +0 -122
  92. package/src/plugins/pumpkin/constants.d.ts +5 -0
  93. package/src/plugins/pumpkin/constants.js +7 -0
  94. package/src/plugins/pumpkin/constants.js.map +1 -0
  95. package/src/plugins/pumpkin/index.d.ts +4 -0
  96. package/src/plugins/pumpkin/index.js +10 -0
  97. package/src/plugins/pumpkin/index.js.map +1 -0
  98. package/src/plugins/pumpkin/stakingFetcher.d.ts +3 -0
  99. package/src/plugins/pumpkin/stakingFetcher.js +47 -0
  100. package/src/plugins/pumpkin/stakingFetcher.js.map +1 -0
  101. package/src/plugins/pumpkin/structs.d.ts +12 -0
  102. package/src/plugins/pumpkin/structs.js +13 -0
  103. package/src/plugins/pumpkin/structs.js.map +1 -0
  104. package/src/plugins/quarry/calculatePositions.d.ts +3 -2
  105. package/src/plugins/quarry/calculatePositions.js +4 -4
  106. package/src/plugins/quarry/calculatePositions.js.map +1 -1
  107. package/src/plugins/quarry/constants.d.ts +0 -5
  108. package/src/plugins/quarry/constants.js +1 -25
  109. package/src/plugins/quarry/constants.js.map +1 -1
  110. package/src/plugins/quarry/getClaimableRewards.d.ts +2 -2
  111. package/src/plugins/quarry/getClaimableRewards.js +3 -2
  112. package/src/plugins/quarry/getClaimableRewards.js.map +1 -1
  113. package/src/plugins/quarry/helpers.d.ts +2 -1
  114. package/src/plugins/quarry/helpers.js.map +1 -1
  115. package/src/plugins/quarry/positionsFetcher.js +17 -5
  116. package/src/plugins/quarry/positionsFetcher.js.map +1 -1
  117. package/src/plugins/quarry/redeemersJob.js +8 -7
  118. package/src/plugins/quarry/redeemersJob.js.map +1 -1
  119. package/src/plugins/quarry/structs.d.ts +59 -0
  120. package/src/plugins/quarry/structs.js +56 -0
  121. package/src/plugins/quarry/structs.js.map +1 -0
  122. package/src/plugins/quarry/types.d.ts +0 -31
  123. package/src/plugins/sanctum/s1AirdropFetcher.js +16 -15
  124. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  125. package/src/plugins/streamflow/constants.d.ts +2 -0
  126. package/src/plugins/streamflow/constants.js +3 -1
  127. package/src/plugins/streamflow/constants.js.map +1 -1
  128. package/src/plugins/streamflow/helpers.d.ts +5 -0
  129. package/src/plugins/streamflow/helpers.js +18 -1
  130. package/src/plugins/streamflow/helpers.js.map +1 -1
  131. package/src/plugins/streamflow/index.js +4 -2
  132. package/src/plugins/streamflow/index.js.map +1 -1
  133. package/src/plugins/streamflow/merkleDistirbutorsJob.d.ts +3 -0
  134. package/src/plugins/streamflow/merkleDistirbutorsJob.js +47 -0
  135. package/src/plugins/streamflow/merkleDistirbutorsJob.js.map +1 -0
  136. package/src/plugins/streamflow/merkleFetcher.d.ts +3 -0
  137. package/src/plugins/streamflow/merkleFetcher.js +64 -0
  138. package/src/plugins/streamflow/merkleFetcher.js.map +1 -0
  139. package/src/plugins/streamflow/structs.d.ts +78 -0
  140. package/src/plugins/streamflow/structs.js +79 -1
  141. package/src/plugins/streamflow/structs.js.map +1 -1
  142. package/src/plugins/streamflow/types.d.ts +4 -0
  143. package/src/plugins/streamflow/vestingFetcher.js +1 -6
  144. package/src/plugins/streamflow/vestingFetcher.js.map +1 -1
  145. package/src/utils/elementbuilder/AssetGenericBuilder.js +1 -3
  146. package/src/utils/elementbuilder/AssetGenericBuilder.js.map +1 -1
  147. package/src/utils/elementbuilder/AssetTokenBuilder.js +3 -3
  148. package/src/utils/elementbuilder/AssetTokenBuilder.js.map +1 -1
  149. package/src/utils/solana/index.d.ts +0 -2
  150. package/src/utils/solana/index.js +0 -2
  151. package/src/utils/solana/index.js.map +1 -1
  152. package/src/utils/solana/pyth/structs.d.ts +12 -11
  153. package/src/utils/solana/pyth/structs.js +16 -12
  154. package/src/utils/solana/pyth/structs.js.map +1 -1
  155. package/src/plugins/citrus/filters.d.ts +0 -4
  156. package/src/plugins/citrus/filters.js +0 -32
  157. package/src/plugins/citrus/filters.js.map +0 -1
  158. package/src/plugins/famousfoxfederation/types.d.ts +0 -25
  159. package/src/plugins/famousfoxfederation/types.js +0 -3
  160. package/src/plugins/famousfoxfederation/types.js.map +0 -1
  161. package/src/plugins/quarry/filters.d.ts +0 -5
  162. package/src/plugins/quarry/filters.js +0 -24
  163. package/src/plugins/quarry/filters.js.map +0 -1
  164. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.d.ts +0 -6
  165. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js +0 -38
  166. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js.map +0 -1
  167. package/src/utils/solana/getAutoParsedProgramAccounts.d.ts +0 -6
  168. package/src/utils/solana/getAutoParsedProgramAccounts.js +0 -37
  169. package/src/utils/solana/getAutoParsedProgramAccounts.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,10 +2,23 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
- ## [0.14.163](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.162...plugins-0.14.163) (2025-03-28)
5
+ ## [0.14.165](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.164...plugins-0.14.165) (2025-04-01)
6
6
 
7
7
 
8
8
 
9
+ ## [0.14.164](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.163...plugins-0.14.164) (2025-03-31)
10
+
11
+
12
+ ### Features
13
+
14
+ * **jupiter:** move jupMint and jupDecimals constants ([99b5c04](https://github.com/sonarwatch/portfolio/commit/99b5c04d38b30f59ca0f2978d3e1111107d29f50))
15
+
16
+
17
+
18
+ ## [0.14.163](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.162...plugins-0.14.163) (2025-03-28)
19
+
20
+
21
+
9
22
  ## [0.14.162](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.161...plugins-0.14.162) (2025-03-27)
10
23
 
11
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.163",
3
+ "version": "0.14.165",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -28,8 +28,6 @@
28
28
  "@sei-js/core": "^3.2.1",
29
29
  "@sei-js/proto": "^3.1.0",
30
30
  "@solana/web3.js": "^1.98.0",
31
- "@solanafm/explorer-kit": "^1.1.3",
32
- "@solanafm/explorer-kit-idls": "^1.1.3",
33
31
  "axios": "^1.7.9",
34
32
  "bignumber.js": "^9.1.2",
35
33
  "bn.js": "^5.2.1",
package/src/index.js CHANGED
@@ -185,6 +185,8 @@ const guano = __importStar(require("./plugins/guano"));
185
185
  const coingecko = __importStar(require("./plugins/coingecko"));
186
186
  const zeus = __importStar(require("./plugins/zeus"));
187
187
  const pumpswap = __importStar(require("./plugins/pumpswap"));
188
+ const pumpkin = __importStar(require("./plugins/pumpkin"));
189
+ const nirvana = __importStar(require("./plugins/nirvana"));
188
190
  var getFetchersByAddressSystem_2 = require("./utils/misc/getFetchersByAddressSystem");
189
191
  Object.defineProperty(exports, "getFetchersByAddressSystem", { enumerable: true, get: function () { return getFetchersByAddressSystem_2.getFetchersByAddressSystem; } });
190
192
  __exportStar(require("./Cache"), exports);
@@ -356,6 +358,8 @@ const modules = [
356
358
  coingecko,
357
359
  zeus,
358
360
  pumpswap,
361
+ pumpkin,
362
+ nirvana,
359
363
  ];
360
364
  // JOBS //
361
365
  exports.jobs = modules
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AAErF,UAAU;AACV,yDAA2C;AAC3C,oEAAsD;AACtD,mEAAqD;AACrD,6DAA+C;AAC/C,6DAA+C;AAC/C,uDAAyC;AACzC,qDAAuC;AACvC,2DAA6C;AAC7C,qDAAuC;AACvC,2DAA6C;AAC7C,uDAAyC;AACzC,yDAA2C;AAC3C,uDAAyC;AACzC,yDAA2C;AAC3C,yDAA2C;AAC3C,qDAAuC;AACvC,sEAAwD;AACxD,yDAA2C;AAC3C,uDAAyC;AACzC,uDAAyC;AACzC,gEAAkD;AAClD,gFAAkE;AAClE,mEAAqD;AACrD,+DAAiD;AACjD,iEAAmD;AACnD,mEAAqD;AACrD,uDAAyC;AACzC,yDAA2C;AAC3C,yDAA2C;AAC3C,qDAAuC;AACvC,2DAA6C;AAC7C,kEAAoD;AACpD,qDAAuC;AACvC,uDAAyC;AACzC,6DAA+C;AAC/C,6DAA+C;AAC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AK;IACL,QAAQ;IACR,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,QAAQ;IACR,KAAK;IACL,KAAK;IACL,KAAK;IACL,SAAS;IACT,IAAI;IACJ,QAAQ;CACT,CAAC;AAEF,UAAU;AACG,QAAA,IAAI,GAAU,OAAO;KAC/B,GAAG,CAAC,CAAC,MAAM,EAAS,EAAE;IACrB,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC,IAAa,CAAC;IAC9B,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;KACD,IAAI,EAAE,CAAC;AAEV,cAAc;AACD,QAAA,QAAQ,GAAc,OAAO;KACvC,GAAG,CAAC,CAAC,MAAM,EAAa,EAAE;IACzB,IAAI,UAAU,IAAI,MAAM,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC,QAAqB,CAAC;IACtC,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;KACD,IAAI,EAAE,CAAC;AACG,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB,OAAO;KACrD,GAAG,CAAC,CAAC,MAAM,EAAoB,EAAE;IAChC,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,eAAmC,CAAC;IACpD,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;KACD,IAAI,EAAE,CAAC;AACG,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AAErF,UAAU;AACV,yDAA2C;AAC3C,oEAAsD;AACtD,mEAAqD;AACrD,6DAA+C;AAC/C,6DAA+C;AAC/C,uDAAyC;AACzC,qDAAuC;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CAAC,MAAM,EAAoB,EAAE;IAChC,IAAI,iBAAiB,IAAI,MAAM,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,eAAmC,CAAC;IACpD,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;KACD,IAAI,EAAE,CAAC;AACG,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -1,11 +1,9 @@
1
1
  /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
3
  import { PublicKey } from '@solana/web3.js';
4
- import { IdlItem } from '@solanafm/explorer-kit-idls';
5
4
  export declare const platformId = "citrus";
6
5
  export declare const collectionsCacheKey = "citrus-collections";
7
6
  export declare const cachePrefix = "citrus";
8
7
  export declare const collectionsApiUrl = "https://citrus.famousfoxes.com/citrus/allCollections";
9
8
  export declare const citrusProgram: PublicKey;
10
9
  export declare const loanDataSize = 464;
11
- export declare const citrusIdlItem: IdlItem;
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.citrusIdlItem = exports.loanDataSize = exports.citrusProgram = exports.collectionsApiUrl = exports.cachePrefix = exports.collectionsCacheKey = exports.platformId = void 0;
3
+ exports.loanDataSize = exports.citrusProgram = exports.collectionsApiUrl = exports.cachePrefix = exports.collectionsCacheKey = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
- const idl_1 = require("./idl");
6
5
  exports.platformId = 'citrus';
7
6
  exports.collectionsCacheKey = `${exports.platformId}-collections`;
8
7
  exports.cachePrefix = `${exports.platformId}`;
9
8
  exports.collectionsApiUrl = 'https://citrus.famousfoxes.com/citrus/allCollections';
10
9
  exports.citrusProgram = new web3_js_1.PublicKey('JCFRaPv7852ESRwJJGRy2mysUMydXZgVVhrMLmExvmVp');
11
10
  exports.loanDataSize = 464;
12
- exports.citrusIdlItem = {
13
- programId: exports.citrusProgram.toString(),
14
- idl: idl_1.CitrusIDL,
15
- idlType: 'anchor',
16
- };
17
11
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,+BAAkC;AAErB,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,mBAAmB,GAAG,GAAG,kBAAU,cAAc,CAAC;AAClD,QAAA,WAAW,GAAG,GAAG,kBAAU,EAAE,CAAC;AAE9B,QAAA,iBAAiB,GAC5B,sDAAsD,CAAC;AAE5C,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,YAAY,GAAG,GAAG,CAAC;AAEnB,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,qBAAa,CAAC,QAAQ,EAAE;IACnC,GAAG,EAAE,eAAS;IACd,OAAO,EAAE,QAAQ;CACP,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,mBAAmB,GAAG,GAAG,kBAAU,cAAc,CAAC;AAClD,QAAA,WAAW,GAAG,GAAG,kBAAU,EAAE,CAAC;AAE9B,QAAA,iBAAiB,GAC5B,sDAAsD,CAAC;AAE5C,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,YAAY,GAAG,GAAG,CAAC"}
@@ -14,25 +14,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const web3_js_1 = require("@solana/web3.js");
17
18
  const constants_1 = require("./constants");
18
19
  const clients_1 = require("../../utils/clients");
19
- const solana_1 = require("../../utils/solana");
20
- const filters_1 = require("./filters");
21
20
  const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
22
21
  const arrayToMap_1 = require("../../utils/misc/arrayToMap");
23
22
  const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
23
+ const structs_1 = require("./structs");
24
+ const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
24
25
  const collectionsMemo = new MemoizedCache_1.MemoizedCache(constants_1.collectionsCacheKey, {
25
26
  prefix: constants_1.cachePrefix,
26
27
  networkId: portfolio_core_1.NetworkId.solana,
27
28
  }, (arr) => (0, arrayToMap_1.arrayToMap)(arr || [], 'id'));
28
29
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
29
30
  const connection = (0, clients_1.getClientSolana)();
30
- const [filterA, filterB] = (0, filters_1.getLoanFilters)(owner);
31
31
  const allAccounts = (yield Promise.all([
32
- (0, solana_1.getAutoParsedProgramAccounts)(connection, constants_1.citrusIdlItem, filterA),
33
- (0, solana_1.getAutoParsedProgramAccounts)(connection, constants_1.citrusIdlItem, filterB),
32
+ ParsedGpa_1.ParsedGpa.build(connection, structs_1.loanStruct, constants_1.citrusProgram)
33
+ .addDataSizeFilter(constants_1.loanDataSize)
34
+ .addFilter('lender', new web3_js_1.PublicKey(owner))
35
+ .run(),
36
+ ParsedGpa_1.ParsedGpa.build(connection, structs_1.loanStruct, constants_1.citrusProgram)
37
+ .addDataSizeFilter(constants_1.loanDataSize)
38
+ .addFilter('borrower', new web3_js_1.PublicKey(owner))
39
+ .run(),
34
40
  ])).flat();
35
- const accounts = allAccounts.filter((acc) => !acc.status.repaid // hide past loans
41
+ const accounts = allAccounts.filter((acc) => acc.status !== structs_1.LoanStatus.Repaid // hide past loans
36
42
  );
37
43
  if (accounts.length === 0)
38
44
  return [];
@@ -46,7 +52,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
46
52
  throw new Error('Sol price not cached');
47
53
  const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
48
54
  accounts.forEach((acc) => {
49
- const collection = collections.get(acc.collectionConfig);
55
+ const collection = collections.get(acc.collectionConfig.toString());
50
56
  if (!collection)
51
57
  return;
52
58
  const element = elementRegistry.addElementBorrowlend({
@@ -54,7 +60,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
54
60
  ref: acc.pubkey,
55
61
  });
56
62
  let mintAsset = null;
57
- if (acc.mint && acc.mint !== '11111111111111111111111111111111') {
63
+ if (acc.mint &&
64
+ acc.mint.toString() !== '11111111111111111111111111111111') {
58
65
  mintAsset = {
59
66
  address: acc.mint,
60
67
  collection: {
@@ -69,18 +76,19 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
69
76
  amount: new bignumber_js_1.default(acc.ltvTerms ? acc.ltvTerms.maxOffer : acc.loanTerms.principal),
70
77
  };
71
78
  let name;
72
- if (acc.lender === owner.toString()) {
79
+ if (acc.lender.toString() === owner.toString()) {
73
80
  // LENDER
74
81
  element.addSuppliedAsset(solAsset);
75
82
  if (mintAsset)
76
83
  element.addBorrowedCollectibleAsset(mintAsset);
77
- if (acc.status.waitingForBorrower) {
84
+ if (acc.status === structs_1.LoanStatus.WaitingForBorrower) {
78
85
  name = `Lend Offer on ${collection.name}`;
79
86
  }
80
- else if (acc.status.active || acc.status.onSale) {
87
+ else if (acc.status === structs_1.LoanStatus.Active ||
88
+ acc.status === structs_1.LoanStatus.OnSale) {
81
89
  name = `Active Loan`;
82
90
  }
83
- else if (acc.status.defaulted) {
91
+ else if (acc.status === structs_1.LoanStatus.Defaulted) {
84
92
  name = `Defaulted Loan`;
85
93
  }
86
94
  }
@@ -89,19 +97,20 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
89
97
  element.addBorrowedAsset(solAsset);
90
98
  if (mintAsset)
91
99
  element.addSuppliedCollectibleAsset(mintAsset);
92
- if (acc.status.waitingForLender) {
100
+ if (acc.status === structs_1.LoanStatus.WaitingForLender) {
93
101
  name = `Borrow Offer`;
94
102
  }
95
- else if (acc.status.active || acc.status.onSale) {
103
+ else if (acc.status === structs_1.LoanStatus.Active ||
104
+ acc.status === structs_1.LoanStatus.OnSale) {
96
105
  name = `Active Loan`;
97
106
  }
98
- else if (acc.status.defaulted) {
107
+ else if (acc.status === structs_1.LoanStatus.Defaulted) {
99
108
  name = `Expired Loan`;
100
109
  }
101
110
  }
102
111
  if (name)
103
112
  element.setName(name);
104
- element.setFixedTerms(acc.lender === owner.toString(), acc.status.active || acc.status.onSale
113
+ element.setFixedTerms(acc.lender.toString() === owner.toString(), acc.status === structs_1.LoanStatus.Active || acc.status === structs_1.LoanStatus.OnSale
105
114
  ? (Number(acc.startTime) + Number(acc.loanTerms.duration)) * 1000
106
115
  : undefined);
107
116
  });
@@ -1 +1 @@
1
- {"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAErC,2CAKqB;AAErB,iDAAsD;AAEtD,+CAAkE;AAClE,uCAA2C;AAC3C,kEAA+D;AAC/D,4DAAyD;AACzD,gFAA6E;AAG7E,MAAM,eAAe,GAAG,IAAI,6BAAa,CAIvC,+BAAmB,EACnB;IACE,MAAM,EAAE,uBAAW;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,IAAI,CAAC,CACrC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAA,wB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EAChC,CAAC;gBACD,IAAI,GAAG,aAAa,CAAC;YACvB,CAAC;iBAAM,IAAI,GAAG,CAAC,MAAM,KAAK,oBAAU,CAAC,SAAS,EAAE,CAAC;gBAC/C,IAAI,GAAG,cAAc,CAAC;YACxB,CAAC;QACH,CAAC;QAED,IAAI,IAAI;YAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAEhC,OAAO,CAAC,aAAa,CACnB,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,QAAQ,EAAE,EAC1C,GAAG,CAAC,MAAM,KAAK,oBAAU,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,KAAK,oBAAU,CAAC,MAAM;YAClE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI;YACjE,CAAC,CAAC,SAAS,CACd,CAAC;IACJ,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,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,59 @@
1
+ /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
+ /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
+ import { BeetStruct, COption, FixableBeetStruct } from '@metaplex-foundation/beet';
4
+ import BigNumber from 'bignumber.js';
5
+ import { PublicKey } from '@solana/web3.js';
6
+ export type LoanTerms = {
7
+ apyBps: BigNumber;
8
+ duration: BigNumber;
9
+ principal: BigNumber;
10
+ };
11
+ export declare const loanTermsStruct: BeetStruct<LoanTerms, Partial<LoanTerms>>;
12
+ export type LtvTerms = {
13
+ ltvBps: BigNumber;
14
+ maxOffer: BigNumber;
15
+ };
16
+ export declare const ltvTermsStruct: BeetStruct<LtvTerms, Partial<LtvTerms>>;
17
+ export type ListedLoan = {
18
+ listed: boolean;
19
+ price: BigNumber;
20
+ sold: boolean;
21
+ fox: boolean;
22
+ listingTime: BigNumber;
23
+ };
24
+ export declare const listedLoanStruct: BeetStruct<ListedLoan, Partial<ListedLoan>>;
25
+ export declare enum LoanStatus {
26
+ WaitingForBorrower = 0,
27
+ WaitingForLender = 1,
28
+ Active = 2,
29
+ Repaid = 3,
30
+ Defaulted = 4,
31
+ OnSale = 5
32
+ }
33
+ export declare enum OfferType {
34
+ Global = 0,
35
+ Mortgage = 1,
36
+ Borrow = 2
37
+ }
38
+ export type Loan = {
39
+ accountDiscriminator: number[];
40
+ bump: number;
41
+ lender: PublicKey;
42
+ borrower: PublicKey;
43
+ mint: PublicKey;
44
+ collectionConfig: PublicKey;
45
+ status: LoanStatus;
46
+ loanTerms: LoanTerms;
47
+ creationTime: BigNumber;
48
+ startTime: BigNumber;
49
+ endTime: BigNumber;
50
+ fox: boolean;
51
+ mortgage: boolean;
52
+ private: boolean;
53
+ offerType: OfferType;
54
+ listingPrice: BigNumber;
55
+ ltvTerms: COption<LtvTerms>;
56
+ pool: boolean;
57
+ listedLoan: ListedLoan | null;
58
+ };
59
+ export declare const loanStruct: FixableBeetStruct<Loan, Partial<Loan>>;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loanStruct = exports.OfferType = exports.LoanStatus = exports.listedLoanStruct = exports.ltvTermsStruct = exports.loanTermsStruct = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ exports.loanTermsStruct = new beet_1.BeetStruct([
8
+ ['apyBps', solana_1.u64],
9
+ ['duration', solana_1.u64],
10
+ ['principal', solana_1.u64],
11
+ ], (args) => args);
12
+ exports.ltvTermsStruct = new beet_1.BeetStruct([
13
+ ['ltvBps', solana_1.u64],
14
+ ['maxOffer', solana_1.u64],
15
+ ], (args) => args);
16
+ exports.listedLoanStruct = new beet_1.BeetStruct([
17
+ ['listed', beet_1.bool],
18
+ ['price', solana_1.u64],
19
+ ['sold', beet_1.bool],
20
+ ['fox', beet_1.bool],
21
+ ['listingTime', solana_1.i64],
22
+ ], (args) => args);
23
+ var LoanStatus;
24
+ (function (LoanStatus) {
25
+ LoanStatus[LoanStatus["WaitingForBorrower"] = 0] = "WaitingForBorrower";
26
+ LoanStatus[LoanStatus["WaitingForLender"] = 1] = "WaitingForLender";
27
+ LoanStatus[LoanStatus["Active"] = 2] = "Active";
28
+ LoanStatus[LoanStatus["Repaid"] = 3] = "Repaid";
29
+ LoanStatus[LoanStatus["Defaulted"] = 4] = "Defaulted";
30
+ LoanStatus[LoanStatus["OnSale"] = 5] = "OnSale";
31
+ })(LoanStatus || (exports.LoanStatus = LoanStatus = {}));
32
+ var OfferType;
33
+ (function (OfferType) {
34
+ OfferType[OfferType["Global"] = 0] = "Global";
35
+ OfferType[OfferType["Mortgage"] = 1] = "Mortgage";
36
+ OfferType[OfferType["Borrow"] = 2] = "Borrow";
37
+ })(OfferType || (exports.OfferType = OfferType = {}));
38
+ exports.loanStruct = new beet_1.FixableBeetStruct([
39
+ ['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
40
+ ['bump', beet_1.u8],
41
+ ['lender', beet_solana_1.publicKey],
42
+ ['borrower', beet_solana_1.publicKey],
43
+ ['mint', beet_solana_1.publicKey],
44
+ ['collectionConfig', beet_solana_1.publicKey],
45
+ ['status', beet_1.u8],
46
+ ['loanTerms', exports.loanTermsStruct],
47
+ ['creationTime', solana_1.i64],
48
+ ['startTime', solana_1.i64],
49
+ ['endTime', solana_1.i64],
50
+ ['fox', beet_1.bool],
51
+ ['mortgage', beet_1.bool],
52
+ ['private', beet_1.bool],
53
+ ['offerType', beet_1.u8],
54
+ ['listingPrice', solana_1.u64],
55
+ ['ltvTerms', (0, beet_1.coption)(exports.ltvTermsStruct)],
56
+ ['pool', beet_1.bool],
57
+ ['listedLoan', (0, beet_1.coption)(exports.listedLoanStruct)],
58
+ ], (args) => args);
59
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/structs.ts"],"names":[],"mappings":";;;AAAA,oDAQmC;AAEnC,kEAA6D;AAE7D,+CAA8C;AAQjC,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,WAAW,EAAE,YAAG,CAAC;CACnB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC;AAOW,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,UAAU,EAAE,YAAG,CAAC;CAClB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAUW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,QAAQ,EAAE,WAAI,CAAC;IAChB,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,MAAM,EAAE,WAAI,CAAC;IACd,CAAC,KAAK,EAAE,WAAI,CAAC;IACb,CAAC,aAAa,EAAE,YAAG,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAEF,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,uEAAsB,CAAA;IACtB,mEAAoB,CAAA;IACpB,+CAAU,CAAA;IACV,+CAAU,CAAA;IACV,qDAAa,CAAA;IACb,+CAAU,CAAA;AACZ,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAED,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,6CAAU,CAAA;IACV,iDAAY,CAAA;IACZ,6CAAU,CAAA;AACZ,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AAwBY,QAAA,UAAU,GAAG,IAAI,wBAAiB,CAC7C;IACE,CAAC,sBAAsB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,UAAU,EAAE,uBAAS,CAAC;IACvB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,kBAAkB,EAAE,uBAAS,CAAC;IAC/B,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,WAAW,EAAE,uBAAe,CAAC;IAC9B,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,KAAK,EAAE,WAAI,CAAC;IACb,CAAC,UAAU,EAAE,WAAI,CAAC;IAClB,CAAC,SAAS,EAAE,WAAI,CAAC;IACjB,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,UAAU,EAAE,IAAA,cAAO,EAAC,sBAAc,CAAC,CAAC;IACrC,CAAC,MAAM,EAAE,WAAI,CAAC;IACd,CAAC,YAAY,EAAE,IAAA,cAAO,EAAC,wBAAgB,CAAC,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAY,CACvB,CAAC"}
@@ -1,51 +1,3 @@
1
- export type OfferType = {
2
- global?: string;
3
- mortgage?: string;
4
- borrow?: string;
5
- };
6
- export type Status = {
7
- waitingForBorrower?: string;
8
- waitingForLender?: string;
9
- repaid?: string;
10
- defaulted?: string;
11
- active?: string;
12
- onSale?: string;
13
- };
14
- export type Loan = {
15
- lender: string;
16
- borrower: string;
17
- mint: string;
18
- collectionConfig: string;
19
- status: Status;
20
- loanTerms: LoanTerms;
21
- creationTime: string;
22
- startTime: string;
23
- endTime: string;
24
- fox: boolean;
25
- mortgage: boolean;
26
- private: boolean;
27
- offerType: OfferType;
28
- listingPrice: string;
29
- ltvTerms: LtvTerms | null;
30
- pool: boolean;
31
- listedLoan: ListedLoan;
32
- };
33
- export type ListedLoan = {
34
- listed: boolean;
35
- price: string;
36
- sold: boolean;
37
- fox: boolean;
38
- listingTime: string;
39
- };
40
- export type LoanTerms = {
41
- apyBps: string;
42
- duration: string;
43
- principal: string;
44
- };
45
- export type LtvTerms = {
46
- ltvBps: string;
47
- maxOffer: string;
48
- };
49
1
  export type Collection = {
50
2
  id: string;
51
3
  name: string;
@@ -27,7 +27,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
27
27
  const accounts = yield ParsedGpa_1.ParsedGpa.build(connection, structs_1.positionStruct, constants_1.divvyProgram)
28
28
  .addFilter('accountDiscriminator', [170, 188, 143, 228, 122, 64, 247, 208])
29
29
  .addFilter('user', new web3_js_1.PublicKey(owner))
30
- .debug()
31
30
  .run();
32
31
  if (accounts.length === 0)
33
32
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"housePoolFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/divvy/housePoolFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAsE;AAEtE,iDAAsD;AAEtD,kEAA+D;AAC/D,4DAAyD;AACzD,gFAA6E;AAC7E,uCAAkD;AAClD,kEAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,6BAAa,CAIlC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,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C,MAAM;YACnB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;SACjE,CAAC,CAAC;IACL,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,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"housePoolFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/divvy/housePoolFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAsE;AAEtE,iDAAsD;AAEtD,kEAA+D;AAC/D,4DAAyD;AACzD,gFAA6E;AAC7E,uCAAkD;AAClD,kEAA+D;AAE/D,MAAM,UAAU,GAAG,IAAI,6BAAa,CAIlC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,CACzC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,qBAAS,CAAC,KAAK,CACpC,UAAU,EACV,wBAAc,EACd,wBAAY,CACb;SACE,SAAS,CAAC,sBAAsB,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;SAC1E,SAAS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AAO,CAAC"}
@@ -1,4 +1,3 @@
1
- import { IdlItem } from '@solanafm/explorer-kit-idls';
2
1
  export declare const pythSolanaReceiverIdl: {
3
2
  version: string;
4
3
  name: string;
@@ -177,4 +176,3 @@ export declare const pythSolanaReceiverIdl: {
177
176
  msg: string;
178
177
  }[];
179
178
  };
180
- export declare const pythSolanaReceiverIdlItem: IdlItem;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pythSolanaReceiverIdlItem = exports.pythSolanaReceiverIdl = void 0;
3
+ exports.pythSolanaReceiverIdl = void 0;
4
4
  exports.pythSolanaReceiverIdl = {
5
5
  version: '0.1.0',
6
6
  name: 'pyth_solana_receiver',
@@ -617,9 +617,4 @@ exports.pythSolanaReceiverIdl = {
617
617
  },
618
618
  ],
619
619
  };
620
- exports.pythSolanaReceiverIdlItem = {
621
- programId: 'G6EoTTTgpkNBtVXo96EQp2m6uwwVh2Kt6YidjkmQqoha',
622
- idl: exports.pythSolanaReceiverIdl,
623
- idlType: 'anchor',
624
- };
625
620
  //# sourceMappingURL=idls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"idls.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/idls.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,IAAI,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;YACV,IAAI,EAAE,4BAA4B;YAClC,GAAG,EAAE,kEAAkE;SACxE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,wDAAwD;SAC9D;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,2DAA2D;SACjE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,oBAAoB;YAC1B,GAAG,EAAE,6BAA6B;SACnC;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,6BAA6B;YACnC,GAAG,EAAE,gEAAgE;SACtE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,mCAAmC;YACzC,GAAG,EAAE,iEAAiE;SACvE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,+CAA+C;YACrD,GAAG,EAAE,4DAA4D;SAClE;KACF;CACF,CAAC;AAEW,QAAA,yBAAyB,GAAG;IACvC,SAAS,EAAE,8CAA8C;IACzD,GAAG,EAAE,6BAAqB;IAC1B,OAAO,EAAE,QAAQ;CACP,CAAC"}
1
+ {"version":3,"file":"idls.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/idls.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACnC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,IAAI,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;YACV,IAAI,EAAE,4BAA4B;YAClC,GAAG,EAAE,kEAAkE;SACxE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,wDAAwD;SAC9D;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,uBAAuB;YAC7B,GAAG,EAAE,2DAA2D;SACjE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,oBAAoB;YAC1B,GAAG,EAAE,6BAA6B;SACnC;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,6BAA6B;YACnC,GAAG,EAAE,gEAAgE;SACtE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,mCAAmC;YACzC,GAAG,EAAE,iEAAiE;SACvE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,+CAA+C;YACrD,GAAG,EAAE,4DAA4D;SAClE;KACF;CACF,CAAC"}
@@ -6,31 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.convertPythPrice = exports.getPythPullOraclePriceDataFromBuffer = void 0;
7
7
  /* eslint-disable no-param-reassign */
8
8
  const bn_js_1 = __importDefault(require("bn.js"));
9
- const explorer_kit_1 = require("@solanafm/explorer-kit");
10
9
  const constants_1 = require("./constants");
11
- const idls_1 = require("./idls");
12
- const parser = new explorer_kit_1.SolanaFMParser(idls_1.pythSolanaReceiverIdlItem, idls_1.pythSolanaReceiverIdlItem.programId.toString());
10
+ const toBN_1 = require("../../../utils/misc/toBN");
11
+ const structs_1 = require("../../../utils/solana/pyth/structs");
13
12
  function getPythPullOraclePriceDataFromBuffer(buffer, multiple, stableCoin) {
14
- var _a, _b;
15
- const eventParser = parser.createParser(explorer_kit_1.ParserType.ACCOUNT);
16
- if (!eventParser || !(0, explorer_kit_1.checkIfAccountParser)(eventParser))
17
- throw new Error('Failed to create event parser Pyth pull');
18
- const parsedAccount = eventParser.parseAccount(buffer.toString('base64'));
19
- const priceData = (_a = parsedAccount === null || parsedAccount === void 0 ? void 0 : parsedAccount.data) === null || _a === void 0 ? void 0 : _a.priceMessage;
20
- const postedSlot = (_b = parsedAccount === null || parsedAccount === void 0 ? void 0 : parsedAccount.data) === null || _b === void 0 ? void 0 : _b.postedSlot;
21
- if (!priceData || !postedSlot)
13
+ const [{ priceMessage, postedSlot }] = structs_1.priceUpdateV2Struct.deserialize(buffer, 0);
14
+ if (!priceMessage || !postedSlot)
22
15
  throw new Error('Failed to parseAccount Pyth pull');
23
- const confidence = convertPythPrice(new bn_js_1.default(priceData.conf), priceData.exponent, multiple);
24
- let price = convertPythPrice(new bn_js_1.default(priceData.price), priceData.exponent, multiple);
16
+ const confidence = convertPythPrice((0, toBN_1.toBN)(priceMessage.conf.toNumber()), priceMessage.exponent, multiple);
17
+ let price = convertPythPrice((0, toBN_1.toBN)(priceMessage.price.toNumber()), priceMessage.exponent, multiple);
25
18
  if (stableCoin) {
26
19
  price = getStableCoinPrice(price, confidence);
27
20
  }
28
21
  return {
29
22
  price,
30
- slot: postedSlot,
23
+ slot: (0, toBN_1.toBN)(postedSlot),
31
24
  confidence,
32
- twap: convertPythPrice(new bn_js_1.default(priceData.price), priceData.exponent, multiple),
33
- twapConfidence: convertPythPrice(new bn_js_1.default(priceData.price), priceData.exponent, multiple),
25
+ twap: convertPythPrice((0, toBN_1.toBN)(priceMessage.price.toNumber()), priceMessage.exponent, multiple),
26
+ twapConfidence: convertPythPrice((0, toBN_1.toBN)(priceMessage.price), priceMessage.exponent, multiple),
34
27
  hasSufficientNumberOfDataPoints: true,
35
28
  };
36
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pythPull.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/pythPull.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAsC;AACtC,kDAAuB;AACvB,yDAIgC;AAChC,2CAAoE;AAEpE,iCAAmD;AAanD,MAAM,MAAM,GAAG,IAAI,6BAAc,CAC/B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B,QAAQ,CACT;QACD,cAAc,EAAE,gBAAgB,CAC9B,IAAI,eAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EACvB,SAAS,CAAC,QAAQ,EAClB,QAAQ,CACT;QACD,+BAA+B,EAAE,IAAI;KACtC,CAAC;AACJ,CAAC;AA3CD,oFA2CC;AAED,SAAgB,gBAAgB,CAC9B,KAAS,EACT,QAAgB,EAChB,QAAY;IAEZ,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,MAAM,aAAa,GAAG,eAAG,CAAC,GAAG,CAAC,IAAI,eAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC,GAAG,CAAC,2BAAe,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AACvD,CAAC;AARD,4CAQC;AAED,MAAM,OAAO,GAAG,IAAI,eAAE,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS,kBAAkB,CAAC,KAAS,EAAE,UAAc;IACnD,IAAI,KAAK,CAAC,GAAG,CAAC,2BAAe,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,eAAE,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;QACrE,OAAO,2BAAe,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"pythPull.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/drift/perpHelpers/pythPull.ts"],"names":[],"mappings":";;;;;;AAAA,sCAAsC;AACtC,kDAAuB;AACvB,2CAAoE;AAEpE,mDAAgD;AAChD,gEAAyE;AAEzE,SAAgB,oCAAoC,CAClD,MAAc,EACd,QAAY,EACZ,UAAmB;IAEnB,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,GAAG,6BAAmB,CAAC,WAAW,CACpE,MAAM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AC,GAAG,CAAC,aAAa,CAAC,CAAC;AACvD,CAAC;AARD,4CAQC;AAED,MAAM,OAAO,GAAG,IAAI,eAAE,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS,kBAAkB,CAAC,KAAS,EAAE,UAAc;IACnD,IAAI,KAAK,CAAC,GAAG,CAAC,2BAAe,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,eAAE,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;QACrE,OAAO,2BAAe,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,13 +1,10 @@
1
1
  /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { IdlItem } from '@solanafm/explorer-kit-idls';
4
3
  import { PublicKey } from '@solana/web3.js';
5
4
  export declare const platformId = "famousfoxfederation";
6
5
  export declare const foxyMint = "FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq";
7
6
  export declare const tokenMarketProgram: PublicKey;
8
- export declare const tokenMarketIdlItem: IdlItem;
9
7
  export declare const foxProgram: PublicKey;
10
8
  export declare const stakingConfigAccount: PublicKey;
11
- export declare const stakingIdlItem: IdlItem;
12
9
  export declare const cachePrefix = "famousfoxfederation";
13
10
  export declare const stakingConfigCacheKey = "stakingconfig";
@@ -1,24 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stakingConfigCacheKey = exports.cachePrefix = exports.stakingIdlItem = exports.stakingConfigAccount = exports.foxProgram = exports.tokenMarketIdlItem = exports.tokenMarketProgram = exports.foxyMint = exports.platformId = void 0;
3
+ exports.stakingConfigCacheKey = exports.cachePrefix = exports.stakingConfigAccount = exports.foxProgram = exports.tokenMarketProgram = exports.foxyMint = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
- const stakingIdl_1 = require("./stakingIdl");
6
- const tokenMarketIdl_1 = require("./tokenMarketIdl");
7
5
  exports.platformId = 'famousfoxfederation';
8
6
  exports.foxyMint = 'FoXyMu5xwXre7zEoSvzViRk3nGawHUp9kUh97y2NDhcq';
9
7
  exports.tokenMarketProgram = new web3_js_1.PublicKey('8BYmYs3zsBhftNELJdiKsCN2WyCBbrTwXd6WG4AFPr6n');
10
- exports.tokenMarketIdlItem = {
11
- programId: exports.tokenMarketProgram.toString(),
12
- idl: tokenMarketIdl_1.tokenMarketIdl,
13
- idlType: 'anchor',
14
- };
15
8
  exports.foxProgram = new web3_js_1.PublicKey('FoXpJL1exLBJgHVvdSHNKyKu2xX2uatctH9qp6dLmfpP');
16
9
  exports.stakingConfigAccount = new web3_js_1.PublicKey('7N7M1H2CK51ip7sNtPgKhhv2eScx6BokLgHi1Ke3ZLiq');
17
- exports.stakingIdlItem = {
18
- programId: exports.foxProgram.toString(),
19
- idl: stakingIdl_1.StakingIDL,
20
- idlType: 'anchor',
21
- };
22
10
  exports.cachePrefix = 'famousfoxfederation';
23
11
  exports.stakingConfigCacheKey = 'stakingconfig';
24
12
  //# sourceMappingURL=constants.js.map