@bulletxyz/bullet-sdk 0.25.1 → 0.25.2-rc.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.
@@ -124,6 +124,7 @@ export declare class Client {
124
124
  updateMarkPrices(pricesToUpdate: MarkPriceUpdateArgs[], publishTimestamp?: number): Promise<TransactionResult<Transaction<RuntimeCall>>>;
125
125
  updateMaxLeverageForMarket(market: Market, maxLeverage: number): Promise<TransactionResult<Transaction<RuntimeCall>>>;
126
126
  updatePremiumIndexes(marketIds: Market[]): Promise<TransactionResult<Transaction<RuntimeCall>>>;
127
+ processTpslBufferForMarket(market: Market): Promise<TransactionResult<Transaction<RuntimeCall>>>;
127
128
  updateFunding(marketIds: Market[]): Promise<TransactionResult<Transaction<RuntimeCall>>>;
128
129
  applyFunding(addresses: Address[]): Promise<TransactionResult<Transaction<RuntimeCall>>>;
129
130
  forceCancelOrders(address: Address): Promise<TransactionResult<Transaction<RuntimeCall>>>;
@@ -2,7 +2,7 @@ import { BaseConnection } from "./connection";
2
2
  import { type Endpoints } from "./constants";
3
3
  import type { Orderbook } from "./orderbook";
4
4
  import type { Address, Market, Network } from "./types";
5
- import { type AccountAddresses, type AssetRegistry, type BorrowLendMarkets, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
5
+ import { type AccountAddresses, type AssetRegistry, type BorrowLendMarkets, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type TpslOrderIdsToExecute, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
6
6
  export declare class ExchangeConnection extends BaseConnection {
7
7
  private wsManager?;
8
8
  private constructor();
@@ -25,6 +25,7 @@ export declare class ExchangeConnection extends BaseConnection {
25
25
  getPerpMarket(market: Market): Promise<PerpMarket>;
26
26
  getPerpMarkets(markets: Market[]): Promise<Map<Market, PerpMarket>>;
27
27
  getMarginConfig(): Promise<MarginConfig | null>;
28
+ getTpslOrderIdsToExecute(market: Market): Promise<TpslOrderIdsToExecute | null>;
28
29
  private getWebSocketManager;
29
30
  subscribeOrderbook(marketId: Market): AsyncIterable<Orderbook>;
30
31
  unsubscribeOrderbook(marketId: Market): Promise<void>;
@@ -115,6 +115,9 @@ type ExchangeCallMessage = {
115
115
  update_premium_indexes: {
116
116
  market_ids: MarketId[];
117
117
  };
118
+ process_tpsl_buffer_for_market: {
119
+ market_id: MarketId;
120
+ };
118
121
  update_funding: {
119
122
  market_ids: MarketId[];
120
123
  };
@@ -580,6 +580,7 @@ declare const Tpsl: z.ZodObject<{
580
580
  owner: string;
581
581
  linked_tpsl_order_id: bigint | null;
582
582
  }>;
583
+ declare const TpslOrderIdsToExecute: z.ZodArray<z.ZodBigInt, "many">;
583
584
  export declare const Schemas: {
584
585
  readonly DummyValue: z.ZodNumber;
585
586
  readonly OrderbookL2: z.ZodObject<{
@@ -2289,6 +2290,31 @@ export declare const ResponseSchemas: {
2289
2290
  };
2290
2291
  meta: Record<string, unknown> | null;
2291
2292
  }>;
2293
+ readonly TpslOrderIdsToExecute: z.ZodObject<{
2294
+ data: z.ZodObject<{
2295
+ key: z.ZodNumber;
2296
+ value: z.ZodNullable<z.ZodArray<z.ZodBigInt, "many">>;
2297
+ }, "strip", z.ZodTypeAny, {
2298
+ value: bigint[] | null;
2299
+ key: number;
2300
+ }, {
2301
+ value: bigint[] | null;
2302
+ key: number;
2303
+ }>;
2304
+ meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
2305
+ }, "strip", z.ZodTypeAny, {
2306
+ data: {
2307
+ value: bigint[] | null;
2308
+ key: number;
2309
+ };
2310
+ meta: Map<unknown, unknown> | null;
2311
+ }, {
2312
+ data: {
2313
+ value: bigint[] | null;
2314
+ key: number;
2315
+ };
2316
+ meta: Record<string, unknown> | null;
2317
+ }>;
2292
2318
  readonly OraclePrices: z.ZodObject<{
2293
2319
  data: z.ZodObject<{
2294
2320
  value: z.ZodNullable<z.ZodObject<{
@@ -6118,4 +6144,5 @@ export type MarginConfig = z.infer<typeof Schemas.MarginConfig>;
6118
6144
  export type Tpsl = z.infer<typeof Tpsl>;
6119
6145
  export type AccountAddresses = z.infer<typeof Schemas.AccountAddresses>;
6120
6146
  export type BorrowLendRiskConfig = z.infer<typeof BorrowLendRiskConfig>;
6147
+ export type TpslOrderIdsToExecute = z.infer<typeof TpslOrderIdsToExecute>;
6121
6148
  export {};
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/zetamarkets/bullet-sdk.git"
6
6
  },
7
- "version": "0.25.1",
7
+ "version": "0.25.2-rc.1",
8
8
  "description": "Bullet SDK",
9
9
  "author": "@bulletxyz",
10
10
  "license": "Apache-2.0",