@sonarwatch/portfolio-plugins 0.11.121 → 0.11.123
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1215 -1207
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/Cache.d.ts +1 -0
- package/src/Cache.js +7 -0
- package/src/Cache.js.map +1 -1
- package/src/plugins/aftermath/poolsJob.js +1 -1
- package/src/plugins/aftermath/poolsJob.js.map +1 -1
- package/src/plugins/aries/constants.d.ts +1 -0
- package/src/plugins/aries/constants.js +2 -1
- package/src/plugins/aries/constants.js.map +1 -1
- package/src/plugins/aries/depositsFetcher.js +16 -0
- package/src/plugins/aries/depositsFetcher.js.map +1 -1
- package/src/plugins/aries/helpers.d.ts +4 -0
- package/src/plugins/aries/helpers.js +39 -1
- package/src/plugins/aries/helpers.js.map +1 -1
- package/src/plugins/aries/index.js +2 -1
- package/src/plugins/aries/index.js.map +1 -1
- package/src/plugins/aries/reservesJob.d.ts +3 -0
- package/src/plugins/aries/reservesJob.js +64 -0
- package/src/plugins/aries/reservesJob.js.map +1 -0
- package/src/plugins/aries/types.d.ts +53 -0
- package/src/plugins/auxexchange/aptosLpJob.js +1 -1
- package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/fluxbeam/poolsJob.js +1 -1
- package/src/plugins/fluxbeam/poolsJob.js.map +1 -1
- package/src/plugins/jupiter/helpers.d.ts +1 -0
- package/src/plugins/jupiter/helpers.js +30 -1
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/types.d.ts +10 -0
- package/src/plugins/lifinity/constants.d.ts +2 -0
- package/src/plugins/lifinity/constants.js +3 -1
- package/src/plugins/lifinity/constants.js.map +1 -1
- package/src/plugins/lifinity/index.js +2 -1
- package/src/plugins/lifinity/index.js.map +1 -1
- package/src/plugins/lifinity/lockerFetcher.js +7 -8
- package/src/plugins/lifinity/lockerFetcher.js.map +1 -1
- package/src/plugins/lifinity/xLfntyJob.d.ts +3 -0
- package/src/plugins/lifinity/xLfntyJob.js +43 -0
- package/src/plugins/lifinity/xLfntyJob.js.map +1 -0
- package/src/plugins/liquiditypools-sei/job.js +1 -1
- package/src/plugins/liquiditypools-sei/job.js.map +1 -1
- package/src/plugins/marginfi/fetcherExecutor.js +1 -1
- package/src/plugins/marginfi/fetcherExecutor.js.map +1 -1
- package/src/plugins/meteora/poolsJob.js +33 -46
- package/src/plugins/meteora/poolsJob.js.map +1 -1
- package/src/plugins/orca/lpTokensJob.js +1 -1
- package/src/plugins/orca/lpTokensJob.js.map +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js +1 -1
- package/src/plugins/pancakeswap/aptosLpJob.js.map +1 -1
- package/src/plugins/raydium/lpTokensJob.js +1 -1
- package/src/plugins/raydium/lpTokensJob.js.map +1 -1
- package/src/plugins/solend/obligationsFetcher.js +3 -1
- package/src/plugins/solend/obligationsFetcher.js.map +1 -1
- package/src/plugins/suilend/marketsJob.js +1 -1
- package/src/plugins/suilend/marketsJob.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/symmetry/basketsJob.js +10 -3
- package/src/plugins/symmetry/basketsJob.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/utils/clients/getClientSolana.d.ts +2 -2
- package/src/utils/clients/getClientSolana.js.map +1 -1
- package/src/utils/clients/types.d.ts +2 -0
- package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/utils/solana/pyth/helpers.d.ts +8 -1
- package/src/utils/solana/pyth/helpers.js +56 -4
- package/src/utils/solana/pyth/helpers.js.map +1 -1
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
|
|
54
54
|
}
|
55
55
|
function getV3PairsAddresses(url, length = 300) {
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
57
|
-
const query = (0, graphql_request_1.gql) `
|
58
|
-
{
|
59
|
-
pools(
|
60
|
-
orderBy: totalValueLockedUSD
|
61
|
-
first: ${length}
|
62
|
-
orderDirection: desc
|
63
|
-
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
-
) {
|
65
|
-
id
|
66
|
-
token0Price
|
67
|
-
token1Price
|
68
|
-
liquidity
|
69
|
-
token0 {
|
70
|
-
id
|
71
|
-
totalSupply
|
72
|
-
decimals
|
73
|
-
}
|
74
|
-
token1 {
|
75
|
-
id
|
76
|
-
totalSupply
|
77
|
-
decimals
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
57
|
+
const query = (0, graphql_request_1.gql) `
|
58
|
+
{
|
59
|
+
pools(
|
60
|
+
orderBy: totalValueLockedUSD
|
61
|
+
first: ${length}
|
62
|
+
orderDirection: desc
|
63
|
+
where: { volumeUSD_not: "0", liquidity_not: "0" }
|
64
|
+
) {
|
65
|
+
id
|
66
|
+
token0Price
|
67
|
+
token1Price
|
68
|
+
liquidity
|
69
|
+
token0 {
|
70
|
+
id
|
71
|
+
totalSupply
|
72
|
+
decimals
|
73
|
+
}
|
74
|
+
token1 {
|
75
|
+
id
|
76
|
+
totalSupply
|
77
|
+
decimals
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
81
|
`;
|
82
82
|
const res = yield (0, graphql_request_1.default)(url, query);
|
83
83
|
const pools = res.pools;
|
@@ -21,15 +21,22 @@ const filters_1 = require("./filters");
|
|
21
21
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
22
22
|
const getLpTokenSourceRaw_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRaw"));
|
23
23
|
const runInBatch_1 = __importDefault(require("../../utils/misc/runInBatch"));
|
24
|
+
const helpers_1 = require("../../utils/solana/pyth/helpers");
|
24
25
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
26
|
const connection = (0, clients_1.getClientSolana)();
|
26
27
|
const tokenListRes = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.tokenListStruct, constants_1.tokenListAddress);
|
27
28
|
if (!tokenListRes)
|
28
29
|
return;
|
29
|
-
const
|
30
|
-
.map((t) => t
|
30
|
+
const tokenSettings = tokenListRes.list
|
31
|
+
.map((t) => t)
|
31
32
|
.slice(0, tokenListRes.numTokens.toNumber());
|
32
|
-
|
33
|
+
// Add tokens prices from Pyth Oracles
|
34
|
+
const sources = yield (0, helpers_1.getPythTokenPriceSources)(connection, tokenSettings.map((ts) => ({
|
35
|
+
mint: ts.tokenMint,
|
36
|
+
oracle: ts.oracleAccount,
|
37
|
+
})));
|
38
|
+
yield cache.setTokenPriceSources(sources);
|
39
|
+
const tokenPrices = yield cache.getTokenPrices(tokenSettings.map((ts) => ts.tokenMint.toString()), portfolio_core_1.NetworkId.solana);
|
33
40
|
const accounts = yield (0, solana_1.getParsedProgramAccounts)(connection, structs_1.fundStruct, constants_1.basketProgramId, filters_1.fundFilters);
|
34
41
|
const lpSources = [];
|
35
42
|
for (let i = 0; i < accounts.length; i++) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"basketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/symmetry/basketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AAGzE,2CAA4E;AAC5E,+CAA8D;AAC9D,iDAAsD;AACtD,uCAAwD;AACxD,uCAAwC;AACxC,kFAA+E;AAC/E,+FAE8C;AAC9C,6EAAqD;
|
1
|
+
{"version":3,"file":"basketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/symmetry/basketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AAGzE,2CAA4E;AAC5E,+CAA8D;AAC9D,iDAAsD;AACtD,uCAAwD;AACxD,uCAAwC;AACxC,kFAA+E;AAC/E,+FAE8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,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -40,28 +40,28 @@ function getPairKey(version) {
|
|
40
40
|
exports.getPairKey = getPairKey;
|
41
41
|
function getPairsV2FromTheGraph(url, length = 300) {
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
{
|
45
|
-
pairs(
|
46
|
-
orderBy: reserveUSD
|
47
|
-
first: ${length}
|
48
|
-
orderDirection: desc
|
49
|
-
where: { trackedReserveETH_not: "0" }
|
50
|
-
) {
|
51
|
-
id
|
52
|
-
reserve0
|
53
|
-
reserve1
|
54
|
-
totalSupply
|
55
|
-
token0 {
|
56
|
-
id
|
57
|
-
decimals
|
58
|
-
}
|
59
|
-
token1 {
|
60
|
-
id
|
61
|
-
decimals
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
{
|
45
|
+
pairs(
|
46
|
+
orderBy: reserveUSD
|
47
|
+
first: ${length}
|
48
|
+
orderDirection: desc
|
49
|
+
where: { trackedReserveETH_not: "0" }
|
50
|
+
) {
|
51
|
+
id
|
52
|
+
reserve0
|
53
|
+
reserve1
|
54
|
+
totalSupply
|
55
|
+
token0 {
|
56
|
+
id
|
57
|
+
decimals
|
58
|
+
}
|
59
|
+
token1 {
|
60
|
+
id
|
61
|
+
decimals
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
65
|
`;
|
66
66
|
const res = yield (0, graphql_request_1.default)(url, query);
|
67
67
|
const pairs = res.pairs;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export default function getClientSolana():
|
1
|
+
import { SolanaClient } from './types';
|
2
|
+
export default function getClientSolana(): SolanaClient;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getClientSolana.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSolana.ts"],"names":[],"mappings":";;AAAA,+DAAuD;AACvD,6CAA8D;AAC9D,qEAAkE;AAClE,2CAA6C;
|
1
|
+
{"version":3,"file":"getClientSolana.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSolana.ts"],"names":[],"mappings":";;AAAA,+DAAuD;AACvD,6CAA8D;AAC9D,qEAAkE;AAClE,2CAA6C;AAG7C,SAAwB,eAAe;IACrC,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,0BAAS,CAAC,MAAM,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;QACvC,CAAC,CAAC,IAAA,yCAAmB,EACjB,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9B,WAAW,CAAC,SAAS,CAAC,QAAQ,CAC/B;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,IAAI,eAA4C,CAAC;IACjD,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,KAAK,MAAM,EAAE,CAAC;QACjD,MAAM,IAAI,GAA2B;YACnC,KAAK,EAAE,CAAC;SACT,CAAC;QACF,eAAe,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;;YACtC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,QAAQ,EAAE,KAAI,IAAI,CAAC,CAAC;YAC9D,IAAI,OAAO,MAAM,KAAK,QAAQ;gBAAE,OAAO;YACvC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;gBAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACnB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5B,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACrE,CAAC;YACD,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,oBAAU,CAAC,WAAW,CAAC,GAAG,EAAE;QACrC,WAAW;QACX,eAAe;KAChB,CAAC,CAAC;AACL,CAAC;AAhCD,kCAgCC"}
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import { SuiClient as MystenSuiClient } from '@mysten/sui.js/client';
|
2
|
+
import { Connection } from '@solana/web3.js';
|
2
3
|
import { PublicClient } from 'viem';
|
3
4
|
export type EvmClient = PublicClient;
|
4
5
|
export type SuiClient = MystenSuiClient;
|
6
|
+
export type SolanaClient = Connection;
|
@@ -18,5 +18,5 @@ type PoolUnderlyingRaw = {
|
|
18
18
|
tokenPrice: TokenPrice | undefined;
|
19
19
|
};
|
20
20
|
export declare const defaultAcceptedPairs: string[];
|
21
|
-
export default function getLpUnderlyingTokenSource(sourceId: string,
|
21
|
+
export default function getLpUnderlyingTokenSource(sourceId: string, networkId: NetworkIdType, poolUnderlyingsA: PoolUnderlyingRaw, poolUnderlyingsB: PoolUnderlyingRaw, minTvl?: number, acceptedPairs?: string[]): TokenPriceSource | null;
|
22
22
|
export {};
|
@@ -27,7 +27,7 @@ exports.defaultAcceptedPairs = [
|
|
27
27
|
'0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN', // USDCet
|
28
28
|
'0x6864a6f921804860930db6ddbe2e16acdf8504495ea7481637a1c8b9a8fe54b::cetus::CETUS', // CETUS
|
29
29
|
];
|
30
|
-
function getLpUnderlyingTokenSource(sourceId,
|
30
|
+
function getLpUnderlyingTokenSource(sourceId, networkId, poolUnderlyingsA, poolUnderlyingsB, minTvl = 5000, acceptedPairs = exports.defaultAcceptedPairs) {
|
31
31
|
var _a, _b;
|
32
32
|
if (!poolUnderlyingsA.tokenPrice && !poolUnderlyingsB.tokenPrice)
|
33
33
|
return null;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAUoC;AAEpC,wEAAgD;AAChD,8DAAsE;AAyBzD,QAAA,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iCAAgB;IAChB,sEAAsE,EAAE,OAAO;IAC/E,qHAAqH,EAAE,SAAS;IAChI,mBAAmB;IACnB,oCAAmB;IACnB,2CAA0B;IAC1B,8CAA8C,EAAE,OAAO;IACvD,8CAA8C,EAAE,OAAO;IACvD,kBAAkB;IAClB,mCAAkB;IAClB,6EAA6E,EAAE,SAAS;IACxF,mFAAmF,EAAE,oBAAoB;IACzG,gBAAgB;IAChB,iCAAgB;IAChB,eAAe;IACf,gFAAgF,EAAE,SAAS;IAC3F,iFAAiF,EAAE,QAAQ;CAC5F,CAAC;AAEF,SAAwB,0BAA0B,CAChD,QAAgB,EAChB,
|
1
|
+
{"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAUoC;AAEpC,wEAAgD;AAChD,8DAAsE;AAyBzD,QAAA,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,iCAAgB;IAChB,sEAAsE,EAAE,OAAO;IAC/E,qHAAqH,EAAE,SAAS;IAChI,mBAAmB;IACnB,oCAAmB;IACnB,2CAA0B;IAC1B,8CAA8C,EAAE,OAAO;IACvD,8CAA8C,EAAE,OAAO;IACvD,kBAAkB;IAClB,mCAAkB;IAClB,6EAA6E,EAAE,SAAS;IACxF,mFAAmF,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AAU,CAAC,OAAO,CAAC,IAAI,CACxC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,kCAAiB,CAC5C,EACD,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,gBAAgB;SACzD,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;SACpC,QAAQ,EAAE,CAAC;IACd,MAAM,iBAAiB,GACrB,kBAAkB,GAAG,gBAAgB,CAAC,UAAU,CAAC,KAAK,CAAC;IACzD,MAAM,OAAO,GAAG,iBAAiB,GAAG,CAAC,CAAC;IACtC,IAAI,MAAM,GAAG,OAAO;QAAE,OAAO,IAAI,CAAC;IAElC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,gBAAgB;SAC7D,GAAG,CAAC,SAAA,EAAE,EAAI,kBAAkB,CAAC,QAAQ,CAAA,CAAC;SACtC,QAAQ,EAAE,CAAC;IACd,MAAM,KAAK,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IAEvD,MAAM,MAAM,GAAqB;QAC/B,EAAE,EAAE,QAAQ;QACZ,SAAS;QACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;QACnC,OAAO,EAAE,kBAAkB,CAAC,OAAO;QACnC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ;QACrC,KAAK;QACL,MAAM,EAAE,IAAA,yBAAe,EAAC,OAAO,CAAC;QAChC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AA3DD,6CA2DC"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
|
4
|
-
exports.infoQueryMsg = JSON.parse(`{
|
5
|
-
"info": {}
|
4
|
+
exports.infoQueryMsg = JSON.parse(`{
|
5
|
+
"info": {}
|
6
6
|
}`);
|
7
|
-
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
-
"token_info": {}
|
7
|
+
exports.tokenInfoQueryMsg = JSON.parse(`{
|
8
|
+
"token_info": {}
|
9
9
|
}`);
|
10
|
-
exports.minterQueryMsg = JSON.parse(`{
|
11
|
-
"minter": {}
|
10
|
+
exports.minterQueryMsg = JSON.parse(`{
|
11
|
+
"minter": {}
|
12
12
|
}`);
|
13
|
-
exports.poolQueryMsg = JSON.parse(`{
|
14
|
-
"pool": {}
|
13
|
+
exports.poolQueryMsg = JSON.parse(`{
|
14
|
+
"pool": {}
|
15
15
|
}`);
|
16
16
|
//# sourceMappingURL=constants.js.map
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
function getQueryBalanceByOwner(owner) {
|
4
|
-
return JSON.parse(`{
|
5
|
-
"balance": {
|
6
|
-
"address": "${owner}"
|
7
|
-
}
|
4
|
+
return JSON.parse(`{
|
5
|
+
"balance": {
|
6
|
+
"address": "${owner}"
|
7
|
+
}
|
8
8
|
}`);
|
9
9
|
}
|
10
10
|
exports.default = getQueryBalanceByOwner;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { PublicKey, AccountInfo } from '@solana/web3.js';
|
3
|
+
import { TokenPriceSource } from '@sonarwatch/portfolio-core';
|
3
4
|
import { Base, MappingData, PermissionData, PriceData } from './structs';
|
5
|
+
import { SolanaClient } from '../../clients/types';
|
4
6
|
export declare const Magic = 2712847316;
|
5
7
|
export declare const Version2 = 2;
|
6
8
|
export declare const Version = 2;
|
@@ -11,4 +13,9 @@ export declare const parseMappingData: (data: Buffer) => MappingData;
|
|
11
13
|
export declare const parsePriceData: (data: Buffer, currentSlot?: number) => PriceData;
|
12
14
|
export declare const parsePermissionData: (data: Buffer) => PermissionData;
|
13
15
|
export declare function getPythPricesDatasMap(pubkeys: PublicKey[], accounts: (AccountInfo<Buffer> | null)[]): Map<string, PriceData>;
|
14
|
-
export declare function
|
16
|
+
export declare function getPythPrices(connection: SolanaClient, oracleAddresses: PublicKey[]): Promise<(number | null)[]>;
|
17
|
+
export declare function getPythTokenPriceSources(connection: SolanaClient, params: {
|
18
|
+
mint: PublicKey;
|
19
|
+
oracle: PublicKey;
|
20
|
+
platformId?: string;
|
21
|
+
}[]): Promise<(TokenPriceSource | null)[]>;
|
@@ -1,9 +1,23 @@
|
|
1
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
|
+
};
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
12
|
+
exports.getPythTokenPriceSources = exports.getPythPrices = exports.getPythPricesDatasMap = exports.parsePermissionData = exports.parsePriceData = exports.parseMappingData = exports.parseBaseData = exports.MAX_SLOT_DIFFERENCE = exports.Version = exports.Version2 = exports.Magic = void 0;
|
4
13
|
const web3_js_1 = require("@solana/web3.js");
|
14
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
15
|
const structs_1 = require("./structs");
|
6
16
|
const readBig_1 = require("./readBig");
|
17
|
+
const getMultipleAccountsInfoSafe_1 = require("../getMultipleAccountsInfoSafe");
|
18
|
+
const structs_2 = require("../structs");
|
19
|
+
const getParsedMultipleAccountsInfo_1 = require("../getParsedMultipleAccountsInfo");
|
20
|
+
const constants_1 = require("../../../plugins/tokens/constants");
|
7
21
|
exports.Magic = 0xa1b2c3d4;
|
8
22
|
exports.Version2 = 2;
|
9
23
|
exports.Version = exports.Version2;
|
@@ -236,8 +250,46 @@ function getPythPricesDatasMap(pubkeys, accounts) {
|
|
236
250
|
return priceMap;
|
237
251
|
}
|
238
252
|
exports.getPythPricesDatasMap = getPythPricesDatasMap;
|
239
|
-
function
|
240
|
-
return
|
253
|
+
function getPythPrices(connection, oracleAddresses) {
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
255
|
+
const oracleAccounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(connection, oracleAddresses);
|
256
|
+
return oracleAccounts.map((acc) => {
|
257
|
+
if (!acc)
|
258
|
+
return null;
|
259
|
+
return ((0, exports.parsePriceData)(acc.data).price || (0, exports.parsePriceData)(acc.data).previousPrice);
|
260
|
+
});
|
261
|
+
});
|
262
|
+
}
|
263
|
+
exports.getPythPrices = getPythPrices;
|
264
|
+
function getPythTokenPriceSources(connection, params) {
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
266
|
+
const prices = yield getPythPrices(connection, params.map((p) => p.oracle));
|
267
|
+
const mintAccounts = yield (0, getParsedMultipleAccountsInfo_1.getParsedMultipleAccountsInfo)(connection, structs_2.mintAccountStruct, params.map((p) => p.mint));
|
268
|
+
return prices.map((price, i) => {
|
269
|
+
var _a;
|
270
|
+
if (price === null)
|
271
|
+
return null;
|
272
|
+
const decimals = (_a = mintAccounts.at(i)) === null || _a === void 0 ? void 0 : _a.decimals;
|
273
|
+
if (!decimals)
|
274
|
+
return null;
|
275
|
+
const cparams = params.at(i);
|
276
|
+
if (!cparams)
|
277
|
+
return null;
|
278
|
+
const address = cparams.mint.toString();
|
279
|
+
const oracle = cparams.oracle.toString();
|
280
|
+
const platformId = cparams.platformId || constants_1.walletTokensPlatform.id;
|
281
|
+
return {
|
282
|
+
address,
|
283
|
+
id: oracle,
|
284
|
+
decimals,
|
285
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
286
|
+
platformId,
|
287
|
+
price,
|
288
|
+
timestamp: Date.now(),
|
289
|
+
weight: 1,
|
290
|
+
};
|
291
|
+
});
|
292
|
+
});
|
241
293
|
}
|
242
|
-
exports.
|
294
|
+
exports.getPythTokenPriceSources = getPythTokenPriceSources;
|
243
295
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyD;AACzD,+DAAyE;AACzE,uCAYmB;AACnB,uCAA4D;AAE5D,gFAA6E;AAC7E,wCAA+C;AAC/C,oFAAiF;AACjF,iEAAyE;AAE5D,QAAA,KAAK,GAAG,UAAU,CAAC;AACnB,QAAA,QAAQ,GAAG,CAAC,CAAC;AACb,QAAA,OAAO,GAAG,gBAAQ,CAAC;AAChC,uGAAuG;AAC1F,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,IAAI,CAAC,CAAC;AAE1D,SAAgB,aAAa,CAAC,IAAY;IACxC,8CAA8C;IAC9C,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,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