@sonarwatch/portfolio-plugins 0.14.3 → 0.14.4

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.3",
3
+ "version": "0.14.4",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -48,6 +48,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
48
48
  name: `JLP Leverage x${new bignumber_js_1.default(marginAccount.leverage)
49
49
  .dividedBy(100)
50
50
  .decimalPlaces(2)}`,
51
+ leveraged: true,
51
52
  });
52
53
  marginAccount.deposits.forEach((deposit) => {
53
54
  const marginPool = marginPools.find((mp) => (mp === null || mp === void 0 ? void 0 : mp.tokenMint) === deposit.tokenMint);
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,E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SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAiE;AACjE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,sBAAsB,GAAG,mBAAS,CAAC,sBAAsB,CAC7D;QACE,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,cAAE,CAAC,QAAQ,EAAE,CAAC,EACf,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACf,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;KACvB,EACD,+BAAmB,CACpB,CAAC,CAAC,CAAC,CAAC;IAEL,MAAM,aAAa,GAAG,CACpB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,oCAAwB,EACxB,CAAC,sBAAsB,CAAC,CACzB,CACF,CAAC,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9D,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CA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BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -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;
@@ -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;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -75,6 +75,7 @@ class ElementBorrowlendBuilder extends ElementBuilder_1.ElementBuilder {
75
75
  ? this.borrowedWeights
76
76
  : undefined,
77
77
  unsettledAssets,
78
+ leveraged: this.leveraged,
78
79
  });
79
80
  if (!suppliedValue && !borrowedValue && !rewardValue)
80
81
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"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YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAA2B,CAAC;IACrC,CAAC;CACF;AA7ID,4DA6IC"}
1
+ {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAClD,iDAA8C;AAK9C,MAAa,wBAAyB,SAAQ,+BAAc;IAU1D,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,MAA4B;QAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,gBAAgB,CAAC,MAA4B;QAC3C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,cAAc,CAAC,MAA4B;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,gBAAgB,CAAC,MA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AAI,CAAC,cAAc;gBACnC,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;aACN;YACD,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAA2B,CAAC;IACrC,CAAC;CACF;AA9ID,4DA8IC"}
@@ -6,6 +6,7 @@ export declare abstract class ElementBuilder {
6
6
  readonly label: PortfolioElementLabel;
7
7
  readonly name?: string;
8
8
  readonly tags?: string[];
9
+ readonly leveraged?: boolean;
9
10
  protected constructor(params: ElementParams);
10
11
  abstract mints(): string[];
11
12
  abstract get(networkId: NetworkIdType, platformId: string, tokenPrices: TokenPriceMap): PortfolioElement | null;
@@ -7,6 +7,7 @@ class ElementBuilder {
7
7
  this.label = params.label;
8
8
  this.name = params.name;
9
9
  this.tags = params.tags;
10
+ this.leveraged = params.leveraged;
10
11
  }
11
12
  }
12
13
  exports.ElementBuilder = ElementBuilder;
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAMlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;CASF;AApBD,wCAoBC"}
1
+ {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAOlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACpC,CAAC;CASF;AAtBD,wCAsBC"}
@@ -4,4 +4,5 @@ export type ElementParams = {
4
4
  label: PortfolioElementLabel;
5
5
  name?: string;
6
6
  tags?: string[];
7
+ leveraged?: boolean;
7
8
  };
@@ -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;