@gearbox-protocol/sdk 14.12.0-next.54 → 14.12.0-next.55

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 (53) hide show
  1. package/dist/cjs/abi/rwa/iMidasLiquidatorV311.js +96 -0
  2. package/dist/cjs/abi/rwa/iSecuritizeLiquidatorV311.js +111 -0
  3. package/dist/cjs/sdk/base/BaseContract.js +26 -0
  4. package/dist/cjs/sdk/base/ChainContractsRegister.js +24 -0
  5. package/dist/cjs/sdk/index.js +12 -1
  6. package/dist/cjs/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
  7. package/dist/cjs/sdk/market/index.js +7 -0
  8. package/dist/cjs/sdk/market/rwa/index.js +8 -0
  9. package/dist/cjs/sdk/market/rwa/midas/MidasLiquidator.js +43 -0
  10. package/dist/cjs/sdk/market/rwa/midas/constants.js +5 -0
  11. package/dist/cjs/sdk/market/rwa/midas/index.js +5 -0
  12. package/dist/cjs/sdk/market/rwa/securitize/SecuritizeLiquidator.js +31 -0
  13. package/dist/cjs/sdk/market/rwa/securitize/constants.js +2 -0
  14. package/dist/cjs/sdk/market/rwa/securitize/index.js +3 -0
  15. package/dist/cjs/sdk/utils/viem/cast.js +20 -15
  16. package/dist/cjs/sdk/utils/viem/index.js +4 -0
  17. package/dist/cjs/sdk/utils/viem/simulateCall.js +82 -0
  18. package/dist/esm/abi/rwa/iMidasLiquidatorV311.js +95 -0
  19. package/dist/esm/abi/rwa/iSecuritizeLiquidatorV311.js +110 -0
  20. package/dist/esm/permissionless/bindings/factory/credit-factory.js +1 -1
  21. package/dist/esm/preview/index.js +5 -5
  22. package/dist/esm/sdk/base/BaseContract.js +26 -0
  23. package/dist/esm/sdk/base/ChainContractsRegister.js +24 -0
  24. package/dist/esm/sdk/index.js +7 -3
  25. package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
  26. package/dist/esm/sdk/market/index.js +5 -2
  27. package/dist/esm/sdk/market/rwa/index.js +6 -2
  28. package/dist/esm/sdk/market/rwa/midas/MidasLiquidator.js +43 -0
  29. package/dist/esm/sdk/market/rwa/midas/constants.js +4 -0
  30. package/dist/esm/sdk/market/rwa/midas/index.js +3 -0
  31. package/dist/esm/sdk/market/rwa/securitize/SecuritizeLiquidator.js +31 -0
  32. package/dist/esm/sdk/market/rwa/securitize/constants.js +2 -1
  33. package/dist/esm/sdk/market/rwa/securitize/index.js +3 -2
  34. package/dist/esm/sdk/utils/viem/cast.js +20 -16
  35. package/dist/esm/sdk/utils/viem/index.js +3 -2
  36. package/dist/esm/sdk/utils/viem/simulateCall.js +80 -0
  37. package/dist/types/abi/rwa/iMidasLiquidatorV311.d.ts +83 -0
  38. package/dist/types/abi/rwa/iSecuritizeLiquidatorV311.d.ts +95 -0
  39. package/dist/types/sdk/base/BaseContract.d.ts +13 -0
  40. package/dist/types/sdk/base/ChainContractsRegister.d.ts +15 -0
  41. package/dist/types/sdk/index.d.ts +7 -3
  42. package/dist/types/sdk/market/index.d.ts +5 -2
  43. package/dist/types/sdk/market/rwa/index.d.ts +6 -2
  44. package/dist/types/sdk/market/rwa/midas/MidasLiquidator.d.ts +93 -0
  45. package/dist/types/sdk/market/rwa/midas/constants.d.ts +4 -0
  46. package/dist/types/sdk/market/rwa/midas/index.d.ts +3 -0
  47. package/dist/types/sdk/market/rwa/securitize/SecuritizeLiquidator.d.ts +104 -0
  48. package/dist/types/sdk/market/rwa/securitize/constants.d.ts +2 -1
  49. package/dist/types/sdk/market/rwa/securitize/index.d.ts +3 -2
  50. package/dist/types/sdk/utils/viem/cast.d.ts +6 -1
  51. package/dist/types/sdk/utils/viem/index.d.ts +3 -2
  52. package/dist/types/sdk/utils/viem/simulateCall.d.ts +57 -0
  53. package/package.json +1 -1
