@gearbox-protocol/sdk 15.1.0-next.13 → 15.1.0-next.14
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/dev/AccountOpener.js +1 -8
- package/dist/cjs/dev/index.js +2 -3
- package/dist/cjs/dev/midasUtils.js +0 -96
- package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +7 -35
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +5 -26
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +16 -2
- package/dist/cjs/sdk/accounts/utils/midasUtils.js +70 -0
- package/dist/cjs/sdk/index.js +4 -0
- package/dist/cjs/sdk/market/adapters/createAdapter.js +8 -1
- package/dist/cjs/sdk/market/adapters/index.js +5 -0
- package/dist/cjs/sdk/market/adapters/midas/PlaceholderMidasGatewayAdapterContract.js +81 -0
- package/dist/cjs/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.js +59 -0
- package/dist/cjs/sdk/market/adapters/midas/index.js +6 -0
- package/dist/cjs/sdk/market/adapters/midas/types.js +1 -0
- package/dist/cjs/sdk/market/index.js +4 -0
- package/dist/esm/dev/AccountOpener.js +2 -9
- package/dist/esm/dev/index.js +3 -3
- package/dist/esm/dev/midasUtils.js +2 -97
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +8 -36
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +5 -26
- package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
- package/dist/esm/preview/trace/extractTransfers.js +1 -1
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +18 -4
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/esm/sdk/accounts/utils/midasUtils.js +69 -0
- package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/esm/sdk/base/TokensMeta.js +3 -3
- package/dist/esm/sdk/chain/detectNetwork.js +1 -1
- package/dist/esm/sdk/core/createAddressProvider.js +1 -1
- package/dist/esm/sdk/index.js +3 -1
- package/dist/esm/sdk/market/adapters/createAdapter.js +8 -1
- package/dist/esm/sdk/market/adapters/index.js +4 -1
- package/dist/esm/sdk/market/adapters/midas/PlaceholderMidasGatewayAdapterContract.js +80 -0
- package/dist/esm/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.js +58 -0
- package/dist/esm/sdk/market/adapters/midas/index.js +4 -0
- package/dist/esm/sdk/market/adapters/midas/types.js +1 -0
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/sdk/market/index.js +3 -1
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/sdk/pools/PoolService.js +1 -1
- package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/types/dev/index.d.ts +2 -2
- package/dist/types/dev/midasUtils.d.ts +2 -35
- package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +2 -1
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +2 -1
- package/dist/types/sdk/accounts/utils/midasUtils.d.ts +38 -0
- package/dist/types/sdk/index.d.ts +4 -1
- package/dist/types/sdk/market/adapters/index.d.ts +5 -1
- package/dist/types/sdk/market/adapters/midas/PlaceholderMidasGatewayAdapterContract.d.ts +17 -0
- package/dist/types/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.d.ts +15 -0
- package/dist/types/sdk/market/adapters/midas/index.d.ts +4 -0
- package/dist/types/sdk/market/adapters/midas/types.d.ts +24 -0
- package/dist/types/sdk/market/index.d.ts +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MissingSerializedParamsError } from "../../../base/errors.js";
|
|
2
|
+
import "../../../base/index.js";
|
|
3
|
+
import { PlaceholderAdapterContract } from "../PlaceholderAdapterContracts.js";
|
|
4
|
+
import { decodeAbiParameters } from "viem";
|
|
5
|
+
//#region src/sdk/market/adapters/midas/PlaceholderMidasGatewayAdapterContract.ts
|
|
6
|
+
var PlaceholderMidasGatewayAdapterContract = class PlaceholderMidasGatewayAdapterContract extends PlaceholderAdapterContract {
|
|
7
|
+
#gateway;
|
|
8
|
+
#mToken;
|
|
9
|
+
#quoteToken;
|
|
10
|
+
#phantomToken;
|
|
11
|
+
constructor(options, args) {
|
|
12
|
+
super(options, args);
|
|
13
|
+
if (args.baseParams.serializedParams) {
|
|
14
|
+
const decoded = PlaceholderMidasGatewayAdapterContract.decodeSerializedParams(args.baseParams.serializedParams);
|
|
15
|
+
this.#gateway = decoded.gateway;
|
|
16
|
+
this.#mToken = decoded.mToken;
|
|
17
|
+
this.#quoteToken = decoded.quoteToken;
|
|
18
|
+
this.#phantomToken = decoded.phantomToken;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
static decodeSerializedParams(serialized) {
|
|
22
|
+
const [creditManager, targetContract, gateway, mToken, quoteToken, phantomToken, referrerId] = decodeAbiParameters([
|
|
23
|
+
{
|
|
24
|
+
type: "address",
|
|
25
|
+
name: "creditManager"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "address",
|
|
29
|
+
name: "targetContract"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "address",
|
|
33
|
+
name: "gateway"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "address",
|
|
37
|
+
name: "mToken"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: "address",
|
|
41
|
+
name: "quoteToken"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "address",
|
|
45
|
+
name: "phantomToken"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "bytes32",
|
|
49
|
+
name: "referrerId"
|
|
50
|
+
}
|
|
51
|
+
], serialized);
|
|
52
|
+
return {
|
|
53
|
+
creditManager,
|
|
54
|
+
targetContract,
|
|
55
|
+
gateway,
|
|
56
|
+
mToken,
|
|
57
|
+
quoteToken,
|
|
58
|
+
phantomToken,
|
|
59
|
+
referrerId
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
get gateway() {
|
|
63
|
+
if (!this.#gateway) throw new MissingSerializedParamsError("gateway");
|
|
64
|
+
return this.#gateway;
|
|
65
|
+
}
|
|
66
|
+
get mToken() {
|
|
67
|
+
if (!this.#mToken) throw new MissingSerializedParamsError("mToken");
|
|
68
|
+
return this.#mToken;
|
|
69
|
+
}
|
|
70
|
+
get quoteToken() {
|
|
71
|
+
if (!this.#quoteToken) throw new MissingSerializedParamsError("quoteToken");
|
|
72
|
+
return this.#quoteToken;
|
|
73
|
+
}
|
|
74
|
+
get phantomToken() {
|
|
75
|
+
if (!this.#phantomToken) throw new MissingSerializedParamsError("phantomToken");
|
|
76
|
+
return this.#phantomToken;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { PlaceholderMidasGatewayAdapterContract };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { MissingSerializedParamsError } from "../../../base/errors.js";
|
|
2
|
+
import "../../../base/index.js";
|
|
3
|
+
import { PlaceholderAdapterContract } from "../PlaceholderAdapterContracts.js";
|
|
4
|
+
import { decodeAbiParameters } from "viem";
|
|
5
|
+
//#region src/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.ts
|
|
6
|
+
var PlaceholderMidasIssuanceVaultAdapterContract = class PlaceholderMidasIssuanceVaultAdapterContract extends PlaceholderAdapterContract {
|
|
7
|
+
#mToken;
|
|
8
|
+
#allowedTokens;
|
|
9
|
+
constructor(options, args) {
|
|
10
|
+
super(options, args);
|
|
11
|
+
if (args.baseParams.serializedParams) {
|
|
12
|
+
const decoded = PlaceholderMidasIssuanceVaultAdapterContract.decodeSerializedParams(args.baseParams.serializedParams);
|
|
13
|
+
this.#mToken = decoded.mToken;
|
|
14
|
+
this.#allowedTokens = decoded.allowedTokens;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
static decodeSerializedParams(serialized) {
|
|
18
|
+
const [creditManager, targetContract, mToken, referrerId, allowedTokens] = decodeAbiParameters([
|
|
19
|
+
{
|
|
20
|
+
type: "address",
|
|
21
|
+
name: "creditManager"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: "address",
|
|
25
|
+
name: "targetContract"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "address",
|
|
29
|
+
name: "mToken"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: "bytes32",
|
|
33
|
+
name: "referrerId"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "address[]",
|
|
37
|
+
name: "allowedTokens"
|
|
38
|
+
}
|
|
39
|
+
], serialized);
|
|
40
|
+
return {
|
|
41
|
+
creditManager,
|
|
42
|
+
targetContract,
|
|
43
|
+
mToken,
|
|
44
|
+
referrerId,
|
|
45
|
+
allowedTokens: [...allowedTokens]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
get mToken() {
|
|
49
|
+
if (!this.#mToken) throw new MissingSerializedParamsError("mToken");
|
|
50
|
+
return this.#mToken;
|
|
51
|
+
}
|
|
52
|
+
get allowedTokens() {
|
|
53
|
+
if (!this.#allowedTokens) throw new MissingSerializedParamsError("allowedTokens");
|
|
54
|
+
return this.#allowedTokens;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PlaceholderMidasIssuanceVaultAdapterContract };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./PlaceholderMidasGatewayAdapterContract.js";
|
|
2
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
3
|
+
import "./types.js";
|
|
4
|
+
export { PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
1
2
|
import { iCreditFacadeMulticallV310Abi, iCreditFacadeV310Abi } from "../../../abi/310/generated.js";
|
|
2
3
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
3
4
|
import "../../base/index.js";
|
|
4
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
5
5
|
//#region src/sdk/market/credit/CreditFacadeV310BaseContract.ts
|
|
6
6
|
const abi = [
|
|
7
7
|
...iCreditFacadeV310Abi,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { PlaceholderAdapterContract } from "./adapters/PlaceholderAdapterContracts.js";
|
|
2
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./adapters/midas/PlaceholderMidasGatewayAdapterContract.js";
|
|
3
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
2
4
|
import { createAdapter } from "./adapters/createAdapter.js";
|
|
3
5
|
import "./adapters/index.js";
|
|
4
6
|
import { CreditConfiguratorV310Contract } from "./credit/CreditConfiguratorV310Contract.js";
|
|
@@ -61,4 +63,4 @@ import { RWARegistry } from "./rwa/RWARegistry.js";
|
|
|
61
63
|
import { RWA_FACTORY_TYPES, isRWAFactory } from "./rwa/types.js";
|
|
62
64
|
import "./rwa/index.js";
|
|
63
65
|
import "./types.js";
|
|
64
|
-
export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, NON_STRATEGY_PHANTOM_TOKEN_TYPES, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeRWAFactory, UnsupportedZapperFunctionError, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, calcAdditionalBorrowApy, calcBorrowApy, calcMaxLeverage, calcPositionLeverage, calcUtilization, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, healthFactorBps, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, minSeizedAmount, mustGetDominantCollateral, optimalHFForPartialLiquidation, optimalRepaidAmount, rayToBps, usdToNumber };
|
|
66
|
+
export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CreditConfiguratorV310Contract, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, Erc4626PriceFeedContract, ExternalPriceFeedContract, GaugeContract, IERC20ZapperContract, IETHZapperContract, LinearInterestRateModelContract, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, NON_STRATEGY_PHANTOM_TOKEN_TYPES, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PartialPriceFeedInitError, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract, PoolSuite, PoolV310Contract, PriceFeedRef, PriceFeedRegister, PriceOracleV310Contract, PythPriceFeed, RWARegistry, RWA_FACTORY_SECURITIZE, RWA_FACTORY_TYPES, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RedstonePriceFeedContract, SECURITIZE_REGISTER_VAULT_TYPES, SecuritizeLiquidatorContract, SecuritizeRWAFactory, UnsupportedZapperFunctionError, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZeroPriceFeedContract, calcAdditionalBorrowApy, calcBorrowApy, calcMaxLeverage, calcPositionLeverage, calcUtilization, createAdapter, createPriceOracle, createZapper, abi as creditFacadeV310Abi, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, healthFactorBps, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, minSeizedAmount, mustGetDominantCollateral, optimalHFForPartialLiquidation, optimalRepaidAmount, rayToBps, usdToNumber };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
1
2
|
import { iPoolV310Abi } from "../../../abi/310/generated.js";
|
|
2
3
|
import { AddressMap } from "../../utils/AddressMap.js";
|
|
3
4
|
import { RAY } from "../../constants/math.js";
|
|
@@ -6,7 +7,6 @@ import { formatBN, formatBNvalue, percentFmt } from "../../utils/formatter.js";
|
|
|
6
7
|
import "../../utils/index.js";
|
|
7
8
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
8
9
|
import "../../base/index.js";
|
|
9
|
-
import { iPausableAbi } from "../../../abi/iPausable.js";
|
|
10
10
|
import { calcUtilization } from "../math.js";
|
|
11
11
|
//#region src/sdk/market/pool/PoolV310Contract.ts
|
|
12
12
|
const abi = [...iPoolV310Abi, ...iPausableAbi];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ZapperContract } from "./ZapperContract.js";
|
|
2
1
|
import { iethZapperAbi } from "../../../abi/iETHZapper.js";
|
|
2
|
+
import { ZapperContract } from "./ZapperContract.js";
|
|
3
3
|
//#region src/sdk/market/zapper/IETHZapperContract.ts
|
|
4
4
|
const abi = iethZapperAbi;
|
|
5
5
|
var IETHZapperContract = class extends ZapperContract {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
1
2
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
2
3
|
import "../../base/index.js";
|
|
3
|
-
import { iZapperAbi } from "../../../abi/iZapper.js";
|
|
4
4
|
import { UnsupportedZapperFunctionError } from "./errors.js";
|
|
5
5
|
//#region src/sdk/market/zapper/ZapperContract.ts
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AddressSet } from "../utils/AddressSet.js";
|
|
2
1
|
import { ierc20Abi } from "../../abi/iERC20.js";
|
|
2
|
+
import { AddressSet } from "../utils/AddressSet.js";
|
|
3
3
|
import "../constants/addresses.js";
|
|
4
4
|
import { PERCENTAGE_FACTOR, RAY } from "../constants/math.js";
|
|
5
5
|
import "../constants/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { errorAbis } from "../../../abi/errors.js";
|
|
2
|
-
import { generateCastTraceCall } from "./cast.js";
|
|
3
2
|
import { iUpdatablePriceFeedAbi } from "../../../abi/iUpdatablePriceFeed.js";
|
|
3
|
+
import { generateCastTraceCall } from "./cast.js";
|
|
4
4
|
import { simulateMulticall } from "./simulateMulticall.js";
|
|
5
5
|
import { BaseError, CallExecutionError, ContractFunctionRevertedError, decodeFunctionData, decodeFunctionResult, encodeFunctionData, parseAbi } from "viem";
|
|
6
6
|
import { getAction, parseAccount } from "viem/utils";
|
|
@@ -14,7 +14,7 @@ import { isTransientError } from "./isTransientError.js";
|
|
|
14
14
|
import { GreenlistMidasGatewayProps, RWAKycFailure, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, greenlistMidasGateway, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, writeAndWait } from "./kycUtils.js";
|
|
15
15
|
import { LogSplitterTransportOptions, isRangeError, logSplitterTransport } from "./logSplitterTransport.js";
|
|
16
16
|
import { setLTZero, setLTs } from "./ltUtils.js";
|
|
17
|
-
import {
|
|
17
|
+
import { RestoreMidasIssuanceVaultPause, UnpauseMidasIssuanceVaultProps, unpauseMidasIssuanceVault } from "./midasUtils.js";
|
|
18
18
|
import { migrateFaucet } from "./migrateFaucet.js";
|
|
19
19
|
import { IMinter } from "./mint/types.js";
|
|
20
20
|
import { createMinter } from "./mint/factory.js";
|
|
@@ -26,4 +26,4 @@ import { EnableDSTokenBackDatingProps, RestoreDSTokenBackDating, claimDSToken, c
|
|
|
26
26
|
import { httpTransportOptionsSchema } from "./transports.js";
|
|
27
27
|
import { ONCHAIN_EXECUTION_ID_ADDRESS, VerifyTestnetParams, verifyTestnet } from "./verifyTestnet.js";
|
|
28
28
|
import { MakePendingWithdrawalsClaimableOptions, makePendingWithdrawalsClaimable } from "./withdrawalUtils.js";
|
|
29
|
-
export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, MakePendingWithdrawalsClaimableOptions, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult,
|
|
29
|
+
export { AccountOpener, AccountOpenerOptions, AnvilActions, AnvilClient, AnvilClientConfig, AnvilDealParameters, AnvilNodeInfo, AnvilRPCSchema, CheckMulticallFn, Create2Deployer, Create2Parameters, DEFAULT_CREATE2_SALT, DetectedCall, EnableDSTokenBackDatingProps, EnsureExistsUsingPublicCreate2ReturnType, EthCallMethod, EthCallRequest, EthCallSpy, GetCreate2AddressParameters, GreenlistMidasGatewayProps, IMinter, type LogSplitterTransportOptions, MakePendingWithdrawalsClaimableOptions, NoAvailableTransportsError, ONCHAIN_EXECUTION_ID_ADDRESS, OpenAccountHumanizedPreview, OpenAccountResult, OpenAccountsResult, OpenTxRevertedError, PUBLIC_CREATE2_FACTORY, PoolDepositResult, ProviderConfig, ProviderStatus, RWAKycFailure, RegisterMidasInvestorProps, RegisterRWAInvestorProps, RegisterRWAInvestorResult, RegisterSecuritizeInvestorProps, ReplaceStorageParams, ResilientTransportOptions, RestoreDSTokenBackDating, RestoreMidasIssuanceVaultPause, RevolverTransport, RevolverTransportConfig, RevolverTransportValue, RpcErrorResult, RpcProvider, RpcResponse, RpcSuccessResult, SUPPORTED_RPC_PROVIDERS, SelectionStrategy, TargetAccount, UnpauseMidasIssuanceVaultProps, VerifyTestnetParams, anvilNodeInfo, calcLiquidatableLTs, claimDSToken, claimDSTokens, claimFromFaucet, createAnvilClient, createMinter, deployUsingPublicCreate2, detectChain, enableDSTokenBackDating, evmMineDetailed, extendAnvilClient, faucetAbi, getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getPublicCreate2Address, getRpcProviderUrl, getThirdWebUrl, greenlistMidasGateway, httpTransportOptionsSchema, iDegenNftv2Abi, iOnchainExecutionIdAbi, iOwnableAbi, iaclTraitAbi, isAnvil, isDeployedUsingPublicCreate2, isOutOfSyncError, isRangeError, isRateLimitError, isTransientError, logSplitterTransport, makePendingWithdrawalsClaimable, migrateFaucet, providerConfigSchema, registerMidasInvestor, registerRWAInvestor, registerSecuritizeInvestor, replaceStorage, resilientTransport, resilientTransportOptionsSchema, revolverTransportConfigBaseSchema, revolverTransportConfigSchema, rpcProvidersSchema, setLTZero, setLTs, unpauseMidasIssuanceVault, verifyTestnet, writeAndWait };
|
|
@@ -1,41 +1,8 @@
|
|
|
1
1
|
import { ILogger } from "../sdk/types/logger.js";
|
|
2
|
-
import { CreditSuite } from "../sdk/market/credit/CreditSuite.js";
|
|
3
|
-
import { MultiCall } from "../sdk/types/transactions.js";
|
|
4
2
|
import "../sdk/index.js";
|
|
5
3
|
import { AnvilClient } from "./createAnvilClient.js";
|
|
6
|
-
import { Address
|
|
4
|
+
import { Address } from "viem";
|
|
7
5
|
//#region src/dev/midasUtils.d.ts
|
|
8
|
-
interface PrependMidasReceiveGreenlistProps {
|
|
9
|
-
/**
|
|
10
|
-
* Credit manager the account is opened on
|
|
11
|
-
*/
|
|
12
|
-
cm: CreditSuite;
|
|
13
|
-
/**
|
|
14
|
-
* Client to read gateway state with
|
|
15
|
-
*/
|
|
16
|
-
client: PublicClient;
|
|
17
|
-
/**
|
|
18
|
-
* Calls to run in the credit facade multicall, as produced by the router
|
|
19
|
-
*/
|
|
20
|
-
calls: MultiCall[];
|
|
21
|
-
logger?: ILogger;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Prepends `MidasGatewayAdapter.receiveGreenlist()` to a credit facade
|
|
25
|
-
* multicall that mints an mToken through a Midas issuance vault.
|
|
26
|
-
*
|
|
27
|
-
* Permissioned and restricted-interface mTokens can only be held by greenlisted
|
|
28
|
-
* accounts, and a freshly opened credit account is never greenlisted, so the
|
|
29
|
-
* mint reverts with `WMAC: hasnt role` unless the account asks the gateway for
|
|
30
|
-
* the greenlist first. Greenlisting the borrower (see `registerMidasInvestor`)
|
|
31
|
-
* is not enough — the role is checked on the token holder, which is the credit
|
|
32
|
-
* account.
|
|
33
|
-
*
|
|
34
|
-
* Returns `calls` unchanged when nothing has to be greenlisted: no issuance
|
|
35
|
-
* vault is called, its mToken has no gateway adapter on this credit manager,
|
|
36
|
-
* the gateway is permissionless, or the call is already there.
|
|
37
|
-
*/
|
|
38
|
-
declare function prependMidasReceiveGreenlist(props: PrependMidasReceiveGreenlistProps): Promise<MultiCall[]>;
|
|
39
6
|
interface UnpauseMidasIssuanceVaultProps {
|
|
40
7
|
anvil: AnvilClient;
|
|
41
8
|
/**
|
|
@@ -65,4 +32,4 @@ type RestoreMidasIssuanceVaultPause = () => Promise<void>;
|
|
|
65
32
|
*/
|
|
66
33
|
declare function unpauseMidasIssuanceVault(props: UnpauseMidasIssuanceVaultProps): Promise<RestoreMidasIssuanceVaultPause>;
|
|
67
34
|
//#endregion
|
|
68
|
-
export {
|
|
35
|
+
export { RestoreMidasIssuanceVaultPause, UnpauseMidasIssuanceVaultProps, unpauseMidasIssuanceVault };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetsMap } from "../../../sdk/utils/AssetsMap.js";
|
|
2
|
+
import { IMidasAdapter } from "../../../sdk/market/adapters/midas/types.js";
|
|
2
3
|
import { OnchainSDK } from "../../../sdk/OnchainSDK.js";
|
|
3
4
|
import "../../../sdk/index.js";
|
|
4
5
|
import { DelayedWithdrawalClaim, DelayedWithdrawalRequest } from "../types.js";
|
|
@@ -613,7 +614,7 @@ declare const protocolAbi: readonly [{
|
|
|
613
614
|
readonly inputs: readonly [];
|
|
614
615
|
}];
|
|
615
616
|
type protocolAbi = typeof protocolAbi;
|
|
616
|
-
declare class MidasGatewayAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
617
|
+
declare class MidasGatewayAdapterContract extends AbstractAdapterContract<abi, protocolAbi> implements IMidasAdapter {
|
|
617
618
|
#private;
|
|
618
619
|
constructor(sdk: OnchainSDK, args: ConcreteAdapterContractOptions);
|
|
619
620
|
get gateway(): Address;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssetsMap } from "../../../sdk/utils/AssetsMap.js";
|
|
2
|
+
import { IMidasAdapter } from "../../../sdk/market/adapters/midas/types.js";
|
|
2
3
|
import { OnchainSDK } from "../../../sdk/OnchainSDK.js";
|
|
3
4
|
import "../../../sdk/index.js";
|
|
4
5
|
import { AbstractAdapterContract, ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
@@ -219,7 +220,7 @@ declare const protocolAbi: readonly [{
|
|
|
219
220
|
readonly stateMutability: "view";
|
|
220
221
|
}];
|
|
221
222
|
type protocolAbi = typeof protocolAbi;
|
|
222
|
-
declare class MidasIssuanceVaultAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
223
|
+
declare class MidasIssuanceVaultAdapterContract extends AbstractAdapterContract<abi, protocolAbi> implements IMidasAdapter {
|
|
223
224
|
#private;
|
|
224
225
|
constructor(sdk: OnchainSDK, args: ConcreteAdapterContractOptions);
|
|
225
226
|
get mToken(): Address;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ILogger } from "../../types/logger.js";
|
|
2
|
+
import { CreditSuite } from "../../market/credit/CreditSuite.js";
|
|
3
|
+
import { MultiCall } from "../../types/transactions.js";
|
|
4
|
+
import "../../types/index.js";
|
|
5
|
+
import { PublicClient } from "viem";
|
|
6
|
+
//#region src/sdk/accounts/utils/midasUtils.d.ts
|
|
7
|
+
interface PrependMidasReceiveGreenlistProps {
|
|
8
|
+
/**
|
|
9
|
+
* Credit manager the account is opened on
|
|
10
|
+
*/
|
|
11
|
+
cm: CreditSuite;
|
|
12
|
+
/**
|
|
13
|
+
* Client to read gateway `mode` with
|
|
14
|
+
*/
|
|
15
|
+
client: PublicClient;
|
|
16
|
+
/**
|
|
17
|
+
* Calls to run in the credit facade multicall, as produced by the router
|
|
18
|
+
*/
|
|
19
|
+
calls: MultiCall[];
|
|
20
|
+
logger?: ILogger;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Prepends `MidasGatewayAdapter.receiveGreenlist()` to a credit facade
|
|
24
|
+
* multicall that mints an mToken through a Midas issuance vault.
|
|
25
|
+
*
|
|
26
|
+
* Permissioned and restricted-interface mTokens can only be held by greenlisted
|
|
27
|
+
* accounts, and a freshly opened credit account is never greenlisted, so the
|
|
28
|
+
* mint reverts with `WMAC: hasnt role` unless the account asks the gateway for
|
|
29
|
+
* the greenlist first. Greenlisting the borrower is not enough — the role is
|
|
30
|
+
* checked on the token holder, which is the credit account.
|
|
31
|
+
*
|
|
32
|
+
* Returns `calls` unchanged when nothing has to be greenlisted: no issuance
|
|
33
|
+
* vault is called, its mToken has no gateway adapter on this credit manager,
|
|
34
|
+
* the gateway is permissionless, or the call is already there.
|
|
35
|
+
*/
|
|
36
|
+
declare function prependMidasReceiveGreenlist(props: PrependMidasReceiveGreenlistProps): Promise<MultiCall[]>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { PrependMidasReceiveGreenlistProps, prependMidasReceiveGreenlist };
|
|
@@ -38,6 +38,9 @@ import "./plugins/index.js";
|
|
|
38
38
|
import { IAdapterContract } from "./market/adapters/types.js";
|
|
39
39
|
import { createAdapter } from "./market/adapters/createAdapter.js";
|
|
40
40
|
import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./market/adapters/PlaceholderAdapterContracts.js";
|
|
41
|
+
import { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams } from "./market/adapters/midas/types.js";
|
|
42
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./market/adapters/midas/PlaceholderMidasGatewayAdapterContract.js";
|
|
43
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
41
44
|
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./market/rwa/midas/constants.js";
|
|
42
45
|
import { MidasLiquidatorContract } from "./market/rwa/midas/MidasLiquidatorContract.js";
|
|
43
46
|
import { PHANTOM_TOKEN_SECURITIZE_REDEMPTION, RWA_FACTORY_SECURITIZE, RWA_LIQUIDATOR_SECURITIZE } from "./market/rwa/securitize/constants.js";
|
|
@@ -180,4 +183,4 @@ import { LiquidationsService } from "./accounts/liquidations/LiquidationsService
|
|
|
180
183
|
import { MultichainLiquidationsService } from "./accounts/liquidations/MultichainLiquidationsService.js";
|
|
181
184
|
import "./accounts/index.js";
|
|
182
185
|
import { SDKOptions, attachOptionsSchema, onchainSDKOptionsSchema } from "./options.js";
|
|
183
|
-
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountSnapshot, AccountToCheck, AdapterData, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BlockNumberProps, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, 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, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, type DelayableIntent, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, IsStrategyCollateralProps, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, type OpenStrategyPreview, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OperationState, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, type PreviewErrorReason, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, 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, RWALiquidatorInfo, 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, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, 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, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, type StartIntent, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, calcAdditionalBorrowApy, calcBorrowApy, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcPositionLeverage, calcTimeToLiquidationMs, calcUtilization, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
|
|
186
|
+
export { ADDRESS_0X0, ADDRESS_PROVIDER_V310, AP_ACCOUNT_FACTORY, AP_ACL, AP_BOT_LIST, AP_BYTECODE_REPOSITORY, AP_CONTRACTS_REGISTER, AP_CONTROLLER_TIMELOCK, AP_CREDIT_ACCOUNT_COMPRESSOR, AP_CREDIT_SUITE_COMPRESSOR, AP_DATA_COMPRESSOR, AP_DELEVERAGE_BOT_HV, AP_DELEVERAGE_BOT_LV, AP_DELEVERAGE_BOT_PEGGED, AP_GAUGE_COMPRESSOR, AP_GEAR_STAKING, AP_GEAR_TOKEN, AP_INFLATION_ATTACK_BLOCKER, AP_INSOLVENCY_CHECKER, AP_MARKET_COMPRESSOR, AP_MARKET_CONFIGURATOR, AP_PARTIAL_LIQUIDATION_BOT, AP_PERIPHERY_COMPRESSOR, AP_PRICE_FEED_COMPRESSOR, AP_PRICE_FEED_STORE, AP_PRICE_ORACLE, AP_REDEMPTION_LOGGER, AP_REWARDS_COMPRESSOR, AP_ROUTER, AP_RWA_COMPRESSOR, AP_TOKEN_COMPRESSOR, AP_TREASURY, AP_WETH_GATEWAY, AP_WETH_TOKEN, AP_ZAPPER_REGISTER, AP_ZERO_PRICE_FEED, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountSnapshot, AccountToCheck, AdapterData, type AddCollateralIntent, AddLiquidityProps, AddressMap, AddressProviderAddresses, AddressProviderState, AddressProviderV310Contract, type AddressProviderV3StateHuman, AddressSet, type AdjustLeverageIntent, type AliasLossPolicyStateHuman, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, AssertAssignable, Asset, type AssetPriceFeedStateHuman, AssetsMap, AttachOptions, BLOCKS_PER_WEEK_BY_NETWORK, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, type BalancerWeightedPriceFeedStateHuman, BaseContract, BaseContractArgs, type BaseContractStateHuman, BaseParams, BasePlugin, type BasePriceFeedStateHuman, BaseState, BigIntMath, type BlockNumberProps, type BotListStateHuman, BotPermissions, BotStatusCall, BotsDirectResponse, type BoundedOracleStateHuman, BoundedPriceFeedContract, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcBorrowRateProps, CalcHealthFactorProps, CalcLiquidationPriceForTargetProps, CalcLiquidationPriceProps, ChainBlock, ChainBlockPin, ChainBlockSource, ChainConfig, ChainContractsRegister, ChainNotConfiguredError, ChainQueryOneProps, ChainQueryProps, ClaimFarmRewardsProps, ClaimableWithdrawal, ClientOptions, CloseCreditAccountResult, ClosePathBalances, CompositePriceFeedContract, CompressorZapperData, ConnectedBotData, ConnectedBotsCall, ConnectedBotsPerAccount, type ConstantOracleStateHuman, Construct, ConstructOptions, type ContractMethod, ContractOrInterface, ContractParseError, ContractParseErrorOptions, type CoreStateHuman, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountData, CreditAccountDataCall, CreditAccountDataPayload, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountTokenQuota, CreditAccountTokensSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, 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, CurrentWithdrawals, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, DStokenData, DUST_THRESHOLD, type DelayableIntent, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, DelayedWithdrawCollateralIntent, DelegatedMulticall, DepositMetadata, type DepositStrategyIntent, EncodableCreditAccountOperation, Erc4626PriceFeedContract, EstimateRawTxGasParameters, EtherscanURLParam, ExecuteMulticallBatchesOptions, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, FilterDustUSDOptions, FindBestClosePathProps, FindClaimAllRewardsProps, FindManyToOnePathProps, FindOneTokenPathProps, FindOpenStrategyPathProps, type FinishIntentProps, FormatBNOptions, FullyLiquidateProps, FullyLiquidateResult, GaugeContract, GaugeData, GaugeParams, type GaugeParamsHuman, type GaugeStateHuman, type GearStakingV3StateHuman, GearboxChain, type GearboxState, type GearboxStateHuman, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, HydrateOptions, IAdapterContract, IAddressProviderContract, IBaseContract, ICreditAccountsService, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, type ILogger, IMidasAdapter, IOnchainSDKPlugin, IOnchainSDKPluginConstructor, IPluginState, IPoolContract, IPoolsService, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTx, IRWAFactory, IRateKeeperContract, IRedemptionLoggerContract, IRouterContract, IUpdatablePriceFeedContract, IWithdrawalCompressorContract, IZapperContract, type InstantRoute, IntentPreviewError, type IntentPreviewResult, type IntentRoutesResult, type InterestRateModelStateHuman, InterestRateModelType, InvalidDelayedIntentError, IsDustOptions, IsStrategyCollateralProps, LEVERAGE_DECIMALS, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LPMonopolizedPoolMeta, type LPPriceFeedStateHuman, LatestUpdate, LinearInterestRateModelContract, type LinearInterestRateModelStateHuman, LiquidationFees, LiquidationsService, ListPoolPositionsProps, ListPositionsProps, ListPositionsPropsBase, ListStrategyPositionsProps, LoadRWALiquidatorsProps, type LogFn, type LossPolicyStateHuman, MAX_INT, MAX_LEVERAGE_BUFFER_BPS, MAX_UINT16, MAX_UINT256, MIN_INT96, MULTICALL_ADDRESS, MarketData, MarketFilter, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, type MarketStateHuman, MarketSuite, MarketType, MellowLRTPriceFeedContract, Methods, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams, MidasLiquidatorContract, MissingSerializedParamsError, type MultiCall, MulticallBatch, MulticallWithFailure, MultichainAttachOptions, type MultichainChainIdsProps, MultichainConstruct, MultichainHydrateOptions, MultichainLiquidationsService, type MultichainNetworkProps, MultichainOpportunitiesService, MultichainPositionsService, MultichainSDK, MultichainSDKOptions, type MultichainState, type MultichainStateHuman, MultichainSyncStateOptions, NATIVE_ADDRESS, NON_STRATEGY_PHANTOM_TOKEN_TYPES, NOT_DEPLOYED, NO_VERSION, NetworkType, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OnchainSDK, OnchainSDKOptions, OpenCAProps, type OpenStrategyPreview, OpenStrategyPreviewResult, type OpenStrategyProps, OpenStrategyResult, type OperationState, OpportunitiesService, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PERCENTAGE_DECIMALS, PERCENTAGE_FACTOR, PERCENTAGE_FACTOR_1KK, PERIPHERY_CONTRACTS, PHANTOM_TOKEN_CONTRACT_TYPES, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, PRICE_DECIMALS, PRICE_DECIMALS_POW, ParsedCall, ParsedCallArgs, ParsedCallV2, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PartialRecord, PartiallyLiquidateProps, PendingWithdrawal, PendleTWAPPTPriceFeed, PeripheryCompressorV310Contract, PeripheryContract, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PickSomeRequired, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderContract, PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract, PluginFactoriesMap, PluginFactory, PluginState, PluginStateVersionError, PluginStatesMap, PluginsMap, PoolQuotaKeeperContract, type PoolQuotaKeeperStateHuman, PoolService, PoolServiceCall, PoolServiceCallResult, PoolSimulation, PoolState, type PoolStateHuman, PoolSuite, type PoolSuiteStateHuman, PoolV310Contract, PositionsService, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, type PreviewErrorReason, PriceFeedAnswer, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedMapEntry, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, type PriceFeedStateHuman, PriceFeedTreeNode, PriceFeedUsageType, PriceFeedsForAccountOptions, 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, RWALiquidatorInfo, 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, RedemptionLog, RedemptionLoggerV310Contract, RedstonePriceFeedContract, type RedstonePriceFeedStateHuman, RelaxedBaseParams, RemoveLiquidityProps, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, RetryOptions, RewardInfo, Rewards, type RouteRefusals, 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, SetBotResult, SimpleTokenMeta, SimulateCallOptions, SimulateCallParameters, SimulateCallReturnType, SimulateMulticallParameters, SimulateMulticallReturnType, SimulatePoolOperationProps, SimulateWithPriceUpdatesError, SimulateWithPriceUpdatesErrorParams, SimulateWithPriceUpdatesErrorType, SimulateWithPriceUpdatesParameters, SimulateWithPriceUpdatesReturnType, SimulationError, SimulationErrorType, type StartIntent, StrategyRef, SunsetStrategy, SupportedValue, SwapOperation, SyncStateOptions, type TimestampedCalldata, TokenInfo, TokenMetaData, TokensMeta, TokensMetaState, type TumblerStateHuman, TypedObjectUtils, Unarray, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, VERSION_RANGE_310, VersionRange, VotingContractStatus, WAD, WAD_DECIMALS_POW, WatchBlocksAsyncParameters, WatchBlocksAsyncReturnType, type WithBlock, type WithMultichain, type WithdrawAssetIntent, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalMetadata, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, type ZapperStateHuman, ZeroPriceFeedContract, ZodAddress, ZodBigInt, ZodHex, accountSnapshotFromCreditAccountData, assetsMap, attachOptionsSchema, botPermissionsToString, bytes32ToString, calcAdditionalBorrowApy, calcBorrowApy, calcBorrowRate, calcHealthFactor, calcLiquidationPrice, calcLiquidationPriceForTarget, calcMaxLeverage, calcPositionLeverage, calcTimeToLiquidationMs, calcUtilization, chains, childLogger, createAdapter, createAddressProvider, createPriceOracle, createRawTx, createRedemptionLogger, createRouter, createWithdrawalCompressor, createZapper, decodeDelayedIntent, detectNetwork, dominantCollateral, encodeDelayedIntent, estimateRawTxGas, etherscanApiUrl, etherscanUrl, executeDelegatedMulticalls, executeMulticallBatches, expectedBalanceDeltas, fetchCreditAccountSlice, fetchRedstonePayloads, filterDust, filterDustUSD, findCuratorMarketConfigurator, fmtBinaryMask, formatBN, formatBNvalue, formatDuration, formatLeverage, formatNumberToString_, formatPercentage, formatTimestamp, functionArgsToMap, functionArgsToRecord, generateCastTraceCall, getAssetType, getCastTraceArgs, getChain, getCuratorName, getFunctionSignature, getNetworkType, getRawPriceUpdates, getSimulateWithPriceUpdatesError, getWithdrawalCompressorAddress, halfRAY, healthFactorBps, hexEq, hydrateAddressProvider, iCreditAccountAbi, isDust, isLPPriceFeed, isPublicNetwork, isRWAFactory, isRWAToken, isStrategyCollateral, isSunsetPool, isSunsetStrategy, isSupportedNetwork, isUpdatablePriceFeed, isV310, isVersionRange, json_parse, json_stringify, minSeizedAmount, mustGetDominantCollateral, numberWithCommas, onchainSDKOptionsSchema, optimalHFForPartialLiquidation, optimalRepaidAmount, percentFmt, rayToBps, rayToNumber, retry, sendRawTx, shortAddress, shortHash, simulateCall, simulateMulticall, simulateWithPriceUpdates, toAddress, toBN, toBigInt, toChainIds, toClaimableWithdrawal, toCreditAccountSlice, toPendingWithdrawal, toRequestableWithdrawal, toShares, toSharesUp, toSignificant, toWithdrawalStatus, usdToNumber, watchBlocksAsync };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { IAdapterContract } from "./types.js";
|
|
2
2
|
import { createAdapter } from "./createAdapter.js";
|
|
3
3
|
import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./PlaceholderAdapterContracts.js";
|
|
4
|
-
|
|
4
|
+
import { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams } from "./midas/types.js";
|
|
5
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./midas/PlaceholderMidasGatewayAdapterContract.js";
|
|
6
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./midas/PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
7
|
+
import "./midas/index.js";
|
|
8
|
+
export { IAdapterContract, IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract, createAdapter };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "../PlaceholderAdapterContracts.js";
|
|
2
|
+
import { IMidasAdapter, MidasGatewayAdapterParams } from "./types.js";
|
|
3
|
+
import { ConstructOptions } from "../../../base/Construct.js";
|
|
4
|
+
import "../../../base/index.js";
|
|
5
|
+
import { Address, Hex } from "viem";
|
|
6
|
+
//#region src/sdk/market/adapters/midas/PlaceholderMidasGatewayAdapterContract.d.ts
|
|
7
|
+
declare class PlaceholderMidasGatewayAdapterContract extends PlaceholderAdapterContract implements IMidasAdapter {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(options: ConstructOptions, args: PlaceholderAdapterContractOptions);
|
|
10
|
+
static decodeSerializedParams(serialized: Hex): MidasGatewayAdapterParams;
|
|
11
|
+
get gateway(): Address;
|
|
12
|
+
get mToken(): Address;
|
|
13
|
+
get quoteToken(): Address;
|
|
14
|
+
get phantomToken(): Address;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { PlaceholderMidasGatewayAdapterContract };
|
package/dist/types/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "../PlaceholderAdapterContracts.js";
|
|
2
|
+
import { IMidasAdapter, MidasIssuanceVaultAdapterParams } from "./types.js";
|
|
3
|
+
import { ConstructOptions } from "../../../base/Construct.js";
|
|
4
|
+
import "../../../base/index.js";
|
|
5
|
+
import { Address, Hex } from "viem";
|
|
6
|
+
//#region src/sdk/market/adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.d.ts
|
|
7
|
+
declare class PlaceholderMidasIssuanceVaultAdapterContract extends PlaceholderAdapterContract implements IMidasAdapter {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(options: ConstructOptions, args: PlaceholderAdapterContractOptions);
|
|
10
|
+
static decodeSerializedParams(serialized: Hex): MidasIssuanceVaultAdapterParams;
|
|
11
|
+
get mToken(): Address;
|
|
12
|
+
get allowedTokens(): Address[];
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { PlaceholderMidasIssuanceVaultAdapterContract };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams } from "./types.js";
|
|
2
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./PlaceholderMidasGatewayAdapterContract.js";
|
|
3
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
4
|
+
export { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams, PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IAdapterContract } from "../types.js";
|
|
2
|
+
import { Address, Hex } from "viem";
|
|
3
|
+
//#region src/sdk/market/adapters/midas/types.d.ts
|
|
4
|
+
interface IMidasAdapter extends IAdapterContract {
|
|
5
|
+
mToken: Address;
|
|
6
|
+
}
|
|
7
|
+
interface MidasGatewayAdapterParams {
|
|
8
|
+
creditManager: Address;
|
|
9
|
+
targetContract: Address;
|
|
10
|
+
gateway: Address;
|
|
11
|
+
mToken: Address;
|
|
12
|
+
quoteToken: Address;
|
|
13
|
+
phantomToken: Address;
|
|
14
|
+
referrerId: Hex;
|
|
15
|
+
}
|
|
16
|
+
interface MidasIssuanceVaultAdapterParams {
|
|
17
|
+
creditManager: Address;
|
|
18
|
+
targetContract: Address;
|
|
19
|
+
mToken: Address;
|
|
20
|
+
referrerId: Hex;
|
|
21
|
+
allowedTokens: Address[];
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { IAdapterContract } from "./adapters/types.js";
|
|
2
2
|
import { createAdapter } from "./adapters/createAdapter.js";
|
|
3
3
|
import { PlaceholderAdapterContract, PlaceholderAdapterContractOptions } from "./adapters/PlaceholderAdapterContracts.js";
|
|
4
|
+
import { IMidasAdapter, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams } from "./adapters/midas/types.js";
|
|
5
|
+
import { PlaceholderMidasGatewayAdapterContract } from "./adapters/midas/PlaceholderMidasGatewayAdapterContract.js";
|
|
6
|
+
import { PlaceholderMidasIssuanceVaultAdapterContract } from "./adapters/midas/PlaceholderMidasIssuanceVaultAdapterContract.js";
|
|
4
7
|
import "./adapters/index.js";
|
|
5
8
|
import { PHANTOM_TOKEN_MIDAS_REDEMPTION, RWA_LIQUIDATOR_MIDAS } from "./rwa/midas/constants.js";
|
|
6
9
|
import { MidasLiquidatorContract } from "./rwa/midas/MidasLiquidatorContract.js";
|
|
@@ -68,4 +71,4 @@ import { IETHZapperContract } from "./zapper/IETHZapperContract.js";
|
|
|
68
71
|
import "./zapper/index.js";
|
|
69
72
|
import { MarketRegister, MarketRegistryState, MarketRegistryStateHuman } from "./MarketRegister.js";
|
|
70
73
|
import { MAX_LEVERAGE_BUFFER_BPS, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, calcAdditionalBorrowApy, calcBorrowApy, calcMaxLeverage, calcPositionLeverage, calcUtilization, healthFactorBps, minSeizedAmount, optimalHFForPartialLiquidation, optimalRepaidAmount, rayToBps, usdToNumber } from "./math.js";
|
|
71
|
-
export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CompressorZapperData, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, GetOpenAccountRequirementsProps, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, IsStrategyCollateralProps, LatestUpdate, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, MidasLiquidatorContract, NON_STRATEGY_PHANTOM_TOKEN_TYPES, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForAccountOptions, 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, StrategyRef, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, calcAdditionalBorrowApy, calcBorrowApy, calcMaxLeverage, calcPositionLeverage, calcUtilization, createAdapter, createPriceOracle, createZapper, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, healthFactorBps, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, minSeizedAmount, mustGetDominantCollateral, optimalHFForPartialLiquidation, optimalRepaidAmount, rayToBps, usdToNumber };
|
|
74
|
+
export { AbstractLPPriceFeedContract, AbstractPriceFeedContract, BalanceDelta, BalancerStablePriceFeedContract, BalancerWeightedPriceFeedContract, BoundedPriceFeedContract, CompositePriceFeedContract, CompressorZapperData, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CurveCryptoPriceFeedContract, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, DStokenData, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, type FetchRedstonePayloadsOptions, GaugeContract, GaugeParams, GetOpenAccountRequirementsProps, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IMidasAdapter, IPoolContract, IPriceFeedContract, IPriceOracleContract, IRWAFactory, IRateKeeperContract, IUpdatablePriceFeedContract, IZapperContract, InterestRateModelType, IsStrategyCollateralProps, LatestUpdate, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MellowLRTPriceFeedContract, MidasGatewayAdapterParams, MidasIssuanceVaultAdapterParams, MidasLiquidatorContract, NON_STRATEGY_PHANTOM_TOKEN_TYPES, OptimalRepaidAmountProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialLiquidationParams, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendleTWAPPTPriceFeed, PlaceholderAdapterContract, PlaceholderAdapterContractOptions, PlaceholderMidasGatewayAdapterContract, PlaceholderMidasIssuanceVaultAdapterContract, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegister, PriceFeedRegisterHooks, PriceFeedRegisterOptions, PriceFeedUsageType, PriceFeedsForAccountOptions, 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, StrategyRef, type TimestampedCalldata, UnsupportedZapperFunctionError, UpdatePriceFeedsResult, WstETHPriceFeedContract, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, calcAdditionalBorrowApy, calcBorrowApy, calcMaxLeverage, calcPositionLeverage, calcUtilization, createAdapter, createPriceOracle, createZapper, dominantCollateral, expectedBalanceDeltas, fetchRedstonePayloads, getRawPriceUpdates, healthFactorBps, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, minSeizedAmount, mustGetDominantCollateral, optimalHFForPartialLiquidation, optimalRepaidAmount, rayToBps, usdToNumber };
|