@morpho-org/blue-sdk 3.0.7 → 3.0.9
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.js +36 -12
- package/lib/market/Market.d.ts +2 -2
- package/lib/market/Market.js +2 -1
- package/package.json +1 -1
package/lib/addresses.js
CHANGED
|
@@ -343,20 +343,44 @@ exports.unwrappedTokensMapping = {
|
|
|
343
343
|
[exports.addressesRegistry[chain_js_1.ChainId.BaseMainnet].verUsdc]: exports.addressesRegistry[chain_js_1.ChainId.BaseMainnet].usdc,
|
|
344
344
|
[exports.addressesRegistry[chain_js_1.ChainId.BaseMainnet].testUsdc]: exports.addressesRegistry[chain_js_1.ChainId.BaseMainnet].usdc,
|
|
345
345
|
},
|
|
346
|
-
[chain_js_1.ChainId.PolygonMainnet]: {
|
|
346
|
+
[chain_js_1.ChainId.PolygonMainnet]: {
|
|
347
|
+
[exports.addressesRegistry[chain_js_1.ChainId.PolygonMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
348
|
+
},
|
|
347
349
|
[chain_js_1.ChainId.ArbitrumMainnet]: {},
|
|
348
|
-
[chain_js_1.ChainId.OptimismMainnet]: {
|
|
349
|
-
|
|
350
|
+
[chain_js_1.ChainId.OptimismMainnet]: {
|
|
351
|
+
[exports.addressesRegistry[chain_js_1.ChainId.OptimismMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
352
|
+
},
|
|
353
|
+
[chain_js_1.ChainId.WorldChainMainnet]: {
|
|
354
|
+
[exports.addressesRegistry[chain_js_1.ChainId.WorldChainMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
355
|
+
},
|
|
350
356
|
[chain_js_1.ChainId.FraxtalMainnet]: {},
|
|
351
|
-
[chain_js_1.ChainId.ScrollMainnet]: {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
[chain_js_1.ChainId.
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
[chain_js_1.ChainId.
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
[chain_js_1.ChainId.ScrollMainnet]: {
|
|
358
|
+
[exports.addressesRegistry[chain_js_1.ChainId.ScrollMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
359
|
+
},
|
|
360
|
+
[chain_js_1.ChainId.InkMainnet]: {
|
|
361
|
+
[exports.addressesRegistry[chain_js_1.ChainId.InkMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
362
|
+
},
|
|
363
|
+
[chain_js_1.ChainId.Unichain]: {
|
|
364
|
+
[exports.addressesRegistry[chain_js_1.ChainId.Unichain].wNative]: exports.NATIVE_ADDRESS,
|
|
365
|
+
},
|
|
366
|
+
[chain_js_1.ChainId.SonicMainnet]: {
|
|
367
|
+
[exports.addressesRegistry[chain_js_1.ChainId.SonicMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
368
|
+
},
|
|
369
|
+
[chain_js_1.ChainId.HemiMainnet]: {
|
|
370
|
+
[exports.addressesRegistry[chain_js_1.ChainId.HemiMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
371
|
+
},
|
|
372
|
+
[chain_js_1.ChainId.ModeMainnet]: {
|
|
373
|
+
[exports.addressesRegistry[chain_js_1.ChainId.ModeMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
374
|
+
},
|
|
375
|
+
[chain_js_1.ChainId.CornMainnet]: {
|
|
376
|
+
[exports.addressesRegistry[chain_js_1.ChainId.CornMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
377
|
+
},
|
|
378
|
+
[chain_js_1.ChainId.PlumeMainnet]: {
|
|
379
|
+
[exports.addressesRegistry[chain_js_1.ChainId.PlumeMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
380
|
+
},
|
|
381
|
+
[chain_js_1.ChainId.CampMainnet]: {
|
|
382
|
+
[exports.addressesRegistry[chain_js_1.ChainId.CampMainnet].wNative]: exports.NATIVE_ADDRESS,
|
|
383
|
+
},
|
|
360
384
|
};
|
|
361
385
|
function getUnwrappedToken(wrappedToken, chainId) {
|
|
362
386
|
return exports.unwrappedTokensMapping[chainId][wrappedToken];
|
package/lib/market/Market.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type RoundingDirection } from "../math/index.js";
|
|
2
2
|
import type { BigIntish } from "../types.js";
|
|
3
|
-
import type
|
|
3
|
+
import { type IMarketParams, MarketParams } from "./MarketParams.js";
|
|
4
4
|
export declare enum CapacityLimitReason {
|
|
5
5
|
liquidity = "Liquidity",
|
|
6
6
|
balance = "Balance",
|
|
@@ -27,7 +27,7 @@ export interface MaxPositionCapacities {
|
|
|
27
27
|
withdrawCollateral: CapacityLimit | undefined;
|
|
28
28
|
}
|
|
29
29
|
export interface IMarket {
|
|
30
|
-
params:
|
|
30
|
+
params: IMarketParams;
|
|
31
31
|
totalSupplyAssets: bigint;
|
|
32
32
|
totalBorrowAssets: bigint;
|
|
33
33
|
totalSupplyShares: bigint;
|
package/lib/market/Market.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.Market = exports.CapacityLimitReason = void 0;
|
|
|
4
4
|
const morpho_ts_1 = require("@morpho-org/morpho-ts");
|
|
5
5
|
const errors_js_1 = require("../errors.js");
|
|
6
6
|
const index_js_1 = require("../math/index.js");
|
|
7
|
+
const MarketParams_js_1 = require("./MarketParams.js");
|
|
7
8
|
const MarketUtils_js_1 = require("./MarketUtils.js");
|
|
8
9
|
var CapacityLimitReason;
|
|
9
10
|
(function (CapacityLimitReason) {
|
|
@@ -56,7 +57,7 @@ class Market {
|
|
|
56
57
|
*/
|
|
57
58
|
rateAtTarget;
|
|
58
59
|
constructor({ params, totalSupplyAssets, totalBorrowAssets, totalSupplyShares, totalBorrowShares, lastUpdate, fee, price, rateAtTarget, }) {
|
|
59
|
-
this.params = params;
|
|
60
|
+
this.params = new MarketParams_js_1.MarketParams(params);
|
|
60
61
|
this.totalSupplyAssets = totalSupplyAssets;
|
|
61
62
|
this.totalBorrowAssets = totalBorrowAssets;
|
|
62
63
|
this.totalSupplyShares = totalSupplyShares;
|
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.
|
|
4
|
+
"version": "3.0.9",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|