@sonarwatch/portfolio-plugins 0.11.90 → 0.11.92

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. package/CHANGELOG.md +1091 -1083
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/Cache.d.ts +1 -0
  5. package/src/Cache.js +12 -0
  6. package/src/Cache.js.map +1 -1
  7. package/src/index.js +4 -0
  8. package/src/index.js.map +1 -1
  9. package/src/plugins/balancer/helpers/pools.js +21 -21
  10. package/src/plugins/bskt/constants.d.ts +7 -0
  11. package/src/plugins/bskt/constants.js +17 -0
  12. package/src/plugins/bskt/constants.js.map +1 -0
  13. package/src/plugins/bskt/filters.d.ts +2 -0
  14. package/src/plugins/bskt/filters.js +14 -0
  15. package/src/plugins/bskt/filters.js.map +1 -0
  16. package/src/plugins/bskt/index.d.ts +6 -0
  17. package/src/plugins/bskt/index.js +12 -0
  18. package/src/plugins/bskt/index.js.map +1 -0
  19. package/src/plugins/bskt/structs.d.ts +13 -0
  20. package/src/plugins/bskt/structs.js +15 -0
  21. package/src/plugins/bskt/structs.js.map +1 -0
  22. package/src/plugins/bskt/types.d.ts +4 -0
  23. package/src/plugins/bskt/types.js +3 -0
  24. package/src/plugins/bskt/types.js.map +1 -0
  25. package/src/plugins/bskt/vestingFetcher.d.ts +3 -0
  26. package/src/plugins/bskt/vestingFetcher.js +114 -0
  27. package/src/plugins/bskt/vestingFetcher.js.map +1 -0
  28. package/src/plugins/circuit/constants.d.ts +1 -3
  29. package/src/plugins/circuit/constants.js +2 -17
  30. package/src/plugins/circuit/constants.js.map +1 -1
  31. package/src/plugins/circuit/depositsFetcher.js +10 -4
  32. package/src/plugins/circuit/depositsFetcher.js.map +1 -1
  33. package/src/plugins/circuit/filters.d.ts +1 -0
  34. package/src/plugins/circuit/filters.js +4 -1
  35. package/src/plugins/circuit/filters.js.map +1 -1
  36. package/src/plugins/circuit/index.js +2 -1
  37. package/src/plugins/circuit/index.js.map +1 -1
  38. package/src/plugins/circuit/types.d.ts +1 -47
  39. package/src/plugins/circuit/vaultsJob.d.ts +3 -0
  40. package/src/plugins/circuit/vaultsJob.js +42 -0
  41. package/src/plugins/circuit/vaultsJob.js.map +1 -0
  42. package/src/plugins/drift/deposits.js +1 -1
  43. package/src/plugins/drift/deposits.js.map +1 -1
  44. package/src/plugins/drift/helpers.d.ts +0 -1
  45. package/src/plugins/drift/helpers.js +1 -6
  46. package/src/plugins/drift/helpers.js.map +1 -1
  47. package/src/plugins/flash/poolJob.js +1 -2
  48. package/src/plugins/flash/poolJob.js.map +1 -1
  49. package/src/plugins/kamino/farmsFetcher.js +14 -5
  50. package/src/plugins/kamino/farmsFetcher.js.map +1 -1
  51. package/src/plugins/kamino/farmsJob.js +3 -5
  52. package/src/plugins/kamino/farmsJob.js.map +1 -1
  53. package/src/plugins/mango/collateralFetcher.js +1 -2
  54. package/src/plugins/mango/collateralFetcher.js.map +1 -1
  55. package/src/plugins/mango/helpers.d.ts +0 -1
  56. package/src/plugins/mango/helpers.js +1 -7
  57. package/src/plugins/mango/helpers.js.map +1 -1
  58. package/src/plugins/navi/collateralFetcher.js +20 -24
  59. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  60. package/src/plugins/navi/constants.d.ts +0 -1
  61. package/src/plugins/navi/constants.js +10 -2
  62. package/src/plugins/navi/constants.js.map +1 -1
  63. package/src/plugins/navi/reservesJob.js +12 -50
  64. package/src/plugins/navi/reservesJob.js.map +1 -1
  65. package/src/plugins/navi/types.d.ts +42 -44
  66. package/src/plugins/sushiswap/helpers.js +24 -24
  67. package/src/plugins/uniswap-v2/helpers.js +22 -22
  68. package/src/utils/sei/constants.js +8 -8
  69. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  70. package/src/utils/solana/index.d.ts +1 -0
  71. package/src/utils/solana/index.js +1 -0
  72. package/src/utils/solana/index.js.map +1 -1
  73. package/src/utils/solana/u8ArrayToString.d.ts +1 -0
  74. package/src/utils/solana/u8ArrayToString.js +11 -0
  75. package/src/utils/solana/u8ArrayToString.js.map +1 -0
