@bulletxyz/bullet-sdk 0.49.5 → 0.49.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/bullet_wasm_bg.wasm +0 -0
- package/dist/browser/index.js +35 -11
- package/dist/browser/index.js.map +4 -4
- package/dist/node/bullet_wasm_bg.wasm +0 -0
- package/dist/node/index.js +35 -11
- 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/types.d.ts +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/zod-types/rest.d.ts +40 -7
- package/dist/types/zod-types/rest.d.ts.map +1 -1
- package/package.json +1 -1
|
Binary file
|
package/dist/browser/index.js
CHANGED
|
@@ -2053,7 +2053,18 @@ var StateResponseSchemas = {
|
|
|
2053
2053
|
owner: Base58Address,
|
|
2054
2054
|
last_update_timestamp: UnixTimestampMicros,
|
|
2055
2055
|
linked_trigger_order_id: TriggerOrderId.nullable()
|
|
2056
|
-
}), RewardVariant = z3.enum(["referral", "liquidity"]), MarketTradingStatus = z3.enum(["active", "halted", "cleaning", "cleaned"]), FeeTier = z3.enum([
|
|
2056
|
+
}), RewardVariant = z3.enum(["referral", "liquidity"]), MarketTradingStatus = z3.enum(["active", "halted", "cleaning", "cleaned"]), FeeTier = z3.enum([
|
|
2057
|
+
"tier0",
|
|
2058
|
+
"tier1",
|
|
2059
|
+
"tier2",
|
|
2060
|
+
"tier3",
|
|
2061
|
+
"tier4",
|
|
2062
|
+
"tier5",
|
|
2063
|
+
"tier6",
|
|
2064
|
+
"tier7",
|
|
2065
|
+
"tier8",
|
|
2066
|
+
"tier9"
|
|
2067
|
+
]), TradingMode = z3.enum(["iso", "cross"]), PerpLedger = z3.object({
|
|
2057
2068
|
trading_mode: TradingMode,
|
|
2058
2069
|
order_ids: z3.array(OrderId),
|
|
2059
2070
|
trigger_order_ids: z3.array(TriggerOrderId),
|
|
@@ -2271,6 +2282,10 @@ var StateResponseSchemas = {
|
|
|
2271
2282
|
taker_fees_tenth_bps: z3.array(I16Schema),
|
|
2272
2283
|
maker_fees_tenth_bps: z3.array(I16Schema),
|
|
2273
2284
|
max_order_to_trigger_price_deviation_ratio: DecimalSchema
|
|
2285
|
+
}), DelegateContainer = z3.object({
|
|
2286
|
+
delegator: Base58Address,
|
|
2287
|
+
expires_at: UnixTimestampMicros.nullable(),
|
|
2288
|
+
flags: U32Schema
|
|
2274
2289
|
}), Schemas = {
|
|
2275
2290
|
DummyValue: z3.number(),
|
|
2276
2291
|
ExchangeInfoV1: z3.object({
|
|
@@ -2314,10 +2329,10 @@ var StateResponseSchemas = {
|
|
|
2314
2329
|
UserAccountConfigV0: z3.object({
|
|
2315
2330
|
delegates: createJsonMap(Base58Address, z3.string())
|
|
2316
2331
|
}),
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2332
|
+
Delegate: z3.object({
|
|
2333
|
+
name: z3.string(),
|
|
2334
|
+
address: Base58Address,
|
|
2335
|
+
container: DelegateContainer
|
|
2321
2336
|
}),
|
|
2322
2337
|
RiskEngineV0: z3.object({
|
|
2323
2338
|
pricing_engine: PricingEngine,
|
|
@@ -2380,9 +2395,10 @@ var StateResponseSchemas = {
|
|
|
2380
2395
|
address: Base58Address,
|
|
2381
2396
|
account: Schemas.UserAccount
|
|
2382
2397
|
})),
|
|
2383
|
-
Delegate: createBaseResponse(
|
|
2384
|
-
|
|
2385
|
-
|
|
2398
|
+
Delegate: createBaseResponse(Schemas.Delegate),
|
|
2399
|
+
Delegates: createBaseResponse(z3.object({
|
|
2400
|
+
delegator: Base58Address,
|
|
2401
|
+
delegates: z3.array(Schemas.Delegate)
|
|
2386
2402
|
})),
|
|
2387
2403
|
UserAccountConfig: StateResponseSchemas.StateMapElement(Base58Address, VersionedV0(Schemas.UserAccountConfigV0)),
|
|
2388
2404
|
UserAccountBulk: createBaseResponse(z3.object({
|
|
@@ -2620,9 +2636,13 @@ class ReadOnlyClient {
|
|
|
2620
2636
|
let path = `/modules/exchange/state/user-account-configs/items/${address}`, response = await this.fetchApiResource(path);
|
|
2621
2637
|
return ResponseSchemas.UserAccountConfig.parse(response).value;
|
|
2622
2638
|
}
|
|
2623
|
-
async
|
|
2639
|
+
async getDelegate(delegate) {
|
|
2624
2640
|
let path = `/modules/exchange/api/v1/delegate/${delegate}`, response = await this.fetchApiResource(path);
|
|
2625
|
-
return ResponseSchemas.Delegate.parse(response)
|
|
2641
|
+
return ResponseSchemas.Delegate.parse(response);
|
|
2642
|
+
}
|
|
2643
|
+
async getAllDelegates(delegator) {
|
|
2644
|
+
let path = `/modules/exchange/api/v1/delegates/${delegator}`, response = await this.fetchApiResource(path);
|
|
2645
|
+
return ResponseSchemas.Delegates.parse(response);
|
|
2626
2646
|
}
|
|
2627
2647
|
async getExchangeAssets() {
|
|
2628
2648
|
let response = await this.fetchApiResource("/modules/exchange/state/exchange-assets");
|
|
@@ -2820,6 +2840,10 @@ class AuthenticatedClient extends ReadOnlyClient {
|
|
|
2820
2840
|
let addr = address ?? this.address;
|
|
2821
2841
|
return await super.getUserAccount(addr);
|
|
2822
2842
|
}
|
|
2843
|
+
async getAllDelegates(address) {
|
|
2844
|
+
let addr = address ?? this.address;
|
|
2845
|
+
return await super.getAllDelegates(addr);
|
|
2846
|
+
}
|
|
2823
2847
|
async getUserAccountConfig(address) {
|
|
2824
2848
|
let addr = address ?? this.address;
|
|
2825
2849
|
return await super.getUserAccountConfig(addr);
|
|
@@ -4398,4 +4422,4 @@ export {
|
|
|
4398
4422
|
AbortError
|
|
4399
4423
|
};
|
|
4400
4424
|
|
|
4401
|
-
//# debugId=
|
|
4425
|
+
//# debugId=3F408CF296FE11ED64756E2164756E21
|