@sonarwatch/portfolio-plugins 0.14.132 → 0.14.134

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 (63) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/citrus/loansFetcher.js +34 -68
  4. package/src/plugins/citrus/loansFetcher.js.map +1 -1
  5. package/src/plugins/debridge/dlmmVaultsFetcher.js +1 -0
  6. package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
  7. package/src/plugins/jupiter/exchange/dcaFetcher.js +1 -0
  8. package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
  9. package/src/plugins/jupiter/exchange/limitFetcher.js +3 -0
  10. package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
  11. package/src/plugins/jupiter/exchange/perpetualFetcher.js +1 -0
  12. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  13. package/src/plugins/jupiter/exchange/valueAverageFetcher.js +2 -1
  14. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  15. package/src/plugins/rain/banksFetcher.js +47 -0
  16. package/src/plugins/rain/banksFetcher.js.map +1 -0
  17. package/src/plugins/rain/collectionsJob.js +9 -7
  18. package/src/plugins/rain/collectionsJob.js.map +1 -1
  19. package/src/plugins/rain/constants.d.ts +7 -2
  20. package/src/plugins/rain/constants.js +11 -3
  21. package/src/plugins/rain/constants.js.map +1 -1
  22. package/src/plugins/rain/defiBorrowsFetcher.d.ts +3 -0
  23. package/src/plugins/rain/defiBorrowsFetcher.js +52 -0
  24. package/src/plugins/rain/defiBorrowsFetcher.js.map +1 -0
  25. package/src/plugins/rain/index.js +10 -3
  26. package/src/plugins/rain/index.js.map +1 -1
  27. package/src/plugins/rain/nftBorrowsFetcher.d.ts +3 -0
  28. package/src/plugins/rain/nftBorrowsFetcher.js +76 -0
  29. package/src/plugins/rain/nftBorrowsFetcher.js.map +1 -0
  30. package/src/plugins/rain/poolsFetcher.js +79 -42
  31. package/src/plugins/rain/poolsFetcher.js.map +1 -1
  32. package/src/plugins/rain/structs.d.ts +455 -0
  33. package/src/plugins/rain/structs.js +425 -0
  34. package/src/plugins/rain/structs.js.map +1 -0
  35. package/src/plugins/rain/types.d.ts +18 -144
  36. package/src/plugins/sharky/loansFetcher.js +38 -73
  37. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  38. package/src/utils/elementbuilder/AssetCollectibleBuilder.d.ts +10 -0
  39. package/src/utils/elementbuilder/AssetCollectibleBuilder.js +53 -0
  40. package/src/utils/elementbuilder/AssetCollectibleBuilder.js.map +1 -0
  41. package/src/utils/elementbuilder/ElementBorrowlendBuilder.d.ts +9 -1
  42. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +41 -3
  43. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
  44. package/src/utils/elementbuilder/ElementRegistry.js +9 -1
  45. package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
  46. package/src/utils/elementbuilder/Params.d.ts +15 -0
  47. package/src/utils/solana/das/heliusAssetToAssetCollectible.js +3 -2
  48. package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
  49. package/src/plugins/rain/filters.d.ts +0 -7
  50. package/src/plugins/rain/filters.js +0 -53
  51. package/src/plugins/rain/filters.js.map +0 -1
  52. package/src/plugins/rain/helpers.d.ts +0 -9
  53. package/src/plugins/rain/helpers.js +0 -66
  54. package/src/plugins/rain/helpers.js.map +0 -1
  55. package/src/plugins/rain/loansFetcher.js +0 -139
  56. package/src/plugins/rain/loansFetcher.js.map +0 -1
  57. package/src/plugins/rain/structs/loan.d.ts +0 -86
  58. package/src/plugins/rain/structs/loan.js +0 -86
  59. package/src/plugins/rain/structs/loan.js.map +0 -1
  60. package/src/plugins/rain/structs/pool.d.ts +0 -79
  61. package/src/plugins/rain/structs/pool.js +0 -76
  62. package/src/plugins/rain/structs/pool.js.map +0 -1
  63. /package/src/plugins/rain/{loansFetcher.d.ts → banksFetcher.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.14.134](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.133...plugins-0.14.134) (2025-02-28)
