@bulletxyz/bullet-sdk 0.26.0 → 0.26.1

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.
@@ -7696,7 +7696,9 @@ var Schemas = {
7696
7696
  borrowed_amount: DecimalSchema,
7697
7697
  cumulative_deposit_rate: DecimalSchema,
7698
7698
  cumulative_borrow_rate: DecimalSchema,
7699
- accumulated_protocol_fees: DecimalSchema
7699
+ accumulated_protocol_fees: DecimalSchema,
7700
+ unclaimed_protocol_fees: DecimalSchema,
7701
+ interest_fee_tenth_bps: z.number()
7700
7702
  })
7701
7703
  ).nullable(),
7702
7704
  PerpPrices: z.object({
@@ -9528,7 +9530,7 @@ var Client = class _Client {
9528
9530
  });
9529
9531
  }
9530
9532
  async amendOrder(options) {
9531
- const marketId = await this.exchange.getMarketId(
9533
+ const marketId = this.exchange.getMarketId(
9532
9534
  options.placeOrderArgs.market
9533
9535
  );
9534
9536
  return await this.submitTransaction({
@@ -9594,10 +9596,12 @@ var Client = class _Client {
9594
9596
  return await this.submitTransaction({
9595
9597
  exchange: {
9596
9598
  cancel_orders: {
9597
- args: [{
9598
- order_id: orderId?.toString() ?? null,
9599
- client_order_id: clientOrderId?.toString() ?? null
9600
- }]
9599
+ args: [
9600
+ {
9601
+ order_id: orderId?.toString() ?? null,
9602
+ client_order_id: clientOrderId?.toString() ?? null
9603
+ }
9604
+ ]
9601
9605
  }
9602
9606
  }
9603
9607
  });
@@ -9637,7 +9641,7 @@ var Client = class _Client {
9637
9641
  update_mark_prices: {
9638
9642
  prices_to_update: await Promise.all(
9639
9643
  pricesToUpdate.map(async ({ market, medianCexPrice, diffEma }) => ({
9640
- market_id: await this.exchange.getMarketId(market),
9644
+ market_id: this.exchange.getMarketId(market),
9641
9645
  median_cex_price: BulletWasm.convert_rust_decimal_to_json(
9642
9646
  medianCexPrice.toFixed()
9643
9647
  ),
@@ -9655,7 +9659,7 @@ var Client = class _Client {
9655
9659
  if (!Number.isInteger(maxLeverage)) {
9656
9660
  throw Error("Max leverage must be set to an integer");
9657
9661
  }
9658
- const marketId = await this.exchange.getMarketId(market);
9662
+ const marketId = this.exchange.getMarketId(market);
9659
9663
  return await this.submitTransaction({
9660
9664
  exchange: {
9661
9665
  update_market_max_leverage: {
@@ -9668,7 +9672,7 @@ var Client = class _Client {
9668
9672
  async updatePremiumIndexes(markets) {
9669
9673
  const marketIds = await Promise.all(
9670
9674
  markets.map(async (market) => {
9671
- return await this.exchange.getMarketId(market);
9675
+ return this.exchange.getMarketId(market);
9672
9676
  })
9673
9677
  );
9674
9678
  return await this.submitTransaction({
@@ -9688,7 +9692,7 @@ var Client = class _Client {
9688
9692
  async updateFunding(markets) {
9689
9693
  const marketIds = await Promise.all(
9690
9694
  markets.map(async (market) => {
9691
- return await this.exchange.getMarketId(market);
9695
+ return this.exchange.getMarketId(market);
9692
9696
  })
9693
9697
  );
9694
9698
  return await this.submitTransaction({
@@ -9723,7 +9727,7 @@ var Client = class _Client {
9723
9727
  async liquidatePerpPositions(address, positions) {
9724
9728
  const positionsWithIds = positions ? await Promise.all(
9725
9729
  positions.map(async ({ market, size }) => ({
9726
- market_id: await this.exchange.getMarketId(market),
9730
+ market_id: this.exchange.getMarketId(market),
9727
9731
  size: BulletWasm.convert_rust_decimal_to_json(size.toFixed())
9728
9732
  }))
9729
9733
  ) : null;