@morpho-org/blue-sdk 3.0.8 → 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.
@@ -1,6 +1,6 @@
1
1
  import { type RoundingDirection } from "../math/index.js";
2
2
  import type { BigIntish } from "../types.js";
3
- import type { MarketParams } from "./MarketParams.js";
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: MarketParams;
30
+ params: IMarketParams;
31
31
  totalSupplyAssets: bigint;
32
32
  totalBorrowAssets: bigint;
33
33
  totalSupplyShares: bigint;
@@ -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.8",
4
+ "version": "3.0.9",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"