@gearbox-protocol/sdk 14.12.0-next.54 → 14.12.0-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abi/iPhantomToken.js +19 -0
- package/dist/cjs/abi/rwa/iMidasLiquidatorV311.js +96 -0
- package/dist/cjs/abi/rwa/iRWAGateway.js +19 -0
- package/dist/cjs/abi/rwa/iSecuritizeLiquidatorV311.js +111 -0
- package/dist/cjs/sdk/accounts/liquidations/LiquidationsService.js +65 -0
- package/dist/cjs/sdk/accounts/liquidations/MultichainLiquidationsService.js +10 -0
- package/dist/cjs/sdk/base/BaseContract.js +26 -0
- package/dist/cjs/sdk/base/ChainContractsRegister.js +24 -0
- package/dist/cjs/sdk/base/token-types.js +1 -0
- package/dist/cjs/sdk/index.js +14 -1
- package/dist/cjs/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
- package/dist/cjs/sdk/market/index.js +9 -0
- package/dist/cjs/sdk/market/rwa/index.js +10 -0
- package/dist/cjs/sdk/market/rwa/midas/MidasLiquidatorContract.js +43 -0
- package/dist/cjs/sdk/market/rwa/midas/constants.js +7 -0
- package/dist/cjs/sdk/market/rwa/midas/index.js +6 -0
- package/dist/cjs/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.js +31 -0
- package/dist/cjs/sdk/market/rwa/securitize/constants.js +4 -0
- package/dist/cjs/sdk/market/rwa/securitize/index.js +4 -0
- package/dist/cjs/sdk/utils/viem/cast.js +20 -15
- package/dist/cjs/sdk/utils/viem/index.js +4 -0
- package/dist/cjs/sdk/utils/viem/simulateCall.js +82 -0
- package/dist/esm/abi/iPhantomToken.js +18 -0
- package/dist/esm/abi/rwa/iMidasLiquidatorV311.js +95 -0
- package/dist/esm/abi/rwa/iRWAGateway.js +18 -0
- package/dist/esm/abi/rwa/iSecuritizeLiquidatorV311.js +110 -0
- package/dist/esm/permissionless/bindings/factory/credit-factory.js +1 -1
- package/dist/esm/preview/index.js +5 -5
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +65 -0
- package/dist/esm/sdk/accounts/liquidations/MultichainLiquidationsService.js +10 -0
- package/dist/esm/sdk/base/BaseContract.js +26 -0
- package/dist/esm/sdk/base/ChainContractsRegister.js +24 -0
- package/dist/esm/sdk/base/token-types.js +1 -0
- package/dist/esm/sdk/index.js +7 -3
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +3 -3
- package/dist/esm/sdk/market/index.js +5 -2
- package/dist/esm/sdk/market/rwa/index.js +6 -2
- package/dist/esm/sdk/market/rwa/midas/MidasLiquidatorContract.js +43 -0
- package/dist/esm/sdk/market/rwa/midas/constants.js +5 -0
- package/dist/esm/sdk/market/rwa/midas/index.js +3 -0
- package/dist/esm/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.js +31 -0
- package/dist/esm/sdk/market/rwa/securitize/constants.js +3 -1
- package/dist/esm/sdk/market/rwa/securitize/index.js +3 -2
- package/dist/esm/sdk/utils/viem/cast.js +20 -16
- package/dist/esm/sdk/utils/viem/index.js +3 -2
- package/dist/esm/sdk/utils/viem/simulateCall.js +80 -0
- package/dist/types/abi/iPhantomToken.d.ts +18 -0
- package/dist/types/abi/rwa/iMidasLiquidatorV311.d.ts +83 -0
- package/dist/types/abi/rwa/iRWAGateway.d.ts +18 -0
- package/dist/types/abi/rwa/iSecuritizeLiquidatorV311.d.ts +95 -0
- package/dist/types/sdk/accounts/index.d.ts +2 -2
- package/dist/types/sdk/accounts/liquidations/LiquidationsService.d.ts +4 -0
- package/dist/types/sdk/accounts/liquidations/MultichainLiquidationsService.d.ts +5 -1
- package/dist/types/sdk/accounts/liquidations/index.d.ts +2 -2
- package/dist/types/sdk/accounts/liquidations/types.d.ts +13 -1
- package/dist/types/sdk/base/BaseContract.d.ts +13 -0
- package/dist/types/sdk/base/ChainContractsRegister.d.ts +15 -0
- package/dist/types/sdk/base/token-types.d.ts +1 -1
- package/dist/types/sdk/index.d.ts +8 -4
- package/dist/types/sdk/market/index.d.ts +5 -2
- package/dist/types/sdk/market/rwa/index.d.ts +6 -2
- package/dist/types/sdk/market/rwa/midas/MidasLiquidatorContract.d.ts +93 -0
- package/dist/types/sdk/market/rwa/midas/constants.d.ts +5 -0
- package/dist/types/sdk/market/rwa/midas/index.d.ts +3 -0
- package/dist/types/sdk/market/rwa/securitize/SecuritizeLiquidatorContract.d.ts +104 -0
- package/dist/types/sdk/market/rwa/securitize/constants.d.ts +3 -1
- package/dist/types/sdk/market/rwa/securitize/index.d.ts +3 -2
- package/dist/types/sdk/utils/viem/cast.d.ts +6 -1
- package/dist/types/sdk/utils/viem/index.d.ts +3 -2
- package/dist/types/sdk/utils/viem/simulateCall.d.ts +57 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./constants.js";
|
|
2
|
-
import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./types.js";
|
|
2
|
+
import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./types.js";
|
|
3
3
|
import { LiquidationsService } from "./LiquidationsService.js";
|
|
4
4
|
import { MultichainLiquidationsService } from "./MultichainLiquidationsService.js";
|
|
5
|
-
export { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain };
|
|
5
|
+
export { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidationsService, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainLiquidationsService, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain };
|
|
@@ -207,6 +207,10 @@ interface GetLiquidatorWithdrawalsPropsBase {
|
|
|
207
207
|
* Props for {@link ILiquidationsService.getLiquidatorWithdrawals}.
|
|
208
208
|
**/
|
|
209
209
|
type GetLiquidatorWithdrawalsProps<Multichain extends boolean = false> = GetLiquidatorWithdrawalsPropsBase & WithMultichain<Multichain, MultichainNetworksProps>;
|
|
210
|
+
/**
|
|
211
|
+
* Props for {@link ILiquidationsService.loadRWALiquidators}.
|
|
212
|
+
**/
|
|
213
|
+
type LoadRWALiquidatorsProps<Multichain extends boolean = false> = WithMultichain<Multichain, MultichainNetworksProps>;
|
|
210
214
|
/**
|
|
211
215
|
* A single delayed-withdrawal position owned by the liquidator.
|
|
212
216
|
*
|
|
@@ -340,6 +344,14 @@ interface ILiquidationsService<Multichain extends boolean = false> {
|
|
|
340
344
|
* @param props - See {@link GetLiquidatorWithdrawalsProps}
|
|
341
345
|
**/
|
|
342
346
|
getLiquidatorWithdrawals(props: GetLiquidatorWithdrawalsProps<Multichain>): Promise<LiquidatorWithdrawal[]>;
|
|
347
|
+
/**
|
|
348
|
+
* Discovers the dedicated RWA liquidator contracts (Securitize, Midas)
|
|
349
|
+
* deployed for the markets of the chain and registers them in the SDK
|
|
350
|
+
* contracts register.
|
|
351
|
+
*
|
|
352
|
+
* @param props - See {@link LoadRWALiquidatorsProps}
|
|
353
|
+
**/
|
|
354
|
+
loadRWALiquidators(props?: LoadRWALiquidatorsProps<Multichain>): Promise<void>;
|
|
343
355
|
}
|
|
344
356
|
//#endregion
|
|
345
|
-
export { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain };
|
|
357
|
+
export { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain };
|
|
@@ -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
|
|
@@ -2,7 +2,7 @@ import { MarketData, Unarray } from "./types.js";
|
|
|
2
2
|
import { Address } from "viem";
|
|
3
3
|
//#region src/sdk/base/token-types.d.ts
|
|
4
4
|
type TokenData = Unarray<MarketData["tokens"]>;
|
|
5
|
-
declare const PHANTOM_TOKEN_CONTRACT_TYPES: readonly ["PHANTOM_TOKEN::CONVEX", "PHANTOM_TOKEN::INFINIFI_UNWIND", "PHANTOM_TOKEN::INFRARED", "PHANTOM_TOKEN::MELLOW_WITHDRAWAL", "PHANTOM_TOKEN::MIDAS_REDEMPTION", "PHANTOM_TOKEN::STAKING_REWARDS", "PHANTOM_TOKEN::UPSHIFT_WITHDRAW"];
|
|
5
|
+
declare const PHANTOM_TOKEN_CONTRACT_TYPES: readonly ["PHANTOM_TOKEN::CONVEX", "PHANTOM_TOKEN::INFINIFI_UNWIND", "PHANTOM_TOKEN::INFRARED", "PHANTOM_TOKEN::MELLOW_WITHDRAWAL", "PHANTOM_TOKEN::MIDAS_REDEMPTION", "PHANTOM_TOKEN::SECURITIZE_RD", "PHANTOM_TOKEN::STAKING_REWARDS", "PHANTOM_TOKEN::UPSHIFT_WITHDRAW"];
|
|
6
6
|
declare const RWA_UNDERLYING_DEFAULT = "RWA_UNDERLYING::DEFAULT";
|
|
7
7
|
declare const RWA_UNDERLYING_ON_DEMAND = "RWA_UNDERLYING::ON_DEMAND";
|
|
8
8
|
type RWAUnderlyingContractType = typeof RWA_UNDERLYING_DEFAULT | typeof RWA_UNDERLYING_ON_DEMAND;
|
|
@@ -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 {
|
|
31
|
+
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
|
|
32
|
+
import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContract.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 { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
|
|
41
|
+
import { SecuritizeLiquidatorContract } from "./market/rwa/securitize/SecuritizeLiquidatorContract.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";
|
|
@@ -140,10 +144,10 @@ import { SDKConstruct } from "./base/SDKConstruct.js";
|
|
|
140
144
|
import "./base/index.js";
|
|
141
145
|
import { CreditAccountServiceOptions, CreditAccountsServiceV310 } from "./accounts/CreditAccountsServiceV310.js";
|
|
142
146
|
import { LIQUIDATION_COMPRESSOR_V313_ADDRESS } from "./accounts/liquidations/constants.js";
|
|
143
|
-
import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./accounts/liquidations/types.js";
|
|
147
|
+
import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, DelayedReceivedAsset, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidatorWithdrawalsProps, GetLiquidatorWithdrawalsPropsBase, ILiquidationsService, InstantReceivedAsset, LiquidatableAccount, LiquidationApproval, LiquidationDetails, LiquidatorWithdrawal, LoadRWALiquidatorsProps, MultichainNetworkProps, MultichainNetworksProps, ReceivedAsset, WithMultichain } from "./accounts/liquidations/types.js";
|
|
144
148
|
import { LiquidationsService } from "./accounts/liquidations/LiquidationsService.js";
|
|
145
149
|
import { ChainConfig, MultichainAttachOptions, MultichainHydrateOptions, MultichainSDK, MultichainSDKOptions, MultichainSyncStateOptions } from "./MultichainSDK.js";
|
|
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, LoadRWALiquidatorsProps, 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, MidasLiquidatorContract, 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, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, 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, SecuritizeLiquidatorContract, 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 {
|
|
5
|
+
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./rwa/midas/constants.js";
|
|
6
|
+
import { MidasLiquidatorContract } from "./rwa/midas/MidasLiquidatorContract.js";
|
|
7
|
+
import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./rwa/securitize/constants.js";
|
|
8
|
+
import { SecuritizeLiquidatorContract } from "./rwa/securitize/SecuritizeLiquidatorContract.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, MidasLiquidatorContract, OnDemandPriceUpdates, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, 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, SecuritizeLiquidatorContract, 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 {
|
|
1
|
+
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./midas/constants.js";
|
|
2
|
+
import { MidasLiquidatorContract } from "./midas/MidasLiquidatorContract.js";
|
|
3
|
+
import "./midas/index.js";
|
|
4
|
+
import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./securitize/constants.js";
|
|
5
|
+
import { SecuritizeLiquidatorContract } from "./securitize/SecuritizeLiquidatorContract.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, MidasLiquidatorContract, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, 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, SecuritizeLiquidatorContract, 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/MidasLiquidatorContract.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 MidasLiquidatorContract 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 { MidasLiquidatorContract };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/sdk/market/rwa/midas/constants.d.ts
|
|
2
|
+
declare const RWA_LIQUIDATOR_MIDAS = "RWA_LIQUIDATOR::MIDAS";
|
|
3
|
+
declare const PHANTOM_TOKEN_MIDAS_REDEMPTION = "PHANTOM_TOKEN::MIDAS_REDEMPTION";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS };
|
|
@@ -0,0 +1,104 @@
|
|
|
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/securitize/SecuritizeLiquidatorContract.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: "liquidatePendingRedemption";
|
|
33
|
+
readonly inputs: readonly [{
|
|
34
|
+
readonly name: "creditAccount";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "redemptionGateway";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
readonly internalType: "address";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "priceUpdates";
|
|
43
|
+
readonly type: "tuple[]";
|
|
44
|
+
readonly internalType: "struct PriceUpdate[]";
|
|
45
|
+
readonly components: readonly [{
|
|
46
|
+
readonly name: "priceFeed";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
readonly internalType: "address";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "data";
|
|
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: "AccountHasSufficientLiquidityException";
|
|
84
|
+
readonly inputs: readonly [];
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "error";
|
|
87
|
+
readonly name: "NotValidGatewayException";
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
}, {
|
|
90
|
+
readonly type: "error";
|
|
91
|
+
readonly name: "StableCoinIsNotConvertibleException";
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
}, {
|
|
94
|
+
readonly type: "error";
|
|
95
|
+
readonly name: "UnknownCreditAccountException";
|
|
96
|
+
readonly inputs: readonly [];
|
|
97
|
+
}];
|
|
98
|
+
type abi = typeof abi;
|
|
99
|
+
declare class SecuritizeLiquidatorContract extends BaseContract<abi> {
|
|
100
|
+
constructor(options: ConstructOptions, address: Address);
|
|
101
|
+
protected stringifyFunctionParams(params: DecodeFunctionDataReturnType<abi>): string[];
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { SecuritizeLiquidatorContract };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
//#region src/sdk/market/rwa/securitize/constants.d.ts
|
|
2
2
|
declare const RWA_FACTORY_SECURITIZE = "RWA_FACTORY::SECURITIZE";
|
|
3
|
+
declare const RWA_LIQUIDATOR_SECURITIZE = "RWA_LIQUIDATOR::SECURITIZE";
|
|
4
|
+
declare const PHANTOM_TOKEN_SECURITIZE_REDEMPTION = "PHANTOM_TOKEN::SECURITIZE_RD";
|
|
3
5
|
//#endregion
|
|
4
|
-
export { RWA_FACTORY_SECURITIZE };
|
|
6
|
+
export { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RWA_FACTORY_SECURITIZE } from "./constants.js";
|
|
1
|
+
import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./constants.js";
|
|
2
|
+
import { SecuritizeLiquidatorContract } from "./SecuritizeLiquidatorContract.js";
|
|
2
3
|
import { DStokenData, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature } from "./types.js";
|
|
3
4
|
import { SecuritizeRWAFactory } from "./SecuritizeRWAFactory.js";
|
|
4
|
-
export { DStokenData, RWA_FACTORY_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature };
|
|
5
|
+
export { DStokenData, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeCreditAccountData, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeMissingOpenAccountRequirements, SecuritizeOpenAccountRequirements, SecuritizeOperationArgs, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRegisterMessage, SecuritizeRegisterVaultMessage, SecuritizeSignature };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { CallParameters } from "viem";
|
|
2
2
|
//#region src/sdk/utils/viem/cast.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Builds the argument list of a `cast call --trace` command reproducing the call,
|
|
5
|
+
* without the leading `cast` binary, so that it can be spawned directly.
|
|
6
|
+
*/
|
|
7
|
+
declare function getCastTraceArgs(params: CallParameters, rpcUrl?: string): string[];
|
|
3
8
|
declare function generateCastTraceCall(params: CallParameters, rpcUrl?: string): string;
|
|
4
9
|
//#endregion
|
|
5
|
-
export { generateCastTraceCall };
|
|
10
|
+
export { generateCastTraceCall, getCastTraceArgs };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall } from "./simulateCall.js";
|
|
2
|
+
import { generateCastTraceCall, getCastTraceArgs } from "./cast.js";
|
|
2
3
|
import { DelegatedMulticall, executeDelegatedMulticalls } from "./executeDelegatedMulticalls.js";
|
|
3
4
|
import { EstimateRawTxGasParameters, SendRawTxParameters, estimateRawTxGas, sendRawTx } from "./sendRawTx.js";
|
|
4
5
|
import { SimulateMulticallParameters, SimulateMulticallReturnType, simulateMulticall } from "./simulateMulticall.js";
|
|
5
6
|
import { SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, getSimulateWithPriceUpdatesError, simulateWithPriceUpdates } from "./simulateWithPriceUpdates.js";
|
|
6
7
|
import { WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, watchBlocksAsync } from "./watchBlocksAsync.js";
|
|
7
|
-
export { DelegatedMulticall, EstimateRawTxGasParameters, SendRawTxParameters, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getSimulateWithPriceUpdatesError, sendRawTx, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
|
|
8
|
+
export { DelegatedMulticall, EstimateRawTxGasParameters, SendRawTxParameters, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, estimateRawTxGas, executeDelegatedMulticalls, generateCastTraceCall, getCastTraceArgs, getSimulateWithPriceUpdatesError, sendRawTx, simulateCall, simulateMulticall, simulateWithPriceUpdates, watchBlocksAsync };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Abi, BaseError, CallParameters, Chain, Client, Hex, Transport, UnionOmit } from "viem";
|
|
2
|
+
//#region src/sdk/utils/viem/simulateCall.d.ts
|
|
3
|
+
type SimulateCallParameters<chain extends Chain | undefined = Chain | undefined> = CallParameters<chain> & {
|
|
4
|
+
/**
|
|
5
|
+
* ABIs used to decode the function and any custom error, but only when the call reverts.
|
|
6
|
+
* Nothing is appended implicitly: pass `errorAbis` yourself to have gearbox exceptions decoded.
|
|
7
|
+
*/
|
|
8
|
+
abis?: readonly (Abi | readonly unknown[])[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Same as {@link SimulateCallParameters}, minus the parts a contract knows about itself.
|
|
12
|
+
*/
|
|
13
|
+
type SimulateCallOptions<chain extends Chain | undefined = Chain | undefined> = UnionOmit<SimulateCallParameters<chain>, "to" | "data">;
|
|
14
|
+
interface SimulateCallReturnType {
|
|
15
|
+
/**
|
|
16
|
+
* Raw bytes returned by the call, `0x` when the function returns nothing.
|
|
17
|
+
*/
|
|
18
|
+
data: Hex;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Simulates raw calldata with `eth_call`, without encoding or decoding anything on success.
|
|
22
|
+
*
|
|
23
|
+
* Use it when calldata already exists (for example a {@link RawTx} built by the SDK): the happy
|
|
24
|
+
* path is a pure passthrough, and the calldata is only decoded when the call reverts, to build a
|
|
25
|
+
* viem {@link ContractFunctionExecutionError} out of the revert data.
|
|
26
|
+
*
|
|
27
|
+
* @param client - viem client to call with.
|
|
28
|
+
* @param parameters - viem call parameters, plus the ABIs used for error decoding.
|
|
29
|
+
* @throws {@link SimulationError} when the call reverts or the request fails.
|
|
30
|
+
*/
|
|
31
|
+
declare function simulateCall<chain extends Chain | undefined>(client: Client<Transport, chain>, parameters: SimulateCallParameters<chain>): Promise<SimulateCallReturnType>;
|
|
32
|
+
type SimulationErrorType = SimulationError & {
|
|
33
|
+
name: "SimulationError";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Thrown by {@link simulateCall} when a simulation fails.
|
|
37
|
+
*
|
|
38
|
+
* The viem {@link ContractFunctionExecutionError} built from the revert data is kept as `cause`,
|
|
39
|
+
* so `walk()` still finds `ContractFunctionRevertedError` and its decoded (or raw) revert data.
|
|
40
|
+
*/
|
|
41
|
+
declare class SimulationError extends BaseError {
|
|
42
|
+
/**
|
|
43
|
+
* The call that failed, kept verbatim so that it can be replayed or traced.
|
|
44
|
+
*/
|
|
45
|
+
readonly request: CallParameters;
|
|
46
|
+
constructor(cause: Error, request: CallParameters, abi: Abi);
|
|
47
|
+
/**
|
|
48
|
+
* Arguments of a `cast call --trace` command replaying this call, for spawning `cast` directly.
|
|
49
|
+
*/
|
|
50
|
+
getCastTraceArgs(rpcUrl?: string): string[];
|
|
51
|
+
/**
|
|
52
|
+
* Full `cast call --trace` command replaying this call.
|
|
53
|
+
*/
|
|
54
|
+
getCastTraceCall(rpcUrl?: string): string;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulationError, SimulationErrorType, simulateCall };
|