@bulletxyz/bullet-sdk 0.21.0-rc.5 → 0.21.0-rc.7
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 +19 -12
- package/dist/browser/index.js.map +2 -2
- package/dist/node/index.js +19 -12
- package/dist/node/index.js.map +2 -2
- package/dist/types/connection.d.ts +1 -1
- package/dist/types/exchange.d.ts +2 -2
- package/dist/types/zod-types/rest.d.ts +29 -5
- package/package.json +9 -9
|
@@ -2,7 +2,7 @@ import type { Address, TokenId } from "./types";
|
|
|
2
2
|
export declare class BaseConnection {
|
|
3
3
|
endpoint: string;
|
|
4
4
|
constructor(rawEndpoint?: string);
|
|
5
|
-
protected fetchApiResource<T>(path: string, params?: Record<string, string>): Promise<T>;
|
|
5
|
+
protected fetchApiResource<T>(path: string, params?: Record<string, string | undefined>): Promise<T>;
|
|
6
6
|
protected fetchBulkApiResource<T>(path: string, body: Record<string, unknown>, params?: Record<string, string>): Promise<T>;
|
|
7
7
|
}
|
|
8
8
|
export declare class Connection extends BaseConnection {
|
package/dist/types/exchange.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseConnection } from "./connection";
|
|
2
2
|
import type { Orderbook } from "./orderbook";
|
|
3
3
|
import type { Address, Asset, AssetId, Network } from "./types";
|
|
4
|
-
import { type BorrowLendMarket, type MarginConfig, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
4
|
+
import { AccountAddresses, type BorrowLendMarket, type MarginConfig, type OraclePrices, type Order, type OrderbookL2, type PerpMarket, type PerpPrices, type UsdcInsuranceFund, type UsdcPnlPool, type UserAccount } from "./zod-types/rest";
|
|
5
5
|
export declare class ExchangeConnection extends BaseConnection {
|
|
6
6
|
private wsManager;
|
|
7
7
|
constructor(network: Network);
|
|
@@ -9,7 +9,7 @@ export declare class ExchangeConnection extends BaseConnection {
|
|
|
9
9
|
getOrder(order_id: bigint): Promise<Order | null>;
|
|
10
10
|
getOrderbookL2(asset: Asset, levels?: number): Promise<OrderbookL2>;
|
|
11
11
|
getOrderbookL2s(assets: Asset[], levels?: number): Promise<Map<Asset, OrderbookL2>>;
|
|
12
|
-
getUserAccountAddresses(start?: number, limit?: number): Promise<
|
|
12
|
+
getUserAccountAddresses(start?: number, limit?: number): Promise<AccountAddresses>;
|
|
13
13
|
getUserAccount(address: Address): Promise<UserAccount>;
|
|
14
14
|
getUserAccounts(addresses: Address[]): Promise<Map<string, UserAccount>>;
|
|
15
15
|
getOraclePrices(): Promise<OraclePrices | null>;
|
|
@@ -1337,6 +1337,19 @@ export declare const Schemas: {
|
|
|
1337
1337
|
}, {
|
|
1338
1338
|
assets: Record<string, string>;
|
|
1339
1339
|
}>;
|
|
1340
|
+
readonly AccountAddresses: z.ZodObject<{
|
|
1341
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
1342
|
+
total: z.ZodNumber;
|
|
1343
|
+
next_offset: z.ZodNullable<z.ZodNumber>;
|
|
1344
|
+
}, "strip", z.ZodTypeAny, {
|
|
1345
|
+
addresses: string[];
|
|
1346
|
+
total: number;
|
|
1347
|
+
next_offset: number | null;
|
|
1348
|
+
}, {
|
|
1349
|
+
addresses: string[];
|
|
1350
|
+
total: number;
|
|
1351
|
+
next_offset: number | null;
|
|
1352
|
+
}>;
|
|
1340
1353
|
};
|
|
1341
1354
|
export declare const ResponseSchemas: {
|
|
1342
1355
|
readonly DummyValue: z.ZodObject<{
|
|
@@ -4576,21 +4589,31 @@ export declare const ResponseSchemas: {
|
|
|
4576
4589
|
}>;
|
|
4577
4590
|
readonly AccountAddresses: z.ZodObject<{
|
|
4578
4591
|
data: z.ZodObject<{
|
|
4579
|
-
|
|
4592
|
+
addresses: z.ZodArray<z.ZodString, "many">;
|
|
4593
|
+
total: z.ZodNumber;
|
|
4594
|
+
next_offset: z.ZodNullable<z.ZodNumber>;
|
|
4580
4595
|
}, "strip", z.ZodTypeAny, {
|
|
4581
|
-
|
|
4596
|
+
addresses: string[];
|
|
4597
|
+
total: number;
|
|
4598
|
+
next_offset: number | null;
|
|
4582
4599
|
}, {
|
|
4583
|
-
|
|
4600
|
+
addresses: string[];
|
|
4601
|
+
total: number;
|
|
4602
|
+
next_offset: number | null;
|
|
4584
4603
|
}>;
|
|
4585
4604
|
meta: z.ZodNullable<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Map<unknown, unknown>, Record<string, unknown>>>;
|
|
4586
4605
|
}, "strip", z.ZodTypeAny, {
|
|
4587
4606
|
data: {
|
|
4588
|
-
|
|
4607
|
+
addresses: string[];
|
|
4608
|
+
total: number;
|
|
4609
|
+
next_offset: number | null;
|
|
4589
4610
|
};
|
|
4590
4611
|
meta: Map<unknown, unknown> | null;
|
|
4591
4612
|
}, {
|
|
4592
4613
|
data: {
|
|
4593
|
-
|
|
4614
|
+
addresses: string[];
|
|
4615
|
+
total: number;
|
|
4616
|
+
next_offset: number | null;
|
|
4594
4617
|
};
|
|
4595
4618
|
meta: Record<string, unknown> | null;
|
|
4596
4619
|
}>;
|
|
@@ -4629,4 +4652,5 @@ export type PerpMarket = z.infer<typeof Schemas.PerpMarket>;
|
|
|
4629
4652
|
export type MarginConfig = z.infer<typeof Schemas.MarginConfig>;
|
|
4630
4653
|
export type Assets = z.infer<typeof Schemas.Assets>;
|
|
4631
4654
|
export type Tpsl = z.infer<typeof Tpsl>;
|
|
4655
|
+
export type AccountAddresses = z.infer<typeof Schemas.AccountAddresses>;
|
|
4632
4656
|
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.21.0-rc.
|
|
7
|
+
"version": "0.21.0-rc.7",
|
|
8
8
|
"description": "Bullet SDK",
|
|
9
9
|
"author": "@bulletxyz",
|
|
10
10
|
"license": "Apache-2.0",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"dev": "tsx --experimental-wasm-modules examples/test.ts",
|
|
35
35
|
"package": "pnpm build && pnpm pack",
|
|
36
36
|
"prepublishOnly": "pnpm build",
|
|
37
|
-
"release:rc:major": "
|
|
38
|
-
"release:rc:minor": "
|
|
39
|
-
"release:rc:patch": "
|
|
40
|
-
"release:rc": "
|
|
41
|
-
"release:major": "
|
|
42
|
-
"release:minor": "
|
|
43
|
-
"release:patch": "
|
|
44
|
-
"release": "
|
|
37
|
+
"release:rc:major": "npm version premajor --preid rc && git push --tags && npm publish --tag rc",
|
|
38
|
+
"release:rc:minor": "npm version preminor --preid rc && git push --tags && npm publish --tag rc",
|
|
39
|
+
"release:rc:patch": "npm version prepatch --preid rc && git push --tags && npm publish --tag rc",
|
|
40
|
+
"release:rc": "npm version prerelease --preid rc && git push --tags && npm publish --tag rc",
|
|
41
|
+
"release:major": "npm version major && git push --tags && npm publish",
|
|
42
|
+
"release:minor": "npm version minor && git push --tags && npm publish",
|
|
43
|
+
"release:patch": "npm version patch && git push --tags && npm publish",
|
|
44
|
+
"release": "npm version patch && git push --tags && npm publish",
|
|
45
45
|
"format": "biome check --write",
|
|
46
46
|
"lint": "biome lint",
|
|
47
47
|
"ci": "biome ci"
|