@1delta/margin-fetcher 5.0.45 → 5.0.47
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/index.d.ts +22 -3
- package/dist/index.js +592 -161
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -273,7 +273,19 @@ interface MulticallRetryParams {
|
|
|
273
273
|
logErrors?: boolean;
|
|
274
274
|
}
|
|
275
275
|
type MulticallRetryFunction = (params: MulticallRetryParams) => Promise<any[]>;
|
|
276
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Options a caller may ask the client factory for.
|
|
278
|
+
*
|
|
279
|
+
* `timeoutMs` is optional in both directions: a factory that ignores it still
|
|
280
|
+
* satisfies this type (TypeScript accepts a 2-arg function here), and every
|
|
281
|
+
* existing implementation does exactly that. Only the sharded multicall passes
|
|
282
|
+
* it, and only because viem's 10s default turns one stalled request into a 10s
|
|
283
|
+
* response for the whole batch.
|
|
284
|
+
*/
|
|
285
|
+
interface GetEvmClientOptions {
|
|
286
|
+
timeoutMs?: number;
|
|
287
|
+
}
|
|
288
|
+
type GetEvmClientFunction = (chain: string, rpcId?: number, options?: GetEvmClientOptions) => PublicClient;
|
|
277
289
|
|
|
278
290
|
type SerializedBigNumber = string;
|
|
279
291
|
interface LenderUserQuery {
|
|
@@ -5623,8 +5635,15 @@ interface FlashLoanLiquidityForAsset {
|
|
|
5623
5635
|
source: string;
|
|
5624
5636
|
fee: string;
|
|
5625
5637
|
availableRaw: string;
|
|
5626
|
-
|
|
5627
|
-
|
|
5638
|
+
/**
|
|
5639
|
+
* `availableRaw` scaled by `decimals`. ABSENT when the asset's decimals
|
|
5640
|
+
* could not be resolved — neither from the token list nor from an on-chain
|
|
5641
|
+
* `decimals()` — because a guessed scale silently misreports liquidity by
|
|
5642
|
+
* orders of magnitude. `availableRaw` is always exact; prefer it.
|
|
5643
|
+
*/
|
|
5644
|
+
available?: number;
|
|
5645
|
+
/** ABSENT when unresolvable — see `available`. */
|
|
5646
|
+
decimals?: number;
|
|
5628
5647
|
}
|
|
5629
5648
|
type FlashLiquiditiesOnChain = {
|
|
5630
5649
|
[asset: string]: FlashLoanLiquidityForAsset[];
|