@morpho-org/morpho-sdk 5.8.0 → 6.0.0-next.0
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/MIGRATION-v5-to-v6.md +201 -0
- package/README.md +62 -40
- package/lib/cjs/abis.d.ts +543 -0
- package/lib/cjs/abis.js +738 -0
- package/lib/cjs/actions/blue/borrow.d.ts +62 -58
- package/lib/cjs/actions/blue/borrow.js +48 -80
- package/lib/cjs/actions/blue/common.d.ts +99 -0
- package/lib/cjs/actions/blue/common.js +318 -0
- package/lib/cjs/actions/blue/refinance.d.ts +72 -107
- package/lib/cjs/actions/blue/refinance.js +97 -197
- package/lib/cjs/actions/blue/repay.d.ts +72 -68
- package/lib/cjs/actions/blue/repay.js +56 -118
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +85 -90
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +148 -137
- package/lib/cjs/actions/blue/supply.d.ts +62 -45
- package/lib/cjs/actions/blue/supply.js +94 -70
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +63 -40
- package/lib/cjs/actions/blue/supplyCollateral.js +52 -69
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +82 -86
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +133 -119
- package/lib/cjs/actions/blue/withdraw.d.ts +68 -78
- package/lib/cjs/actions/blue/withdraw.js +101 -97
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +56 -28
- package/lib/cjs/actions/blue/withdrawCollateral.js +45 -50
- package/lib/cjs/actions/index.d.ts +1 -1
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +60 -19
- package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
- package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +207 -0
- package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
- package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.js +72 -0
- package/lib/cjs/actions/requirements/blue/index.d.ts +2 -0
- package/lib/cjs/actions/requirements/blue/index.js +2 -0
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +30 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +7 -2
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +33 -6
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +123 -0
- package/lib/cjs/actions/requirements/encode/index.d.ts +1 -0
- package/lib/cjs/actions/requirements/encode/index.js +1 -0
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -4
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -4
- package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +1 -0
- package/lib/cjs/actions/signatures/getTokenRequirementActions.js +4 -0
- package/lib/cjs/blue/types.d.ts +3 -1
- package/lib/cjs/blue/utils.d.ts +3 -1
- package/lib/cjs/blue/utils.js +1 -0
- package/lib/cjs/bundler/actions.d.ts +6 -4
- package/lib/cjs/bundler/actions.js +6 -4
- package/lib/cjs/bundler/types.d.ts +10 -1
- package/lib/cjs/client/morphoViemExtension.d.ts +2 -1
- package/lib/cjs/client/morphoViemExtension.js +2 -1
- package/lib/cjs/entities/blue/blue.d.ts +817 -360
- package/lib/cjs/entities/blue/blue.js +455 -698
- package/lib/cjs/entities/index.d.ts +1 -0
- package/lib/cjs/entities/vaultV1/vaultV1.js +4 -12
- package/lib/cjs/entities/vaultV1ReallocationData.d.ts +18 -3
- package/lib/cjs/entities/vaultV1ReallocationData.js +11 -1
- package/lib/cjs/entities/vaultV2/vaultV2.js +6 -18
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +7 -10
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +7 -10
- package/lib/cjs/helpers/validate.d.ts +16 -23
- package/lib/cjs/helpers/validate.js +32 -48
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +2 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +2 -0
- package/lib/cjs/types/action.d.ts +146 -162
- package/lib/cjs/types/action.js +29 -2
- package/lib/cjs/types/client.d.ts +9 -0
- package/lib/cjs/types/error.d.ts +173 -18
- package/lib/cjs/types/error.js +230 -25
- package/lib/cjs/types/sharedLiquidity.d.ts +20 -4
- package/lib/cjs/types.d.ts +3 -1
- package/lib/cjs/utils.d.ts +3 -1
- package/lib/cjs/utils.js +1 -0
- package/lib/esm/abis.d.ts +543 -0
- package/lib/esm/abis.js +737 -0
- package/lib/esm/actions/blue/borrow.d.ts +62 -58
- package/lib/esm/actions/blue/borrow.js +48 -80
- package/lib/esm/actions/blue/common.d.ts +99 -0
- package/lib/esm/actions/blue/common.js +306 -0
- package/lib/esm/actions/blue/refinance.d.ts +72 -107
- package/lib/esm/actions/blue/refinance.js +98 -198
- package/lib/esm/actions/blue/repay.d.ts +72 -68
- package/lib/esm/actions/blue/repay.js +56 -118
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +85 -90
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +149 -138
- package/lib/esm/actions/blue/supply.d.ts +62 -45
- package/lib/esm/actions/blue/supply.js +94 -70
- package/lib/esm/actions/blue/supplyCollateral.d.ts +63 -40
- package/lib/esm/actions/blue/supplyCollateral.js +52 -69
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +82 -86
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +134 -120
- package/lib/esm/actions/blue/withdraw.d.ts +68 -78
- package/lib/esm/actions/blue/withdraw.js +100 -96
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +56 -28
- package/lib/esm/actions/blue/withdrawCollateral.js +45 -50
- package/lib/esm/actions/index.d.ts +1 -1
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +63 -22
- package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
- package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +203 -0
- package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
- package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.js +68 -0
- package/lib/esm/actions/requirements/blue/index.d.ts +2 -0
- package/lib/esm/actions/requirements/blue/index.js +2 -0
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +31 -6
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +8 -3
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +34 -7
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +119 -0
- package/lib/esm/actions/requirements/encode/index.d.ts +1 -0
- package/lib/esm/actions/requirements/encode/index.js +1 -0
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -4
- package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -4
- package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +1 -0
- package/lib/esm/actions/signatures/getTokenRequirementActions.js +5 -1
- package/lib/esm/blue/types.d.ts +3 -1
- package/lib/esm/blue/utils.d.ts +3 -1
- package/lib/esm/blue/utils.js +3 -1
- package/lib/esm/bundler/actions.d.ts +6 -4
- package/lib/esm/bundler/actions.js +6 -4
- package/lib/esm/bundler/types.d.ts +10 -1
- package/lib/esm/client/morphoViemExtension.d.ts +2 -1
- package/lib/esm/client/morphoViemExtension.js +2 -1
- package/lib/esm/entities/blue/blue.d.ts +817 -360
- package/lib/esm/entities/blue/blue.js +461 -704
- package/lib/esm/entities/index.d.ts +1 -0
- package/lib/esm/entities/vaultV1/vaultV1.js +4 -12
- package/lib/esm/entities/vaultV1ReallocationData.d.ts +18 -3
- package/lib/esm/entities/vaultV1ReallocationData.js +13 -2
- package/lib/esm/entities/vaultV2/vaultV2.js +7 -19
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +7 -10
- package/lib/esm/helpers/computeVaultV1Reallocations.js +7 -10
- package/lib/esm/helpers/validate.d.ts +16 -23
- package/lib/esm/helpers/validate.js +32 -48
- package/lib/esm/helpers/validateRequirementSpender.d.ts +2 -1
- package/lib/esm/helpers/validateRequirementSpender.js +2 -0
- package/lib/esm/types/action.d.ts +146 -162
- package/lib/esm/types/action.js +28 -2
- package/lib/esm/types/client.d.ts +9 -0
- package/lib/esm/types/error.d.ts +173 -18
- package/lib/esm/types/error.js +216 -21
- package/lib/esm/types/sharedLiquidity.d.ts +20 -4
- package/lib/esm/types.d.ts +3 -1
- package/lib/esm/utils.d.ts +3 -1
- package/lib/esm/utils.js +3 -1
- package/package.json +7 -6
- package/lib/cjs/actions/blue/buildAssetFundingActions.d.ts +0 -47
- package/lib/cjs/actions/blue/buildAssetFundingActions.js +0 -63
- package/lib/cjs/actions/blue/buildReallocationActions.d.ts +0 -69
- package/lib/cjs/actions/blue/buildReallocationActions.js +0 -141
- package/lib/cjs/actions/blue/resolveRepayFunding.d.ts +0 -66
- package/lib/cjs/actions/blue/resolveRepayFunding.js +0 -85
- package/lib/esm/actions/blue/buildAssetFundingActions.d.ts +0 -47
- package/lib/esm/actions/blue/buildAssetFundingActions.js +0 -59
- package/lib/esm/actions/blue/buildReallocationActions.d.ts +0 -69
- package/lib/esm/actions/blue/buildReallocationActions.js +0 -135
- package/lib/esm/actions/blue/resolveRepayFunding.d.ts +0 -66
- package/lib/esm/actions/blue/resolveRepayFunding.js +0 -81
package/lib/cjs/types/error.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare class InputExceedsMaxError extends Error {
|
|
|
68
68
|
export declare class EmptyMarketParamsListError extends Error {
|
|
69
69
|
constructor();
|
|
70
70
|
}
|
|
71
|
-
/** Thrown when an
|
|
71
|
+
/** Thrown when an SDK operation deadline has already passed. */
|
|
72
72
|
export declare class ExpiredDeadlineError extends Error {
|
|
73
73
|
readonly deadline: bigint;
|
|
74
74
|
readonly timestamp: bigint;
|
|
@@ -203,6 +203,104 @@ export declare class VaultExitBundlesV1PermitMismatchError extends Error {
|
|
|
203
203
|
readonly cause?: unknown;
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
+
/** Thrown when a signed requirement cannot be safely encoded for BlueBundlesV1. */
|
|
207
|
+
export declare class BlueBundlesV1RequirementSignatureMismatchError extends Error {
|
|
208
|
+
/** Field whose signed value or encoding is invalid for the direct BlueBundlesV1 call. */
|
|
209
|
+
readonly field: "type" | "authorized" | "isAuthorized" | "deadline" | "signature";
|
|
210
|
+
/** Value required by BlueBundlesV1. */
|
|
211
|
+
readonly expected: string;
|
|
212
|
+
/** Value supplied by the signed requirement. */
|
|
213
|
+
readonly actual: string;
|
|
214
|
+
/**
|
|
215
|
+
* @param params - Signature mismatch details.
|
|
216
|
+
* @param params.field - Field rejected by the converter.
|
|
217
|
+
* @param params.expected - Value required by the direct route.
|
|
218
|
+
* @param params.actual - Value supplied by the requirement.
|
|
219
|
+
* @param params.cause - Original signature parser failure, when applicable.
|
|
220
|
+
*/
|
|
221
|
+
constructor(params: {
|
|
222
|
+
field: "type" | "authorized" | "isAuthorized" | "deadline" | "signature";
|
|
223
|
+
expected: string;
|
|
224
|
+
actual: string;
|
|
225
|
+
cause?: unknown;
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/** Thrown when Permit2 SignatureTransfer is selected without an explicit unordered nonce. */
|
|
229
|
+
export declare class MissingPermit2TransferFromNonceError extends Error {
|
|
230
|
+
constructor();
|
|
231
|
+
}
|
|
232
|
+
/** Thrown when an explicit Permit2 SignatureTransfer unordered nonce is already consumed. */
|
|
233
|
+
export declare class Permit2TransferFromNonceAlreadyUsedError extends Error {
|
|
234
|
+
readonly owner: Address;
|
|
235
|
+
readonly nonce: bigint;
|
|
236
|
+
/**
|
|
237
|
+
* @param owner - Permit2 token owner whose nonce is unavailable.
|
|
238
|
+
* @param nonce - Explicit unordered nonce that has already been consumed.
|
|
239
|
+
*/
|
|
240
|
+
constructor(owner: Address, nonce: bigint);
|
|
241
|
+
}
|
|
242
|
+
/** Thrown when no unused Permit2 unordered nonce exists at or after the requested start nonce. */
|
|
243
|
+
export declare class NoUnusedPermit2NonceError extends Error {
|
|
244
|
+
readonly owner: Address;
|
|
245
|
+
readonly startNonce: bigint;
|
|
246
|
+
/**
|
|
247
|
+
* @param owner - Permit2 token owner scanned for a free nonce.
|
|
248
|
+
* @param startNonce - Lowest nonce that was considered.
|
|
249
|
+
*/
|
|
250
|
+
constructor(owner: Address, startNonce: bigint);
|
|
251
|
+
}
|
|
252
|
+
/** Thrown when native funding does not exactly match the contract's gross token pull. */
|
|
253
|
+
export declare class NativeFundingAmountMismatchError extends Error {
|
|
254
|
+
readonly nativeAmount: bigint;
|
|
255
|
+
readonly requiredAmount: bigint;
|
|
256
|
+
/**
|
|
257
|
+
* @param nativeAmount - Native value supplied with the transaction.
|
|
258
|
+
* @param requiredAmount - Gross amount the BlueBundlesV1 entrypoint funds.
|
|
259
|
+
*/
|
|
260
|
+
constructor(nativeAmount: bigint, requiredAmount: bigint);
|
|
261
|
+
}
|
|
262
|
+
/** Thrown when a positive referral fee has no recipient. */
|
|
263
|
+
export declare class MissingReferralFeeRecipientError extends Error {
|
|
264
|
+
constructor();
|
|
265
|
+
}
|
|
266
|
+
/** Thrown when a BlueBundlesV1 reallocation source uses another loan token. */
|
|
267
|
+
export declare class ReallocationLoanTokenMismatchError extends Error {
|
|
268
|
+
readonly expected: Address;
|
|
269
|
+
readonly actual: Address;
|
|
270
|
+
/**
|
|
271
|
+
* @param expected - Loan token of the operation's target market.
|
|
272
|
+
* @param actual - Loan token found in the reallocation source market.
|
|
273
|
+
*/
|
|
274
|
+
constructor(expected: Address, actual: Address);
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Thrown when a Blue authorization operator is not one of the chain's registered Morpho operators
|
|
278
|
+
* (GeneralAdapter1 or BlueBundlesV1). Guards the exported authorization builder so a misconfigured
|
|
279
|
+
* `authorized` cannot grant an arbitrary address control over the user's Morpho positions.
|
|
280
|
+
*/
|
|
281
|
+
export declare class UnsupportedAuthorizationOperatorError extends Error {
|
|
282
|
+
readonly authorized: Address;
|
|
283
|
+
readonly chainId: number;
|
|
284
|
+
/**
|
|
285
|
+
* @param authorized - The operator address rejected as unsupported.
|
|
286
|
+
* @param chainId - Chain whose registry was consulted for the supported operators.
|
|
287
|
+
*/
|
|
288
|
+
constructor(authorized: Address, chainId: number);
|
|
289
|
+
}
|
|
290
|
+
/** Thrown when reallocations are attached to a combined call with no borrow leg. */
|
|
291
|
+
export declare class ReallocationsRequireBorrowError extends Error {
|
|
292
|
+
constructor();
|
|
293
|
+
}
|
|
294
|
+
/** Thrown when repay funding cannot cover the requested assets and referral fee. */
|
|
295
|
+
export declare class MaxRepayAssetsBelowRepayAssetsError extends Error {
|
|
296
|
+
readonly maxRepayAssets: bigint;
|
|
297
|
+
readonly repayAssets: bigint;
|
|
298
|
+
/**
|
|
299
|
+
* @param maxRepayAssets - Maximum loan-token funding supplied to the bundle.
|
|
300
|
+
* @param repayAssets - Minimum funding required for the repayment and referral fee.
|
|
301
|
+
*/
|
|
302
|
+
constructor(maxRepayAssets: bigint, repayAssets: bigint);
|
|
303
|
+
}
|
|
206
304
|
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
207
305
|
export declare const NonPositiveAssetAmountError: typeof NonPositiveInputError;
|
|
208
306
|
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
@@ -375,7 +473,7 @@ export declare namespace BundlerErrors {
|
|
|
375
473
|
}
|
|
376
474
|
}
|
|
377
475
|
/** Requirement signature kind accepted by action-output transaction builders. */
|
|
378
|
-
export type RequirementSignatureKind = "permit" | "authorization" | "midnightOfferRootSignature";
|
|
476
|
+
export type RequirementSignatureKind = "permit" | "permit2TransferFrom" | "authorization" | "midnightOfferRootSignature";
|
|
379
477
|
/**
|
|
380
478
|
* Thrown when `buildTx` receives more than one requirement signature of the same kind.
|
|
381
479
|
*
|
|
@@ -524,7 +622,11 @@ export declare class MarketIdMismatchError extends Error {
|
|
|
524
622
|
export declare class AccrualPositionUserMismatchError extends Error {
|
|
525
623
|
constructor(positionUser: string, expectedUser: string);
|
|
526
624
|
}
|
|
527
|
-
/**
|
|
625
|
+
/**
|
|
626
|
+
* Thrown when a reallocation has no withdrawals.
|
|
627
|
+
*
|
|
628
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
629
|
+
*/
|
|
528
630
|
export declare class EmptyReallocationWithdrawalsError extends Error {
|
|
529
631
|
constructor(vault: string);
|
|
530
632
|
}
|
|
@@ -533,8 +635,9 @@ export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
|
|
|
533
635
|
constructor(vault: string, marketId: string);
|
|
534
636
|
}
|
|
535
637
|
/**
|
|
536
|
-
* Thrown when a
|
|
537
|
-
*
|
|
638
|
+
* Thrown when a reallocation entry passed to a high-level Blue write is not a valid
|
|
639
|
+
* {@link VaultV2BlueReallocation}: a non-object entry, or an entry carrying Vault V1
|
|
640
|
+
* `withdrawals`/`fee` fields that high-level Blue writes no longer accept.
|
|
538
641
|
*
|
|
539
642
|
* @example
|
|
540
643
|
* ```ts
|
|
@@ -549,6 +652,8 @@ export declare class InvalidReallocationShapeError extends Error {
|
|
|
549
652
|
/**
|
|
550
653
|
* Thrown when one reallocation plan contains both Vault V1 and Vault V2 entries.
|
|
551
654
|
*
|
|
655
|
+
* @deprecated Vault V1/V2 mixed-plan support will be removed in the next major. Use Vault V2
|
|
656
|
+
* reallocations.
|
|
552
657
|
* @example
|
|
553
658
|
* ```ts
|
|
554
659
|
* import { MixedReallocationVersionsError } from "@morpho-org/morpho-sdk";
|
|
@@ -637,7 +742,11 @@ export declare class InconsistentReallocationPenaltyError extends Error {
|
|
|
637
742
|
readonly actual: bigint;
|
|
638
743
|
});
|
|
639
744
|
}
|
|
640
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* Thrown when reallocation withdrawals within a vault are not strictly sorted by market id.
|
|
747
|
+
*
|
|
748
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
749
|
+
*/
|
|
641
750
|
export declare class UnsortedReallocationWithdrawalsError extends Error {
|
|
642
751
|
constructor(vault: string, marketId: string);
|
|
643
752
|
}
|
|
@@ -697,11 +806,19 @@ export declare class RepaySharesExceedDebtError extends Error {
|
|
|
697
806
|
market: string;
|
|
698
807
|
});
|
|
699
808
|
}
|
|
700
|
-
/**
|
|
809
|
+
/**
|
|
810
|
+
* Thrown when a vault selected for reallocation has no configured `PublicAllocator`.
|
|
811
|
+
*
|
|
812
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
813
|
+
*/
|
|
701
814
|
export declare class MissingPublicAllocatorConfigError extends Error {
|
|
702
815
|
constructor(vault: string);
|
|
703
816
|
}
|
|
704
|
-
/**
|
|
817
|
+
/**
|
|
818
|
+
* Thrown when a reallocation attempts to use a disabled vault market.
|
|
819
|
+
*
|
|
820
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
821
|
+
*/
|
|
705
822
|
export declare class DisabledReallocationMarketError extends Error {
|
|
706
823
|
readonly vault: Address;
|
|
707
824
|
readonly marketId: MarketId;
|
|
@@ -742,7 +859,11 @@ export declare class UnknownReallocationVaultError extends UnknownDataError {
|
|
|
742
859
|
*/
|
|
743
860
|
constructor(vault: Address);
|
|
744
861
|
}
|
|
745
|
-
/**
|
|
862
|
+
/**
|
|
863
|
+
* Thrown when reallocation state does not contain a requested vault-market config.
|
|
864
|
+
*
|
|
865
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
866
|
+
*/
|
|
746
867
|
export declare class UnknownReallocationVaultMarketConfigError extends UnknownDataError {
|
|
747
868
|
readonly vault: Address;
|
|
748
869
|
readonly marketId: MarketId;
|
|
@@ -752,7 +873,11 @@ export declare class UnknownReallocationVaultMarketConfigError extends UnknownDa
|
|
|
752
873
|
*/
|
|
753
874
|
constructor(vault: Address, marketId: MarketId);
|
|
754
875
|
}
|
|
755
|
-
/**
|
|
876
|
+
/**
|
|
877
|
+
* Thrown when reallocation state does not contain a requested market position.
|
|
878
|
+
*
|
|
879
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
880
|
+
*/
|
|
756
881
|
export declare class UnknownReallocationPositionError extends UnknownDataError {
|
|
757
882
|
readonly user: Address;
|
|
758
883
|
readonly marketId: MarketId;
|
|
@@ -1010,10 +1135,6 @@ export declare class ReallocationWithdrawExceedsMarketSupplyError extends Error
|
|
|
1010
1135
|
export declare class VaultAssetMismatchError extends Error {
|
|
1011
1136
|
constructor(sourceAsset: Address, targetAsset: Address);
|
|
1012
1137
|
}
|
|
1013
|
-
/** Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive). */
|
|
1014
|
-
export declare class BorrowAmountAndSharesExclusiveError extends Error {
|
|
1015
|
-
constructor(market: string);
|
|
1016
|
-
}
|
|
1017
1138
|
/** Thrown when a refinance has identical source and target market ids (a refinance to the same market is a costly no-op). */
|
|
1018
1139
|
export declare class RefinanceSameMarketError extends Error {
|
|
1019
1140
|
constructor(market: string);
|
|
@@ -1022,7 +1143,23 @@ export declare class RefinanceSameMarketError extends Error {
|
|
|
1022
1143
|
export declare class RefinanceTokenMismatchError extends Error {
|
|
1023
1144
|
constructor(sourceMarket: string, targetMarket: string);
|
|
1024
1145
|
}
|
|
1025
|
-
/**
|
|
1146
|
+
/**
|
|
1147
|
+
* Thrown when a refinance specifies both `borrowAssets` and `borrowShares` as non-zero (modes are mutually exclusive).
|
|
1148
|
+
*
|
|
1149
|
+
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1150
|
+
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1151
|
+
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1152
|
+
*/
|
|
1153
|
+
export declare class BorrowAmountAndSharesExclusiveError extends Error {
|
|
1154
|
+
constructor(market: string);
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* Thrown when a refinance's `collateralAmount` exceeds the source position's available collateral.
|
|
1158
|
+
*
|
|
1159
|
+
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1160
|
+
* partial collateral inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1161
|
+
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1162
|
+
*/
|
|
1026
1163
|
export declare class RefinanceExceedsCollateralError extends Error {
|
|
1027
1164
|
readonly market: string;
|
|
1028
1165
|
readonly requested: bigint;
|
|
@@ -1033,7 +1170,13 @@ export declare class RefinanceExceedsCollateralError extends Error {
|
|
|
1033
1170
|
available: bigint;
|
|
1034
1171
|
});
|
|
1035
1172
|
}
|
|
1036
|
-
/**
|
|
1173
|
+
/**
|
|
1174
|
+
* Thrown when a refinance's `borrowShares` exceeds the source position's outstanding borrow shares.
|
|
1175
|
+
*
|
|
1176
|
+
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1177
|
+
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1178
|
+
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1179
|
+
*/
|
|
1037
1180
|
export declare class RefinanceExceedsBorrowSharesError extends Error {
|
|
1038
1181
|
readonly market: string;
|
|
1039
1182
|
readonly requested: bigint;
|
|
@@ -1044,7 +1187,13 @@ export declare class RefinanceExceedsBorrowSharesError extends Error {
|
|
|
1044
1187
|
available: bigint;
|
|
1045
1188
|
});
|
|
1046
1189
|
}
|
|
1047
|
-
/**
|
|
1190
|
+
/**
|
|
1191
|
+
* Thrown when a refinance's `borrowAssets` exceeds the source position's outstanding debt assets.
|
|
1192
|
+
*
|
|
1193
|
+
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1194
|
+
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1195
|
+
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1196
|
+
*/
|
|
1048
1197
|
export declare class RefinanceExceedsBorrowAssetsError extends Error {
|
|
1049
1198
|
readonly market: string;
|
|
1050
1199
|
readonly requested: bigint;
|
|
@@ -1055,7 +1204,13 @@ export declare class RefinanceExceedsBorrowAssetsError extends Error {
|
|
|
1055
1204
|
available: bigint;
|
|
1056
1205
|
});
|
|
1057
1206
|
}
|
|
1058
|
-
/**
|
|
1207
|
+
/**
|
|
1208
|
+
* Thrown when a refinance in shares mode (`borrowShares > 0n`) omits the `borrowAssets` overshoot for the target borrow leg.
|
|
1209
|
+
*
|
|
1210
|
+
* @deprecated The BlueBundlesV1 refinance route migrates the full live position and no longer accepts
|
|
1211
|
+
* partial borrow inputs, so this error is never thrown by `morpho-sdk` v6. It remains exported as a
|
|
1212
|
+
* compatibility shim for consumers pattern-matching on the v5 surface and will be removed in the next major.
|
|
1213
|
+
*/
|
|
1059
1214
|
export declare class RefinanceSharesMissingBorrowAssetsError extends Error {
|
|
1060
1215
|
constructor(market: string);
|
|
1061
1216
|
}
|