@sonarwatch/portfolio-plugins 0.15.55 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/Cache.js +21 -11
- package/src/Cache.js.map +1 -1
- package/src/plugins/jupiter/constants.d.ts +2 -3
- package/src/plugins/jupiter/constants.js +6 -4
- package/src/plugins/jupiter/constants.js.map +1 -1
- package/src/plugins/jupiter/index.js +2 -3
- package/src/plugins/jupiter/index.js.map +1 -1
- package/src/plugins/jupiter/pricing/getJupiterPrices.d.ts +2 -0
- package/src/plugins/jupiter/{getJupiterPrices.js → pricing/getJupiterPrices.js} +2 -27
- package/src/plugins/jupiter/pricing/getJupiterPrices.js.map +1 -0
- package/src/plugins/jupiter/{pricingJob.js → pricing/pricingJob.js} +25 -29
- package/src/plugins/jupiter/pricing/pricingJob.js.map +1 -0
- package/src/plugins/jupiter/pricing/setJupiterPrices.d.ts +2 -0
- package/src/plugins/jupiter/pricing/setJupiterPrices.js +39 -0
- package/src/plugins/jupiter/pricing/setJupiterPrices.js.map +1 -0
- package/src/plugins/{jupiter/verifiedJob.d.ts → meteora/dbc/dbcPricingJob.d.ts} +1 -1
- package/src/plugins/meteora/dbc/{pricingDbcJob.js → dbcPricingJob.js} +5 -5
- package/src/plugins/meteora/dbc/{pricingDbcJob.js.map → dbcPricingJob.js.map} +1 -1
- package/src/plugins/meteora/index.js +2 -2
- package/src/plugins/sanctum/constants.d.ts +0 -1
- package/src/plugins/sanctum/constants.js +1 -2
- package/src/plugins/sanctum/constants.js.map +1 -1
- package/src/plugins/sanctum/index.js +2 -2
- package/src/plugins/sanctum/index.js.map +1 -1
- package/src/plugins/sanctum/{lstsJob.js → lstsPricingJob.js} +6 -8
- package/src/plugins/sanctum/lstsPricingJob.js.map +1 -0
- package/src/plugins/tokens/fetchers/solana.js +21 -24
- package/src/plugins/tokens/fetchers/solana.js.map +1 -1
- package/src/utils/elementbuilder/ElementRegistry.js +5 -3
- package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
- package/src/plugins/jupiter/getJupiterPrices.d.ts +0 -7
- package/src/plugins/jupiter/getJupiterPrices.js.map +0 -1
- package/src/plugins/jupiter/pricingJob.js.map +0 -1
- package/src/plugins/jupiter/verifiedJob.js +0 -32
- package/src/plugins/jupiter/verifiedJob.js.map +0 -1
- package/src/plugins/sanctum/lstsJob.d.ts +0 -3
- package/src/plugins/sanctum/lstsJob.js.map +0 -1
- /package/src/plugins/{meteora/dbc/pricingDbcJob.d.ts → jupiter/pricing/pricingJob.d.ts} +0 -0
- /package/src/plugins/{jupiter/pricingJob.d.ts → sanctum/lstsPricingJob.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.16.1](https://github.com/sonarwatch/portfolio/compare/plugins-0.16.0...plugins-0.16.1) (2025-07-04)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
# [0.16.0](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.55...plugins-0.16.0) (2025-07-04)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.15.56](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.55...plugins-0.15.56) (2025-07-04)
|
14
|
+
|
15
|
+
|
16
|
+
|
5
17
|
## [0.15.55](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.54...plugins-0.15.55) (2025-07-03)
|
6
18
|
|
7
19
|
|
package/package.json
CHANGED
package/src/Cache.js
CHANGED
@@ -143,15 +143,20 @@ class Cache {
|
|
143
143
|
}
|
144
144
|
getTokenPricesAsMap(addresses, networkId) {
|
145
145
|
return __awaiter(this, void 0, void 0, function* () {
|
146
|
-
const uniqueAddresses =
|
147
|
-
if (uniqueAddresses.
|
146
|
+
const uniqueAddresses = Array.from(addresses instanceof Set ? addresses : new Set(addresses));
|
147
|
+
if (uniqueAddresses.length === 0) {
|
148
148
|
return new portfolio_core_1.TokenPriceMap(networkId, []);
|
149
149
|
}
|
150
|
-
const tokenPriceSources = yield this.getTokenPricesSources(
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
150
|
+
const tokenPriceSources = yield this.getTokenPricesSources(uniqueAddresses, networkId);
|
151
|
+
return new portfolio_core_1.TokenPriceMap(networkId, tokenPriceSources.reduce((acc, sources) => {
|
152
|
+
if (sources) {
|
153
|
+
const tokenPrice = (0, portfolio_core_1.tokenPriceFromSources)(sources);
|
154
|
+
if (tokenPrice) {
|
155
|
+
acc.push([tokenPrice.address, tokenPrice]);
|
156
|
+
}
|
157
|
+
}
|
158
|
+
return acc;
|
159
|
+
}, []));
|
155
160
|
});
|
156
161
|
}
|
157
162
|
getTokenPriceSources(address, networkId) {
|
@@ -240,11 +245,16 @@ class Cache {
|
|
240
245
|
}
|
241
246
|
getTokenYieldsAsMap(addresses, networkId) {
|
242
247
|
return __awaiter(this, void 0, void 0, function* () {
|
243
|
-
const
|
248
|
+
const uniqueAddresses = Array.from(addresses instanceof Set ? addresses : new Set(addresses));
|
249
|
+
const tokenYields = yield this.getItems(uniqueAddresses, {
|
244
250
|
prefix: tokenYieldPrefix,
|
245
|
-
networkId
|
246
|
-
})
|
247
|
-
return new TokenYieldMap_1.TokenYieldMap(networkId, tokenYields.
|
251
|
+
networkId,
|
252
|
+
});
|
253
|
+
return new TokenYieldMap_1.TokenYieldMap(networkId, tokenYields.reduce((acc, y) => {
|
254
|
+
if (y)
|
255
|
+
acc.push([y.address, y]);
|
256
|
+
return acc;
|
257
|
+
}, []));
|
248
258
|
});
|
249
259
|
}
|
250
260
|
removeItem(key, opts) {
|
package/src/Cache.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,IAAI,kCAC7C,EAAE;qBACH;iBACF;aACF,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,EAAE;aACX,CAAC;IACN,CAAC;AACH,CAAC;AAlED,wCAkEC;AAED,SAAgB,QAAQ;IACtB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;AAHD,4BAGC"}
|
@@ -2,10 +2,9 @@
|
|
2
2
|
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
export declare const jupApiParams: string | undefined;
|
5
|
-
export declare const jupDatapiHeaderKey: string | undefined;
|
6
|
-
export declare const
|
5
|
+
export declare const jupDatapiHeaderKey: string | undefined, jupDatapiHeaderValue: string | undefined;
|
6
|
+
export declare const jupDatapiTokensUrl: string | undefined;
|
7
7
|
export declare const voteProgramId: PublicKey;
|
8
8
|
export declare const lockerPubkey: PublicKey;
|
9
9
|
export declare const jupMint = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
10
10
|
export declare const jupDecimals = 6;
|
11
|
-
export declare const verifiedTokensCacheKey = "verified_tokens";
|
@@ -1,13 +1,15 @@
|
|
1
1
|
"use strict";
|
2
|
+
var _a;
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
+
exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.jupDatapiTokensUrl = exports.jupDatapiHeaderValue = exports.jupDatapiHeaderKey = exports.jupApiParams = void 0;
|
4
5
|
const web3_js_1 = require("@solana/web3.js");
|
5
6
|
exports.jupApiParams = process.env['PORTFOLIO_JUP_API_PARAM'];
|
6
|
-
|
7
|
-
|
7
|
+
_a = process.env['PORTFOLIO_DATAPI_HEADER']
|
8
|
+
? process.env['PORTFOLIO_DATAPI_HEADER'].split(':')
|
9
|
+
: [undefined, undefined], exports.jupDatapiHeaderKey = _a[0], exports.jupDatapiHeaderValue = _a[1];
|
10
|
+
exports.jupDatapiTokensUrl = process.env['PORTFOLIO_JUP_DATAPI_TOKENS_URL'];
|
8
11
|
exports.voteProgramId = new web3_js_1.PublicKey('voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj');
|
9
12
|
exports.lockerPubkey = new web3_js_1.PublicKey('CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN');
|
10
13
|
exports.jupMint = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
|
11
14
|
exports.jupDecimals = 6;
|
12
|
-
exports.verifiedTokensCacheKey = 'verified_tokens';
|
13
15
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/constants.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/constants.ts"],"names":[],"mappings":";;;;AAAA,6CAA4C;AAE/B,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AACtD,KAA6C,OAAO,CAAC,GAAG,CACnE,yBAAyB,CAC1B;IACC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IACnD,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAJZ,0BAAkB,UAAE,4BAAoB,SAI3B;AAEd,QAAA,kBAAkB,GAC7B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AAEpC,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC"}
|
@@ -11,11 +11,10 @@ const dcaFetcher_1 = __importDefault(require("./exchange/dcaFetcher"));
|
|
11
11
|
const lockFetcher_1 = __importDefault(require("./exchange/lockFetcher"));
|
12
12
|
const custodiesJob_1 = __importDefault(require("./exchange/custodiesJob"));
|
13
13
|
const voteFetcher_1 = __importDefault(require("./governance/voteFetcher"));
|
14
|
-
const pricingJob_1 = __importDefault(require("./pricingJob"));
|
15
14
|
const governance_1 = require("./governance");
|
16
15
|
const launchpad_1 = require("./launchpad");
|
17
|
-
const
|
18
|
-
exports.jobs = [custodiesJob_1.default,
|
16
|
+
const pricingJob_1 = __importDefault(require("./pricing/pricingJob"));
|
17
|
+
exports.jobs = [custodiesJob_1.default, pricingJob_1.default];
|
19
18
|
exports.fetchers = [
|
20
19
|
perpetualFetcher_1.default,
|
21
20
|
valueAverageFetcher_1.default,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAEA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,yEAAiD;AACjD,2EAAmD;AAEnD,2EAAmD;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/index.ts"],"names":[],"mappings":";;;;;;AAEA,mFAA2D;AAC3D,yFAAiE;AACjE,2EAAmD;AACnD,uEAA+C;AAC/C,yEAAiD;AACjD,2EAAmD;AAEnD,2EAAmD;AAEnD,6CAOsB;AACtB,2CAA8D;AAC9D,sEAA8C;AAEjC,QAAA,IAAI,GAAU,CAAC,sBAAY,EAAE,oBAAU,CAAC,CAAC;AACzC,QAAA,QAAQ,GAAc;IACjC,0BAAgB;IAChB,6BAAmB;IACnB,sBAAY;IACZ,oBAAU;IACV,qBAAW;IACX,qBAAW;IACX,wBAAW;IACX,GAAG,uBAAW;CACf,CAAC;AACW,QAAA,eAAe,GAAqB;IAC/C,+BAAkB;IAClB,+BAAkB;IAClB,+BAAkB;IAClB,+BAAkB;IAClB,+BAAkB;IAClB,GAAG,8BAAkB;CACtB,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,0BAAgB,CAAC,EAAE;IACnB,6BAAmB,CAAC,EAAE;IACtB,sBAAY,CAAC,EAAE;IACf,oBAAU,CAAC,EAAE;IACb,qBAAW,CAAC,EAAE;IACd,qBAAW,CAAC,EAAE;CACf,CAAC"}
|
@@ -12,36 +12,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.getJupiterPrices =
|
15
|
+
exports.getJupiterPrices = void 0;
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
17
|
-
const
|
18
|
-
const constants_1 = require("./constants");
|
17
|
+
const constants_1 = require("../constants");
|
19
18
|
const maxIdsPerRequest = 50;
|
20
19
|
const jupDatapiAssetsUrl = 'https://datapi.jup.ag/v1/assets';
|
21
|
-
function setJupiterPrices(mints, cache) {
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
23
|
-
const assets = yield getJupiterPrices(mints);
|
24
|
-
const sources = [];
|
25
|
-
assets.forEach((asset, mint) => {
|
26
|
-
const source = {
|
27
|
-
address: mint,
|
28
|
-
decimals: asset.decimals,
|
29
|
-
id: portfolio_core_1.jupiterSourceId,
|
30
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
31
|
-
timestamp: Date.now(),
|
32
|
-
price: asset.usdPrice,
|
33
|
-
priceChange24h: asset.priceChange24h
|
34
|
-
? asset.priceChange24h / 100
|
35
|
-
: undefined,
|
36
|
-
platformId: portfolio_core_1.walletTokensPlatformId,
|
37
|
-
weight: 1,
|
38
|
-
};
|
39
|
-
sources.push(source);
|
40
|
-
});
|
41
|
-
yield cache.setTokenPriceSources(sources);
|
42
|
-
});
|
43
|
-
}
|
44
|
-
exports.setJupiterPrices = setJupiterPrices;
|
45
20
|
function getJupiterPrices(mints) {
|
46
21
|
return __awaiter(this, void 0, void 0, function* () {
|
47
22
|
let res;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getJupiterPrices.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/pricing/getJupiterPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAE7C,4CAAwE;AAExE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;AAE7D,SAAsB,gBAAgB,CAAC,KAAe;;QACpD,IAAI,GAAG,CAAC;QACR,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,GAAG,GAAG,gBAAgB,CAAC;QAC3B,MAAM,QAAQ,GAAG,GAAG,kBAAkB,EAAE,CAAC;QAEzC,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;QAEjE,GAAG,CAAC;YACF,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAEzC,IAAI,CAAC,QAAQ,CAAC,MAAM;gBAAE,MAAM;YAE5B,IAAI,OAAO,GAAG,EAAE,CAAC;YACjB,IAAI,8BAAkB,IAAI,gCAAoB;gBAC5C,OAAO,GAAG;oBACR,CAAC,8BAAkB,CAAC,EAAE,gCAAoB;iBAC3C,CAAC;YAEJ,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CACnB,QAAQ,EACR;gBACE,MAAM,EAAE;oBACN,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;iBACjD;gBACD,OAAO;aACR,CACF,CAAC;YAEF,KAAK,GAAG,GAAG,CAAC;YACZ,GAAG,IAAI,gBAAgB,CAAC;YACxB,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC,QAAQ,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QAEhC,MAAM,MAAM,GAA6B,IAAI,GAAG,EAAE,CAAC;QACnD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;gBAClD,IAAI,KAAK,CAAC,QAAQ;oBAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA5CD,4CA4CC"}
|
@@ -8,50 +8,46 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
15
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
-
const
|
14
|
-
const constants_1 = require("
|
15
|
-
const constants_2 = require("
|
16
|
-
const constants_3 = require("
|
17
|
-
const
|
18
|
-
const constants_4 = require("../lifinity/constants");
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
17
|
+
const constants_1 = require("../exchange/constants");
|
18
|
+
const constants_2 = require("../constants");
|
19
|
+
const constants_3 = require("../../lifinity/constants");
|
20
|
+
const setJupiterPrices_1 = require("./setJupiterPrices");
|
19
21
|
const mints = [
|
22
|
+
portfolio_core_1.solanaNativeWrappedAddress,
|
20
23
|
'8Yv9Jz4z7BUHP68dz8E8m3tMe6NKgpMUKn8KVqrPA6Fr', // Wrapped USDC (Allbridge from Avalanche)
|
21
24
|
'FHfba3ov5P3RjaiLVgh8FTv4oirxQDoVXuoUUDvHuXax', // USDC (Wormhole from Avalanche)
|
22
25
|
'Kz1csQA91WUGcQ2TB3o5kdGmWmMGp8eJcDEyHzNDVCX', // USDT (Wormhole from Avalanche)
|
23
26
|
'Bn113WT6rbdgwrm12UJtnmNqGqZjY4it2WoUQuQopFVn', // Wrapped USDT (Allbridge from Ethereum)
|
24
27
|
'E77cpQ4VncGmcAXX16LHFFzNBEBb2U7Ar7LBmZNfCgwL', // Wrapped USDT (Allbridge from BSC)
|
25
28
|
'8qJSyQprMC57TWKaYEmetUR3UUiTP2M3hXdcvFhkZdmv', // Tether USD (Wormhole from BSC)
|
26
|
-
|
27
|
-
|
29
|
+
constants_3.xLfntyMint,
|
30
|
+
constants_3.lfntyMint,
|
28
31
|
];
|
29
32
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
console.warn('Sanctums tokens not in cache');
|
44
|
-
const mintsPk = new Set([
|
45
|
-
...mints.map((m) => new web3_js_1.PublicKey(m)),
|
46
|
-
...(sanctumMints || []).map((a) => new web3_js_1.PublicKey(a)),
|
47
|
-
...(verifiedTokens || []).map((token) => new web3_js_1.PublicKey(token.address)),
|
48
|
-
]);
|
49
|
-
yield (0, getJupiterPrices_1.setJupiterPrices)([...mintsPk], cache);
|
33
|
+
if (!constants_2.jupDatapiHeaderKey || !constants_2.jupDatapiHeaderValue) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
if (!constants_2.jupDatapiTokensUrl)
|
37
|
+
throw new Error('PORTFOLIO_JUP_DATAPI_TOKENS_URL not set');
|
38
|
+
const apiRes = yield axios_1.default.get(constants_2.jupDatapiTokensUrl, {
|
39
|
+
headers: {
|
40
|
+
[constants_2.jupDatapiHeaderKey]: constants_2.jupDatapiHeaderValue,
|
41
|
+
},
|
42
|
+
});
|
43
|
+
const tokens = apiRes.data.addresses;
|
44
|
+
mints.forEach((m) => tokens.push(m));
|
45
|
+
yield (0, setJupiterPrices_1.setJupiterPrices)(tokens, cache);
|
50
46
|
});
|
51
47
|
const job = {
|
52
48
|
id: `${constants_1.platformId}-pricing`,
|
53
49
|
executor,
|
54
|
-
labels: ['
|
50
|
+
labels: ['normal', portfolio_core_1.NetworkId.solana],
|
55
51
|
};
|
56
52
|
exports.default = job;
|
57
53
|
//# sourceMappingURL=pricingJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/pricing/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAGoC;AACpC,kDAA0B;AAG1B,qDAAmD;AACnD,4CAIsB;AACtB,wDAAiE;AACjE,yDAAsD;AAEtD,MAAM,KAAK,GAAG;IACZ,2CAA0B;IAC1B,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,iCAAiC;IACjF,sBAAU;IACV,qBAAS;CACV,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,IAAI,CAAC,8BAAkB,IAAI,CAAC,gCAAoB,EAAE,CAAC;QACjD,OAAO;IACT,CAAC;IAED,IAAI,CAAC,8BAAkB;QACrB,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAE7D,MAAM,MAAM,GAAG,MAAM,eAAK,CAAC,GAAG,CAA0B,8BAAkB,EAAE;QAC1E,OAAO,EAAE;YACP,CAAC,8BAAkB,CAAC,EAAE,gCAAoB;SAC3C;KACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;IACrC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAErC,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACxC,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC;CACrC,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,39 @@
|
|
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
|
+
exports.setJupiterPrices = void 0;
|
13
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
14
|
+
const getJupiterPrices_1 = require("./getJupiterPrices");
|
15
|
+
function setJupiterPrices(mints, cache) {
|
16
|
+
return __awaiter(this, void 0, void 0, function* () {
|
17
|
+
const assets = yield (0, getJupiterPrices_1.getJupiterPrices)(mints);
|
18
|
+
const sources = [];
|
19
|
+
assets.forEach((asset, mint) => {
|
20
|
+
const source = {
|
21
|
+
address: mint,
|
22
|
+
decimals: asset.decimals,
|
23
|
+
id: portfolio_core_1.jupiterSourceId,
|
24
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
25
|
+
timestamp: Date.now(),
|
26
|
+
price: asset.usdPrice,
|
27
|
+
priceChange24h: asset.priceChange24h
|
28
|
+
? asset.priceChange24h / 100
|
29
|
+
: undefined,
|
30
|
+
platformId: portfolio_core_1.walletTokensPlatformId,
|
31
|
+
weight: 1,
|
32
|
+
};
|
33
|
+
sources.push(source);
|
34
|
+
});
|
35
|
+
yield cache.setTokenPriceSources(sources);
|
36
|
+
});
|
37
|
+
}
|
38
|
+
exports.setJupiterPrices = setJupiterPrices;
|
39
|
+
//# sourceMappingURL=setJupiterPrices.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"setJupiterPrices.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/pricing/setJupiterPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAEpC,yDAAsD;AAEtD,SAAsB,gBAAgB,CAAC,KAAe,EAAE,KAAY;;QAClE,MAAM,MAAM,GAAG,MAAM,IAAA,mCAAgB,EAAC,KAAK,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAqB;gBAC/B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,EAAE,EAAE,gCAAe;gBACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,KAAK,EAAE,KAAK,CAAC,QAAQ;gBACrB,cAAc,EAAE,KAAK,CAAC,cAAc;oBAClC,CAAC,CAAC,KAAK,CAAC,cAAc,GAAG,GAAG;oBAC5B,CAAC,CAAC,SAAS;gBACb,UAAU,EAAE,uCAAsB;gBAClC,MAAM,EAAE,CAAC;aACV,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;CAAA;AAtBD,4CAsBC"}
|
@@ -13,7 +13,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
13
13
|
const clients_1 = require("../../../utils/clients");
|
14
14
|
const constants_1 = require("../constants");
|
15
15
|
const structs_1 = require("./structs");
|
16
|
-
const
|
16
|
+
const setJupiterPrices_1 = require("../../jupiter/pricing/setJupiterPrices");
|
17
17
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
18
18
|
const client = (0, clients_1.getClientSolana)();
|
19
19
|
const accounts = yield client.getProgramAccounts(constants_1.dbcProgramId, {
|
@@ -22,14 +22,14 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
22
|
});
|
23
23
|
const mintsPk = accounts.map((account) => {
|
24
24
|
const virtualPool = structs_1.virtualPoolStruct.deserialize(account.account.data)[0];
|
25
|
-
return virtualPool.base_mint;
|
25
|
+
return virtualPool.base_mint.toString();
|
26
26
|
});
|
27
|
-
yield (0,
|
27
|
+
yield (0, setJupiterPrices_1.setJupiterPrices)(mintsPk, cache);
|
28
28
|
});
|
29
29
|
const job = {
|
30
|
-
id: `${constants_1.platformId}-pricing
|
30
|
+
id: `${constants_1.platformId}-dbc-pricing`,
|
31
31
|
executor,
|
32
32
|
labels: [portfolio_core_1.NetworkId.solana],
|
33
33
|
};
|
34
34
|
exports.default = job;
|
35
|
-
//# sourceMappingURL=
|
35
|
+
//# sourceMappingURL=dbcPricingJob.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"
|
1
|
+
{"version":3,"file":"dbcPricingJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/meteora/dbc/dbcPricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,4CAAwD;AACxD,uCAA8C;AAC9C,6EAA0E;AAE1E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,wBAAY,EAAE;QAC7D,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;QAC1D,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE;KACtC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QACvC,MAAM,WAAW,GAAG,2BAAiB,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,OAAO,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,MAAM,IAAA,mCAAgB,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACzC,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,QAAQ;IACR,MAAM,EAAE,CAAC,0BAAS,CAAC,MAAM,CAAC;CAC3B,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -16,7 +16,7 @@ const stakeForFeeFetcher_1 = __importDefault(require("./stake2earn/stakeForFeeFe
|
|
16
16
|
const stakeForFeeVaultsJob_1 = __importDefault(require("./stake2earn/stakeForFeeVaultsJob"));
|
17
17
|
const cpammV2Job_1 = __importDefault(require("./cpamm/cpammV2Job"));
|
18
18
|
const dlmmJob_1 = __importDefault(require("./dlmm/dlmmJob"));
|
19
|
-
const
|
19
|
+
const dbcPricingJob_1 = __importDefault(require("./dbc/dbcPricingJob"));
|
20
20
|
exports.jobs = [
|
21
21
|
vaultsJob_1.default,
|
22
22
|
poolsJob_1.default,
|
@@ -26,7 +26,7 @@ exports.jobs = [
|
|
26
26
|
dlmmVaultsJob_1.default,
|
27
27
|
stakeForFeeVaultsJob_1.default,
|
28
28
|
cpammV2Job_1.default,
|
29
|
-
|
29
|
+
dbcPricingJob_1.default,
|
30
30
|
];
|
31
31
|
exports.fetchers = [
|
32
32
|
farmsFetcher_1.default,
|
@@ -7,7 +7,6 @@ export declare const platformImage = "https://sonar.watch/img/platforms/sanctum.
|
|
7
7
|
export declare const platformWebsite = "https://www.sanctum.so/";
|
8
8
|
export declare const cloudMint = "CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu";
|
9
9
|
export declare const sCloudMint = "sc1dNAxRBj5CNWaGC26AR7PEW75R36Umzt1V8vuP8kZ";
|
10
|
-
export declare const lstsKey = "lsts";
|
11
10
|
export declare const asrApi = "https://asr1-api.sanctum.so/amount/";
|
12
11
|
export declare const cloudDecimals = 9;
|
13
12
|
export declare const s1AirdropStatics: AirdropStatics;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.asrAirdropStatics = exports.distributorPid = exports.stakingPid = exports.nclbAirdropStatics = exports.s1AirdropStatics = exports.cloudDecimals = exports.asrApi = exports.
|
3
|
+
exports.asrAirdropStatics = exports.distributorPid = exports.stakingPid = exports.nclbAirdropStatics = exports.s1AirdropStatics = exports.cloudDecimals = exports.asrApi = exports.sCloudMint = exports.cloudMint = exports.platformWebsite = exports.platformImage = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'sanctum';
|
6
6
|
exports.platformImage = 'https://sonar.watch/img/platforms/sanctum.webp';
|
7
7
|
exports.platformWebsite = 'https://www.sanctum.so/';
|
8
8
|
exports.cloudMint = 'CLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu';
|
9
9
|
exports.sCloudMint = 'sc1dNAxRBj5CNWaGC26AR7PEW75R36Umzt1V8vuP8kZ';
|
10
|
-
exports.lstsKey = 'lsts';
|
11
10
|
// If this API doesn't work anymore, you can find the tree.json inside our shared convo
|
12
11
|
// with sanctum team
|
13
12
|
exports.asrApi = 'https://asr1-api.sanctum.so/amount/';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,aAAa,GAAG,gDAAgD,CAAC;AACjE,QAAA,eAAe,GAAG,yBAAyB,CAAC;AAC5C,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,UAAU,GAAG,6CAA6C,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,aAAa,GAAG,gDAAgD,CAAC;AACjE,QAAA,eAAe,GAAG,yBAAyB,CAAC;AAC5C,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,UAAU,GAAG,6CAA6C,CAAC;AAExE,uFAAuF;AACvF,oBAAoB;AACP,QAAA,MAAM,GAAG,qCAAqC,CAAC;AAC/C,QAAA,aAAa,GAAG,CAAC,CAAC;AAElB,QAAA,gBAAgB,GAAmB;IAC9C,EAAE,EAAE,SAAS;IACb,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,uBAAe;IAC5B,SAAS,EAAE,4BAA4B;IACvC,KAAK,EAAE,qBAAa;CACrB,CAAC;AAEW,QAAA,kBAAkB,GAAmB;IAChD,EAAE,EAAE,cAAc,EAAE,uBAAuB;IAC3C,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,uBAAe;IAC5B,SAAS,EAAE,mCAAmC;IAC9C,KAAK,EAAE,qBAAa;CACrB,CAAC;AAEW,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AACW,QAAA,iBAAiB,GAAmB;IAC/C,EAAE,EAAE,aAAa;IACjB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,uBAAe;IAC5B,SAAS,EAAE,0BAA0B;IACrC,KAAK,EAAE,qBAAa;IACpB,IAAI,EAAE,QAAQ;CACf,CAAC"}
|
@@ -7,9 +7,9 @@ exports.airdropFetchers = exports.fetchers = exports.jobs = void 0;
|
|
7
7
|
const s1AirdropFetcher_1 = require("./s1AirdropFetcher");
|
8
8
|
const nclbAirdropFetcher_1 = require("./nclbAirdropFetcher");
|
9
9
|
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
10
|
-
const lstsJob_1 = __importDefault(require("./lstsJob"));
|
11
10
|
const asrAirdropFetcher_1 = require("./asrAirdropFetcher");
|
12
|
-
|
11
|
+
const lstsPricingJob_1 = __importDefault(require("./lstsPricingJob"));
|
12
|
+
exports.jobs = [lstsPricingJob_1.default];
|
13
13
|
exports.fetchers = [
|
14
14
|
s1AirdropFetcher_1.fetcher,
|
15
15
|
nclbAirdropFetcher_1.fetcher,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/index.ts"],"names":[],"mappings":";;;;;;AAEA,yDAG4B;AAE5B,6DAG8B;AAC9B,sEAA8C;AAC9C,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/index.ts"],"names":[],"mappings":";;;;;;AAEA,yDAG4B;AAE5B,6DAG8B;AAC9B,sEAA8C;AAC9C,2DAAoE;AACpE,sEAA8C;AAEjC,QAAA,IAAI,GAAU,CAAC,wBAAc,CAAC,CAAC;AAC/B,QAAA,QAAQ,GAAc;IACjC,0BAAS;IACT,4BAAW;IACX,wBAAc;IACd,8BAAU;CACX,CAAC;AACW,QAAA,eAAe,GAAqB;IAC/C,iCAAgB;IAChB,mCAAkB;IAClB,qCAAiB;CAClB,CAAC"}
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const axios_1 = __importDefault(require("axios"));
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const constants_1 = require("./constants");
|
18
|
+
const setJupiterPrices_1 = require("../jupiter/pricing/setJupiterPrices");
|
18
19
|
const BATCH_SIZE = 100;
|
19
20
|
function chunkArray(arr, chunkSize) {
|
20
21
|
const result = [];
|
@@ -29,16 +30,13 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
30
|
const rawMints = String(res.data).match(regex);
|
30
31
|
if (rawMints) {
|
31
32
|
const mints = rawMints.map((mint) => mint.replace('"', ''));
|
32
|
-
yield
|
33
|
-
prefix: constants_1.platformId,
|
34
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
35
|
-
});
|
33
|
+
yield (0, setJupiterPrices_1.setJupiterPrices)(mints, cache);
|
36
34
|
const chunks = chunkArray(mints, BATCH_SIZE);
|
37
35
|
const allYields = [];
|
38
36
|
for (const chunk of chunks) {
|
39
37
|
const params = new URLSearchParams();
|
40
38
|
chunk.forEach((mint) => {
|
41
|
-
params.append('lst', mint);
|
39
|
+
params.append('lst', mint.toString());
|
42
40
|
});
|
43
41
|
const aprs = yield axios_1.default.get(`https://extra-api.sanctum.so/v1/apy/latest?${params.toString()}`);
|
44
42
|
const yields = Object.keys(aprs.data.apys).map((address) => {
|
@@ -59,9 +57,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
57
|
}
|
60
58
|
});
|
61
59
|
const job = {
|
62
|
-
id: `${constants_1.platformId}-lsts`,
|
60
|
+
id: `${constants_1.platformId}-lsts-pricing`,
|
63
61
|
executor,
|
64
|
-
labels: ['
|
62
|
+
labels: ['realtime', portfolio_core_1.NetworkId.solana],
|
65
63
|
};
|
66
64
|
exports.default = job;
|
67
|
-
//# sourceMappingURL=
|
65
|
+
//# sourceMappingURL=lstsPricingJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lstsPricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/lstsPricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAAiE;AAGjE,2CAAyC;AACzC,0EAAuE;AAEvE,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,SAAS,UAAU,CAAI,GAAQ,EAAE,SAAiB;IAChD,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,QAAQ,GAAgB,CA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GAAG,EAAE,IAAA,yBAAQ,EAAC,GAAG,CAAC;wBAClB,GAAG;qBACJ;oBACD,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;iBACtB,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;QAC5B,CAAC;QAED,MAAM,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;AACH,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,eAAe;IAChC,QAAQ;IACR,MAAM,EAAE,CAAC,UAAU,EAAE,0BAAS,CAAC,MAAM,CAAC;CACvC,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.getSolanaTokens = void 0;
|
13
13
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
14
|
-
const web3_js_1 = require("@solana/web3.js");
|
15
14
|
const helpers_1 = require("../helpers");
|
16
15
|
const getTokenAccountsByOwner_1 = require("../../../utils/solana/getTokenAccountsByOwner");
|
17
16
|
const ElementRegistry_1 = require("../../../utils/elementbuilder/ElementRegistry");
|
@@ -22,22 +21,21 @@ const getHeliumPositions_1 = require("../../helium/getHeliumPositions");
|
|
22
21
|
const getPicassoPositions_1 = require("../../picasso/getPicassoPositions");
|
23
22
|
const cpammPositionsFetcher_1 = require("../../meteora/cpamm/cpammPositionsFetcher");
|
24
23
|
const clmmFetcher_1 = require("../../raydium/clmmFetcher");
|
25
|
-
|
24
|
+
// import { getResizableNfts } from '../../metaplex/resizableNftFetcher';
|
26
25
|
const clients_1 = require("../../../utils/clients");
|
27
26
|
const constants_3 = require("../../byreal/constants");
|
28
|
-
const getJupiterPrices_1 = require("../../jupiter/getJupiterPrices");
|
29
27
|
const getSolanaTokens = (simple) => (tokenAccounts, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
30
28
|
const fungibleAddresses = tokenAccounts.map((ta) => ta.mint.toString());
|
31
29
|
const tokenPrices = yield cache.getTokenPricesAsMap(fungibleAddresses, portfolio_core_1.NetworkId.solana);
|
32
|
-
const missingMints = tokenAccounts.flatMap((tokenAccount) => {
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
30
|
+
/* const missingMints = tokenAccounts.flatMap((tokenAccount) => {
|
31
|
+
const address = tokenAccount.mint.toString();
|
32
|
+
const tokenPrice = tokenPrices.get(address);
|
33
|
+
if (!tokenPrice) {
|
34
|
+
return [new PublicKey(address)];
|
35
|
+
}
|
36
|
+
return [];
|
39
37
|
});
|
40
|
-
const missingPrices =
|
38
|
+
const missingPrices = await getJupiterPrices(missingMints); */
|
41
39
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, portfolio_core_1.walletTokensPlatformId);
|
42
40
|
const elementTokens = elementRegistry.addElementMultiple({
|
43
41
|
label: 'Wallet',
|
@@ -47,7 +45,7 @@ const getSolanaTokens = (simple) => (tokenAccounts, cache) => __awaiter(void 0,
|
|
47
45
|
var _a;
|
48
46
|
const address = tokenAccount.mint.toString();
|
49
47
|
const tokenPrice = tokenPrices.get(address);
|
50
|
-
const missingPrice = missingPrices.get(address);
|
48
|
+
// const missingPrice = missingPrices.get(address);
|
51
49
|
if (tokenPrice) {
|
52
50
|
const amount = tokenAccount.amount.shiftedBy(-tokenPrice.decimals);
|
53
51
|
if (tokenPrice.platformId === portfolio_core_1.walletTokensPlatformId) {
|
@@ -85,17 +83,16 @@ const getSolanaTokens = (simple) => (tokenAccounts, cache) => __awaiter(void 0,
|
|
85
83
|
});
|
86
84
|
elementsLiquidity.set(tag, elementLiquidity);
|
87
85
|
}
|
88
|
-
}
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
86
|
+
} /* else if (missingPrice) {
|
87
|
+
if (missingPrice.usdPrice) {
|
88
|
+
elementTokens.addPricedAsset({
|
89
|
+
address,
|
90
|
+
amount: tokenAccount.amount.shiftedBy(-missingPrice.decimals),
|
91
|
+
price: missingPrice.usdPrice,
|
92
|
+
ref: tokenAccount.pubkey,
|
93
|
+
});
|
94
|
+
}
|
95
|
+
} */
|
99
96
|
});
|
100
97
|
return elementRegistry.getElements(cache);
|
101
98
|
});
|
@@ -109,7 +106,7 @@ const tokensFetchers = [
|
|
109
106
|
getHeliumPositions_1.getHeliumPositions,
|
110
107
|
getPicassoPositions_1.getPicassoPositions,
|
111
108
|
(0, exports.getSolanaTokens)(false),
|
112
|
-
|
109
|
+
// getResizableNfts,
|
113
110
|
];
|
114
111
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
115
112
|
const tokenAccounts = yield (0, getTokenAccountsByOwner_1.getTokenAccountsByOwner)((0, clients_1.getClientSolana)(), owner);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;
|
1
|
+
{"version":3,"file":"solana.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/solana.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AAGpC,wCAAsC;AACtC,2FAAwF;AACxF,mFAAgF;AAIhF,4EAAoE;AACpE,oDAAoE;AACpE,uDAGiC;AACjC,wEAAqE;AACrE,2EAAwE;AACxE,qFAAqF;AACrF,2DAAoE;AACpE,yEAAyE;AACzE,oDAAyD;AACzD,sDAAgE;AAEzD,MAAM,eAAe,GAC1B,CAAC,MAAgB,EAAE,EAAE,CACrB,CAAO,aAA4C,EAAE,KAAY,EAAE,EAAE;IACnE,MAAM,iBAAiB,GAAG,aAA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,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,aAAa,GAAG,MAAM,IAAA,iDAAuB,EAAC,IAAA,yBAAe,GAAE,EAAE,KAAK,CAAC,CAAC;IAE9E,MAAM,OAAO,GAAkC,EAAE,CAAC;IAClD,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAEjD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,uCAAsB,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -55,9 +55,11 @@ class ElementRegistry {
|
|
55
55
|
}
|
56
56
|
getElements(cache) {
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
58
|
-
const mints = this.elements.
|
59
|
-
const tokenPrices = yield
|
60
|
-
|
58
|
+
const mints = this.elements.flatMap((e) => e.tokenAddresses());
|
59
|
+
const [tokenPrices, tokenYields] = yield Promise.all([
|
60
|
+
cache.getTokenPricesAsMap(mints, this.networkId),
|
61
|
+
cache.getTokenYieldsAsMap(mints, this.networkId),
|
62
|
+
]);
|
61
63
|
return this.elements
|
62
64
|
.map((e) => e.get(this.networkId, this.platformId, tokenPrices, tokenYields))
|
63
65
|
.filter((e) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages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,CAAC;IAED,oBAAoB,CAAC,MAA4B;QAC/C,MAAM,cAAc,GAAG,IAAI,mDAAwB,iCAC9C,MAAM,KACT,IAAI,EAAE,qCAAoB,CAAC,UAAU,IACrC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,MAAM,cAAc,GAAG,IAAI,+CAAsB,iCAC5C,MAAM,KACT,IAAI,EAAE,qCAAoB,CAAC,QAAQ,IACnC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,eAAe,CAAC,MAA4B;QAC1C,MAAM,cAAc,GAAG,IAAI,yCAAmB,iCACzC,MAAM,KACT,IAAI,EAAE,qCAAoB,CAAC,KAAK,IAChC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,WAAW,CAAC,KAAY;;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,
|
1
|
+
{"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAClE,+FAA4F;AAC5F,+DAA4D;AAE5D,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,MAAM,cAAc,GAAG,I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reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
-
import { PublicKey } from '@solana/web3.js';
|
4
|
-
import { Cache } from '../../Cache';
|
5
|
-
import { DatapiAsset } from './types';
|
6
|
-
export declare function setJupiterPrices(mints: PublicKey[], cache: Cache): Promise<void>;
|
7
|
-
export declare function getJupiterPrices(mints: PublicKey[]): Promise<Map<string, DatapiAsset>>;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"getJupiterPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/getJupiterPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAC7C,+DAKoC;AAGpC,2CAAuE;AAEvE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;AAE7D,SAAsB,gBAAgB,CAAC,KAAkB,EAAE,KAAY;;QACrE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE7C,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAqB;gBAC/B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,EAAE,EAAE,gCAAe;gBACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,KAAK,EAAE,KAAK,CAAC,QAAQ;gBACrB,cAAc,EAAE,KAAK,CAAC,cAAc;oBAClC,CAAC,CAAC,KAAK,CAAC,cAAc,GAAG,GAAG;oBAC5B,CAAC,CAAC,SAAS;gBACb,UAAU,EAAE,uCAAsB;gBAClC,MAAM,EAAE,CAAC;aACV,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC,CAAC,CAAC;QAEH,MAAM,KAAK,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GAA6B,IAAI,GAAG,EAAE,CAAC;QACnD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;gBAClD,IAAI,KAAK,CAAC,QAAQ;oBAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA5CD,4CA4CC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,oDAAkD;AAElD,2CAAqD;AACrD,oDAAgF;AAChF,yDAAsD;AACtD,qDAA8D;AAE9D,MAAM,KAAK,GAAG;IACZ,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,iCAAiC;IACjF,sBAAU;IACV,qBAAS;CACV,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACvD,KAAK,CAAC,OAAO,CAAkB,kCAAsB,EAAE;YACrD,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;QACF,KAAK,CAAC,OAAO,CAAW,mBAAO,EAAE;YAC/B,MAAM,EAAE,sBAAiB;YACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc;QAAE,OAAO,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IAC1E,IAAI,CAAC,YAAY;QAAE,OAAO,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAmB,IAAI,GAAG,CAAC;QACtC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,CAAC,CAAC,CAAC;QACrC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,CAAC,CAAC,CAAC;QACpD,GAAG,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;KACvE,CAAC,CAAC;IAEH,MAAM,IAAA,mCAAgB,EAAC,CAAC,GAAG,OAAO,CAAC,EAAE,KAAK,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,MAAM,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -1,32 +0,0 @@
|
|
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 axios_1 = __importDefault(require("axios"));
|
17
|
-
const constants_1 = require("./exchange/constants");
|
18
|
-
const constants_2 = require("./constants");
|
19
|
-
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
-
const verifiedTokens = yield axios_1.default.get(`https://tokens.jup.ag/tokens?tags=verified&${constants_2.jupApiParams !== null && constants_2.jupApiParams !== void 0 ? constants_2.jupApiParams : ''}`);
|
21
|
-
yield cache.setItem(constants_2.verifiedTokensCacheKey, verifiedTokens.data.sort((a, b) => b.daily_volume - a.daily_volume), {
|
22
|
-
prefix: constants_1.platformId,
|
23
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
24
|
-
});
|
25
|
-
});
|
26
|
-
const job = {
|
27
|
-
id: `${constants_1.platformId}-verified`,
|
28
|
-
executor,
|
29
|
-
labels: ['normal'],
|
30
|
-
};
|
31
|
-
exports.default = job;
|
32
|
-
//# sourceMappingURL=verifiedJob.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"verifiedJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/verifiedJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA0B;AAG1B,oDAAkD;AAElD,2CAAmE;AAEnE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,cAAc,GAAG,MAAM,eAAK,CAAC,GAAG,CACpC,8CAA8C,wBAAY,aAAZ,wBAAY,cAAZ,wBAAY,GAAI,EAAE,EAAE,CACnE,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CACjB,kCAAsB,EACtB,cAAc,CAAC,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