@gearbox-protocol/sdk 14.12.0-next.75 → 14.12.0-next.77

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 (98) hide show
  1. package/dist/cjs/model/curators.js +1 -0
  2. package/dist/cjs/model/curators.schema.js +38 -0
  3. package/dist/cjs/model/index.js +4 -1
  4. package/dist/cjs/model/opportunities.schema.js +3 -1
  5. package/dist/cjs/model/primitives.schema.js +0 -9
  6. package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +13 -140
  7. package/dist/cjs/sdk/accounts/bots/AccountBotsService.js +132 -0
  8. package/dist/cjs/sdk/accounts/bots/PeripheryCompressorV310Contract.js +31 -0
  9. package/dist/cjs/sdk/accounts/bots/abi.js +19 -0
  10. package/dist/cjs/sdk/accounts/bots/index.js +6 -0
  11. package/dist/cjs/sdk/accounts/bots/types.js +1 -0
  12. package/dist/cjs/sdk/accounts/index.js +5 -0
  13. package/dist/cjs/sdk/chain/chains.js +1 -1
  14. package/dist/cjs/sdk/index.js +4 -0
  15. package/dist/cjs/sdk/market/MarketConfiguratorContract.js +2 -14
  16. package/dist/cjs/sdk/market/MarketSuite.js +1 -0
  17. package/dist/cjs/sdk/market/ZapperRegister.js +1 -1
  18. package/dist/cjs/sdk/market/credit/CreditSuite.js +31 -0
  19. package/dist/esm/dev/AccountOpener.js +1 -1
  20. package/dist/esm/dev/withdrawalUtils.js +1 -1
  21. package/dist/esm/model/curators.js +1 -0
  22. package/dist/esm/model/curators.schema.js +36 -0
  23. package/dist/esm/model/index.js +4 -2
  24. package/dist/esm/model/opportunities.schema.js +3 -1
  25. package/dist/esm/model/primitives.schema.js +1 -9
  26. package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
  27. package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
  28. package/dist/esm/preview/trace/extractTransfers.js +1 -1
  29. package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +17 -144
  30. package/dist/esm/sdk/accounts/bots/AccountBotsService.js +131 -0
  31. package/dist/esm/sdk/accounts/bots/PeripheryCompressorV310Contract.js +31 -0
  32. package/dist/esm/sdk/accounts/bots/abi.js +18 -0
  33. package/dist/esm/sdk/accounts/bots/index.js +4 -0
  34. package/dist/esm/sdk/accounts/bots/types.js +1 -0
  35. package/dist/esm/sdk/accounts/index.js +4 -1
  36. package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
  37. package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  38. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  39. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  40. package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
  41. package/dist/esm/sdk/base/TokensMeta.js +2 -2
  42. package/dist/esm/sdk/chain/chains.js +1 -1
  43. package/dist/esm/sdk/chain/detectNetwork.js +1 -1
  44. package/dist/esm/sdk/core/createAddressProvider.js +1 -1
  45. package/dist/esm/sdk/index.js +3 -1
  46. package/dist/esm/sdk/market/MarketConfiguratorContract.js +2 -14
  47. package/dist/esm/sdk/market/MarketSuite.js +1 -0
  48. package/dist/esm/sdk/market/ZapperRegister.js +1 -1
  49. package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
  50. package/dist/esm/sdk/market/credit/CreditSuite.js +31 -0
  51. package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
  52. package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
  53. package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
  54. package/dist/esm/sdk/pools/PoolService.js +1 -1
  55. package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
  56. package/dist/types/model/curators.d.ts +33 -0
  57. package/dist/types/model/curators.schema.d.ts +50 -0
  58. package/dist/types/model/index.d.ts +5 -3
  59. package/dist/types/model/opportunities.d.ts +6 -1
  60. package/dist/types/model/opportunities.schema.d.ts +160 -9
  61. package/dist/types/model/primitives.d.ts +1 -25
  62. package/dist/types/model/primitives.schema.d.ts +1 -9
  63. package/dist/types/new-sdk/AbstractNamespace.d.ts +2 -2
  64. package/dist/types/new-sdk/opportunities/OpportunitiesNamespace.d.ts +1 -1
  65. package/dist/types/new-sdk/positions/PositionsNamespace.d.ts +1 -1
  66. package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +9 -16
  67. package/dist/types/sdk/accounts/bots/AccountBotsService.d.ts +38 -0
  68. package/dist/types/sdk/accounts/bots/PeripheryCompressorV310Contract.d.ts +236 -0
  69. package/dist/types/sdk/accounts/bots/abi.d.ts +18 -0
  70. package/dist/types/sdk/accounts/bots/index.d.ts +4 -0
  71. package/dist/types/sdk/accounts/bots/types.d.ts +143 -0
  72. package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +1 -1
  73. package/dist/types/sdk/accounts/index.d.ts +6 -2
  74. package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +2 -2
  75. package/dist/types/sdk/accounts/liquidations/types.d.ts +1 -1
  76. package/dist/types/sdk/accounts/types.d.ts +10 -84
  77. package/dist/types/sdk/base/TokensMeta.d.ts +1 -1
  78. package/dist/types/sdk/chain/chains.d.ts +7 -11
  79. package/dist/types/sdk/chain/index.d.ts +2 -2
  80. package/dist/types/sdk/index.d.ts +6 -3
  81. package/dist/types/sdk/market/MarketConfiguratorContract.d.ts +3 -8
  82. package/dist/types/sdk/market/MarketSuite.d.ts +3 -2
  83. package/dist/types/sdk/market/credit/CreditManagerV310Contract.d.ts +1 -1
  84. package/dist/types/sdk/market/credit/CreditSuite.d.ts +26 -1
  85. package/dist/types/sdk/market/credit/types.d.ts +1 -1
  86. package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +2 -2
  87. package/dist/types/sdk/market/oracle/types.d.ts +2 -2
  88. package/dist/types/sdk/market/pool/LinearInterestRateModelContract.d.ts +1 -1
  89. package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +1 -1
  90. package/dist/types/sdk/market/pool/PoolSuite.d.ts +1 -1
  91. package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +1 -1
  92. package/dist/types/sdk/market/pool/types.d.ts +1 -1
  93. package/dist/types/sdk/market/pricefeeds/AbstractPriceFeed.d.ts +1 -1
  94. package/dist/types/sdk/market/pricefeeds/types.d.ts +1 -1
  95. package/dist/types/sdk/opportunities/MultichainOpportunitiesService.d.ts +2 -2
  96. package/dist/types/sdk/pools/types.d.ts +1 -1
  97. package/dist/types/sdk/positions/MultichainPositionsService.d.ts +2 -2
  98. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
