@gearbox-protocol/sdk 18.4.1 → 18.5.0-next.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.
Files changed (74) hide show
  1. package/dist/cjs/onchain/abi/index.js +2 -0
  2. package/dist/cjs/onchain/abi/oracles.js +617 -0
  3. package/dist/cjs/onchain/index.js +4 -0
  4. package/dist/cjs/onchain/market/index.js +4 -0
  5. package/dist/cjs/onchain/market/pricefeeds/PriceFeedRegistry.js +4 -0
  6. package/dist/cjs/onchain/market/pricefeeds/feeds/FixedRateWindowPriceFeed.js +15 -0
  7. package/dist/cjs/onchain/market/pricefeeds/feeds/MedianPriceFeed.js +15 -0
  8. package/dist/cjs/onchain/market/pricefeeds/feeds/index.js +4 -0
  9. package/dist/cjs/onchain/market/pricefeeds/index.js +4 -0
  10. package/dist/cjs/permissionless/bindings/price-feed-store.js +1 -0
  11. package/dist/cjs/permissionless/bindings/pricefeeds/fix-rate-window.js +53 -0
  12. package/dist/cjs/permissionless/bindings/pricefeeds/index.js +7 -3
  13. package/dist/cjs/permissionless/bindings/pricefeeds/median.js +22 -0
  14. package/dist/esm/onchain/abi/index.js +1 -1
  15. package/dist/esm/onchain/abi/oracles.js +616 -1
  16. package/dist/esm/onchain/index.js +3 -1
  17. package/dist/esm/onchain/market/index.js +3 -1
  18. package/dist/esm/onchain/market/pricefeeds/PriceFeedRegistry.js +4 -0
  19. package/dist/esm/onchain/market/pricefeeds/feeds/FixedRateWindowPriceFeed.js +14 -0
  20. package/dist/esm/onchain/market/pricefeeds/feeds/MedianPriceFeed.js +14 -0
  21. package/dist/esm/onchain/market/pricefeeds/feeds/index.js +3 -1
  22. package/dist/esm/onchain/market/pricefeeds/index.js +3 -1
  23. package/dist/esm/permissionless/bindings/price-feed-store.js +1 -0
  24. package/dist/esm/permissionless/bindings/pricefeeds/fix-rate-window.js +52 -0
  25. package/dist/esm/permissionless/bindings/pricefeeds/index.js +7 -3
  26. package/dist/esm/permissionless/bindings/pricefeeds/median.js +21 -0
  27. package/dist/types/onchain/abi/index.d.mts +2 -2
  28. package/dist/types/onchain/abi/oracles.d.mts +536 -0
  29. package/dist/types/onchain/index.d.mts +3 -1
  30. package/dist/types/onchain/market/index.d.mts +3 -1
  31. package/dist/types/onchain/market/pricefeeds/feeds/FixedRateWindowPriceFeed.d.mts +9 -0
  32. package/dist/types/onchain/market/pricefeeds/feeds/MedianPriceFeed.d.mts +9 -0
  33. package/dist/types/onchain/market/pricefeeds/feeds/index.d.mts +3 -1
  34. package/dist/types/onchain/market/pricefeeds/index.d.mts +3 -1
  35. package/dist/types/onchain/market/pricefeeds/types.d.mts +1 -1
  36. package/dist/types/permissionless/bindings/pricefeeds/fix-rate-window.d.mts +3 -0
  37. package/dist/types/permissionless/bindings/pricefeeds/median.d.mts +3 -0
  38. package/dist/types/permissionless/core/pricefeed-builder.d.mts +2 -0
  39. package/package.json +1 -6
  40. package/dist/cjs/testnets/TestnetsAPI.js +0 -178
  41. package/dist/cjs/testnets/errors/TestnetNotFoundError.js +0 -14
  42. package/dist/cjs/testnets/errors/TestnetRequestFailedError.js +0 -23
  43. package/dist/cjs/testnets/errors/TestnetStatusError.js +0 -18
  44. package/dist/cjs/testnets/errors/TestnetValidationError.js +0 -23
  45. package/dist/cjs/testnets/errors/TestnetWaitTimeoutError.js +0 -29
  46. package/dist/cjs/testnets/errors/TestnetsError.js +0 -33
  47. package/dist/cjs/testnets/errors/index.js +0 -13
  48. package/dist/cjs/testnets/index.js +0 -32
  49. package/dist/cjs/testnets/package.json +0 -1
  50. package/dist/cjs/testnets/schemas.js +0 -241
  51. package/dist/cjs/testnets/types.js +0 -1
  52. package/dist/esm/testnets/TestnetsAPI.js +0 -177
  53. package/dist/esm/testnets/errors/TestnetNotFoundError.js +0 -13
  54. package/dist/esm/testnets/errors/TestnetRequestFailedError.js +0 -22
  55. package/dist/esm/testnets/errors/TestnetStatusError.js +0 -17
  56. package/dist/esm/testnets/errors/TestnetValidationError.js +0 -22
  57. package/dist/esm/testnets/errors/TestnetWaitTimeoutError.js +0 -28
  58. package/dist/esm/testnets/errors/TestnetsError.js +0 -32
  59. package/dist/esm/testnets/errors/index.js +0 -7
  60. package/dist/esm/testnets/index.js +0 -11
  61. package/dist/esm/testnets/package.json +0 -1
  62. package/dist/esm/testnets/schemas.js +0 -227
  63. package/dist/esm/testnets/types.js +0 -1
  64. package/dist/types/testnets/TestnetsAPI.d.mts +0 -106
  65. package/dist/types/testnets/errors/TestnetNotFoundError.d.mts +0 -10
  66. package/dist/types/testnets/errors/TestnetRequestFailedError.d.mts +0 -9
  67. package/dist/types/testnets/errors/TestnetStatusError.d.mts +0 -13
  68. package/dist/types/testnets/errors/TestnetValidationError.d.mts +0 -14
  69. package/dist/types/testnets/errors/TestnetWaitTimeoutError.d.mts +0 -19
  70. package/dist/types/testnets/errors/TestnetsError.d.mts +0 -45
  71. package/dist/types/testnets/errors/index.d.mts +0 -7
  72. package/dist/types/testnets/index.d.mts +0 -17
  73. package/dist/types/testnets/schemas.d.mts +0 -552
  74. package/dist/types/testnets/types.d.mts +0 -715