@@ -1,22 +1,26 @@
1
1
  //#region src/sdk/utils/viem/cast.ts
2
- function generateCastTraceCall(params, rpcUrl) {
3
- const { to, data, blockNumber, gas, gasPrice, maxPriorityFeePerGas, value } = params;
4
- const cmd = [
5
- "cast",
6
- "call",
7
- "--trace"
8
- ];
9
- if (rpcUrl) cmd.push("--rpc-url", rpcUrl);
10
- if (blockNumber) cmd.push("--block", blockNumber.toString());
11
- if (gas) cmd.push("--gas-limit", gas.toString());
12
- if (gasPrice) cmd.push("--gas-price", gasPrice.toString());
13
- if (maxPriorityFeePerGas) cmd.push("priority-gas-price", maxPriorityFeePerGas.toString());
14
- if (value) cmd.push("--value", value.toString());
2
+ /**
3
+ * Builds the argument list of a `cast call --trace` command reproducing the call,
4
+ * without the leading `cast` binary, so that it can be spawned directly.
5
+ */
6
+ function getCastTraceArgs(params, rpcUrl) {
7
+ const { to, data, account, blockNumber, gas, gasPrice, maxPriorityFeePerGas, value } = params;
8
+ const args = ["call", "--trace"];
9
+ if (rpcUrl) args.push("--rpc-url", rpcUrl);
10
+ if (account) args.push("--from", typeof account === "string" ? account : account.address);
11
+ if (blockNumber) args.push("--block", blockNumber.toString());
12
+ if (gas) args.push("--gas-limit", gas.toString());
13
+ if (gasPrice) args.push("--gas-price", gasPrice.toString());
14
+ if (maxPriorityFeePerGas) args.push("--priority-gas-price", maxPriorityFeePerGas.toString());
15
+ if (value) args.push("--value", value.toString());
15
16
  return [
16
- ...cmd,
17
+ ...args,
17
18
  to,
18
19
  data
19
- ].join(" ");
20
+ ].filter(Boolean);
21
+ }
22
+ function generateCastTraceCall(params, rpcUrl) {
23
+ return ["cast", ...getCastTraceArgs(params, rpcUrl)].join(" ");
20
24
  }
21
25
  //#endregion
22
- export { generateCastTraceCall };
26
+ export { generateCastTraceCall, getCastTraceArgs };
@@ -1,7 +1,8 @@
1
- import { generateCastTraceCall } from "./cast.js";
1
+ import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
2
+ import { SimulationError, simulateCall } from "./simulateCall.js";
2
3
  import { simulateMulticall } from "./simulateMulticall.js";
