@sonarwatch/portfolio-plugins 0.14.132 → 0.14.133
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.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/plugins/citrus/loansFetcher.js +34 -68
- package/src/plugins/citrus/loansFetcher.js.map +1 -1
- package/src/plugins/debridge/dlmmVaultsFetcher.js +1 -0
- package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js +1 -1
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
- package/src/plugins/rain/banksFetcher.js +47 -0
- package/src/plugins/rain/banksFetcher.js.map +1 -0
- package/src/plugins/rain/collectionsJob.js +9 -7
- package/src/plugins/rain/collectionsJob.js.map +1 -1
- package/src/plugins/rain/constants.d.ts +7 -2
- package/src/plugins/rain/constants.js +11 -3
- package/src/plugins/rain/constants.js.map +1 -1
- package/src/plugins/rain/defiBorrowsFetcher.d.ts +3 -0
- package/src/plugins/rain/defiBorrowsFetcher.js +52 -0
- package/src/plugins/rain/defiBorrowsFetcher.js.map +1 -0
- package/src/plugins/rain/index.js +10 -3
- package/src/plugins/rain/index.js.map +1 -1
- package/src/plugins/rain/nftBorrowsFetcher.d.ts +3 -0
- package/src/plugins/rain/nftBorrowsFetcher.js +76 -0
- package/src/plugins/rain/nftBorrowsFetcher.js.map +1 -0
- package/src/plugins/rain/poolsFetcher.js +79 -42
- package/src/plugins/rain/poolsFetcher.js.map +1 -1
- package/src/plugins/rain/structs.d.ts +455 -0
- package/src/plugins/rain/structs.js +425 -0
- package/src/plugins/rain/structs.js.map +1 -0
- package/src/plugins/rain/types.d.ts +18 -144
- package/src/plugins/sharky/loansFetcher.js +38 -73
- package/src/plugins/sharky/loansFetcher.js.map +1 -1
- package/src/utils/elementbuilder/AssetCollectibleBuilder.d.ts +10 -0
- package/src/utils/elementbuilder/AssetCollectibleBuilder.js +53 -0
- package/src/utils/elementbuilder/AssetCollectibleBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.d.ts +9 -1
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +41 -3
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
- package/src/utils/elementbuilder/ElementRegistry.js +9 -1
- package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
- package/src/utils/elementbuilder/Params.d.ts +14 -0
- package/src/utils/solana/das/heliusAssetToAssetCollectible.js +3 -2
- package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
- package/src/plugins/rain/filters.d.ts +0 -7
- package/src/plugins/rain/filters.js +0 -53
- package/src/plugins/rain/filters.js.map +0 -1
- package/src/plugins/rain/helpers.d.ts +0 -9
- package/src/plugins/rain/helpers.js +0 -66
- package/src/plugins/rain/helpers.js.map +0 -1
- package/src/plugins/rain/loansFetcher.js +0 -139
- package/src/plugins/rain/loansFetcher.js.map +0 -1
- package/src/plugins/rain/structs/loan.d.ts +0 -86
- package/src/plugins/rain/structs/loan.js +0 -86
- package/src/plugins/rain/structs/loan.js.map +0 -1
- package/src/plugins/rain/structs/pool.d.ts +0 -79
- package/src/plugins/rain/structs/pool.js +0 -76
- package/src/plugins/rain/structs/pool.js.map +0 -1
- /package/src/plugins/rain/{loansFetcher.d.ts → banksFetcher.d.ts} +0 -0
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.133](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.132...plugins-0.14.133) (2025-02-27)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.132](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.131...plugins-0.14.132) (2025-02-27)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -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,
|
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 (!
|
51
|
-
|
52
|
-
|
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
|
58
|
-
|
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
|
-
|
62
|
-
|
63
|
-
|
64
|
-
.
|
65
|
-
.
|
66
|
-
|
67
|
-
|
68
|
-
|
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 =
|
76
|
-
|
77
|
-
.
|
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
|
-
|
74
|
+
element.addSuppliedAsset(solAsset);
|
82
75
|
if (mintAsset)
|
83
|
-
|
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
|
-
|
97
|
-
|
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 (
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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
|
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,+
|
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,wBAAc,EAAC,KAAK,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,CAClB,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,qCAA4B,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OAAO,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;YAE9D,IAAI,GAAG,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC;gBAChC,IAAI,GAAG,cAAc,CAAC;YACxB,CAAC;iBAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;gBAClD,IAAI,GAAG,aAAa,CAAC;YACvB,CAAC;iBAAM,IAAI,GAAG,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;gBAChC,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,KAAK,KAAK,CAAC,QAAQ,EAAE,EAC/B,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM;YACpC,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,CAAmB,yBAAa,EAAE;QAClE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEjD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,GAAG,UAAU,EAAE,CAAC;QAC/C,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QAC9B,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAErB,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,qBAAY,EACZ,8BAAkB,EAClB;QACE,EAAE,QAAQ,EAAE,qBAAY,CAAC,QAAQ,EAAE;QACnC;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;KACF,CACF,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;QACT,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;QACzC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC;SACD,IAAI,EAAE,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IACnE,MAAM,cAAc,GAAG,QAAQ,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,iCAAiC;
|
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,G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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: '
|
54
|
+
label: 'SmartDCA',
|
55
55
|
data: {
|
56
56
|
assets: {
|
57
57
|
input: inputAsset,
|
@@ -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;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,I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K,EAAE,
|
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,EAAE,CAAC;QACpD,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACtD,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,IAAI,CAAC,gBAAgB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AO,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,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;A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awaiter = (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
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
yield cache.setItem(constants_1.collectionsKey,
|
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":"
|
1
|
+
{"version":3,"file":"collectionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/collectionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,2CAAoE;AAGpE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,iBAAiB,GACrB,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,qBAAS,wBAAwB,CAAC,CAAC;IACxD,IAAI,CAAC,iBAAiB,IAAI,CAAC,iBAAiB,CAAC,IAAI;QAC/C,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACpC,MAAM,EAAE,WAAW,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC;IAE/C,MAAM,KAAK,CAAC,OAAO,CAAC,0BAAc,EAAE,WAAW,EAAE;QAC/C,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,cAAc;IAC/B,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -2,8 +2,13 @@
|
|
2
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
|
8
|
-
export declare const
|
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.
|
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.
|
15
|
-
exports.
|
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;
|
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,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;AACv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,IAAI,CAAC,cAAc;SAC5B,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,eAAe;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -5,10 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__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 = [
|
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,
|
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,76 @@
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const web3_js_1 = require("@solana/web3.js");
|
17
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
|
+
const constants_1 = require("./constants");
|
19
|
+
const clients_1 = require("../../utils/clients");
|
20
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
21
|
+
const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
|
22
|
+
const structs_1 = require("./structs");
|
23
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
const client = (0, clients_1.getClientSolana)();
|
25
|
+
const loans = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.nftLoanStruct, constants_1.nftLendingProgramId)
|
26
|
+
.addFilter('accountDiscriminator', [20, 195, 70, 117, 165, 227, 182, 1])
|
27
|
+
.addFilter('borrower', new web3_js_1.PublicKey(owner))
|
28
|
+
.run();
|
29
|
+
if (!loans.length)
|
30
|
+
return [];
|
31
|
+
const [collections, solTokenPrice] = yield Promise.all([
|
32
|
+
constants_1.collectionsMemo.getItem(cache),
|
33
|
+
cache.getTokenPrice(portfolio_core_1.solanaNativeAddress, portfolio_core_1.NetworkId.solana),
|
34
|
+
]);
|
35
|
+
if (!collections.length)
|
36
|
+
throw new Error('Collections not cached');
|
37
|
+
if (!solTokenPrice)
|
38
|
+
throw new Error('Sol price not cached');
|
39
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
40
|
+
loans.forEach((loan) => {
|
41
|
+
if (loan.status !== structs_1.LoanStatus.Ongoing)
|
42
|
+
return;
|
43
|
+
const collection = collections.find((c) => c.collectionId === loan.collection);
|
44
|
+
if (!collection)
|
45
|
+
return;
|
46
|
+
const element = elementRegistry.addElementBorrowlend({
|
47
|
+
label: 'Lending',
|
48
|
+
ref: loan.pubkey,
|
49
|
+
link: `https://app.rain.fi/dashboard/loans?address=${loan.pubkey}`,
|
50
|
+
});
|
51
|
+
element.setFixedTerms(false, loan.expiredAt.multipliedBy(1000));
|
52
|
+
element.addSuppliedCollectibleAsset({
|
53
|
+
address: loan.collateral.toString(),
|
54
|
+
collection: {
|
55
|
+
name: collection.name,
|
56
|
+
floorPrice: new bignumber_js_1.default(collection.floorPrice)
|
57
|
+
.shiftedBy(-solTokenPrice.decimals)
|
58
|
+
.multipliedBy(solTokenPrice.price),
|
59
|
+
imageUri: collection.metadata.thumbnail,
|
60
|
+
},
|
61
|
+
attributes: { tags: [portfolio_core_1.collectibleFreezedTag] },
|
62
|
+
});
|
63
|
+
element.addBorrowedAsset({
|
64
|
+
address: loan.principal,
|
65
|
+
amount: loan.borrowedAmount,
|
66
|
+
});
|
67
|
+
});
|
68
|
+
return elementRegistry.getElements(cache);
|
69
|
+
});
|
70
|
+
const fetcher = {
|
71
|
+
id: `${constants_1.platformId}-nft-borrows`,
|
72
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
73
|
+
executor,
|
74
|
+
};
|
75
|
+
exports.default = fetcher;
|
76
|
+
//# sourceMappingURL=nftBorrowsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nftBorrowsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/nftBorrowsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,2CAA+E;AAC/E,iDAAsD;AACtD,gFAA6E;AAC7E,kEAA+D;AAC/D,uCAAsD;AAEtD,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,uBAAa,EACb,+BAAmB,CACpB;SACE,SAAS,CAAC,sBAAsB,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;SACvE,SAAS,CAAC,UAAU,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;SAC3C,GAAG,EAAE,CAAC;IAET,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,G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