@@ -121,6 +121,8 @@ import { CurveStablePriceFeedContract } from "./pricefeeds/feeds/CurveStablePric
121
121
  import { CurveUSDPriceFeedContract } from "./pricefeeds/feeds/CurveUSDPriceFeed.js";
122
122
  import { Erc4626PriceFeedContract } from "./pricefeeds/feeds/Erc4626PriceFeed.js";
123
123
  import { ExternalPriceFeedContract } from "./pricefeeds/feeds/ExternalPriceFeed.js";
124
+ import { FixedRateWindowPriceFeedContract } from "./pricefeeds/feeds/FixedRateWindowPriceFeed.js";
125
+ import { MedianPriceFeedContract } from "./pricefeeds/feeds/MedianPriceFeed.js";
124
126
  import { MellowLRTPriceFeedContract } from "./pricefeeds/feeds/MellowLRTPriceFeed.js";
125
127
  import { PendleTWAPPTPriceFeed } from "./pricefeeds/feeds/PendleTWAPPTPriceFeed.js";
126
128
  import { PythPriceFeed } from "./pricefeeds/feeds/PythPriceFeed.js";
@@ -158,4 +160,4 @@ import { RWARegistry, RWA_COMPRESSOR_ADDRESS } from "./rwa/RWARegistry.js";
158
160
  import { isRWAFactory } from "./rwa/types.js";
159
161
  import "./types.js";
160
162
  import "./zapper/index.js";
