@tokemak/queries 0.5.0 → 0.7.0

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.
Files changed (36) hide show
  1. package/dist/functions/getAutopoolDayData.d.ts.map +1 -1
  2. package/dist/functions/getAutopoolHistory.d.ts.map +1 -1
  3. package/dist/functions/getAutopools.d.ts +3 -3
  4. package/dist/functions/getAutopools.d.ts.map +1 -1
  5. package/dist/functions/getAutopoolsRebalances.d.ts.map +1 -1
  6. package/dist/functions/getChainAutopools.d.ts +20 -18
  7. package/dist/functions/getChainAutopools.d.ts.map +1 -1
  8. package/dist/functions/getEthPriceAtBlock.d.ts +2 -2
  9. package/dist/functions/getEthPriceAtBlock.d.ts.map +1 -1
  10. package/dist/functions/getMultipleAutopoolRebalances.d.ts.map +1 -1
  11. package/dist/functions/getPoolsAndDestinations.d.ts +4 -2
  12. package/dist/functions/getPoolsAndDestinations.d.ts.map +1 -1
  13. package/dist/functions/getRebalanceStats.d.ts +8 -6
  14. package/dist/functions/getRebalanceStats.d.ts.map +1 -1
  15. package/dist/functions/getTokenPrices.d.ts +1 -1
  16. package/dist/functions/getTokenPrices.d.ts.map +1 -1
  17. package/dist/functions/getUserAutopoolBalanceChanges.d.ts.map +1 -1
  18. package/dist/functions/getUserAutopools.d.ts +1 -1
  19. package/dist/functions/getUserAutopools.d.ts.map +1 -1
  20. package/dist/functions/getUserSAuto.d.ts +1 -1
  21. package/dist/functions/getUserSAuto.d.ts.map +1 -1
  22. package/dist/functions/updateRebalanceStats.d.ts +2 -2
  23. package/dist/functions/updateRebalanceStats.d.ts.map +1 -1
  24. package/dist/index.js +307 -352
  25. package/dist/index.mjs +197 -245
  26. package/dist/safe.d.ts +9 -0
  27. package/dist/safe.d.ts.map +1 -0
  28. package/dist/safe.js +883 -0
  29. package/dist/safe.mjs +871 -0
  30. package/package.json +27 -16
  31. package/dist/functions/getBackupApr.d.ts +0 -2
  32. package/dist/functions/getBackupApr.d.ts.map +0 -1
  33. package/dist/functions/getBackupTokenPrices.d.ts +0 -6
  34. package/dist/functions/getBackupTokenPrices.d.ts.map +0 -1
  35. package/dist/functions/getPoolsAndDestinationsBackup.d.ts +0 -67
  36. package/dist/functions/getPoolsAndDestinationsBackup.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokemak/queries",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -14,6 +14,16 @@
14
14
  "types": "./dist/index.d.ts",
15
15
  "default": "./dist/index.js"
16
16
  }
17
+ },
18
+ "./safe": {
19
+ "import": {
20
+ "types": "./dist/safe.d.ts",
21
+ "default": "./dist/safe.mjs"
22
+ },
23
+ "require": {
24
+ "types": "./dist/safe.d.ts",
25
+ "default": "./dist/safe.js"
26
+ }
17
27
  }
18
28
  },
19
29
  "sideEffects": false,
@@ -24,30 +34,31 @@
24
34
  "publishConfig": {
25
35
  "access": "public"
26
36
  },
27
- "scripts": {
28
- "build": "tsup && tsc --emitDeclarationOnly",
29
- "lint": "eslint \"**/*.ts\" --ignore-pattern dist",
30
- "clean": "rimraf .turbo node_modules dist",
31
- "test": "vitest run",
32
- "test:watch": "vitest"
33
- },
34
37
  "devDependencies": {
38
+ "esbuild": "0.27.7",
35
39
  "vitest": "4.1.5"
36
40
  },
37
41
  "dependencies": {
38
42
  "@layerzerolabs/lz-v2-utilities": "3.0.4",
39
43
  "@merkl/api": "1.17.4",
40
- "@tokemak/abis": "workspace:*",
41
- "@tokemak/config": "workspace:*",
42
- "@tokemak/constants": "workspace:*",
43
- "@tokemak/graph-cli": "workspace:*",
44
- "@tokemak/tokenlist": "workspace:*",
45
- "@tokemak/utils": "workspace:*",
46
- "graphql-request": "6.1.0"
44
+ "graphql-request": "6.1.0",
45
+ "@tokemak/graph-cli": "0.4.0",
46
+ "@tokemak/config": "0.4.0",
47
+ "@tokemak/constants": "0.3.0",
48
+ "@tokemak/utils": "0.2.1",
49
+ "@tokemak/abis": "0.2.0",
50
+ "@tokemak/tokenlist": "0.4.0"
47
51
  },