2
1
  import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
2
+ import { iWithdrawalCompressorV311Abi } from "../../../abi/IWithdrawalCompressorV311.js";
3
3
  //#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.ts
4
4
  const abi = iWithdrawalCompressorV311Abi;
5
5
  /**
@@ -1,6 +1,6 @@
1
- import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
2
1
  import { encodeDelayedIntent } from "./intent-codec.js";
3
2
  import { AbstractWithdrawalCompressorContract, iCreditAccountAbi, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal } from "./AbstractWithdrawalCompressorContract.js";
3
+ import { iWithdrawalCompressorV313Abi } from "../../../abi/IWithdrawalCompressorV313.js";
4
4
  import { toWithdrawalStatus } from "./types.js";
5
5
  //#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.ts
6
6
  const abi = iWithdrawalCompressorV313Abi;
@@ -1,11 +1,11 @@
1
- import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
2
- import { iVersionAbi } from "../../abi/iVersion.js";
3
1
  import { AddressMap } from "../utils/AddressMap.js";
4
2
  import { AddressSet } from "../utils/AddressSet.js";
5
3
  import { bytes32ToString } from "../utils/bytes32ToString.js";
6
4
  import { getAssetType } from "../chain/chains.js";
7
5
  import { formatBN } from "../utils/formatter.js";
8
6
  import "../utils/index.js";
7
+ import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
8
+ import { iVersionAbi } from "../../abi/iVersion.js";
9
9
  //#region src/sdk/base/TokensMeta.ts
10
10
  /**
11
11
  * Registry of token metadata (symbol, decimals, phantom type) keyed by address.
@@ -374,7 +374,7 @@ function isPublicNetwork(networkOrChainId) {
374
374
  });
375
375
  }
376
376
  /**
377
- * Looks up the {@link Curator} name for a market configurator address.
377
+ * Looks up the {@link CuratorName} name for a market configurator address.
378
378
  *
379
379
  * Searches default and test market configurators across all chains, or
380
380
  * a single network if provided.
@@ -1,5 +1,5 @@
1
- import { ierc20Abi } from "../../abi/iERC20.js";
2
1
  import { chains } from "./chains.js";
2
+ import { ierc20Abi } from "../../abi/iERC20.js";
3
3
  //#region src/sdk/chain/detectNetwork.ts
4
4
  /**
5
5
  * Detects the network type from the given client.
@@ -1,8 +1,8 @@
1
- import { iVersionAbi } from "../../abi/iVersion.js";
2
1
  import { AP_MARKET_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR } from "../constants/address-provider.js";
3
2
  import { isV310 } from "../constants/versions.js";
4
3
  import "../constants/index.js";
5
4
  import { hexEq } from "../utils/hex.js";
5
+ import { iVersionAbi } from "../../abi/iVersion.js";
6
6
  import { AddressProviderV310Contract } from "./AddressProviderV310Contract.js";
7
7
  //#region src/sdk/core/createAddressProvider.ts
8
8
  const OVERRIDE_ADDRESSES = { Mainnet: {
@@ -42,6 +42,8 @@ import { SDKConstruct } from "./base/SDKConstruct.js";
42
42
  import { PHANTOM_TOKEN_CONTRACT_TYPES, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND } from "./base/token-types.js";
43
43
  import { VotingContractStatus } from "./base/types.js";
44
44
  import "./base/index.js";
45
+ import { PeripheryCompressorV310Contract } from "./accounts/bots/PeripheryCompressorV310Contract.js";
46
+ import { AccountBotsService } from "./accounts/bots/AccountBotsService.js";
45
47
  import { PlaceholderAdapterContract } from "./market/adapters/PlaceholderAdapterContracts.js";
46
48
  import { createAdapter } from "./market/adapters/createAdapter.js";
47
49
  import { CreditConfiguratorV310Contract } from "./market/credit/CreditConfiguratorV310Contract.js";
@@ -145,4 +147,4 @@ import { OnchainSDK, STATE_VERSION } from "./OnchainSDK.js";
145
147
  import { MultichainSDK } from "./MultichainSDK.js";
146
148
  import { attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
147
149
  import "./types/index.js";
148
- export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, Construct, ContractParseError, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DUST_THRESHOLD, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InvalidDelayedIntentError, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderContract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeLiquidatorContract, SecuritizeRWAFactory, SimulateWithPriceUpdatesError, SimulationError, TokensMeta, TypedObjectUtils, UnsupportedZapperFunctionError, VERSION_RANGE_310, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
150
+ export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, AddressMap, AddressProviderV310Contract, AddressSet, AssetsMap, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BaseContract, BasePlugin, BigIntMath, BotPermissions, BoundedPriceFeedContract, ChainContractsRegister, ChainNotConfiguredError, CompositePriceFeedContract, Construct, ContractParseError, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountOperationsService, CreditAccountsServiceV310, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DUST_THRESHOLD, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, InvalidDelayedIntentError, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LinearInterestRateModelContract, LiquidationsService, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, MissingSerializedParamsError, MultichainConstruct, MultichainLiquidationsService, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainSDK, OpportunitiesService, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PlaceholderAdapterContract, PlaceholderContract, PluginStateVersionError, PoolService, PoolSuite, PoolV310Contract, PositionsService, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RedemptionLoggerV310Contract, RedstonePriceFeedContract, RouterV310Contract, SDKConstruct, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeLiquidatorContract, SecuritizeRWAFactory, SimulateWithPriceUpdatesError, SimulationError, TokensMeta, TypedObjectUtils, UnsupportedZapperFunctionError, VERSION_RANGE_310, VotingContractStatus, WAD, WAD_DECIMALS_POW, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, ZodAddress, ZodHex, additionalBorrowApyBps, assetsMap, attachOptionsSchema, borrowApyBps, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, abi as creditFacadeV310Abi, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, maxLeverage, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, positionLeverage, primaryInstantOutput, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, usdToNumber, utilizationBps, watchBlocksAsync };
@@ -8,7 +8,6 @@ import { stringToHex } from "viem";
8
8
  //#region src/sdk/market/MarketConfiguratorContract.ts
9
9
  const abi = iMarketConfiguratorV310Abi;
10
10
  var MarketConfiguratorContract = class extends BaseContract {
11
- #curatorName;
12
11
  constructor(options, address) {
13
12
  super(options, {
14
13
  abi,
@@ -17,24 +16,13 @@ var MarketConfiguratorContract = class extends BaseContract {
17
16
  version: 0
18
17
  });
19
18
  }
20
- async loadCuratorName() {
21
- this.#curatorName = await this.client.readContract({
22
- address: this.address,
23
- abi: this.abi,
24
- functionName: "curatorName"
25
- });
26
- this.register.setAddressLabel(this.address, `Market configurator ${this.#curatorName}`);
27
- }
28
19
  /**
29
- * The entity operating this configurator, as the shared read model describes
30
- * it. The curated per-chain table wins over the name the contract reports,
31
- * because the two sources must agree across services and only the table is
32
- * shared with the backend.
20
+ * The entity operating this configurator
33
21
  */
