@morpho-org/blue-sdk 3.0.0-next.0 → 3.0.0-next.10
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/addresses.d.ts +258 -31
- package/lib/addresses.js +269 -41
- package/lib/chain.d.ts +13 -8
- package/lib/chain.js +96 -250
- package/lib/holding/Holding.d.ts +1 -1
- package/lib/holding/Holding.js +1 -1
- package/lib/market/Market.d.ts +2 -2
- package/lib/market/MarketUtils.d.ts +3 -4
- package/lib/market/MarketUtils.js +1 -10
- package/lib/math/MathLib.d.ts +6 -0
- package/lib/math/MathLib.js +9 -0
- package/lib/position/Position.d.ts +11 -19
- package/lib/position/Position.js +15 -21
- package/lib/position/PreLiquidationPosition.d.ts +81 -0
- package/lib/position/PreLiquidationPosition.js +158 -0
- package/lib/position/index.d.ts +1 -0
- package/lib/position/index.js +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/vault/VaultConfig.d.ts +1 -9
- package/lib/vault/VaultConfig.js +1 -7
- package/lib/vault/VaultMarketConfig.d.ts +2 -2
- package/package.json +5 -5
|
@@ -5,15 +5,7 @@ export interface IVaultConfig extends Omit<IToken, "decimals"> {
|
|
|
5
5
|
asset: Address;
|
|
6
6
|
}
|
|
7
7
|
export declare class VaultConfig extends Token implements IVaultConfig {
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Kept for backward compatibility.
|
|
10
|
-
*/
|
|
11
|
-
readonly chainId?: number | undefined;
|
|
12
8
|
readonly decimalsOffset: bigint;
|
|
13
9
|
readonly asset: `0x${string}`;
|
|
14
|
-
constructor({ decimalsOffset, asset, ...config }: IVaultConfig
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Kept for backward compatibility.
|
|
17
|
-
*/
|
|
18
|
-
chainId?: number | undefined);
|
|
10
|
+
constructor({ decimalsOffset, asset, ...config }: IVaultConfig);
|
|
19
11
|
}
|
package/lib/vault/VaultConfig.js
CHANGED
|
@@ -3,16 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VaultConfig = void 0;
|
|
4
4
|
const Token_js_1 = require("../token/Token.js");
|
|
5
5
|
class VaultConfig extends Token_js_1.Token {
|
|
6
|
-
chainId;
|
|
7
6
|
decimalsOffset;
|
|
8
7
|
asset;
|
|
9
|
-
constructor({ decimalsOffset, asset, ...config }
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Kept for backward compatibility.
|
|
12
|
-
*/
|
|
13
|
-
chainId) {
|
|
8
|
+
constructor({ decimalsOffset, asset, ...config }) {
|
|
14
9
|
super({ ...config, decimals: 18 });
|
|
15
|
-
this.chainId = chainId;
|
|
16
10
|
this.decimalsOffset = BigInt(decimalsOffset);
|
|
17
11
|
this.asset = asset;
|
|
18
12
|
}
|
|
@@ -8,7 +8,7 @@ export interface IVaultMarketConfig {
|
|
|
8
8
|
pendingCap: Pending<bigint>;
|
|
9
9
|
removableAt: bigint;
|
|
10
10
|
enabled: boolean;
|
|
11
|
-
publicAllocatorConfig
|
|
11
|
+
publicAllocatorConfig?: VaultMarketPublicAllocatorConfig;
|
|
12
12
|
}
|
|
13
13
|
export declare class VaultMarketConfig implements IVaultMarketConfig {
|
|
14
14
|
/**
|
|
@@ -38,6 +38,6 @@ export declare class VaultMarketConfig implements IVaultMarketConfig {
|
|
|
38
38
|
/**
|
|
39
39
|
* The vault's PublicAllocator configuration on the corresponding market.
|
|
40
40
|
*/
|
|
41
|
-
readonly publicAllocatorConfig
|
|
41
|
+
readonly publicAllocatorConfig?: VaultMarketPublicAllocatorConfig;
|
|
42
42
|
constructor({ vault, marketId, cap, pendingCap, removableAt, enabled, publicAllocatorConfig, }: IVaultMarketConfig);
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
3
|
"description": "Framework-agnostic package that defines Morpho-related entity classes (such as `Market`, `Token`, `Vault`).",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.10",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"@noble/hashes": "^1.6.1"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@morpho-org/morpho-ts": "^2.
|
|
24
|
+
"@morpho-org/morpho-ts": "^2.2.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.7.2",
|
|
28
28
|
"viem": "^2.23.0",
|
|
29
29
|
"vitest": "^3.0.5",
|
|
30
|
-
"@morpho-org/
|
|
31
|
-
"@morpho-org/
|
|
30
|
+
"@morpho-org/morpho-ts": "^2.2.0",
|
|
31
|
+
"@morpho-org/test": "^2.0.6"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prepublish": "$npm_execpath build",
|
|
35
|
-
"build": "tsc --build tsconfig.build.json",
|
|
35
|
+
"build": "tsc --noEmit && tsc --build tsconfig.build.json",
|
|
36
36
|
"test": "vitest"
|
|
37
37
|
},
|
|
38
38
|
"types": "lib/index.d.ts"
|