@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.
- package/dist/functions/getAutopoolDayData.d.ts.map +1 -1
- package/dist/functions/getAutopoolHistory.d.ts.map +1 -1
- package/dist/functions/getAutopools.d.ts +3 -3
- package/dist/functions/getAutopools.d.ts.map +1 -1
- package/dist/functions/getAutopoolsRebalances.d.ts.map +1 -1
- package/dist/functions/getChainAutopools.d.ts +20 -18
- package/dist/functions/getChainAutopools.d.ts.map +1 -1
- package/dist/functions/getEthPriceAtBlock.d.ts +2 -2
- package/dist/functions/getEthPriceAtBlock.d.ts.map +1 -1
- package/dist/functions/getMultipleAutopoolRebalances.d.ts.map +1 -1
- package/dist/functions/getPoolsAndDestinations.d.ts +4 -2
- package/dist/functions/getPoolsAndDestinations.d.ts.map +1 -1
- package/dist/functions/getRebalanceStats.d.ts +8 -6
- package/dist/functions/getRebalanceStats.d.ts.map +1 -1
- package/dist/functions/getTokenPrices.d.ts +1 -1
- package/dist/functions/getTokenPrices.d.ts.map +1 -1
- package/dist/functions/getUserAutopoolBalanceChanges.d.ts.map +1 -1
- package/dist/functions/getUserAutopools.d.ts +1 -1
- package/dist/functions/getUserAutopools.d.ts.map +1 -1
- package/dist/functions/getUserSAuto.d.ts +1 -1
- package/dist/functions/getUserSAuto.d.ts.map +1 -1
- package/dist/functions/updateRebalanceStats.d.ts +2 -2
- package/dist/functions/updateRebalanceStats.d.ts.map +1 -1
- package/dist/index.js +307 -352
- package/dist/index.mjs +197 -245
- package/dist/safe.d.ts +9 -0
- package/dist/safe.d.ts.map +1 -0
- package/dist/safe.js +883 -0
- package/dist/safe.mjs +871 -0
- package/package.json +27 -16
- package/dist/functions/getBackupApr.d.ts +0 -2
- package/dist/functions/getBackupApr.d.ts.map +0 -1
- package/dist/functions/getBackupTokenPrices.d.ts +0 -6
- package/dist/functions/getBackupTokenPrices.d.ts.map +0 -1
- package/dist/functions/getPoolsAndDestinationsBackup.d.ts +0 -67
- package/dist/functions/getPoolsAndDestinationsBackup.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutopoolDayData.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolDayData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKpD,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,EAChB,UAAS,iBAAqB,EAC9B,iBAAgB,MAAiC;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getAutopoolDayData.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolDayData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKpD,eAAO,MAAM,kBAAkB,GAC7B,SAAS,OAAO,EAChB,UAAS,iBAAqB,EAC9B,iBAAgB,MAAiC;;;;;;;;;;;;;;;;;kBAgEi/8iD,CAAC;;;;IADpi9iD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutopoolHistory.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,eAAO,MAAM,kBAAkB,GAAU,UAAU,SAAS;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getAutopoolHistory.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,eAAO,MAAM,kBAAkB,GAAU,UAAU,SAAS;;;;;;;;;;;;;;;;;kBAGm0gjD,CAAC;;;;IAD/3gjD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Config } from "wagmi";
|
|
1
|
+
import { Config } from "@wagmi/core";
|
|
2
2
|
import { TokenPrices } from "./getTokenPrices";
|
|
3
|
-
export declare const getAutopools: (wagmiConfig: Config, { prices, includeTestnet
|
|
3
|
+
export declare const getAutopools: (wagmiConfig: Config, { prices, includeTestnet }: {
|
|
4
4
|
prices: TokenPrices;
|
|
5
5
|
includeTestnet?: boolean;
|
|
6
6
|
}) => Promise<{
|
|
@@ -222,7 +222,7 @@ export declare const getAutopools: (wagmiConfig: Config, { prices, includeTestne
|
|
|
222
222
|
}[];
|
|
223
223
|
chain: import("@tokemak/tokenlist").INetwork | undefined;
|
|
224
224
|
apr: {
|
|
225
|
-
base: number;
|
|
225
|
+
base: number | null;
|
|
226
226
|
extraAprs: import("./getChainAutopools").ExtraReward[];
|
|
227
227
|
combined: number;
|
|
228
228
|
hasExtraAprs: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutopools.d.ts","sourceRoot":"","sources":["../../functions/getAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"getAutopools.d.ts","sourceRoot":"","sources":["../../functions/getAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAMtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,eAAO,MAAM,YAAY,GACvB,aAAa,MAAM,EACnB,4BAGG;IACD,MAAM,EAAE,WAAW,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCADY,CAAC;0BAGZ,CAAC;;;;;wBAKI,CAAC;2BACA,CAAD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA0B4kjjD,CAAC;kBAAwC,CAAC;;;;;;;;;;;;;;;;gCAnChnjjD,CAAC;sBAGZ,CAAC;;;;;oBAKI,CAAC;uBACA,CAAD;;;;;;;;;;;;;gCATM,CAAC;sBAGZ,CAAC;;;;;oBAKI,CAAC;uBACA,CAAD;;;;;;;;;;;;;;;;;gCATM,CAAC;sBAGZ,CAAC;;;;;oBAKI,CAAC;uBACA,CAAD;;;;;;;;;;;;;;;;;;;;;;;;gCATM,CAAC;sBAGZ,CAAC;;;;;oBAKI,CAAC;uBACA,CAAD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAsBR,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAutopoolsRebalances.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolsRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,sBAAsB,GACjC,UAAS,iBAAqB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getAutopoolsRebalances.d.ts","sourceRoot":"","sources":["../../functions/getAutopoolsRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,sBAAsB,GACjC,UAAS,iBAAqB;;;;;;;;;kBAOm8pjD,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;;kBAA4G,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;IADxwsjD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Address, PublicClient } from "viem";
|
|
2
2
|
import { SupportedChainIds } from "@tokemak/config";
|
|
3
3
|
import { IProtocol, IToken } from "@tokemak/tokenlist";
|
|
4
4
|
import { TokenPrices } from "./getTokenPrices";
|
|
@@ -9,9 +9,11 @@ export type Currencies = TokenPrices & {
|
|
|
9
9
|
export type ExtraReward = IToken & {
|
|
10
10
|
apr: number;
|
|
11
11
|
};
|
|
12
|
-
export declare const getChainAutopools: (
|
|
12
|
+
export declare const getChainAutopools: (client: PublicClient, { chainId, prices, account, blockNumber }: {
|
|
13
13
|
chainId: SupportedChainIds;
|
|
14
14
|
prices: TokenPrices;
|
|
15
|
+
account?: Address;
|
|
16
|
+
blockNumber?: bigint;
|
|
15
17
|
}) => Promise<{
|
|
16
18
|
isShutdown: boolean;
|
|
17
19
|
symbol: string;
|
|
@@ -50,7 +52,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
50
52
|
underlyingTokens: {
|
|
51
53
|
valueUsd: number;
|
|
52
54
|
value: number;
|
|
53
|
-
address:
|
|
55
|
+
address: Address;
|
|
54
56
|
chainId: number;
|
|
55
57
|
decimals: number;
|
|
56
58
|
logoURI: string;
|
|
@@ -58,10 +60,10 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
58
60
|
symbol: string;
|
|
59
61
|
audits?: string;
|
|
60
62
|
extensions?: {
|
|
61
|
-
bridgeMainnetAdapter?:
|
|
63
|
+
bridgeMainnetAdapter?: Address;
|
|
62
64
|
bridgeInfo?: {
|
|
63
65
|
[chainId: number]: {
|
|
64
|
-
tokenAddress:
|
|
66
|
+
tokenAddress: Address;
|
|
65
67
|
};
|
|
66
68
|
};
|
|
67
69
|
rebasing?: boolean;
|
|
@@ -136,7 +138,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
136
138
|
createdAt: Date;
|
|
137
139
|
baseAsset: {
|
|
138
140
|
price: number;
|
|
139
|
-
address:
|
|
141
|
+
address: Address;
|
|
140
142
|
chainId: number;
|
|
141
143
|
decimals: number;
|
|
142
144
|
logoURI: string;
|
|
@@ -144,10 +146,10 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
144
146
|
symbol: string;
|
|
145
147
|
audits?: string;
|
|
146
148
|
extensions?: {
|
|
147
|
-
bridgeMainnetAdapter?:
|
|
149
|
+
bridgeMainnetAdapter?: Address;
|
|
148
150
|
bridgeInfo?: {
|
|
149
151
|
[chainId: number]: {
|
|
150
|
-
tokenAddress:
|
|
152
|
+
tokenAddress: Address;
|
|
151
153
|
};
|
|
152
154
|
};
|
|
153
155
|
rebasing?: boolean;
|
|
@@ -156,7 +158,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
156
158
|
};
|
|
157
159
|
denomination: {
|
|
158
160
|
price: number;
|
|
159
|
-
address:
|
|
161
|
+
address: Address;
|
|
160
162
|
chainId: number;
|
|
161
163
|
decimals: number;
|
|
162
164
|
logoURI: string;
|
|
@@ -164,10 +166,10 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
164
166
|
symbol: string;
|
|
165
167
|
audits?: string;
|
|
166
168
|
extensions?: {
|
|
167
|
-
bridgeMainnetAdapter?:
|
|
169
|
+
bridgeMainnetAdapter?: Address;
|
|
168
170
|
bridgeInfo?: {
|
|
169
171
|
[chainId: number]: {
|
|
170
|
-
tokenAddress:
|
|
172
|
+
tokenAddress: Address;
|
|
171
173
|
};
|
|
172
174
|
};
|
|
173
175
|
rebasing?: boolean;
|
|
@@ -180,7 +182,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
180
182
|
valueUsd: number;
|
|
181
183
|
value: number;
|
|
182
184
|
allocation: number;
|
|
183
|
-
address:
|
|
185
|
+
address: Address;
|
|
184
186
|
chainId: number;
|
|
185
187
|
decimals: number;
|
|
186
188
|
logoURI: string;
|
|
@@ -188,10 +190,10 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
188
190
|
symbol: string;
|
|
189
191
|
audits?: string;
|
|
190
192
|
extensions?: {
|
|
191
|
-
bridgeMainnetAdapter?:
|
|
193
|
+
bridgeMainnetAdapter?: Address;
|
|
192
194
|
bridgeInfo?: {
|
|
193
195
|
[chainId: number]: {
|
|
194
|
-
tokenAddress:
|
|
196
|
+
tokenAddress: Address;
|
|
195
197
|
};
|
|
196
198
|
};
|
|
197
199
|
rebasing?: boolean;
|
|
@@ -211,7 +213,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
211
213
|
valueUsd: number;
|
|
212
214
|
value: number;
|
|
213
215
|
allocation: number;
|
|
214
|
-
address:
|
|
216
|
+
address: Address;
|
|
215
217
|
chainId: number;
|
|
216
218
|
decimals: number;
|
|
217
219
|
logoURI: string;
|
|
@@ -219,10 +221,10 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
219
221
|
symbol: string;
|
|
220
222
|
audits?: string;
|
|
221
223
|
extensions?: {
|
|
222
|
-
bridgeMainnetAdapter?:
|
|
224
|
+
bridgeMainnetAdapter?: Address;
|
|
223
225
|
bridgeInfo?: {
|
|
224
226
|
[chainId: number]: {
|
|
225
|
-
tokenAddress:
|
|
227
|
+
tokenAddress: Address;
|
|
226
228
|
};
|
|
227
229
|
};
|
|
228
230
|
rebasing?: boolean;
|
|
@@ -231,7 +233,7 @@ export declare const getChainAutopools: (wagmiConfig: Config, { chainId, prices
|
|
|
231
233
|
}[];
|
|
232
234
|
chain: import("@tokemak/tokenlist").INetwork | undefined;
|
|
233
235
|
apr: {
|
|
234
|
-
base: number;
|
|
236
|
+
base: number | null;
|
|
235
237
|
extraAprs: ExtraReward[];
|
|
236
238
|
combined: number;
|
|
237
239
|
hasExtraAprs: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getChainAutopools.d.ts","sourceRoot":"","sources":["../../functions/getChainAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getChainAutopools.d.ts","sourceRoot":"","sources":["../../functions/getChainAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAqBpD,OAAO,EAIL,SAAS,EACT,MAAM,EAMP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAW/C,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,YAAY,EACpB,2CAKG;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE,WAAW,CAAC;IAGpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;mBApBU,MAAM;aACZ,MAAM;;;;;;;;;;;;;;;;;;oCA7BY,CAAC;0BACxB,CAAC;;;;;wBAID,CAAF;2BACgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAyiBighiD,CAAC;kBAAwC,CAAC;;;;;;;;;;;;;;;;gCA/iBnihiD,CAAC;sBACxB,CAAC;;;;;oBAID,CAAF;uBACgB,CAAC;;;;;;;;;;;;;gCANQ,CAAC;sBACxB,CAAC;;;;;oBAID,CAAF;uBACgB,CAAC;;;;;;;;;;;;;;;;;gCANQ,CAAC;sBACxB,CAAC;;;;;oBAID,CAAF;uBACgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;gCANQ,CAAC;sBACxB,CAAC;;;;;oBAID,CAAF;uBACgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAsBJ,MAAM;iBACZ,MAAM;;;;;;;;;;;;;;;;;;;;;uBADA,MAAM;iBACZ,MAAM;;;;;;;;;;;;;;;;;;;;;;mBADA,MAAM;aACZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;mBADA,MAAM;aACZ,MAAM;;;;;;;;;;;;;;;;IAihBZ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
-
import {
|
|
3
|
-
export declare const getEthPriceAtBlock: (
|
|
2
|
+
import type { Address, PublicClient } from "viem";
|
|
3
|
+
export declare const getEthPriceAtBlock: (client: PublicClient, blockNumber: bigint, chainId: SupportedChainIds, account?: Address) => Promise<bigint>;
|
|
4
4
|
//# sourceMappingURL=getEthPriceAtBlock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEthPriceAtBlock.d.ts","sourceRoot":"","sources":["../../functions/getEthPriceAtBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getEthPriceAtBlock.d.ts","sourceRoot":"","sources":["../../functions/getEthPriceAtBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,YAAY,EACpB,aAAa,MAAM,EACnB,SAAS,iBAAiB,EAG1B,UAAU,OAAO,oBAqBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMultipleAutopoolRebalances.d.ts","sourceRoot":"","sources":["../../functions/getMultipleAutopoolRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,6BAA6B,GACxC,KAAK,OAAO,EAAE,EACd,UAAS,iBAAqB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"getMultipleAutopoolRebalances.d.ts","sourceRoot":"","sources":["../../functions/getMultipleAutopoolRebalances.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,6BAA6B,GACxC,KAAK,OAAO,EAAE,EACd,UAAS,iBAAqB;;;;;;;;;kBASgmujD,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;;kBAA4G,CAAC;;;;;;sBAAkN,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;sBAAkG,CAAC;;;gBAAsG,CAAC;kBAA2C,CAAC;;;IADr6wjD,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
-
import {
|
|
3
|
-
export declare const getPoolsAndDestinations: (
|
|
2
|
+
import type { Address, PublicClient } from "viem";
|
|
3
|
+
export declare const getPoolsAndDestinations: (client: PublicClient, { chainId, account, blockNumber }: {
|
|
4
4
|
chainId: SupportedChainIds;
|
|
5
|
+
account?: Address;
|
|
6
|
+
blockNumber?: bigint;
|
|
5
7
|
}) => Promise<({
|
|
6
8
|
poolAddress: `0x${string}`;
|
|
7
9
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPoolsAndDestinations.d.ts","sourceRoot":"","sources":["../../functions/getPoolsAndDestinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getPoolsAndDestinations.d.ts","sourceRoot":"","sources":["../../functions/getPoolsAndDestinations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAIlD,eAAO,MAAM,uBAAuB,GAClC,QAAQ,YAAY,EACpB,mCAIG;IACD,OAAO,EAAE,iBAAiB,CAAC;IAK3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAyBF,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,OAAO,CACrD,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAC3C,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Address } from "viem";
|
|
1
|
+
import { SupportedChainIds } from "@tokemak/config";
|
|
2
|
+
import { Address, type PublicClient } from "viem";
|
|
3
|
+
export type ChainClientGetter = (chainId: SupportedChainIds) => PublicClient;
|
|
3
4
|
export declare const BATCH_SIZE = 500;
|
|
4
5
|
export type IRebalance = {
|
|
5
6
|
timestamp: number;
|
|
@@ -22,16 +23,17 @@ export type RawRebalance = {
|
|
|
22
23
|
autopool: string;
|
|
23
24
|
};
|
|
24
25
|
export declare const fetchChainRebalances: (chainId: number) => Promise<RawRebalance[]>;
|
|
25
|
-
export declare const getRebalanceValueUsd: (rebalance: RawRebalance, chainId: number,
|
|
26
|
-
export declare const processRebalance: (rebalance: RawRebalance, chainId: number,
|
|
27
|
-
export declare const processRebalancesInBatches: (rebalances: RawRebalance[], chainId: number,
|
|
26
|
+
export declare const getRebalanceValueUsd: (rebalance: RawRebalance, chainId: number, client: PublicClient, account?: Address) => Promise<number | null>;
|
|
27
|
+
export declare const processRebalance: (rebalance: RawRebalance, chainId: number, client: PublicClient, account?: Address) => Promise<IRebalance>;
|
|
28
|
+
export declare const processRebalancesInBatches: (rebalances: RawRebalance[], chainId: number, client: PublicClient, account?: Address) => Promise<IRebalance[]>;
|
|
28
29
|
export declare const calculateRebalanceStats: (rebalances: IRebalance[]) => {
|
|
29
30
|
totalRebalances: number;
|
|
30
31
|
totalRebalanceVolume: number;
|
|
31
32
|
rebalances: IRebalance[];
|
|
32
33
|
};
|
|
33
|
-
export declare const getRebalanceStats: (
|
|
34
|
+
export declare const getRebalanceStats: (getClient: ChainClientGetter, { includeTestnet, account }: {
|
|
34
35
|
includeTestnet?: boolean;
|
|
36
|
+
account?: Address;
|
|
35
37
|
}) => Promise<{
|
|
36
38
|
totalRebalances: number;
|
|
37
39
|
totalRebalanceVolume: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRebalanceStats.d.ts","sourceRoot":"","sources":["../../functions/getRebalanceStats.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRebalanceStats.d.ts","sourceRoot":"","sources":["../../functions/getRebalanceStats.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAKpD,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAC;AAKlD,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE,iBAAiB,KAAK,YAAY,CAAC;AAG7E,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,MAAM,MAAM,UAAU,GAAG;IACvB,S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AAC;CACnB;;;;EAoBF,CAAC"}
|
|
@@ -3,7 +3,7 @@ type TokenSymbol = (typeof PRICED_TOKENS)[number]["symbol"] | (typeof BASE_ASSET
|
|
|
3
3
|
export type TokenPrices = {
|
|
4
4
|
[K in TokenSymbol]: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const getTokenPrices: (
|
|
6
|
+
export declare const getTokenPrices: () => Promise<{
|
|
7
7
|
prices: TokenPrices | undefined;
|
|
8
8
|
timestamp: number | undefined;
|
|
9
9
|
isStale: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTokenPrices.d.ts","sourceRoot":"","sources":["../../functions/getTokenPrices.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getTokenPrices.d.ts","sourceRoot":"","sources":["../../functions/getTokenPrices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGhF,KAAK,WAAW,GACZ,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GACxC,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,GACtC,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,WAAW,GAAG,MAAM;CAC3B,CAAC;AAWF,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC;IAC9C,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IAChC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB,CAmDA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserAutopoolBalanceChanges.d.ts","sourceRoot":"","sources":["../../functions/getUserAutopoolBalanceChanges.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIpD,eAAO,MAAM,6BAA6B,GAAU,6BAGjD;IACD,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;;;;;
|
|
1
|
+
{"version":3,"file":"getUserAutopoolBalanceChanges.d.ts","sourceRoot":"","sources":["../../functions/getUserAutopoolBalanceChanges.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIpD,eAAO,MAAM,6BAA6B,GAAU,6BAGjD;IACD,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;;;;;kBA0B452jD,CAAC;;;;;IAD752jD,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { TokenPrices } from "./getTokenPrices";
|
|
|
4
4
|
import { Config } from "wagmi";
|
|
5
5
|
import { IAutopools } from "./getAutopools";
|
|
6
6
|
import { IUserActivity } from "./getUserActivity";
|
|
7
|
-
export declare const getUserAutopools: ({ address, includeTestnet, autopools, userActivity, prices, config
|
|
7
|
+
export declare const getUserAutopools: ({ address, includeTestnet, autopools, userActivity, prices, config }: {
|
|
8
8
|
address: Address;
|
|
9
9
|
includeTestnet?: boolean;
|
|
10
10
|
autopools: IAutopools;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserAutopools.d.ts","sourceRoot":"","sources":["../../functions/getUserAutopools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAa/B,OAAO,EAAa,MAAM,EAAiB,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE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qBAAN,MAAM;;;qBAAN,MAAM;;;;;;;;;;;;;;;;;;;;;qBAAN,MAAM;;;qBAAN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAnBjB,CAAC;sBAA6B,CAAC;;;;;oBAGvB,CAAC;uBAEtB,CAAC;;;;;;;;;;;;;;;;;;;oCALY,CAAC;0BAA6B,CAAC;;;;;wBAGvB,CAAC;2BAEtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCALY,CAAC;0BAA6B,CAAC;;;;;wBAGvB,CAAC;2BAEtB,CAAC;;;;;;;;;;;;cAyfL,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,WAAW,CACtC,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAC7C,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Address } from "viem";
|
|
2
2
|
import { Config } from "wagmi";
|
|
3
|
-
export declare const getUserSAuto: (wagmiConfig: Config, { address, autoPrice
|
|
3
|
+
export declare const getUserSAuto: (wagmiConfig: Config, { address, autoPrice }: {
|
|
4
4
|
address: Address;
|
|
5
5
|
autoPrice: number;
|
|
6
6
|
}) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserSAuto.d.ts","sourceRoot":"","sources":["../../functions/getUserSAuto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getUserSAuto.d.ts","sourceRoot":"","sources":["../../functions/getUserSAuto.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,OAAO,EAAe,MAAM,MAAM,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,YAAY,GACvB,aAAa,MAAM,EACnB,wBAGG;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;;;;;;;;;;;;;;;;;;;;;;;;;;SA+KF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Config } from "wagmi";
|
|
1
|
+
import { Config } from "@wagmi/core";
|
|
2
2
|
import { IRebalance } from "./getRebalanceStats";
|
|
3
|
-
export declare const updateRebalanceStats: (wagmiConfig: Config, { currentRebalances, includeTestnet
|
|
3
|
+
export declare const updateRebalanceStats: (wagmiConfig: Config, { currentRebalances, includeTestnet }: {
|
|
4
4
|
currentRebalances: IRebalance[];
|
|
5
5
|
includeTestnet?: boolean;
|
|
6
6
|
}) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRebalanceStats.d.ts","sourceRoot":"","sources":["../../functions/updateRebalanceStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"updateRebalanceStats.d.ts","sourceRoot":"","sources":["../../functions/updateRebalanceStats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,aAAa,CAAC;AAGtD,OAAO,EACL,UAAU,EAIX,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,oBAAoB,GAC/B,aAAa,MAAM,EACnB,uCAGG;IACD,iBAAiB,EAAE,UAAU,EAAE,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;;;;EAqCF,CAAC"}
|