@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.
Binary file
@@ -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(["tier0", "tier1", "tier2", "tier3", "tier4"]), TradingMode = z3.enum(["iso", "cross"]), PerpLedger = z3.object({
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
- DelegateContainer: z3.object({
2318
- delegator: Base58Address,
2319
- expires_at: UnixTimestampMicros.nullable(),
2320
- flags: U32Schema
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(z3.object({
2384
- address: Base58Address,
2385
- container: Schemas.DelegateContainer
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 getDelegateContainer(delegate) {
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).container;
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);
@@ -4436,4 +4460,4 @@ export {
4436
4460
  AbortError
4437
4461
  };
4438
4462
 
4439
- //# debugId=58EBE852140AE5E264756E2164756E21
4463
+ //# debugId=1A9986ECF8C0480B64756E2164756E21