@@ -8,71 +8,33 @@ 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
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  const sui_js_1 = require("@mysten/sui.js");
16
13
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
- const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
14
  const clients_1 = require("../../utils/clients");
19
15
  const constants_1 = require("./constants");
20
16
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
21
17
  const client = (0, clients_1.getClientSui)();
22
18
  const reservesDatas = [];
23
- for (const pool of constants_1.poolsInfos) {
24
- const reserves = yield client.getDynamicFieldObject({
19
+ let error;
20
+ let index = 0;
21
+ do {
22
+ const reserve = yield client.getDynamicFieldObject({
25
23
  parentId: constants_1.reserveParentId,
26
- name: { type: 'u8', value: pool.id.toString() },
24
+ name: { type: 'u8', value: index },
27
25
  });
28
- if (reserves.data) {
29
- const fields = (0, sui_js_1.getObjectFields)(reserves.data);
30
- if (fields.value)
31
- reservesDatas.push(fields);
26
+ if (reserve.data) {
27
+ const reserveData = (0, sui_js_1.getObjectFields)(reserve.data);
28
+ if (reserveData.value)
29
+ reservesDatas.push(reserveData);
32
30
  }
33
- }
31
+ index += 1;
32
+ error = reserve.error;
33
+ } while (!error || index > 25);
34
34
  yield cache.setItem(constants_1.reservesKey, reservesDatas, {
35
35
  prefix: constants_1.reservesPrefix,
36
36
  networkId: portfolio_core_1.NetworkId.sui,
37
37
  });
38
- for (const reserveData of reservesDatas) {
39
- const reserve = reserveData.value.fields;
40
- const tokenAddress = reserve.coin_type;
41
- const poolName = 'Main Pool';
42
- const depositedAmount = new bignumber_js_1.default(reserve.supply_balance.fields.total_supply)
43
- .dividedBy(reserve.current_supply_index)
44
- .multipliedBy(Math.pow(10, constants_1.indexFactor))
45
- .toNumber();
46
- const borrowedAmount = new bignumber_js_1.default(reserve.borrow_balance.fields.total_supply)
47
- .dividedBy(reserve.current_borrow_index)
48
- .multipliedBy(Math.pow(10, constants_1.indexFactor))
49
- .toNumber();
50
- const borrowingApy = new bignumber_js_1.default(reserve.current_borrow_rate)
51
- .dividedBy(Math.pow(10, constants_1.rateFactor))
52
- .toNumber();
53
- const lendingApy = new bignumber_js_1.default(reserve.current_supply_rate)
54
- .dividedBy(Math.pow(10, constants_1.rateFactor))
55
- .toNumber();
56
- const rate = {
57
- tokenAddress,
58
- borrowYield: {
59
- apy: borrowingApy,
60
- apr: (0, portfolio_core_1.apyToApr)(borrowingApy),
61
- },
62
- borrowedAmount,
63
- depositYield: {
64
- apy: lendingApy,
65
- apr: (0, portfolio_core_1.apyToApr)(lendingApy),
66
- },
67
- depositedAmount,
68
- platformId: constants_1.platformId,
69
- poolName,
70
- };
71
- yield cache.setItem(`${reserveData.id.id}-${tokenAddress}`, rate, {
72
- prefix: portfolio_core_1.borrowLendRatesPrefix,
73
- networkId: portfolio_core_1.NetworkId.solana,
74
- });
75
- }
76
38
  });
77
39
  const job = {
78
40
  id: `${constants_1.platformId}-reserves`,
@@ -1 +1 @@
1
- {"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/navi/reservesJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAAiD;AACjD,+DAKoC;AACpC,gEAAqC;AAGrC,iDAAmD;AACnD,2CAQqB;AAGrB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,aAAa,GAAkB,EAAE,CAAC;IACxC,KAAK,MAAM,IAAI,IAAI,sBAAU,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;YAClD,QAAQ,EAA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C;IACd,GAAG,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC;YACjD,QAAQ,EAAE,2BAAe;YACzB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE;SACnC,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,WAAW,GAAG,IAAA,wBAAe,EAAC,OAAO,CAAC,IAAI,CAAgB,CAAC;YACjE,IAAI,WAAW,CAAC,KAAK;gBAAE,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,CAAC;QACD,KAAK,IAAI,CAAC,CAAC;QACX,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IACxB,CAAC,QAAQ,CAAC,KAAK,IAAI,KAAK,GAAG,EAAE,EAAE;IAE/B,MAAM,KAAK,CAAC,OAAO,CAAC,uBAAW,EAAE,aAAa,EAAE;QAC9C,MAAM,EAAE,0BAAc;QACtB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -1,43 +1,3 @@
1
- export type Balance = {
2
- id: {
3
- id: string;
4
- };
5
- name: string;
6
- value: string;
7
- };
8
- export type ReserveBalance = {
9
- type: string;
10
- fields: {
11
- total_supply: string;
12
- user_state: {
13
- type: string;
14
- fields: {
15
- id: {
16
- id: string;
17
- };
18
- size: string;
19
- };
20
- };
21
- };
22
- };
23
- export type BorrowRateFactors = {
24
- type: string;
25
- fields: {
26
- base_rate: string;
27
- jump_rate_multiplier: string;
28
- multiplier: string;
29
- optimal_utilization: string;
30
- reserve_factor: string;
31
- };
32
- };
33
- export type LiquidationFactors = {
34
- type: string;
35
- fields: {
36
- bonus: string;
37
- ratio: string;
38
- threshold: string;
39
- };
40
- };
41
1
  export type ReserveData = {
42
2
  id: {
43
3
  id: string;
@@ -46,9 +6,18 @@ export type ReserveData = {
46
6
  value: {
47
7
  type: string;
48
8
  fields: {
49
- borrow_balance: ReserveBalance;
9
+ borrow_balance: Balance;
50
10
  borrow_cap_ceiling: string;
51
- borrow_rate_factors: BorrowRateFactors;
11
+ borrow_rate_factors: {
12
+ type: string;
13
+ fields: {
14
+ base_rate: string;
15
+ jump_rate_multiplier: string;
16
+ multiplier: string;
17
+ optimal_utilization: string;
18
+ reserve_factor: string;
19
+ };
20
+ };
52
21
  coin_type: string;
53
22
  current_borrow_index: string;
54
23
  current_borrow_rate: string;
@@ -57,16 +26,45 @@ export type ReserveData = {
57
26
  id: number;
58
27
  is_isolated: boolean;
59
28
  last_update_timestamp: string;
60
- liquidation_factors: LiquidationFactors;
29
+ liquidation_factors: {
30
+ type: string;
31
+ fields: {
32
+ bonus: string;
33
+ ratio: string;
34
+ threshold: string;
35
+ };
36
+ };
61
37
  ltv: string;
62
38
  oracle_id: number;
63
39
  reserve_field_a: string;
64
40
  reserve_field_b: string;
65
41
  reserve_field_c: string;
66
- supply_balance: ReserveBalance;
42
+ supply_balance: Balance;
67
43
  supply_cap_ceiling: string;
68
44
  treasury_balance: string;
69
45
  treasury_factor: string;
70
46
  };
71
47
  };
72
48
  };
49
+ export type Balance = {
50
+ type: string;
51
+ fields: {
52
+ total_supply: string;
53
+ user_state: {
54
+ type: string;
55
+ fields: {
56
+ id: {
57
+ id: string;
58
+ };
59
+ size: string;
60
+ };
61
+ };
62
+ };
63
+ };
64
+ export type BalanceData = {
65
+ id: {
66
+ id: string;
67
+ };
68
+ name: string;
69
+ value: string;
70
+ };
@@ -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;
@@ -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;
@@ -5,5 +5,6 @@ export * from './getParsedProgramAccounts';
5
5
  export * from './getParsedMultipleAccountsInfo';
6
6
  export * from './getProgramAccountsSafe';
7
7
  export * from './getTokenAccountsByOwner';
8
+ export * from './u8ArrayToString';
8
9
  export * from './structs';
9
10
  export * from './types';
@@ -21,6 +21,7 @@ __exportStar(require("./getParsedProgramAccounts"), exports);
21
21
  __exportStar(require("./getParsedMultipleAccountsInfo"), exports);
22
22
  __exportStar(require("./getProgramAccountsSafe"), exports);
23
23
  __exportStar(require("./getTokenAccountsByOwner"), exports);
24
+ __exportStar(require("./u8ArrayToString"), exports);
24
25
  __exportStar(require("./structs"), exports);
25
26
  __exportStar(require("./types"), exports);
26
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/solana/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,8CAA4B;AAC5B,6DAA2C;AAC3C,kEAAgD;AAChD,2DAAyC;AACzC,4DAA0C;AAC1C,4CAA0B;AAC1B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/solana/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,8CAA4B;AAC5B,6DAA2C;AAC3C,kEAAgD;AAChD,2DAAyC;AACzC,4DAA0C;AAC1C,oDAAkC;AAClC,4CAA0B;AAC1B,0CAAwB"}
@@ -0,0 +1 @@
1
+ export declare function u8ArrayToString(bytes: number[]): string;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.u8ArrayToString = void 0;
4
+ function u8ArrayToString(bytes) {
5
+ return new TextDecoder('utf-8')
6
+ .decode(new Uint8Array(bytes))
7
+ .split('\x00')[0]
8
+ .trim();
9
+ }
10
+ exports.u8ArrayToString = u8ArrayToString;
11
+ //# sourceMappingURL=u8ArrayToString.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"u8ArrayToString.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/solana/u8ArrayToString.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,KAAe;IAC7C,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC;SAC5B,MAAM,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;SAC7B,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAChB,IAAI,EAAE,CAAC;AACZ,CAAC;AALD,0CAKC"}