@tokemak/queries 0.7.0 → 0.8.1
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/dist/functions/getAutopools.d.ts +3 -1
- package/dist/functions/getAutopools.d.ts.map +1 -1
- package/dist/functions/getDeprecatedAutopools.d.ts +347 -0
- package/dist/functions/getDeprecatedAutopools.d.ts.map +1 -0
- package/dist/functions/getEthAutoLP.d.ts +1 -1
- package/dist/functions/getEthAutoLP.d.ts.map +1 -1
- package/dist/functions/getUniV4Pool.d.ts +13 -17
- package/dist/functions/getUniV4Pool.d.ts.map +1 -1
- package/dist/functions/getUserUniV4Positions.d.ts +1 -0
- package/dist/functions/getUserUniV4Positions.d.ts.map +1 -1
- package/dist/functions/index.d.ts +3 -23
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/uniV4Subgraph.d.ts +45 -0
- package/dist/functions/uniV4Subgraph.d.ts.map +1 -0
- package/dist/index.js +419 -1714
- package/dist/index.mjs +291 -1589
- package/dist/safe.js +12 -8
- package/dist/safe.mjs +8 -4
- package/dist/utils/getChainsForEnv.d.ts +12 -3
- package/dist/utils/getChainsForEnv.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/functions/getAllowance.d.ts +0 -8
- package/dist/functions/getAllowance.d.ts.map +0 -1
- package/dist/functions/getAutopoolsRebalances.d.ts +0 -53
- package/dist/functions/getAutopoolsRebalances.d.ts.map +0 -1
- package/dist/functions/getChainCycleRolloverBlockNumber.d.ts +0 -7
- package/dist/functions/getChainCycleRolloverBlockNumber.d.ts.map +0 -1
- package/dist/functions/getChainSToke.d.ts +0 -15
- package/dist/functions/getChainSToke.d.ts.map +0 -1
- package/dist/functions/getChainSTokeRewards.d.ts +0 -16
- package/dist/functions/getChainSTokeRewards.d.ts.map +0 -1
- package/dist/functions/getChainUserSToke.d.ts +0 -33
- package/dist/functions/getChainUserSToke.d.ts.map +0 -1
- package/dist/functions/getChainUserSTokeRewards.d.ts +0 -30
- package/dist/functions/getChainUserSTokeRewards.d.ts.map +0 -1
- package/dist/functions/getCombinedRewards.d.ts +0 -11
- package/dist/functions/getCombinedRewards.d.ts.map +0 -1
- package/dist/functions/getCurveLP.d.ts +0 -3
- package/dist/functions/getCurveLP.d.ts.map +0 -1
- package/dist/functions/getCycleV1.d.ts +0 -10
- package/dist/functions/getCycleV1.d.ts.map +0 -1
- package/dist/functions/getEthPrice.d.ts +0 -2
- package/dist/functions/getEthPrice.d.ts.map +0 -1
- package/dist/functions/getLayerzeroStatus.d.ts +0 -24
- package/dist/functions/getLayerzeroStatus.d.ts.map +0 -1
- package/dist/functions/getMultipleAutopoolRebalances.d.ts +0 -54
- package/dist/functions/getMultipleAutopoolRebalances.d.ts.map +0 -1
- package/dist/functions/getProtocolStats.d.ts +0 -41
- package/dist/functions/getProtocolStats.d.ts.map +0 -1
- package/dist/functions/getSToke.d.ts +0 -23
- package/dist/functions/getSToke.d.ts.map +0 -1
- package/dist/functions/getSTokeRewards.d.ts +0 -22
- package/dist/functions/getSTokeRewards.d.ts.map +0 -1
- package/dist/functions/getSushiLP.d.ts +0 -14
- package/dist/functions/getSushiLP.d.ts.map +0 -1
- package/dist/functions/getTokenList.d.ts +0 -3
- package/dist/functions/getTokenList.d.ts.map +0 -1
- package/dist/functions/getUserCurveLP.d.ts +0 -16
- package/dist/functions/getUserCurveLP.d.ts.map +0 -1
- package/dist/functions/getUserSToke.d.ts +0 -40
- package/dist/functions/getUserSToke.d.ts.map +0 -1
- package/dist/functions/getUserSTokeRewards.d.ts +0 -38
- package/dist/functions/getUserSTokeRewards.d.ts.map +0 -1
- package/dist/functions/getUserSushiLP.d.ts +0 -23
- package/dist/functions/getUserSushiLP.d.ts.map +0 -1
- package/dist/functions/getUserV1.d.ts +0 -18
- package/dist/functions/getUserV1.d.ts.map +0 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Config } from "@wagmi/core";
|
|
2
|
+
import { ChainStatusFilter } from "../utils";
|
|
2
3
|
import { TokenPrices } from "./getTokenPrices";
|
|
3
|
-
export declare const getAutopools: (wagmiConfig: Config, { prices, includeTestnet }: {
|
|
4
|
+
export declare const getAutopools: (wagmiConfig: Config, { prices, includeTestnet, status }: {
|
|
4
5
|
prices: TokenPrices;
|
|
5
6
|
includeTestnet?: boolean;
|
|
7
|
+
status?: ChainStatusFilter;
|
|
6
8
|
}) => Promise<{
|
|
7
9
|
isShutdown: boolean;
|
|
8
10
|
symbol: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutopools.d.ts","sourceRoot":"","sources":["../../functions/getAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"getAutopools.d.ts","sourceRoot":"","sources":["../../functions/getAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAmB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAI9D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,eAAO,MAAM,YAAY,GACvB,aAAa,MAAM,EACnB,oCAIG;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAHC,CAAF;0BACI,CAAC;;;;;wBAKqC,CAAC;2BAEnC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA6B2/ijD,CAAC;kBAAwC,CAAC;;;;;;;;;;;;;;;;gCArC5ijjD,CAAF;sBACI,CAAC;;;;;oBAKqC,CAAC;uBAEnC,CAAC;;;;;;;;;;;;;gCARP,CAAF;sBACI,CAAC;;;;;oBAKqC,CAAC;uBAEnC,CAAC;;;;;;;;;;;;;;;;;gCARP,CAAF;sBACI,CAAC;;;;;oBAKqC,CAAC;uBAEnC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;gCARP,CAAF;sBACI,CAAC;;;;;oBAKqC,CAAC;uBAEnC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAyBV,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAClE,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { Config } from "@wagmi/core";
|
|
2
|
+
import { TokenPrices } from "./getTokenPrices";
|
|
3
|
+
/**
|
|
4
|
+
* Autopools on sunset/deprecated chains (e.g. sonic, plasma, linea).
|
|
5
|
+
*
|
|
6
|
+
* Identical shape and processing to {@link getAutopools}, but scoped to chains
|
|
7
|
+
* flagged `status: "sunset"` in `@tokemak/config`. Kept as a separate call so
|
|
8
|
+
* the main autopool list (`getAutopools`, active chains only) never waits on
|
|
9
|
+
* deprecated chains' live reads. Deprecated pools still resolve live so users
|
|
10
|
+
* can read current NAV/balances and withdraw/unstake.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getDeprecatedAutopools: (wagmiConfig: Config, { prices, includeTestnet }: {
|
|
13
|
+
prices: TokenPrices;
|
|
14
|
+
includeTestnet?: boolean;
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
isShutdown: boolean;
|
|
17
|
+
symbol: string;
|
|
18
|
+
logoURI?: string | undefined;
|
|
19
|
+
description?: string;
|
|
20
|
+
type?: "Ecosystem" | "Institutional" | "Flagship" | undefined;
|
|
21
|
+
inactive?: boolean;
|
|
22
|
+
tvl: number;
|
|
23
|
+
totalAssets: {
|
|
24
|
+
denom: number;
|
|
25
|
+
ETH: number;
|
|
26
|
+
WETH: number;
|
|
27
|
+
USDC: number;
|
|
28
|
+
DOLA: number;
|
|
29
|
+
USDT0: number;
|
|
30
|
+
EURC: number;
|
|
31
|
+
PXETH: number;
|
|
32
|
+
S: number;
|
|
33
|
+
USDT: number;
|
|
34
|
+
TOKE: number;
|
|
35
|
+
AUTO: number;
|
|
36
|
+
SILO: number;
|
|
37
|
+
XPL: number;
|
|
38
|
+
MON: number;
|
|
39
|
+
WS: number;
|
|
40
|
+
WXPL: number;
|
|
41
|
+
WMON: number;
|
|
42
|
+
baseAsset: number;
|
|
43
|
+
USD: number;
|
|
44
|
+
};
|
|
45
|
+
destinations: {
|
|
46
|
+
debtValueHeldByVaultUsd: number;
|
|
47
|
+
debtValueHeldByVaultEth: number;
|
|
48
|
+
compositeReturn: number;
|
|
49
|
+
debtValueHeldByVaultAllocation: number;
|
|
50
|
+
underlyingTokens: {
|
|
51
|
+
valueUsd: number;
|
|
52
|
+
value: number;
|
|
53
|
+
address: import("abitype").Address;
|
|
54
|
+
chainId: number;
|
|
55
|
+
decimals: number;
|
|
56
|
+
logoURI: string;
|
|
57
|
+
name: string;
|
|
58
|
+
symbol: string;
|
|
59
|
+
audits?: string;
|
|
60
|
+
extensions?: {
|
|
61
|
+
bridgeMainnetAdapter?: import("abitype").Address;
|
|
62
|
+
bridgeInfo?: {
|
|
63
|
+
[chainId: number]: {
|
|
64
|
+
tokenAddress: import("abitype").Address;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
rebasing?: boolean;
|
|
68
|
+
parentAsset?: string;
|
|
69
|
+
};
|
|
70
|
+
}[];
|
|
71
|
+
poolName: string;
|
|
72
|
+
exchange: import("@tokemak/tokenlist").IProtocol | undefined;
|
|
73
|
+
vaultAddress: `0x${string}`;
|
|
74
|
+
exchangeName: string;
|
|
75
|
+
totalSupply: bigint;
|
|
76
|
+
lastSnapshotTimestamp: bigint;
|
|
77
|
+
feeApr: bigint;
|
|
78
|
+
lastDebtReportTime: bigint;
|
|
79
|
+
minDebtValue: bigint;
|
|
80
|
+
maxDebtValue: bigint;
|
|
81
|
+
debtValueHeldByVault: bigint;
|
|
82
|
+
queuedForRemoval: boolean;
|
|
83
|
+
statsIncomplete: boolean;
|
|
84
|
+
isShutdown: boolean;
|
|
85
|
+
shutdownStatus: number;
|
|
86
|
+
autoPoolOwnsShares: bigint;
|
|
87
|
+
actualLPTotalSupply: bigint;
|
|
88
|
+
dexPool: `0x${string}`;
|
|
89
|
+
lpTokenAddress: `0x${string}`;
|
|
90
|
+
lpTokenSymbol: string;
|
|
91
|
+
lpTokenName: string;
|
|
92
|
+
statsSafeLPTotalSupply: bigint;
|
|
93
|
+
statsIncentiveCredits: number;
|
|
94
|
+
rewardsTokens: readonly {
|
|
95
|
+
tokenAddress: `0x${string}`;
|
|
96
|
+
}[];
|
|
97
|
+
underlyingTokenSymbols: readonly {
|
|
98
|
+
symbol: string;
|
|
99
|
+
}[];
|
|
100
|
+
lstStatsData: readonly {
|
|
101
|
+
lastSnapshotTimestamp: bigint;
|
|
102
|
+
baseApr: bigint;
|
|
103
|
+
discount: bigint;
|
|
104
|
+
discountHistory: readonly [number, number, number, number, number, number, number, number, number, number];
|
|
105
|
+
discountTimestampByPercent: number;
|
|
106
|
+
}[];
|
|
107
|
+
underlyingTokenValueHeld: readonly {
|
|
108
|
+
valueHeldInEth: bigint;
|
|
109
|
+
}[];
|
|
110
|
+
reservesInEth: readonly bigint[];
|
|
111
|
+
statsPeriodFinishForRewards: readonly number[];
|
|
112
|
+
statsAnnualizedRewardAmounts: readonly bigint[];
|
|
113
|
+
}[];
|
|
114
|
+
exchanges: {
|
|
115
|
+
valueUsd: number;
|
|
116
|
+
value: number;
|
|
117
|
+
allocation: number;
|
|
118
|
+
logoURI: string;
|
|
119
|
+
name: string;
|
|
120
|
+
audits?: string;
|
|
121
|
+
type: "DEX" | "Lending Market" | "Protocol" | "Portfolio Tracker";
|
|
122
|
+
}[];
|
|
123
|
+
timestamp: number;
|
|
124
|
+
isNew: boolean;
|
|
125
|
+
extraRewarders: {
|
|
126
|
+
__typename?: "Rewarder";
|
|
127
|
+
id: any;
|
|
128
|
+
currentApy?: any | null;
|
|
129
|
+
rewardToken?: {
|
|
130
|
+
__typename?: "RefToken";
|
|
131
|
+
symbol?: string | null;
|
|
132
|
+
id: any;
|
|
133
|
+
} | null;
|
|
134
|
+
}[] | null | undefined;
|
|
135
|
+
autopoolRewarderDisabled: boolean;
|
|
136
|
+
createdAt: Date;
|
|
137
|
+
baseAsset: {
|
|
138
|
+
price: number;
|
|
139
|
+
address: import("abitype").Address;
|
|
140
|
+
chainId: number;
|
|
141
|
+
decimals: number;
|
|
142
|
+
logoURI: string;
|
|
143
|
+
name: string;
|
|
144
|
+
symbol: string;
|
|
145
|
+
audits?: string;
|
|
146
|
+
extensions?: {
|
|
147
|
+
bridgeMainnetAdapter?: import("abitype").Address;
|
|
148
|
+
bridgeInfo?: {
|
|
149
|
+
[chainId: number]: {
|
|
150
|
+
tokenAddress: import("abitype").Address;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
rebasing?: boolean;
|
|
154
|
+
parentAsset?: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
denomination: {
|
|
158
|
+
price: number;
|
|
159
|
+
address: import("abitype").Address;
|
|
160
|
+
chainId: number;
|
|
161
|
+
decimals: number;
|
|
162
|
+
logoURI: string;
|
|
163
|
+
name: string;
|
|
164
|
+
symbol: string;
|
|
165
|
+
audits?: string;
|
|
166
|
+
extensions?: {
|
|
167
|
+
bridgeMainnetAdapter?: import("abitype").Address;
|
|
168
|
+
bridgeInfo?: {
|
|
169
|
+
[chainId: number]: {
|
|
170
|
+
tokenAddress: import("abitype").Address;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
rebasing?: boolean;
|
|
174
|
+
parentAsset?: string;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
useDenomination: boolean;
|
|
178
|
+
UIBaseAsset: import("@tokemak/tokenlist").IToken;
|
|
179
|
+
UITokens: {
|
|
180
|
+
valueUsd: number;
|
|
181
|
+
value: number;
|
|
182
|
+
allocation: number;
|
|
183
|
+
address: import("abitype").Address;
|
|
184
|
+
chainId: number;
|
|
185
|
+
decimals: number;
|
|
186
|
+
logoURI: string;
|
|
187
|
+
name: string;
|
|
188
|
+
symbol: string;
|
|
189
|
+
audits?: string;
|
|
190
|
+
extensions?: {
|
|
191
|
+
bridgeMainnetAdapter?: import("abitype").Address;
|
|
192
|
+
bridgeInfo?: {
|
|
193
|
+
[chainId: number]: {
|
|
194
|
+
tokenAddress: import("abitype").Address;
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
rebasing?: boolean;
|
|
198
|
+
parentAsset?: string;
|
|
199
|
+
};
|
|
200
|
+
}[];
|
|
201
|
+
UIExchanges: {
|
|
202
|
+
valueUsd: number;
|
|
203
|
+
value: number;
|
|
204
|
+
allocation: number;
|
|
205
|
+
logoURI: string;
|
|
206
|
+
name: string;
|
|
207
|
+
audits?: string;
|
|
208
|
+
type: "DEX" | "Lending Market" | "Protocol" | "Portfolio Tracker";
|
|
209
|
+
}[];
|
|
210
|
+
tokens: {
|
|
211
|
+
valueUsd: number;
|
|
212
|
+
value: number;
|
|
213
|
+
allocation: number;
|
|
214
|
+
address: import("abitype").Address;
|
|
215
|
+
chainId: number;
|
|
216
|
+
decimals: number;
|
|
217
|
+
logoURI: string;
|
|
218
|
+
name: string;
|
|
219
|
+
symbol: string;
|
|
220
|
+
audits?: string;
|
|
221
|
+
extensions?: {
|
|
222
|
+
bridgeMainnetAdapter?: import("abitype").Address;
|
|
223
|
+
bridgeInfo?: {
|
|
224
|
+
[chainId: number]: {
|
|
225
|
+
tokenAddress: import("abitype").Address;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
rebasing?: boolean;
|
|
229
|
+
parentAsset?: string;
|
|
230
|
+
};
|
|
231
|
+
}[];
|
|
232
|
+
chain: import("@tokemak/tokenlist").INetwork | undefined;
|
|
233
|
+
apr: {
|
|
234
|
+
base: number | null;
|
|
235
|
+
extraAprs: import("./getChainAutopools").ExtraReward[];
|
|
236
|
+
combined: number;
|
|
237
|
+
hasExtraAprs: boolean;
|
|
238
|
+
};
|
|
239
|
+
dailyEarnings: {
|
|
240
|
+
combined: {
|
|
241
|
+
denom: number;
|
|
242
|
+
ETH: number;
|
|
243
|
+
WETH: number;
|
|
244
|
+
USDC: number;
|
|
245
|
+
DOLA: number;
|
|
246
|
+
USDT0: number;
|
|
247
|
+
EURC: number;
|
|
248
|
+
PXETH: number;
|
|
249
|
+
S: number;
|
|
250
|
+
USDT: number;
|
|
251
|
+
TOKE: number;
|
|
252
|
+
AUTO: number;
|
|
253
|
+
SILO: number;
|
|
254
|
+
XPL: number;
|
|
255
|
+
MON: number;
|
|
256
|
+
WS: number;
|
|
257
|
+
WXPL: number;
|
|
258
|
+
WMON: number;
|
|
259
|
+
baseAsset: number;
|
|
260
|
+
USD: number;
|
|
261
|
+
};
|
|
262
|
+
base: {
|
|
263
|
+
denom: number;
|
|
264
|
+
ETH: number;
|
|
265
|
+
WETH: number;
|
|
266
|
+
USDC: number;
|
|
267
|
+
DOLA: number;
|
|
268
|
+
USDT0: number;
|
|
269
|
+
EURC: number;
|
|
270
|
+
PXETH: number;
|
|
271
|
+
S: number;
|
|
272
|
+
USDT: number;
|
|
273
|
+
TOKE: number;
|
|
274
|
+
AUTO: number;
|
|
275
|
+
SILO: number;
|
|
276
|
+
XPL: number;
|
|
277
|
+
MON: number;
|
|
278
|
+
WS: number;
|
|
279
|
+
WXPL: number;
|
|
280
|
+
WMON: number;
|
|
281
|
+
baseAsset: number;
|
|
282
|
+
USD: number;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
navPerShare: {
|
|
286
|
+
denom: number;
|
|
287
|
+
ETH: number;
|
|
288
|
+
WETH: number;
|
|
289
|
+
USDC: number;
|
|
290
|
+
DOLA: number;
|
|
291
|
+
USDT0: number;
|
|
292
|
+
EURC: number;
|
|
293
|
+
PXETH: number;
|
|
294
|
+
S: number;
|
|
295
|
+
USDT: number;
|
|
296
|
+
TOKE: number;
|
|
297
|
+
AUTO: number;
|
|
298
|
+
SILO: number;
|
|
299
|
+
XPL: number;
|
|
300
|
+
MON: number;
|
|
301
|
+
WS: number;
|
|
302
|
+
WXPL: number;
|
|
303
|
+
WMON: number;
|
|
304
|
+
baseAsset: number;
|
|
305
|
+
USD: number;
|
|
306
|
+
};
|
|
307
|
+
idle: {
|
|
308
|
+
allocation: number;
|
|
309
|
+
token: import("@tokemak/tokenlist").IToken;
|
|
310
|
+
denom: number;
|
|
311
|
+
ETH: number;
|
|
312
|
+
WETH: number;
|
|
313
|
+
USDC: number;
|
|
314
|
+
DOLA: number;
|
|
315
|
+
USDT0: number;
|
|
316
|
+
EURC: number;
|
|
317
|
+
PXETH: number;
|
|
318
|
+
S: number;
|
|
319
|
+
USDT: number;
|
|
320
|
+
TOKE: number;
|
|
321
|
+
AUTO: number;
|
|
322
|
+
SILO: number;
|
|
323
|
+
XPL: number;
|
|
324
|
+
MON: number;
|
|
325
|
+
WS: number;
|
|
326
|
+
WXPL: number;
|
|
327
|
+
WMON: number;
|
|
328
|
+
baseAsset: number;
|
|
329
|
+
USD: number;
|
|
330
|
+
};
|
|
331
|
+
category: import("..").AutopoolCategory;
|
|
332
|
+
poolAddress: `0x${string}`;
|
|
333
|
+
name: string;
|
|
334
|
+
vaultType: `0x${string}`;
|
|
335
|
+
streamingFeeBps: bigint;
|
|
336
|
+
periodicFeeBps: bigint;
|
|
337
|
+
feeHighMarkEnabled: boolean;
|
|
338
|
+
feeSettingsIncomplete: boolean;
|
|
339
|
+
shutdownStatus: number;
|
|
340
|
+
rewarder: `0x${string}`;
|
|
341
|
+
strategy: `0x${string}`;
|
|
342
|
+
totalSupply: bigint;
|
|
343
|
+
totalIdle: bigint;
|
|
344
|
+
totalDebt: bigint;
|
|
345
|
+
}[] | undefined>;
|
|
346
|
+
export type IDeprecatedAutopools = Awaited<ReturnType<typeof getDeprecatedAutopools>>;
|
|
347
|
+
//# sourceMappingURL=getDeprecatedAutopools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDeprecatedAutopools.d.ts","sourceRoot":"","sources":["../../functions/getDeprecatedAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,MAAM,EACnB,4BAGG;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAXmD,CAAC;0BAClD,CAAC;;;;;wBAIJ,CAAC;2BAEc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAU0ikjD,CAAC;kBAAwC,CAAC;;;;;;;;;;;;;;;;gCAjBhjkjD,CAAC;sBAClD,CAAC;;;;;oBAIJ,CAAC;uBAEc,CAAC;;;;;;;;;;;;;gCAPoC,CAAC;sBAClD,CAAC;;;;;oBAIJ,CAAC;uBAEc,CAAC;;;;;;;;;;;;;;;;;gCAPoC,CAAC;sBAClD,CAAC;;;;;oBAIJ,CAAC;uBAEc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;gCAPoC,CAAC;sBAClD,CAAC;;;;;oBAIJ,CAAC;uBAEc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAK0D,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAC1C,CAAC"}
|
|
@@ -9,7 +9,7 @@ export interface EthAutoLPData extends UniV4PoolData {
|
|
|
9
9
|
* Uses the known Pool ID to query directly from the PoolManager.
|
|
10
10
|
* APR is fetched from Merkl API.
|
|
11
11
|
*/
|
|
12
|
-
export declare function getEthAutoLP(wagmiConfig: Config, { prices
|
|
12
|
+
export declare function getEthAutoLP(wagmiConfig: Config, { prices }?: {
|
|
13
13
|
prices?: Record<string, number>;
|
|
14
14
|
}): Promise<EthAutoLPData | undefined>;
|
|
15
15
|
//# sourceMappingURL=getEthAutoLP.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEthAutoLP.d.ts","sourceRoot":"","sources":["../../functions/getEthAutoLP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"getEthAutoLP.d.ts","sourceRoot":"","sources":["../../functions/getEthAutoLP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAoB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAUjE,MAAM,WAAW,aAAc,SAAQ,aAAa;IAClD,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,EACE,MAAM,EACP,GAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,GACL,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA+CpC"}
|
|
@@ -29,7 +29,7 @@ export interface UniV4PoolData {
|
|
|
29
29
|
sqrtPriceX96: bigint;
|
|
30
30
|
tick: number;
|
|
31
31
|
liquidity: bigint;
|
|
32
|
-
/**
|
|
32
|
+
/** Real token reserves in the pool (subgraph totalValueLocked*, with an on-chain fallback) */
|
|
33
33
|
liquidityAmounts: {
|
|
34
34
|
amount0: number;
|
|
35
35
|
amount1: number;
|
|
@@ -40,7 +40,7 @@ export interface UniV4PoolData {
|
|
|
40
40
|
tvlToken0: number;
|
|
41
41
|
/** TVL expressed in token1 units */
|
|
42
42
|
tvlToken1: number;
|
|
43
|
-
/** TVL in USD (
|
|
43
|
+
/** TVL in USD (subgraph value when available, else derived from `prices`) */
|
|
44
44
|
tvlUsd?: number;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -48,20 +48,6 @@ export interface UniV4PoolData {
|
|
|
48
48
|
* Pool ID = keccak256(abi.encode(currency0, currency1, fee, tickSpacing, hooks))
|
|
49
49
|
*/
|
|
50
50
|
export declare function computePoolId(poolKey: UniV4PoolKey): `0x${string}`;
|
|
51
|
-
/**
|
|
52
|
-
* Query Uniswap V4 pool data by PoolKey
|
|
53
|
-
*
|
|
54
|
-
* V4 Architecture Notes:
|
|
55
|
-
* - All pools are managed by a singleton PoolManager contract
|
|
56
|
-
* - Pools are identified by a PoolKey (currency0, currency1, fee, tickSpacing, hooks)
|
|
57
|
-
* - Pool ID = keccak256(abi.encode(PoolKey))
|
|
58
|
-
* - Native ETH is supported (use address(0) for currency)
|
|
59
|
-
*/
|
|
60
|
-
export declare function getUniV4Pool(wagmiConfig: Config, { poolKey, chainId, prices }: {
|
|
61
|
-
poolKey: UniV4PoolKey;
|
|
62
|
-
chainId?: number;
|
|
63
|
-
prices?: Record<string, number>;
|
|
64
|
-
}): Promise<UniV4PoolData | null>;
|
|
65
51
|
/**
|
|
66
52
|
* Create a PoolKey for a token pair
|
|
67
53
|
* Automatically sorts currencies (currency0 < currency1)
|
|
@@ -77,7 +63,17 @@ export declare function createPoolKey({ tokenA, tokenB, fee, tickSpacing, hooks
|
|
|
77
63
|
* Query Uniswap V4 pool data directly by Pool ID
|
|
78
64
|
*
|
|
79
65
|
* Use this when you already know the Pool ID (from Uniswap URL or events)
|
|
80
|
-
* and the token addresses.
|
|
66
|
+
* and the token addresses.
|
|
67
|
+
*
|
|
68
|
+
* V4 Architecture Notes:
|
|
69
|
+
* - All pools are managed by a singleton PoolManager contract
|
|
70
|
+
* - Pools are identified by a PoolKey (currency0, currency1, fee, tickSpacing, hooks)
|
|
71
|
+
* - Pool ID = keccak256(abi.encode(PoolKey))
|
|
72
|
+
* - Native ETH is supported (use address(0) for currency)
|
|
73
|
+
*
|
|
74
|
+
* Pool reserves / TVL come from the Uniswap V4 subgraph (totalValueLocked*),
|
|
75
|
+
* which is exactly what Uniswap's UI displays. Slot0 price/tick and liquidity
|
|
76
|
+
* are still read live on-chain.
|
|
81
77
|
*/
|
|
82
78
|
export declare function getUniV4PoolById(wagmiConfig: Config, { poolId, currency0, currency1, fee, chainId, prices }: {
|
|
83
79
|
poolId: `0x${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUniV4Pool.d.ts","sourceRoot":"","sources":["../../functions/getUniV4Pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAA+C,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"getUniV4Pool.d.ts","sourceRoot":"","sources":["../../functions/getUniV4Pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAA+C,MAAM,MAAM,CAAC;AAyD5E,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,gBAAgB,EAAE;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,YAAY,GAAG,KAAK,MAAM,EAAE,CAmBlE;AAmED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,MAAM,EACN,GAAG,EACH,WAAW,EACX,KAAoD,EACrD,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,YAAY,CAcf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,EACE,MAAM,EACN,SAAS,EACT,SAAS,EACT,GAAG,EACH,OAAoB,EACpB,MAAM,EACP,EAAE;IACD,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,GACA,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAmN/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserUniV4Positions.d.ts","sourceRoot":"","sources":["../../functions/getUserUniV4Positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"getUserUniV4Positions.d.ts","sourceRoot":"","sources":["../../functions/getUserUniV4Positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAO5C,OAAO,EAAiB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAyE7D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,aAAa,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAGD,eAAO,MAAM,kBAAkB,QAO9B,CAAC;AA8HF;;;;;;;;;;;GAWG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,EACnB,EACE,WAAW,EACX,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAoB,EACpB,MAAM,EACN,WAAW,EACX,aAAa,EACd,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,KAAK,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,GACA,OAAO,CAAC,wBAAwB,CAAC,CAwPnC;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,EACE,WAAW,EACX,OAAO,EACP,OAAoB,EACpB,MAAM,EACN,WAAW,EACX,aAAa,EACd,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,GACA,OAAO,CAAC,wBAAwB,CAAC,CAanC"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
export * from "./getBlobData";
|
|
2
|
-
export * from "./getEthPrice";
|
|
3
2
|
export * from "./getTokePrice";
|
|
4
3
|
export * from "./getTokenPrice";
|
|
5
4
|
export * from "./getAutopools";
|
|
5
|
+
export * from "./getDeprecatedAutopools";
|
|
6
6
|
export * from "./getAutopoolRebalances";
|
|
7
|
-
export * from "./getAutopoolsRebalances";
|
|
8
7
|
export * from "./getAutopoolHistory";
|
|
9
8
|
export * from "./getAutopoolsHistory";
|
|
10
9
|
export * from "./getAutopoolUser";
|
|
11
10
|
export * from "./getAutopoolUserActivity";
|
|
12
11
|
export * from "./getAutopoolUserHistory";
|
|
13
|
-
export * from "./getCurveLP";
|
|
14
|
-
export * from "./getSushiLP";
|
|
15
12
|
export * from "./getUniV4Pool";
|
|
13
|
+
export * from "./uniV4Subgraph";
|
|
16
14
|
export * from "./getUserUniV4Positions";
|
|
17
15
|
export * from "./getDefillamaPoolApr";
|
|
18
16
|
export * from "./getEthAutoLP";
|
|
@@ -21,36 +19,20 @@ export * from "./getChainUserActivity";
|
|
|
21
19
|
export * from "./getRewardsPayloadV1";
|
|
22
20
|
export * from "./getUserAutoEthRewards";
|
|
23
21
|
export * from "./getUserRewardsV1";
|
|
24
|
-
export * from "./getUserV1";
|
|
25
22
|
export * from "./getUserAutopoolsHistory";
|
|
26
|
-
export * from "./getUserSushiLP";
|
|
27
|
-
export * from "./getUserCurveLP";
|
|
28
|
-
export * from "./getMultipleAutopoolRebalances";
|
|
29
23
|
export * from "./getAutopoolDayData";
|
|
30
24
|
export * from "./getAutopoolsHistory";
|
|
31
25
|
export * from "./getChainAutopools";
|
|
32
|
-
export * from "./getSystemConfig";
|
|
33
26
|
export * from "./getUserAutopools";
|
|
34
27
|
export * from "./getChainUserAutopools";
|
|
35
28
|
export * from "./getUserAutopool";
|
|
36
29
|
export * from "./getUserTokenBalances";
|
|
37
|
-
export * from "./getTokenList";
|
|
38
30
|
export * from "./getTopAutopoolHolders";
|
|
39
|
-
export * from "./getAllowance";
|
|
40
31
|
export * from "./getUserActivity";
|
|
41
32
|
export * from "./getUserAutopoolsRewards";
|
|
42
33
|
export * from "./getAmountWithdrawn";
|
|
43
34
|
export * from "./getAmountDeposited";
|
|
44
35
|
export * from "./getBridgeFee";
|
|
45
|
-
export * from "./getLayerzeroStatus";
|
|
46
|
-
export * from "./getUserSToke";
|
|
47
|
-
export * from "./getSToke";
|
|
48
|
-
export * from "./getChainSToke";
|
|
49
|
-
export * from "./getChainUserSToke";
|
|
50
|
-
export * from "./getChainCycleRolloverBlockNumber";
|
|
51
|
-
export * from "./getChainSTokeRewards";
|
|
52
|
-
export * from "./getSTokeRewards";
|
|
53
|
-
export * from "./getChainUserSTokeRewards";
|
|
54
36
|
export * from "./getCurrentCycleId";
|
|
55
37
|
export * from "./getAutopilotRouter";
|
|
56
38
|
export * from "./getAddressFromSystemRegistry";
|
|
@@ -62,8 +44,6 @@ export * from "./getTokenPrices";
|
|
|
62
44
|
export * from "./getSubgraphStatus";
|
|
63
45
|
export * from "./getPoolsAndDestinations";
|
|
64
46
|
export * from "./getChainSubgraphStatus";
|
|
65
|
-
export * from "./getCycleV1";
|
|
66
|
-
export * from "./getProtocolStats";
|
|
67
47
|
export * from "./getRebalanceStats";
|
|
68
48
|
export * from "./getEthPriceAtBlock";
|
|
69
49
|
export * from "./updateRebalanceStats";
|
|
@@ -78,5 +58,5 @@ export * from "./getUserEthAutoLPRewards";
|
|
|
78
58
|
export * from "./getMerklPoolApr";
|
|
79
59
|
export * from "./getMerklCreatorApr";
|
|
80
60
|
export * from "./getSAutoApr";
|
|
81
|
-
export * from "./
|
|
61
|
+
export * from "./getSystemConfig";
|
|
82
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare const V4_SUBGRAPH_IDS: Record<number, string>;
|
|
2
|
+
/**
|
|
3
|
+
* Same-origin proxy route (mounted in the dapp) that injects the server-only
|
|
4
|
+
* GRAPH_API_KEY and forwards V4 subgraph queries to the gateway. Used on the
|
|
5
|
+
* client so the billable gateway key never ships to the browser bundle.
|
|
6
|
+
*/
|
|
7
|
+
export declare const GRAPH_V4_SUBGRAPH_PROXY_PATH = "/api/uniswap/v4-subgraph";
|
|
8
|
+
/**
|
|
9
|
+
* Build the V4 subgraph URL for a chain.
|
|
10
|
+
*
|
|
11
|
+
* - With an explicit `apiKey` (the server-side proxy route, and tests): query
|
|
12
|
+
* the decentralized gateway directly.
|
|
13
|
+
* - On the client with no key: route through the same-origin proxy, which adds
|
|
14
|
+
* the server-only key. This keeps the key out of client JS.
|
|
15
|
+
* - No key and not in a browser: fall back to the unauthenticated gateway.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getV4SubgraphUrl(chainId: number, apiKey?: string): string | null;
|
|
18
|
+
/**
|
|
19
|
+
* Pool-level TVL fields from the Uniswap V4 subgraph. These mirror exactly
|
|
20
|
+
* what Uniswap's own UI renders for a pool.
|
|
21
|
+
*
|
|
22
|
+
* - totalValueLockedToken0/1: real token reserves (sum of every position's
|
|
23
|
+
* tick-bounded amounts), NOT the full-range virtual reserves.
|
|
24
|
+
* - totalValueLockedUSD: the pool's TVL in USD.
|
|
25
|
+
* - token0Price / token1Price: token0-per-token1 and token1-per-token0.
|
|
26
|
+
*
|
|
27
|
+
* All values are high-precision decimal strings.
|
|
28
|
+
*/
|
|
29
|
+
export interface V4PoolTvl {
|
|
30
|
+
id: string;
|
|
31
|
+
totalValueLockedToken0: string;
|
|
32
|
+
totalValueLockedToken1: string;
|
|
33
|
+
totalValueLockedUSD: string;
|
|
34
|
+
token0Price: string;
|
|
35
|
+
token1Price: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const GET_V4_POOL_TVL: string;
|
|
38
|
+
/**
|
|
39
|
+
* Fetch a V4 pool's real reserves + USD TVL from the subgraph.
|
|
40
|
+
*
|
|
41
|
+
* Returns null (rather than throwing) when the subgraph is unavailable or the
|
|
42
|
+
* pool isn't indexed yet, so callers can fall back to an on-chain estimate.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getV4PoolTvlFromSubgraph(poolId: string, chainId: number, apiKey?: string): Promise<V4PoolTvl | null>;
|
|
45
|
+
//# sourceMappingURL=uniV4Subgraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniV4Subgraph.d.ts","sourceRoot":"","sources":["../../functions/uniV4Subgraph.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAElD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,6BAA6B,CAAC;AAEvE;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAef;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB,EAAE,MAAM,CAAC;IAC/B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,QAW3B,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAe3B"}
|