@bulletxyz/bullet-sdk 0.21.0-rc.4 → 0.21.0-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.
@@ -6795,6 +6795,11 @@ var Schemas = {
6795
6795
  }),
6796
6796
  Assets: z.object({
6797
6797
  assets: createJsonMap(AssetId, z.string())
6798
+ }),
6799
+ AccountAddresses: z.object({
6800
+ addresses: z.array(Base58Address),
6801
+ total: z.number(),
6802
+ next_offset: z.number().optional()
6798
6803
  })
6799
6804
  };
6800
6805
  var ResponseSchemas = {
@@ -6853,11 +6858,7 @@ var ResponseSchemas = {
6853
6858
  })
6854
6859
  ),
6855
6860
  MarginConfig: StateResponseSchemas.StateValue(Schemas.MarginConfig),
6856
- AccountAddresses: createBaseResponse(
6857
- z.object({
6858
- accounts: z.array(Base58Address)
6859
- })
6860
- ),
6861
+ AccountAddresses: createBaseResponse(Schemas.AccountAddresses),
6861
6862
  Assets: StateResponseSchemas.CustomRouteValue(Schemas.Assets)
6862
6863
  };
6863
6864
 
@@ -7299,10 +7300,10 @@ var ExchangeConnection = class extends BaseConnection {
7299
7300
  return parsed.data.found;
7300
7301
  }
7301
7302
  async getUserAccountAddresses(start = 0, limit = 1e5) {
7302
- const path = `/modules/exchange/api/v1/account-addresses?from=${start}&limit=${limit}`;
7303
+ const path = `/modules/exchange/api/v1/account/addresses?from=${start}&limit=${limit}`;
7303
7304
  const response = await this.fetchApiResource(path);
7304
7305
  const parsed = ResponseSchemas.AccountAddresses.parse(response);
7305
- return parsed.data.accounts;
7306
+ return parsed.data;
7306
7307
  }
7307
7308
  async getUserAccount(address) {
7308
7309
  const path = `/modules/exchange/api/v1/account/${address}`;
@@ -7378,14 +7379,14 @@ var ExchangeConnection = class extends BaseConnection {
7378
7379
  }
7379
7380
  // TODO: handle 404
7380
7381
  async getPerpAssets() {
7381
- const path = "/modules/exchange/perp-market/assets";
7382
+ const path = "/modules/exchange/api/v1/perp-market/assets";
7382
7383
  const response = await this.fetchApiResource(path);
7383
7384
  const parsed = ResponseSchemas.Assets.parse(response);
7384
7385
  return parsed.data.assets;
7385
7386
  }
7386
7387
  // TODO: handle 404
7387
7388
  async getBorrowLendAssets() {
7388
- const path = "/modules/exchange/borrow-lend-market/assets";
7389
+ const path = "/modules/exchange/api/v1/borrow-lend-market/assets";
7389
7390
  const response = await this.fetchApiResource(path);
7390
7391
  const parsed = ResponseSchemas.Assets.parse(response);
7391
7392
  return parsed.data.assets;