3
4
  import { SimulateWithPriceUpdatesError, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./simulateWithPriceUpdates.js";
4
5
  import { executeDelegatedMulticalls } from "./executeDelegatedMulticalls.js";
5
6
  import { estimateRawTxGas, sendRawTx } from "./sendRawTx.js";
6
7
  import { watchBlocksAsync } from "./watchBlocksAsync.js";
7
- export { SimulateWithPriceUpdatesError, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getSimulateWithPriceUpdatesError, sendRawTx, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
8
+ export { SimulateWithPriceUpdatesError, SimulationError, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getCastTraceArgs, getSimulateWithPriceUpdatesError, sendRawTx, simulateCall, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
@@ -0,0 +1,80 @@
1
+ import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
2
+ import { BaseError, decodeFunctionData, getContractError } from "viem";
3
+ import { getAction, parseAccount } from "viem/utils";
4
+ import { call } from "viem/actions";
5
+ //#region src/sdk/utils/viem/simulateCall.ts
6
+ /**
7
+ * Simulates raw calldata with `eth_call`, without encoding or decoding anything on success.
8
+ *
9
+ * Use it when calldata already exists (for example a {@link RawTx} built by the SDK): the happy
10
+ * path is a pure passthrough, and the calldata is only decoded when the call reverts, to build a
11
+ * viem {@link ContractFunctionExecutionError} out of the revert data.
12
+ *
13
+ * @param client - viem client to call with.
14
+ * @param parameters - viem call parameters, plus the ABIs used for error decoding.
15
+ * @throws {@link SimulationError} when the call reverts or the request fails.
16
+ */
17
+ async function simulateCall(client, parameters) {
18
+ const { abis = [], account: account_, ...rest } = parameters;
19
+ const request = {
20
+ ...rest,
21
+ account: account_ ? parseAccount(account_) : client.account
22
+ };
23
+ try {
24
+ const { data } = await getAction(client, call, "call")(request);
25
+ return { data: data ?? "0x" };
26
+ } catch (e) {
27
+ throw new SimulationError(e, request, abis.flat());
28
+ }
29
+ }
30
+ /**
31
+ * Thrown by {@link simulateCall} when a simulation fails.
32
+ *
33
+ * The viem {@link ContractFunctionExecutionError} built from the revert data is kept as `cause`,
34
+ * so `walk()` still finds `ContractFunctionRevertedError` and its decoded (or raw) revert data.
35
+ */
36
+ var SimulationError = class extends BaseError {
37
+ /**
38
+ * The call that failed, kept verbatim so that it can be replayed or traced.
39
+ */
40
+ request;
41
+ constructor(cause, request, abi) {
42
+ const callData = request.data ?? "0x";
43
+ let functionName = callData.slice(0, 10);
44
+ let args = [];
45
+ try {
46
+ const decoded = decodeFunctionData({
47
+ abi,
48
+ data: callData
49
+ });
50
+ functionName = decoded.functionName;
51
+ args = decoded.args ?? [];
52
+ } catch {}
53
+ const account = request.account;
54
+ super(`simulation of ${functionName} at ${request.to} failed`, {
55
+ cause: getContractError(cause, {
56
+ abi,
57
+ address: request.to ?? void 0,
58
+ args,
59
+ functionName,
60
+ sender: typeof account === "string" ? account : account?.address ?? void 0
61
+ }),
62
+ name: "SimulationError"
63
+ });
64
+ this.request = request;
65
+ }
66
+ /**
67
+ * Arguments of a `cast call --trace` command replaying this call, for spawning `cast` directly.
68
+ */
69
+ getCastTraceArgs(rpcUrl) {
70
+ return getCastTraceArgs(this.request, rpcUrl);
71
+ }
72
+ /**
73
+ * Full `cast call --trace` command replaying this call.
74
+ */
75
+ getCastTraceCall(rpcUrl) {
76
+ return generateCastTraceCall(this.request, rpcUrl);
77
+ }
78
+ };
79
+ //#endregion
80
+ export { SimulationError, simulateCall };
@@ -0,0 +1,83 @@
1
+ //#region src/abi/rwa/iMidasLiquidatorV311.d.ts
2
+ declare const iMidasLiquidatorV311Abi: readonly [{
3
+ readonly type: "function";
4
+ readonly name: "contractType";
5
+ readonly inputs: readonly [];
6
+ readonly outputs: readonly [{
7
+ readonly name: "";
8
+ readonly type: "bytes32";
9
+ readonly internalType: "bytes32";
10
+ }];
11
+ readonly stateMutability: "view";
12
+ }, {
13
+ readonly type: "function";
14
+ readonly name: "isTransferAllowed";
15
+ readonly inputs: readonly [{
16
+ readonly name: "redeemerOwner";
17
+ readonly type: "address";
18
+ readonly internalType: "address";
19
+ }];
20
+ readonly outputs: readonly [{
21
+ readonly name: "";
22
+ readonly type: "bool";
23
+ readonly internalType: "bool";
24
+ }];
25
+ readonly stateMutability: "view";
26
+ }, {
27
+ readonly type: "function";
28
+ readonly name: "liquidateWithRedeemerTransfers";
29
+ readonly inputs: readonly [{
30
+ readonly name: "creditAccount";
31
+ readonly type: "address";
32
+ readonly internalType: "address";
33
+ }, {
34
+ readonly name: "gateway";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "calls";
39
+ readonly type: "tuple[]";
40
+ readonly internalType: "struct MultiCall[]";
41
+ readonly components: readonly [{
42
+ readonly name: "target";
43
+ readonly type: "address";
44
+ readonly internalType: "address";
45
+ }, {
46
+ readonly name: "callData";
47
+ readonly type: "bytes";
48
+ readonly internalType: "bytes";
49
+ }];
50
+ }, {
51
+ readonly name: "lossPolicyData";
52
+ readonly type: "bytes";
53
+ readonly internalType: "bytes";
54
+ }];
55
+ readonly outputs: readonly [];
56
+ readonly stateMutability: "nonpayable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly name: "transferableRedeemerOwner";
60
+ readonly inputs: readonly [];
61
+ readonly outputs: readonly [{
62
+ readonly name: "";
63
+ readonly type: "address";
64
+ readonly internalType: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ }, {
68
+ readonly type: "function";
69
+ readonly name: "version";
70
+ readonly inputs: readonly [];
71
+ readonly outputs: readonly [{
72
+ readonly name: "";
73
+ readonly type: "uint256";
74
+ readonly internalType: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly name: "NotValidGatewayException";
80
+ readonly inputs: readonly [];
81
+ }];
82
+ //#endregion
83
+ export { iMidasLiquidatorV311Abi };
@@ -0,0 +1,95 @@
1
+ //#region src/abi/rwa/iSecuritizeLiquidatorV311.d.ts
2
+ declare const iSecuritizeLiquidatorV311Abi: readonly [{
3
+ readonly type: "function";
4
+ readonly name: "contractType";
5
+ readonly inputs: readonly [];
6
+ readonly outputs: readonly [{
7
+ readonly name: "";
8
+ readonly type: "bytes32";
9
+ readonly internalType: "bytes32";
10
+ }];
11
+ readonly stateMutability: "view";
12
+ }, {
13
+ readonly type: "function";
14
+ readonly name: "isTransferAllowed";
15
+ readonly inputs: readonly [{
16
+ readonly name: "redeemerOwner";
17
+ readonly type: "address";
18
+ readonly internalType: "address";
19
+ }];
20
+ readonly outputs: readonly [{
21
+ readonly name: "";
22
+ readonly type: "bool";
23
+ readonly internalType: "bool";
24
+ }];
25
+ readonly stateMutability: "view";
26
+ }, {
27
+ readonly type: "function";
28
+ readonly name: "liquidatePendingRedemption";
29
+ readonly inputs: readonly [{
30
+ readonly name: "creditAccount";
31
+ readonly type: "address";
32
+ readonly internalType: "address";
33
+ }, {
34
+ readonly name: "redemptionGateway";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "priceUpdates";
39
+ readonly type: "tuple[]";
40
+ readonly internalType: "struct PriceUpdate[]";
41
+ readonly components: readonly [{
42
+ readonly name: "priceFeed";
43
+ readonly type: "address";
44
+ readonly internalType: "address";
45
+ }, {
46
+ readonly name: "data";
47
+ readonly type: "bytes";
48
+ readonly internalType: "bytes";
49
+ }];
50
+ }, {
51
+ readonly name: "lossPolicyData";
52
+ readonly type: "bytes";
53
+ readonly internalType: "bytes";
54
+ }];
55
+ readonly outputs: readonly [];
56
+ readonly stateMutability: "nonpayable";
57
+ }, {
58
+ readonly type: "function";
59
+ readonly name: "transferableRedeemerOwner";
60
+ readonly inputs: readonly [];
61
+ readonly outputs: readonly [{
62
+ readonly name: "";
63
+ readonly type: "address";
64
+ readonly internalType: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ }, {
68
+ readonly type: "function";
69
+ readonly name: "version";
70
+ readonly inputs: readonly [];
71
+ readonly outputs: readonly [{
72
+ readonly name: "";
73
+ readonly type: "uint256";
74
+ readonly internalType: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ }, {
78
+ readonly type: "error";
79
+ readonly name: "AccountHasSufficientLiquidityException";
80
+ readonly inputs: readonly [];
81
+ }, {
82
+ readonly type: "error";
83
+ readonly name: "NotValidGatewayException";
84
+ readonly inputs: readonly [];
85
+ }, {
86
+ readonly type: "error";
87
+ readonly name: "StableCoinIsNotConvertibleException";
88
+ readonly inputs: readonly [];
89
+ }, {
90
+ readonly type: "error";
91
+ readonly name: "UnknownCreditAccountException";
92
+ readonly inputs: readonly [];
93
+ }];
94
+ //#endregion
95
+ export { iSecuritizeLiquidatorV311Abi };
@@ -1,3 +1,4 @@
1
+ import { SimulateCallOptions } from "../utils/viem/simulateCall.js";
1
2
  import { IBaseContract, ParsedCall, ParsedCallArgs, ParsedCallV2 } from "./types.js";
2
3
  import { BaseContractStateHuman } from "../types/state-human.js";
3
4
  import { RawTx } from "../types/transactions.js";
@@ -162,6 +163,18 @@ declare class BaseContract<abi extends Abi | readonly unknown[]> extends Constru
162
163
  createRawTx<functionName extends ContractFunctionName<abi> | undefined = undefined>(parameters: Omit<EncodeFunctionDataParameters<abi, functionName>, "abi"> & {
163
164
  description?: string;
164
165
  }): RawTx;
166
+ /**
167
+ * Simulates calldata against this contract with `eth_call`, returning the raw response.
168
+ *
169
+ * Nothing is encoded or decoded on success: pass calldata that already exists (e.g. from
170
+ * {@link createRawTx}) instead of decoding it into a function name and arguments first.
171
+ * On revert, this contract's abi and the shared exception abis are used to decode the error.
172
+ *
173
+ * @param callData - Encoded calldata, passed to the node as-is.
174
+ * @param options - Call options, plus any extra `abis` needed to decode custom errors.
175
+ * @throws {@link SimulationError} when the call reverts or the request fails.
176
+ */
177
+ simulateCall(callData: Hex, options?: SimulateCallOptions<Chain>): Promise<Hex>;
165
178
  /**
166
179
  * Get events in safe manner, by bisecting block range if needed
167
180
  *
@@ -1,4 +1,5 @@
1
1
  import { ILogger } from "../types/logger.js";
2
+ import { SimulateCallOptions } from "../utils/viem/simulateCall.js";
2
3
  import { ParsedCall, ParsedCallV2 } from "./types.js";
3
4
  import { MultiCall } from "../types/transactions.js";
4
5
  import { TokensMeta } from "./TokensMeta.js";
@@ -82,6 +83,20 @@ declare class ChainContractsRegister {
82
83
  * @returns
83
84
  */
84
85
  stringifyFunctionData(address: Address, calldata: Hex): string;
86
+ /**
87
+ * Simulates a transaction with `eth_call`, without encoding or decoding anything on success.
88
+ *
89
+ * When the target is a known contract, its abi and the shared exception abis are used to decode
90
+ * a revert. For an unknown target only `options.abis` are used, so pass the exception abis you
91
+ * care about when simulating contracts the SDK does not know.
92
+ *
93
+ * @param target - Target address.
94
+ * @param callData - Calldata to simulate.
95
+ * @param options - Call options, plus any extra `abis` needed to decode custom errors.
96
+ * @returns Raw bytes returned by the call, `0x` when the function returns nothing.
97
+ * @throws {@link SimulationError} when the call reverts or the request fails.
98
+ */
99
+ simulateCall(target: Address, callData: Hex, options?: SimulateCallOptions<Chain>): Promise<Hex>;
85
100
  /**
86
101
  * Converts multicalls into some human-friendly strings
87
102
  * This method is safe and should not throw
@@ -3,6 +3,7 @@ import { ClaimableWithdrawal, CurrentWithdrawals, DelayedAddCollateralIntent, De
3
3
  import { Curator, GearboxChain, NetworkType, SUPPORTED_NETWORKS, chains, findCuratorMarketConfigurator, getChain, getCuratorName, getNetworkType, isPublicNetwork, isSupportedNetwork } from "./chain/chains.js";
4
4
  import { detectNetwork } from "./chain/detectNetwork.js";
5
5
  import "./chain/index.js";
6
+ import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./utils/viem/simulateCall.js";
6
7
  import { AddressMap } from "./utils/AddressMap.js";
7
8
  import { AddressSet } from "./utils/AddressSet.js";
8
9
  import { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus } from "./base/types.js";
@@ -27,14 +28,17 @@ import "./plugins/index.js";
27
28
  import { IAdapterContract } from "./market/adapters/types.js";
28
29
  import { createAdapter } from "./market/adapters/createAdapter.js";
29
30
  import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./market/adapters/PlaceholderAdapterContracts.js";
30
- import { generateCastTraceCall } from "./utils/viem/cast.js";
31
+ import { RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
32
+ import { MidasLiquidator } from "./market/rwa/midas/MidasLiquidator.js";
33
+ import { generateCastTraceCall, getCastTraceArgs } from "./utils/viem/cast.js";
31
34
  import { DelegatedMulticall, executeDelegatedMulticalls } from "./utils/viem/executeDelegatedMulticalls.js";
32
35
  import { EstimateRawTxGasParameters, SendRawTxParameters, estimateRawTxGas, sendRawTx } from "./utils/viem/sendRawTx.js";
33
36
  import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulticall } from "./utils/viem/simulateMulticall.js";
34
37
  import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./utils/viem/simulateWithPriceUpdates.js";
35
38
  import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./utils/viem/watchBlocksAsync.js";
36
39
  import "./utils/viem/index.js";
37
- import { RWA_FACTORY_SECURITIZE } from "./market/rwa/securitize/constants.js";
40
+ import { RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
41
+ import { SecuritizeLiquidator } from "./market/rwa/securitize/SecuritizeLiquidator.js";
38
42
  import { ClosePathBalances, FindBestClosePathProps, FindClaimAllRewardsProps, FindOneTokenPathProps, FindOpenStrategyPathProps, IRouterContract, OpenStrategyResult, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, SwapOperation } from "./router/types.js";
39
43
  import { createRouter } from "./router/createRouter.js";
40
44
  import { assetsMap } from "./router/helpers.js";
@@ -146,4 +150,4 @@ import { ChainConfig, MultichainAttachOptions, MultichainHydrateOptions, Multich
146
150
  import { MultichainLiquidationsService } from "./accounts/liquidations/MultichainLiquidationsService.js";
147
151
  import "./accounts/index.js";
148
152
  import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
149
- 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, AccountToCheck, AdapterData, AddCollateralProps, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, type BotListStateHuman, BotPermissions, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, ChainConfig, ChainContractsRegister, ChangeDeptProps, ClaimDelayedProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountProps, CloseCreditAccountResult, CloseOptions, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountData, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountServiceOptions, CreditAccountTokensSlice, CreditAccountsServiceV310, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, Curator, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DefaultPartialLiquidationParams, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedReceivedAsset, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteSwapProps, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, ILiquidationsService, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InstantReceivedAsset, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MissingSerializedParamsError, type MultiCall, MultichainAttachOptions, MultichainHydrateOptions, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnDemandPriceUpdates, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, ReceivedAsset, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RepayAndLiquidateCreditAccountProps, RepayCreditAccountProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SimpleTokenMeta, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, StartDelayedWithdrawalProps, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpdateQuotasProps, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, WithMultichain, WithdrawCollateralProps, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, numberWithCommas, onchainSDKOptionsSchema, percentFmt, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, watchBlocksAsync };
153
+ 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, AccountToCheck, AdapterData, AddCollateralProps, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, type BotListStateHuman, BotPermissions, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, ChainConfig, ChainContractsRegister, ChangeDeptProps, ClaimDelayedProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountProps, CloseCreditAccountResult, CloseOptions, ClosePathBalances, CompositePriceFeedContract, ConnectedBotData, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountData, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountServiceOptions, CreditAccountTokensSlice, CreditAccountsServiceV310, CreditConfiguratorState, type CreditConfiguratorStateHuman, CreditConfiguratorV310Contract, CreditFacadeState, type CreditFacadeStateHuman, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerDebtParams, type CreditManagerDebtParamsHuman, CreditManagerFilter, CreditManagerOperationResult, CreditManagerState, type CreditManagerStateHuman, CreditManagerV310Contract, CreditSuite, CreditSuiteState, type CreditSuiteStateHuman, Curator, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DefaultPartialLiquidationParams, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedReceivedAsset, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteSwapProps, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindOneTokenPathProps, FindOpenStrategyPathProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, ILiquidationsService, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, InstantReceivedAsset, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, LEVERAGE_DECIMALS, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidator, MissingSerializedParamsError, type MultiCall, MultichainAttachOptions, MultichainHydrateOptions, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NOT_DEPLOYED, NO_VERSION, NetworkType, OnDemandPriceUpdates, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, OpenStrategyResult, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForTokensOptions, PriceOracleData, type PriceOracleStateHuman, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, QuotaKeeperState, type QuotaParamsHuman, QuotaState, RAMP_DURATION_BY_NETWORK, RAY, RAY_DECIMALS_POW, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWADefaultTokenMeta, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWATokenMeta, RWAUnderlyingContractType, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RampEvent, RateKeeperState, type RateKeeperStateHuman, RateKeeperType, type RawTx, ReceivedAsset, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, RepayAndLiquidateCreditAccountProps, RepayCreditAccountProps, RequestableWithdrawal, RetryOptions, RewardInfo, Rewards, RouterCASlice, RouterCMSlice, RouterCloseResult, RouterResult, RouterRewardsResult, RouterV310Contract, SDKConstruct, SDKOptions, SECONDS_PER_YEAR, SECURITIZE_REGISTER_VAULT_TYPES, SLIPPAGE_DECIMALS, STATE_VERSION, SUPPORTED_NETWORKS, SdkAlreadyAttachedError, SdkChainMismatchError, SdkMissingChainStateError, SdkNotAttachedError, SdkStateVersionMismatchError, SdkSyncFailedError, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidator, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, SendRawTxParameters, SetBotProps, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, StartDelayedWithdrawalProps, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, UpdateQuotasProps, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, WithMultichain, WithdrawCollateralProps, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, fetchPythPayloads, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, numberWithCommas, onchainSDKOptionsSchema, percentFmt, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toSignificant, toWithdrawalStatus, watchBlocksAsync };
@@ -2,7 +2,10 @@ import { IAdapterContract } from "./adapters/types.js";
2
2
  import { createAdapter } from "./adapters/createAdapter.js";
3
3
  import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./adapters/PlaceholderAdapterContracts.js";
4
4
  import "./adapters/index.js";
5
- import { RWA_FACTORY_SECURITIZE } from "./rwa/securitize/constants.js";
5
+ import { RWA_LIQUIDATOR_MIDAS } from "./rwa/midas/constants.js";
6
+ import { MidasLiquidator } from "./rwa/midas/MidasLiquidator.js";
7
+ import { RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./rwa/securitize/constants.js";
8
+ import { SecuritizeLiquidator } from "./rwa/securitize/SecuritizeLiquidator.js";
6
9
  import { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
7
10
  import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./rwa/securitize/types.js";
8
11
  import { SecuritizeRWAFactory } from "./rwa/securitize/SecuritizeRWAFactory.js";
@@ -62,4 +65,4 @@ import { IERC20ZapperContract } from "./zapper/IERC20ZapperContract.js";
62
65
  import { IETHZapperContract } from "./zapper/IETHZapperContract.js";
63
66
  import "./zapper/index.js";
64
67
  import { MarketRegister, MarketRegistryState, MarketRegistryStateHuman } from "./MarketRegister.js";
65
- export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, LatestUpdate, LinearInterestRateModelContract, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, OnDemandPriceUpdates, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RampEvent, RateKeeperType, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed };
68
+ export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExternalPriceFeedContract, type FetchPythPayloadsOptions, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, LatestUpdate, LinearInterestRateModelContract, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidator, OnDemandPriceUpdates, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PythPriceFeed, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidator, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, createAdapter, createPriceOracle, createZapper, fetchPythPayloads, fetchRedstonePayloads, getRawPriceUpdates, isLPPriceFeed, isRWAFactory, isUpdatablePriceFeed };
@@ -1,7 +1,11 @@
1
- import { RWA_FACTORY_SECURITIZE } from "./securitize/constants.js";
1
+ import { RWA_LIQUIDATOR_MIDAS } from "./midas/constants.js";
2
+ import { MidasLiquidator } from "./midas/MidasLiquidator.js";
3
+ import "./midas/index.js";
4
+ import { RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./securitize/constants.js";
5
+ import { SecuritizeLiquidator } from "./securitize/SecuritizeLiquidator.js";
2
6
  import { IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_TYPES, isRWAFactory } from "./types.js";
3
7
  import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./securitize/types.js";
4
8
  import { SecuritizeRWAFactory } from "./securitize/SecuritizeRWAFactory.js";
5
9
  import "./securitize/index.js";
6
10
  import { RWARegistry } from "./RWARegistry.js";
7
- export { DStokenData, IRWAFactory, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, isRWAFactory };
11
+ export { DStokenData, IRWAFactory, MidasLiquidator, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryStateHuman, RWAFactoryType, RWAInvestorData, RWAMissingOpenAccountRequirements, RWAOpenAccountRequirements, RWAOperationArgs, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidator, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature, isRWAFactory };
@@ -0,0 +1,93 @@
1
+ import { ConstructOptions } from "../../../base/Construct.js";
2
+ import { BaseContract } from "../../../base/BaseContract.js";
3
+ import "../../../base/index.js";
4
+ import { Address, DecodeFunctionDataReturnType } from "viem";
5
+ //#region src/sdk/market/rwa/midas/MidasLiquidator.d.ts
6
+ declare const abi: readonly [{
7
+ readonly type: "function";
8
+ readonly name: "contractType";
9
+ readonly inputs: readonly [];
10
+ readonly outputs: readonly [{
11
+ readonly name: "";
12
+ readonly type: "bytes32";
13
+ readonly internalType: "bytes32";
14
+ }];
15
+ readonly stateMutability: "view";
16
+ }, {
17
+ readonly type: "function";
18
+ readonly name: "isTransferAllowed";
19
+ readonly inputs: readonly [{
20
+ readonly name: "redeemerOwner";
21
+ readonly type: "address";
22
+ readonly internalType: "address";
23
+ }];
24
+ readonly outputs: readonly [{
25
+ readonly name: "";
26
+ readonly type: "bool";
27
+ readonly internalType: "bool";
28
+ }];
29
+ readonly stateMutability: "view";
30
+ }, {
31
+ readonly type: "function";
32
+ readonly name: "liquidateWithRedeemerTransfers";
33
+ readonly inputs: readonly [{
34
+ readonly name: "creditAccount";
35
+ readonly type: "address";
36
+ readonly internalType: "address";
37
+ }, {
38
+ readonly name: "gateway";
39
+ readonly type: "address";
40
+ readonly internalType: "address";
41
+ }, {
42
+ readonly name: "calls";
43
+ readonly type: "tuple[]";
44
+ readonly internalType: "struct MultiCall[]";
45
+ readonly components: readonly [{
46
+ readonly name: "target";
47
+ readonly type: "address";
48
+ readonly internalType: "address";
49
+ }, {
50
+ readonly name: "callData";
51
+ readonly type: "bytes";
52
+ readonly internalType: "bytes";
53
+ }];
54
+ }, {
55
+ readonly name: "lossPolicyData";
56
+ readonly type: "bytes";
57
+ readonly internalType: "bytes";
58
+ }];
59
+ readonly outputs: readonly [];
60
+ readonly stateMutability: "nonpayable";
61
+ }, {
62
+ readonly type: "function";
63
+ readonly name: "transferableRedeemerOwner";
64
+ readonly inputs: readonly [];
65
+ readonly outputs: readonly [{
66
+ readonly name: "";
67
+ readonly type: "address";
68
+ readonly internalType: "address";
69
+ }];
70
+ readonly stateMutability: "view";
71
+ }, {
72
+ readonly type: "function";
73
+ readonly name: "version";
74
+ readonly inputs: readonly [];
75
+ readonly outputs: readonly [{
76
+ readonly name: "";
77
+ readonly type: "uint256";
78
+ readonly internalType: "uint256";
79
+ }];
80
+ readonly stateMutability: "view";
81
+ }, {
82
+ readonly type: "error";
83
+ readonly name: "NotValidGatewayException";
84
+ readonly inputs: readonly [];
85
+ }];
86
+ type abi = typeof abi;
87
+ declare class MidasLiquidator extends BaseContract<abi> {
88
+ constructor(options: ConstructOptions, address: Address);
89
+ protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
90
+ protected parseFunctionParamsV2(params: DecodeFunctionDataReturnType<abi>, strict?: boolean): Record<string, unknown>;
91
+ }
92
+ //#endregion
93
+ export { MidasLiquidator };
@@ -0,0 +1,4 @@
1
+ //#region src/sdk/market/rwa/midas/constants.d.ts
2
+ declare const RWA_LIQUIDATOR_MIDAS = "RWA_LIQUIDATOR::MIDAS";
3
+ //#endregion
4
+ export { RWA_LIQUIDATOR_MIDAS };
@@ -0,0 +1,3 @@
1
+ import { RWA_LIQUIDATOR_MIDAS } from "./constants.js";
2
+ import { MidasLiquidator } from "./MidasLiquidator.js";
3
+ export { MidasLiquidator, RWA_LIQUIDATOR_MIDAS };