@morpho-org/morpho-sdk 2.1.1 → 3.1.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/lib/cjs/abis.d.ts +2816 -0
- package/lib/cjs/abis.js +1951 -0
- package/lib/cjs/actions/index.d.ts +3 -0
- package/lib/cjs/actions/marketV1/borrow.js +7 -10
- package/lib/cjs/actions/marketV1/buildReallocationActions.d.ts +2 -3
- package/lib/cjs/actions/marketV1/buildReallocationActions.js +1 -2
- package/lib/cjs/actions/marketV1/index.d.ts +2 -0
- package/lib/cjs/actions/marketV1/index.js +2 -0
- package/lib/cjs/actions/marketV1/repay.d.ts +2 -0
- package/lib/cjs/actions/marketV1/repay.js +7 -8
- package/lib/cjs/actions/marketV1/repayWithdrawCollateral.d.ts +2 -0
- package/lib/cjs/actions/marketV1/repayWithdrawCollateral.js +9 -10
- package/lib/cjs/actions/marketV1/supply.d.ts +69 -0
- package/lib/cjs/actions/marketV1/supply.js +128 -0
- package/lib/cjs/actions/marketV1/supplyCollateral.d.ts +3 -1
- package/lib/cjs/actions/marketV1/supplyCollateral.js +12 -13
- package/lib/cjs/actions/marketV1/supplyCollateralBorrow.d.ts +3 -1
- package/lib/cjs/actions/marketV1/supplyCollateralBorrow.js +14 -15
- package/lib/cjs/actions/marketV1/withdraw.d.ts +83 -0
- package/lib/cjs/actions/marketV1/withdraw.js +110 -0
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +2 -2
- package/lib/cjs/actions/requirements/getRequirementsAction.d.ts +1 -1
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +2 -2
- package/lib/cjs/actions/vaultV1/deposit.d.ts +2 -0
- package/lib/cjs/actions/vaultV1/deposit.js +13 -14
- package/lib/cjs/actions/vaultV1/migrateToV2.d.ts +2 -0
- package/lib/cjs/actions/vaultV1/migrateToV2.js +11 -9
- package/lib/cjs/actions/vaultV2/deposit.d.ts +2 -0
- package/lib/cjs/actions/vaultV2/deposit.js +13 -14
- package/lib/cjs/addresses.d.ts +2 -0
- package/lib/cjs/addresses.js +18 -0
- package/lib/cjs/augment/AccrualPosition.d.ts +9 -0
- package/lib/cjs/augment/AccrualPosition.js +8 -0
- package/lib/cjs/augment/AccrualVault.d.ts +8 -0
- package/lib/cjs/augment/AccrualVault.js +7 -0
- package/lib/cjs/augment/Holding.d.ts +8 -0
- package/lib/cjs/augment/Holding.js +7 -0
- package/lib/cjs/augment/Market.d.ts +8 -0
- package/lib/cjs/augment/Market.js +7 -0
- package/lib/cjs/augment/MarketParams.d.ts +8 -0
- package/lib/cjs/augment/MarketParams.js +7 -0
- package/lib/cjs/augment/Position.d.ts +8 -0
- package/lib/cjs/augment/Position.js +7 -0
- package/lib/cjs/augment/Token.d.ts +8 -0
- package/lib/cjs/augment/Token.js +7 -0
- package/lib/cjs/augment/User.d.ts +8 -0
- package/lib/cjs/augment/User.js +7 -0
- package/lib/cjs/augment/Vault.d.ts +8 -0
- package/lib/cjs/augment/Vault.js +7 -0
- package/lib/cjs/augment/VaultConfig.d.ts +8 -0
- package/lib/cjs/augment/VaultConfig.js +7 -0
- package/lib/cjs/augment/VaultMarketAllocation.d.ts +8 -0
- package/lib/cjs/augment/VaultMarketAllocation.js +7 -0
- package/lib/cjs/augment/VaultMarketConfig.d.ts +8 -0
- package/lib/cjs/augment/VaultMarketConfig.js +7 -0
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +8 -0
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +8 -0
- package/lib/cjs/augment/VaultUser.d.ts +8 -0
- package/lib/cjs/augment/VaultUser.js +7 -0
- package/lib/cjs/augment.d.ts +14 -0
- package/lib/cjs/augment.js +16 -0
- package/lib/cjs/bundler/actions.d.ts +637 -0
- package/lib/cjs/bundler/actions.js +1088 -0
- package/lib/cjs/bundler/index.d.ts +2 -0
- package/lib/cjs/bundler/index.js +18 -0
- package/lib/cjs/bundler/types.d.ts +200 -0
- package/lib/cjs/bundler/types.js +2 -0
- package/lib/cjs/constants.d.ts +3 -0
- package/lib/cjs/constants.js +32 -0
- package/lib/cjs/entities/index.d.ts +6 -3
- package/lib/cjs/entities/index.js +41 -17
- package/lib/cjs/entities/marketV1/marketV1.d.ts +161 -24
- package/lib/cjs/entities/marketV1/marketV1.js +166 -19
- package/lib/cjs/entities/reallocationData.d.ts +193 -0
- package/lib/cjs/entities/reallocationData.js +406 -0
- package/lib/cjs/errors.d.ts +2 -0
- package/lib/cjs/errors.js +18 -0
- package/lib/cjs/fetch.d.ts +1 -0
- package/lib/cjs/fetch.js +30 -0
- package/lib/cjs/format.d.ts +2 -0
- package/lib/cjs/format.js +22 -0
- package/lib/cjs/helpers/computeReallocations.d.ts +63 -12
- package/lib/cjs/helpers/computeReallocations.js +160 -41
- package/lib/cjs/helpers/constant.d.ts +17 -0
- package/lib/cjs/helpers/constant.js +30 -1
- package/lib/cjs/helpers/index.d.ts +3 -2
- package/lib/cjs/helpers/index.js +14 -2
- package/lib/cjs/helpers/slippage.d.ts +57 -0
- package/lib/cjs/helpers/slippage.js +82 -0
- package/lib/cjs/helpers/validate.d.ts +40 -7
- package/lib/cjs/helpers/validate.js +67 -12
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +0 -1
- package/lib/cjs/types/action.d.ts +27 -6
- package/lib/cjs/types/client.d.ts +1 -1
- package/lib/cjs/types/error.d.ts +155 -7
- package/lib/cjs/types/error.js +202 -11
- package/lib/cjs/types/sharedLiquidity.d.ts +43 -3
- package/lib/cjs/types.d.ts +3 -0
- package/lib/cjs/types.js +17 -0
- package/lib/cjs/utils.d.ts +9 -0
- package/lib/cjs/utils.js +65 -0
- package/lib/esm/abis.d.ts +2816 -0
- package/lib/esm/abis.js +1922 -0
- package/lib/esm/actions/index.d.ts +3 -0
- package/lib/esm/actions/marketV1/borrow.js +2 -5
- package/lib/esm/actions/marketV1/buildReallocationActions.d.ts +2 -3
- package/lib/esm/actions/marketV1/buildReallocationActions.js +1 -2
- package/lib/esm/actions/marketV1/index.d.ts +2 -0
- package/lib/esm/actions/marketV1/index.js +2 -0
- package/lib/esm/actions/marketV1/repay.d.ts +2 -0
- package/lib/esm/actions/marketV1/repay.js +4 -5
- package/lib/esm/actions/marketV1/repayWithdrawCollateral.d.ts +2 -0
- package/lib/esm/actions/marketV1/repayWithdrawCollateral.js +4 -5
- package/lib/esm/actions/marketV1/supply.d.ts +69 -0
- package/lib/esm/actions/marketV1/supply.js +124 -0
- package/lib/esm/actions/marketV1/supplyCollateral.d.ts +3 -1
- package/lib/esm/actions/marketV1/supplyCollateral.js +7 -8
- package/lib/esm/actions/marketV1/supplyCollateralBorrow.d.ts +3 -1
- package/lib/esm/actions/marketV1/supplyCollateralBorrow.js +7 -8
- package/lib/esm/actions/marketV1/withdraw.d.ts +83 -0
- package/lib/esm/actions/marketV1/withdraw.js +106 -0
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +1 -1
- package/lib/esm/actions/requirements/getRequirementsAction.d.ts +1 -1
- package/lib/esm/actions/requirements/getRequirementsApproval.js +1 -1
- package/lib/esm/actions/vaultV1/deposit.d.ts +2 -0
- package/lib/esm/actions/vaultV1/deposit.js +3 -4
- package/lib/esm/actions/vaultV1/migrateToV2.d.ts +2 -0
- package/lib/esm/actions/vaultV1/migrateToV2.js +3 -1
- package/lib/esm/actions/vaultV2/deposit.d.ts +2 -0
- package/lib/esm/actions/vaultV2/deposit.js +3 -4
- package/lib/esm/addresses.d.ts +2 -0
- package/lib/esm/addresses.js +1 -0
- package/lib/esm/augment/AccrualPosition.d.ts +9 -0
- package/lib/esm/augment/AccrualPosition.js +5 -0
- package/lib/esm/augment/AccrualVault.d.ts +8 -0
- package/lib/esm/augment/AccrualVault.js +4 -0
- package/lib/esm/augment/Holding.d.ts +8 -0
- package/lib/esm/augment/Holding.js +4 -0
- package/lib/esm/augment/Market.d.ts +8 -0
- package/lib/esm/augment/Market.js +4 -0
- package/lib/esm/augment/MarketParams.d.ts +8 -0
- package/lib/esm/augment/MarketParams.js +4 -0
- package/lib/esm/augment/Position.d.ts +8 -0
- package/lib/esm/augment/Position.js +4 -0
- package/lib/esm/augment/Token.d.ts +8 -0
- package/lib/esm/augment/Token.js +4 -0
- package/lib/esm/augment/User.d.ts +8 -0
- package/lib/esm/augment/User.js +4 -0
- package/lib/esm/augment/Vault.d.ts +8 -0
- package/lib/esm/augment/Vault.js +4 -0
- package/lib/esm/augment/VaultConfig.d.ts +8 -0
- package/lib/esm/augment/VaultConfig.js +4 -0
- package/lib/esm/augment/VaultMarketAllocation.d.ts +8 -0
- package/lib/esm/augment/VaultMarketAllocation.js +4 -0
- package/lib/esm/augment/VaultMarketConfig.d.ts +8 -0
- package/lib/esm/augment/VaultMarketConfig.js +4 -0
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +8 -0
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +5 -0
- package/lib/esm/augment/VaultUser.d.ts +8 -0
- package/lib/esm/augment/VaultUser.js +4 -0
- package/lib/esm/augment.d.ts +14 -0
- package/lib/esm/augment.js +14 -0
- package/lib/esm/bundler/actions.d.ts +637 -0
- package/lib/esm/bundler/actions.js +1085 -0
- package/lib/esm/bundler/index.d.ts +2 -0
- package/lib/esm/bundler/index.js +2 -0
- package/lib/esm/bundler/types.d.ts +200 -0
- package/lib/esm/bundler/types.js +1 -0
- package/lib/esm/constants.d.ts +3 -0
- package/lib/esm/constants.js +3 -0
- package/lib/esm/entities/index.d.ts +6 -3
- package/lib/esm/entities/index.js +5 -3
- package/lib/esm/entities/marketV1/marketV1.d.ts +161 -24
- package/lib/esm/entities/marketV1/marketV1.js +170 -23
- package/lib/esm/entities/reallocationData.d.ts +193 -0
- package/lib/esm/entities/reallocationData.js +402 -0
- package/lib/esm/errors.d.ts +2 -0
- package/lib/esm/errors.js +1 -0
- package/lib/esm/fetch.d.ts +1 -0
- package/lib/esm/fetch.js +1 -0
- package/lib/esm/format.d.ts +2 -0
- package/lib/esm/format.js +1 -0
- package/lib/esm/helpers/computeReallocations.d.ts +63 -12
- package/lib/esm/helpers/computeReallocations.js +160 -41
- package/lib/esm/helpers/constant.d.ts +17 -0
- package/lib/esm/helpers/constant.js +30 -1
- package/lib/esm/helpers/index.d.ts +3 -2
- package/lib/esm/helpers/index.js +3 -2
- package/lib/esm/helpers/slippage.d.ts +57 -0
- package/lib/esm/helpers/slippage.js +80 -0
- package/lib/esm/helpers/validate.d.ts +40 -7
- package/lib/esm/helpers/validate.js +63 -11
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +0 -1
- package/lib/esm/types/action.d.ts +27 -6
- package/lib/esm/types/client.d.ts +1 -1
- package/lib/esm/types/error.d.ts +155 -7
- package/lib/esm/types/error.js +185 -9
- package/lib/esm/types/sharedLiquidity.d.ts +43 -3
- package/lib/esm/types.d.ts +3 -0
- package/lib/esm/types.js +1 -0
- package/lib/esm/utils.d.ts +9 -0
- package/lib/esm/utils.js +7 -0
- package/package.json +128 -17
- package/src/index.ts +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.User = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return blue_sdk_1.User; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.User.fetch = blue_sdk_viem_1.fetchUser;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Vault = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "Vault", { enumerable: true, get: function () { return blue_sdk_1.Vault; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.Vault.fetch = blue_sdk_viem_1.fetchVault;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VaultConfig as BlueVaultConfig } from "@morpho-org/blue-sdk";
|
|
2
|
+
import { fetchVaultConfig } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
declare module "@morpho-org/blue-sdk" {
|
|
4
|
+
namespace VaultConfig {
|
|
5
|
+
let fetch: typeof fetchVaultConfig;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { BlueVaultConfig as VaultConfig };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VaultConfig = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "VaultConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultConfig; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.VaultConfig.fetch = blue_sdk_viem_1.fetchVaultConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VaultMarketAllocation as BlueVaultMarketAllocation } from "@morpho-org/blue-sdk";
|
|
2
|
+
import { fetchVaultMarketAllocation } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
declare module "@morpho-org/blue-sdk" {
|
|
4
|
+
namespace VaultMarketAllocation {
|
|
5
|
+
let fetch: typeof fetchVaultMarketAllocation;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { BlueVaultMarketAllocation as VaultMarketAllocation };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VaultMarketAllocation = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "VaultMarketAllocation", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketAllocation; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.VaultMarketAllocation.fetch = blue_sdk_viem_1.fetchVaultMarketAllocation;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VaultMarketConfig as BlueVaultMarketConfig } from "@morpho-org/blue-sdk";
|
|
2
|
+
import { fetchVaultMarketConfig } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
declare module "@morpho-org/blue-sdk" {
|
|
4
|
+
namespace VaultMarketConfig {
|
|
5
|
+
let fetch: typeof fetchVaultMarketConfig;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { BlueVaultMarketConfig as VaultMarketConfig };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VaultMarketConfig = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "VaultMarketConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketConfig; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.VaultMarketConfig.fetch = blue_sdk_viem_1.fetchVaultMarketConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VaultMarketPublicAllocatorConfig as BlueVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk";
|
|
2
|
+
import { fetchVaultMarketPublicAllocatorConfig } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
declare module "@morpho-org/blue-sdk" {
|
|
4
|
+
namespace VaultMarketPublicAllocatorConfig {
|
|
5
|
+
let fetch: typeof fetchVaultMarketPublicAllocatorConfig;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { BlueVaultMarketPublicAllocatorConfig as VaultMarketPublicAllocatorConfig, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VaultMarketPublicAllocatorConfig = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "VaultMarketPublicAllocatorConfig", { enumerable: true, get: function () { return blue_sdk_1.VaultMarketPublicAllocatorConfig; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.VaultMarketPublicAllocatorConfig.fetch =
|
|
8
|
+
blue_sdk_viem_1.fetchVaultMarketPublicAllocatorConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VaultUser as BlueVaultUser } from "@morpho-org/blue-sdk";
|
|
2
|
+
import { fetchVaultUser } from "@morpho-org/blue-sdk-viem";
|
|
3
|
+
declare module "@morpho-org/blue-sdk" {
|
|
4
|
+
namespace VaultUser {
|
|
5
|
+
let fetch: typeof fetchVaultUser;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export { BlueVaultUser as VaultUser };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VaultUser = void 0;
|
|
4
|
+
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
+
Object.defineProperty(exports, "VaultUser", { enumerable: true, get: function () { return blue_sdk_1.VaultUser; } });
|
|
6
|
+
const blue_sdk_viem_1 = require("@morpho-org/blue-sdk-viem");
|
|
7
|
+
blue_sdk_1.VaultUser.fetch = blue_sdk_viem_1.fetchVaultUser;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "./augment/AccrualPosition.js";
|
|
2
|
+
import "./augment/AccrualVault.js";
|
|
3
|
+
import "./augment/Holding.js";
|
|
4
|
+
import "./augment/Market.js";
|
|
5
|
+
import "./augment/MarketParams.js";
|
|
6
|
+
import "./augment/Position.js";
|
|
7
|
+
import "./augment/Token.js";
|
|
8
|
+
import "./augment/User.js";
|
|
9
|
+
import "./augment/Vault.js";
|
|
10
|
+
import "./augment/VaultConfig.js";
|
|
11
|
+
import "./augment/VaultMarketAllocation.js";
|
|
12
|
+
import "./augment/VaultMarketConfig.js";
|
|
13
|
+
import "./augment/VaultMarketPublicAllocatorConfig.js";
|
|
14
|
+
import "./augment/VaultUser.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
require("./augment/AccrualPosition.js");
|
|
4
|
+
require("./augment/AccrualVault.js");
|
|
5
|
+
require("./augment/Holding.js");
|
|
6
|
+
require("./augment/Market.js");
|
|
7
|
+
require("./augment/MarketParams.js");
|
|
8
|
+
require("./augment/Position.js");
|
|
9
|
+
require("./augment/Token.js");
|
|
10
|
+
require("./augment/User.js");
|
|
11
|
+
require("./augment/Vault.js");
|
|
12
|
+
require("./augment/VaultConfig.js");
|
|
13
|
+
require("./augment/VaultMarketAllocation.js");
|
|
14
|
+
require("./augment/VaultMarketConfig.js");
|
|
15
|
+
require("./augment/VaultMarketPublicAllocatorConfig.js");
|
|
16
|
+
require("./augment/VaultUser.js");
|