@1delta/margin-fetcher 0.0.136 → 0.0.138

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 CHANGED
@@ -5,5 +5,5 @@ export { fetchGeneralYields } from './yields';
5
5
  export { fetchDefillamaData, fetchDefillamaHistData, fetchMainPrices, fetchPendlePrices, } from './prices';
6
6
  export { getLendersForChain, filterLendersByProtocol, getAavesForChain, getLenderAssets, isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isAaveV3Type, isAaveV2Type, isYLDR, isAaveV32Type, isAaveType, isMultiMarket, } from './utils';
7
7
  export { fetchFlashLiquidityForChain, attachPricesToFlashLiquidity, } from './flash-liquidity';
8
- export { type GenericCurrency, type GenericTokenList, type ParsedResponse, type ChainLinkResponse, type LenderRewardsMap, type NumberMap, type FullLenderRewardsMap, type AdditionalYields, type TokenList, type LenderUserQuery, type UserLendingPosition, type LenderUserResponse, type AaveV2UserReserveResponse, type AaveV3UserReserveResponse, type MorphoUserReserveResponse, type CompoundV3UserReserveResponse, type AaveV3Public, type LenderPublicBase, type LenderYields, type LenderTotalAmounts, type LenderConfigMap, type LenderConfigData, type ModeBase, type EModeData, type AaveV2Public, type CompoundV3Public, type UserApr, type InitUserReserveResponse, type InitPublic, type LenderData, type PoolData, } from './types';
8
+ export { type GenericCurrency, type GenericTokenList, type ParsedResponse, type ChainLinkResponse, type LenderRewardsMap, type NumberMap, type FullLenderRewardsMap, type AdditionalYields, type TokenList, type LenderUserQuery, type UserLendingPosition, type LenderUserResponse, type AaveV2UserReserveResponse, type AaveV3UserReserveResponse, type MorphoUserReserveResponse, type CompoundV3UserReserveResponse, type AaveV3Public, type LenderPublicBase, type LenderYields, type LenderTotalAmounts, type LenderConfigMap, type LenderConfigData, type ModeBase, type EModeData, type AaveV2Public, type CompoundV3Public, type UserApr, type InitUserReserveResponse, type InitPublic, type LenderData, type PoolData, type ConfigEntry, } from './types';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mCAAmC,EACnC,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,WAAW,EAChB,oBAAoB,EACpB,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,GACd,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,2BAA2B,EAC3B,kBAAkB,EAClB,mCAAmC,EACnC,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,WAAW,EAChB,oBAAoB,EACpB,WAAW,GACZ,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,YAAY,EACjB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { formatEther, BaseError, formatUnits } from './chunk-WJRQGN7X.js';
1
+ import { formatEther, BaseError, formatUnits } from './chunk-BRBKTL6U.js';
2
2
  import './chunk-BYTNVMX7.js';
3
3
  import './chunk-PR4QN5HX.js';
4
4
  import { Lender, AAVE_V3_LENDERS, AAVE_V2_LENDERS, AAVE_V32_LENDERS, COMPOUND_V2_LENDERS, VENUS_LENDERS } from '@1delta/lender-registry';
@@ -6241,7 +6241,7 @@ var IrgetterAbi = [
6241
6241
  }
6242
6242
  ];
6243
6243
 
6244
- // ../../node_modules/.pnpm/@1delta+data-sdk@0.0.10/node_modules/@1delta/data-sdk/dist/index.mjs
6244
+ // ../data-sdk/dist/index.mjs
6245
6245
  var GLOBAL_CHAIN_DATA_KEY = "__1delta_chain_registry__";
6246
6246
  globalThis[GLOBAL_CHAIN_DATA_KEY] = {};
6247
6247
  function initializeChainData({ chainsOverride }) {
@@ -6463,7 +6463,7 @@ var buildAaveV2StyleLenderReserveCall = (chainId, lender) => {
6463
6463
  }
6464
6464
  };
6465
6465
 