34
22
  get curator() {
35
23
  return {
36
24
  address: this.address,
37
- name: getCuratorName(this.address, this.networkType) ?? this.#curatorName ?? "Unknown",
25
+ name: getCuratorName(this.address, this.networkType),
38
26
  url: null
39
27
  };
40
28
  }
@@ -222,6 +222,7 @@ var MarketSuite = class extends SDKConstruct {
222
222
  curator: this.curator,
223
223
  underlyingToken: this.underlyingToken,
224
224
  totalSupply: oracle.toAmount(pool.underlying, pool.totalAssets),
225
+ availableLiquidity: oracle.toAmount(pool.underlying, pool.availableLiquidity),
225
226
  totalBorrow: oracle.toAmount(pool.underlying, pool.totalBorrowed),
226
227
  utilization: pool.utilization,
227
228
  supplyApy: { organicApy: rayToBps(pool.supplyRate) },
@@ -1,4 +1,3 @@
1
- import { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompressor.js";
2
1
  import { AddressMap } from "../utils/AddressMap.js";
3
2
  import { AP_PERIPHERY_COMPRESSOR } from "../constants/address-provider.js";
4
3
  import { VERSION_RANGE_310 } from "../constants/versions.js";
@@ -7,6 +6,7 @@ import { hexEq } from "../utils/hex.js";
7
6
  import "../utils/index.js";
8
7
  import { SDKConstruct } from "../base/SDKConstruct.js";
9
8
  import "../base/index.js";
9
+ import { peripheryCompressorAbi } from "../../abi/compressors/peripheryCompressor.js";
10
10
  import { createZapper } from "./zapper/createZapper.js";
11
11
  import "./zapper/index.js";
12
12
  //#region src/sdk/market/ZapperRegister.ts
@@ -1,7 +1,7 @@
1
- import { iPausableAbi } from "../../../abi/iPausable.js";
2
1
  import { iCreditFacadeMulticallV310Abi, iCreditFacadeV310Abi } from "../../../abi/310/generated.js";
3
2
  import { BaseContract } from "../../base/BaseContract.js";
4
3
  import "../../base/index.js";
4
+ import { iPausableAbi } from "../../../abi/iPausable.js";
5
5
  //#region src/sdk/market/credit/CreditFacadeV310BaseContract.ts
6
6
  const abi = [
7
7
  ...iCreditFacadeV310Abi,
@@ -89,6 +89,37 @@ var CreditSuite = class extends SDKConstruct {
89
89
  return this.market.configurator;
90
90
  }
91
91
  /**
92
+ * Factory that opens and manages the accounts of this suite, defined only
93
+ * for RWA markets.
94
+ */
95
+ get rwaFactory() {
96
+ return this.market.rwaFactory;
97
+ }
98
+ /**
99
+ * Builds a transaction that executes a multicall on one of this suite's
100
+ * credit accounts.
101
+ *
102
+ * @param creditAccount - Account to operate on.
103
+ * @param calls - Multicall body.
104
+ * @param rwaOptions - Factory-specific args, ignored on non-RWA markets.
105
+ */
106
+ multicallTx(creditAccount, calls, rwaOptions) {
107
+ const { rwaFactory } = this;
108
+ return rwaFactory ? rwaFactory.multicall(creditAccount, calls, rwaOptions) : this.creditFacade.multicall(creditAccount, calls);
109
+ }
110
+ /**
111
+ * Builds a transaction that opens a new credit account in this suite.
112
+ *
113
+ * @param to - Owner of the new account.
114
+ * @param calls - Multicall body executed on the new account.
115
+ * @param referralCode - Referral code, facade path only.
116
+ * @param rwaOptions - Factory-specific args, ignored on non-RWA markets.
117
+ */
118
+ openCreditAccountTx(to, calls, referralCode, rwaOptions) {
119
+ const { rwaFactory } = this;
120
+ return rwaFactory ? rwaFactory.openCreditAccount(this.creditManager.address, calls, rwaOptions) : this.creditFacade.openCreditAccount(to, calls, referralCode ?? 0n);
121
+ }
122
+ /**
92
123
  * Router configured for this credit suite.
93
124
  */
94
125
  get router() {
@@ -1,4 +1,3 @@
1
- import { iPausableAbi } from "../../../abi/iPausable.js";
2
1
  import { iPoolV310Abi } from "../../../abi/310/generated.js";
3
2
  import { AddressMap } from "../../utils/AddressMap.js";
4
3
  import { RAY } from "../../constants/math.js";
@@ -7,6 +6,7 @@ import { formatBN, formatBNvalue, percentFmt } from "../../utils/formatter.js";
7
6
  import "../../utils/index.js";
8
7
  import { BaseContract } from "../../base/BaseContract.js";
9
8
  import "../../base/index.js";
9
+ import { iPausableAbi } from "../../../abi/iPausable.js";
10
10
  import { utilizationBps } from "../math.js";
11
11
  //#region src/sdk/market/pool/PoolV310Contract.ts
12
12
  const abi = [...iPoolV310Abi, ...iPausableAbi];
@@ -1,5 +1,5 @@
1
- import { iethZapperAbi } from "../../../abi/iETHZapper.js";
2
1
  import { ZapperContract } from "./ZapperContract.js";
2
+ import { iethZapperAbi } from "../../../abi/iETHZapper.js";
3
3
  //#region src/sdk/market/zapper/IETHZapperContract.ts
4
4
  const abi = iethZapperAbi;
5
5
  var IETHZapperContract = class extends ZapperContract {
@@ -1,6 +1,6 @@
1
- import { iZapperAbi } from "../../../abi/iZapper.js";
2
1
  import { BaseContract } from "../../base/BaseContract.js";
3
2
  import "../../base/index.js";
3
+ import { iZapperAbi } from "../../../abi/iZapper.js";
4
4
  import { UnsupportedZapperFunctionError } from "./errors.js";
5
5
  //#region src/sdk/market/zapper/ZapperContract.ts
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { ierc20Abi } from "../../abi/iERC20.js";
2
1
  import { AddressSet } from "../utils/AddressSet.js";
2
+ import { ierc20Abi } from "../../abi/iERC20.js";
3
3
  import "../constants/addresses.js";
4
4
  import { RAY } from "../constants/math.js";
5
5
  import "../constants/index.js";
@@ -1,6 +1,6 @@
1
1
  import { errorAbis } from "../../../abi/errors.js";
2
- import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
3
2
  import { generateCastTraceCall } from "./cast.js";
3
+ import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
4
4
  import { simulateMulticall } from "./simulateMulticall.js";
5
5
  import { BaseError, CallExecutionError, ContractFunctionRevertedError, decodeFunctionData, decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
6
6
  import { getAction, parseAccount } from "viem/utils";
@@ -0,0 +1,33 @@
1
+ import { Address } from "viem";
2
+ //#region src/model/curators.d.ts
3
+ /**
4
+ * Known curator names that manage Gearbox markets.
5
+ **/
6
+ type CuratorName = "Chaos Labs" | "K3" | "cp0x" | "Re7" | "Invariant Group" | "Tulipa" | "M11 Credit" | "KPK" | "Hyperithm" | "UltraYield" | "TelosC" | "Gami Labs" | "Securitize" | "Testnet Curator";
7
+ /**
8
+ * The entity that curates a market: sets risk parameters, picks collateral and
9
+ * operates the market configurator.
10
+ **/
11
+ interface Curator {
12
+ /**
13
+ * Address of the market configurator the curator operates. This is the
14
+ * on-chain identity of a curator, not a personal wallet.
15
+ **/
16
+ address: Address;
17
+ /**
18
+ * Display name from the curated per-chain table, or `undefined` when the
19
+ * market configurator is not a well-known curator.
20
+ *
21
+ * @example `"Chaos Labs"`
22
+ **/
23
+ name?: CuratorName;
24
+ /**
25
+ * Link to the curator's page, or `null` when unknown. The chain knows no
26
+ * URLs, so this is `null` for anything served from the on-chain source.
27
+ *
28
+ * @mode offchain
29
+ **/
30
+ url: string | null;
31
+ }
32
+ //#endregion
33
+ export { Curator, CuratorName };
@@ -0,0 +1,50 @@
1
+ import { z } from "zod/v4";
2
+ //#region src/model/curators.schema.d.ts
3
+ /**
4
+ * Runtime schemas for {@link ./curators.js}, see the note in
5
+ * `primitives.schema.ts` on why they are written by hand.
6
+ **/
7
+ /**
8
+ * {@link CuratorName}
9
+ **/
10
+ declare const curatorNameSchema: z.ZodEnum<{
11
+ "Chaos Labs": "Chaos Labs";
12
+ "Gami Labs": "Gami Labs";
13
+ Hyperithm: "Hyperithm";
14
+ "Invariant Group": "Invariant Group";
15
+ K3: "K3";
16
+ KPK: "KPK";
17
+ "M11 Credit": "M11 Credit";
18
+ Re7: "Re7";
19
+ Securitize: "Securitize";
20
+ TelosC: "TelosC";
21
+ "Testnet Curator": "Testnet Curator";
22
+ Tulipa: "Tulipa";
23
+ UltraYield: "UltraYield";
24
+ cp0x: "cp0x";
25
+ }>;
26
+ /**
27
+ * {@link Curator}
28
+ **/
29
+ declare const curatorSchema: z.ZodObject<{
30
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
31
+ name: z.ZodOptional<z.ZodEnum<{
32
+ "Chaos Labs": "Chaos Labs";
33
+ "Gami Labs": "Gami Labs";
34
+ Hyperithm: "Hyperithm";
35
+ "Invariant Group": "Invariant Group";
36
+ K3: "K3";
37
+ KPK: "KPK";
38
+ "M11 Credit": "M11 Credit";
39
+ Re7: "Re7";
40
+ Securitize: "Securitize";
41
+ TelosC: "TelosC";
42
+ "Testnet Curator": "Testnet Curator";
43
+ Tulipa: "Tulipa";
44
+ UltraYield: "UltraYield";
45
+ cp0x: "cp0x";
46
+ }>>;
47
+ url: z.ZodNullable<z.ZodString>;
48
+ }, z.core.$strip>;
49
+ //#endregion
50
+ export { curatorNameSchema, curatorSchema };
@@ -1,4 +1,6 @@
1
- import { Amount, AssetType, Bps, ChainId, Curator, Leverage, Timestamp, Token, TokenAmount, TxCall } from "./primitives.js";
1
+ import { Curator, CuratorName } from "./curators.js";
2
+ import { Amount, AssetType, Bps, ChainId, Leverage, Timestamp, Token, TokenAmount, TxCall } from "./primitives.js";
3
+ import { curatorNameSchema, curatorSchema } from "./curators.schema.js";
2
4
  import { ApyBreakdown, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, PointRewards, PointsProgram, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, Rewards, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, TokenRewards, matchesOpportunityFilter, opportunityId, poolOpportunityId, strategyOpportunityId } from "./opportunities.js";
3
5
  import { DelayedReceivedAsset, InstantReceivedAsset, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, ReceivedAsset, matchesLiquidatableAccountFilter } from "./liquidations.js";
4
6
  import { PnlBreakdown, PointsProgramPnL, PointsRewardsPnL, PoolPosition, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, RewardsPnL, StrategyPosition, StrategyPositionKey, StrategyPositionRef, TokenRewardsPnL, liquidationPositionId, matchesPositionFilter, poolPositionId, positionId, strategyPositionId } from "./positions.js";
@@ -7,5 +9,5 @@ import { historyChartMetadataSchema, historyMetricSchema, historyPointSchema, hi
7
9
  import { delayedReceivedAssetSchema, instantReceivedAssetSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionSchema, receivedAssetSchema } from "./liquidations.schema.js";
8
10
  import { apyBreakdownSchema, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pointRewardsSchema, pointsProgramSchema, poolOpportunityDetailSchema, poolOpportunityKeySchema, poolOpportunitySchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, rewardsSchema, strategyOpportunityDetailSchema, strategyOpportunityKeySchema, strategyOpportunitySchema, tokenRewardsSchema } from "./opportunities.schema.js";
9
11
  import { pnlBreakdownSchema, pointsProgramPnLSchema, pointsRewardsPnLSchema, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionKeySchema, positionKindSchema, positionSchema, rewardsPnLSchema, strategyPositionKeySchema, strategyPositionSchema, tokenRewardsPnLSchema } from "./positions.schema.js";
10
- import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema } from "./primitives.schema.js";
11
- export { Amount, ApyBreakdown, AssetType, Bps, ChainId, Curator, DelayedReceivedAsset, HistoryChartMetadata, HistoryMetric, HistoryPoint, HistoryRange, HistorySeries, InstantReceivedAsset, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityHistoryQuery, OpportunityId, OpportunityKey, OpportunityKind, POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolHistoryMetric, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionHistoryMetric, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionHistoryMetric, PositionHistoryQuery, PositionId, PositionKey, PositionKind, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, Rewards, RewardsPnL, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, StrategyHistoryMetric, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionHistoryMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenRewards, TokenRewardsPnL, TxCall, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
12
+ import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema } from "./primitives.schema.js";
13
+ export { Amount, ApyBreakdown, AssetType, Bps, ChainId, Curator, CuratorName, DelayedReceivedAsset, HistoryChartMetadata, HistoryMetric, HistoryPoint, HistoryRange, HistorySeries, InstantReceivedAsset, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Opportunity, OpportunityBase, OpportunityDetail, OpportunityFilter, OpportunityHistoryQuery, OpportunityId, OpportunityKey, OpportunityKind, POOL_HISTORY_METRICS, POOL_POSITION_HISTORY_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolHistoryMetric, PoolOpportunity, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionHistoryMetric, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionHistoryMetric, PositionHistoryQuery, PositionId, PositionKey, PositionKind, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, Rewards, RewardsPnL, STRATEGY_HISTORY_METRICS, STRATEGY_POSITION_HISTORY_METRICS, StrategyHistoryMetric, StrategyOpportunity, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionHistoryMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenRewards, TokenRewardsPnL, TxCall, amountSchema, apyBreakdownSchema, assetTypeSchema, bpsSchema, chainIdSchema, curatorNameSchema, curatorSchema, delayedReceivedAssetSchema, historyChartMetadataSchema, historyMetricSchema, historyPointSchema, historyRangeSchema, historySeriesSchema, instantReceivedAssetSchema, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterSchema, opportunityHistoryQuerySchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolHistoryMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionHistoryMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterSchema, positionHistoryMetricSchema, positionHistoryQuerySchema, positionId, positionKeySchema, positionKindSchema, positionSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, rewardsPnLSchema, rewardsSchema, strategyHistoryMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionHistoryMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, txCallSchema };
@@ -1,4 +1,5 @@
1
- import { Amount, AssetType, Bps, ChainId, Curator, Leverage, Timestamp, Token } from "./primitives.js";
1
+ import { Curator } from "./curators.js";
2
+ import { Amount, AssetType, Bps, ChainId, Leverage, Timestamp, Token } from "./primitives.js";
2
3
  import { Address } from "viem";
3
4
  //#region src/model/opportunities.d.ts
4
5
  /**
@@ -178,6 +179,10 @@ interface PoolOpportunity extends OpportunityBase {
178
179
  * {@link OpportunityBase.totalBorrow}.
179
180
  **/
180
181
  totalSupply: Amount;
182
+ /**
183
+ * Pool available liquidity. Denominated in the underlying.
184
+ **/
185
+ availableLiquidity: Amount;
181
186
  /**
182
187
  * How much of the pool's capital is currently borrowed, in basis points.
183
188
  *
@@ -101,7 +101,22 @@ declare const opportunityBaseSchema: z.ZodObject<{
101
101
  name: z.ZodString;
102
102
  curator: z.ZodObject<{
103
103
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
104
- name: z.ZodString;
104
+ name: z.ZodOptional<z.ZodEnum<{
105
+ "Chaos Labs": "Chaos Labs";
106
+ "Gami Labs": "Gami Labs";
107
+ Hyperithm: "Hyperithm";
108
+ "Invariant Group": "Invariant Group";
109
+ K3: "K3";
110
+ KPK: "KPK";
111
+ "M11 Credit": "M11 Credit";
112
+ Re7: "Re7";
113
+ Securitize: "Securitize";
114
+ TelosC: "TelosC";
115
+ "Testnet Curator": "Testnet Curator";
116
+ Tulipa: "Tulipa";
117
+ UltraYield: "UltraYield";
118
+ cp0x: "cp0x";
119
+ }>>;
105
120
  url: z.ZodNullable<z.ZodString>;
106
121
  }, z.core.$strip>;
107
122
  underlyingToken: z.ZodObject<{
@@ -136,7 +151,22 @@ declare const poolOpportunitySchema: z.ZodObject<{
136
151
  name: z.ZodString;
137
152
  curator: z.ZodObject<{
138
153
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
139
- name: z.ZodString;
154
+ name: z.ZodOptional<z.ZodEnum<{
155
+ "Chaos Labs": "Chaos Labs";
156
+ "Gami Labs": "Gami Labs";
157
+ Hyperithm: "Hyperithm";
158
+ "Invariant Group": "Invariant Group";
159
+ K3: "K3";
160
+ KPK: "KPK";
161
+ "M11 Credit": "M11 Credit";
162
+ Re7: "Re7";
163
+ Securitize: "Securitize";
164
+ TelosC: "TelosC";
165
+ "Testnet Curator": "Testnet Curator";
166
+ Tulipa: "Tulipa";
167
+ UltraYield: "UltraYield";
168
+ cp0x: "cp0x";
169
+ }>>;
140
170
  url: z.ZodNullable<z.ZodString>;
141
171
  }, z.core.$strip>;
142
172
  underlyingToken: z.ZodObject<{
@@ -168,6 +198,10 @@ declare const poolOpportunitySchema: z.ZodObject<{
168
198
  value: z.ZodBigInt;
169
199
  valueUsd: z.ZodNullable<z.ZodNumber>;
170
200
  }, z.core.$strip>;
201
+ availableLiquidity: z.ZodObject<{
202
+ value: z.ZodBigInt;
203
+ valueUsd: z.ZodNullable<z.ZodNumber>;
204
+ }, z.core.$strip>;
171
205
  utilization: z.ZodNumber;
172
206
  supplyApy: z.ZodObject<{
173
207
  totalApy: z.ZodOptional<z.ZodNumber>;
@@ -202,7 +236,22 @@ declare const strategyOpportunitySchema: z.ZodObject<{
202
236
  name: z.ZodString;
203
237
  curator: z.ZodObject<{
204
238
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
205
- name: z.ZodString;
239
+ name: z.ZodOptional<z.ZodEnum<{
240
+ "Chaos Labs": "Chaos Labs";
241
+ "Gami Labs": "Gami Labs";
242
+ Hyperithm: "Hyperithm";
243
+ "Invariant Group": "Invariant Group";
244
+ K3: "K3";
245
+ KPK: "KPK";
246
+ "M11 Credit": "M11 Credit";
247
+ Re7: "Re7";
248
+ Securitize: "Securitize";
249
+ TelosC: "TelosC";
250
+ "Testnet Curator": "Testnet Curator";
251
+ Tulipa: "Tulipa";
252
+ UltraYield: "UltraYield";
253
+ cp0x: "cp0x";
254
+ }>>;
206
255
  url: z.ZodNullable<z.ZodString>;
207
256
  }, z.core.$strip>;
208
257
  underlyingToken: z.ZodObject<{
@@ -311,7 +360,22 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
311
360
  name: z.ZodString;
312
361
  curator: z.ZodObject<{
313
362
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
314
- name: z.ZodString;
363
+ name: z.ZodOptional<z.ZodEnum<{
364
+ "Chaos Labs": "Chaos Labs";
365
+ "Gami Labs": "Gami Labs";
366
+ Hyperithm: "Hyperithm";
367
+ "Invariant Group": "Invariant Group";
368
+ K3: "K3";
369
+ KPK: "KPK";
370
+ "M11 Credit": "M11 Credit";
371
+ Re7: "Re7";
372
+ Securitize: "Securitize";
373
+ TelosC: "TelosC";
374
+ "Testnet Curator": "Testnet Curator";
375
+ Tulipa: "Tulipa";
376
+ UltraYield: "UltraYield";
377
+ cp0x: "cp0x";
378
+ }>>;
315
379
  url: z.ZodNullable<z.ZodString>;
316
380
  }, z.core.$strip>;
317
381
  underlyingToken: z.ZodObject<{
@@ -343,6 +407,10 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
343
407
  value: z.ZodBigInt;
344
408
  valueUsd: z.ZodNullable<z.ZodNumber>;
345
409
  }, z.core.$strip>;
410
+ availableLiquidity: z.ZodObject<{
411
+ value: z.ZodBigInt;
412
+ valueUsd: z.ZodNullable<z.ZodNumber>;
413
+ }, z.core.$strip>;
346
414
  utilization: z.ZodNumber;
347
415
  supplyApy: z.ZodObject<{
348
416
  totalApy: z.ZodOptional<z.ZodNumber>;
@@ -373,7 +441,22 @@ declare const opportunitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
373
441
  name: z.ZodString;
374
442
  curator: z.ZodObject<{
375
443
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
376
- name: z.ZodString;
444
+ name: z.ZodOptional<z.ZodEnum<{
445
+ "Chaos Labs": "Chaos Labs";
446
+ "Gami Labs": "Gami Labs";
447
+ Hyperithm: "Hyperithm";
448
+ "Invariant Group": "Invariant Group";
449
+ K3: "K3";
450
+ KPK: "KPK";
451
+ "M11 Credit": "M11 Credit";
452
+ Re7: "Re7";
453
+ Securitize: "Securitize";
454
+ TelosC: "TelosC";
455
+ "Testnet Curator": "Testnet Curator";
456
+ Tulipa: "Tulipa";
457
+ UltraYield: "UltraYield";
458
+ cp0x: "cp0x";
459
+ }>>;
377
460
  url: z.ZodNullable<z.ZodString>;
378
461
  }, z.core.$strip>;
379
462
  underlyingToken: z.ZodObject<{
@@ -563,7 +646,22 @@ declare const poolOpportunityDetailSchema: z.ZodObject<{
563
646
  name: z.ZodString;
564
647
  curator: z.ZodObject<{
565
648
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
566
- name: z.ZodString;
649
+ name: z.ZodOptional<z.ZodEnum<{
650
+ "Chaos Labs": "Chaos Labs";
651
+ "Gami Labs": "Gami Labs";
652
+ Hyperithm: "Hyperithm";
653
+ "Invariant Group": "Invariant Group";
654
+ K3: "K3";
655
+ KPK: "KPK";
656
+ "M11 Credit": "M11 Credit";
657
+ Re7: "Re7";
658
+ Securitize: "Securitize";
659
+ TelosC: "TelosC";
660
+ "Testnet Curator": "Testnet Curator";
661
+ Tulipa: "Tulipa";
662
+ UltraYield: "UltraYield";
663
+ cp0x: "cp0x";
664
+ }>>;
567
665
  url: z.ZodNullable<z.ZodString>;
568
666
  }, z.core.$strip>;
569
667
  underlyingToken: z.ZodObject<{
@@ -595,6 +693,10 @@ declare const poolOpportunityDetailSchema: z.ZodObject<{
595
693
  value: z.ZodBigInt;
596
694
  valueUsd: z.ZodNullable<z.ZodNumber>;
597
695
  }, z.core.$strip>;
696
+ availableLiquidity: z.ZodObject<{
697
+ value: z.ZodBigInt;
698
+ valueUsd: z.ZodNullable<z.ZodNumber>;
699
+ }, z.core.$strip>;
598
700
  utilization: z.ZodNumber;
599
701
  supplyApy: z.ZodObject<{
600
702
  totalApy: z.ZodOptional<z.ZodNumber>;
@@ -656,7 +758,22 @@ declare const strategyOpportunityDetailSchema: z.ZodObject<{
656
758
  name: z.ZodString;
657
759
  curator: z.ZodObject<{
658
760
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
659
- name: z.ZodString;
761
+ name: z.ZodOptional<z.ZodEnum<{
762
+ "Chaos Labs": "Chaos Labs";
763
+ "Gami Labs": "Gami Labs";
764
+ Hyperithm: "Hyperithm";
765
+ "Invariant Group": "Invariant Group";
766
+ K3: "K3";
767
+ KPK: "KPK";
768
+ "M11 Credit": "M11 Credit";
769
+ Re7: "Re7";
770
+ Securitize: "Securitize";
771
+ TelosC: "TelosC";
772
+ "Testnet Curator": "Testnet Curator";
773
+ Tulipa: "Tulipa";
774
+ UltraYield: "UltraYield";
775
+ cp0x: "cp0x";
776
+ }>>;
660
777
  url: z.ZodNullable<z.ZodString>;
661
778
  }, z.core.$strip>;
662
779
  underlyingToken: z.ZodObject<{
@@ -790,7 +907,22 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
790
907
  name: z.ZodString;
791
908
  curator: z.ZodObject<{
792
909
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
793
- name: z.ZodString;
910
+ name: z.ZodOptional<z.ZodEnum<{
911
+ "Chaos Labs": "Chaos Labs";
912
+ "Gami Labs": "Gami Labs";
913
+ Hyperithm: "Hyperithm";
914
+ "Invariant Group": "Invariant Group";
915
+ K3: "K3";
916
+ KPK: "KPK";
917
+ "M11 Credit": "M11 Credit";
918
+ Re7: "Re7";
919
+ Securitize: "Securitize";
920
+ TelosC: "TelosC";
921
+ "Testnet Curator": "Testnet Curator";
922
+ Tulipa: "Tulipa";
923
+ UltraYield: "UltraYield";
924
+ cp0x: "cp0x";
925
+ }>>;
794
926
  url: z.ZodNullable<z.ZodString>;
795
927
  }, z.core.$strip>;
796
928
  underlyingToken: z.ZodObject<{
@@ -822,6 +954,10 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
822
954
  value: z.ZodBigInt;
823
955
  valueUsd: z.ZodNullable<z.ZodNumber>;
824
956
  }, z.core.$strip>;
957
+ availableLiquidity: z.ZodObject<{
958
+ value: z.ZodBigInt;
959
+ valueUsd: z.ZodNullable<z.ZodNumber>;
960
+ }, z.core.$strip>;
825
961
  utilization: z.ZodNumber;
826
962
  supplyApy: z.ZodObject<{
827
963
  totalApy: z.ZodOptional<z.ZodNumber>;
@@ -879,7 +1015,22 @@ declare const opportunityDetailSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
879
1015
  name: z.ZodString;
880
1016
  curator: z.ZodObject<{
881
1017
  address: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
882
- name: z.ZodString;
1018
+ name: z.ZodOptional<z.ZodEnum<{
1019
+ "Chaos Labs": "Chaos Labs";
1020
+ "Gami Labs": "Gami Labs";
1021
+ Hyperithm: "Hyperithm";
1022
+ "Invariant Group": "Invariant Group";
1023
+ K3: "K3";
1024
+ KPK: "KPK";
1025
+ "M11 Credit": "M11 Credit";
1026
+ Re7: "Re7";
1027
+ Securitize: "Securitize";
1028
+ TelosC: "TelosC";
1029
+ "Testnet Curator": "Testnet Curator";
1030
+ Tulipa: "Tulipa";
1031
+ UltraYield: "UltraYield";
1032
+ cp0x: "cp0x";
1033
+ }>>;
883
1034
  url: z.ZodNullable<z.ZodString>;
884
1035
  }, z.core.$strip>;
885
1036
  underlyingToken: z.ZodObject<{