@morpho-org/blue-sdk 1.5.1 → 1.5.3
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.
|
@@ -27,6 +27,8 @@ export interface PeripheralBalance {
|
|
|
27
27
|
*/
|
|
28
28
|
dstAmount: bigint;
|
|
29
29
|
}
|
|
30
|
+
export interface InputAssetBalances extends Omit<PeripheralBalance, "type"> {
|
|
31
|
+
}
|
|
30
32
|
export declare class AssetBalances {
|
|
31
33
|
/**
|
|
32
34
|
* The total balance of all types of related tokens.
|
|
@@ -40,7 +42,7 @@ export declare class AssetBalances {
|
|
|
40
42
|
} & {
|
|
41
43
|
[T in Exclude<PeripheralBalanceType, "base">]?: PeripheralBalance;
|
|
42
44
|
};
|
|
43
|
-
constructor(balance:
|
|
45
|
+
constructor(balance: InputAssetBalances);
|
|
44
46
|
add(balance: PeripheralBalance): this;
|
|
45
47
|
sub(balance: PeripheralBalance): this;
|
|
46
48
|
}
|
|
@@ -12,7 +12,9 @@ class AssetBalances {
|
|
|
12
12
|
allocations;
|
|
13
13
|
constructor(balance) {
|
|
14
14
|
this.total = balance.dstAmount;
|
|
15
|
-
this.allocations = {
|
|
15
|
+
this.allocations = {
|
|
16
|
+
base: { ...balance, type: "base" },
|
|
17
|
+
};
|
|
16
18
|
}
|
|
17
19
|
add(balance) {
|
|
18
20
|
this.total += balance.dstAmount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"author": "Morpho Association <contact@morpho.org>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"keccak256": "^1.0.6"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@morpho-org/morpho-test": "^1.5.
|
|
20
|
-
"@morpho-org/morpho-ts": "^1.5.
|
|
19
|
+
"@morpho-org/morpho-test": "^1.5.3",
|
|
20
|
+
"@morpho-org/morpho-ts": "^1.5.3",
|
|
21
21
|
"@types/jest": "^29.5.12",
|
|
22
22
|
"@types/node": "^22.1.0",
|
|
23
23
|
"jest": "^29.7.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.4.5"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@morpho-org/morpho-ts": "^1.5.
|
|
28
|
+
"@morpho-org/morpho-ts": "^1.5.3"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
],
|
|
50
50
|
"preset": "ts-jest"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "b35e05579e6fdcd1ee66419e6d6b1ffa82b181d7"
|
|
53
53
|
}
|