@gearbox-protocol/sdk 17.13.0-next.8 → 18.0.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 (38) hide show
  1. package/dist/cjs/dev/index.js +2 -0
  2. package/dist/cjs/dev/lowerHealthFactor.js +32 -0
  3. package/dist/cjs/model/analytics.schema.js +10 -2
  4. package/dist/cjs/model/index.js +1 -0
  5. package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +42 -25
  6. package/dist/esm/dev/AccountOpener.js +1 -1
  7. package/dist/esm/dev/index.js +2 -1
  8. package/dist/esm/dev/lowerHealthFactor.js +31 -0
  9. package/dist/esm/dev/withdrawalUtils.js +1 -1
  10. package/dist/esm/history/trace/extractTransfers.js +1 -1
  11. package/dist/esm/model/analytics.schema.js +12 -5
  12. package/dist/esm/model/index.js +2 -2
  13. package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +2 -2
  14. package/dist/esm/onchain/accounts/liquidations/LiquidationsService.js +43 -26
  15. package/dist/esm/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
  16. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
  17. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
  18. package/dist/esm/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
  19. package/dist/esm/onchain/base/TokensMeta.js +3 -3
  20. package/dist/esm/onchain/core/createAddressProvider.js +1 -1
  21. package/dist/esm/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
  22. package/dist/esm/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
  23. package/dist/esm/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
  24. package/dist/esm/onchain/market/pool/PoolV310Contract.js +1 -1
  25. package/dist/esm/onchain/market/rwa/createDegenNFT.js +1 -1
  26. package/dist/esm/onchain/market/zapper/IETHZapperContract.js +1 -1
  27. package/dist/esm/onchain/market/zapper/ZapperContract.js +1 -1
  28. package/dist/esm/onchain/preview/preview/previewPoolPositionOperation.js +2 -2
  29. package/dist/esm/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
  30. package/dist/types/dev/index.d.ts +2 -1
  31. package/dist/types/dev/lowerHealthFactor.d.ts +34 -0
  32. package/dist/types/model/analytics.d.ts +25 -5
  33. package/dist/types/model/analytics.schema.d.ts +126 -16
  34. package/dist/types/model/index.d.ts +3 -3
  35. package/dist/types/model/liquidations.d.ts +3 -4
  36. package/dist/types/onchain/accounts/liquidations/LiquidationsService.d.ts +9 -10
  37. package/dist/types/onchain/accounts/liquidations/types.d.ts +10 -33
  38. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- import { iExpirableAbi } from "../../abi/iExpirable.js";
2
- import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
3
- import { iVersionAbi } from "../../abi/iVersion.js";
4
1
  import { AddressMap } from "../utils/AddressMap.js";
5
2
  import { AddressSet } from "../utils/AddressSet.js";
6
3
  import { bytes32ToString } from "../utils/bytes32ToString.js";
7
4
  import { getAssetType } from "../chain/chains.js";
8
5
  import { formatBN } from "../utils/formatter.js";
9
6
  import "../utils/index.js";
7
+ import { iExpirableAbi } from "../../abi/iExpirable.js";
8
+ import { iStateSerializerAbi } from "../../abi/iStateSerializer.js";
9
+ import { iVersionAbi } from "../../abi/iVersion.js";
10
10
  import { SdkRWADataNotLoadedError } from "../core/errors.js";
11
11
  import { executeMulticallBatches } from "../utils/viem/executeMulticallBatches.js";
12
12
  import { decodeAbiParameters } from "viem";
@@ -1,8 +1,8 @@
1
- import { iVersionAbi } from "../../abi/iVersion.js";
2
1
  import "../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/onchain/core/createAddressProvider.ts
8
8
  const OVERRIDE_ADDRESSES = {};
@@ -1,5 +1,5 @@
1
- import { accountMigratorAbi } from "../../../../abi/AccountMigrator.js";
2
1
  import { AbstractAdapterContract } from "./AbstractAdapter.js";
2
+ import { accountMigratorAbi } from "../../../../abi/AccountMigrator.js";
3
3
  //#region src/onchain/market/adapters/contracts/AccountMigratorAdapterContract.ts
4
4
  const abi = accountMigratorAbi;
5
5
  const protocolAbi = accountMigratorAbi;
@@ -1,6 +1,6 @@
1
- import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
2
1
  import { MissingSerializedParamsError } from "../../../base/errors.js";
3
2
  import "../../../base/index.js";
3
+ import { ierc4626AdapterAbi } from "../../../../abi/ierc4626Adapter.js";
4
4
  import { iERC4626Abi } from "../abi/targetContractAbi.js";
5
5
  import { fnSigToName, swapFromTransfers } from "../transferHelpers.js";
6
6
  import { AbstractAdapterContract } from "./AbstractAdapter.js";