161
- export { AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterType, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CamelotV3AdapterContract, CompositePriceFeedContract, ConstantPriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegistry, PriceOracleV310Contract, PriceUpdatesCache, PythPriceFeed, RWARegistry, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
163
+ export { AbstractAdapterContract, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterType, BalancerStablePriceFeedContract, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CamelotV3AdapterContract, CompositePriceFeedContract, ConstantPriceFeedContract, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FixedRateWindowPriceFeedContract, FluidDexAdapterContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MedianPriceFeedContract, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegistry, PriceOracleV310Contract, PriceUpdatesCache, PythPriceFeed, RWARegistry, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SecuritizeDegenNFT, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHPriceFeedContract, WstETHV1AdapterContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
@@ -14,6 +14,8 @@ import { CurveStablePriceFeedContract } from "./feeds/CurveStablePriceFeed.js";
14
14
  import { CurveUSDPriceFeedContract } from "./feeds/CurveUSDPriceFeed.js";
15
15
  import { Erc4626PriceFeedContract } from "./feeds/Erc4626PriceFeed.js";
16
16
  import { ExternalPriceFeedContract } from "./feeds/ExternalPriceFeed.js";
17
+ import { FixedRateWindowPriceFeedContract } from "./feeds/FixedRateWindowPriceFeed.js";
18
+ import { MedianPriceFeedContract } from "./feeds/MedianPriceFeed.js";
17
19
  import { MellowLRTPriceFeedContract } from "./feeds/MellowLRTPriceFeed.js";
18
20
  import { PendleTWAPPTPriceFeed } from "./feeds/PendleTWAPPTPriceFeed.js";
19
21
  import { PythPriceFeed } from "./feeds/PythPriceFeed.js";
@@ -106,6 +108,8 @@ var PriceFeedRegistry = class extends SDKConstruct {
106
108
  case "PRICE_FEED::CURVE_USD": return new CurveUSDPriceFeedContract(this.sdk, data);
107
109
  case "PRICE_FEED::ERC4626": return new Erc4626PriceFeedContract(this.sdk, data);
108
110
  case "PRICE_FEED::EXTERNAL": return new ExternalPriceFeedContract(this.sdk, data);
111
+ case "PRICE_FEED::FIXED_RATE_WINDOW": return new FixedRateWindowPriceFeedContract(this.sdk, data);
112
+ case "PRICE_FEED::MEDIAN": return new MedianPriceFeedContract(this.sdk, data);
109
113
  case "PRICE_FEED::MELLOW_LRT": return new MellowLRTPriceFeedContract(this.sdk, data);
110
114
  case "PRICE_FEED::PENDLE_PT_TWAP": return new PendleTWAPPTPriceFeed(this.sdk, data);
111
115
  case "PRICE_FEED::PYTH": return new PythPriceFeed(this.sdk, data);
@@ -0,0 +1,14 @@
1
+ import "../../../abi/index.js";
2
+ import { fixedRateWindowPriceFeedAbi } from "../../../abi/oracles.js";
3
+ import { AbstractPriceFeedContract } from "../AbstractPriceFeed.js";
4
+ // src/onchain/market/pricefeeds/feeds/FixedRateWindowPriceFeed.ts
5
+ var FixedRateWindowPriceFeedContract = class extends AbstractPriceFeedContract {
6
+ constructor(options, args) {
7
+ super(options, {
8
+ ...args,
9
+ name: "FixedRateWindowPriceFeed",
10
+ abi: fixedRateWindowPriceFeedAbi
11
+ });
12
+ }
13
+ };
14
+ export { FixedRateWindowPriceFeedContract };
@@ -0,0 +1,14 @@
1
+ import "../../../abi/index.js";
2
+ import { medianPriceFeedAbi } from "../../../abi/oracles.js";
3
+ import { AbstractPriceFeedContract } from "../AbstractPriceFeed.js";
4
+ // src/onchain/market/pricefeeds/feeds/MedianPriceFeed.ts
5
+ var MedianPriceFeedContract = class extends AbstractPriceFeedContract {
6
+ constructor(options, args) {
7
+ super(options, {
8
+ ...args,
9
+ name: "MedianPriceFeed",
10
+ abi: medianPriceFeedAbi
11
+ });
12
+ }
13
+ };
14
+ export { MedianPriceFeedContract };
@@ -8,6 +8,8 @@ import { CurveStablePriceFeedContract } from "./CurveStablePriceFeed.js";
8
8
  import { CurveUSDPriceFeedContract } from "./CurveUSDPriceFeed.js";
9
9
  import { Erc4626PriceFeedContract } from "./Erc4626PriceFeed.js";
10
10
  import { ExternalPriceFeedContract } from "./ExternalPriceFeed.js";
11
+ import { FixedRateWindowPriceFeedContract } from "./FixedRateWindowPriceFeed.js";
12
+ import { MedianPriceFeedContract } from "./MedianPriceFeed.js";
11
13
  import { MellowLRTPriceFeedContract } from "./MellowLRTPriceFeed.js";
12
14
  import { PendleTWAPPTPriceFeed } from "./PendleTWAPPTPriceFeed.js";
13
15
  import { PythPriceFeed } from "./PythPriceFeed.js";
@@ -15,4 +17,4 @@ import { RedstonePriceFeedContract } from "./RedstonePriceFeed.js";
15
17
  import { WstETHPriceFeedContract } from "./WstETHPriceFeed.js";
16
18
  import { YearnPriceFeedContract } from "./YearnPriceFeed.js";
17
19
  import { ZeroPriceFeedContract } from "./ZeroPriceFeed.js";
18
- export { BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, ConstantPriceFeedContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, MellowLRTPriceFeedContract, PendleTWAPPTPriceFeed, PythPriceFeed, RedstonePriceFeedContract, WstETHPriceFeedContract, YearnPriceFeedContract, ZeroPriceFeedContract };
20
+ export { BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, ConstantPriceFeedContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FixedRateWindowPriceFeedContract, MedianPriceFeedContract, MellowLRTPriceFeedContract, PendleTWAPPTPriceFeed, PythPriceFeed, RedstonePriceFeedContract, WstETHPriceFeedContract, YearnPriceFeedContract, ZeroPriceFeedContract };
@@ -11,6 +11,8 @@ import { CurveStablePriceFeedContract } from "./feeds/CurveStablePriceFeed.js";
11
11
  import { CurveUSDPriceFeedContract } from "./feeds/CurveUSDPriceFeed.js";
12
12
  import { Erc4626PriceFeedContract } from "./feeds/Erc4626PriceFeed.js";
13
13
  import { ExternalPriceFeedContract } from "./feeds/ExternalPriceFeed.js";
14
+ import { FixedRateWindowPriceFeedContract } from "./feeds/FixedRateWindowPriceFeed.js";
15
+ import { MedianPriceFeedContract } from "./feeds/MedianPriceFeed.js";
14
16
  import { MellowLRTPriceFeedContract } from "./feeds/MellowLRTPriceFeed.js";
15
17
  import { PendleTWAPPTPriceFeed } from "./feeds/PendleTWAPPTPriceFeed.js";
16
18
  import { PythPriceFeed } from "./feeds/PythPriceFeed.js";
@@ -27,4 +29,4 @@ import { PriceUpdatesCache } from "./updates/PriceUpdatesCache.js";
27
29
  import { updatableDependencies } from "./updates/updatableDependencies.js";
28
30
  import { UpdatablePriceFeedRegistry } from "./updates/UpdatablePriceFeedRegistry.js";
29
31
  import "./updates/index.js";
30
- export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, ConstantPriceFeedContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, MellowLRTPriceFeedContract, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PriceFeedRef, PriceFeedRegistry, PriceUpdatesCache, PythPriceFeed, RedstonePriceFeedContract, UpdatablePriceFeedRegistry, WstETHPriceFeedContract, YearnPriceFeedContract, ZeroPriceFeedContract, getRawPriceUpdates, isLPPriceFeed, isUpdatablePriceFeed, updatableDependencies };
32
+ export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, ConstantPriceFeedContract, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, FixedRateWindowPriceFeedContract, MedianPriceFeedContract, MellowLRTPriceFeedContract, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PriceFeedRef, PriceFeedRegistry, PriceUpdatesCache, PythPriceFeed, RedstonePriceFeedContract, UpdatablePriceFeedRegistry, WstETHPriceFeedContract, YearnPriceFeedContract, ZeroPriceFeedContract, getRawPriceUpdates, isLPPriceFeed, isUpdatablePriceFeed, updatableDependencies };
@@ -156,6 +156,7 @@ var PriceFeedStoreContract = class extends BaseContract {
156
156
  types.push({ type: param.type.type });
157
157
  values.push(BigInt(data[param.label]));
158
158
  break;
159
+ case "uint16":
159
160
  case "uint8":
160
161
  types.push({ type: param.type.type });
161
162
  values.push(Number(data[param.label]));
@@ -0,0 +1,52 @@
1
+ import { parseAbi } from "viem";
2
+ // src/permissionless/bindings/pricefeeds/fix-rate-window.ts
3
+ const fixRateWindowPriceFeed = {
4
+ contractType: "PRICE_FEED::FIXED_RATE_WINDOW",
5
+ version: 310,
6
+ constructorParams: [
7
+ {
8
+ label: "priceStore",
9
+ type: { type: "owner" }
10
+ },
11
+ {
12
+ label: "underlyingPriceFeed",
13
+ type: { type: "pricefeedParamsFlattened" }
14
+ },
15
+ {
16
+ label: "initial growth rate",
17
+ type: { type: "uint16" },
18
+ defaultValue: "0"
19
+ },
20
+ {
21
+ label: "initial lowerbound",
22
+ type: {
23
+ type: "lowerbound",
24
+ getter: async (values, publicClient) => {
25
+ const { underlyingPriceFeed } = values;
26
+ const { address } = underlyingPriceFeed;
27
+ const [, answer] = await publicClient.readContract({
28
+ abi: parseAbi(["function latestRoundData() external view returns (uint80,int256,uint256,uint256,uint80)"]),
29
+ address,
30
+ functionName: "latestRoundData"
31
+ });
32
+ return answer;
33
+ }
34
+ }
35
+ },
36
+ {
37
+ label: "max growth rate",
38
+ type: { type: "uint16" },
39
+ defaultValue: "10000"
40
+ },
41
+ {
42
+ label: "descriptionTicker",
43
+ type: {
44
+ type: "string",
45
+ maxLen: 32
46
+ },
47
+ displayOrder: 2
48
+ }
49
+ ],
50
+ stalenessPeriod: false
51
+ };
52
+ export { fixRateWindowPriceFeed };
@@ -9,7 +9,9 @@ import { curveTwapPriceFeed } from "./curve-twap.js";
9
9
  import { curveUsdPriceFeed } from "./curve-usd.js";
10
10
  import { erc4626PriceFeed } from "./erc4626.js";
11
11
  import { externalPriceFeed } from "./external.js";
12
+ import { fixRateWindowPriceFeed } from "./fix-rate-window.js";
12
13
  import { kodiakPriceFeed } from "./kodiak.js";
14
+ import { medianPriceFeed } from "./median.js";
13
15
  import { mellowLrtPriceFeed } from "./mellow-lrt.js";
14
16
  import { pendlePtTwapPriceFeed } from "./pendle-pt-twap.js";
15
17
  import { pythPriceFeed } from "./pyth.js";
@@ -21,8 +23,8 @@ const priceFeedSetupParams = [
21
23
  compositePriceFeed,
22
24
  boundedPriceFeed,
23
25
  constantPriceFeed,
24
- redstonePriceFeed,
25
- pythPriceFeed,
26
+ medianPriceFeed,
27
+ fixRateWindowPriceFeed,
26
28
  erc4626PriceFeed,
27
29
  curveCryptoPriceFeed,
28
30
  curveStablePriceFeed,
@@ -31,8 +33,10 @@ const priceFeedSetupParams = [
31
33
  mellowLrtPriceFeed,
32
34
  pendlePtTwapPriceFeed,
33
35
  kodiakPriceFeed,
36
+ wstethPriceFeed,
34
37
  balancerStablePriceFeed,
35
38
  balancerWeightedPriceFeed,
36
- wstethPriceFeed
39
+ redstonePriceFeed,
40
+ pythPriceFeed
37
41
  ];
38
42
  export { priceFeedSetupParams };
@@ -0,0 +1,21 @@
1
+ // src/permissionless/bindings/pricefeeds/median.ts
2
+ const medianPriceFeed = {
3
+ contractType: "PRICE_FEED::MEDIAN",
4
+ version: 310,
5
+ constructorParams: [{
6
+ label: "underlyingPriceFeeds",
7
+ type: {
8
+ type: "pricefeedParamsFixed",
9
+ qty: 3,
10
+ minNonZero: 1
11
+ }
12
+ }, {
13
+ label: "descriptionTicker",
14
+ type: {
15
+ type: "string",
16
+ maxLen: 32
17
+ }
18
+ }],
19
+ stalenessPeriod: false
20
+ };
21
+ export { medianPriceFeed };
@@ -1,2 +1,2 @@
1
- import { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi } from "./oracles.mjs";
2
- export { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi };
1
+ import { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, fixedRateWindowPriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, medianPriceFeedAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi } from "./oracles.mjs";
2
+ export { boundedPriceFeedAbi, bptStablePriceFeedAbi, bptWeightedPriceFeedAbi, chainlinkReadableAggregatorAbi, compositePriceFeedAbi, constantPriceFeedAbi, curveCryptoLpPriceFeedAbi, curveStableLpPriceFeedAbi, curveUsdPriceFeedAbi, erc4626PriceFeedAbi, fixedRateWindowPriceFeedAbi, iBalancerStablePoolAbi, iBalancerWeightedPoolAbi, iCurvePoolAbi, iMellowVaultAbi, iRedstonePriceFeedEventsAbi, ilpPriceFeedAbi, ilpPriceFeedEventsAbi, iwstEthAbi, iyVaultAbi, medianPriceFeedAbi, mellowLrtPriceFeedAbi, pendleTWAPPTPriceFeedAbi, pythPriceFeedAbi, redstonePriceFeedAbi, wstEthPriceFeedAbi, yearnPriceFeedAbi, zeroPriceFeedAbi };