@bulletxyz/bullet-sdk 0.26.2-rc.3 → 0.26.2-rc.5

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.
@@ -9821,11 +9821,52 @@ var Client = class _Client {
9821
9821
  }
9822
9822
  });
9823
9823
  }
9824
- async initBorrowLendMarket(asset, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationRewardRatio, liabilityLiquidationLimitRatio) {
9824
+ async initPerpMarket(marketId, baseAssetId, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
9825
+ return await this.submitTransaction({
9826
+ exchange: {
9827
+ init_perp_market: {
9828
+ args: {
9829
+ market_id: marketId,
9830
+ base_asset_id: baseAssetId,
9831
+ name,
9832
+ min_tick_size: BulletWasm.convert_rust_decimal_to_json(
9833
+ minTickSize.toFixed()
9834
+ ),
9835
+ min_lot_size: BulletWasm.convert_rust_decimal_to_json(
9836
+ minLotSize.toFixed()
9837
+ ),
9838
+ max_orders_per_side: maxOrdersPerSide,
9839
+ min_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
9840
+ minInterestRateClamp.toFixed()
9841
+ ),
9842
+ max_interest_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
9843
+ maxInterestRateClamp.toFixed()
9844
+ ),
9845
+ min_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
9846
+ minFundingRateClamp.toFixed()
9847
+ ),
9848
+ max_funding_rate_clamp: BulletWasm.convert_rust_decimal_to_json(
9849
+ maxFundingRateClamp.toFixed()
9850
+ ),
9851
+ impact_margin: BulletWasm.convert_rust_decimal_to_json(
9852
+ impactMargin.toFixed()
9853
+ ),
9854
+ interest_rate: BulletWasm.convert_rust_decimal_to_json(
9855
+ interestRate.toFixed()
9856
+ ),
9857
+ init_leverage_table_args: initLeverageTableArgs,
9858
+ taker_fees_tenth_bps: takerFeesTenthBps,
9859
+ maker_fees_tenth_bps: makerFeesTenthBps
9860
+ }
9861
+ }
9862
+ }
9863
+ });
9864
+ }
9865
+ async initBorrowLendPool(asset, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
9825
9866
  const assetId = this.exchange.getAssetId(asset);
9826
9867
  return await this.submitTransaction({
9827
9868
  exchange: {
9828
- init_borrow_lend_market: {
9869
+ init_borrow_lend_pool: {
9829
9870
  args: {
9830
9871
  asset_id: assetId,
9831
9872
  optimal_utilisation_rate: BulletWasm.convert_rust_decimal_to_json(
@@ -9860,7 +9901,8 @@ var Client = class _Client {
9860
9901
  ),
9861
9902
  liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
9862
9903
  liabilityLiquidationLimitRatio.toFixed()
9863
- )
9904
+ ),
9905
+ interest_fee_tenth_bps: interestFeeTenthBps
9864
9906
  }
9865
9907
  }
9866
9908
  }