48
52
  "peerDependencies": {
49
53
  "@wagmi/core": ">=2.9.0",
50
54
  "viem": "2.x",
51
55
  "wagmi": ">=2.9.0"
56
+ },
57
+ "scripts": {
58
+ "build": "tsup && tsc --emitDeclarationOnly",
59
+ "lint": "eslint \"**/*.ts\" --ignore-pattern dist",
60
+ "clean": "rimraf .turbo node_modules dist",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest"
52
63
  }
53
- }
64
+ }
@@ -1,2 +0,0 @@
1
- export declare const getBackupApr: (chainId: number, poolAddress: string) => Promise<number | null>;
2
- //# sourceMappingURL=getBackupApr.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBackupApr.d.ts","sourceRoot":"","sources":["../../functions/getBackupApr.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,GAAU,SAAS,MAAM,EAAE,aAAa,MAAM,2BAmBtE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { TokenPrices } from "./getTokenPrices";
2
- export declare const getBackupTokenPrices: () => Promise<{
3
- prices: TokenPrices;
4
- timestamp: number;
5
- } | undefined>;
6
- //# sourceMappingURL=getBackupTokenPrices.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBackupTokenPrices.d.ts","sourceRoot":"","sources":["../../functions/getBackupTokenPrices.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,eAAO,MAAM,oBAAoB;YAII,WAAW;eAAa,MAAM;cAQlE,CAAC"}
@@ -1,67 +0,0 @@
1
- import { SupportedChainIds } from "@tokemak/config";
2
- export declare const getPoolsAndDestinationsBackup: (chainId: SupportedChainIds) => Promise<({
3
- poolAddress: `0x${string}`;
4
- name: string;
5
- symbol: string;
6
- vaultType: `0x${string}`;
7
- baseAsset: `0x${string}`;
8
- streamingFeeBps: bigint;
9
- periodicFeeBps: bigint;
10
- feeHighMarkEnabled: boolean;
11
- feeSettingsIncomplete: boolean;
12
- isShutdown: boolean;
13
- shutdownStatus: number;
14
- rewarder: `0x${string}`;
15
- strategy: `0x${string}`;
16
- totalSupply: bigint;
17
- totalAssets: bigint;
18
- totalIdle: bigint;
19
- totalDebt: bigint;
20
- navPerShare: bigint;
21
- } & Record<string, {
22
- vaultAddress: `0x${string}`;
23
- exchangeName: string;
24
- totalSupply: bigint;
25
- lastSnapshotTimestamp: bigint;
26
- feeApr: bigint;
27
- lastDebtReportTime: bigint;
28
- minDebtValue: bigint;
29
- maxDebtValue: bigint;
30
- debtValueHeldByVault: bigint;
31
- queuedForRemoval: boolean;
32
- statsIncomplete: boolean;
33
- isShutdown: boolean;
34
- shutdownStatus: number;
35
- autoPoolOwnsShares: bigint;
36
- actualLPTotalSupply: bigint;
37
- dexPool: `0x${string}`;
38
- lpTokenAddress: `0x${string}`;
39
- lpTokenSymbol: string;
40
- lpTokenName: string;
41
- statsSafeLPTotalSupply: bigint;
42
- statsIncentiveCredits: number;
43
- compositeReturn: bigint;
44
- rewardsTokens: readonly {
45
- tokenAddress: `0x${string}`;
46
- }[];
47
- underlyingTokens: readonly {
48
- tokenAddress: `0x${string}`;
49
- }[];
50
- underlyingTokenSymbols: readonly {
51
- symbol: string;
52
- }[];
53
- lstStatsData: readonly {
54
- lastSnapshotTimestamp: bigint;
55
- baseApr: bigint;
56
- discount: bigint;
57
- discountHistory: readonly [number, number, number, number, number, number, number, number, number, number];
58
- discountTimestampByPercent: number;
59
- }[];
60
- underlyingTokenValueHeld: readonly {
61
- valueHeldInEth: bigint;
62
- }[];
63
- reservesInEth: readonly bigint[];
64
- statsPeriodFinishForRewards: readonly number[];
65
- statsAnnualizedRewardAmounts: readonly bigint[];
66
- }[]>)[] | undefined>;
67
- //# sourceMappingURL=getPoolsAndDestinationsBackup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getPoolsAndDestinationsBackup.d.ts","sourceRoot":"","sources":["../../functions/getPoolsAndDestinationsBackup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,6BAA6B,GACxC,SAAS,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAW3B,CAAC"}