@@ -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/onchain/market/credit/CreditFacadeV310BaseContract.ts
6
6
  const abi = [
7
7
  ...iCreditFacadeV310Abi,
@@ -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";
@@ -8,6 +7,7 @@ import "../../utils/index.js";
8
7
  import { SdkRWADataNotLoadedError } from "../../core/errors.js";
9
8
  import { BaseContract } from "../../base/BaseContract.js";
10
9
  import "../../base/index.js";
10
+ import { iPausableAbi } from "../../../abi/iPausable.js";
11
11
  //#region src/onchain/market/pool/PoolV310Contract.ts
12
12
  const abi = [...iPoolV310Abi, ...iPausableAbi];
13
13
  var PoolV310Contract = class extends BaseContract {
@@ -1,6 +1,6 @@
1
- import { iVersionAbi } from "../../../abi/iVersion.js";
2
1
  import { bytes32ToString } from "../../utils/bytes32ToString.js";
3
2
  import "../../utils/index.js";
3
+ import { iVersionAbi } from "../../../abi/iVersion.js";
4
4
  import { iMidasDegenNFTAbi } from "../../../abi/rwa/iMidasDegenNFT.js";
5
5
  import { DEGEN_NFT_MIDAS } from "./midas/constants.js";
6
6
  import { MidasDegenNFT } from "./midas/MidasDegenNFT.js";
@@ -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/onchain/market/zapper/IETHZapperContract.ts
4
4
  const abi = iethZapperAbi;
5
5
  var IETHZapperContract = class extends ZapperContract {
@@ -1,8 +1,8 @@
1
- import { iZapperAbi } from "../../../abi/iZapper.js";
2
1
  import { BaseContract } from "../../base/BaseContract.js";
3
2
  import "../../base/index.js";
4
3
  import { sdkErr, sdkOk } from "../../../model/result.js";
5
4
  import "../../../model/index.js";
5
+ import { iZapperAbi } from "../../../abi/iZapper.js";
6
6
  //#region src/onchain/market/zapper/ZapperContract.ts
7
7
  /**
8
8
  * Base contract for every Gearbox zapper. Specialized zappers (e.g.
@@ -1,8 +1,8 @@
1
- import { ierc20Abi } from "../../../abi/iERC20.js";
2
- import { iZapperAbi } from "../../../abi/iZapper.js";
3
1
  import { iPoolV310Abi } from "../../../abi/310/generated.js";
2
+ import { ierc20Abi } from "../../../abi/iERC20.js";
4
3
  import { sdkErr, sdkOk } from "../../../model/result.js";
5
4
  import "../../../model/index.js";
5
+ import { iZapperAbi } from "../../../abi/iZapper.js";
6
6
  //#region src/onchain/preview/preview/previewPoolPositionOperation.ts
7
7
  function previewRead(operation) {
8
8
  switch (operation.operation) {
@@ -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";
@@ -13,6 +13,7 @@ import { isRateLimitError } from "./isRateLimitError.js";
13
13
  import { isTransientError } from "./isTransientError.js";
14
14
  import { DEFAULT_MIDAS_ADMIN, GreenlistMidasGatewayProps, RWAKycFailure, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, getSecuritizeAdmin, greenlistMidasGateway, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor } from "./kycUtils.js";
15
15
  import { LogSplitterTransportOptions, isRangeError, logSplitterTransport } from "./logSplitterTransport.js";
16
+ import { LowerHealthFactorOptions, LoweredHealthFactor, lowerHealthFactor } from "./lowerHealthFactor.js";
16
17
  import { setLTZero, setLTs } from "./ltUtils.js";
17
18
  import { MidasCreditSuite, RestoreMidasIssuanceVaultPause, UnpauseMidasIssuanceVaultProps, discoverMidasCreditSuites, discoverMidasGateways, discoverMidasMTokens, unpauseMidasIssuanceVault } from "./midasUtils.js";
18
19
  import { migrateFaucet } from "./migrateFaucet.js";
@@ -26,4 +27,4 @@ import { EnableDSTokenBackDatingProps, RestoreDSTokenBackDating, claimDSToken, c
26
27
  import { httpTransportOptionsSchema } from "./transports.js";
27
28
  import { ONCHAIN_EXECUTION_ID_ADDRESS, VerifyTestnetParams, verifyTestnet } from "./verifyTestnet.js";
28
29
  import { MakePendingWithdrawalsClaimableOptions, makePendingWithdrawalsClaimable } from "./withdrawalUtils.js";
29
- export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DEFAULT_MIDAS_ADMIN, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, MakePendingWithdrawalsClaimableOptions, MidasCreditSuite, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult, ProviderConfig, ProviderStatus, RWAKycFailure, RateLimitOptions, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, ReplaceStorageParams, ResilientTransportOptions, RestoreDSTokenBackDating, RestoreMidasIssuanceVaultPause, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, RpcErrorResult, RpcProvider, RpcResponse, RpcSuccessResult, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, TargetAccount, UnpauseMidasIssuanceVaultProps, VerifyTestnetParams, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, discoverMidasCreditSuites, discoverMidasGateways, discoverMidasMTokens, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getSecuritizeAdmin, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, rateLimitOptionsSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeContractSync };
30
+ export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DEFAULT_MIDAS_ADMIN, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, LowerHealthFactorOptions, LoweredHealthFactor, MakePendingWithdrawalsClaimableOptions, MidasCreditSuite, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult, ProviderConfig, ProviderStatus, RWAKycFailure, RateLimitOptions, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, ReplaceStorageParams, ResilientTransportOptions, RestoreDSTokenBackDating, RestoreMidasIssuanceVaultPause, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, RpcErrorResult, RpcProvider, RpcResponse, RpcSuccessResult, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, TargetAccount, UnpauseMidasIssuanceVaultProps, VerifyTestnetParams, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, discoverMidasCreditSuites, discoverMidasGateways, discoverMidasMTokens, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getSecuritizeAdmin, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iFaucetAbi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, lowerHealthFactor, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, rateLimitOptionsSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeContractSync };
@@ -0,0 +1,34 @@
1
+ import { ILogger } from "../onchain/types/logger.js";
2
+ import { CreditAccountData } from "../onchain/base/types.js";
3
+ import { OnchainSDK } from "../onchain/OnchainSDK.js";
4
+ import "../onchain/index.js";
5
+ import { AnvilClient } from "./createAnvilClient.js";
6
+ import { Address } from "viem";
7
+ //#region src/dev/lowerHealthFactor.d.ts
8
+ export interface LowerHealthFactorOptions {
9
+ /**
10
+ * Target health factor in bps, defaults to 9990
11
+ */
12
+ hf?: bigint;
13
+ logger?: ILogger;
14
+ }
15
+ /**
16
+ * Result of {@link lowerHealthFactor}
17
+ */
18
+ export interface LoweredHealthFactor {
19
+ /**
20
+ * Credit account re-read after LTs were lowered
21
+ */
22
+ account: CreditAccountData;
23
+ /**
24
+ * LTs before the change, same keys as `newLTs`
25
+ */
26
+ oldLTs: Record<Address, number>;
27
+ newLTs: Record<Address, number>;
28
+ }
29
+ /**
30
+ * Lowers liquidation thresholds of credit account's credit manager on anvil, so that account's health factor drops to `hf`.
31
+ * Does not update LTs held in sdk's cached credit manager state.
32
+ */
33
+ export declare function lowerHealthFactor(anvil: AnvilClient, sdk: OnchainSDK, ca: CreditAccountData, options?: LowerHealthFactorOptions): Promise<LoweredHealthFactor>;
34
+ //#endregion
@@ -1,6 +1,6 @@
1
- import { ChainId, Token } from "./primitives.js";
1
+ import { ChainId, Token, UnderlyingToken } from "./primitives.js";
2
2
  import { ChartRange, ProtocolChartMetric } from "./charts.js";
3
- import { CuratorName } from "./curators.js";
3
+ import { Curator, CuratorName } from "./curators.js";
4
4
  import { ChainScopedFilter, Filterable } from "./filters.js";
5
5
  import { PoolPosition, PositionFilter, StrategyPosition } from "./positions.js";
6
6
  import { LiquidationPosition } from "./liquidations.js";
@@ -36,10 +36,30 @@ export interface AnalyticsContractRef {
36
36
  /** Address of the pool, credit manager or token contract. */
37
37
  address: Address;
38
38
  }
39
- /** A pool or credit manager choice with a display name for a filter UI. */
39
+ /**
40
+ * A pool or credit manager choice for a filter UI: a display name plus the
41
+ * market details an opportunity reports for the same contract.
42
+ **/
40
43
  export interface AnalyticsContractOption extends AnalyticsContractRef {
41
44
  /** Human-readable pool or credit manager name. */
42
45
  name: string;
46
+ /**
47
+ * Underlying of the market the pool or credit manager belongs to, the same
48
+ * value as {@link OpportunityBase.underlyingToken}.
49
+ */
50
+ underlyingToken: UnderlyingToken;
51
+ /**
52
+ * Curator of the market the pool or credit manager belongs to, the same
53
+ * value as {@link OpportunityBase.curator}.
54
+ */
55
+ curator: Curator;
56
+ }
57
+ /** A curator choice for a filter UI. */
58
+ export interface AnalyticsCuratorOption {
59
+ /** Canonical curator name, the value the `curator` filter matches. */
60
+ name: CuratorName;
61
+ /** Link to the curator's page, or `null` when unknown. */
62
+ url: string | null;
43
63
  }
44
64
  /**
45
65
  * Filtering, ordering and offset pagination of the protocol-wide position
@@ -111,8 +131,8 @@ export interface AnalyticsPositionFilterOptions {
111
131
  * reported addresses, with metadata to display each choice.
112
132
  */
113
133
  assets: Token[];
114
- /** Known names of the curators of the positions' markets. */
115
- curators: CuratorName[];
134
+ /** Curators of the positions' markets that have a known name. */
135
+ curators: AnalyticsCuratorOption[];
116
136
  }
117
137
  /**
118
138
  * What one protocol-wide chart read asks for.
@@ -245,6 +245,55 @@ export declare const analyticsContractOptionSchema: z.ZodObject<{
245
245
  chainId: z.ZodNumber;
246
246
  address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
247
247
  name: z.ZodString;
248
+ underlyingToken: z.ZodObject<{
249
+ chainId: z.ZodNumber;
250
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
251
+ symbol: z.ZodString;
252
+ name: z.ZodString;
253
+ decimals: z.ZodNumber;
254
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
255
+ wrappedAddress: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
256
+ }, z.core.$strip>;
257
+ curator: z.ZodObject<{
258
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
259
+ name: z.ZodOptional<z.ZodEnum<{
260
+ "Chaos Labs": "Chaos Labs";
261
+ "Gami Labs": "Gami Labs";
262
+ Hyperithm: "Hyperithm";
263
+ "Invariant Group": "Invariant Group";
264
+ K3: "K3";
265
+ KPK: "KPK";
266
+ "M11 Credit": "M11 Credit";
267
+ Re7: "Re7";
268
+ Securitize: "Securitize";
269
+ TelosC: "TelosC";
270
+ "Testnet Curator": "Testnet Curator";
271
+ Tulipa: "Tulipa";
272
+ UltraYield: "UltraYield";
273
+ cp0x: "cp0x";
274
+ }>>;
275
+ url: z.ZodNullable<z.ZodString>;
276
+ }, z.core.$strip>;
277
+ }, z.core.$strip>;
278
+ /** {@link AnalyticsCuratorOption} */
279
+ export declare const analyticsCuratorOptionSchema: z.ZodObject<{
280
+ name: z.ZodEnum<{
281
+ "Chaos Labs": "Chaos Labs";
282
+ "Gami Labs": "Gami Labs";
283
+ Hyperithm: "Hyperithm";
284
+ "Invariant Group": "Invariant Group";
285
+ K3: "K3";
286
+ KPK: "KPK";
287
+ "M11 Credit": "M11 Credit";
288
+ Re7: "Re7";
289
+ Securitize: "Securitize";
290
+ TelosC: "TelosC";
291
+ "Testnet Curator": "Testnet Curator";
292
+ Tulipa: "Tulipa";
293
+ UltraYield: "UltraYield";
294
+ cp0x: "cp0x";
295
+ }>;
296
+ url: z.ZodNullable<z.ZodString>;
248
297
  }, z.core.$strip>;
249
298
  /** {@link AnalyticsPositionFilterOptions} */
250
299
  export declare const analyticsPositionFilterOptionsSchema: z.ZodObject<{
@@ -252,11 +301,69 @@ export declare const analyticsPositionFilterOptionsSchema: z.ZodObject<{
252
301
  chainId: z.ZodNumber;
253
302
  address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
254
303
  name: z.ZodString;
304
+ underlyingToken: z.ZodObject<{
305
+ chainId: z.ZodNumber;
306
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
307
+ symbol: z.ZodString;
308
+ name: z.ZodString;
309
+ decimals: z.ZodNumber;
310
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
311
+ wrappedAddress: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
312
+ }, z.core.$strip>;
313
+ curator: z.ZodObject<{
314
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
315
+ name: z.ZodOptional<z.ZodEnum<{
316
+ "Chaos Labs": "Chaos Labs";
317
+ "Gami Labs": "Gami Labs";
318
+ Hyperithm: "Hyperithm";
319
+ "Invariant Group": "Invariant Group";
320
+ K3: "K3";
321
+ KPK: "KPK";
322
+ "M11 Credit": "M11 Credit";
323
+ Re7: "Re7";
324
+ Securitize: "Securitize";
325
+ TelosC: "TelosC";
326
+ "Testnet Curator": "Testnet Curator";
327
+ Tulipa: "Tulipa";
328
+ UltraYield: "UltraYield";
329
+ cp0x: "cp0x";
330
+ }>>;
331
+ url: z.ZodNullable<z.ZodString>;
332
+ }, z.core.$strip>;
255
333
  }, z.core.$strip>>;
256
334
  creditManagers: z.ZodArray<z.ZodObject<{
257
335
  chainId: z.ZodNumber;
258
336
  address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
259
337
  name: z.ZodString;
338
+ underlyingToken: z.ZodObject<{
339
+ chainId: z.ZodNumber;
340
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
341
+ symbol: z.ZodString;
342
+ name: z.ZodString;
343
+ decimals: z.ZodNumber;
344
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
345
+ wrappedAddress: z.ZodNullable<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
346
+ }, z.core.$strip>;
347
+ curator: z.ZodObject<{
348
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
349
+ name: z.ZodOptional<z.ZodEnum<{
350
+ "Chaos Labs": "Chaos Labs";
351
+ "Gami Labs": "Gami Labs";
352
+ Hyperithm: "Hyperithm";
353
+ "Invariant Group": "Invariant Group";
354
+ K3: "K3";
355
+ KPK: "KPK";
356
+ "M11 Credit": "M11 Credit";
357
+ Re7: "Re7";
358
+ Securitize: "Securitize";
359
+ TelosC: "TelosC";
360
+ "Testnet Curator": "Testnet Curator";
361
+ Tulipa: "Tulipa";
362
+ UltraYield: "UltraYield";
363
+ cp0x: "cp0x";
364
+ }>>;
365
+ url: z.ZodNullable<z.ZodString>;
366
+ }, z.core.$strip>;
260
367
  }, z.core.$strip>>;
261
368
  assets: z.ZodArray<z.ZodObject<{
262
369
  chainId: z.ZodNumber;
@@ -266,22 +373,25 @@ export declare const analyticsPositionFilterOptionsSchema: z.ZodObject<{
266
373
  decimals: z.ZodNumber;
267
374
  assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
268
375
  }, z.core.$strip>>;
269
- curators: z.ZodArray<z.ZodEnum<{
270
- "Chaos Labs": "Chaos Labs";
271
- "Gami Labs": "Gami Labs";
272
- Hyperithm: "Hyperithm";
273
- "Invariant Group": "Invariant Group";
274
- K3: "K3";
275
- KPK: "KPK";
276
- "M11 Credit": "M11 Credit";
277
- Re7: "Re7";
278
- Securitize: "Securitize";
279
- TelosC: "TelosC";
280
- "Testnet Curator": "Testnet Curator";
281
- Tulipa: "Tulipa";
282
- UltraYield: "UltraYield";
283
- cp0x: "cp0x";
284
- }>>;
376
+ curators: z.ZodArray<z.ZodObject<{
377
+ name: z.ZodEnum<{
378
+ "Chaos Labs": "Chaos Labs";
379
+ "Gami Labs": "Gami Labs";
380
+ Hyperithm: "Hyperithm";
381
+ "Invariant Group": "Invariant Group";
382
+ K3: "K3";
383
+ KPK: "KPK";
384
+ "M11 Credit": "M11 Credit";
385
+ Re7: "Re7";
386
+ Securitize: "Securitize";
387
+ TelosC: "TelosC";
388
+ "Testnet Curator": "Testnet Curator";
389
+ Tulipa: "Tulipa";
390
+ UltraYield: "UltraYield";
391
+ cp0x: "cp0x";
392
+ }>;
393
+ url: z.ZodNullable<z.ZodString>;
394
+ }, z.core.$strip>>;
285
395
  }, z.core.$strip>;
286
396
  /** Chain scope of a filter-options read, shared by the client and backend. */
287
397
  export declare const analyticsPositionFilterOptionsQuerySchema: z.ZodCodec<z.ZodObject<{
@@ -15,8 +15,8 @@ import { ApyBreakdown, Opportunity, OpportunityBase, OpportunityDetail, Opportun
15
15
  import { BorrowRateBreakdown, PnlBreakdown, PointsProgramPnL, PointsRewardsPnL, PoolPosition, PoolPositionKey, PoolPositionRef, Position, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, PositionTransaction, PositionTransactionKind, PositionsTotals, RewardsPnL, STRATEGY_POSITION_COLLATERAL_ERROR, StrategyPosition, StrategyPositionKey, StrategyPositionRef, TokenQuotaRate, TokenRewardsPnL, liquidationPositionId, matchesPositionFilter, poolPositionId, positionId, strategyPositionId } from "./positions.js";
16
16
  import { AccountHoldings, AccountMetrics, AccountProjection, AccountStateChange, AdjustStrategyPositionPreview, CreditOperationMarket, DelayedStrategyPositionOperationPreview, Estimated, EstimatedProjection, ExitStrategyPositionPreview, InstantStrategyPositionOperationPreview, OpenStrategyPositionPreview, OperationPreview, PoolOperationType, PoolPositionOperationPreview, PreviewOperationInput, PreviewOperationOptions, RepayStrategyPositionPreview, RoutedField, asEstimated } from "./previews.js";
17
17
  import { DelayedReceivedAsset, InstantReceivedAsset, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, ReceivedAsset, matchesLiquidatableAccountFilter } from "./liquidations.js";
18
- import { AnalyticsChartQuery, AnalyticsContractOption, AnalyticsContractRef, AnalyticsLiquidationPosition, AnalyticsPoolPosition, AnalyticsPosition, AnalyticsPositionFilterOptions, AnalyticsPositionListOptions, AnalyticsPositionOwner, AnalyticsPositionPage, AnalyticsPositionSortField, AnalyticsSortDirection, AnalyticsStrategyPosition } from "./analytics.js";
19
- import { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsContractOptionSchema, analyticsContractRefSchema, analyticsPositionFilterOptionsQuerySchema, analyticsPositionFilterOptionsSchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema } from "./analytics.schema.js";
18
+ import { AnalyticsChartQuery, AnalyticsContractOption, AnalyticsContractRef, AnalyticsCuratorOption, AnalyticsLiquidationPosition, AnalyticsPoolPosition, AnalyticsPosition, AnalyticsPositionFilterOptions, AnalyticsPositionListOptions, AnalyticsPositionOwner, AnalyticsPositionPage, AnalyticsPositionSortField, AnalyticsSortDirection, AnalyticsStrategyPosition } from "./analytics.js";
19
+ import { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsContractOptionSchema, analyticsContractRefSchema, analyticsCuratorOptionSchema, analyticsPositionFilterOptionsQuerySchema, analyticsPositionFilterOptionsSchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema } from "./analytics.schema.js";
20
20
  import { chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, poolOpportunityChartMetricSchema, poolPositionChartMetricSchema, protocolChartMetricSchema, strategyOpportunityChartMetricSchema, strategyPositionChartMetricSchema } from "./charts.schema.js";
21
21
  import { CompareTag, CompareTolerance, ToleranceCompareTag, backendPreferred, compareTagOf, offchainOnly, onchainOnly, tolerance } from "./compare.schema.js";
22
22
  import { curatorNameSchema, curatorSchema } from "./curators.schema.js";
@@ -34,4 +34,4 @@ import { MerklReward, PointsReward, Reward } from "./rewards.js";
34
34
  import { kycRequirementSchema, rwaProtocolSchema } from "./rwa.schema.js";
35
35
  import { PositionClaimableWithdrawal, PositionPendingWithdrawal, PositionWithdrawals, WithdrawalOutputAmount } from "./withdrawals.js";
36
36
  import { positionClaimableWithdrawalSchema, positionPendingWithdrawalSchema, positionWithdrawalsSchema, withdrawalOutputAmountSchema } from "./withdrawals.schema.js";
37
- export { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, AccountHoldings, AccountMetrics, AccountNotMidasGreenlistedError, AccountProjection, AccountStateChange, AdjustStrategyPositionPreview, Amount, AnalyticsChartQuery, AnalyticsContractOption, AnalyticsContractRef, AnalyticsLiquidationPosition, AnalyticsPoolPosition, AnalyticsPosition, AnalyticsPositionFilterOptions, AnalyticsPositionListOptions, AnalyticsPositionOwner, AnalyticsPositionPage, AnalyticsPositionSortField, AnalyticsSortDirection, AnalyticsStrategyPosition, ApyBreakdown, Asset, AssetType, BorrowLimitCause, BorrowRateBreakdown, Bps, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, ChainFailed, ChainId, ChainMetadata, ChainScoped, ChainScopedFilter, ChainSucceeded, ChartBundle, ChartDenomination, ChartMetric, ChartQuery, ChartRange, ChartSeries, ChartSeriesOk, ChartSeriesUnavailable, ChartUnavailableCode, ChartUnit, ChartValue, ChartWindow, CollateralLimits, CompareTag, CompareTolerance, CreditAccountFrozenError, CreditAccountNotEmptyError, CreditAccountNotFoundError, CreditManagerPausedError, CreditOperationMarket, Curator, CuratorName, DataResponse, DataSource, DebtOutOfRangeError, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedReceivedAsset, DelayedStrategyPositionOperationPreview, DelayedWithdrawCollateralIntent, Estimated, EstimatedProjection, ExitStrategyPositionPreview, FILTER_ALL, FilterAll, Filterable, ForbiddenTokenError, GridSampling, IGearboxError, InstantReceivedAsset, InstantStrategyPositionOperationPreview, InsufficientAllowanceError, InsufficientBalanceError, InsufficientCollateralError, InsufficientPoolLiquidityError, InvalidDelayedIntentError, KYC_REGISTRATION_LINKS, KycProtocol, KycRequirement, Leverage, LeverageLimits, LeverageOutOfRangeError, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, LiquidatorNotEligibleError, MalformedTransactionError, MarketExpiredError, MerklReward, MidasOpenAccountRequirements, MultipleDelayedWithdrawalsError, NoDelayedRouteError, NoRecordedIntentError, NoStrategyTargetCollateralError, NotEmergencyLiquidatorError, Notice, NoticeKind, NoticeSubject, OpenStrategyPositionPreview, OperationLimitOptions, OperationPreview, Opportunity, OpportunityBase, OpportunityChartMetric, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, OpportunityTotals, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PROTOCOL_CHART_METRICS, PartialLiquidationImpossibleError, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsReward, PointsRewardsPnL, PoolOperationPreviewError, PoolOperationType, PoolOpportunity, PoolOpportunityChartMetric, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPausedError, PoolPosition, PoolPositionChartMetric, PoolPositionKey, PoolPositionOperationPreview, PoolPositionRef, PoolSunsetError, Position, PositionChartMetric, PositionClaimableWithdrawal, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, PositionPendingWithdrawal, PositionTransaction, PositionTransactionKind, PositionWithdrawals, PositionsTotals, PreviewOperationInput, PreviewOperationOptions, PriceFeedData, PriceFeedSummary, ProtocolChartMetric, QuotaAboveMaxError, QuotaAsset, QuotaCountExceededError, QuotaInactiveError, QuotaInputLimits, QuotaLimitReachedError, QuotaUnchangedError, RWAFactoryType, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOpenRequirementsError, RWAOperationArgs, RWAProtocol, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_PROTOCOLS, RateCurve, RateCurvePoint, ReceivedAsset, RepayStrategyPositionPreview, ReservePriceLimitedError, ResponseMetadata, Reward, Rewards, RewardsPnL, RoutedField, SDKError, SDKResult, SDKReturn, SECURITIZE_REGISTER_VAULT_TYPES, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, SafeValue, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, StrategyOpportunity, StrategyOpportunityChartMetric, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionChartMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenQuotaRate, TokenRewards, TokenRewardsPnL, ToleranceCompareTag, TxCall, UnderlyingToken, UnexpectedFailureError, UnpriceableTokenError, UnsupportedCollateralTokenError, UnsupportedOperationError, UnsupportedPoolFunctionError, UnsupportedTargetError, UnsupportedTokenPairError, UnsupportedZapperFunctionError, WithdrawalInProgressError, WithdrawalOutputAmount, accountNotMidasGreenlisted, amountSchema, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsContractOptionSchema, analyticsContractRefSchema, analyticsPositionFilterOptionsQuerySchema, analyticsPositionFilterOptionsSchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, curatorNameSchema, curatorSchema, dataSourceSchema, debtOutOfRange, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, forbiddenToken, instantReceivedAssetSchema, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, isFilterSet, kycRequirementSchema, leverageOutOfRange, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, liquidatorNotEligible, malformedTransaction, marketExpired, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, partialLiquidationImpossible, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPaused, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, poolSunset, positionClaimableWithdrawalSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionPendingWithdrawalSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionWithdrawalsSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, protocolChartMetricSchema, quotaAboveMax, quotaAssetSchema, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, reservePriceLimited, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, rwaOpenRequirementsNotMet, rwaProtocolSchema, safeValue, sdkErr, sdkOk, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress, withdrawalOutputAmountSchema };
37
+ export { ANALYTICS_POSITIONS_DEFAULT_LIMIT, ANALYTICS_POSITIONS_MAX_LIMIT, AccountHoldings, AccountMetrics, AccountNotMidasGreenlistedError, AccountProjection, AccountStateChange, AdjustStrategyPositionPreview, Amount, AnalyticsChartQuery, AnalyticsContractOption, AnalyticsContractRef, AnalyticsCuratorOption, AnalyticsLiquidationPosition, AnalyticsPoolPosition, AnalyticsPosition, AnalyticsPositionFilterOptions, AnalyticsPositionListOptions, AnalyticsPositionOwner, AnalyticsPositionPage, AnalyticsPositionSortField, AnalyticsSortDirection, AnalyticsStrategyPosition, ApyBreakdown, Asset, AssetType, BorrowLimitCause, BorrowRateBreakdown, Bps, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, ChainFailed, ChainId, ChainMetadata, ChainScoped, ChainScopedFilter, ChainSucceeded, ChartBundle, ChartDenomination, ChartMetric, ChartQuery, ChartRange, ChartSeries, ChartSeriesOk, ChartSeriesUnavailable, ChartUnavailableCode, ChartUnit, ChartValue, ChartWindow, CollateralLimits, CompareTag, CompareTolerance, CreditAccountFrozenError, CreditAccountNotEmptyError, CreditAccountNotFoundError, CreditManagerPausedError, CreditOperationMarket, Curator, CuratorName, DataResponse, DataSource, DebtOutOfRangeError, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedReceivedAsset, DelayedStrategyPositionOperationPreview, DelayedWithdrawCollateralIntent, Estimated, EstimatedProjection, ExitStrategyPositionPreview, FILTER_ALL, FilterAll, Filterable, ForbiddenTokenError, GridSampling, IGearboxError, InstantReceivedAsset, InstantStrategyPositionOperationPreview, InsufficientAllowanceError, InsufficientBalanceError, InsufficientCollateralError, InsufficientPoolLiquidityError, InvalidDelayedIntentError, KYC_REGISTRATION_LINKS, KycProtocol, KycRequirement, Leverage, LeverageLimits, LeverageOutOfRangeError, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, LiquidatorNotEligibleError, MalformedTransactionError, MarketExpiredError, MerklReward, MidasOpenAccountRequirements, MultipleDelayedWithdrawalsError, NoDelayedRouteError, NoRecordedIntentError, NoStrategyTargetCollateralError, NotEmergencyLiquidatorError, Notice, NoticeKind, NoticeSubject, OpenStrategyPositionPreview, OperationLimitOptions, OperationPreview, Opportunity, OpportunityBase, OpportunityChartMetric, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, OpportunityTotals, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PROTOCOL_CHART_METRICS, PartialLiquidationImpossibleError, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsReward, PointsRewardsPnL, PoolOperationPreviewError, PoolOperationType, PoolOpportunity, PoolOpportunityChartMetric, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPausedError, PoolPosition, PoolPositionChartMetric, PoolPositionKey, PoolPositionOperationPreview, PoolPositionRef, PoolSunsetError, Position, PositionChartMetric, PositionClaimableWithdrawal, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, PositionPendingWithdrawal, PositionTransaction, PositionTransactionKind, PositionWithdrawals, PositionsTotals, PreviewOperationInput, PreviewOperationOptions, PriceFeedData, PriceFeedSummary, ProtocolChartMetric, QuotaAboveMaxError, QuotaAsset, QuotaCountExceededError, QuotaInactiveError, QuotaInputLimits, QuotaLimitReachedError, QuotaUnchangedError, RWAFactoryType, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOpenRequirementsError, RWAOperationArgs, RWAProtocol, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_PROTOCOLS, RateCurve, RateCurvePoint, ReceivedAsset, RepayStrategyPositionPreview, ReservePriceLimitedError, ResponseMetadata, Reward, Rewards, RewardsPnL, RoutedField, SDKError, SDKResult, SDKReturn, SECURITIZE_REGISTER_VAULT_TYPES, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, SafeValue, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, StrategyOpportunity, StrategyOpportunityChartMetric, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionChartMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenQuotaRate, TokenRewards, TokenRewardsPnL, ToleranceCompareTag, TxCall, UnderlyingToken, UnexpectedFailureError, UnpriceableTokenError, UnsupportedCollateralTokenError, UnsupportedOperationError, UnsupportedPoolFunctionError, UnsupportedTargetError, UnsupportedTokenPairError, UnsupportedZapperFunctionError, WithdrawalInProgressError, WithdrawalOutputAmount, accountNotMidasGreenlisted, amountSchema, analyticsChartQueryOptionsSchema, analyticsChartQueryParamsSchema, analyticsChartQuerySchema, analyticsContractOptionSchema, analyticsContractRefSchema, analyticsCuratorOptionSchema, analyticsPositionFilterOptionsQuerySchema, analyticsPositionFilterOptionsSchema, analyticsPositionListOptionsSchema, analyticsPositionListQueryParamsSchema, analyticsPositionListQuerySchema, analyticsPositionPageSchema, analyticsPositionSchema, analyticsPositionSortFieldSchema, analyticsSortDirectionSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, creditAccountFrozen, creditAccountNotEmpty, creditAccountNotFound, creditManagerPaused, curatorNameSchema, curatorSchema, dataSourceSchema, debtOutOfRange, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, forbiddenToken, instantReceivedAssetSchema, insufficientAllowance, insufficientBalance, insufficientCollateral, insufficientPoolLiquidity, isFilterSet, kycRequirementSchema, leverageOutOfRange, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, liquidatorNotEligible, malformedTransaction, marketExpired, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, multipleDelayedWithdrawals, noDelayedRoute, noRecordedIntent, noStrategyTargetCollateral, notEmergencyLiquidator, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, partialLiquidationImpossible, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPaused, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, poolSunset, positionClaimableWithdrawalSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionPendingWithdrawalSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionWithdrawalsSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, protocolChartMetricSchema, quotaAboveMax, quotaAssetSchema, quotaCountExceeded, quotaInactive, quotaLimitReached, quotaUnchanged, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, reservePriceLimited, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, rwaOpenRequirementsNotMet, rwaProtocolSchema, safeValue, sdkErr, sdkOk, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema, unexpectedFailure, unpriceableTokenError, unsupportedCollateralToken, unsupportedTokenPair, withdrawalInProgress, withdrawalOutputAmountSchema };
@@ -95,10 +95,9 @@ export interface LiquidatableAccount extends CreditOperationMarket {
95
95
  rwa: boolean;
96
96
  /**
97
97
  * Whether the account can be partially liquidated with default parameters.
98
- * `false` for RWA markets, for accounts without seizable non-underlying
99
- * collateral, for accounts that are neither unhealthy nor expired, and when
100
- * no partial liquidation brings the account to the target health factor
101
- * without leaving it with less than the minimum debt.
98
+ *
99
+ * Independent of the liquidator: a KYC gate (e.g. Midas greenlist) is
100
+ * reported by {@link LiquidationDetails.isLiquidatorEligible}, not here.
102
101
  *
103
102
  * A local estimate, not onchain read.
104
103
  **/
@@ -43,11 +43,12 @@ export declare class LiquidationsService extends SDKConstruct {
43
43
  * full one: what the liquidator pays, what it receives and what it must
44
44
  * approve, plus {@link LiquidationDetails.isPartiallyLiquidatable}.
45
45
  *
46
- * A local estimate from the synced oracle state, without fresh price
47
- * updates. Parameters left out of `props` are derived from current state.
46
+ * A local estimate, not onchain read: no price feed updates are applied, so
47
+ * `ignoreReservePrices` has no effect here.
48
+ * Parameters left out of `props` are derived from current state.
48
49
  *
49
- * @throws For RWA markets, for a withdrawal phantom `tokenOut`, and when no
50
- * `tokenOut` can be picked.
50
+ * @throws For markets with a wrapped RWA underlying (Securitize), for a
51
+ * `tokenOut` that cannot be seized, and when no `tokenOut` can be picked.
51
52
  **/
52
53
  getPartialLiquidationDetails(props: GetPartialLiquidationDetailsProps): Promise<LiquidationDetails>;
53
54
  /**
@@ -56,18 +57,16 @@ export declare class LiquidationsService extends SDKConstruct {
56
57
  * discounted collateral sent to the liquidator. Parameters left out of
57
58
  * `props` are derived from current state.
58
59
  *
59
- * @throws For RWA markets, for a withdrawal phantom `tokenOut`, when no
60
- * `tokenOut` can be picked, and when the account cannot be partially
61
- * liquidated, see {@link LiquidationDetails.isPartiallyLiquidatable}.
60
+ * @throws For markets with a wrapped RWA underlying (Securitize), for a
61
+ * `tokenOut` that cannot be seized, when no `tokenOut` can be picked, and
62
+ * when the account cannot be partially liquidated, see
63
+ * {@link LiquidationDetails.isPartiallyLiquidatable}.
62
64
  **/
63
65
  buildPartialLiquidationTx(props: BuildPartialLiquidationTxProps): Promise<TxCall>;
64
66
  /**
65
67
  * Optimal partial liquidation of a credit account: the collateral to seize
66
68
  * and the amounts that bring its health factor close to `optimalHF`.
67
69
  *
68
- * Prices come from the last synced oracle state and `ca`, not from fresh
69
- * price updates. Withdrawal phantom tokens are never seized.
70
- *
71
70
  * @param ca - Credit account to partially liquidate.
72
71
  * @param optimalHF - Health factor to aim for, in basis points. Defaults to
73
72
  * {@link CreditSuite.optimalHFForPartialLiquidation}.
@@ -46,16 +46,15 @@ export interface GetLiquidationDetailsPropsBase {
46
46
  **/
47
47
  creditAccount: Address;
48
48
  /**
49
- * Liquidator wallet address, used by the liquidation compressor to check
50
- * KYC eligibility. When omitted, the zero address is used: amounts and
51
- * received assets are unaffected, but {@link LiquidationDetails.isLiquidatorEligible}
52
- * then only tells whether the liquidation is KYC-gated at all
53
- * (see {@link LiquidationDetails.kycProtocol}).
49
+ * Liquidator wallet address, used to check KYC eligibility. Amounts and
50
+ * received assets are unaffected. When omitted,
51
+ * {@link LiquidationDetails.isLiquidatorEligible} only tells whether the
52
+ * liquidation is KYC-gated at all (see {@link LiquidationDetails.kycProtocol}).
54
53
  **/
55
54
  liquidator?: Address;
56
55
  /**
57
56
  * If true, reserve price feed updates are excluded from the price updates
58
- * applied by the compressor before computing amounts.
57
+ * applied before computing amounts.
59
58
  **/
60
59
  ignoreReservePrices?: boolean;
61
60
  /**
@@ -85,7 +84,7 @@ export interface BuildLiquidationTxPropsBase {
85
84
  liquidator: Address;
86
85
  /**
87
86
  * If true, reserve price feed updates are excluded from the price updates
88
- * applied by the compressor before building the transaction.
87
+ * applied before building the transaction.
89
88
  **/
90
89
  ignoreReservePrices?: boolean;
91
90
  /**
@@ -156,16 +155,7 @@ export interface FullyLiquidateResult {
156
155
  * Parameters left out are derived from current state, see
157
156
  * {@link PartialLiquidationParams}.
158
157
  **/
159
- export interface GetPartialLiquidationDetailsPropsBase extends Partial<PartialLiquidationParams> {
160
- /**
161
- * Credit account to partially liquidate.
162
- **/
163
- creditAccount: Address;
164
- /**
165
- * Block to read at. Defaults to the latest block.
166
- **/
167
- blockNumber?: bigint;
168
- }
158
+ export interface GetPartialLiquidationDetailsPropsBase extends GetLiquidationDetailsPropsBase, Partial<PartialLiquidationParams> {}
169
159
  /**
170
160
  * Props for {@link LiquidationsService.getPartialLiquidationDetails}.
171
161
  *
@@ -179,21 +169,7 @@ export type GetPartialLiquidationDetailsProps<Multichain extends boolean = false
179
169
  * Parameters left out are derived from current state, see
180
170
  * {@link PartialLiquidationParams}.
181
171
  **/
182
- export interface BuildPartialLiquidationTxPropsBase extends Partial<PartialLiquidationParams> {
183
- /**
184
- * Credit account to partially liquidate.
185
- **/
186
- creditAccount: Address;
187
- /**
188
- * Liquidator wallet address. Required: it is encoded into the transaction
189
- * as the receiver of the seized collateral.
190
- **/
191
- liquidator: Address;
192
- /**
193
- * Block to read at. Defaults to the latest block.
194
- **/
195
- blockNumber?: bigint;
196
- }
172
+ export interface BuildPartialLiquidationTxPropsBase extends BuildLiquidationTxPropsBase, Partial<PartialLiquidationParams> {}
197
173
  /**
198
174
  * Props for {@link LiquidationsService.buildPartialLiquidationTx}.
199
175
  *
@@ -233,7 +209,8 @@ export interface PartialLiquidationParams {
233
209
  /**
234
210
  * Collateral token to seize.
235
211
  * Defaults to the most valuable enabled non-underlying collateral token
236
- * (by oracle), excluding withdrawal phantom tokens
212
+ * (by oracle), excluding withdrawal phantom tokens and phantom tokens that
213
+ * unwrap to the underlying
237
214
  */
238
215
  tokenOut: Address;
239
216
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "17.13.0-next.8",
3
+ "version": "18.0.0-next.1",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "repository": {