@sonarwatch/portfolio-plugins 0.12.156 → 0.12.157
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/kamino/constants.d.ts +1 -0
- package/src/plugins/kamino/constants.js +2 -1
- package/src/plugins/kamino/constants.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +20 -5
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/kamino/marketsJob.js +7 -0
- package/src/plugins/kamino/marketsJob.js.map +1 -1
- package/src/plugins/tradeport/constants.d.ts +5 -0
- package/src/plugins/tradeport/constants.js +15 -0
- package/src/plugins/tradeport/constants.js.map +1 -0
- package/src/plugins/tradeport/helpers.d.ts +2 -0
- package/src/plugins/tradeport/helpers.js +24 -0
- package/src/plugins/tradeport/helpers.js.map +1 -0
- package/src/plugins/tradeport/index.d.ts +6 -0
- package/src/plugins/tradeport/index.js +13 -0
- package/src/plugins/tradeport/index.js.map +1 -0
- package/src/plugins/tradeport/locksJob.d.ts +3 -0
- package/src/plugins/tradeport/locksJob.js +32 -0
- package/src/plugins/tradeport/locksJob.js.map +1 -0
- package/src/plugins/tradeport/positionsFetcher.d.ts +3 -0
- package/src/plugins/tradeport/positionsFetcher.js +76 -0
- package/src/plugins/tradeport/positionsFetcher.js.map +1 -0
- package/src/plugins/tradeport/types.d.ts +28 -0
- package/src/plugins/tradeport/types.js +3 -0
- package/src/plugins/tradeport/types.js.map +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.157](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.156...plugins-0.12.157) (2024-09-04)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.12.156](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.155...plugins-0.12.156) (2024-09-02)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -137,6 +137,7 @@ const suins_1 = require("./plugins/suins");
|
|
137
137
|
const debridge_1 = require("./plugins/debridge");
|
138
138
|
const alphafi_1 = require("./plugins/alphafi");
|
139
139
|
const jewel_1 = require("./plugins/jewel");
|
140
|
+
const tradeport_1 = require("./plugins/tradeport");
|
140
141
|
var constants_1 = require("./plugins/tokens/constants");
|
141
142
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
142
143
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -267,6 +268,7 @@ exports.platforms = [
|
|
267
268
|
...debridge_1.platforms,
|
268
269
|
...alphafi_1.platforms,
|
269
270
|
...jewel_1.platforms,
|
271
|
+
...tradeport_1.platforms,
|
270
272
|
];
|
271
273
|
// JOBS //
|
272
274
|
exports.jobs = [
|
@@ -380,6 +382,7 @@ exports.jobs = [
|
|
380
382
|
...debridge_1.jobs,
|
381
383
|
...alphafi_1.jobs,
|
382
384
|
...jewel_1.jobs,
|
385
|
+
...tradeport_1.jobs,
|
383
386
|
];
|
384
387
|
// FETCHERS //
|
385
388
|
exports.fetchers = [
|
@@ -495,6 +498,7 @@ exports.fetchers = [
|
|
495
498
|
...debridge_1.fetchers,
|
496
499
|
...alphafi_1.fetchers,
|
497
500
|
...jewel_1.fetchers,
|
501
|
+
...tradeport_1.fetchers,
|
498
502
|
];
|
499
503
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
500
504
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6C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BAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -11,6 +11,7 @@ export declare const allocationApiUrl = "https://api.hubbleprotocol.io/v2/airdro
|
|
11
11
|
export declare const klendProgramId: PublicKey;
|
12
12
|
export declare const farmProgramId: PublicKey;
|
13
13
|
export declare const farmsKey = "farms";
|
14
|
+
export declare const elevationGroupsKey = "elevatorGroups";
|
14
15
|
export declare const mainMarket = "7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF";
|
15
16
|
export declare const lendingConfigs: Map<string, LendingMarketConfig>;
|
16
17
|
export declare const marketsKey = "markets";
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.airdropStaticsS2 = exports.airdropStaticsS1 = exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationApiUrl = exports.programId = exports.kmnoDecimals = exports.kmnoMint = exports.platform = exports.platformId = void 0;
|
3
|
+
exports.airdropStaticsS2 = exports.airdropStaticsS1 = exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.elevationGroupsKey = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationApiUrl = exports.programId = exports.kmnoDecimals = exports.kmnoMint = exports.platform = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'kamino';
|
6
6
|
exports.platform = {
|
@@ -17,6 +17,7 @@ exports.allocationApiUrl = 'https://api.hubbleprotocol.io/v2/airdrop/users/';
|
|
17
17
|
exports.klendProgramId = new web3_js_1.PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
|
18
18
|
exports.farmProgramId = new web3_js_1.PublicKey('FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr');
|
19
19
|
exports.farmsKey = 'farms';
|
20
|
+
exports.elevationGroupsKey = 'elevatorGroups';
|
20
21
|
exports.mainMarket = '7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF';
|
21
22
|
exports.lendingConfigs = new Map([
|
22
23
|
[
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;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;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD;QACE,8CAA8C;QAC9C;YACE,IAAI,EAAE,YAAY;YAClB,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC7E,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;CAC5E,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,oCAAoC;IAC/C,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC;AACW,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,6CAA6C;IACxD,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAK/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,OAAO,EAAE,yBAA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AC9C;YACE,IAAI,EAAE,YAAY;YAClB,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC7E,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;CAC5E,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,oCAAoC;IAC/C,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC;AACW,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,6CAA6C;IACxD,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC"}
|
@@ -25,10 +25,20 @@ const zeroAdressValue = '11111111111111111111111111111111';
|
|
25
25
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
26
|
const client = (0, clients_1.getClientSolana)();
|
27
27
|
const networkId = portfolio_core_1.NetworkId.solana;
|
28
|
-
const markets = yield
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
const [markets, elevationGroupsAccounts] = yield Promise.all([
|
29
|
+
cache.getItem(constants_1.marketsKey, {
|
30
|
+
prefix: constants_1.platformId,
|
31
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
32
|
+
}),
|
33
|
+
cache.getItem(constants_1.elevationGroupsKey, {
|
34
|
+
prefix: constants_1.platformId,
|
35
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
36
|
+
}),
|
37
|
+
]);
|
38
|
+
if (!markets)
|
39
|
+
return [];
|
40
|
+
const elevationGroups = new Map();
|
41
|
+
elevationGroupsAccounts === null || elevationGroupsAccounts === void 0 ? void 0 : elevationGroupsAccounts.forEach((group) => elevationGroups.set(group.id, group));
|
32
42
|
const [lendingPdas, multiplyPdas] = markets
|
33
43
|
? [(0, pdas_1.getLendingPda)(owner, markets), (0, pdas_1.getMultiplyPdas)(owner, markets)]
|
34
44
|
: [[], []];
|
@@ -152,6 +162,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
152
162
|
const name = lendingConfig
|
153
163
|
? `Multiply ${lendingConfig.name}`
|
154
164
|
: 'Multiply';
|
165
|
+
const elevationGroup = elevationGroups.get(multiplyAccount.elevationGroup);
|
155
166
|
const borrowedAssets = [];
|
156
167
|
const borrowedYields = [];
|
157
168
|
const suppliedAssets = [];
|
@@ -174,7 +185,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
174
185
|
.dividedBy(reserve.exchangeRate)
|
175
186
|
.toNumber();
|
176
187
|
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(mint, amount, networkId, tokenPrice));
|
177
|
-
|
188
|
+
if (elevationGroup)
|
189
|
+
suppliedLtvs.push(elevationGroup.liquidationThresholdPct / 100);
|
190
|
+
else {
|
191
|
+
suppliedLtvs.push(0);
|
192
|
+
}
|
178
193
|
suppliedYields.push([
|
179
194
|
{ apr: reserve.supplyApr, apy: (0, portfolio_core_1.aprToApy)(reserve.supplyApr) },
|
180
195
|
]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAKqB;AAGrB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Ac;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,WAAW,EAAE,IAAI;oBACjB,YAAY;oBACZ,WAAW;oBACX,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":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,2CAMqB;AAGrB,iDAAsD;AACtD,2CAAmE;AACnE,qGAA6E;AAE7E,+CAAmE;AACnE,yCAIwB;AACxB,6CAAsE;AAEtE,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;IAEnC,MAAM,CAAC,OAAO,EAAE,uBAAuB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3D,KAAK,CAAC,OAAO,CAAW,sBAAU,EAAE;YAClC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;QACF,KAAK,CAAC,OAAO,CAAmB,8BAAkB,EAAE;YAClD,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAExB,MAAM,eAAe,GAAgC,IAAI,GAAG,EAAE,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AK;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"}
|
@@ -18,7 +18,14 @@ const klend_1 = require("./structs/klend");
|
|
18
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
19
|
const client = (0, clients_1.getClientSolana)();
|
20
20
|
const lendingMarketAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, klend_1.lendingMarketStruct, constants_1.klendProgramId, (0, filters_1.dataSizeFilter)(klend_1.lendingMarketStruct.byteSize));
|
21
|
+
const elevationGroups = lendingMarketAccounts
|
22
|
+
.map((market) => market.elevationGroups)
|
23
|
+
.flat();
|
21
24
|
yield cache.setItem(constants_1.marketsKey, lendingMarketAccounts.map((acc) => acc.pubkey.toString()), { prefix: constants_1.platformId, networkId: portfolio_core_1.NetworkId.solana });
|
25
|
+
yield cache.setItem(constants_1.elevationGroupsKey, elevationGroups, {
|
26
|
+
prefix: constants_1.platformId,
|
27
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
28
|
+
});
|
22
29
|
});
|
23
30
|
const job = {
|
24
31
|
id: `${constants_1.platformId}-markets`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,
|
1
|
+
{"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAKqB;AACrB,2CAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,qBAAqB,GAAG,MAAM,IAAA,iCAAwB,EAC1D,MAAM,EACN,2BAAmB,EACnB,0BAAc,EACd,IAAA,wBAAc,EAAC,2BAAmB,CAAC,QAAQ,CAAC,CAC7C,CAAC;IAEF,MAAM,eAAe,GAAG,qBAAqB;SAC1C,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC;SACvC,IAAI,EAAE,CAAC;IAEV,MAAM,KAAK,CAAC,OAAO,CACjB,sBAAU,EACV,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EACzD,EAAE,MAAM,EAAE,sBAAU,EAAE,SAAS,EAAE,0BAAS,CAAC,MAAM,EAAE,CACpD,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,8BAAkB,EAAE,eAAe,EAAE;QACvD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "tradeport";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const locksCacheKey = "locks";
|
5
|
+
export declare const lockStore = "0x4b705de46a79b29276baf45009bc7d6f70cc0f1407f0c9e03cac5729c0c47946";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.lockStore = exports.locksCacheKey = exports.platform = exports.platformId = void 0;
|
4
|
+
exports.platformId = 'tradeport';
|
5
|
+
exports.platform = {
|
6
|
+
id: exports.platformId,
|
7
|
+
name: 'Tradeport',
|
8
|
+
image: 'https://sonar.watch/img/platforms/tradeport.webp',
|
9
|
+
website: 'https://www.tradeport.xyz/',
|
10
|
+
twitter: 'https://x.com/tradeportxyz',
|
11
|
+
// defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
|
12
|
+
};
|
13
|
+
exports.locksCacheKey = `locks`;
|
14
|
+
exports.lockStore = '0x4b705de46a79b29276baf45009bc7d6f70cc0f1407f0c9e03cac5729c0c47946';
|
15
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tradeport/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,4BAA4B;IACrC,qEAAqE;CACtE,CAAC;AACW,QAAA,aAAa,GAAG,OAAO,CAAC;AAExB,QAAA,SAAS,GACpB,oEAAoE,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getTypeLabel = exports.getStatusLabel = void 0;
|
4
|
+
const getStatusLabel = (status) => {
|
5
|
+
if (status === '0') {
|
6
|
+
return 'Not Taken';
|
7
|
+
}
|
8
|
+
if (status === '1') {
|
9
|
+
return 'Active';
|
10
|
+
}
|
11
|
+
return null;
|
12
|
+
};
|
13
|
+
exports.getStatusLabel = getStatusLabel;
|
14
|
+
const getTypeLabel = (type) => {
|
15
|
+
if (type === '0') {
|
16
|
+
return 'Short';
|
17
|
+
}
|
18
|
+
if (type === '1') {
|
19
|
+
return 'Long';
|
20
|
+
}
|
21
|
+
return null;
|
22
|
+
};
|
23
|
+
exports.getTypeLabel = getTypeLabel;
|
24
|
+
//# sourceMappingURL=helpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tradeport/helpers.ts"],"names":[],"mappings":";;;AAAO,MAAM,cAAc,GAAG,CAAC,MAAc,EAAE,EAAE;IAC/C,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AARW,QAAA,cAAc,kBAQzB;AAEK,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACjB,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACjB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
@@ -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 positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
9
|
+
const locksJob_1 = __importDefault(require("./locksJob"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [locksJob_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/tradeport/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAClD,0DAAkC;AAErB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,kBAAQ,CAAC,CAAC;AACzB,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
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 clients_1 = require("../../utils/clients");
|
15
|
+
const getDynamicFieldObjects_1 = require("../../utils/sui/getDynamicFieldObjects");
|
16
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
17
|
+
const client = (0, clients_1.getClientSui)();
|
18
|
+
const locks = yield (0, getDynamicFieldObjects_1.getDynamicFieldObjects)(client, constants_1.lockStore, {
|
19
|
+
showContent: true,
|
20
|
+
});
|
21
|
+
yield cache.setItem(constants_1.locksCacheKey, locks.map((l) => { var _a; return (_a = l.data) === null || _a === void 0 ? void 0 : _a.content; }).filter((l) => l !== null), {
|
22
|
+
prefix: constants_1.platformId,
|
23
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
24
|
+
});
|
25
|
+
});
|
26
|
+
const job = {
|
27
|
+
id: `${constants_1.platformId}-locks`,
|
28
|
+
executor,
|
29
|
+
label: 'realtime',
|
30
|
+
};
|
31
|
+
exports.default = job;
|
32
|
+
//# sourceMappingURL=locksJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"locksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tradeport/locksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAmE;AACnE,iDAAmD;AACnD,mFAAgF;AAEhF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,MAAM,IAAA,+CAAsB,EAAO,MAAM,EAAE,qBAAS,EAAE;QAClE,WAAW,EAAE,IAAI;KAClB,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,OAAO,CACjB,yBAAa,EACb,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,OAAO,CAAA,EAAA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAC3D;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,UAAU;CAClB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
19
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
|
+
const helpers_1 = require("./helpers");
|
21
|
+
const locksMemo = new MemoizedCache_1.MemoizedCache(constants_1.locksCacheKey, {
|
22
|
+
prefix: constants_1.platformId,
|
23
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
24
|
+
});
|
25
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
|
+
const allLocks = yield locksMemo.getItem(cache);
|
27
|
+
if (!allLocks)
|
28
|
+
return [];
|
29
|
+
const locks = allLocks.filter((lock) => lock.fields.maker === owner);
|
30
|
+
if (!locks)
|
31
|
+
return [];
|
32
|
+
const suiTokenPrice = yield cache.getTokenPrice(portfolio_core_1.suiNetwork.native.address, portfolio_core_1.NetworkId.sui);
|
33
|
+
if (!suiTokenPrice)
|
34
|
+
return [];
|
35
|
+
const assets = [];
|
36
|
+
locks.forEach((lock) => {
|
37
|
+
var _a, _b;
|
38
|
+
const attributes = {
|
39
|
+
tags: [],
|
40
|
+
};
|
41
|
+
if (lock.fields.expire_at) {
|
42
|
+
attributes.lockedUntil = Number(lock.fields.expire_at);
|
43
|
+
}
|
44
|
+
const statusLabel = (0, helpers_1.getStatusLabel)(lock.fields.state);
|
45
|
+
if (statusLabel) {
|
46
|
+
(_a = attributes.tags) === null || _a === void 0 ? void 0 : _a.push(statusLabel);
|
47
|
+
}
|
48
|
+
const typeLabel = (0, helpers_1.getTypeLabel)(lock.fields.lock_type);
|
49
|
+
if (typeLabel) {
|
50
|
+
(_b = attributes.tags) === null || _b === void 0 ? void 0 : _b.push(typeLabel);
|
51
|
+
}
|
52
|
+
assets.push((0, tokenPriceToAssetToken_1.default)(suiTokenPrice.address, new bignumber_js_1.default(lock.fields.maker_price)
|
53
|
+
.dividedBy(Math.pow(10, suiTokenPrice.decimals))
|
54
|
+
.toNumber(), portfolio_core_1.NetworkId.sui, suiTokenPrice, undefined, attributes));
|
55
|
+
});
|
56
|
+
if (assets.length === 0)
|
57
|
+
return [];
|
58
|
+
return [
|
59
|
+
{
|
60
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
61
|
+
platformId: constants_1.platformId,
|
62
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
63
|
+
label: 'Deposit',
|
64
|
+
name: 'Locks',
|
65
|
+
data: { assets },
|
66
|
+
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
|
67
|
+
},
|
68
|
+
];
|
69
|
+
});
|
70
|
+
const fetcher = {
|
71
|
+
id: `${constants_1.platformId}-positions`,
|
72
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
73
|
+
executor,
|
74
|
+
};
|
75
|
+
exports.default = fetcher;
|
76
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tradeport/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAErC,2CAAwD;AAExD,kEAA+D;AAE/D,qGAA6E;AAC7E,uCAAyD;AAEzD,MAAM,SAAS,GAAG,IAAI,6BAAa,CAAS,yBAAa,EAAE;IACzD,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhD,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IAErE,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,aAAa,GAAG,MAAM,KAAK,CAAC,aAAa,CAC7C,2BAAU,CAAC,MAAM,CAAC,OAAO,EACzB,0BAAS,CAAC,GAAG,CACd,CAAC;IACF,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,MAAM,GAAqB,EAAE,CAAC;IAEpC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;;QACrB,MAAM,UAAU,GAA6B;YAC3C,IAAI,EAAE,EAAE;SACT,CAAC;QAEF,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;YAC1B,UAAU,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,WAAW,GAAG,IAAA,wBAAc,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O,CAAC"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
type ID = {
|
2
|
+
id: string;
|
3
|
+
};
|
4
|
+
export type Lock = {
|
5
|
+
fields: {
|
6
|
+
expire_at: string;
|
7
|
+
expire_in: string;
|
8
|
+
id: ID;
|
9
|
+
lock_type: string;
|
10
|
+
maker: string;
|
11
|
+
maker_price: string;
|
12
|
+
marketplace_fee: string;
|
13
|
+
nft_id: string;
|
14
|
+
premium: string;
|
15
|
+
premium_fee: string;
|
16
|
+
royalty: string;
|
17
|
+
state: string;
|
18
|
+
taker: string;
|
19
|
+
taker_price: string;
|
20
|
+
};
|
21
|
+
type: string;
|
22
|
+
};
|
23
|
+
export type LockObject = {
|
24
|
+
id: ID;
|
25
|
+
name: number[];
|
26
|
+
value: Lock;
|
27
|
+
};
|
28
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tradeport/types.ts"],"names":[],"mappings":""}
|