@sonarwatch/portfolio-plugins 0.12.37 → 0.12.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.md +1847 -1839
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/drift/constants.d.ts +1 -0
  6. package/src/plugins/drift/constants.js +2 -1
  7. package/src/plugins/drift/constants.js.map +1 -1
  8. package/src/plugins/drift/depositsFetcher.js +63 -1
  9. package/src/plugins/drift/depositsFetcher.js.map +1 -1
  10. package/src/plugins/drift/filters.d.ts +1 -0
  11. package/src/plugins/drift/filters.js +4 -1
  12. package/src/plugins/drift/filters.js.map +1 -1
  13. package/src/plugins/drift/index.js +2 -1
  14. package/src/plugins/drift/index.js.map +1 -1
  15. package/src/plugins/drift/perpHelpers/amm.d.ts +74 -0
  16. package/src/plugins/drift/perpHelpers/amm.js +567 -0
  17. package/src/plugins/drift/perpHelpers/amm.js.map +1 -0
  18. package/src/plugins/drift/perpHelpers/assert.d.ts +1 -0
  19. package/src/plugins/drift/perpHelpers/assert.js +10 -0
  20. package/src/plugins/drift/perpHelpers/assert.js.map +1 -0
  21. package/src/plugins/drift/perpHelpers/constants.d.ts +27 -0
  22. package/src/plugins/drift/perpHelpers/constants.js +35 -0
  23. package/src/plugins/drift/perpHelpers/constants.js.map +1 -0
  24. package/src/plugins/drift/perpHelpers/convert.d.ts +0 -0
  25. package/src/plugins/drift/perpHelpers/convert.js +2 -0
  26. package/src/plugins/drift/perpHelpers/convert.js.map +1 -0
  27. package/src/plugins/drift/perpHelpers/getOraclePrice.d.ts +4 -0
  28. package/src/plugins/drift/perpHelpers/getOraclePrice.js +61 -0
  29. package/src/plugins/drift/perpHelpers/getOraclePrice.js.map +1 -0
  30. package/src/plugins/drift/perpHelpers/getPerpMarket.d.ts +4 -0
  31. package/src/plugins/drift/perpHelpers/getPerpMarket.js +33 -0
  32. package/src/plugins/drift/perpHelpers/getPerpMarket.js.map +1 -0
  33. package/src/plugins/drift/perpHelpers/margin.d.ts +10 -0
  34. package/src/plugins/drift/perpHelpers/margin.js +82 -0
  35. package/src/plugins/drift/perpHelpers/margin.js.map +1 -0
  36. package/src/plugins/drift/perpHelpers/math.d.ts +4 -0
  37. package/src/plugins/drift/perpHelpers/math.js +29 -0
  38. package/src/plugins/drift/perpHelpers/math.js.map +1 -0
  39. package/src/plugins/drift/perpHelpers/oracle.d.ts +6 -0
  40. package/src/plugins/drift/perpHelpers/oracle.js +54 -0
  41. package/src/plugins/drift/perpHelpers/oracle.js.map +1 -0
  42. package/src/plugins/drift/perpHelpers/orders.d.ts +2 -0
  43. package/src/plugins/drift/perpHelpers/orders.js +9 -0
  44. package/src/plugins/drift/perpHelpers/orders.js.map +1 -0
  45. package/src/plugins/drift/perpHelpers/position.d.ts +44 -0
  46. package/src/plugins/drift/perpHelpers/position.js +184 -0
  47. package/src/plugins/drift/perpHelpers/position.js.map +1 -0
  48. package/src/plugins/drift/perpHelpers/prelaunchOracle.d.ts +3 -0
  49. package/src/plugins/drift/perpHelpers/prelaunchOracle.js +20 -0
  50. package/src/plugins/drift/perpHelpers/prelaunchOracle.js.map +1 -0
  51. package/src/plugins/drift/perpHelpers/pyth.d.ts +5 -0
  52. package/src/plugins/drift/perpHelpers/pyth.js +42 -0
  53. package/src/plugins/drift/perpHelpers/pyth.js.map +1 -0
  54. package/src/plugins/drift/perpHelpers/repeg.d.ts +14 -0
  55. package/src/plugins/drift/perpHelpers/repeg.js +162 -0
  56. package/src/plugins/drift/perpHelpers/repeg.js.map +1 -0
  57. package/src/plugins/drift/perpHelpers/switchboard.d.ts +3 -0
  58. package/src/plugins/drift/perpHelpers/switchboard.js +31 -0
  59. package/src/plugins/drift/perpHelpers/switchboard.js.map +1 -0
  60. package/src/plugins/drift/perpHelpers/types.d.ts +28 -0
  61. package/src/plugins/drift/perpHelpers/types.js +19 -0
  62. package/src/plugins/drift/perpHelpers/types.js.map +1 -0
  63. package/src/plugins/drift/prepMarketsJob.d.ts +3 -0
  64. package/src/plugins/drift/prepMarketsJob.js +38 -0
  65. package/src/plugins/drift/prepMarketsJob.js.map +1 -0
  66. package/src/plugins/drift/struct.d.ts +82 -76
  67. package/src/plugins/drift/struct.js +79 -74
  68. package/src/plugins/drift/struct.js.map +1 -1
  69. package/src/plugins/drift/types.d.ts +1 -0
  70. package/src/plugins/jupiter/exchange/perpetualFetcher.js +3 -6
  71. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  72. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  73. package/src/plugins/jupiter/helpers.d.ts +2 -2
  74. package/src/plugins/jupiter/helpers.js.map +1 -1
  75. package/src/plugins/sushiswap/helpers.js +24 -24
  76. package/src/plugins/uniswap-v2/helpers.js +22 -22
  77. package/src/plugins/zeta/airdropFetcher.js +14 -14
  78. package/src/utils/sei/constants.js +8 -8
  79. 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;
@@ -39,20 +39,20 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
39
39
  const graphql_request_1 = __importStar(require("graphql-request"));
40
40
  const constants_1 = require("./constants");
41
41
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
42
- const query = (0, graphql_request_1.gql) `
43
- query GetAirdropFinalFrontend($authority: String!) {
44
- getAirdropFinalFrontend(authority: $authority) {
45
- authority
46
- community_allocation
47
- eligibility
48
- main_allocation
49
- og_allocation
50
- s1_allocation
51
- s2_allocation
52
- total_allocation
53
- __typename
54
- }
55
- }
42
+ const query = (0, graphql_request_1.gql) `
43
+ query GetAirdropFinalFrontend($authority: String!) {
44
+ getAirdropFinalFrontend(authority: $authority) {
45
+ authority
46
+ community_allocation
47
+ eligibility
48
+ main_allocation
49
+ og_allocation
50
+ s1_allocation
51
+ s2_allocation
52
+ total_allocation
53
+ __typename
54
+ }
55
+ }
56
56
  `;
57
57
  const networkId = portfolio_core_1.NetworkId.solana;
58
58
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -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;