@sonarwatch/portfolio-plugins 0.14.159 → 0.14.161
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 +2268 -2260
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/banx/offersFetcher.js +2 -1
- package/src/plugins/banx/offersFetcher.js.map +1 -1
- package/src/plugins/ensofi/constants.d.ts +2 -1
- package/src/plugins/ensofi/constants.js +3 -2
- package/src/plugins/ensofi/constants.js.map +1 -1
- package/src/plugins/ensofi/index.js +6 -1
- package/src/plugins/ensofi/index.js.map +1 -1
- package/src/plugins/ensofi/liquidityIdl.d.ts +674 -0
- package/src/plugins/ensofi/liquidityIdl.js +3177 -0
- package/src/plugins/ensofi/liquidityIdl.js.map +1 -0
- package/src/plugins/ensofi/solanaLiquidityFetcher.d.ts +3 -0
- package/src/plugins/ensofi/solanaLiquidityFetcher.js +71 -0
- package/src/plugins/ensofi/solanaLiquidityFetcher.js.map +1 -0
- package/src/plugins/ensofi/solanaLoansFetcher.js +3 -3
- package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
- package/src/plugins/ensofi/solanaLoansJob.js +1 -1
- package/src/plugins/ensofi/solanaLoansJob.js.map +1 -1
- package/src/plugins/ensofi/structs.d.ts +66 -0
- package/src/plugins/ensofi/structs.js +64 -1
- package/src/plugins/ensofi/structs.js.map +1 -1
- package/src/plugins/jupiter/exchange/limitFetcher.js +32 -17
- package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +5 -1
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/nxfinance/positionsFetcher.js +1 -1
- package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
- package/src/plugins/pluto/leverageFetcher.js +1 -1
- package/src/plugins/pluto/leverageFetcher.js.map +1 -1
- package/src/plugins/pumpswap/constants.d.ts +5 -0
- package/src/plugins/pumpswap/constants.js +7 -0
- package/src/plugins/pumpswap/constants.js.map +1 -0
- package/src/plugins/pumpswap/index.d.ts +4 -0
- package/src/plugins/pumpswap/index.js +10 -0
- package/src/plugins/pumpswap/index.js.map +1 -0
- package/src/plugins/pumpswap/marketsJob.d.ts +3 -0
- package/src/plugins/pumpswap/marketsJob.js +99 -0
- package/src/plugins/pumpswap/marketsJob.js.map +1 -0
- package/src/plugins/pumpswap/structs.d.ts +18 -0
- package/src/plugins/pumpswap/structs.js +19 -0
- package/src/plugins/pumpswap/structs.js.map +1 -0
- package/src/plugins/stabble/structs.d.ts +12 -4
- package/src/plugins/stabble/structs.js +11 -4
- package/src/plugins/stabble/structs.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tensor/powerUserAirdropFetcher.js +9 -15
- package/src/plugins/tensor/powerUserAirdropFetcher.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/utils/misc/getLpTokenSource.d.ts +3 -1
- package/src/utils/misc/getLpTokenSource.js +3 -1
- package/src/utils/misc/getLpTokenSource.js.map +1 -1
- package/src/utils/misc/getLpTokenSourceRaw.d.ts +3 -1
- package/src/utils/misc/getLpTokenSourceRaw.js +2 -0
- package/src/utils/misc/getLpTokenSourceRaw.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -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;
|
@@ -40,20 +40,20 @@ const clients_1 = require("../../utils/clients");
|
|
40
40
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
41
41
|
const helpers_1 = require("./helpers");
|
42
42
|
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
43
|
-
const query = (0, graphql_request_1.gql) `
|
44
|
-
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
-
getAirdropFinalFrontend(authority: $authority) {
|
46
|
-
authority
|
47
|
-
community_allocation
|
48
|
-
eligibility
|
49
|
-
main_allocation
|
50
|
-
og_allocation
|
51
|
-
s1_allocation
|
52
|
-
s2_allocation
|
53
|
-
total_allocation
|
54
|
-
__typename
|
55
|
-
}
|
56
|
-
}
|
43
|
+
const query = (0, graphql_request_1.gql) `
|
44
|
+
query GetAirdropFinalFrontend($authority: String!) {
|
45
|
+
getAirdropFinalFrontend(authority: $authority) {
|
46
|
+
authority
|
47
|
+
community_allocation
|
48
|
+
eligibility
|
49
|
+
main_allocation
|
50
|
+
og_allocation
|
51
|
+
s1_allocation
|
52
|
+
s2_allocation
|
53
|
+
total_allocation
|
54
|
+
__typename
|
55
|
+
}
|
56
|
+
}
|
57
57
|
`;
|
58
58
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
59
59
|
const res = yield (0, graphql_request_1.default)(constants_1.graphqlApi, query, {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { NetworkIdType, TokenPriceSource } from '@sonarwatch/portfolio-core';
|
1
|
+
import { NetworkIdType, TokenPriceSource, SourceRef } from '@sonarwatch/portfolio-core';
|
2
2
|
import { PoolUnderlying } from './getLpUnderlyingTokenSource';
|
3
3
|
export type LpDetails = {
|
4
4
|
address: string;
|
@@ -14,5 +14,7 @@ export type GetLpTokenSourceParams = {
|
|
14
14
|
elementName?: string;
|
15
15
|
liquidityName?: string;
|
16
16
|
priceUnderlyings?: boolean;
|
17
|
+
sourceRefs?: SourceRef[];
|
18
|
+
link?: string;
|
17
19
|
};
|
18
20
|
export declare function getLpTokenSource(params: GetLpTokenSourceParams): TokenPriceSource[];
|
@@ -4,7 +4,7 @@ exports.getLpTokenSource = void 0;
|
|
4
4
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
5
|
const getLpUnderlyingTokenSource_1 = require("./getLpUnderlyingTokenSource");
|
6
6
|
function getLpTokenSource(params) {
|
7
|
-
const { poolUnderlyings, liquidityName, elementName, lpDetails, platformId, sourceId, networkId, priceUnderlyings, } = params;
|
7
|
+
const { poolUnderlyings, liquidityName, elementName, lpDetails, platformId, sourceId, networkId, priceUnderlyings, sourceRefs, link, } = params;
|
8
8
|
const sources = [];
|
9
9
|
// Verify underlyings weights
|
10
10
|
let totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + (p.weight || 0), 0);
|
@@ -48,6 +48,8 @@ function getLpTokenSource(params) {
|
|
48
48
|
decimals: u.decimals,
|
49
49
|
})),
|
50
50
|
timestamp: Date.now(),
|
51
|
+
sourceRefs,
|
52
|
+
link,
|
51
53
|
};
|
52
54
|
sources.push(lpSource);
|
53
55
|
return sources;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getLpTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSource.ts"],"names":[],"mappings":";;;AAAA,+
|
1
|
+
{"version":3,"file":"getLpTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSource.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AACpC,6EAGsC;AAqBtC,SAAgB,gBAAgB,CAC9B,MAA8B;IAE9B,MAAM,EACJ,eAAe,EACf,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,UAAU,EACV,IAAI,GACL,GAAG,MAAM,CAAC;IACX,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,6BAA6B;IAC7B,IAAI,WAAW,GAAG,eAAe,CAAC,MAAM,CACtC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,EAC/C,CAAC,CACF,CAAC;IACF,IAAI,WAAW,KAAK,CAAC;QAAE,WAAW,GAAG,CAAC,CAAC;IACvC,IAAI,WAAW,GAAG,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,EAAE,CAAC,CAAC;IAChE,IAAI,WAAW,GAAG,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,EAAE,CAAC,CAAC;IAEhE,oBAAoB;IACpB,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAA,uDAA0B,EAAC;YAC1C,SAAS;YACT,QAAQ,EAAE,SAAS,CAAC,OAAO;YAC3B,eAAe;SAChB,CAAC,CAAC;QACH,OAAO,CAAC,IAAI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ch/portfolio-core';
|
1
|
+
import { NetworkIdType, SourceRef, TokenPrice, TokenPriceSource } from '@sonarwatch/portfolio-core';
|
2
2
|
import BigNumber from 'bignumber.js';
|
3
3
|
export type PoolUnderlyingRaw = {
|
4
4
|
address: string;
|
@@ -21,6 +21,8 @@ export type GetLpTokenSourceRawParams = {
|
|
21
21
|
elementName?: string;
|
22
22
|
liquidityName?: string;
|
23
23
|
priceUnderlyings?: boolean;
|
24
|
+
sourceRefs?: SourceRef[];
|
25
|
+
link?: string;
|
24
26
|
};
|
25
27
|
export declare function getLpTokenSourceRaw(params: GetLpTokenSourceRawParams): TokenPriceSource[];
|
26
28
|
export {};
|
@@ -23,6 +23,8 @@ function getLpTokenSourceRaw(params) {
|
|
23
23
|
elementName: params.elementName,
|
24
24
|
liquidityName: params.liquidityName,
|
25
25
|
priceUnderlyings: params.priceUnderlyings,
|
26
|
+
sourceRefs: params.sourceRefs,
|
27
|
+
link: params.link,
|
26
28
|
});
|
27
29
|
}
|
28
30
|
exports.getLpTokenSourceRaw = getLpTokenSourceRaw;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getLpTokenSourceRaw.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSourceRaw.ts"],"names":[],"mappings":";;;;;;
|
1
|
+
{"version":3,"file":"getLpTokenSourceRaw.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSourceRaw.ts"],"names":[],"mappings":";;;;;;AAMA,gEAAqC;AACrC,yDAAiE;AA8BjE,SAAgB,mBAAmB,CACjC,MAAiC;IAEjC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;IACjD,MAAM,UAAU,mCACX,SAAS,KACZ,MAAM,EAAE,IAAI,sBAAS,CAAC,SAAS,CAAC,SAAS,CAAC;aACvC,GAAG,CAAC,SAAA,EAAE,EAAI,SAAS,CAAC,QAAQ,CAAA,CAAC;aAC7B,QAAQ,EAAE,GACd,CAAC;IACF,MAAM,mBAAmB,GAAqB,kBAAkB,CAAC,GAAG,CAClE,CAAC,EAAE,EAAE,EAAE,CAAC,iCACH,EAAE,KACL,aAAa,EAAE,IAAI,sBAAS,CAAC,EAAE,CAAC,gBAAgB,CAAC;aAC9C,GAAG,CAAC,SAAA,EAAE,EAAI,EAAE,CAAC,QAAQ,CAAA,CAAC;aACtB,QAAQ,EAAE,IACb,CACH,CAAC;IAEF,OAAO,IAAA,mCAAgB,EAAC;QACtB,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,eAAe,EAAE,mBAAmB;QACpC,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,UAAU,EAAE,MAAM,CAAC,UAAU;QAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;KAClB,CAAC,CAAC;AACL,CAAC;AA/BD,kDA+BC"}
|
@@ -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;
|