@sonarwatch/portfolio-plugins 0.11.113 → 0.11.115
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1175 -1167
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.d.ts +0 -1
- package/src/index.js +18 -4
- package/src/index.js.map +1 -1
- package/src/plugins/abex/constants.d.ts +7 -0
- package/src/plugins/abex/constants.js +17 -0
- package/src/plugins/abex/constants.js.map +1 -0
- package/src/plugins/abex/index.d.ts +6 -0
- package/src/plugins/abex/index.js +13 -0
- package/src/plugins/abex/index.js.map +1 -0
- package/src/plugins/abex/marketsJob.d.ts +3 -0
- package/src/plugins/abex/marketsJob.js +90 -0
- package/src/plugins/abex/marketsJob.js.map +1 -0
- package/src/plugins/abex/positionsFetcher.js +65 -0
- package/src/plugins/abex/positionsFetcher.js.map +1 -0
- package/src/plugins/abex/types.d.ts +69 -0
- package/src/plugins/abex/types.js +3 -0
- package/src/plugins/abex/types.js.map +1 -0
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/foo/index.js +2 -2
- package/src/plugins/foo/index.js.map +1 -1
- package/src/plugins/foo/positionsFetcher.d.ts +3 -0
- package/src/plugins/foo/{positionFetcher.js → positionsFetcher.js} +2 -2
- package/src/plugins/foo/positionsFetcher.js.map +1 -0
- package/src/plugins/kai/constants.d.ts +9 -0
- package/src/plugins/kai/constants.js +37 -0
- package/src/plugins/kai/constants.js.map +1 -0
- package/src/plugins/kai/index.d.ts +6 -0
- package/src/plugins/kai/index.js +12 -0
- package/src/plugins/kai/index.js.map +1 -0
- package/src/plugins/kai/types.d.ts +57 -0
- package/src/plugins/kai/types.js +3 -0
- package/src/plugins/kai/types.js.map +1 -0
- package/src/plugins/kai/vaultsJob.d.ts +3 -0
- package/src/plugins/kai/vaultsJob.js +60 -0
- package/src/plugins/kai/vaultsJob.js.map +1 -0
- package/src/plugins/raydium/lpTokensJob.js +4 -1
- package/src/plugins/raydium/lpTokensJob.js.map +1 -1
- package/src/plugins/solend/obligationsFetcher.js +5 -2
- package/src/plugins/solend/obligationsFetcher.js.map +1 -1
- package/src/plugins/suilend/constants.d.ts +8 -0
- package/src/plugins/suilend/constants.js +18 -0
- package/src/plugins/suilend/constants.js.map +1 -0
- package/src/plugins/suilend/index.d.ts +6 -0
- package/src/plugins/suilend/index.js +13 -0
- package/src/plugins/suilend/index.js.map +1 -0
- package/src/plugins/suilend/marketsJob.d.ts +3 -0
- package/src/plugins/suilend/marketsJob.js +45 -0
- package/src/plugins/suilend/marketsJob.js.map +1 -0
- package/src/plugins/suilend/obligationsFetcher.d.ts +3 -0
- package/src/plugins/suilend/obligationsFetcher.js +151 -0
- package/src/plugins/suilend/obligationsFetcher.js.map +1 -0
- package/src/plugins/suilend/types.d.ts +137 -0
- package/src/plugins/suilend/types.js +3 -0
- package/src/plugins/suilend/types.js.map +1 -0
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/symmetry/basketsJob.d.ts +3 -0
- package/src/plugins/symmetry/basketsJob.js +69 -0
- package/src/plugins/symmetry/basketsJob.js.map +1 -0
- package/src/plugins/symmetry/constants.d.ts +7 -0
- package/src/plugins/symmetry/constants.js +17 -0
- package/src/plugins/symmetry/constants.js.map +1 -0
- package/src/plugins/symmetry/filters.d.ts +2 -0
- package/src/plugins/symmetry/filters.js +15 -0
- package/src/plugins/symmetry/filters.js.map +1 -0
- package/src/plugins/symmetry/index.d.ts +6 -0
- package/src/plugins/symmetry/index.js +12 -0
- package/src/plugins/symmetry/index.js.map +1 -0
- package/src/plugins/symmetry/structs.d.ts +78 -0
- package/src/plugins/symmetry/structs.js +78 -0
- package/src/plugins/symmetry/structs.js.map +1 -0
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/misc/getLpTokenSourceRaw.d.ts +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/foo/positionFetcher.js.map +0 -1
- /package/src/plugins/{foo/positionFetcher.d.ts → abex/positionsFetcher.d.ts} +0 -0
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.115",
|
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.115"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
package/src/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Platform } from '@sonarwatch/portfolio-core';
|
2
2
|
import { Fetcher } from './Fetcher';
|
3
3
|
import { Job } from './Job';
|
4
|
-
export { getFetchersByAddressSystem } from './utils/misc/getFetchersByAddressSystem';
|
5
4
|
export { walletTokensPlatform, walletNftsPlatform, } from './plugins/tokens/constants';
|
6
5
|
export * from './Cache';
|
7
6
|
export * from './Fetcher';
|
package/src/index.js
CHANGED
@@ -17,7 +17,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.fetchersByAddressSystem = exports.fetchers = exports.jobs = exports.platforms = exports.getLlamaProtocolsJob = exports.walletNftsPlatform = exports.walletTokensPlatform =
|
20
|
+
exports.fetchersByAddressSystem = exports.fetchers = exports.jobs = exports.platforms = exports.getLlamaProtocolsJob = exports.walletNftsPlatform = exports.walletTokensPlatform = void 0;
|
21
|
+
const getFetchersByAddressSystem_1 = require("./utils/misc/getFetchersByAddressSystem");
|
21
22
|
const orphanPlatorms_1 = __importDefault(require("./orphanPlatorms"));
|
22
23
|
const tokens_1 = require("./plugins/tokens");
|
23
24
|
const native_stake_1 = require("./plugins/native-stake");
|
@@ -90,9 +91,10 @@ const genesysgo_1 = require("./plugins/genesysgo");
|
|
90
91
|
const aurory_1 = require("./plugins/aurory");
|
91
92
|
const x_staking_solana_1 = require("./plugins/x-staking-solana");
|
92
93
|
const spl_staking_1 = require("./plugins/spl-staking");
|
93
|
-
const
|
94
|
-
|
95
|
-
|
94
|
+
const abex_1 = require("./plugins/abex");
|
95
|
+
const kai_1 = require("./plugins/kai");
|
96
|
+
const suilend_1 = require("./plugins/suilend");
|
97
|
+
const symmetry_1 = require("./plugins/symmetry");
|
96
98
|
var constants_1 = require("./plugins/tokens/constants");
|
97
99
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
98
100
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -175,6 +177,10 @@ exports.platforms = [
|
|
175
177
|
...aurory_1.platforms,
|
176
178
|
...x_staking_solana_1.platforms,
|
177
179
|
...spl_staking_1.platforms,
|
180
|
+
...abex_1.platforms,
|
181
|
+
...kai_1.platforms,
|
182
|
+
...suilend_1.platforms,
|
183
|
+
...symmetry_1.platforms,
|
178
184
|
];
|
179
185
|
// JOBS //
|
180
186
|
exports.jobs = [
|
@@ -242,6 +248,10 @@ exports.jobs = [
|
|
242
248
|
...aurory_1.jobs,
|
243
249
|
...x_staking_solana_1.jobs,
|
244
250
|
...spl_staking_1.jobs,
|
251
|
+
...abex_1.jobs,
|
252
|
+
...kai_1.jobs,
|
253
|
+
...suilend_1.jobs,
|
254
|
+
...symmetry_1.jobs,
|
245
255
|
];
|
246
256
|
// FETCHERS //
|
247
257
|
exports.fetchers = [
|
@@ -311,6 +321,10 @@ exports.fetchers = [
|
|
311
321
|
...aurory_1.fetchers,
|
312
322
|
...x_staking_solana_1.fetchers,
|
313
323
|
...spl_staking_1.fetchers,
|
324
|
+
...abex_1.fetchers,
|
325
|
+
...kai_1.fetchers,
|
326
|
+
...suilend_1.fetchers,
|
327
|
+
...symmetry_1.fetchers,
|
314
328
|
];
|
315
329
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
316
330
|
//# 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,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,6CAI0B;AAC1B,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC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';
|
2
|
+
export declare const platformId = "abex";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const alpType = "0xceab84acf6bf70f503c3b0627acaff6b3f84cee0f2d7ed53d00fa6c2a168d14f::alp::ALP";
|
5
|
+
export declare const alpDecimals = 6;
|
6
|
+
export declare const depositVaultRegistry = "0x3c6595e543c4766dd63b5b2fa918516bac2920bc1944da068be031dced46a18d";
|
7
|
+
export declare const alpSupplyObjectId = "0x7705d4670e7ef4623d6392888f73f6773b5f0218b6cb1486a4be238692a58bca";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.alpSupplyObjectId = exports.depositVaultRegistry = exports.alpDecimals = exports.alpType = exports.platform = exports.platformId = void 0;
|
4
|
+
exports.platformId = 'abex';
|
5
|
+
exports.platform = {
|
6
|
+
id: exports.platformId,
|
7
|
+
name: 'ABEx Finance',
|
8
|
+
image: 'https://sonar.watch/img/platforms/abex.webp',
|
9
|
+
website: 'https://abex.fi/',
|
10
|
+
twitter: 'https://twitter.com/ABExFinance',
|
11
|
+
defiLlamaId: 'abex-finance', // from https://defillama.com/docs/api
|
12
|
+
};
|
13
|
+
exports.alpType = '0xceab84acf6bf70f503c3b0627acaff6b3f84cee0f2d7ed53d00fa6c2a168d14f::alp::ALP';
|
14
|
+
exports.alpDecimals = 6;
|
15
|
+
exports.depositVaultRegistry = '0x3c6595e543c4766dd63b5b2fa918516bac2920bc1944da068be031dced46a18d';
|
16
|
+
exports.alpSupplyObjectId = '0x7705d4670e7ef4623d6392888f73f6773b5f0218b6cb1486a4be238692a58bca';
|
17
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,iCAAiC;IAC1C,WAAW,EAAE,cAAc,EAAE,sCAAsC;CACpE,CAAC;AAEW,QAAA,OAAO,GAClB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,oBAAoB,GAC/B,oEAAoE,CAAC;AAC1D,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
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 marketsJob_1 = __importDefault(require("./marketsJob"));
|
9
|
+
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [marketsJob_1.default];
|
12
|
+
exports.fetchers = [positionsFetcher_1.default];
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AACtC,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
|
@@ -0,0 +1,90 @@
|
|
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 getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
|
20
|
+
const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
|
21
|
+
const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
|
22
|
+
const aptos_1 = require("../../utils/aptos");
|
23
|
+
const getObject_1 = require("../../utils/sui/getObject");
|
24
|
+
const constants_2 = require("../tokens/constants");
|
25
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
|
+
var _a, _b, _c, _d, _e, _f;
|
27
|
+
const client = (0, clients_1.getClientSui)();
|
28
|
+
const lpObject = yield (0, getObject_1.getObject)(client, constants_1.alpSupplyObjectId);
|
29
|
+
const lpSupply = (_b = (_a = lpObject.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.lp_supply.fields.value;
|
30
|
+
if (!lpSupply)
|
31
|
+
return;
|
32
|
+
const depositVaultFields = yield (0, getDynamicFields_1.getDynamicFields)(client, constants_1.depositVaultRegistry);
|
33
|
+
const objects = yield (0, multiGetObjects_1.multiGetObjects)(client, depositVaultFields.map((f) => f.objectId));
|
34
|
+
const uTypes = [];
|
35
|
+
objects.forEach((o) => {
|
36
|
+
var _a, _b, _c, _d;
|
37
|
+
const oType = (_b = (_a = o.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.type;
|
38
|
+
if (!oType)
|
39
|
+
return;
|
40
|
+
const uType = (_d = (_c = (0, aptos_1.parseTypeString)(oType).keys) === null || _c === void 0 ? void 0 : _c.at(0)) === null || _d === void 0 ? void 0 : _d.type;
|
41
|
+
if (!uType)
|
42
|
+
return;
|
43
|
+
uTypes.push(uType);
|
44
|
+
});
|
45
|
+
const tokenPrices = yield cache.getTokenPricesAsMap(uTypes, portfolio_core_1.NetworkId.sui);
|
46
|
+
const lpUnderlyings = [];
|
47
|
+
for (let i = 0; i < objects.length; i++) {
|
48
|
+
const object = objects[i];
|
49
|
+
const market = (_d = (_c = object.data) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.fields;
|
50
|
+
if (!market)
|
51
|
+
return;
|
52
|
+
const uType = (_f = (_e = (0, aptos_1.parseTypeString)(market.value.type).keys) === null || _e === void 0 ? void 0 : _e.at(0)) === null || _f === void 0 ? void 0 : _f.type;
|
53
|
+
if (!uType)
|
54
|
+
return;
|
55
|
+
const tokenPrice = tokenPrices.get((0, portfolio_core_1.formatTokenAddress)(uType, portfolio_core_1.NetworkId.sui));
|
56
|
+
if (!tokenPrice)
|
57
|
+
return;
|
58
|
+
const amount = new bignumber_js_1.default(market.value.fields.liquidity).plus(market.value.fields.reserved_amount);
|
59
|
+
lpUnderlyings.push({
|
60
|
+
address: uType,
|
61
|
+
decimals: tokenPrice.decimals,
|
62
|
+
reserveAmountRaw: amount,
|
63
|
+
price: tokenPrice.price,
|
64
|
+
});
|
65
|
+
}
|
66
|
+
const lpSource = (0, getLpTokenSourceRaw_1.default)(portfolio_core_1.NetworkId.sui, constants_1.platformId, constants_1.platformId, 'Vaults', {
|
67
|
+
address: constants_1.alpType,
|
68
|
+
decimals: constants_1.alpDecimals,
|
69
|
+
supplyRaw: new bignumber_js_1.default(lpSupply),
|
70
|
+
}, lpUnderlyings);
|
71
|
+
yield cache.setTokenPriceSource({
|
72
|
+
id: 'alp',
|
73
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
74
|
+
platformId: constants_2.walletTokensPlatform.id,
|
75
|
+
address: constants_1.alpType,
|
76
|
+
decimals: constants_1.alpDecimals,
|
77
|
+
price: lpSource.price,
|
78
|
+
elementName: undefined,
|
79
|
+
underlyings: undefined,
|
80
|
+
weight: 1,
|
81
|
+
timestamp: Date.now(),
|
82
|
+
});
|
83
|
+
});
|
84
|
+
const job = {
|
85
|
+
id: `${constants_1.platformId}-markets`,
|
86
|
+
executor,
|
87
|
+
label: 'normal',
|
88
|
+
};
|
89
|
+
exports.default = job;
|
90
|
+
//# sourceMappingURL=marketsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA2E;AAC3E,gEAAqC;AAGrC,2CAMqB;AACrB,iDAAmD;AACnD,uEAAoE;AAEpE,qEAAkE;AAClE,+FAE8C;AAC9C,6CAAoD;AACpD,yDAAsD;AACtD,mDAA2D;AAE3D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAS,EAAY,MAAM,EAAE,6BAAiB,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,MAAA,MAAA,QAAQ,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;IACvE,IAAI,CAAC,QAAQ;QAAE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GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
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 getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
|
20
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
21
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
+
var _a, _b;
|
23
|
+
const client = (0, clients_1.getClientSui)();
|
24
|
+
const objects = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
|
25
|
+
filter: {
|
26
|
+
Package: '0xc985ff436f334f864d74f35c3da9e116419b63a0c027cbe2ac7815afc4abc450',
|
27
|
+
},
|
28
|
+
});
|
29
|
+
if (objects.length === 0)
|
30
|
+
return [];
|
31
|
+
const alpPrice = yield cache.getTokenPrice(constants_1.alpType, portfolio_core_1.NetworkId.sui);
|
32
|
+
let alpAmount = new bignumber_js_1.default(0);
|
33
|
+
for (let i = 0; i < objects.length; i++) {
|
34
|
+
const object = objects[i];
|
35
|
+
alpAmount = alpAmount.plus(((_b = (_a = object.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.stake) || 0);
|
36
|
+
}
|
37
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.alpType, alpAmount.dividedBy(Math.pow(10, constants_1.alpDecimals)).toNumber(), portfolio_core_1.NetworkId.sui, alpPrice);
|
38
|
+
const element = {
|
39
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
40
|
+
label: 'Staked',
|
41
|
+
platformId: constants_1.platformId,
|
42
|
+
type: 'liquidity',
|
43
|
+
data: {
|
44
|
+
liquidities: [
|
45
|
+
{
|
46
|
+
assets: [asset],
|
47
|
+
assetsValue: asset.value,
|
48
|
+
rewardAssets: [],
|
49
|
+
rewardAssetsValue: 0,
|
50
|
+
value: asset.value,
|
51
|
+
yields: [],
|
52
|
+
},
|
53
|
+
],
|
54
|
+
},
|
55
|
+
value: asset.value,
|
56
|
+
};
|
57
|
+
return [element];
|
58
|
+
});
|
59
|
+
const fetcher = {
|
60
|
+
id: `${constants_1.platformId}-positions`,
|
61
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
62
|
+
executor,
|
63
|
+
};
|
64
|
+
exports.default = fetcher;
|
65
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAGoC;AACpC,gEAAqC;AAErC,2CAA+D;AAE/D,iDAAmD;AACnD,qEAAkE;AAElE,qGAA6E;AAE7E,MAAM,QAAQ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BAChB,iBAAiB,EAAE,CAAC;oBACpB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,MAAM,EAAE,EAAE;iBACX;aACF;SACF;QACD,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
export type Credential = {
|
2
|
+
acc_reward_per_share: string;
|
3
|
+
id: {
|
4
|
+
id: string;
|
5
|
+
};
|
6
|
+
lock_until: string;
|
7
|
+
stake: string;
|
8
|
+
};
|
9
|
+
export type AlpMarket = {
|
10
|
+
fun_mask: string;
|
11
|
+
id: {
|
12
|
+
id: string;
|
13
|
+
};
|
14
|
+
lp_supply: {
|
15
|
+
type: string;
|
16
|
+
fields: {
|
17
|
+
value: string;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
};
|
21
|
+
export type Market = {
|
22
|
+
id: {
|
23
|
+
id: string;
|
24
|
+
};
|
25
|
+
name: {
|
26
|
+
type: string;
|
27
|
+
fields: {
|
28
|
+
dummy_field: boolean;
|
29
|
+
};
|
30
|
+
};
|
31
|
+
value: {
|
32
|
+
type: string;
|
33
|
+
fields: MarketFields;
|
34
|
+
};
|
35
|
+
};
|
36
|
+
export type MarketFields = {
|
37
|
+
acc_reserving_rate: {
|
38
|
+
type: string;
|
39
|
+
fields: {
|
40
|
+
value: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
enabled: boolean;
|
44
|
+
last_update: string;
|
45
|
+
liquidity: string;
|
46
|
+
price_config: {
|
47
|
+
type: string;
|
48
|
+
fields: {
|
49
|
+
feeder: string;
|
50
|
+
max_confidence: string;
|
51
|
+
max_interval: string;
|
52
|
+
precision: string;
|
53
|
+
};
|
54
|
+
};
|
55
|
+
reserved_amount: string;
|
56
|
+
reserving_fee_model: string;
|
57
|
+
unrealised_reserving_fee_amount: {
|
58
|
+
type: string;
|
59
|
+
fields: {
|
60
|
+
value: string;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
weight: {
|
64
|
+
type: string;
|
65
|
+
fields: {
|
66
|
+
value: string;
|
67
|
+
};
|
68
|
+
};
|
69
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/abex/types.ts"],"names":[],"mappings":""}
|
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
package/src/plugins/foo/index.js
CHANGED
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
7
|
const constants_1 = require("./constants");
|
8
8
|
const marketsJob_1 = __importDefault(require("./marketsJob"));
|
9
|
-
const
|
9
|
+
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
10
10
|
exports.platforms = [constants_1.platform];
|
11
11
|
exports.jobs = [marketsJob_1.default];
|
12
|
-
exports.fetchers = [
|
12
|
+
exports.fetchers = [positionsFetcher_1.default];
|
13
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/foo/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AACtC,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/foo/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AACtC,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
|
@@ -41,9 +41,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
41
41
|
return [element];
|
42
42
|
});
|
43
43
|
const fetcher = {
|
44
|
-
id: `${constants_1.platformId}-
|
44
|
+
id: `${constants_1.platformId}-positions`,
|
45
45
|
networkId: portfolio_core_1.NetworkId.ethereum,
|
46
46
|
executor,
|
47
47
|
};
|
48
48
|
exports.default = fetcher;
|
49
|
-
//# sourceMappingURL=
|
49
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/foo/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAMoC;AAEpC,2CAAyC;AAGzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,sCAAqB,EACrB,0BAAS,CAAC,QAAQ,CACnB,CAAC;IACF,MAAM,MAAM,GAAG,CAAC,CAAC;IACjB,MAAM,KAAK,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,KAAI,IAAI,CAAC;IAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAE5C,MAAM,OAAO,GAA6B;QACxC,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,KAAK,EAAE,SAAS;QAChB,UAAU,EAAV,sBAAU;QACV,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,KAAK;QACL,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,mCAAkB,CAAC,KAAK;oBAC9B,SAAS,EAAE,0BAAS,CAAC,QAAQ;oBAC7B,KAAK;oBACL,UAAU,EAAE,EAAE;oBACd,IAAI,EAAE;wBACJ,OAAO,EAAE,sCAAqB;wBAC9B,MAAM;wBACN,KAAK;qBACN;iBACF;aACF;SACF;KACF,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.vaultsInfo = exports.platform = exports.platformId = void 0;
|
4
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
+
exports.platformId = 'kai';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Kai Finance',
|
9
|
+
image: 'https://sonar.watch/img/platforms/kai.webp',
|
10
|
+
website: 'https://kai.finance',
|
11
|
+
twitter: 'https://twitter.com/kai_finance_sui',
|
12
|
+
defiLlamaId: 'kai-finance', // from https://defillama.com/docs/api
|
13
|
+
};
|
14
|
+
exports.vaultsInfo = [
|
15
|
+
{
|
16
|
+
// USDC
|
17
|
+
id: '0x7a2f75a3e50fd5f72dfc2f8c9910da5eaa3a1486e4eb1e54a825c09d82214526',
|
18
|
+
tType: '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN',
|
19
|
+
lpType: '0x1c389a85310b47e7630a9361d4e71025bc35e4999d3a645949b1b68b26f2273::ywhusdce::YWHUSDCE',
|
20
|
+
decimals: 6,
|
21
|
+
},
|
22
|
+
{
|
23
|
+
// USDT
|
24
|
+
id: '0x0fce8baed43faadf6831cd27e5b3a32a11d2a05b3cd1ed36c7c09c5f7bcb4ef4',
|
25
|
+
tType: '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN',
|
26
|
+
lpType: '0xb8dc843a816b51992ee10d2ddc6d28aab4f0a1d651cd7289a7897902eb631613::ywhusdte::YWHUSDTE',
|
27
|
+
decimals: 6,
|
28
|
+
},
|
29
|
+
{
|
30
|
+
// SUI
|
31
|
+
id: '0x16272b75d880ab944c308d47e91d46b2027f55136ee61b3db99098a926b3973c',
|
32
|
+
tType: portfolio_core_1.suiNetwork.native.address,
|
33
|
+
lpType: '0xb8dc843a816b51992ee10d2ddc6d28aab4f0a1d651cd7289a7897902eb631613::ysui::YSUI',
|
34
|
+
decimals: 9,
|
35
|
+
},
|
36
|
+
];
|
37
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAkE;AAErD,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;IAC9C,WAAW,EAAE,aAAa,EAAE,sCAAsC;CACnE,CAAC;AAEW,QAAA,UAAU,GAAG;IACxB;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,uFAAuF;QACzF,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,OAAO;QACP,EAAE,EAAE,oEAAoE;QACxE,KAAK,EACH,gFAAgF;QAClF,MAAM,EACJ,wFAAwF;QAC1F,QAAQ,EAAE,CAAC;KACZ;IACD;QACE,MAAM;QACN,EAAE,EAAE,oEAAoE;QACxE,KAAK,EAAE,2BAAU,CAAC,MAAM,CAAC,OAAO;QAChC,MAAM,EACJ,gFAAgF;QAClF,QAAQ,EAAE,CAAC;KACZ;CACF,CAAC"}
|
@@ -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 vaultsJob_1 = __importDefault(require("./vaultsJob"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [vaultsJob_1.default];
|
11
|
+
exports.fetchers = [];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kai/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4DAAoC;AAEvB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
|