@bulletxyz/bullet-sdk 0.27.1-rc.0 → 0.27.2-rc.0
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.
- package/dist/browser/index.js +60 -126
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +60 -126
- package/dist/node/index.js.map +2 -2
- package/dist/types/client.d.ts +1 -2
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/exchange.d.ts +3 -5
- package/dist/types/rollupTypes.d.ts +0 -25
- package/dist/types/types.d.ts +0 -6
- package/dist/types/zod-types/rest.d.ts +14 -528
- package/package.json +1 -1
package/dist/types/client.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export interface TransactionOpts {
|
|
|
10
10
|
maxPriorityFeeBps: number;
|
|
11
11
|
maxFee: string;
|
|
12
12
|
gasLimit: number[] | null;
|
|
13
|
-
chainId: number;
|
|
14
13
|
}
|
|
15
14
|
type AmendOrderOptions = {
|
|
16
15
|
existingOrderId: bigint;
|
|
@@ -30,7 +29,7 @@ export declare class Client {
|
|
|
30
29
|
private queue;
|
|
31
30
|
private generationOverride;
|
|
32
31
|
private constructor();
|
|
33
|
-
static fromEndpoints(endpoints: Endpoints, wallet: Wallet, txOpts?: TransactionOpts): Promise<Client>;
|
|
32
|
+
static fromEndpoints(endpoints: Endpoints, wallet: Wallet, txOpts?: TransactionOpts, chainId?: number): Promise<Client>;
|
|
34
33
|
static fromNetwork(network: Network, wallet: Wallet, txOpts?: TransactionOpts): Promise<Client>;
|
|
35
34
|
static fromRestUrl(restUrl: string, wallet: Wallet, txOpts?: TransactionOpts): Promise<Client>;
|
|
36
35
|
setGenerationOverride(generation: (() => number) | undefined): void;
|
package/dist/types/exchange.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import { type EquityType, type MarginType } from "./bullet-wasm";
|
|
|
3
3
|
import { BaseConnection } from "./connection";
|
|
4
4
|
import { type Endpoints } from "./constants";
|
|
5
5
|
import type { Orderbook } from "./orderbook";
|
|
6
|
-
import type { Address, AssetName,
|
|
7
|
-
import
|
|
6
|
+
import type { Address, AssetName, MarketName, Network } from "./types";
|
|
7
|
+
import type { OrderType, PlaceOrderArgs, Side } from "./types";
|
|
8
|
+
import { type AccountAddresses, type AssetRegistry, type BorrowLendPools, type GlobalParameters, type MarginConfig, type MarketRegistry, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type Tpsl, type TpslOrderIdsToExecute, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
8
9
|
export declare class ExchangeConnection extends BaseConnection {
|
|
9
10
|
private wsManager?;
|
|
10
11
|
private assetRegistry?;
|
|
@@ -27,7 +28,6 @@ export declare class ExchangeConnection extends BaseConnection {
|
|
|
27
28
|
getAssetId(asset: AssetName): number;
|
|
28
29
|
getAssetName(assetId: number): AssetName;
|
|
29
30
|
getMarketId(market: MarketName): number;
|
|
30
|
-
getMarketMeta(market: MarketName): MarketMetadata;
|
|
31
31
|
getMarketName(marketId: number): string;
|
|
32
32
|
getOrderbookL2(market: MarketName, levels?: number): Promise<OrderbookL2>;
|
|
33
33
|
getOrderbookL2s(markets: MarketName[], levels?: number): Promise<Map<number, OrderbookL2>>;
|
|
@@ -41,8 +41,6 @@ export declare class ExchangeConnection extends BaseConnection {
|
|
|
41
41
|
getBorrowLendMarkets(): Promise<BorrowLendPools>;
|
|
42
42
|
getPerpMarket(market: MarketName): Promise<PerpMarket>;
|
|
43
43
|
getPerpMarkets(markets: MarketName[]): Promise<Map<number, PerpMarket>>;
|
|
44
|
-
getSpotMarket(market: MarketName): Promise<SpotMarket>;
|
|
45
|
-
getSpotMarkets(markets: MarketName[]): Promise<Map<number, SpotMarket>>;
|
|
46
44
|
getMarginConfig(): Promise<MarginConfig | null>;
|
|
47
45
|
getTpslOrderIdsToExecute(market: MarketName): Promise<TpslOrderIdsToExecute | null>;
|
|
48
46
|
getGlobalParameters(): Promise<GlobalParameters | null>;
|
|
@@ -100,18 +100,6 @@ type ExchangeCallMessage = {
|
|
|
100
100
|
tpsl: PendingTriggerOrderArgs | null;
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
|
-
place_spot_order: {
|
|
104
|
-
args: {
|
|
105
|
-
market_id: MarketId;
|
|
106
|
-
price: number;
|
|
107
|
-
size: number;
|
|
108
|
-
side: string;
|
|
109
|
-
order_type: string;
|
|
110
|
-
reduce_only: boolean;
|
|
111
|
-
client_order_id: string | null;
|
|
112
|
-
tpsl: PendingTriggerOrderArgs | null;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
103
|
create_position_tpsl: {
|
|
116
104
|
market_id: MarketId;
|
|
117
105
|
args: {
|
|
@@ -177,9 +165,6 @@ type ExchangeCallMessage = {
|
|
|
177
165
|
process_perp_tpsl_buffer: {
|
|
178
166
|
market_id: MarketId;
|
|
179
167
|
};
|
|
180
|
-
process_spot_tpsl_buffer: {
|
|
181
|
-
market_id: MarketId;
|
|
182
|
-
};
|
|
183
168
|
update_funding: {
|
|
184
169
|
market_ids: MarketId[];
|
|
185
170
|
};
|
|
@@ -242,16 +227,6 @@ type ExchangeCallMessage = {
|
|
|
242
227
|
name: string;
|
|
243
228
|
};
|
|
244
229
|
};
|
|
245
|
-
update_spot_market: {
|
|
246
|
-
args: {
|
|
247
|
-
market_id: MarketId;
|
|
248
|
-
base_min_lot_size: number | null;
|
|
249
|
-
quote_min_lot_size: number | null;
|
|
250
|
-
max_orders_per_side: number | null;
|
|
251
|
-
taker_fees_tenth_bps: number[] | null;
|
|
252
|
-
maker_fees_tenth_bps: number[] | null;
|
|
253
|
-
};
|
|
254
|
-
};
|
|
255
230
|
init_perp_market: {
|
|
256
231
|
args: {
|
|
257
232
|
market_id: MarketId;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -60,12 +60,6 @@ export type PlacePositionTpslArgs = {
|
|
|
60
60
|
sl?: TriggerOrderArgs;
|
|
61
61
|
size?: Decimal;
|
|
62
62
|
};
|
|
63
|
-
export type MarketMetadata = {
|
|
64
|
-
id: number;
|
|
65
|
-
kind: string;
|
|
66
|
-
baseAssetId: number;
|
|
67
|
-
name: string;
|
|
68
|
-
};
|
|
69
63
|
export declare class BulletError extends Error {
|
|
70
64
|
originalError?: Error | undefined;
|
|
71
65
|
code: string;
|