@bulletxyz/bullet-sdk 0.21.0-rc.6 → 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
CHANGED
|
@@ -6799,7 +6799,7 @@ var Schemas = {
|
|
|
6799
6799
|
AccountAddresses: z.object({
|
|
6800
6800
|
addresses: z.array(Base58Address),
|
|
6801
6801
|
total: z.number(),
|
|
6802
|
-
next_offset: z.number().
|
|
6802
|
+
next_offset: z.number().nullable()
|
|
6803
6803
|
})
|
|
6804
6804
|
};
|
|
6805
6805
|
var ResponseSchemas = {
|
|
@@ -6878,9 +6878,12 @@ var BaseConnection = class {
|
|
|
6878
6878
|
const url = new URL(path, this.endpoint);
|
|
6879
6879
|
if (params) {
|
|
6880
6880
|
for (const [key, value] of Object.entries(params)) {
|
|
6881
|
-
|
|
6881
|
+
if (value !== void 0) {
|
|
6882
|
+
url.searchParams.append(key, value);
|
|
6883
|
+
}
|
|
6882
6884
|
}
|
|
6883
6885
|
}
|
|
6886
|
+
console.debug("Fetching resource: ", url.toString());
|
|
6884
6887
|
const response = await fetch(url.toString());
|
|
6885
6888
|
if (!response.ok) {
|
|
6886
6889
|
throw await ApiError.fromResponse(response);
|
|
@@ -7299,9 +7302,12 @@ var ExchangeConnection = class extends BaseConnection {
|
|
|
7299
7302
|
const parsed = ResponseSchemas.OrderbookL2Bulk.parse(response);
|
|
7300
7303
|
return parsed.data.found;
|
|
7301
7304
|
}
|
|
7302
|
-
async getUserAccountAddresses(start
|
|
7303
|
-
const path = `/modules/exchange/api/v1/account/addresses
|
|
7304
|
-
const response = await this.fetchApiResource(path
|
|
7305
|
+
async getUserAccountAddresses(start, limit) {
|
|
7306
|
+
const path = `/modules/exchange/api/v1/account/addresses`;
|
|
7307
|
+
const response = await this.fetchApiResource(path, {
|
|
7308
|
+
from: start?.toString(),
|
|
7309
|
+
limit: limit?.toString()
|
|
7310
|
+
});
|
|
7305
7311
|
const parsed = ResponseSchemas.AccountAddresses.parse(response);
|
|
7306
7312
|
return parsed.data;
|
|
7307
7313
|
}
|