6466
- // ../../node_modules/.pnpm/@1delta+chain-registry@0.0.2/node_modules/@1delta/chain-registry/dist/index.mjs
6466
+ // ../chain-registry/dist/index.mjs
6467
6467
  var Chain = /* @__PURE__ */ ((Chain2) => {
6468
6468
  Chain2["ETHEREUM_MAINNET"] = "1";
6469
6469
  Chain2["OP_MAINNET"] = "10";
@@ -6630,6 +6630,7 @@ var Chain = /* @__PURE__ */ ((Chain2) => {
6630
6630
  Chain2["PHI_NETWORK_V2"] = "144";
6631
6631
  Chain2["CTEX_SCAN_BLOCKCHAIN"] = "1455";
6632
6632
  Chain2["ZKBASE_MAINNET"] = "1456";
6633
+ Chain2["MONAD_MAINNET"] = "143";
6633
6634
  Chain2["SONIC_MAINNET"] = "146";
6634
6635
  Chain2["FLAG_MAINNET"] = "147";
6635
6636
  Chain2["SHIMMEREVM"] = "148";
@@ -7850,7 +7851,7 @@ var buildCompoundV3StyleLenderReserveCall = (chainId, lender) => {
7850
7851
  return calls;
7851
7852
  };
7852
7853
 
7853
- // ../../node_modules/.pnpm/viem@2.38.6_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/errors/unit.js
7854
+ // ../../node_modules/.pnpm/viem@2.40.0_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/errors/unit.js
7854
7855
  var InvalidDecimalNumberError = class extends BaseError {
7855
7856
  constructor({ value }) {
7856
7857
  super(`Number \`${value}\` is not a valid decimal number.`, {
@@ -7859,7 +7860,7 @@ var InvalidDecimalNumberError = class extends BaseError {
7859
7860
  }
7860
7861
  };
7861
7862
 
7862
- // ../../node_modules/.pnpm/viem@2.38.6_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/utils/unit/parseUnits.js
7863
+ // ../../node_modules/.pnpm/viem@2.40.0_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/utils/unit/parseUnits.js
7863
7864
  function parseUnits(value, decimals) {
7864
7865
  if (!/^(-?)([0-9]*)\.?([0-9]*)$/.test(value))
7865
7866
  throw new InvalidDecimalNumberError({ value });
@@ -7894,7 +7895,7 @@ function parseUnits(value, decimals) {
7894
7895
  return BigInt(`${negative ? "-" : ""}${integer}${fraction}`);
7895
7896
  }
7896
7897
 
7897
- // ../../node_modules/.pnpm/viem@2.38.6_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/constants/address.js
7898
+ // ../../node_modules/.pnpm/viem@2.40.0_typescript@5.9.3_zod@3.25.76/node_modules/viem/_esm/constants/address.js
7898
7899
  var zeroAddress = "0x0000000000000000000000000000000000000000";
7899
7900
 
7900
7901
  // src/utils/parsing.ts
@@ -10557,7 +10558,8 @@ var MORPHO_LENS = {
10557
10558
  [Chain.BNB_SMART_CHAIN_MAINNET]: "0xFc98b3157f0447DfbB9FdBE7d072F7DdacA1E27C",
10558
10559
  // lista lens
10559
10560
  [Chain.UNICHAIN]: "0xA453ba397c61B0c292EA3959A858821145B2707F",
10560
- [Chain.SEI_NETWORK]: "0xcB6Eb8df68153cebF60E1872273Ef52075a5C297"
10561
+ [Chain.SEI_NETWORK]: "0xcB6Eb8df68153cebF60E1872273Ef52075a5C297",
10562
+ [Chain.MONAD_MAINNET]: "0x0bd7473CbBf81d9dD936c61117eD230d95006CA2"
10561
10563
  };
10562
10564
  var LISTA_LENS = {
10563
10565
  [Chain.BNB_SMART_CHAIN_MAINNET]: "0xFc98b3157f0447DfbB9FdBE7d072F7DdacA1E27C"
@@ -18967,12 +18969,14 @@ var convertLenderUserDataResult = (chainId, queriesRaw, rawResults, prices, pric
18967
18969
  if (isMultiMarket(query2.lender)) {
18968
18970
  Object.keys(convertedData).forEach((market) => {
18969
18971
  lenderData[market] = {
18972
+ ...lenderData[market],
18970
18973
  // @ts-ignore
18971
18974
  [query2.account.toLowerCase()]: convertedData[market]
18972
18975
  };
18973
18976
  });
18974
18977
  } else {
18975
18978
  lenderData[query2.lender] = {
18979
+ ...lenderData[query2.lender],
18976
18980
  [query2.account.toLowerCase()]: convertedData
18977
18981
  };
18978
18982
  }