@1delta/margin-fetcher 0.0.235 → 0.0.236
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 +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +308 -6
- package/dist/index.js.map +1 -1
- package/dist/lending/public-data/fetchLender.d.ts.map +1 -1
- package/dist/lending/public-data/fluid/index.d.ts +3 -0
- package/dist/lending/public-data/fluid/index.d.ts.map +1 -0
- package/dist/lending/public-data/fluid/publicCallBuild.d.ts +49 -0
- package/dist/lending/public-data/fluid/publicCallBuild.d.ts.map +1 -0
- package/dist/lending/public-data/fluid/publicCallParse.d.ts +18 -0
- package/dist/lending/public-data/fluid/publicCallParse.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/marketName.d.ts.map +1 -1
- package/dist/vaults/fluid/fetchPublic.d.ts +21 -0
- package/dist/vaults/fluid/fetchPublic.d.ts.map +1 -0
- package/dist/vaults/fluid/index.d.ts +5 -0
- package/dist/vaults/fluid/index.d.ts.map +1 -0
- package/dist/vaults/fluid/publicCallBuild.d.ts +16 -0
- package/dist/vaults/fluid/publicCallBuild.d.ts.map +1 -0
- package/dist/vaults/fluid/publicCallParse.d.ts +15 -0
- package/dist/vaults/fluid/publicCallParse.d.ts.map +1 -0
- package/dist/vaults/fluid/types.d.ts +57 -0
- package/dist/vaults/fluid/types.d.ts.map +1 -0
- package/dist/vaults/index.d.ts +2 -0
- package/dist/vaults/index.d.ts.map +1 -0
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchLender.d.ts","sourceRoot":"","sources":["../../../src/lending/public-data/fetchLender.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchLender.d.ts","sourceRoot":"","sources":["../../../src/lending/public-data/fetchLender.ts"],"names":[],"mappings":"AA+BA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAkBtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAyCtD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,MAAM,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,GAAE,gBAAqB,EAChC,eAAe,CAAC,EAAE,MAAM,EAAE,8CAmB3B;AAoKD,eAAO,MAAM,mBAAmB,GAC9B,SAAS,MAAM,EACf,SAAS,MAAM,EAAE,EACjB,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,kBAAkB,gBAAgB,EAClC,gBAAgB,sBAAsB,EACtC,YAAW,MAAM,OAAO,CAAC,gBAAgB,CAExC,KACA,OAAO,CAAC;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CA+DnC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lending/public-data/fluid/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import lodash from 'lodash';
|
|
2
|
+
declare const chunk: <T>(array: lodash.List<T> | null | undefined, size?: number) => T[][];
|
|
3
|
+
/** Safe upper bound for how many vaults fit in a single getVaultsEntireData() call
|
|
4
|
+
* before hitting typical eth_call gas limits. Adjust if needed. */
|
|
5
|
+
export declare const VAULT_CHUNK_SIZE = 25;
|
|
6
|
+
/**
|
|
7
|
+
* Builds the multicall descriptor for Fluid public data.
|
|
8
|
+
*
|
|
9
|
+
* Returns a single call to VaultResolver.getVaultsEntireData() — the
|
|
10
|
+
* resolver returns every vault on the chain in one shot.
|
|
11
|
+
*
|
|
12
|
+
* fTokens are intentionally NOT fetched: they are standalone ERC-4626 vaults
|
|
13
|
+
* on the shared Liquidity Layer (not a lending market), so they live outside
|
|
14
|
+
* this module.
|
|
15
|
+
*
|
|
16
|
+
* Resolver address is constant across chains but sourced via the SDK so a
|
|
17
|
+
* future chain with a divergent address can be added without code changes.
|
|
18
|
+
*/
|
|
19
|
+
export declare const buildFluidCall: (chainId: string, _lender?: string) => {
|
|
20
|
+
address: string;
|
|
21
|
+
name: string;
|
|
22
|
+
params: never[];
|
|
23
|
+
}[];
|
|
24
|
+
/**
|
|
25
|
+
* Variant that also pulls the Liquidity resolver overall token data.
|
|
26
|
+
* Use when you need per-token utilization / rate curves separate from
|
|
27
|
+
* what's already embedded in the vault response.
|
|
28
|
+
*/
|
|
29
|
+
export declare const buildFluidCallWithLiquidity: (chainId: string) => {
|
|
30
|
+
address: string;
|
|
31
|
+
name: string;
|
|
32
|
+
params: never[];
|
|
33
|
+
}[];
|
|
34
|
+
/**
|
|
35
|
+
* Chunked fallback for chains where the single `getVaultsEntireData()` call
|
|
36
|
+
* exceeds eth_call gas limits. Uses the cached vault address list from
|
|
37
|
+
* `fluidVaults()` to issue one `getVaultEntireData(vault)` call per address,
|
|
38
|
+
* grouped into chunks of `VAULT_CHUNK_SIZE`.
|
|
39
|
+
*
|
|
40
|
+
* The parser must be the chunked variant that knows to reassemble the
|
|
41
|
+
* per-vault results into a VaultEntireData[].
|
|
42
|
+
*/
|
|
43
|
+
export declare const buildFluidCallChunked: (chainId: string) => {
|
|
44
|
+
address: string;
|
|
45
|
+
name: string;
|
|
46
|
+
params: string[];
|
|
47
|
+
}[];
|
|
48
|
+
export { chunk };
|
|
49
|
+
//# sourceMappingURL=publicCallBuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../../src/lending/public-data/fluid/publicCallBuild.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,QAAA,MAAQ,KAAK,uEAAW,CAAA;AAExB;oEACoE;AACpE,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM;;;;GAW/D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GAAI,SAAS,MAAM;;;;GAY1D,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM;;;;GAWpD,CAAA;AAID,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AdditionalYields, GenericTokenList } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Parser for the single-call Fluid public data fetch built by `buildFluidCall`.
|
|
4
|
+
*
|
|
5
|
+
* data[0] = VaultEntireData[] (from VaultResolver.getVaultsEntireData)
|
|
6
|
+
*
|
|
7
|
+
* Emits one bucket per vault under lender key `FLUID_<vaultId>` (mirrors the
|
|
8
|
+
* Morpho Blue pattern of one lender per isolated market).
|
|
9
|
+
*
|
|
10
|
+
* fTokens are NOT handled here — they are standalone ERC-4626 vaults on the
|
|
11
|
+
* shared Liquidity Layer, not a lending market, so they are out of scope.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getFluidPublicDataConverter: (_lender: string, chainId: string, prices: {
|
|
14
|
+
[asset: string]: number;
|
|
15
|
+
}, additionalYields: AdditionalYields, tokenList?: GenericTokenList) => [(data: any[]) => {
|
|
16
|
+
[lender: string]: any;
|
|
17
|
+
} | undefined, number];
|
|
18
|
+
//# sourceMappingURL=publicCallParse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/public-data/fluid/publicCallParse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAyBnE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,GACtC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,kBAAkB,gBAAgB,EAClC,YAAW,gBAAqB,KAC/B,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG,SAAS,EAAE,MAAM,CA+BjE,CAAA"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createMarketUid } from './marketUid';
|
|
2
2
|
export { lenderShortName } from './marketName';
|
|
3
|
-
export { isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isLista, isAaveV3Type, isAaveV2Type, isYLDR, isAaveV32Type, isAaveType, isCompoundV2Type, isVenusType, isSumerType, isTectonicType, isBenqiType, isMultiMarket, isEulerType, isAaveV4Type, isSiloV2Type, isSiloV3Type, } from '@1delta/lender-registry';
|
|
3
|
+
export { isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isLista, isAaveV3Type, isAaveV2Type, isYLDR, isAaveV32Type, isAaveType, isCompoundV2Type, isVenusType, isSumerType, isTectonicType, isBenqiType, isMultiMarket, isEulerType, isAaveV4Type, isSiloV2Type, isSiloV3Type, isFluid, } from '@1delta/lender-registry';
|
|
4
4
|
export declare const ENABLED_EULER_V2_CHAINS: string[];
|
|
5
5
|
export declare const getLendersForChain: (c: string) => string[];
|
|
6
6
|
/** Filter lenders by protocol list */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,OAAO,GACR,MAAM,yBAAyB,CAAA;AAgChC,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAgB3C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,aAmE3C,CAAA;AAED,sCAAsC;AACtC,eAAO,MAAM,uBAAuB,GAClC,YAAY,MAAM,EAAE,EACpB,eAAe,MAAM,EAAE,KACtB,MAAM,EAeR,CAAA;AAED,mCAAmC;AACnC,eAAO,MAAM,gBAAgB;;CAS5B,CAAA;AAED,eAAO,MAAM,eAAe,GAC1B,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,EACpC,kBAAiB,MAAuB,KACvC,MAAM,EAOR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketName.d.ts","sourceRoot":"","sources":["../../src/utils/marketName.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"marketName.d.ts","sourceRoot":"","sources":["../../src/utils/marketName.ts"],"names":[],"mappings":"AA4CA,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MulticallRetryFunction, GenericTokenList } from '../../types';
|
|
2
|
+
import { FluidFTokens } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* One-shot fetcher for all Fluid fTokens on a chain.
|
|
5
|
+
*
|
|
6
|
+
* Wraps build + multicall + parse so callers that just want "the fTokens
|
|
7
|
+
* snapshot" don't need to hand-wire the pipeline.
|
|
8
|
+
*
|
|
9
|
+
* @param chainId target chain
|
|
10
|
+
* @param multicallRetry provider-level multicall executor (same one used
|
|
11
|
+
* by `getLenderPublicData`)
|
|
12
|
+
* @param prices optional price map keyed by oracle key / underlying
|
|
13
|
+
* @param tokenList optional token list for hydrating `asset` metadata
|
|
14
|
+
*
|
|
15
|
+
* @returns `FluidFTokens` — map keyed by lowercased underlying address, or
|
|
16
|
+
* an empty object if the chain has no resolver configured.
|
|
17
|
+
*/
|
|
18
|
+
export declare const fetchFluidFTokens: (chainId: string, multicallRetry: MulticallRetryFunction, prices?: {
|
|
19
|
+
[asset: string]: number;
|
|
20
|
+
}, tokenList?: GenericTokenList) => Promise<FluidFTokens>;
|
|
21
|
+
//# sourceMappingURL=fetchPublic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPublic.d.ts","sourceRoot":"","sources":["../../../src/vaults/fluid/fetchPublic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGtE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAEtC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,MAAM,EACf,gBAAgB,sBAAsB,EACtC,SAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,YAAW,gBAAqB,KAC/B,OAAO,CAAC,YAAY,CAYtB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { buildFluidFTokensCall } from './publicCallBuild';
|
|
2
|
+
export { getFluidFTokensConverter } from './publicCallParse';
|
|
3
|
+
export { fetchFluidFTokens } from './fetchPublic';
|
|
4
|
+
export type { FluidFToken, FluidFTokens } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vaults/fluid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the multicall descriptor for Fluid fToken public data.
|
|
3
|
+
*
|
|
4
|
+
* Returns a single call to `LendingResolver.getFTokensEntireData()` — the
|
|
5
|
+
* resolver hands back every fToken on the chain in one shot. No per-fToken
|
|
6
|
+
* enumeration needed.
|
|
7
|
+
*
|
|
8
|
+
* Resolver address is constant across chains but sourced via the SDK so
|
|
9
|
+
* future chain-specific deployments can diverge without code changes.
|
|
10
|
+
*/
|
|
11
|
+
export declare const buildFluidFTokensCall: (chainId: string) => {
|
|
12
|
+
address: string;
|
|
13
|
+
name: string;
|
|
14
|
+
params: never[];
|
|
15
|
+
}[];
|
|
16
|
+
//# sourceMappingURL=publicCallBuild.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../src/vaults/fluid/publicCallBuild.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM;;;;GAWpD,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GenericTokenList } from '../../types';
|
|
2
|
+
import { FluidFTokens } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Parser for the single-call fToken fetch built by `buildFluidFTokensCall`.
|
|
5
|
+
*
|
|
6
|
+
* data[0] = FTokenDetails[] (from LendingResolver.getFTokensEntireData)
|
|
7
|
+
*
|
|
8
|
+
* Returns a map keyed by lowercased underlying address. Native-ETH fTokens
|
|
9
|
+
* key under `zeroAddress` to match the convention in `calldata-sdk`
|
|
10
|
+
* (`isNativeAddress` / `normalizeNativeAddress`).
|
|
11
|
+
*/
|
|
12
|
+
export declare const getFluidFTokensConverter: (chainId: string, prices?: {
|
|
13
|
+
[asset: string]: number;
|
|
14
|
+
}, tokenList?: GenericTokenList) => [(data: any[]) => FluidFTokens | undefined, number];
|
|
15
|
+
//# sourceMappingURL=publicCallParse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicCallParse.d.ts","sourceRoot":"","sources":["../../../src/vaults/fluid/publicCallParse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAe,YAAY,EAAE,MAAM,SAAS,CAAA;AAgBnD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,GACnC,SAAS,MAAM,EACf,SAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAO,EACxC,YAAW,gBAAqB,KAC/B,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,YAAY,GAAG,SAAS,EAAE,MAAM,CAWpD,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { GenericCurrency } from '../../types/general';
|
|
2
|
+
/**
|
|
3
|
+
* Parsed Fluid fToken entry.
|
|
4
|
+
*
|
|
5
|
+
* fTokens are standalone ERC-4626 yield vaults on Fluid's shared Liquidity
|
|
6
|
+
* Layer. They are NOT a lending market (no collateral, no borrow, no
|
|
7
|
+
* liquidation) — just a deposit → earn shape. Modeled separately from
|
|
8
|
+
* Fluid borrow vaults (`src/lending/public-data/fluid/`).
|
|
9
|
+
*/
|
|
10
|
+
export interface FluidFToken {
|
|
11
|
+
/** fToken (share) contract address, case-preserved from the resolver. */
|
|
12
|
+
address: string;
|
|
13
|
+
/** Lowercased underlying ERC20 address. Fluid's fETH has WETH as its
|
|
14
|
+
* underlying — the EEE sentinel is not used for fTokens in practice.
|
|
15
|
+
* Still normalized to `zeroAddress` if ever returned. */
|
|
16
|
+
underlying: string;
|
|
17
|
+
/** Share-token symbol, e.g. `fUSDC`, `fETH`. */
|
|
18
|
+
symbol: string;
|
|
19
|
+
/** Share-token name, e.g. `Fluid USDC`. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Share and underlying decimals (same — ERC-4626 keeps them aligned). */
|
|
22
|
+
decimals: number;
|
|
23
|
+
/** Total underlying assets held by the vault, raw integer (wei-like) as string. */
|
|
24
|
+
totalAssets: string;
|
|
25
|
+
/** Total shares minted, raw integer as string. */
|
|
26
|
+
totalSupply: string;
|
|
27
|
+
/** `convertToShares(1e<decimals>)` — raw, 1 underlying → shares ratio. */
|
|
28
|
+
convertToShares: string;
|
|
29
|
+
/** `convertToAssets(1e<decimals>)` — raw, 1 share → underlying ratio. */
|
|
30
|
+
convertToAssets: string;
|
|
31
|
+
/** Base supply APR in percent (e.g. `2.83` = 2.83 %). From Liquidity Layer utilization. */
|
|
32
|
+
supplyRate: number;
|
|
33
|
+
/** Extra rewards APR in percent, on top of `supplyRate`. */
|
|
34
|
+
rewardsRate: number;
|
|
35
|
+
/** Sum of `supplyRate + rewardsRate` — what a depositor actually earns. */
|
|
36
|
+
depositRate: number;
|
|
37
|
+
/** Capability flag — the fToken supports a `depositNative()` wrapper that
|
|
38
|
+
* accepts raw ETH. Doesn't imply `underlying === zeroAddress`; for fETH
|
|
39
|
+
* the underlying is WETH and this flag is true. */
|
|
40
|
+
isNativeUnderlying: boolean;
|
|
41
|
+
/** True if the fToken supports EIP-2612 permit on deposits. */
|
|
42
|
+
eip2612Deposits: boolean;
|
|
43
|
+
/** Hydrated asset metadata from the provided token list, if any. */
|
|
44
|
+
asset?: GenericCurrency;
|
|
45
|
+
/** USD price of one underlying unit, if prices were supplied. */
|
|
46
|
+
priceUsd?: number;
|
|
47
|
+
/** Human-formatted total assets (`totalAssets / 10^decimals`). */
|
|
48
|
+
totalAssetsFormatted: number;
|
|
49
|
+
/** Human-formatted total assets in USD (`totalAssetsFormatted * priceUsd`). */
|
|
50
|
+
totalAssetsUsd: number;
|
|
51
|
+
}
|
|
52
|
+
/** Full parsed payload: per-underlying map for easy UI lookup. */
|
|
53
|
+
export type FluidFTokens = {
|
|
54
|
+
/** Keyed by lowercased underlying address (`zeroAddress` for native ETH). */
|
|
55
|
+
[underlying: string]: FluidFToken;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vaults/fluid/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAA;IACf;;8DAE0D;IAC1D,UAAU,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAA;IACd,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAA;IAEhB,mFAAmF;IACnF,WAAW,EAAE,MAAM,CAAA;IACnB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,CAAA;IACvB,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAA;IAEvB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAA;IAClB,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAA;IACnB,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAA;IAEnB;;wDAEoD;IACpD,kBAAkB,EAAE,OAAO,CAAA;IAC3B,+DAA+D;IAC/D,eAAe,EAAE,OAAO,CAAA;IAExB,oEAAoE;IACpE,KAAK,CAAC,EAAE,eAAe,CAAA;IACvB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kEAAkE;IAClE,oBAAoB,EAAE,MAAM,CAAA;IAC5B,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,kEAAkE;AAClE,MAAM,MAAM,YAAY,GAAG;IACzB,6EAA6E;IAC7E,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAA;CAClC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vaults/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1delta/margin-fetcher",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.236",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
21
|
+
"test": "vitest"
|
|
22
|
+
},
|
|
19
23
|
"keywords": [],
|
|
20
24
|
"author": "",
|
|
21
25
|
"license": "ISC",
|
|
22
26
|
"dependencies": {
|
|
27
|
+
"@1delta/abis": "workspace:*",
|
|
28
|
+
"@1delta/calldata-sdk": "workspace:*",
|
|
29
|
+
"@1delta/dex-registry": "workspace:*",
|
|
30
|
+
"@1delta/lender-registry": "workspace:*",
|
|
31
|
+
"@1delta/providers": "workspace:*",
|
|
23
32
|
"async-retry": "^1.3.3",
|
|
24
|
-
"lodash": "^4.17.23"
|
|
25
|
-
"@1delta/dex-registry": "0.0.98",
|
|
26
|
-
"@1delta/lender-registry": "0.0.23",
|
|
27
|
-
"@1delta/calldata-sdk": "0.0.142",
|
|
28
|
-
"@1delta/providers": "0.0.55",
|
|
29
|
-
"@1delta/abis": "0.0.12"
|
|
33
|
+
"lodash": "^4.17.23"
|
|
30
34
|
},
|
|
31
35
|
"devDependencies": {
|
|
36
|
+
"@1delta/initializer-sdk": "workspace:*",
|
|
32
37
|
"@types/async-retry": "^1.4.9",
|
|
33
38
|
"@types/lodash": "^4.17.23",
|
|
34
39
|
"tsup": "^8.5.1",
|
|
35
|
-
"typescript": "^5.9.3"
|
|
36
|
-
"@1delta/initializer-sdk": "0.0.11"
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "tsup src/index.ts --format esm --clean && tsc -p tsconfig.dts.json",
|
|
40
|
-
"test": "vitest"
|
|
40
|
+
"typescript": "^5.9.3"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|