@sonarwatch/portfolio-plugins 0.11.93 → 0.11.95
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/aurory/constants.d.ts +9 -0
- package/src/plugins/aurory/constants.js +19 -0
- package/src/plugins/aurory/constants.js.map +1 -0
- package/src/plugins/aurory/helpers.d.ts +2 -0
- package/src/plugins/aurory/helpers.js +21 -0
- package/src/plugins/aurory/helpers.js.map +1 -0
- package/src/plugins/aurory/index.d.ts +6 -0
- package/src/plugins/aurory/index.js +12 -0
- package/src/plugins/aurory/index.js.map +1 -0
- package/src/plugins/aurory/stakingFetcher.d.ts +3 -0
- package/src/plugins/aurory/stakingFetcher.js +47 -0
- package/src/plugins/aurory/stakingFetcher.js.map +1 -0
- package/src/plugins/aurory/structs.d.ts +10 -0
- package/src/plugins/aurory/structs.js +11 -0
- package/src/plugins/aurory/structs.js.map +1 -0
- package/src/plugins/flash/constants.js +1 -0
- package/src/plugins/flash/constants.js.map +1 -1
- package/src/plugins/flash/poolJob.js +3 -2
- package/src/plugins/flash/poolJob.js.map +1 -1
- package/src/plugins/flash/stakeFetcher.js +2 -0
- package/src/plugins/flash/stakeFetcher.js.map +1 -1
- package/src/plugins/flash/structs.d.ts +1 -0
- package/src/plugins/flash/structs.js +26 -1
- package/src/plugins/flash/structs.js.map +1 -1
- package/src/plugins/flowmatic/stakingFetcher.js +4 -0
- package/src/plugins/flowmatic/stakingFetcher.js.map +1 -1
- package/src/plugins/genesysgo/stakingFetcher.js +4 -0
- package/src/plugins/genesysgo/stakingFetcher.js.map +1 -1
- package/src/plugins/kamino/constants.d.ts +3 -3
- package/src/plugins/kamino/constants.js +53 -44
- package/src/plugins/kamino/constants.js.map +1 -1
- package/src/plugins/kamino/helpers/pdas.d.ts +2 -2
- package/src/plugins/kamino/helpers/pdas.js +28 -15
- package/src/plugins/kamino/helpers/pdas.js.map +1 -1
- package/src/plugins/kamino/index.js +2 -1
- package/src/plugins/kamino/index.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +158 -140
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/kamino/marketsJob.d.ts +3 -0
- package/src/plugins/kamino/marketsJob.js +29 -0
- package/src/plugins/kamino/marketsJob.js.map +1 -0
- package/src/plugins/kamino/types.d.ts +5 -0
- package/src/plugins/x-staking-solana/constants.d.ts +16 -0
- package/src/plugins/x-staking-solana/constants.js +64 -0
- package/src/plugins/x-staking-solana/constants.js.map +1 -0
- package/src/plugins/x-staking-solana/index.d.ts +6 -0
- package/src/plugins/x-staking-solana/index.js +15 -0
- package/src/plugins/x-staking-solana/index.js.map +1 -0
- package/src/plugins/x-staking-solana/stakingJob.d.ts +3 -0
- package/src/plugins/x-staking-solana/stakingJob.js +49 -0
- package/src/plugins/x-staking-solana/stakingJob.js.map +1 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.reservesKey = exports.marketsKey = exports.
|
3
|
+
exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.programId = exports.kaminoPlatform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'kamino';
|
6
6
|
exports.kaminoPlatform = {
|
@@ -14,51 +14,60 @@ exports.programId = new web3_js_1.PublicKey('6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY
|
|
14
14
|
exports.klendProgramId = new web3_js_1.PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
|
15
15
|
exports.farmProgramId = new web3_js_1.PublicKey('FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr');
|
16
16
|
exports.farmsKey = 'farms';
|
17
|
-
exports.
|
18
|
-
exports.
|
17
|
+
exports.mainMarket = '7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF';
|
18
|
+
exports.lendingConfigs = new Map([
|
19
19
|
[
|
20
|
-
'
|
21
|
-
|
20
|
+
'7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF',
|
21
|
+
{
|
22
|
+
name: 'Main Market',
|
23
|
+
multiplyPairs: [
|
24
|
+
[
|
25
|
+
'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So',
|
26
|
+
'So11111111111111111111111111111111111111112',
|
27
|
+
],
|
28
|
+
[
|
29
|
+
'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn',
|
30
|
+
'So11111111111111111111111111111111111111112',
|
31
|
+
],
|
32
|
+
[
|
33
|
+
'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1',
|
34
|
+
'So11111111111111111111111111111111111111112',
|
35
|
+
],
|
36
|
+
],
|
37
|
+
leveragePairs: [
|
38
|
+
[
|
39
|
+
'6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU',
|
40
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
41
|
+
],
|
42
|
+
[
|
43
|
+
'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn',
|
44
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
45
|
+
],
|
46
|
+
[
|
47
|
+
'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1',
|
48
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
49
|
+
],
|
50
|
+
[
|
51
|
+
'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So',
|
52
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
53
|
+
],
|
54
|
+
[
|
55
|
+
'So11111111111111111111111111111111111111112',
|
56
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
57
|
+
],
|
58
|
+
[
|
59
|
+
'7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs',
|
60
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
61
|
+
],
|
62
|
+
[
|
63
|
+
'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
|
64
|
+
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
65
|
+
],
|
66
|
+
],
|
67
|
+
},
|
22
68
|
],
|
23
|
-
[
|
24
|
-
|
25
|
-
'So11111111111111111111111111111111111111112',
|
26
|
-
],
|
27
|
-
[
|
28
|
-
'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1',
|
29
|
-
'So11111111111111111111111111111111111111112',
|
30
|
-
],
|
31
|
-
];
|
32
|
-
exports.leveragePairs = [
|
33
|
-
[
|
34
|
-
'6DNSN2BJsaPFdFFc1zP37kkeNe4Usc1Sqkzr9C9vPWcU',
|
35
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
36
|
-
],
|
37
|
-
[
|
38
|
-
'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn',
|
39
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
40
|
-
],
|
41
|
-
[
|
42
|
-
'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1',
|
43
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
44
|
-
],
|
45
|
-
[
|
46
|
-
'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So',
|
47
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
48
|
-
],
|
49
|
-
[
|
50
|
-
'So11111111111111111111111111111111111111112',
|
51
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
52
|
-
],
|
53
|
-
[
|
54
|
-
'7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs',
|
55
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
56
|
-
],
|
57
|
-
[
|
58
|
-
'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
|
59
|
-
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
|
60
|
-
],
|
61
|
-
];
|
69
|
+
['DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek', { name: 'JLP Market' }],
|
70
|
+
]);
|
62
71
|
exports.marketsKey = `markets`;
|
63
72
|
exports.reservesKey = `reserves`;
|
64
73
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,cAAc,GAAa;IACtC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AACW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAE5D,QAAA,cAAc,GAAqC,IAAI,GAAG,CAAC;IACtE;QACE,8CAA8C;QAC9C;YACE,IAAI,EAAE,aAAa;YACnB,aAAa,EAAE;gBACb;oBACE,6CAA6C;oBAC7C,6CAA6C;iBAC9C;gBACD;oBACE,8CAA8C;oBAC9C,6CAA6C;iBAC9C;gBACD;oBACE,6CAA6C;oBAC7C,6CAA6C;iBAC9C;aACF;YACD,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;CACzE,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
|
-
export declare function getLendingPda(owner: string): PublicKey;
|
3
|
-
export declare function getMultiplyPdas(owner: string): PublicKey[];
|
2
|
+
export declare function getLendingPda(owner: string, markets: string[]): PublicKey[];
|
3
|
+
export declare function getMultiplyPdas(owner: string, markets: string[]): PublicKey[];
|
4
4
|
export declare function getLeveragePdas(owner: string): PublicKey[];
|
@@ -3,34 +3,47 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getLeveragePdas = exports.getMultiplyPdas = exports.getLendingPda = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
const constants_1 = require("../constants");
|
6
|
-
function getLendingPda(owner) {
|
7
|
-
return web3_js_1.PublicKey.findProgramAddressSync([
|
6
|
+
function getLendingPda(owner, markets) {
|
7
|
+
return markets.map((market) => web3_js_1.PublicKey.findProgramAddressSync([
|
8
8
|
Buffer.from([0]),
|
9
9
|
Buffer.from([0]),
|
10
10
|
new web3_js_1.PublicKey(owner).toBuffer(),
|
11
|
-
new web3_js_1.PublicKey(
|
11
|
+
new web3_js_1.PublicKey(market).toBuffer(),
|
12
12
|
web3_js_1.PublicKey.default.toBuffer(),
|
13
13
|
web3_js_1.PublicKey.default.toBuffer(),
|
14
|
-
], constants_1.klendProgramId)[0];
|
14
|
+
], constants_1.klendProgramId)[0]);
|
15
15
|
}
|
16
16
|
exports.getLendingPda = getLendingPda;
|
17
|
-
function getMultiplyPdas(owner) {
|
18
|
-
return
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
17
|
+
function getMultiplyPdas(owner, markets) {
|
18
|
+
return markets
|
19
|
+
.map((market) => {
|
20
|
+
const config = constants_1.lendingConfigs.get(market);
|
21
|
+
if (!config || !config.multiplyPairs)
|
22
|
+
return [];
|
23
|
+
return config.multiplyPairs.map((pair) => web3_js_1.PublicKey.findProgramAddressSync([
|
24
|
+
Buffer.from([1]),
|
25
|
+
Buffer.from([0]),
|
26
|
+
new web3_js_1.PublicKey(owner).toBuffer(),
|
27
|
+
new web3_js_1.PublicKey(market).toBuffer(),
|
28
|
+
new web3_js_1.PublicKey(pair[0]).toBuffer(),
|
29
|
+
new web3_js_1.PublicKey(pair[1]).toBuffer(),
|
30
|
+
], constants_1.klendProgramId)[0]);
|
31
|
+
})
|
32
|
+
.flat();
|
26
33
|
}
|
27
34
|
exports.getMultiplyPdas = getMultiplyPdas;
|
28
35
|
function getLeveragePdas(owner) {
|
29
|
-
|
36
|
+
const mainMarketConfig = constants_1.lendingConfigs.get(constants_1.mainMarket);
|
37
|
+
if (!mainMarketConfig)
|
38
|
+
return [];
|
39
|
+
const { leveragePairs } = mainMarketConfig;
|
40
|
+
if (!leveragePairs)
|
41
|
+
return [];
|
42
|
+
return leveragePairs.map((tokens) => web3_js_1.PublicKey.findProgramAddressSync([
|
30
43
|
Buffer.from([3]),
|
31
44
|
Buffer.from([0]),
|
32
45
|
new web3_js_1.PublicKey(owner).toBuffer(),
|
33
|
-
new web3_js_1.PublicKey(constants_1.
|
46
|
+
new web3_js_1.PublicKey(constants_1.mainMarket).toBuffer(),
|
34
47
|
new web3_js_1.PublicKey(tokens[0]).toBuffer(),
|
35
48
|
new web3_js_1.PublicKey(tokens[1]).toBuffer(),
|
36
49
|
], constants_1.klendProgramId)[0]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pdas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/pdas.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,
|
1
|
+
{"version":3,"file":"pdas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/pdas.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,4CAA0E;AAE1E,SAAgB,aAAa,CAAC,KAAa,EAAE,OAAiB;IAC5D,OAAO,OAAO,CAAC,GAAG,CAChB,CAAC,MAAM,EAAE,EAAE,CACT,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,IAAI,mBAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;QAChC,mBAAS,CAAC,OAAO,CAAC,QAAQ,EAAE;QAC5B,mBAAS,CAAC,OAAO,CAAC,QAAQ,EAAE;KAC7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AAE,CACT,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAChB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,IAAI,mBAAS,CAAC,sBAAU,CAAC,CAAC,QAAQ,EAAE;QACpC,IAAI,mBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACnC,IAAI,mBAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KACpC,EACD,0BAAc,CACf,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AArBD,0CAqBC"}
|
@@ -8,9 +8,10 @@ const constants_1 = require("./constants");
|
|
8
8
|
const poolsJob_1 = __importDefault(require("./poolsJob"));
|
9
9
|
const farmsJob_1 = __importDefault(require("./farmsJob"));
|
10
10
|
const reservesJob_1 = __importDefault(require("./reservesJob"));
|
11
|
+
const marketsJob_1 = __importDefault(require("./marketsJob"));
|
11
12
|
const lendsFetcher_1 = __importDefault(require("./lendsFetcher"));
|
12
13
|
const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
|
13
14
|
exports.platforms = [constants_1.kaminoPlatform];
|
14
|
-
exports.jobs = [poolsJob_1.default, reservesJob_1.default, farmsJob_1.default];
|
15
|
+
exports.jobs = [poolsJob_1.default, reservesJob_1.default, farmsJob_1.default, marketsJob_1.default];
|
15
16
|
exports.fetchers = [lendsFetcher_1.default, farmsFetcher_1.default];
|
16
17
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA6C;AAC7C,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,kEAA0C;AAC1C,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,qBAAW,EAAE,kBAAQ,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA6C;AAC7C,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,8DAAsC;AACtC,kEAA0C;AAC1C,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,qBAAW,EAAE,kBAAQ,EAAE,oBAAU,CAAC,CAAC;AAC5D,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC"}
|
@@ -17,7 +17,6 @@ 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 klend_1 = require("./structs/klend");
|
20
|
-
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
21
20
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
22
21
|
const solana_1 = require("../../utils/solana");
|
23
22
|
const pdas_1 = require("./helpers/pdas");
|
@@ -25,10 +24,18 @@ const zeroAdressValue = '11111111111111111111111111111111';
|
|
25
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
25
|
const client = (0, clients_1.getClientSolana)();
|
27
26
|
const networkId = portfolio_core_1.NetworkId.solana;
|
28
|
-
const
|
29
|
-
|
27
|
+
const markets = yield cache.getItem(constants_1.marketsKey, {
|
28
|
+
prefix: constants_1.platformId,
|
29
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
30
|
+
});
|
31
|
+
const lendingAccounts = markets
|
32
|
+
? yield (0, solana_1.getParsedMultipleAccountsInfo)(client, klend_1.obligationStruct, (0, pdas_1.getLendingPda)(owner, markets))
|
33
|
+
: undefined;
|
34
|
+
const multiplyAccounts = markets
|
35
|
+
? yield (0, solana_1.getParsedMultipleAccountsInfo)(client, klend_1.obligationStruct, (0, pdas_1.getMultiplyPdas)(owner, markets))
|
36
|
+
: undefined;
|
30
37
|
const leverageAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, klend_1.obligationStruct, (0, pdas_1.getLeveragePdas)(owner));
|
31
|
-
if (!
|
38
|
+
if (!lendingAccounts && !multiplyAccounts && !leverageAccounts)
|
32
39
|
return [];
|
33
40
|
const reserves = yield cache.getItem(constants_1.reservesKey, {
|
34
41
|
prefix: constants_1.platformId,
|
@@ -44,152 +51,163 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
44
51
|
// *************
|
45
52
|
// KLend : https://app.kamino.finance/lending
|
46
53
|
// *************
|
47
|
-
if (
|
48
|
-
const
|
49
|
-
|
50
|
-
const suppliedAssets = [];
|
51
|
-
const suppliedYields = [];
|
52
|
-
const rewardAssets = [];
|
53
|
-
const suppliedLtvs = [];
|
54
|
-
const borrowedWeights = [];
|
55
|
-
for (const deposit of lendingAccount.deposits) {
|
56
|
-
if (deposit.depositReserve.toString() === zeroAdressValue ||
|
57
|
-
deposit.depositedAmount.isLessThanOrEqualTo(0))
|
58
|
-
continue;
|
59
|
-
const amountRaw = deposit.depositedAmount;
|
60
|
-
const reserve = reserves[deposit.depositReserve.toString()];
|
61
|
-
if (!reserve)
|
62
|
-
continue;
|
63
|
-
const mint = reserve.liquidity.mintPubkey;
|
64
|
-
const tokenPrice = tokenPriceById.get(mint);
|
65
|
-
const amount = amountRaw
|
66
|
-
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
67
|
-
.dividedBy(reserve.exchangeRate)
|
68
|
-
.toNumber();
|
69
|
-
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
70
|
-
suppliedLtvs.push(reserve.config.liquidationThresholdPct / 100);
|
71
|
-
suppliedYields.push([
|
72
|
-
{ apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
|
73
|
-
]);
|
74
|
-
}
|
75
|
-
for (const borrow of lendingAccount.borrows) {
|
76
|
-
if (borrow.borrowReserve.toString() === zeroAdressValue ||
|
77
|
-
borrow.borrowedAmountSf.isLessThanOrEqualTo(0))
|
78
|
-
continue;
|
79
|
-
const amountRaw = borrow.borrowedAmountSf.dividedBy(borrow.cumulativeBorrowRateBsf.value0);
|
80
|
-
const reserve = reserves[borrow.borrowReserve.toString()];
|
81
|
-
if (!reserve)
|
54
|
+
if (lendingAccounts) {
|
55
|
+
for (const lendingAccount of lendingAccounts) {
|
56
|
+
if (!lendingAccount)
|
82
57
|
continue;
|
83
|
-
const
|
84
|
-
const
|
85
|
-
const
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
58
|
+
const lendingConfig = constants_1.lendingConfigs.get(lendingAccount.lendingMarket.toString());
|
59
|
+
const borrowedAssets = [];
|
60
|
+
const borrowedYields = [];
|
61
|
+
const suppliedAssets = [];
|
62
|
+
const suppliedYields = [];
|
63
|
+
const rewardAssets = [];
|
64
|
+
const suppliedLtvs = [];
|
65
|
+
const borrowedWeights = [];
|
66
|
+
for (const deposit of lendingAccount.deposits) {
|
67
|
+
if (deposit.depositReserve.toString() === zeroAdressValue ||
|
68
|
+
deposit.depositedAmount.isLessThanOrEqualTo(0))
|
69
|
+
continue;
|
70
|
+
const amountRaw = deposit.depositedAmount;
|
71
|
+
const reserve = reserves[deposit.depositReserve.toString()];
|
72
|
+
if (!reserve)
|
73
|
+
continue;
|
74
|
+
const mint = reserve.liquidity.mintPubkey;
|
75
|
+
const tokenPrice = tokenPriceById.get(mint);
|
76
|
+
const amount = amountRaw
|
77
|
+
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
78
|
+
.dividedBy(reserve.exchangeRate)
|
79
|
+
.toNumber();
|
80
|
+
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
81
|
+
suppliedLtvs.push(reserve.config.liquidationThresholdPct / 100);
|
82
|
+
suppliedYields.push([
|
83
|
+
{ apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
|
84
|
+
]);
|
85
|
+
}
|
86
|
+
for (const borrow of lendingAccount.borrows) {
|
87
|
+
if (borrow.borrowReserve.toString() === zeroAdressValue ||
|
88
|
+
borrow.borrowedAmountSf.isLessThanOrEqualTo(0))
|
89
|
+
continue;
|
90
|
+
const amountRaw = borrow.borrowedAmountSf.dividedBy(borrow.cumulativeBorrowRateBsf.value0);
|
91
|
+
const reserve = reserves[borrow.borrowReserve.toString()];
|
92
|
+
if (!reserve)
|
93
|
+
continue;
|
94
|
+
const mint = reserve.liquidity.mintPubkey;
|
95
|
+
const tokenPrice = tokenPriceById.get(mint);
|
96
|
+
const amount = amountRaw
|
97
|
+
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
98
|
+
.toNumber();
|
99
|
+
borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
100
|
+
borrowedWeights.push(Number(reserve.config.borrowFactorPct) / 100);
|
101
|
+
borrowedYields.push([
|
102
|
+
{ apr: -reserve.borrowApr, apy: -(0, portfolio_core_1.aprToApy)(reserve.borrowApr) },
|
103
|
+
]);
|
104
|
+
}
|
105
|
+
if (suppliedAssets.length !== 0 || borrowedAssets.length !== 0) {
|
106
|
+
const { borrowedValue, suppliedValue, value, healthRatio } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets, suppliedLtvs, borrowedWeights);
|
107
|
+
elements.push({
|
108
|
+
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
109
|
+
networkId,
|
110
|
+
platformId: constants_1.platformId,
|
111
|
+
label: 'Lending',
|
112
|
+
name: lendingConfig === null || lendingConfig === void 0 ? void 0 : lendingConfig.name,
|
112
113
|
value,
|
113
|
-
|
114
|
-
|
114
|
+
data: {
|
115
|
+
borrowedAssets,
|
116
|
+
borrowedValue,
|
117
|
+
borrowedYields,
|
118
|
+
suppliedAssets,
|
119
|
+
suppliedValue,
|
120
|
+
suppliedYields,
|
121
|
+
collateralRatio: null,
|
122
|
+
healthRatio,
|
123
|
+
rewardAssets,
|
124
|
+
value,
|
125
|
+
},
|
126
|
+
});
|
127
|
+
}
|
115
128
|
}
|
116
129
|
}
|
117
130
|
// ******
|
118
131
|
// Multiply : https://app.kamino.finance/lending/multiply
|
119
132
|
// ******
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
const borrowedAssets = [];
|
124
|
-
const borrowedYields = [];
|
125
|
-
const suppliedAssets = [];
|
126
|
-
const suppliedYields = [];
|
127
|
-
const rewardAssets = [];
|
128
|
-
const suppliedLtvs = [];
|
129
|
-
const borrowedWeights = [];
|
130
|
-
for (const deposit of multiplyAccount.deposits) {
|
131
|
-
if (deposit.depositReserve.toString() === zeroAdressValue ||
|
132
|
-
deposit.depositedAmount.isLessThanOrEqualTo(0))
|
133
|
-
continue;
|
134
|
-
const amountRaw = deposit.depositedAmount;
|
135
|
-
const reserve = reserves[deposit.depositReserve.toString()];
|
136
|
-
if (!reserve)
|
137
|
-
continue;
|
138
|
-
const mint = reserve.liquidity.mintPubkey;
|
139
|
-
const tokenPrice = tokenPriceById.get(mint);
|
140
|
-
const amount = amountRaw
|
141
|
-
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
142
|
-
.dividedBy(reserve.exchangeRate)
|
143
|
-
.toNumber();
|
144
|
-
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
145
|
-
suppliedLtvs.push(reserve.config.liquidationThresholdPct / 100);
|
146
|
-
suppliedYields.push([
|
147
|
-
{ apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
|
148
|
-
]);
|
149
|
-
}
|
150
|
-
for (const borrow of multiplyAccount.borrows) {
|
151
|
-
if (borrow.borrowReserve.toString() === zeroAdressValue ||
|
152
|
-
borrow.borrowedAmountSf.isLessThanOrEqualTo(0))
|
153
|
-
continue;
|
154
|
-
const amountRaw = borrow.borrowedAmountSf.dividedBy(borrow.cumulativeBorrowRateBsf.value0);
|
155
|
-
const reserve = reserves[borrow.borrowReserve.toString()];
|
156
|
-
if (!reserve)
|
133
|
+
if (multiplyAccounts)
|
134
|
+
for (const multiplyAccount of multiplyAccounts) {
|
135
|
+
if (!multiplyAccount)
|
157
136
|
continue;
|
158
|
-
const
|
159
|
-
const
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
]
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
137
|
+
const lendingConfig = constants_1.lendingConfigs.get(multiplyAccount.lendingMarket.toString());
|
138
|
+
const name = lendingConfig
|
139
|
+
? `Multiply ${lendingConfig.name}`
|
140
|
+
: 'Multiply';
|
141
|
+
const borrowedAssets = [];
|
142
|
+
const borrowedYields = [];
|
143
|
+
const suppliedAssets = [];
|
144
|
+
const suppliedYields = [];
|
145
|
+
const rewardAssets = [];
|
146
|
+
const suppliedLtvs = [];
|
147
|
+
const borrowedWeights = [];
|
148
|
+
for (const deposit of multiplyAccount.deposits) {
|
149
|
+
if (deposit.depositReserve.toString() === zeroAdressValue ||
|
150
|
+
deposit.depositedAmount.isLessThanOrEqualTo(0))
|
151
|
+
continue;
|
152
|
+
const amountRaw = deposit.depositedAmount;
|
153
|
+
const reserve = reserves[deposit.depositReserve.toString()];
|
154
|
+
if (!reserve)
|
155
|
+
continue;
|
156
|
+
const mint = reserve.liquidity.mintPubkey;
|
157
|
+
const tokenPrice = tokenPriceById.get(mint);
|
158
|
+
const amount = amountRaw
|
159
|
+
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
160
|
+
.dividedBy(reserve.exchangeRate)
|
161
|
+
.toNumber();
|
162
|
+
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
163
|
+
suppliedLtvs.push(reserve.config.liquidationThresholdPct / 100);
|
164
|
+
suppliedYields.push([
|
165
|
+
{ apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
|
166
|
+
]);
|
167
|
+
}
|
168
|
+
for (const borrow of multiplyAccount.borrows) {
|
169
|
+
if (borrow.borrowReserve.toString() === zeroAdressValue ||
|
170
|
+
borrow.borrowedAmountSf.isLessThanOrEqualTo(0))
|
171
|
+
continue;
|
172
|
+
const amountRaw = borrow.borrowedAmountSf.dividedBy(borrow.cumulativeBorrowRateBsf.value0);
|
173
|
+
const reserve = reserves[borrow.borrowReserve.toString()];
|
174
|
+
if (!reserve)
|
175
|
+
continue;
|
176
|
+
const mint = reserve.liquidity.mintPubkey;
|
177
|
+
const tokenPrice = tokenPriceById.get(mint);
|
178
|
+
const amount = amountRaw
|
179
|
+
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
180
|
+
.toNumber();
|
181
|
+
borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
182
|
+
borrowedWeights.push(Number(reserve.config.borrowFactorPct) / 100);
|
183
|
+
borrowedYields.push([
|
184
|
+
{ apr: -reserve.borrowApr, apy: -(0, portfolio_core_1.aprToApy)(reserve.borrowApr) },
|
185
|
+
]);
|
186
|
+
}
|
187
|
+
if (suppliedAssets.length !== 0 || borrowedAssets.length !== 0) {
|
188
|
+
const { borrowedValue, suppliedValue, value } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets, suppliedLtvs, borrowedWeights);
|
189
|
+
elements.push({
|
190
|
+
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
191
|
+
networkId,
|
192
|
+
platformId: constants_1.platformId,
|
193
|
+
label: 'Lending',
|
194
|
+
name,
|
188
195
|
value,
|
189
|
-
|
190
|
-
|
196
|
+
data: {
|
197
|
+
borrowedAssets,
|
198
|
+
borrowedValue,
|
199
|
+
borrowedYields,
|
200
|
+
suppliedAssets,
|
201
|
+
suppliedValue,
|
202
|
+
suppliedYields,
|
203
|
+
healthRatio: null,
|
204
|
+
collateralRatio: null,
|
205
|
+
rewardAssets,
|
206
|
+
value,
|
207
|
+
},
|
208
|
+
});
|
209
|
+
}
|
191
210
|
}
|
192
|
-
}
|
193
211
|
// ******
|
194
212
|
// Leverage : https://app.kamino.finance/lending/leverage
|
195
213
|
// ******
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAAsD;AAGtD,iDAAsD;AACtD,2CAAmD;AACnD,kFAA+E;AAC/E,qGAA6E;AAE7E,+CAAmE;AACnE,yCAIwB;AAExB,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;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U,CAAC,CAC5D,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,CAAC;YACnE,cAAc,CAAC,IAAI,CAAC;gBAClB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE;aAC/D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/D,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,IAAA,wCAAuB,EACrE,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,SAAS;gBACT,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,UAAU;gBAChB,KAAK;gBACL,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,eAAe,EAAE,IAAI;oBAErB,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
1
|
+
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;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