@morpho-org/morpho-sdk 5.8.0 → 5.9.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/README.md +4 -0
- package/lib/cjs/abis.d.ts +543 -0
- package/lib/cjs/abis.js +738 -0
- package/lib/cjs/actions/blue/borrow.d.ts +5 -2
- package/lib/cjs/actions/blue/borrow.js +1 -1
- package/lib/cjs/actions/blue/refinance.d.ts +7 -2
- package/lib/cjs/actions/blue/refinance.js +3 -1
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +6 -2
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +2 -1
- package/lib/cjs/actions/blue/withdraw.d.ts +2 -1
- package/lib/cjs/actions/blue/withdraw.js +1 -1
- 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 +2 -0
- package/lib/cjs/bundler/actions.js +2 -0
- package/lib/cjs/bundler/types.d.ts +10 -1
- package/lib/cjs/entities/blue/blue.d.ts +30 -5
- package/lib/cjs/entities/blue/blue.js +8 -2
- 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 +4 -1
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +4 -1
- package/lib/cjs/helpers/validate.d.ts +2 -0
- package/lib/cjs/helpers/validate.js +2 -0
- package/lib/cjs/types/error.d.ts +34 -6
- package/lib/cjs/types/error.js +34 -6
- package/lib/cjs/types/sharedLiquidity.d.ts +26 -3
- 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 +5 -2
- package/lib/esm/actions/blue/borrow.js +1 -1
- package/lib/esm/actions/blue/refinance.d.ts +7 -2
- package/lib/esm/actions/blue/refinance.js +3 -1
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +6 -2
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +2 -1
- package/lib/esm/actions/blue/withdraw.d.ts +2 -1
- package/lib/esm/actions/blue/withdraw.js +1 -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 +2 -0
- package/lib/esm/bundler/actions.js +2 -0
- package/lib/esm/bundler/types.d.ts +10 -1
- package/lib/esm/entities/blue/blue.d.ts +30 -5
- package/lib/esm/entities/blue/blue.js +8 -2
- 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 +4 -1
- package/lib/esm/helpers/computeVaultV1Reallocations.js +4 -1
- package/lib/esm/helpers/validate.d.ts +2 -0
- package/lib/esm/helpers/validate.js +2 -0
- package/lib/esm/types/error.d.ts +34 -6
- package/lib/esm/types/error.js +34 -6
- package/lib/esm/types/sharedLiquidity.d.ts +26 -3
- 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 +4 -4
|
@@ -25,6 +25,8 @@ import { type ReallocationComputeOptions, type VaultV1Reallocation } from "../ty
|
|
|
25
25
|
* @throws {InsufficientSharedLiquidityError} when shared liquidity cannot cover the operation's absolute shortfall on the target market — preventing fee-bearing reallocations from being attached to a call that would still revert onchain.
|
|
26
26
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when `operation === "withdraw"` and `amount` exceeds the target market's `totalSupplyAssets` — the on-chain call would revert regardless of reallocations.
|
|
27
27
|
* @throws {MissingPublicAllocatorConfigError} when a selected vault is missing its public allocator config.
|
|
28
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
29
|
+
* `VaultV2BlueReallocationData.computeVaultV2BlueReallocations`.
|
|
28
30
|
* @example
|
|
29
31
|
* ```ts
|
|
30
32
|
* import { createPublicClient, http, parseUnits } from "viem";
|
|
@@ -76,6 +78,7 @@ export declare const computeVaultV1Reallocations: ({ reallocationData: data, mar
|
|
|
76
78
|
/**
|
|
77
79
|
* Deprecated name for the Vault V1 amount-aware reallocation planner.
|
|
78
80
|
*
|
|
79
|
-
* @deprecated
|
|
81
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
82
|
+
* `VaultV2BlueReallocationData.computeVaultV2BlueReallocations`.
|
|
80
83
|
*/
|
|
81
84
|
export declare const computeReallocations: typeof computeVaultV1Reallocations;
|
|
@@ -78,6 +78,8 @@ const capVaultWithdrawals = (withdrawals, assets) => {
|
|
|
78
78
|
* @throws {InsufficientSharedLiquidityError} when shared liquidity cannot cover the operation's absolute shortfall on the target market — preventing fee-bearing reallocations from being attached to a call that would still revert onchain.
|
|
79
79
|
* @throws {ReallocationWithdrawExceedsMarketSupplyError} when `operation === "withdraw"` and `amount` exceeds the target market's `totalSupplyAssets` — the on-chain call would revert regardless of reallocations.
|
|
80
80
|
* @throws {MissingPublicAllocatorConfigError} when a selected vault is missing its public allocator config.
|
|
81
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
82
|
+
* `VaultV2BlueReallocationData.computeVaultV2BlueReallocations`.
|
|
81
83
|
* @example
|
|
82
84
|
* ```ts
|
|
83
85
|
* import { createPublicClient, http, parseUnits } from "viem";
|
|
@@ -237,6 +239,7 @@ export const computeVaultV1Reallocations = ({ reallocationData: data, marketId,
|
|
|
237
239
|
/**
|
|
238
240
|
* Deprecated name for the Vault V1 amount-aware reallocation planner.
|
|
239
241
|
*
|
|
240
|
-
* @deprecated
|
|
242
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
243
|
+
* `VaultV2BlueReallocationData.computeVaultV2BlueReallocations`.
|
|
241
244
|
*/
|
|
242
245
|
export const computeReallocations = computeVaultV1Reallocations;
|
|
@@ -148,6 +148,8 @@ export declare const validateRepayShares: (params: {
|
|
|
148
148
|
* @throws {NonPositiveInputError} when a withdrawal amount is non-positive.
|
|
149
149
|
* @throws {ReallocationWithdrawalOnTargetMarketError} when a withdrawal references the target market.
|
|
150
150
|
* @throws {UnsortedReallocationWithdrawalsError} when withdrawals are not strictly market-id sorted.
|
|
151
|
+
* @deprecated Vault V1 PublicAllocator validation will be removed in the next major. Use Vault V2
|
|
152
|
+
* reallocations for new integrations.
|
|
151
153
|
* @example
|
|
152
154
|
* ```ts
|
|
153
155
|
* import type { BlueMarketId } from "@morpho-org/morpho-sdk/types";
|
|
@@ -228,6 +228,8 @@ export const validateRepayShares = (params) => {
|
|
|
228
228
|
* @throws {NonPositiveInputError} when a withdrawal amount is non-positive.
|
|
229
229
|
* @throws {ReallocationWithdrawalOnTargetMarketError} when a withdrawal references the target market.
|
|
230
230
|
* @throws {UnsortedReallocationWithdrawalsError} when withdrawals are not strictly market-id sorted.
|
|
231
|
+
* @deprecated Vault V1 PublicAllocator validation will be removed in the next major. Use Vault V2
|
|
232
|
+
* reallocations for new integrations.
|
|
231
233
|
* @example
|
|
232
234
|
* ```ts
|
|
233
235
|
* import type { BlueMarketId } from "@morpho-org/morpho-sdk/types";
|
package/lib/esm/types/error.d.ts
CHANGED
|
@@ -524,7 +524,11 @@ export declare class MarketIdMismatchError extends Error {
|
|
|
524
524
|
export declare class AccrualPositionUserMismatchError extends Error {
|
|
525
525
|
constructor(positionUser: string, expectedUser: string);
|
|
526
526
|
}
|
|
527
|
-
/**
|
|
527
|
+
/**
|
|
528
|
+
* Thrown when a reallocation has no withdrawals.
|
|
529
|
+
*
|
|
530
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
531
|
+
*/
|
|
528
532
|
export declare class EmptyReallocationWithdrawalsError extends Error {
|
|
529
533
|
constructor(vault: string);
|
|
530
534
|
}
|
|
@@ -536,6 +540,8 @@ export declare class ReallocationWithdrawalOnTargetMarketError extends Error {
|
|
|
536
540
|
* Thrown when a Public Allocator reallocation does not match exactly one V1 or
|
|
537
541
|
* V2 input shape.
|
|
538
542
|
*
|
|
543
|
+
* @deprecated Vault V1/V2 reallocation-shape dispatch will be removed in the next major. Use Vault
|
|
544
|
+
* V2 reallocations.
|
|
539
545
|
* @example
|
|
540
546
|
* ```ts
|
|
541
547
|
* import { InvalidReallocationShapeError } from "@morpho-org/morpho-sdk";
|
|
@@ -549,6 +555,8 @@ export declare class InvalidReallocationShapeError extends Error {
|
|
|
549
555
|
/**
|
|
550
556
|
* Thrown when one reallocation plan contains both Vault V1 and Vault V2 entries.
|
|
551
557
|
*
|
|
558
|
+
* @deprecated Vault V1/V2 mixed-plan support will be removed in the next major. Use Vault V2
|
|
559
|
+
* reallocations.
|
|
552
560
|
* @example
|
|
553
561
|
* ```ts
|
|
554
562
|
* import { MixedReallocationVersionsError } from "@morpho-org/morpho-sdk";
|
|
@@ -637,7 +645,11 @@ export declare class InconsistentReallocationPenaltyError extends Error {
|
|
|
637
645
|
readonly actual: bigint;
|
|
638
646
|
});
|
|
639
647
|
}
|
|
640
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* Thrown when reallocation withdrawals within a vault are not strictly sorted by market id.
|
|
650
|
+
*
|
|
651
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
652
|
+
*/
|
|
641
653
|
export declare class UnsortedReallocationWithdrawalsError extends Error {
|
|
642
654
|
constructor(vault: string, marketId: string);
|
|
643
655
|
}
|
|
@@ -697,11 +709,19 @@ export declare class RepaySharesExceedDebtError extends Error {
|
|
|
697
709
|
market: string;
|
|
698
710
|
});
|
|
699
711
|
}
|
|
700
|
-
/**
|
|
712
|
+
/**
|
|
713
|
+
* Thrown when a vault selected for reallocation has no configured `PublicAllocator`.
|
|
714
|
+
*
|
|
715
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
716
|
+
*/
|
|
701
717
|
export declare class MissingPublicAllocatorConfigError extends Error {
|
|
702
718
|
constructor(vault: string);
|
|
703
719
|
}
|
|
704
|
-
/**
|
|
720
|
+
/**
|
|
721
|
+
* Thrown when a reallocation attempts to use a disabled vault market.
|
|
722
|
+
*
|
|
723
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
724
|
+
*/
|
|
705
725
|
export declare class DisabledReallocationMarketError extends Error {
|
|
706
726
|
readonly vault: Address;
|
|
707
727
|
readonly marketId: MarketId;
|
|
@@ -742,7 +762,11 @@ export declare class UnknownReallocationVaultError extends UnknownDataError {
|
|
|
742
762
|
*/
|
|
743
763
|
constructor(vault: Address);
|
|
744
764
|
}
|
|
745
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* Thrown when reallocation state does not contain a requested vault-market config.
|
|
767
|
+
*
|
|
768
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
769
|
+
*/
|
|
746
770
|
export declare class UnknownReallocationVaultMarketConfigError extends UnknownDataError {
|
|
747
771
|
readonly vault: Address;
|
|
748
772
|
readonly marketId: MarketId;
|
|
@@ -752,7 +776,11 @@ export declare class UnknownReallocationVaultMarketConfigError extends UnknownDa
|
|
|
752
776
|
*/
|
|
753
777
|
constructor(vault: Address, marketId: MarketId);
|
|
754
778
|
}
|
|
755
|
-
/**
|
|
779
|
+
/**
|
|
780
|
+
* Thrown when reallocation state does not contain a requested market position.
|
|
781
|
+
*
|
|
782
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
783
|
+
*/
|
|
756
784
|
export declare class UnknownReallocationPositionError extends UnknownDataError {
|
|
757
785
|
readonly user: Address;
|
|
758
786
|
readonly marketId: MarketId;
|
package/lib/esm/types/error.js
CHANGED
|
@@ -587,7 +587,11 @@ export class AccrualPositionUserMismatchError extends Error {
|
|
|
587
587
|
super(`Accrual position user ${positionUser} does not match expected user ${expectedUser}`);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
/**
|
|
590
|
+
/**
|
|
591
|
+
* Thrown when a reallocation has no withdrawals.
|
|
592
|
+
*
|
|
593
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
594
|
+
*/
|
|
591
595
|
export class EmptyReallocationWithdrawalsError extends Error {
|
|
592
596
|
constructor(vault) {
|
|
593
597
|
super(`Reallocation withdrawals list cannot be empty for vault: ${vault}`);
|
|
@@ -603,6 +607,8 @@ export class ReallocationWithdrawalOnTargetMarketError extends Error {
|
|
|
603
607
|
* Thrown when a Public Allocator reallocation does not match exactly one V1 or
|
|
604
608
|
* V2 input shape.
|
|
605
609
|
*
|
|
610
|
+
* @deprecated Vault V1/V2 reallocation-shape dispatch will be removed in the next major. Use Vault
|
|
611
|
+
* V2 reallocations.
|
|
606
612
|
* @example
|
|
607
613
|
* ```ts
|
|
608
614
|
* import { InvalidReallocationShapeError } from "@morpho-org/morpho-sdk";
|
|
@@ -619,6 +625,8 @@ export class InvalidReallocationShapeError extends Error {
|
|
|
619
625
|
/**
|
|
620
626
|
* Thrown when one reallocation plan contains both Vault V1 and Vault V2 entries.
|
|
621
627
|
*
|
|
628
|
+
* @deprecated Vault V1/V2 mixed-plan support will be removed in the next major. Use Vault V2
|
|
629
|
+
* reallocations.
|
|
622
630
|
* @example
|
|
623
631
|
* ```ts
|
|
624
632
|
* import { MixedReallocationVersionsError } from "@morpho-org/morpho-sdk";
|
|
@@ -725,7 +733,11 @@ export class InconsistentReallocationPenaltyError extends Error {
|
|
|
725
733
|
this.name = "InconsistentReallocationPenaltyError";
|
|
726
734
|
}
|
|
727
735
|
}
|
|
728
|
-
/**
|
|
736
|
+
/**
|
|
737
|
+
* Thrown when reallocation withdrawals within a vault are not strictly sorted by market id.
|
|
738
|
+
*
|
|
739
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
740
|
+
*/
|
|
729
741
|
export class UnsortedReallocationWithdrawalsError extends Error {
|
|
730
742
|
constructor(vault, marketId) {
|
|
731
743
|
super(`Reallocation withdrawals must be strictly sorted by market ID for vault ${vault}. Market ${marketId} is out of order.`);
|
|
@@ -783,13 +795,21 @@ export class RepaySharesExceedDebtError extends Error {
|
|
|
783
795
|
super(`Repay shares ${params.repayShares} exceed outstanding borrow shares ${params.borrowShares} for market: ${params.market}`);
|
|
784
796
|
}
|
|
785
797
|
}
|
|
786
|
-
/**
|
|
798
|
+
/**
|
|
799
|
+
* Thrown when a vault selected for reallocation has no configured `PublicAllocator`.
|
|
800
|
+
*
|
|
801
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
802
|
+
*/
|
|
787
803
|
export class MissingPublicAllocatorConfigError extends Error {
|
|
788
804
|
constructor(vault) {
|
|
789
805
|
super(`Vault ${vault} has no public allocator configured but was selected for reallocation`);
|
|
790
806
|
}
|
|
791
807
|
}
|
|
792
|
-
/**
|
|
808
|
+
/**
|
|
809
|
+
* Thrown when a reallocation attempts to use a disabled vault market.
|
|
810
|
+
*
|
|
811
|
+
* @deprecated Vault V1 PublicAllocator support will be removed in the next major.
|
|
812
|
+
*/
|
|
793
813
|
export class DisabledReallocationMarketError extends Error {
|
|
794
814
|
vault;
|
|
795
815
|
marketId;
|
|
@@ -835,7 +855,11 @@ export class UnknownReallocationVaultError extends UnknownDataError {
|
|
|
835
855
|
this.vault = vault;
|
|
836
856
|
}
|
|
837
857
|
}
|
|
838
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* Thrown when reallocation state does not contain a requested vault-market config.
|
|
860
|
+
*
|
|
861
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major.
|
|
862
|
+
*/
|
|
839
863
|
export class UnknownReallocationVaultMarketConfigError extends UnknownDataError {
|
|
840
864
|
vault;
|
|
841
865
|
marketId;
|
|
@@ -849,7 +873,11 @@ export class UnknownReallocationVaultMarketConfigError extends UnknownDataError
|
|
|
849
873
|
this.marketId = marketId;
|
|
850
874
|
}
|
|
851
875
|
}
|
|
852
|
-
/**
|
|
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
|
+
*/
|
|
853
881
|
export class UnknownReallocationPositionError extends UnknownDataError {
|
|
854
882
|
user;
|
|
855
883
|
marketId;
|
|
@@ -2,6 +2,9 @@ import type { BigIntish, MarketId, MarketParams } from "@morpho-org/blue-sdk";
|
|
|
2
2
|
import type { Address } from "viem";
|
|
3
3
|
/**
|
|
4
4
|
* Options controlling public allocator withdrawal discovery.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
7
|
+
* {@link VaultV2BluePublicAllocatorOptions}.
|
|
5
8
|
*/
|
|
6
9
|
export interface PublicAllocatorOptions {
|
|
7
10
|
/** Whether public allocator reallocation discovery is enabled. */
|
|
@@ -63,6 +66,9 @@ export interface VaultV2BluePublicAllocatorOptions {
|
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
68
|
* A computed source-market withdrawal before it is grouped by vault.
|
|
69
|
+
*
|
|
70
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
71
|
+
* {@link VaultV2BlueReallocation}.
|
|
66
72
|
*/
|
|
67
73
|
export interface PublicReallocation {
|
|
68
74
|
/** Source market id to withdraw from. */
|
|
@@ -72,7 +78,12 @@ export interface PublicReallocation {
|
|
|
72
78
|
/** Assets to withdraw from the source market. */
|
|
73
79
|
readonly assets: bigint;
|
|
74
80
|
}
|
|
75
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* A single withdrawal from a source market within a vault reallocation.
|
|
83
|
+
*
|
|
84
|
+
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
85
|
+
* {@link VaultV2BlueReallocation}.
|
|
86
|
+
*/
|
|
76
87
|
export interface ReallocationWithdrawal {
|
|
77
88
|
/** Source market parameters to pass to the public allocator. */
|
|
78
89
|
readonly marketParams: MarketParams;
|
|
@@ -84,6 +95,9 @@ export interface ReallocationWithdrawal {
|
|
|
84
95
|
*
|
|
85
96
|
* Maps 1:1 to a `PublicAllocator.reallocateTo()` call.
|
|
86
97
|
* Withdraws from source markets and supplies to the target market.
|
|
98
|
+
*
|
|
99
|
+
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
100
|
+
* {@link VaultV2BlueReallocation}.
|
|
87
101
|
*/
|
|
88
102
|
export interface VaultV1Reallocation {
|
|
89
103
|
readonly vault: Address;
|
|
@@ -123,12 +137,18 @@ export interface VaultV2BlueReallocation {
|
|
|
123
137
|
/** Vault-configured WAD-scaled penalty rate passed to the allocator. */
|
|
124
138
|
readonly penalty: bigint;
|
|
125
139
|
}
|
|
126
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* A homogeneous Blue action plan containing only Vault V1 or only Vault V2 reallocations.
|
|
142
|
+
*
|
|
143
|
+
* Vault V1 members are deprecated for high-level Blue writes and will stop being accepted in the
|
|
144
|
+
* next major. Use Vault V2 members for new high-level integrations.
|
|
145
|
+
*/
|
|
127
146
|
export type BlueReallocationPlan = Iterable<VaultV1Reallocation> | Iterable<VaultV2BlueReallocation>;
|
|
128
147
|
/**
|
|
129
148
|
* Deprecated name for a Vault V1 reallocation.
|
|
130
149
|
*
|
|
131
|
-
* @deprecated
|
|
150
|
+
* @deprecated Vault V1 shared-liquidity support will be removed in the next major. Use
|
|
151
|
+
* {@link VaultV2BlueReallocation}.
|
|
132
152
|
*/
|
|
133
153
|
export type VaultReallocation = VaultV1Reallocation;
|
|
134
154
|
/**
|
|
@@ -136,6 +156,9 @@ export type VaultReallocation = VaultV1Reallocation;
|
|
|
136
156
|
*
|
|
137
157
|
* Extends {@link PublicAllocatorOptions} with supply-side utilization targets
|
|
138
158
|
* that determine when reallocation is triggered.
|
|
159
|
+
*
|
|
160
|
+
* @deprecated Vault V1 shared-liquidity planning will be removed in the next major. Use
|
|
161
|
+
* {@link VaultV2BluePublicAllocatorOptions}.
|
|
139
162
|
*/
|
|
140
163
|
export interface ReallocationComputeOptions extends PublicAllocatorOptions {
|
|
141
164
|
/**
|
package/lib/esm/types.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ MaxBorrowOptions, MaxPositionCapacities as BlueMaxPositionCapacities,
|
|
|
9
9
|
MaxPositionCapacities, MaxWithdrawCollateralOptions as BlueMaxWithdrawCollateralOptions,
|
|
10
10
|
/** @deprecated Use `BlueMaxWithdrawCollateralOptions` or the raw `/blue/types` subpath. */
|
|
11
11
|
MaxWithdrawCollateralOptions, Pending, Permit2Allowance, } from "@morpho-org/blue-sdk";
|
|
12
|
-
export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs,
|
|
12
|
+
export type { AuthorizationArgs as BlueAuthorizationTypedDataArgs,
|
|
13
|
+
/** @deprecated Args for the deprecated getDaiPermitTypedData; scheduled for removal in the next major. */
|
|
14
|
+
DaiPermitArgs, DeploylessFetchParameters as BlueDeploylessFetchParameters,
|
|
13
15
|
/** @deprecated Use `BlueDeploylessFetchParameters` or the raw `/blue/types` subpath. */
|
|
14
16
|
DeploylessFetchParameters, FetchParameters as BlueFetchParameters,
|
|
15
17
|
/** @deprecated Use `BlueFetchParameters` or the raw `/blue/types` subpath. */
|
package/lib/esm/utils.d.ts
CHANGED
|
@@ -8,7 +8,9 @@ MarketUtils, MathLib, SharesMath as BlueSharesMath,
|
|
|
8
8
|
SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
9
9
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
|
|
10
10
|
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
11
|
-
getAuthorizationTypedData,
|
|
11
|
+
getAuthorizationTypedData,
|
|
12
|
+
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
13
|
+
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
12
14
|
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
|
|
13
15
|
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
14
16
|
EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
|
package/lib/esm/utils.js
CHANGED
|
@@ -7,7 +7,9 @@ MarketUtils, MathLib, SharesMath as BlueSharesMath,
|
|
|
7
7
|
SharesMath, VaultUtils, VaultV2BlueMarketPublicAllocatorConfigUtils, VaultV2BluePublicAllocatorConfigUtils, VaultV2Utils, } from "@morpho-org/blue-sdk";
|
|
8
8
|
export { decodeBytes32String, getAuthorizationTypedData as getBlueAuthorizationTypedData,
|
|
9
9
|
/** @deprecated Use getBlueAuthorizationTypedData or the raw protocol subpath. */
|
|
10
|
-
getAuthorizationTypedData,
|
|
10
|
+
getAuthorizationTypedData,
|
|
11
|
+
/** @deprecated DAI is routed through Permit2 internally; scheduled for removal in the next major. */
|
|
12
|
+
getDaiPermitTypedData, getPermit2PermitTypedData, getPermit2TransferFromTypedData, getPermitTypedData, MetaMorphoAction as BlueMetaMorphoAction, optionalBoolean, readContractRestructured, restructure, safeGetAddress, safeParseNumber, safeParseUnits, } from "@morpho-org/blue-sdk-viem";
|
|
11
13
|
export { EcrecoverRatifierUtils as MidnightEcrecoverRatifierUtils,
|
|
12
14
|
/** @deprecated Use MidnightEcrecoverRatifierUtils or the raw protocol subpath. */
|
|
13
15
|
EcrecoverRatifierUtils, eip712Digest, GroupUtils as MidnightGroupUtils,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/morpho-sdk",
|
|
3
3
|
"description": "Abstraction layer for Morpho's complexity.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.9.0",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Foulks-Plb <https://x.com/FoulkPlb>"
|
|
@@ -162,9 +162,9 @@
|
|
|
162
162
|
"dependencies": {
|
|
163
163
|
"zod": "^4.4.3",
|
|
164
164
|
"@morpho-org/blue-sdk": "^6.7.0",
|
|
165
|
-
"@morpho-org/blue-sdk-viem": "^5.
|
|
166
|
-
"@morpho-org/midnight-sdk": "^1.3.
|
|
167
|
-
"@morpho-org/morpho-ts": "^2.11.
|
|
165
|
+
"@morpho-org/blue-sdk-viem": "^5.5.0",
|
|
166
|
+
"@morpho-org/midnight-sdk": "^1.3.1",
|
|
167
|
+
"@morpho-org/morpho-ts": "^2.11.1"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"viem": "^2.0.0"
|