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

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.
@@ -9807,6 +9807,29 @@ var Client = class _Client {
9807
9807
  }
9808
9808
  });
9809
9809
  }
9810
+ async initSpotMarket(marketId, baseAssetId, quoteAssetId, baseMinLotSize, quoteMinLotSize, maxOrdersPerSide, takerFeesTenthBps, makerFeesTenthBps, name) {
9811
+ return await this.submitTransaction({
9812
+ exchange: {
9813
+ init_spot_market: {
9814
+ args: {
9815
+ market_id: marketId,
9816
+ base_asset_id: baseAssetId,
9817
+ quote_asset_id: quoteAssetId,
9818
+ base_min_lot_size: BulletWasm.convert_rust_decimal_to_json(
9819
+ baseMinLotSize.toFixed()
9820
+ ),
9821
+ quote_min_lot_size: BulletWasm.convert_rust_decimal_to_json(
9822
+ quoteMinLotSize.toFixed()
9823
+ ),
9824
+ max_orders_per_side: maxOrdersPerSide,
9825
+ taker_fees_tenth_bps: takerFeesTenthBps,
9826
+ maker_fees_tenth_bps: makerFeesTenthBps,
9827
+ name
9828
+ }
9829
+ }
9830
+ }
9831
+ });
9832
+ }
9810
9833
  async initPerpMarket(marketId, baseAssetId, name, minTickSize, minLotSize, maxOrdersPerSide, minInterestRateClamp, maxInterestRateClamp, minFundingRateClamp, maxFundingRateClamp, impactMargin, interestRate, initLeverageTableArgs, takerFeesTenthBps, makerFeesTenthBps) {
9811
9834
  return await this.submitTransaction({
9812
9835
  exchange: {
@@ -9840,7 +9863,14 @@ var Client = class _Client {
9840
9863
  interest_rate: BulletWasm.convert_rust_decimal_to_json(
9841
9864
  interestRate.toFixed()
9842
9865
  ),
9843
- init_leverage_table_args: initLeverageTableArgs,
9866
+ init_leverage_table_args: new Map(
9867
+ Array.from(initLeverageTableArgs.entries()).map(
9868
+ ([decimalKey, value]) => [
9869
+ BulletWasm.convert_rust_decimal_to_json(decimalKey.toFixed()),
9870
+ value
9871
+ ]
9872
+ )
9873
+ ),
9844
9874
  taker_fees_tenth_bps: takerFeesTenthBps,
9845
9875
  maker_fees_tenth_bps: makerFeesTenthBps
9846
9876
  }
@@ -9848,8 +9878,7 @@ var Client = class _Client {
9848
9878
  }
9849
9879
  });
9850
9880
  }
9851
- async initBorrowLendPool(asset, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
9852
- const assetId = this.exchange.getAssetId(asset);
9881
+ async initBorrowLendPool(assetId, optimalUtilisationRate, minBorrowRate, maxBorrowRate, optimalBorrowRate, assetWeight, initialLiabilityWeight, maintenanceLiabilityWeight, depositLimit, borrowLimit, liquidationTotalRewardRatio, protocolRewardRatio, liabilityLiquidationLimitRatio, interestFeeTenthBps) {
9853
9882
  return await this.submitTransaction({
9854
9883
  exchange: {
9855
9884
  init_borrow_lend_pool: {
@@ -9882,8 +9911,11 @@ var Client = class _Client {
9882
9911
  borrow_limit: BulletWasm.convert_rust_decimal_to_json(
9883
9912
  borrowLimit.toFixed()
9884
9913
  ),
9885
- liquidation_reward_ratio: BulletWasm.convert_rust_decimal_to_json(
9886
- liquidationRewardRatio.toFixed()
9914
+ liquidation_total_reward_ratio: BulletWasm.convert_rust_decimal_to_json(
9915
+ liquidationTotalRewardRatio.toFixed()
9916
+ ),
9917
+ protocol_reward_ratio: BulletWasm.convert_rust_decimal_to_json(
9918
+ protocolRewardRatio.toFixed()
9887
9919
  ),
9888
9920
  liability_liquidation_limit_ratio: BulletWasm.convert_rust_decimal_to_json(
9889
9921
  liabilityLiquidationLimitRatio.toFixed()