@bulletxyz/bullet-sdk 0.49.5 → 0.49.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.
- package/dist/browser/bullet_wasm_bg.wasm +0 -0
- package/dist/browser/index.js +23 -10
- package/dist/browser/index.js.map +4 -4
- package/dist/node/bullet_wasm_bg.wasm +0 -0
- package/dist/node/index.js +23 -10
- package/dist/node/index.js.map +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/client.d.ts +9 -2
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/zod-types/rest.d.ts +23 -5
- package/dist/types/zod-types/rest.d.ts.map +1 -1
- package/package.json +1 -1
|
Binary file
|
package/dist/browser/index.js
CHANGED
|
@@ -2271,6 +2271,10 @@ var StateResponseSchemas = {
|
|
|
2271
2271
|
taker_fees_tenth_bps: z3.array(I16Schema),
|
|
2272
2272
|
maker_fees_tenth_bps: z3.array(I16Schema),
|
|
2273
2273
|
max_order_to_trigger_price_deviation_ratio: DecimalSchema
|
|
2274
|
+
}), DelegateContainer = z3.object({
|
|
2275
|
+
delegator: Base58Address,
|
|
2276
|
+
expires_at: UnixTimestampMicros.nullable(),
|
|
2277
|
+
flags: U32Schema
|
|
2274
2278
|
}), Schemas = {
|
|
2275
2279
|
DummyValue: z3.number(),
|
|
2276
2280
|
ExchangeInfoV1: z3.object({
|
|
@@ -2314,10 +2318,10 @@ var StateResponseSchemas = {
|
|
|
2314
2318
|
UserAccountConfigV0: z3.object({
|
|
2315
2319
|
delegates: createJsonMap(Base58Address, z3.string())
|
|
2316
2320
|
}),
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
+
Delegate: z3.object({
|
|
2322
|
+
name: z3.string(),
|
|
2323
|
+
address: Base58Address,
|
|
2324
|
+
container: DelegateContainer
|
|
2321
2325
|
}),
|
|
2322
2326
|
RiskEngineV0: z3.object({
|
|
2323
2327
|
pricing_engine: PricingEngine,
|
|
@@ -2380,9 +2384,10 @@ var StateResponseSchemas = {
|
|
|
2380
2384
|
address: Base58Address,
|
|
2381
2385
|
account: Schemas.UserAccount
|
|
2382
2386
|
})),
|
|
2383
|
-
Delegate: createBaseResponse(
|
|
2384
|
-
|
|
2385
|
-
|
|
2387
|
+
Delegate: createBaseResponse(Schemas.Delegate),
|
|
2388
|
+
Delegates: createBaseResponse(z3.object({
|
|
2389
|
+
delegator: Base58Address,
|
|
2390
|
+
delegates: z3.array(Schemas.Delegate)
|
|
2386
2391
|
})),
|
|
2387
2392
|
UserAccountConfig: StateResponseSchemas.StateMapElement(Base58Address, VersionedV0(Schemas.UserAccountConfigV0)),
|
|
2388
2393
|
UserAccountBulk: createBaseResponse(z3.object({
|
|
@@ -2620,9 +2625,13 @@ class ReadOnlyClient {
|
|
|
2620
2625
|
let path = `/modules/exchange/state/user-account-configs/items/${address}`, response = await this.fetchApiResource(path);
|
|
2621
2626
|
return ResponseSchemas.UserAccountConfig.parse(response).value;
|
|
2622
2627
|
}
|
|
2623
|
-
async
|
|
2628
|
+
async getDelegate(delegate) {
|
|
2624
2629
|
let path = `/modules/exchange/api/v1/delegate/${delegate}`, response = await this.fetchApiResource(path);
|
|
2625
|
-
return ResponseSchemas.Delegate.parse(response)
|
|
2630
|
+
return ResponseSchemas.Delegate.parse(response);
|
|
2631
|
+
}
|
|
2632
|
+
async getAllDelegates(delegator) {
|
|
2633
|
+
let path = `/modules/exchange/api/v1/delegates/${delegator}`, response = await this.fetchApiResource(path);
|
|
2634
|
+
return ResponseSchemas.Delegates.parse(response);
|
|
2626
2635
|
}
|
|
2627
2636
|
async getExchangeAssets() {
|
|
2628
2637
|
let response = await this.fetchApiResource("/modules/exchange/state/exchange-assets");
|
|
@@ -2820,6 +2829,10 @@ class AuthenticatedClient extends ReadOnlyClient {
|
|
|
2820
2829
|
let addr = address ?? this.address;
|
|
2821
2830
|
return await super.getUserAccount(addr);
|
|
2822
2831
|
}
|
|
2832
|
+
async getAllDelegates(address) {
|
|
2833
|
+
let addr = address ?? this.address;
|
|
2834
|
+
return await super.getAllDelegates(addr);
|
|
2835
|
+
}
|
|
2823
2836
|
async getUserAccountConfig(address) {
|
|
2824
2837
|
let addr = address ?? this.address;
|
|
2825
2838
|
return await super.getUserAccountConfig(addr);
|
|
@@ -4398,4 +4411,4 @@ export {
|
|
|
4398
4411
|
AbortError
|
|
4399
4412
|
};
|
|
4400
4413
|
|
|
4401
|
-
//# debugId=
|
|
4414
|
+
//# debugId=866FE84FB953549964756E2164756E21
|