6
+
7
+
8
+
9
+ ## [0.14.133](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.132...plugins-0.14.133) (2025-02-27)
10
+
11
+
12
+
5
13
  ## [0.14.132](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.131...plugins-0.14.132) (2025-02-27)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.132",
3
+ "version": "0.14.134",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -17,20 +17,16 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
17
  const constants_1 = require("./constants");
18
18
  const clients_1 = require("../../utils/clients");
19
19
  const solana_1 = require("../../utils/solana");
20
- const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
- const getAssetBatchDas_1 = require("../../utils/solana/das/getAssetBatchDas");
22
- const getSolanaDasEndpoint_1 = __importDefault(require("../../utils/clients/getSolanaDasEndpoint"));
23
- const heliusAssetToAssetCollectible_1 = require("../../utils/solana/das/heliusAssetToAssetCollectible");
24
20
  const filters_1 = require("./filters");
25
21
  const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
26
22
  const arrayToMap_1 = require("../../utils/misc/arrayToMap");
23
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
27
24
  const collectionsMemo = new MemoizedCache_1.MemoizedCache(constants_1.collectionsCacheKey, {
28
25
  prefix: constants_1.cachePrefix,
29
26
  networkId: portfolio_core_1.NetworkId.solana,
30
27
  }, (arr) => (0, arrayToMap_1.arrayToMap)(arr || [], 'id'));
31
28
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
32
29
  const connection = (0, clients_1.getClientSolana)();
33
- const dasUrl = (0, getSolanaDasEndpoint_1.default)();
34
30
  const [filterA, filterB] = (0, filters_1.getLoanFilters)(owner);
