@sonarwatch/portfolio-plugins 0.11.163 → 0.11.165
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +14 -6
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js +8 -4
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
- package/src/plugins/nosana/constants.d.ts +7 -0
- package/src/plugins/nosana/constants.js +17 -0
- package/src/plugins/nosana/constants.js.map +1 -0
- package/src/plugins/nosana/helpers.d.ts +2 -0
- package/src/plugins/nosana/helpers.js +14 -0
- package/src/plugins/nosana/helpers.js.map +1 -0
- package/src/plugins/nosana/index.d.ts +6 -0
- package/src/plugins/nosana/index.js +12 -0
- package/src/plugins/nosana/index.js.map +1 -0
- package/src/plugins/nosana/stakingFetcher.d.ts +3 -0
- package/src/plugins/nosana/stakingFetcher.js +56 -0
- package/src/plugins/nosana/stakingFetcher.js.map +1 -0
- package/src/plugins/nosana/structs.d.ts +15 -0
- package/src/plugins/nosana/structs.js +17 -0
- package/src/plugins/nosana/structs.js.map +1 -0
- package/src/plugins/rain/collectionsJob.d.ts +3 -0
- package/src/plugins/rain/collectionsJob.js +36 -0
- package/src/plugins/rain/collectionsJob.js.map +1 -0
- package/src/plugins/rain/constants.d.ts +7 -0
- package/src/plugins/rain/constants.js +17 -0
- package/src/plugins/rain/constants.js.map +1 -0
- package/src/plugins/rain/filters.d.ts +5 -0
- package/src/plugins/rain/filters.js +53 -0
- package/src/plugins/rain/filters.js.map +1 -0
- package/src/plugins/rain/helpers.d.ts +7 -0
- package/src/plugins/rain/helpers.js +64 -0
- package/src/plugins/rain/helpers.js.map +1 -0
- package/src/plugins/rain/index.d.ts +6 -0
- package/src/plugins/rain/index.js +13 -0
- package/src/plugins/rain/index.js.map +1 -0
- package/src/plugins/rain/loansFetcher.d.ts +3 -0
- package/src/plugins/rain/loansFetcher.js +105 -0
- package/src/plugins/rain/loansFetcher.js.map +1 -0
- package/src/plugins/rain/poolsFetcher.d.ts +3 -0
- package/src/plugins/rain/poolsFetcher.js +73 -0
- package/src/plugins/rain/poolsFetcher.js.map +1 -0
- package/src/plugins/rain/structs/loan.d.ts +84 -0
- package/src/plugins/rain/structs/loan.js +86 -0
- package/src/plugins/rain/structs/loan.js.map +1 -0
- package/src/plugins/rain/structs/pool.d.ts +77 -0
- package/src/plugins/rain/structs/pool.js +76 -0
- package/src/plugins/rain/structs/pool.js.map +1 -0
- package/src/plugins/rain/types.d.ts +154 -0
- package/src/plugins/rain/types.js +3 -0
- package/src/plugins/rain/types.js.map +1 -0
- package/src/plugins/raydium/constants.d.ts +3 -0
- package/src/plugins/raydium/constants.js +4 -1
- package/src/plugins/raydium/constants.js.map +1 -1
- package/src/plugins/raydium/filters.d.ts +1 -0
- package/src/plugins/raydium/filters.js +11 -1
- package/src/plugins/raydium/filters.js.map +1 -1
- package/src/plugins/raydium/helpers.d.ts +2 -0
- package/src/plugins/raydium/helpers.js +10 -1
- package/src/plugins/raydium/helpers.js.map +1 -1
- package/src/plugins/raydium/index.js +2 -1
- package/src/plugins/raydium/index.js.map +1 -1
- package/src/plugins/raydium/stakingFetcher.d.ts +3 -0
- package/src/plugins/raydium/stakingFetcher.js +50 -0
- package/src/plugins/raydium/stakingFetcher.js.map +1 -0
- package/src/plugins/raydium/structs/staking.d.ts +12 -0
- package/src/plugins/raydium/structs/staking.js +15 -0
- package/src/plugins/raydium/structs/staking.js.map +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,18 +2,26 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
-
## [0.11.
|
5
|
+
## [0.11.165](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.164...plugins-0.11.165) (2024-04-06)
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
## [0.11.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
## [0.11.161](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.160...plugins-0.11.161) (2024-04-04)
|
9
|
+
## [0.11.164](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.163...plugins-0.11.164) (2024-04-05)
|
14
10
|
|
15
11
|
|
16
12
|
|
13
|
+
## [0.11.163](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.162...plugins-0.11.163) (2024-04-04)
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
## [0.11.162](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.161...plugins-0.11.162) (2024-04-04)
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
## [0.11.161](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.160...plugins-0.11.161) (2024-04-04)
|
22
|
+
|
23
|
+
|
24
|
+
|
17
25
|
## [0.11.160](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.159...plugins-0.11.160) (2024-04-04)
|
18
26
|
|
19
27
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.165",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"web3-v1": "npm:web3@^1.5.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
|
-
"@sonarwatch/portfolio-core": "0.11.
|
44
|
+
"@sonarwatch/portfolio-core": "0.11.165"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -73,6 +73,7 @@ const yearn_1 = require("./plugins/yearn");
|
|
73
73
|
const atrix_1 = require("./plugins/atrix");
|
74
74
|
const _01_1 = require("./plugins/01");
|
75
75
|
const goosefx_1 = require("./plugins/goosefx");
|
76
|
+
const rain_1 = require("./plugins/rain");
|
76
77
|
const lifinity_1 = require("./plugins/lifinity");
|
77
78
|
const port_1 = require("./plugins/port");
|
78
79
|
const instadapp_1 = require("./plugins/instadapp");
|
@@ -101,6 +102,7 @@ const phoenix_1 = require("./plugins/phoenix");
|
|
101
102
|
const uxd_1 = require("./plugins/uxd");
|
102
103
|
const wormhole_1 = require("./plugins/wormhole");
|
103
104
|
const banx_1 = require("./plugins/banx");
|
105
|
+
const nosana_1 = require("./plugins/nosana");
|
104
106
|
var constants_1 = require("./plugins/tokens/constants");
|
105
107
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
106
108
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -166,6 +168,7 @@ exports.platforms = [
|
|
166
168
|
...atrix_1.platforms,
|
167
169
|
..._01_1.platforms,
|
168
170
|
...goosefx_1.platforms,
|
171
|
+
...rain_1.platforms,
|
169
172
|
...lifinity_1.platforms,
|
170
173
|
...port_1.platforms,
|
171
174
|
...instadapp_1.platforms,
|
@@ -195,6 +198,7 @@ exports.platforms = [
|
|
195
198
|
...uxd_1.platforms,
|
196
199
|
...wormhole_1.platforms,
|
197
200
|
...banx_1.platforms,
|
201
|
+
...nosana_1.platforms,
|
198
202
|
];
|
199
203
|
// JOBS //
|
200
204
|
exports.jobs = [
|
@@ -244,6 +248,7 @@ exports.jobs = [
|
|
244
248
|
...atrix_1.jobs,
|
245
249
|
..._01_1.jobs,
|
246
250
|
...goosefx_1.jobs,
|
251
|
+
...rain_1.jobs,
|
247
252
|
...lifinity_1.jobs,
|
248
253
|
...port_1.jobs,
|
249
254
|
...instadapp_1.jobs,
|
@@ -272,6 +277,7 @@ exports.jobs = [
|
|
272
277
|
...uxd_1.jobs,
|
273
278
|
...wormhole_1.jobs,
|
274
279
|
...banx_1.jobs,
|
280
|
+
...nosana_1.jobs,
|
275
281
|
];
|
276
282
|
// FETCHERS //
|
277
283
|
exports.fetchers = [
|
@@ -322,6 +328,7 @@ exports.fetchers = [
|
|
322
328
|
...atrix_1.fetchers,
|
323
329
|
..._01_1.fetchers,
|
324
330
|
...goosefx_1.fetchers,
|
331
|
+
...rain_1.fetchers,
|
325
332
|
...lifinity_1.fetchers,
|
326
333
|
...port_1.fetchers,
|
327
334
|
...instadapp_1.fetchers,
|
@@ -351,6 +358,7 @@ exports.fetchers = [
|
|
351
358
|
...uxd_1.fetchers,
|
352
359
|
...wormhole_1.fetchers,
|
353
360
|
...banx_1.fetchers,
|
361
|
+
...nosana_1.fetchers,
|
354
362
|
];
|
355
363
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
356
364
|
//# sourceMappingURL=index.js.map
|
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;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,6CAI0B;AAC1B,iEAIoC;AACpC,6DAIkC;AAClC,yCAIwB;AACxB,uCAIuB;AACvB,+CAI2B;AAC3B,iDAI4B;AAC5B,mDAI6B;AAC7B,2CAIyB;AACzB,+CAI2B;AAC3B,uCAIuB;AACvB,iDAI4B;AAC5B,yCAIwB;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAI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,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,eAAY;IACf,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;CAClB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
|
@@ -24,7 +24,13 @@ const constants_1 = require("./constants");
|
|
24
24
|
const solana_1 = require("../../../utils/solana");
|
25
25
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
26
|
const client = (0, clients_1.getClientSolana)();
|
27
|
-
const claimsProof = yield Promise.all(constants_1.airdropsInfo.map((info) =>
|
27
|
+
const claimsProof = yield Promise.all(constants_1.airdropsInfo.map((info) => {
|
28
|
+
if (info.claimUntilTs < Date.now())
|
29
|
+
return axios_1.default
|
30
|
+
.get(`${constants_1.merkleApi}/${info.mint}/${owner}`)
|
31
|
+
.catch(() => null);
|
32
|
+
return null;
|
33
|
+
}));
|
28
34
|
const eligibleAirdrops = [];
|
29
35
|
const proofs = [];
|
30
36
|
for (let i = 0; i < claimsProof.length; i++) {
|
@@ -44,9 +50,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
44
50
|
if (claimStatus)
|
45
51
|
continue;
|
46
52
|
const proof = proofs[j];
|
47
|
-
const {
|
48
|
-
if (claimUntilTs < Date.now())
|
49
|
-
continue;
|
53
|
+
const { decimals, mint } = eligibleAirdrops[j];
|
50
54
|
const tokenPrice = tokenPriceById.get(mint);
|
51
55
|
const amount = new bignumber_js_1.default(proof.amount)
|
52
56
|
.dividedBy(Math.pow(10, decimals))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"allocationsFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/allocationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AAGrC,oDAAyD;AAEzD,wCAA+C;AAC/C,wGAAgF;AAChF,uCAA8C;AAC9C,2CAMqB;AACrB,kDAAsE;AAEtE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GACf,MAAM,OAAO,CAAC,GAAG,CACf,wBAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"allocationsFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/allocationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AAGrC,oDAAyD;AAEzD,wCAA+C;AAC/C,wGAAgF;AAChF,uCAA8C;AAC9C,2CAMqB;AACrB,kDAAsE;AAEtE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAA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AC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,kCAAsB,aAAa;IAC1C,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "nosana";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const nosMint = "nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7";
|
6
|
+
export declare const nosDecimals = 6;
|
7
|
+
export declare const nosanaStakingPid: PublicKey;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.nosanaStakingPid = exports.nosDecimals = exports.nosMint = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'nosana';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Nosana',
|
9
|
+
image: 'https://sonar.watch/img/platforms/nosana.png',
|
10
|
+
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
11
|
+
website: 'https://app.nosana.io/',
|
12
|
+
twitter: 'https://twitter.com/nosana_ci',
|
13
|
+
};
|
14
|
+
exports.nosMint = 'nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7';
|
15
|
+
exports.nosDecimals = 6;
|
16
|
+
exports.nosanaStakingPid = new web3_js_1.PublicKey('nosScmHY2uR24Zh751PmGj9ww9QRNHewh9H59AfrTJE');
|
17
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,qEAAqE;IACrE,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,+BAA+B;CACzC,CAAC;AAEW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getStakePubKey = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
const constants_1 = require("./constants");
|
6
|
+
function getStakePubKey(owner) {
|
7
|
+
return web3_js_1.PublicKey.findProgramAddressSync([
|
8
|
+
Buffer.from('stake', 'utf8'),
|
9
|
+
new web3_js_1.PublicKey(constants_1.nosMint).toBuffer(),
|
10
|
+
new web3_js_1.PublicKey(owner).toBuffer(),
|
11
|
+
], constants_1.nosanaStakingPid)[0];
|
12
|
+
}
|
13
|
+
exports.getStakePubKey = getStakePubKey;
|
14
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAAwD;AAExD,SAAgB,cAAc,CAAC,KAAa;IAC1C,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC;QAC5B,IAAI,mBAAS,CAAC,mBAAO,CAAC,CAAC,QAAQ,EAAE;QACjC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;KAChC,EACD,4BAAgB,CACjB,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AATD,wCASC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,56 @@
|
|
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 bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const clients_1 = require("../../utils/clients");
|
19
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
|
+
const structs_1 = require("./structs");
|
21
|
+
const helpers_1 = require("./helpers");
|
22
|
+
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
23
|
+
const nosFactor = new bignumber_js_1.default(Math.pow(10, constants_1.nosDecimals));
|
24
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
|
+
const client = (0, clients_1.getClientSolana)();
|
26
|
+
const stakeAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.stakeStruct, (0, helpers_1.getStakePubKey)(owner));
|
27
|
+
if (!stakeAccount || stakeAccount.amount.isZero())
|
28
|
+
return [];
|
29
|
+
const lockedUntil = stakeAccount.timeUnstake.isZero()
|
30
|
+
? undefined
|
31
|
+
: stakeAccount.timeUnstake
|
32
|
+
.plus(stakeAccount.duration)
|
33
|
+
.times(1000)
|
34
|
+
.toNumber();
|
35
|
+
const tokenPrice = yield cache.getTokenPrice(constants_1.nosMint, portfolio_core_1.NetworkId.solana);
|
36
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.nosMint, stakeAccount.amount.dividedBy(nosFactor).toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { lockedUntil });
|
37
|
+
return [
|
38
|
+
{
|
39
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
40
|
+
platformId: constants_1.platformId,
|
41
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
42
|
+
label: 'Staked',
|
43
|
+
value: asset.value,
|
44
|
+
data: {
|
45
|
+
assets: [asset],
|
46
|
+
},
|
47
|
+
},
|
48
|
+
];
|
49
|
+
});
|
50
|
+
const fetcher = {
|
51
|
+
id: `${constants_1.platformId}-staking`,
|
52
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
53
|
+
executor,
|
54
|
+
};
|
55
|
+
exports.default = fetcher;
|
56
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAC7E,gEAAqC;AAGrC,2CAA+D;AAC/D,iDAAsD;AACtD,qGAA6E;AAC7E,uCAAwC;AACxC,uCAA2C;AAC3C,kFAA+E;AAE/E,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AAEnD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,IAAA,2CAAoB,EAC7C,MAAM,EACN,qBAAW,EACX,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IACF,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,CAAC;IAE7D,MAAM,WAAW,GAAG,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE;QACnD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,YAAY,CAAC,WAAW;aACrB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;aAC3B,KAAK,CAAC,IAAI,CAAC;aACX,QAAQ,EAAE,CAAC;IAElB,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,mBAAO,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IACxE,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,mBAAO,EACP,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,EACnD,0BAAS,CAAC,MAAM,EAChB,UAAU,EACV,SAAS,EACT,EAAE,WAAW,EAAE,CAChB,CAAC;IAEF,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export type Stake = {
|
6
|
+
buffer: Buffer;
|
7
|
+
amount: BigNumber;
|
8
|
+
authorithy: PublicKey;
|
9
|
+
duration: BigNumber;
|
10
|
+
timeUnstake: BigNumber;
|
11
|
+
vault: PublicKey;
|
12
|
+
vaultBump: number;
|
13
|
+
xNos: BigNumber;
|
14
|
+
};
|
15
|
+
export declare const stakeStruct: BeetStruct<Stake, Partial<Stake>>;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stakeStruct = 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.stakeStruct = new beet_1.BeetStruct([
|
8
|
+
['buffer', (0, solana_1.blob)(8)],
|
9
|
+
['amount', solana_1.u64],
|
10
|
+
['authorithy', beet_solana_1.publicKey],
|
11
|
+
['duration', solana_1.u64],
|
12
|
+
['timeUnstake', solana_1.i64],
|
13
|
+
['vault', beet_solana_1.publicKey],
|
14
|
+
['vaultBump', beet_1.u8],
|
15
|
+
['xNos', solana_1.u128],
|
16
|
+
], (args) => args);
|
17
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nosana/structs.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,kEAA6D;AAG7D,+CAA0D;AAa7C,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB,CAAC,MAAM,EAAE,aAAI,CAAC;CACf,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
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 constants_1 = require("./constants");
|
14
|
+
const helpers_1 = require("./helpers");
|
15
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
16
|
+
const collections = yield (0, helpers_1.getCollections)();
|
17
|
+
const promises = [];
|
18
|
+
for (const collecion of collections) {
|
19
|
+
promises.push(cache.setItem(collecion.collectionId.toString(), collecion, {
|
20
|
+
prefix: constants_1.platformId,
|
21
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
22
|
+
}));
|
23
|
+
}
|
24
|
+
promises.push(cache.setItem(constants_1.collectionsKey, collections, {
|
25
|
+
prefix: constants_1.platformId,
|
26
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
27
|
+
}));
|
28
|
+
yield Promise.all(promises);
|
29
|
+
});
|
30
|
+
const job = {
|
31
|
+
id: `${constants_1.platformId}-collections`,
|
32
|
+
executor,
|
33
|
+
label: 'normal',
|
34
|
+
};
|
35
|
+
exports.default = job;
|
36
|
+
//# sourceMappingURL=collectionsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"collectionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/collectionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAyD;AACzD,uCAA2C;AAE3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,WAAW,GAAG,MAAM,IAAA,wBAAc,GAAE,CAAC;IAC3C,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CACX,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE;YAC1D,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CACH,CAAC;IACJ,CAAC;IACD,QAAQ,CAAC,IAAI,CACX,KAAK,CAAC,OAAO,CAAC,0BAAc,EAAE,WAAW,EAAE;QACzC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CACH,CAAC;IAEF,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "rain";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const programId: PublicKey;
|
6
|
+
export declare const rainApi = "https://api-v2.rain.fi";
|
7
|
+
export declare const collectionsKey = "collections";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.collectionsKey = exports.rainApi = exports.programId = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'rain';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Rain',
|
9
|
+
image: 'https://sonar.watch/img/platforms/rain.png',
|
10
|
+
defiLlamaId: 'rain.fi', // from https://defillama.com/docs/api
|
11
|
+
website: 'https://rain.fi/',
|
12
|
+
twitter: 'https://twitter.com/RainFi_',
|
13
|
+
};
|
14
|
+
exports.programId = new web3_js_1.PublicKey('RainEraPU5yDoJmTrHdYynK9739GkEfDsE4ffqce2BR');
|
15
|
+
exports.rainApi = 'https://api-v2.rain.fi';
|
16
|
+
exports.collectionsKey = 'collections';
|
17
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +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,4CAA4C;IACnD,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"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { GetProgramAccountsFilter } from '@solana/web3.js';
|
2
|
+
export declare const poolFilter: (owner: string) => GetProgramAccountsFilter[];
|
3
|
+
export declare const loanBorrowerFilter: (owner: string) => GetProgramAccountsFilter[];
|
4
|
+
export declare const loanLenderFilter: (owner: string) => GetProgramAccountsFilter[];
|
5
|
+
export declare const assetFilters: (owner: string) => GetProgramAccountsFilter[];
|
@@ -0,0 +1,53 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.assetFilters = exports.loanLenderFilter = exports.loanBorrowerFilter = exports.poolFilter = void 0;
|
4
|
+
const loan_1 = require("./structs/loan");
|
5
|
+
const poolFilter = (owner) => [
|
6
|
+
{
|
7
|
+
memcmp: {
|
8
|
+
offset: 9,
|
9
|
+
bytes: owner,
|
10
|
+
},
|
11
|
+
},
|
12
|
+
{
|
13
|
+
dataSize: 1331,
|
14
|
+
},
|
15
|
+
];
|
16
|
+
exports.poolFilter = poolFilter;
|
17
|
+
const loanBorrowerFilter = (owner) => [
|
18
|
+
{
|
19
|
+
memcmp: {
|
20
|
+
offset: 10,
|
21
|
+
bytes: owner,
|
22
|
+
},
|
23
|
+
},
|
24
|
+
{
|
25
|
+
dataSize: 1080,
|
26
|
+
},
|
27
|
+
];
|
28
|
+
exports.loanBorrowerFilter = loanBorrowerFilter;
|
29
|
+
const loanLenderFilter = (owner) => [
|
30
|
+
{
|
31
|
+
memcmp: {
|
32
|
+
offset: 42,
|
33
|
+
bytes: owner,
|
34
|
+
},
|
35
|
+
},
|
36
|
+
{
|
37
|
+
dataSize: 1080,
|
38
|
+
},
|
39
|
+
];
|
40
|
+
exports.loanLenderFilter = loanLenderFilter;
|
41
|
+
const assetFilters = (owner) => [
|
42
|
+
{
|
43
|
+
memcmp: {
|
44
|
+
offset: 16,
|
45
|
+
bytes: owner,
|
46
|
+
},
|
47
|
+
},
|
48
|
+
{
|
49
|
+
dataSize: loan_1.assetStruct.byteSize,
|
50
|
+
},
|
51
|
+
];
|
52
|
+
exports.assetFilters = assetFilters;
|
53
|
+
//# sourceMappingURL=filters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/filters.ts"],"names":[],"mappings":";;;AACA,yCAA6C;AAEtC,MAAM,UAAU,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACvE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAVW,QAAA,UAAU,cAUrB;AAEK,MAAM,kBAAkB,GAAG,CAChC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAZW,QAAA,kBAAkB,sBAY7B;AAEK,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC7E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,kBAAW,CAAC,QAAQ;KAC/B;CACF,CAAC;AAVW,QAAA,YAAY,gBAUvB"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Collection, Pool } from './types';
|
3
|
+
export declare function getPool(pool: string): Promise<Pool | undefined>;
|
4
|
+
export declare function getCollections(): Promise<Collection[]>;
|
5
|
+
export declare function getPoolPda(owner: PublicKey): PublicKey;
|
6
|
+
export declare function getLoans(owner: string): Promise<import("./types").Loan[]>;
|
7
|
+
export declare function daysBetweenDates(start: Date, end: Date): number;
|
@@ -0,0 +1,64 @@
|
|
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
|
+
exports.daysBetweenDates = exports.getLoans = exports.getPoolPda = exports.getCollections = exports.getPool = void 0;
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
17
|
+
const web3_js_1 = require("@solana/web3.js");
|
18
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
19
|
+
const constants_1 = require("./constants");
|
20
|
+
const oneDay = 1000 * 60 * 60 * 24;
|
21
|
+
function getPool(pool) {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const getPoolsRes = yield axios_1.default
|
24
|
+
.get(`${constants_1.rainApi}/pools/pool?pubkey=${pool}`)
|
25
|
+
.catch(() => null);
|
26
|
+
if (!getPoolsRes || !getPoolsRes.data)
|
27
|
+
return undefined;
|
28
|
+
return getPoolsRes.data.pool;
|
29
|
+
});
|
30
|
+
}
|
31
|
+
exports.getPool = getPool;
|
32
|
+
function getCollections() {
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
34
|
+
const getCollectionsRes = yield axios_1.default.get(`${constants_1.rainApi}/collections`).catch(() => null);
|
35
|
+
if (!getCollectionsRes || !getCollectionsRes.data)
|
36
|
+
return [];
|
37
|
+
return getCollectionsRes.data.collections;
|
38
|
+
});
|
39
|
+
}
|
40
|
+
exports.getCollections = getCollections;
|
41
|
+
function getPoolPda(owner) {
|
42
|
+
return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('poolv2', 'utf-8'), owner.toBuffer()], constants_1.programId)[0];
|
43
|
+
}
|
44
|
+
exports.getPoolPda = getPoolPda;
|
45
|
+
function getLoans(owner) {
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
47
|
+
const getLoansRes = yield axios_1.default
|
48
|
+
.get(`${constants_1.rainApi}/loans/user?pubkey=${owner}`)
|
49
|
+
.catch(() => null);
|
50
|
+
if (!getLoansRes || getLoansRes.data.ongoingCount === 0)
|
51
|
+
return [];
|
52
|
+
return getLoansRes.data.loans;
|
53
|
+
});
|
54
|
+
}
|
55
|
+
exports.getLoans = getLoans;
|
56
|
+
function daysBetweenDates(start, end) {
|
57
|
+
return new bignumber_js_1.default(end.getTime())
|
58
|
+
.minus(start.getTime())
|
59
|
+
.dividedBy(oneDay)
|
60
|
+
.decimalPlaces(0, bignumber_js_1.default.ROUND_DOWN)
|
61
|
+
.toNumber();
|
62
|
+
}
|
63
|
+
exports.daysBetweenDates = daysBetweenDates;
|
64
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAiD;AASjD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEnC,SAAsB,OAAO,CAAC,IAAY;;QACxC,MAAM,WAAW,GAAuC,MAAM,eAAK;aAChE,GAAG,CAAC,GAAG,mBAAO,sBAAsB,IAAI,EAAE,CAAC;aAC3C,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI;YAAE,OAAO,SAAS,CAAC;QACxD,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;CAAA;AAND,0BAMC;AAED,SAAsB,cAAc;;QAClC,MAAM,iBAAiB,GACrB,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,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{ "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const poolsFetcher_1 = __importDefault(require("./poolsFetcher"));
|
9
|
+
const loansFetcher_1 = __importDefault(require("./loansFetcher"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [];
|
12
|
+
exports.fetchers = [poolsFetcher_1.default, loansFetcher_1.default];
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC"}
|