35
31
  const allAccounts = (yield Promise.all([
36
32
  (0, solana_1.getAutoParsedProgramAccounts)(connection, constants_1.citrusIdlItem, filterA),
@@ -40,47 +36,44 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
40
36
  );
41
37
  if (accounts.length === 0)
42
38
  return [];
43
- const [solTokenPrice, heliusAssets, collections] = yield Promise.all([
39
+ const [solTokenPrice, collections] = yield Promise.all([
44
40
  cache.getTokenPrice(portfolio_core_1.solanaNativeAddress, portfolio_core_1.NetworkId.solana),
45
- (0, getAssetBatchDas_1.getAssetBatchDasAsMap)(dasUrl, accounts
46
- .map((acc) => acc.mint)
47
- .filter((mint) => mint && mint !== '11111111111111111111111111111111')),
48
41
  collectionsMemo.getItem(cache),
49
42
  ]);
50
- if (!solTokenPrice || !collections)
51
- return [];
52
- const elements = [];
43
+ if (!collections)
44
+ throw new Error('Collections not cached');
45
+ if (!solTokenPrice)
46
+ throw new Error('Sol price not cached');
47
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
53
48
  accounts.forEach((acc) => {
54
49
  const collection = collections.get(acc.collectionConfig);
55
50
  if (!collection)
56
51
  return;
57
- const borrowedAssets = [];
58
- const suppliedAssets = [];
52
+ const element = elementRegistry.addElementBorrowlend({
53
+ label: 'Lending',
54
+ ref: acc.pubkey,
55
+ });
59
56
  let mintAsset = null;
60
57
  if (acc.mint && acc.mint !== '11111111111111111111111111111111') {
61
- const heliusAsset = heliusAssets.get(acc.mint);
62
- if (heliusAsset) {
63
- const assetValue = new bignumber_js_1.default(collection.floor)
64
- .multipliedBy(solTokenPrice.price)
65
- .toNumber();
66
- mintAsset = (0, heliusAssetToAssetCollectible_1.heliusAssetToAssetCollectible)(heliusAsset, {
67
- tags: [portfolio_core_1.collectibleFreezedTag],
68
- collection: {
69
- name: collection.name,
70
- floorPrice: assetValue,
71
- },
72
- });
73
- }
58
+ mintAsset = {
59
+ address: acc.mint,
60
+ collection: {
61
+ name: collection.name,
62
+ floorPrice: new bignumber_js_1.default(collection.floor).multipliedBy(solTokenPrice.price),
63
+ },
64
+ attributes: { tags: [portfolio_core_1.collectibleFreezedTag] },
65
+ };
74
66
  }
75
- const solAsset = (0, tokenPriceToAssetToken_1.default)(portfolio_core_1.solanaNativeAddress, new bignumber_js_1.default(acc.ltvTerms ? acc.ltvTerms.maxOffer : acc.loanTerms.principal)
76
- .dividedBy(Math.pow(10, portfolio_core_1.solanaNativeDecimals))
77
- .toNumber(), portfolio_core_1.NetworkId.solana, solTokenPrice);
67
+ const solAsset = {
68
+ address: portfolio_core_1.solanaNativeAddress,
69
+ amount: new bignumber_js_1.default(acc.ltvTerms ? acc.ltvTerms.maxOffer : acc.loanTerms.principal),
70
+ };
78
71
  let name;
79
72
  if (acc.lender === owner.toString()) {
80
73
  // LENDER
81
- suppliedAssets.push(solAsset);
74
+ element.addSuppliedAsset(solAsset);
82
75
  if (mintAsset)
83
- borrowedAssets.push(mintAsset);
76
+ element.addBorrowedCollectibleAsset(mintAsset);
84
77
  if (acc.status.waitingForBorrower) {
85
78
  name = `Lend Offer on ${collection.name}`;
86
79
  }
@@ -93,10 +86,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
93
86
  }
94
87
  else {
95
88
  // BORROWER
96
- if (mintAsset) {
97
- suppliedAssets.push(mintAsset);
98
- }
99
- borrowedAssets.push(solAsset);
89
+ element.addBorrowedAsset(solAsset);
90
+ if (mintAsset)
91
+ element.addSuppliedCollectibleAsset(mintAsset);
100
92
  if (acc.status.waitingForLender) {
101
93
  name = `Borrow Offer`;
102
94
  }
@@ -107,39 +99,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
107
99
  name = `Expired Loan`;
108
100
  }
109
101
  }
110
- if (suppliedAssets.length > 0) {
111
- const { borrowedValue, suppliedValue, rewardValue, value } = (0, portfolio_core_1.getElementNFTLendingValues)({
112
- suppliedAssets,
113
- borrowedAssets,
114
- rewardAssets: [],
115
- lender: acc.lender === owner.toString(),
116
- });
117
- elements.push({
118
- networkId: portfolio_core_1.NetworkId.solana,
119
- label: 'Lending',
120
- platformId: constants_1.platformId,
121
- type: portfolio_core_1.PortfolioElementType.borrowlend,
122
- value,
123
- name,
124
- data: {
125
- borrowedAssets,
126
- borrowedValue,
127
- borrowedYields: [],
128
- suppliedAssets,
129
- suppliedValue,
130
- suppliedYields: [],
131
- rewardAssets: [],
132
- rewardValue,
133
- healthRatio: null,
134
- value,
135
- expireOn: acc.status.active || acc.status.onSale
136
- ? (Number(acc.startTime) + Number(acc.loanTerms.duration)) * 1000
137
- : undefined,
138
- },
139
- });
140
- }
102
+ if (name)
103
+ element.setName(name);
104
+ element.setFixedTerms(acc.lender === owner.toString(), acc.status.active || acc.status.onSale
105
+ ? (Number(acc.startTime) + Number(acc.loanTerms.duration)) * 1000
106
+ : undefined);
141
107
  });
142
- return elements;
108
+ return elementRegistry.getElements(cache);
143
109
  });
144
110
  const fetcher = {
145
111
  id: `${constants_1.platformId}-loans`,
@@ -1 +1 @@
1
- {"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AACpC,gEAAqC;AAErC,2CAKqB;AAErB,iDAAsD;AAEtD,+CAAkE;AAClE,qGAA6E;AAC7E,8EAAgF;AAChF,oGAA4E;AAC5E,wGAAqG;AACrG,uCAA2C;AAC3C,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,IAAI,6BAAa,CAIvC,+BAAmB,EACnB;IACE,MAAM,EAAE,uBAAW;IACnB,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E,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,GACxD,IAAA,2CAA0B,EAAC;gBACzB,cAAc;gBACd,cAAc;gBACd,YAAY,EAAE,EAAE;gBAChB,MAAM,EAAE,GAAG,CAAC,MAAM,KAAK,KAAK,CAAC,QAAQ,EAAE;aACxC,CAAC,CAAC;YAEL,QAAQ,CAAC,IAAI,CAAC;gBACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAV,sBAAU;gBACV,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,KAAK;gBACL,IAAI;gBACJ,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc,EAAE,EAAE;oBAClB,cAAc;oBACd,aAAa;oBACb,cAAc,EAAE,EAAE;oBAClB,YAAY,EAAE,EAAE;oBAChB,WAAW;oBACX,WAAW,EAAE,IAAI;oBACjB,KAAK;oBACL,QAAQ,EACN,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM;wBACpC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI;wBACjE,CAAC,CAAC,SAAS;iBAChB;aACF,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,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"loansFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/citrus/loansFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,g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pC,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"}
@@ -57,6 +57,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
57
57
  const vestingElement = registry.addElementMultiple({
58
58
  label: 'Vesting',
59
59
  link: 'https://debridge.foundation/lfg',
60
+ name: 'Alpha Vault',
60
61
  });
61
62
  for (const escrow of accounts) {
62
63
  const vault = vaults[escrow.dlmmVault.toString()];
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmVaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/dlmmVaultsFetcher.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,mBAAmB;;;;;;;;;;;AAEnB,+DAAuD;AAGvD,iDAAsD;AACtD,2CAA0E;AAC1E,+CAA8D;AAC9D,8CAAiD;AAEjD,oDAAqD;AACrD,gFAA6E;AAE7E,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,IAAI,IAAI,GAAkB,IAAI,CAAC;AAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;AACnB,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,C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D,CAAC;QAEF,IAAI,wBAAwB,CAAC,mBAAmB,CAAC,CAAC,CAAC;YAAE,SAAS;QAE9D,cAAc,CAAC,QAAQ,CAAC;YACtB,OAAO,EAAE,KAAK,CAAC,QAAQ;YACvB,MAAM,EAAE,wBAAwB;YAChC,cAAc,EAAE,IAAI;YACpB,GAAG,EAAE,MAAM,CAAC,MAAM;YAClB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;YACtD,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -28,6 +28,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
28
28
  label: 'DCA',
29
29
  ref: account.pubkey.toString(),
30
30
  link: 'https://jup.ag/recurring/',
31
+ contract: constants_1.dcaProgramId.toString(),
31
32
  });
32
33
  element.setTrade({
33
34
  inputAsset: {
@@ -1 +1 @@
1
- {"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC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D,WAAW,EAAE;gBACX,OAAO,EAAE,OAAO,CAAC,UAAU;gBAC3B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;aACxD;YACD,kBAAkB,EAAE,OAAO,CAAC,WAAW;YACvC,qBAAqB,EAAE,OAAO,CAAC,YAAY;YAC3C,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,GAAG,IAAI;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -37,6 +37,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
37
37
  ref: account.pubkey.toString(),
38
38
  link: 'https://jup.ag/trigger/',
39
39
  label: 'LimitOrder',
40
+ contract: isV1
41
+ ? constants_1.limitV1ProgramId.toString()
42
+ : constants_1.limitV2ProgramId.toString(),
40
43
  });
41
44
  element.setTrade({
42
45
  inputAsset: {
@@ -1 +1 @@
1
- {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,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YACD,kBAAkB,EAAE,OAAO,CAAC,eAAe;YAC3C,oBAAoB,EAAE,OAAO,CAAC,eAAe;YAC7C,qBAAqB,EAAE,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;IAED,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"}
1
+ {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,4BAAkB,EAClB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0B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3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -152,6 +152,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
152
152
  value,
153
153
  },
154
154
  value,
155
+ contract: constants_1.perpsProgramId.toString(),
155
156
  },
156
157
  label: 'Leverage',
157
158
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAA+E;AAE/E,2CAKqB;AACrB,uCAAwE;AACxE,iDAOwB;AAExB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAwB,EACrD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtE,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;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YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAA+E;AAE/E,2CAKqB;AACrB,uCAAwE;AACxE,iDAOwB;AAExB,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAwB,EACrD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtE,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;QACF,KAAK,CAAC,OAAO,C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V,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -51,7 +51,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
51
51
  type: portfolio_core_1.PortfolioElementType.trade,
52
52
  networkId: portfolio_core_1.NetworkId.solana,
53
53
  platformId: constants_1.platformId,
54
- label: 'DCA',
54
+ label: 'SmartDCA',
55
55
  data: {
56
56
  assets: {
57
57
  input: inputAsset,
@@ -68,6 +68,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
68
68
  .div(Math.pow(10, outputTokenPrice.decimals))
69
69
  .toNumber(),
70
70
  ref: account.pubkey.toString(),
71
+ contract: constants_1.valueAverageProgramId.toString(),
71
72
  link: 'https://jup.ag/recurring/',
72
73
  },
73
74
  value: (0, portfolio_core_1.getUsdValueSum)([inputAsset.value, (outputAsset === null || outputAsset === void 0 ? void 0 : outputAsset.value) || 0]),
@@ -1 +1 @@
1
- {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;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IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ;SACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC7D,IAAI,EAAE,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAClD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,EA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C,GAAG,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;gBACnE,kBAAkB;gBAClB,YAAY;gBACZ,aAAa;gBACb,UAAU,EAAE,eAAe,CAAC,KAAK;gBACjC,WAAW,EAAE,gBAAgB,CAAC,KAAK;gBACnC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACnD,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE;gBACb,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC9B,QAAQ,EAAE,iCAAqB,CAAC,QAAQ,EAAE;gBAC1C,IAAI,EAAE,2BAA2B;aAClC;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACnE,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const web3_js_1 = require("@solana/web3.js");
14
+ const constants_1 = require("./constants");
15
+ const clients_1 = require("../../utils/clients");
16
+ const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
17
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
18
+ const structs_1 = require("./structs");
19
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const client = (0, clients_1.getClientSolana)();
21
+ const accounts = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.bankStruct, constants_1.bankProgramId)
22
+ .addFilter('accountDiscriminator', [142, 49, 166, 242, 50, 66, 97, 188])
23
+ .addFilter('owner', new web3_js_1.PublicKey(owner))
24
+ .run();
25
+ if (!accounts.length)
26
+ return [];
27
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
28
+ accounts.forEach((account) => {
29
+ const element = elementRegistry.addElementMultiple({
30
+ label: 'Deposit',
31
+ name: 'Vault',
32
+ ref: account.pubkey,
33
+ });
34
+ element.addAsset({
35
+ address: account.mint,
36
+ amount: account.availableLiquidity,
37
+ });
38
+ });
39
+ return elementRegistry.getElements(cache);
40
+ });
41
+ const fetcher = {
42
+ id: `${constants_1.platformId}-banks`,
43
+ networkId: portfolio_core_1.NetworkId.solana,
44
+ executor,
45
+ };
46
+ exports.default = fetcher;
47
+ //# sourceMappingURL=banksFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banksFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/banksFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAwD;AACxD,iDAAsD;AACtD,kEAA+D;AAC/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(this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const axios_1 = __importDefault(require("axios"));
13
17
  const constants_1 = require("./constants");
14
- const helpers_1 = require("./helpers");
15
- const pick_1 = require("../../utils/misc/pick");
16
18
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
17
- const collections = yield (0, helpers_1.getCollections)();
18
- const filteredCollections = collections
19
- .filter((c) => !c.isDefi)
20
- .map((c) => (0, pick_1.pick)(c, ['collectionId', 'name', 'floorPrice']));
21
- yield cache.setItem(constants_1.collectionsKey, filteredCollections, {
19
+ const getCollectionsRes = yield axios_1.default.get(`${constants_1.rainApiV3}collection/collections`);
20
+ if (!getCollectionsRes || !getCollectionsRes.data)
21
+ throw new Error('No collections');
22
+ const { collections } = getCollectionsRes.data;
23
+ yield cache.setItem(constants_1.collectionsKey, collections, {
22
24
  prefix: constants_1.platformId,
23
25
  networkId: portfolio_core_1.NetworkId.solana,
24
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"collectionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/collectionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAyD;AACzD,uCAA2C;AAC3C,gDAA6C;AAG7C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC;IAC3C,MAAM,mBAAmB,GAAG,WAAW;SACpC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;SACxB,GAAG,CACF,CAAC,CAAC,EAAE,EAA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
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
3
  import { PublicKey } from '@solana/web3.js';
4
4
  import { Platform } from '@sonarwatch/portfolio-core';
5
+ import { MemoizedCache } from '../../utils/misc/MemoizedCache';
6
+ import { Collection } from './types';
5
7
  export declare const platformId = "rain";
6
8
  export declare const platform: Platform;
7
- export declare const programId: PublicKey;
8
- export declare const rainApi = "https://api-v2.rain.fi";
9
+ export declare const nftLendingProgramId: PublicKey;
10
+ export declare const defiLendingProgramId: PublicKey;
11
+ export declare const bankProgramId: PublicKey;
12
+ export declare const rainApiV3 = "https://api-v3.rain.fi/api/";
9
13
  export declare const collectionsKey = "collections";
14
+ export declare const collectionsMemo: MemoizedCache<Collection[], Collection[]>;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.collectionsKey = exports.rainApi = exports.programId = exports.platform = exports.platformId = void 0;
3
+ exports.collectionsMemo = exports.collectionsKey = exports.rainApiV3 = exports.bankProgramId = exports.defiLendingProgramId = exports.nftLendingProgramId = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
6
+ const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
5
7
  exports.platformId = 'rain';
6
8
  exports.platform = {
7
9
  id: exports.platformId,
@@ -11,7 +13,13 @@ exports.platform = {
11
13
  website: 'https://rain.fi/',
12
14
  twitter: 'https://twitter.com/RainFi_',
13
15
  };
14
- exports.programId = new web3_js_1.PublicKey('RainEraPU5yDoJmTrHdYynK9739GkEfDsE4ffqce2BR');
15
- exports.rainApi = 'https://api-v2.rain.fi';
16
+ exports.nftLendingProgramId = new web3_js_1.PublicKey('rNfTQD84kwMbcRpWpLR92BVmxbuwrZc3o5HTauAZiXs');
17
+ exports.defiLendingProgramId = new web3_js_1.PublicKey('rDeFiHPjHZRLiz4iBzMw3zv6unZs4VwdU6qQcVd3NSK');
18
+ exports.bankProgramId = new web3_js_1.PublicKey('rain2M5b9GeFCk792swkwUu51ZihHJb3SUQ8uHxSRJf');
19
+ exports.rainApiV3 = 'https://api-v3.rain.fi/api/';
16
20
  exports.collectionsKey = 'collections';
21
+ exports.collectionsMemo = new MemoizedCache_1.MemoizedCache(exports.collectionsKey, {
22
+ prefix: exports.platformId,
23
+ networkId: portfolio_core_1.NetworkId.solana,
24
+ });
17
25
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,SAAS,EAAE,sCAAsC;IAC9D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,cAAc,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,+DAAiE;AACjE,kEAA+D;AAGlD,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,SAAS,EAAE,sCAAsC;IAC9D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,6CAA6C,CAC9C,CAAC;AACW,QAAA,oBAAoB,GAAG,IAAI,mBAAS,CAC/C,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,SAAS,GAAG,6BAA6B,CAAC;AAE1C,QAAA,cAAc,GAAG,aAAa,CAAC;AAE/B,QAAA,eAAe,GAAG,IAAI,6BAAa,CAAe,sBAAc,EAAE;IAC7E,MAAM,EAAE,kBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const web3_js_1 = require("@solana/web3.js");
14
+ const constants_1 = require("./constants");
15
+ const clients_1 = require("../../utils/clients");
16
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
17
+ const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
18
+ const structs_1 = require("./structs");
19
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const client = (0, clients_1.getClientSolana)();
21
+ const loans = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.defiLoanStruct, constants_1.defiLendingProgramId)
22
+ .addFilter('accountDiscriminator', [20, 195, 70, 117, 165, 227, 182, 1])
23
+ .addFilter('borrower', new web3_js_1.PublicKey(owner))
24
+ .run();
25
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
26
+ loans.forEach((loan) => {
27
+ if (loan.status !== structs_1.LoanStatus.Ongoing)
28
+ return;
29
+ const element = elementRegistry.addElementBorrowlend({
30
+ label: 'Lending',
31
+ ref: loan.pubkey,
32
+ link: `https://app.rain.fi/dashboard/loans?address=${loan.pubkey}`,
33
+ });
34
+ element.setFixedTerms(false, loan.expiredAt.multipliedBy(1000));
35
+ element.addSuppliedAsset({
36
+ address: loan.collateral,
37
+ amount: loan.collateralAmount,
38
+ });
39
+ element.addBorrowedAsset({
40
+ address: loan.principal,
41
+ amount: loan.borrowedAmount,
42
+ });
43
+ });
44
+ return elementRegistry.getElements(cache);
45
+ });
46
+ const fetcher = {
47
+ id: `${constants_1.platformId}-defi-borrows`,
48
+ networkId: portfolio_core_1.NetworkId.solana,
49
+ executor,
50
+ };
51
+ exports.default = fetcher;
52
+ //# sourceMappingURL=defiBorrowsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defiBorrowsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/defiBorrowsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,gFAA6E;AAC7E,kEAA+D;AAC/D,uCAAuD;AAEvD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,qBAAS,CAAC,KAAK,CACjC,MAAM,EACN,wBAAc,EACd,gCAAoB,CACrB;SACE,SAAS,CAAC,sBAAsB,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE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ports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
- const poolsFetcher_1 = __importDefault(require("./poolsFetcher"));
9
- const loansFetcher_1 = __importDefault(require("./loansFetcher"));
10
8
  const collectionsJob_1 = __importDefault(require("./collectionsJob"));
9
+ const poolsFetcher_1 = __importDefault(require("./poolsFetcher"));
10
+ const banksFetcher_1 = __importDefault(require("./banksFetcher"));
11
+ const defiBorrowsFetcher_1 = __importDefault(require("./defiBorrowsFetcher"));
12
+ const nftBorrowsFetcher_1 = __importDefault(require("./nftBorrowsFetcher"));
11
13
  exports.platforms = [constants_1.platform];
12
14
  exports.jobs = [collectionsJob_1.default];
13
- exports.fetchers = [poolsFetcher_1.default, loansFetcher_1.default];
15
+ exports.fetchers = [
16
+ defiBorrowsFetcher_1.default,
17
+ nftBorrowsFetcher_1.default,
18
+ poolsFetcher_1.default,
19
+ banksFetcher_1.default,
20
+ ];
14
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,kEAA0C;AAC1C,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,wBAAc,CAAC,CAAC;AAC/B,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAC9C,kEAA0C;AAC1C,kEAA0C;AAC1C,8EAAsD;AACtD,4EAAoD;AAEvC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,wBAAc,CAAC,CAAC;AAC/B,QAAA,QAAQ,GAAc;IACjC,4BAAkB;IAClB,2BAAiB;IACjB,sBAAY;IACZ,sBAAY;CACb,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;