@stxapp/stx-typescript 0.8.0 → 0.9.0-alpha.1

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.
@@ -252,10 +252,49 @@ interface EventPlayers {
252
252
  stats: EventStat[];
253
253
  [key: string]: unknown;
254
254
  }
255
- /** One market to create. */
256
- interface NewMarketInput {
257
- /** The market type. Player stat lines are the only one today. */
258
- rule?: "player_stat_line";
255
+ /** One stat an event type offers, in `STX.marketTypes()`. */
256
+ interface MarketTypeEventType {
257
+ /** The sport, e.g. `"Football"`. */
258
+ sport: string;
259
+ /** The stats on offer, sorted by `stat`. */
260
+ stats: EventStat[];
261
+ [key: string]: unknown;
262
+ }
263
+ /** One field a market entry takes besides `rule`. */
264
+ interface MarketTypeField {
265
+ /** Its JSON type, e.g. `"string"`. */
266
+ type: string;
267
+ /** What it takes. */
268
+ description: string;
269
+ [key: string]: unknown;
270
+ }
271
+ /** A market type `STX.createMarkets()` can create. */
272
+ interface CreatableMarketType {
273
+ partner_create: true;
274
+ /** The fields an entry takes besides `rule`, by wire name. */
275
+ fields: Record<string, MarketTypeField>;
276
+ /** The event types it runs on, keyed by event type, e.g. `"NFL"`. */
277
+ event_types: Record<string, MarketTypeEventType>;
278
+ [key: string]: unknown;
279
+ }
280
+ /** A market type STX lists but an app cannot create. */
281
+ interface ListedMarketType {
282
+ partner_create: false;
283
+ /** The event types it runs on. */
284
+ event_types: string[];
285
+ [key: string]: unknown;
286
+ }
287
+ /** One market type. `partner_create` says whether `STX.createMarkets()` takes it. */
288
+ type MarketType = CreatableMarketType | ListedMarketType;
289
+ /** `GET /api/v1/types`: the market types, keyed by rule. */
290
+ type MarketTypes = {
291
+ player_stat_line: CreatableMarketType;
292
+ } & {
293
+ [rule: string]: MarketType;
294
+ };
295
+ /** A player stat line: over/under one player's stat in one event. */
296
+ interface PlayerStatLineMarket {
297
+ rule: "player_stat_line";
259
298
  /** From `eventPlayers()`. */
260
299
  playerId: string;
261
300
  /** One of the event's stats, e.g. `Stats.Basketball.POINTS`. */
@@ -266,41 +305,59 @@ interface NewMarketInput {
266
305
  * are rejected with `invalid_line`.
267
306
  */
268
307
  line: number;
269
- /** `"ou"` (over/under), the only type today and the default. */
270
- propType?: "ou";
271
308
  }
309
+ /**
310
+ * One market to create. `rule` names the market type and decides the other
311
+ * fields; `STX.marketTypes()` lists the rules an app can create. Player stat
312
+ * lines are the only one today.
313
+ */
314
+ type NewMarket = PlayerStatLineMarket;
315
+ /** A rule `STX.createMarkets()` takes. */
316
+ type MarketRule = NewMarket["rule"];
272
317
  /** Why a market was not created. */
273
- type MarketRejectionReason = "invalid_market" | "unsupported_market_type" | "unsupported_prop_type" | "unsupported_stat" | "invalid_line" | "unknown_player" | "event_not_open" | "not_created" | (string & {});
274
- /** What was sent for one market, as the exchange echoes it. */
275
- interface MarketRequestEcho {
276
- player_id?: string;
277
- stat?: string;
278
- prop_type?: string;
279
- line?: number;
280
- [key: string]: unknown;
281
- }
282
- /** The outcome for one requested market, in request order. */
318
+ type MarketRejectionReason = "invalid_market" | "unsupported_rule" | "unsupported_stat" | "invalid_line" | "unknown_player" | "event_not_open" | "not_created" | (string & {});
319
+ /**
320
+ * The outcome for one requested market. `index` is the market's position in
321
+ * the list given to `createMarkets()`.
322
+ */
283
323
  type CreateMarketResult = {
324
+ index: number;
284
325
  status: "created";
285
326
  market_id: string;
286
- market: MarketRequestEcho;
327
+ reason: null;
328
+ [key: string]: unknown;
287
329
  } | {
330
+ index: number;
288
331
  status: "exists";
289
332
  market_id: string;
290
- market: MarketRequestEcho;
333
+ reason: null;
334
+ [key: string]: unknown;
335
+ } | {
336
+ index: number;
337
+ status: "valid";
338
+ market_id: null;
339
+ reason: null;
340
+ [key: string]: unknown;
291
341
  } | {
342
+ index: number;
292
343
  status: "rejected";
344
+ market_id: null;
293
345
  reason: MarketRejectionReason;
294
- market: MarketRequestEcho;
346
+ [key: string]: unknown;
295
347
  };
296
348
  /** Options for `STX.createMarkets()`. */
297
349
  interface CreateMarketsOptions {
298
350
  /**
299
- * Check each market against the event's players and stats, and the line
300
- * rule, before sending. Failing markets come back `rejected` without a
301
- * request; the rest are sent with the event's own stat key. The exchange
302
- * checks every market either way. Reads `eventPlayers()`, so the token also
303
- * needs the `events` scope.
351
+ * Run every check and create nothing. A market that would be created comes
352
+ * back `valid`; one that is already listed comes back `exists`.
353
+ */
354
+ dryRun?: boolean;
355
+ /**
356
+ * Check each player stat line against the event's players and stats, and
357
+ * the line rule, before sending. Failing markets come back `rejected`
358
+ * without a request; the rest are sent with the event's own stat key. The
359
+ * exchange checks every market either way. Reads `eventPlayers()`, so the
360
+ * token also needs the `events` scope.
304
361
  */
305
362
  validate?: boolean;
306
363
  }
@@ -2758,6 +2815,17 @@ declare const OPERATIONS: {
2758
2815
  readonly isList: false;
2759
2816
  readonly paginated: false;
2760
2817
  };
2818
+ readonly types_get: {
2819
+ readonly method: "GET";
2820
+ readonly path: "/api/v1/types";
2821
+ readonly query: readonly [];
2822
+ readonly pathParams: readonly [];
2823
+ readonly hasBody: false;
2824
+ readonly responseKey: "";
2825
+ readonly model: "";
2826
+ readonly isList: false;
2827
+ readonly paginated: false;
2828
+ };
2761
2829
  };
2762
2830
  type OperationId = keyof typeof OPERATIONS;
2763
2831
 
@@ -3003,8 +3071,8 @@ declare class ApiKeyCredentials implements AuthProvider {
3003
3071
  toString(): string;
3004
3072
  }
3005
3073
 
3006
- declare const VERSION = "0.8.0";
3007
- declare const USER_AGENT = "stx-typescript/0.8.0";
3074
+ declare const VERSION = "0.9.0-alpha.1";
3075
+ declare const USER_AGENT = "stx-typescript/0.9.0-alpha.1";
3008
3076
  /**
3009
3077
  * `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
3010
3078
  * `await using client = new STX()` works there; a registered stand-in on
@@ -3251,7 +3319,9 @@ interface STXWebSocketOptions extends Pick<STXOptions, "environment" | "region"
3251
3319
  * Called when the socket gives up because its credentials are dead: an OAuth
3252
3320
  * grant was revoked (`STXGrantRevokedException`), or the tokens are gone. The
3253
3321
  * socket is closed by then; `ws.error` holds the same exception. Send the
3254
- * member back through consent.
3322
+ * member back through consent. It is also called with
3323
+ * `STXAccountPendingException` while the member's STX account is still being
3324
+ * verified: their tokens are kept, so connect again once they are verified.
3255
3325
  */
3256
3326
  onAuthError?: (err: STXException) => void;
3257
3327
  /** Milliseconds to wait for a join or push reply. Default 10000. */
@@ -3689,21 +3759,32 @@ declare class STX {
3689
3759
  event_id?: string | null;
3690
3760
  }): Promise<EventStat[]>;
3691
3761
  /**
3692
- * `POST /api/v1/markets`: create player-prop markets on a scheduled event,
3693
- * up to `MAX_MARKETS_PER_REQUEST` per call. Needs an OAuth app token with
3694
- * `markets.write`, which STX grants, from the client's IP allow-list.
3762
+ * `GET /api/v1/types`: the market types, keyed by rule. One with
3763
+ * `partner_create: true` can be created with `createMarkets()`, and lists
3764
+ * the `fields` an entry takes and, per event type, the `stats` on offer. It
3765
+ * changes only when STX adds a rule or a stat, so read it once and keep it.
3766
+ * Needs an OAuth app token with `events`, or an API key.
3767
+ */
3768
+ marketTypes(): Promise<MarketTypes>;
3769
+ /**
3770
+ * `POST /api/v1/markets`: create markets on a scheduled event, up to
3771
+ * `MAX_MARKETS_PER_REQUEST` per call. Each market names its `rule` and the
3772
+ * fields that rule takes. Needs an OAuth app token with `markets.write`,
3773
+ * which STX grants, from an address on the client's IP allow-list (it
3774
+ * applies to every call that client makes).
3695
3775
  *
3696
- * Returns one result per market, in order: `created` or `exists` (both with
3697
- * `market_id`), or `rejected` with a `reason`. A rejected market is a
3698
- * result, not an error, and resending is safe: a market that is already
3699
- * listed comes back `exists`. A refused request throws (`403` without
3700
- * `markets.write`, `404` unknown event, `422` event not open).
3776
+ * Returns one result per market, in the order given, each with its `index`:
3777
+ * `created` or `exists` (both with `market_id`), `valid` (a `dryRun` market
3778
+ * that would be created), or `rejected` with a `reason`. A rejected market
3779
+ * is a result, not an error, and resending is safe: a market that is
3780
+ * already listed comes back `exists`. A refused request throws (`403`
3781
+ * without `markets.write`, `404` unknown event, `422` event not open).
3701
3782
  *
3702
- * Each `line` must be a positive number ending in `.5`, e.g. `18.5`. More
3703
- * than `MAX_MARKETS_PER_REQUEST` markets throws `TypeError` before any
3704
- * request. `validate` also needs the `events` scope.
3783
+ * `dryRun` runs every check and creates nothing. More than
3784
+ * `MAX_MARKETS_PER_REQUEST` markets throws `TypeError` before any request.
3785
+ * `validate` also needs the `events` scope.
3705
3786
  */
3706
- createMarkets(eventId: string, markets: readonly NewMarketInput[], opts?: CreateMarketsOptions): Promise<CreateMarketResult[]>;
3787
+ createMarkets(eventId: string, markets: readonly NewMarket[], opts?: CreateMarketsOptions): Promise<CreateMarketResult[]>;
3707
3788
  /** `GET /api/v1/orders`: one page of your orders, newest first. */
3708
3789
  orders(query?: OrdersQuery): Promise<Page<Order>>;
3709
3790
  /** Every order matching the filters, following the cursor. */
@@ -3826,4 +3907,4 @@ declare class STX {
3826
3907
  websocket(opts?: Omit<STXWebSocketOptions, "rest">): STXWebSocket;
3827
3908
  }
3828
3909
 
3829
- export { type NewOrder as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, type GeoOption as D, Environment as E, type FeeTransaction as F, type GeoCheckResult as G, type GeoRejection as H, HOSTS as I, type KnownStat as J, KEY_HEADER as K, type Leaderboard as L, type LeaderboardEntry as M, type LeaderboardStanding as N, type Logger as O, MAX_MARKETS_PER_REQUEST as P, type Market as Q, type MarketFilter as R, type MarketRejectionReason as S, type MarketRequestEcho as T, type MarketStat as U, type MarketStatsQuery as V, type MarketsQuery as W, type Me as X, type MessageHandler as Y, NO_RETRY as Z, type NewMarketInput as _, type AccountChange as a, loadPrivateKey as a$, type NewOrderInput as a0, OPERATIONS as a1, type Operation as a2, type OperationId as a3, type Order as a4, type OrderOptions as a5, type OrdersQuery as a6, Page as a7, type PageQuery as a8, type PaymentTransaction as a9, STXRejectedException as aA, STXServerException as aB, STXTimeoutException as aC, STXTransportException as aD, STXValidationException as aE, STXWebSocket as aF, type STXWebSocketOptions as aG, type Settlement as aH, type SettlementsQuery as aI, type Signer as aJ, type Stat as aK, type StatDetail as aL, Stats as aM, type StrList as aN, TERMINAL_ORDER_STATUSES as aO, TIMESTAMP_HEADER as aP, type Transaction as aQ, USER_AGENT as aR, VERSION as aS, type WebSocketAuthContext as aT, baseUrlFor as aU, buildMessage as aV, environmentNamed as aW, errorForStatus as aX, geoRejection as aY, handshakePath as aZ, isValidLine as a_, type Position as aa, type PrivateKeyInput as ab, type ProfileUpdate as ac, type RecentTrade as ad, ReconnectPolicy as ae, type ReconnectPolicyOptions as af, Region as ag, type ResponseEvent as ah, RetryPolicy as ai, type RetryPolicyOptions as aj, SIGNATURE_HEADER as ak, SNAPSHOT_EVENTS as al, STX as am, STXAPIException as an, STXAuthenticationException as ao, STXChannelException as ap, STXConfigException as aq, type STXEnvironment as ar, STXException as as, STXForbiddenException as at, STXGeoLocationException as au, STXInsufficientScopeException as av, STXInvalidTokenException as aw, STXNotFoundException as ax, type STXOptions as ay, STXRateLimitException as az, type AccountChangeKind as b, models as b0, orderBody as b1, requestPath as b2, resolveHost as b3, signerFromPrivateKey as b4, socketUrlFor as b5, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Channel as k, ChannelMessage as l, type CreateMarketResult as m, type CreateMarketsOptions as n, Environments as o, type Error$1 as p, type Event as q, type EventPlayer as r, type EventPlayers as s, type EventStat as t, type EventTeam as u, type EventsQuery as v, type FetchLike as w, type Fill as x, type FillsQuery as y, type GeoLocationProvider as z };
3910
+ export { type MarketTypes as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, type GeoLocationProvider as D, Environment as E, type FeeTransaction as F, type GeoCheckResult as G, type GeoOption as H, type GeoRejection as I, HOSTS as J, KEY_HEADER as K, type KnownStat as L, type Leaderboard as M, type LeaderboardEntry as N, type LeaderboardStanding as O, type ListedMarketType as P, type Logger as Q, MAX_MARKETS_PER_REQUEST as R, type Market as S, type MarketFilter as T, type MarketRejectionReason as U, type MarketRule as V, type MarketStat as W, type MarketStatsQuery as X, type MarketType as Y, type MarketTypeEventType as Z, type MarketTypeField as _, type AccountChange as a, baseUrlFor as a$, type MarketsQuery as a0, type Me as a1, type MessageHandler as a2, NO_RETRY as a3, type NewMarket as a4, type NewOrder as a5, type NewOrderInput as a6, OPERATIONS as a7, type Operation as a8, type OperationId as a9, STXForbiddenException as aA, STXGeoLocationException as aB, STXInsufficientScopeException as aC, STXInvalidTokenException as aD, STXNotFoundException as aE, type STXOptions as aF, STXRateLimitException as aG, STXRejectedException as aH, STXServerException as aI, STXTimeoutException as aJ, STXTransportException as aK, STXValidationException as aL, STXWebSocket as aM, type STXWebSocketOptions as aN, type Settlement as aO, type SettlementsQuery as aP, type Signer as aQ, type Stat as aR, type StatDetail as aS, Stats as aT, type StrList as aU, TERMINAL_ORDER_STATUSES as aV, TIMESTAMP_HEADER as aW, type Transaction as aX, USER_AGENT as aY, VERSION as aZ, type WebSocketAuthContext as a_, type Order as aa, type OrderOptions as ab, type OrdersQuery as ac, Page as ad, type PageQuery as ae, type PaymentTransaction as af, type PlayerStatLineMarket as ag, type Position as ah, type PrivateKeyInput as ai, type ProfileUpdate as aj, type RecentTrade as ak, ReconnectPolicy as al, type ReconnectPolicyOptions as am, Region as an, type ResponseEvent as ao, RetryPolicy as ap, type RetryPolicyOptions as aq, SIGNATURE_HEADER as ar, SNAPSHOT_EVENTS as as, STX as at, STXAPIException as au, STXAuthenticationException as av, STXChannelException as aw, STXConfigException as ax, type STXEnvironment as ay, STXException as az, type AccountChangeKind as b, buildMessage as b0, environmentNamed as b1, errorForStatus as b2, geoRejection as b3, handshakePath as b4, isValidLine as b5, loadPrivateKey as b6, models as b7, orderBody as b8, requestPath as b9, resolveHost as ba, signerFromPrivateKey as bb, socketUrlFor as bc, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Channel as k, ChannelMessage as l, type CreatableMarketType as m, type CreateMarketResult as n, type CreateMarketsOptions as o, Environments as p, type Error$1 as q, type Event as r, type EventPlayer as s, type EventPlayers as t, type EventStat as u, type EventTeam as v, type EventsQuery as w, type FetchLike as x, type Fill as y, type FillsQuery as z };
@@ -252,10 +252,49 @@ interface EventPlayers {
252
252
  stats: EventStat[];
253
253
  [key: string]: unknown;
254
254
  }
255
- /** One market to create. */
256
- interface NewMarketInput {
257
- /** The market type. Player stat lines are the only one today. */
258
- rule?: "player_stat_line";
255
+ /** One stat an event type offers, in `STX.marketTypes()`. */
256
+ interface MarketTypeEventType {
257
+ /** The sport, e.g. `"Football"`. */
258
+ sport: string;
259
+ /** The stats on offer, sorted by `stat`. */
260
+ stats: EventStat[];
261
+ [key: string]: unknown;
262
+ }
263
+ /** One field a market entry takes besides `rule`. */
264
+ interface MarketTypeField {
265
+ /** Its JSON type, e.g. `"string"`. */
266
+ type: string;
267
+ /** What it takes. */
268
+ description: string;
269
+ [key: string]: unknown;
270
+ }
271
+ /** A market type `STX.createMarkets()` can create. */
272
+ interface CreatableMarketType {
273
+ partner_create: true;
274
+ /** The fields an entry takes besides `rule`, by wire name. */
275
+ fields: Record<string, MarketTypeField>;
276
+ /** The event types it runs on, keyed by event type, e.g. `"NFL"`. */
277
+ event_types: Record<string, MarketTypeEventType>;
278
+ [key: string]: unknown;
279
+ }
280
+ /** A market type STX lists but an app cannot create. */
281
+ interface ListedMarketType {
282
+ partner_create: false;
283
+ /** The event types it runs on. */
284
+ event_types: string[];
285
+ [key: string]: unknown;
286
+ }
287
+ /** One market type. `partner_create` says whether `STX.createMarkets()` takes it. */
288
+ type MarketType = CreatableMarketType | ListedMarketType;
289
+ /** `GET /api/v1/types`: the market types, keyed by rule. */
290
+ type MarketTypes = {
291
+ player_stat_line: CreatableMarketType;
292
+ } & {
293
+ [rule: string]: MarketType;
294
+ };
295
+ /** A player stat line: over/under one player's stat in one event. */
296
+ interface PlayerStatLineMarket {
297
+ rule: "player_stat_line";
259
298
  /** From `eventPlayers()`. */
260
299
  playerId: string;
261
300
  /** One of the event's stats, e.g. `Stats.Basketball.POINTS`. */
@@ -266,41 +305,59 @@ interface NewMarketInput {
266
305
  * are rejected with `invalid_line`.
267
306
  */
268
307
  line: number;
269
- /** `"ou"` (over/under), the only type today and the default. */
270
- propType?: "ou";
271
308
  }
309
+ /**
310
+ * One market to create. `rule` names the market type and decides the other
311
+ * fields; `STX.marketTypes()` lists the rules an app can create. Player stat
312
+ * lines are the only one today.
313
+ */
314
+ type NewMarket = PlayerStatLineMarket;
315
+ /** A rule `STX.createMarkets()` takes. */
316
+ type MarketRule = NewMarket["rule"];
272
317
  /** Why a market was not created. */
273
- type MarketRejectionReason = "invalid_market" | "unsupported_market_type" | "unsupported_prop_type" | "unsupported_stat" | "invalid_line" | "unknown_player" | "event_not_open" | "not_created" | (string & {});
274
- /** What was sent for one market, as the exchange echoes it. */
275
- interface MarketRequestEcho {
276
- player_id?: string;
277
- stat?: string;
278
- prop_type?: string;
279
- line?: number;
280
- [key: string]: unknown;
281
- }
282
- /** The outcome for one requested market, in request order. */
318
+ type MarketRejectionReason = "invalid_market" | "unsupported_rule" | "unsupported_stat" | "invalid_line" | "unknown_player" | "event_not_open" | "not_created" | (string & {});
319
+ /**
320
+ * The outcome for one requested market. `index` is the market's position in
321
+ * the list given to `createMarkets()`.
322
+ */
283
323
  type CreateMarketResult = {
324
+ index: number;
284
325
  status: "created";
285
326
  market_id: string;
286
- market: MarketRequestEcho;
327
+ reason: null;
328
+ [key: string]: unknown;
287
329
  } | {
330
+ index: number;
288
331
  status: "exists";
289
332
  market_id: string;
290
- market: MarketRequestEcho;
333
+ reason: null;
334
+ [key: string]: unknown;
335
+ } | {
336
+ index: number;
337
+ status: "valid";
338
+ market_id: null;
339
+ reason: null;
340
+ [key: string]: unknown;
291
341
  } | {
342
+ index: number;
292
343
  status: "rejected";
344
+ market_id: null;
293
345
  reason: MarketRejectionReason;
294
- market: MarketRequestEcho;
346
+ [key: string]: unknown;
295
347
  };
296
348
  /** Options for `STX.createMarkets()`. */
297
349
  interface CreateMarketsOptions {
298
350
  /**
299
- * Check each market against the event's players and stats, and the line
300
- * rule, before sending. Failing markets come back `rejected` without a
301
- * request; the rest are sent with the event's own stat key. The exchange
302
- * checks every market either way. Reads `eventPlayers()`, so the token also
303
- * needs the `events` scope.
351
+ * Run every check and create nothing. A market that would be created comes
352
+ * back `valid`; one that is already listed comes back `exists`.
353
+ */
354
+ dryRun?: boolean;
355
+ /**
356
+ * Check each player stat line against the event's players and stats, and
357
+ * the line rule, before sending. Failing markets come back `rejected`
358
+ * without a request; the rest are sent with the event's own stat key. The
359
+ * exchange checks every market either way. Reads `eventPlayers()`, so the
360
+ * token also needs the `events` scope.
304
361
  */
305
362
  validate?: boolean;
306
363
  }
@@ -2758,6 +2815,17 @@ declare const OPERATIONS: {
2758
2815
  readonly isList: false;
2759
2816
  readonly paginated: false;
2760
2817
  };
2818
+ readonly types_get: {
2819
+ readonly method: "GET";
2820
+ readonly path: "/api/v1/types";
2821
+ readonly query: readonly [];
2822
+ readonly pathParams: readonly [];
2823
+ readonly hasBody: false;
2824
+ readonly responseKey: "";
2825
+ readonly model: "";
2826
+ readonly isList: false;
2827
+ readonly paginated: false;
2828
+ };
2761
2829
  };
2762
2830
  type OperationId = keyof typeof OPERATIONS;
2763
2831
 
@@ -3003,8 +3071,8 @@ declare class ApiKeyCredentials implements AuthProvider {
3003
3071
  toString(): string;
3004
3072
  }
3005
3073
 
3006
- declare const VERSION = "0.8.0";
3007
- declare const USER_AGENT = "stx-typescript/0.8.0";
3074
+ declare const VERSION = "0.9.0-alpha.1";
3075
+ declare const USER_AGENT = "stx-typescript/0.9.0-alpha.1";
3008
3076
  /**
3009
3077
  * `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
3010
3078
  * `await using client = new STX()` works there; a registered stand-in on
@@ -3251,7 +3319,9 @@ interface STXWebSocketOptions extends Pick<STXOptions, "environment" | "region"
3251
3319
  * Called when the socket gives up because its credentials are dead: an OAuth
3252
3320
  * grant was revoked (`STXGrantRevokedException`), or the tokens are gone. The
3253
3321
  * socket is closed by then; `ws.error` holds the same exception. Send the
3254
- * member back through consent.
3322
+ * member back through consent. It is also called with
3323
+ * `STXAccountPendingException` while the member's STX account is still being
3324
+ * verified: their tokens are kept, so connect again once they are verified.
3255
3325
  */
3256
3326
  onAuthError?: (err: STXException) => void;
3257
3327
  /** Milliseconds to wait for a join or push reply. Default 10000. */
@@ -3689,21 +3759,32 @@ declare class STX {
3689
3759
  event_id?: string | null;
3690
3760
  }): Promise<EventStat[]>;
3691
3761
  /**
3692
- * `POST /api/v1/markets`: create player-prop markets on a scheduled event,
3693
- * up to `MAX_MARKETS_PER_REQUEST` per call. Needs an OAuth app token with
3694
- * `markets.write`, which STX grants, from the client's IP allow-list.
3762
+ * `GET /api/v1/types`: the market types, keyed by rule. One with
3763
+ * `partner_create: true` can be created with `createMarkets()`, and lists
3764
+ * the `fields` an entry takes and, per event type, the `stats` on offer. It
3765
+ * changes only when STX adds a rule or a stat, so read it once and keep it.
3766
+ * Needs an OAuth app token with `events`, or an API key.
3767
+ */
3768
+ marketTypes(): Promise<MarketTypes>;
3769
+ /**
3770
+ * `POST /api/v1/markets`: create markets on a scheduled event, up to
3771
+ * `MAX_MARKETS_PER_REQUEST` per call. Each market names its `rule` and the
3772
+ * fields that rule takes. Needs an OAuth app token with `markets.write`,
3773
+ * which STX grants, from an address on the client's IP allow-list (it
3774
+ * applies to every call that client makes).
3695
3775
  *
3696
- * Returns one result per market, in order: `created` or `exists` (both with
3697
- * `market_id`), or `rejected` with a `reason`. A rejected market is a
3698
- * result, not an error, and resending is safe: a market that is already
3699
- * listed comes back `exists`. A refused request throws (`403` without
3700
- * `markets.write`, `404` unknown event, `422` event not open).
3776
+ * Returns one result per market, in the order given, each with its `index`:
3777
+ * `created` or `exists` (both with `market_id`), `valid` (a `dryRun` market
3778
+ * that would be created), or `rejected` with a `reason`. A rejected market
3779
+ * is a result, not an error, and resending is safe: a market that is
3780
+ * already listed comes back `exists`. A refused request throws (`403`
3781
+ * without `markets.write`, `404` unknown event, `422` event not open).
3701
3782
  *
3702
- * Each `line` must be a positive number ending in `.5`, e.g. `18.5`. More
3703
- * than `MAX_MARKETS_PER_REQUEST` markets throws `TypeError` before any
3704
- * request. `validate` also needs the `events` scope.
3783
+ * `dryRun` runs every check and creates nothing. More than
3784
+ * `MAX_MARKETS_PER_REQUEST` markets throws `TypeError` before any request.
3785
+ * `validate` also needs the `events` scope.
3705
3786
  */
3706
- createMarkets(eventId: string, markets: readonly NewMarketInput[], opts?: CreateMarketsOptions): Promise<CreateMarketResult[]>;
3787
+ createMarkets(eventId: string, markets: readonly NewMarket[], opts?: CreateMarketsOptions): Promise<CreateMarketResult[]>;
3707
3788
  /** `GET /api/v1/orders`: one page of your orders, newest first. */
3708
3789
  orders(query?: OrdersQuery): Promise<Page<Order>>;
3709
3790
  /** Every order matching the filters, following the cursor. */
@@ -3826,4 +3907,4 @@ declare class STX {
3826
3907
  websocket(opts?: Omit<STXWebSocketOptions, "rest">): STXWebSocket;
3827
3908
  }
3828
3909
 
3829
- export { type NewOrder as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, type GeoOption as D, Environment as E, type FeeTransaction as F, type GeoCheckResult as G, type GeoRejection as H, HOSTS as I, type KnownStat as J, KEY_HEADER as K, type Leaderboard as L, type LeaderboardEntry as M, type LeaderboardStanding as N, type Logger as O, MAX_MARKETS_PER_REQUEST as P, type Market as Q, type MarketFilter as R, type MarketRejectionReason as S, type MarketRequestEcho as T, type MarketStat as U, type MarketStatsQuery as V, type MarketsQuery as W, type Me as X, type MessageHandler as Y, NO_RETRY as Z, type NewMarketInput as _, type AccountChange as a, loadPrivateKey as a$, type NewOrderInput as a0, OPERATIONS as a1, type Operation as a2, type OperationId as a3, type Order as a4, type OrderOptions as a5, type OrdersQuery as a6, Page as a7, type PageQuery as a8, type PaymentTransaction as a9, STXRejectedException as aA, STXServerException as aB, STXTimeoutException as aC, STXTransportException as aD, STXValidationException as aE, STXWebSocket as aF, type STXWebSocketOptions as aG, type Settlement as aH, type SettlementsQuery as aI, type Signer as aJ, type Stat as aK, type StatDetail as aL, Stats as aM, type StrList as aN, TERMINAL_ORDER_STATUSES as aO, TIMESTAMP_HEADER as aP, type Transaction as aQ, USER_AGENT as aR, VERSION as aS, type WebSocketAuthContext as aT, baseUrlFor as aU, buildMessage as aV, environmentNamed as aW, errorForStatus as aX, geoRejection as aY, handshakePath as aZ, isValidLine as a_, type Position as aa, type PrivateKeyInput as ab, type ProfileUpdate as ac, type RecentTrade as ad, ReconnectPolicy as ae, type ReconnectPolicyOptions as af, Region as ag, type ResponseEvent as ah, RetryPolicy as ai, type RetryPolicyOptions as aj, SIGNATURE_HEADER as ak, SNAPSHOT_EVENTS as al, STX as am, STXAPIException as an, STXAuthenticationException as ao, STXChannelException as ap, STXConfigException as aq, type STXEnvironment as ar, STXException as as, STXForbiddenException as at, STXGeoLocationException as au, STXInsufficientScopeException as av, STXInvalidTokenException as aw, STXNotFoundException as ax, type STXOptions as ay, STXRateLimitException as az, type AccountChangeKind as b, models as b0, orderBody as b1, requestPath as b2, resolveHost as b3, signerFromPrivateKey as b4, socketUrlFor as b5, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Channel as k, ChannelMessage as l, type CreateMarketResult as m, type CreateMarketsOptions as n, Environments as o, type Error$1 as p, type Event as q, type EventPlayer as r, type EventPlayers as s, type EventStat as t, type EventTeam as u, type EventsQuery as v, type FetchLike as w, type Fill as x, type FillsQuery as y, type GeoLocationProvider as z };
3910
+ export { type MarketTypes as $, type AcceptTermsOptions as A, type Balance as B, type Cancellation as C, type GeoLocationProvider as D, Environment as E, type FeeTransaction as F, type GeoCheckResult as G, type GeoOption as H, type GeoRejection as I, HOSTS as J, KEY_HEADER as K, type KnownStat as L, type Leaderboard as M, type LeaderboardEntry as N, type LeaderboardStanding as O, type ListedMarketType as P, type Logger as Q, MAX_MARKETS_PER_REQUEST as R, type Market as S, type MarketFilter as T, type MarketRejectionReason as U, type MarketRule as V, type MarketStat as W, type MarketStatsQuery as X, type MarketType as Y, type MarketTypeEventType as Z, type MarketTypeField as _, type AccountChange as a, baseUrlFor as a$, type MarketsQuery as a0, type Me as a1, type MessageHandler as a2, NO_RETRY as a3, type NewMarket as a4, type NewOrder as a5, type NewOrderInput as a6, OPERATIONS as a7, type Operation as a8, type OperationId as a9, STXForbiddenException as aA, STXGeoLocationException as aB, STXInsufficientScopeException as aC, STXInvalidTokenException as aD, STXNotFoundException as aE, type STXOptions as aF, STXRateLimitException as aG, STXRejectedException as aH, STXServerException as aI, STXTimeoutException as aJ, STXTransportException as aK, STXValidationException as aL, STXWebSocket as aM, type STXWebSocketOptions as aN, type Settlement as aO, type SettlementsQuery as aP, type Signer as aQ, type Stat as aR, type StatDetail as aS, Stats as aT, type StrList as aU, TERMINAL_ORDER_STATUSES as aV, TIMESTAMP_HEADER as aW, type Transaction as aX, USER_AGENT as aY, VERSION as aZ, type WebSocketAuthContext as a_, type Order as aa, type OrderOptions as ab, type OrdersQuery as ac, Page as ad, type PageQuery as ae, type PaymentTransaction as af, type PlayerStatLineMarket as ag, type Position as ah, type PrivateKeyInput as ai, type ProfileUpdate as aj, type RecentTrade as ak, ReconnectPolicy as al, type ReconnectPolicyOptions as am, Region as an, type ResponseEvent as ao, RetryPolicy as ap, type RetryPolicyOptions as aq, SIGNATURE_HEADER as ar, SNAPSHOT_EVENTS as as, STX as at, STXAPIException as au, STXAuthenticationException as av, STXChannelException as aw, STXConfigException as ax, type STXEnvironment as ay, STXException as az, type AccountChangeKind as b, buildMessage as b0, environmentNamed as b1, errorForStatus as b2, geoRejection as b3, handshakePath as b4, isValidLine as b5, loadPrivateKey as b6, models as b7, orderBody as b8, requestPath as b9, resolveHost as ba, signerFromPrivateKey as bb, socketUrlFor as bc, type AccountState as c, AccountView as d, type AccountViewOptions as e, ApiKeyCredentials as f, type AuthProvider as g, type AuthRequest as h, type BatchOrderResult as i, type BookLevel as j, Channel as k, ChannelMessage as l, type CreatableMarketType as m, type CreateMarketResult as n, type CreateMarketsOptions as o, Environments as p, type Error$1 as q, type Event as r, type EventPlayer as s, type EventPlayers as t, type EventStat as u, type EventTeam as v, type EventsQuery as w, type FetchLike as x, type Fill as y, type FillsQuery as z };
package/dist/index.cjs CHANGED
@@ -60,7 +60,7 @@
60
60
 
61
61
 
62
62
 
63
- var _chunkL2DEU7R6cjs = require('./chunk-L2DEU7R6.cjs');
63
+ var _chunk33AQCUGMcjs = require('./chunk-33AQCUGM.cjs');
64
64
 
65
65
 
66
66
 
@@ -123,5 +123,5 @@ var _chunkL2DEU7R6cjs = require('./chunk-L2DEU7R6.cjs');
123
123
 
124
124
 
125
125
 
126
- exports.AccountView = _chunkL2DEU7R6cjs.AccountView; exports.ApiKeyCredentials = _chunkL2DEU7R6cjs.ApiKeyCredentials; exports.Channel = _chunkL2DEU7R6cjs.Channel; exports.ChannelMessage = _chunkL2DEU7R6cjs.ChannelMessage; exports.Environment = _chunkL2DEU7R6cjs.Environment; exports.Environments = _chunkL2DEU7R6cjs.Environments; exports.HOSTS = _chunkL2DEU7R6cjs.HOSTS; exports.KEY_HEADER = _chunkL2DEU7R6cjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunkL2DEU7R6cjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunkL2DEU7R6cjs.NO_RETRY; exports.OPERATIONS = _chunkL2DEU7R6cjs.OPERATIONS; exports.Page = _chunkL2DEU7R6cjs.Page; exports.ReconnectPolicy = _chunkL2DEU7R6cjs.ReconnectPolicy; exports.Region = _chunkL2DEU7R6cjs.Region; exports.RetryPolicy = _chunkL2DEU7R6cjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunkL2DEU7R6cjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunkL2DEU7R6cjs.SNAPSHOT_EVENTS; exports.STX = _chunkL2DEU7R6cjs.STX; exports.STXAPIException = _chunkL2DEU7R6cjs.STXAPIException; exports.STXAuthenticationException = _chunkL2DEU7R6cjs.STXAuthenticationException; exports.STXChannelException = _chunkL2DEU7R6cjs.STXChannelException; exports.STXConfigException = _chunkL2DEU7R6cjs.STXConfigException; exports.STXException = _chunkL2DEU7R6cjs.STXException; exports.STXForbiddenException = _chunkL2DEU7R6cjs.STXForbiddenException; exports.STXGeoLocationException = _chunkL2DEU7R6cjs.STXGeoLocationException; exports.STXInsufficientScopeException = _chunkL2DEU7R6cjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkL2DEU7R6cjs.STXInvalidTokenException; exports.STXNotFoundException = _chunkL2DEU7R6cjs.STXNotFoundException; exports.STXRateLimitException = _chunkL2DEU7R6cjs.STXRateLimitException; exports.STXRejectedException = _chunkL2DEU7R6cjs.STXRejectedException; exports.STXServerException = _chunkL2DEU7R6cjs.STXServerException; exports.STXTimeoutException = _chunkL2DEU7R6cjs.STXTimeoutException; exports.STXTransportException = _chunkL2DEU7R6cjs.STXTransportException; exports.STXValidationException = _chunkL2DEU7R6cjs.STXValidationException; exports.STXWebSocket = _chunkL2DEU7R6cjs.STXWebSocket; exports.Stats = _chunkL2DEU7R6cjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunkL2DEU7R6cjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunkL2DEU7R6cjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunkL2DEU7R6cjs.USER_AGENT; exports.VERSION = _chunkL2DEU7R6cjs.VERSION; exports.baseUrlFor = _chunkL2DEU7R6cjs.baseUrlFor; exports.buildMessage = _chunkL2DEU7R6cjs.buildMessage; exports.centsToDollars = _chunkL2DEU7R6cjs.centsToDollars; exports.convertBook = _chunkL2DEU7R6cjs.convertBook; exports.convertMarketChannelPayload = _chunkL2DEU7R6cjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunkL2DEU7R6cjs.convertMarketPayload; exports.convertMarketsFrame = _chunkL2DEU7R6cjs.convertMarketsFrame; exports.environmentNamed = _chunkL2DEU7R6cjs.environmentNamed; exports.errorForStatus = _chunkL2DEU7R6cjs.errorForStatus; exports.geoRejection = _chunkL2DEU7R6cjs.geoRejection; exports.handshakePath = _chunkL2DEU7R6cjs.handshakePath; exports.isValidLine = _chunkL2DEU7R6cjs.isValidLine; exports.loadPrivateKey = _chunkL2DEU7R6cjs.loadPrivateKey; exports.orderBody = _chunkL2DEU7R6cjs.orderBody; exports.requestPath = _chunkL2DEU7R6cjs.requestPath; exports.resolveHost = _chunkL2DEU7R6cjs.resolveHost; exports.resolveSettings = _chunkL2DEU7R6cjs.resolveSettings; exports.signerFromPrivateKey = _chunkL2DEU7R6cjs.signerFromPrivateKey; exports.socketUrlFor = _chunkL2DEU7R6cjs.socketUrlFor; exports.toDollarString = _chunkL2DEU7R6cjs.toDollarString; exports.toQuantity = _chunkL2DEU7R6cjs.toQuantity;
126
+ exports.AccountView = _chunk33AQCUGMcjs.AccountView; exports.ApiKeyCredentials = _chunk33AQCUGMcjs.ApiKeyCredentials; exports.Channel = _chunk33AQCUGMcjs.Channel; exports.ChannelMessage = _chunk33AQCUGMcjs.ChannelMessage; exports.Environment = _chunk33AQCUGMcjs.Environment; exports.Environments = _chunk33AQCUGMcjs.Environments; exports.HOSTS = _chunk33AQCUGMcjs.HOSTS; exports.KEY_HEADER = _chunk33AQCUGMcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunk33AQCUGMcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunk33AQCUGMcjs.NO_RETRY; exports.OPERATIONS = _chunk33AQCUGMcjs.OPERATIONS; exports.Page = _chunk33AQCUGMcjs.Page; exports.ReconnectPolicy = _chunk33AQCUGMcjs.ReconnectPolicy; exports.Region = _chunk33AQCUGMcjs.Region; exports.RetryPolicy = _chunk33AQCUGMcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunk33AQCUGMcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunk33AQCUGMcjs.SNAPSHOT_EVENTS; exports.STX = _chunk33AQCUGMcjs.STX; exports.STXAPIException = _chunk33AQCUGMcjs.STXAPIException; exports.STXAuthenticationException = _chunk33AQCUGMcjs.STXAuthenticationException; exports.STXChannelException = _chunk33AQCUGMcjs.STXChannelException; exports.STXConfigException = _chunk33AQCUGMcjs.STXConfigException; exports.STXException = _chunk33AQCUGMcjs.STXException; exports.STXForbiddenException = _chunk33AQCUGMcjs.STXForbiddenException; exports.STXGeoLocationException = _chunk33AQCUGMcjs.STXGeoLocationException; exports.STXInsufficientScopeException = _chunk33AQCUGMcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunk33AQCUGMcjs.STXInvalidTokenException; exports.STXNotFoundException = _chunk33AQCUGMcjs.STXNotFoundException; exports.STXRateLimitException = _chunk33AQCUGMcjs.STXRateLimitException; exports.STXRejectedException = _chunk33AQCUGMcjs.STXRejectedException; exports.STXServerException = _chunk33AQCUGMcjs.STXServerException; exports.STXTimeoutException = _chunk33AQCUGMcjs.STXTimeoutException; exports.STXTransportException = _chunk33AQCUGMcjs.STXTransportException; exports.STXValidationException = _chunk33AQCUGMcjs.STXValidationException; exports.STXWebSocket = _chunk33AQCUGMcjs.STXWebSocket; exports.Stats = _chunk33AQCUGMcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunk33AQCUGMcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunk33AQCUGMcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunk33AQCUGMcjs.USER_AGENT; exports.VERSION = _chunk33AQCUGMcjs.VERSION; exports.baseUrlFor = _chunk33AQCUGMcjs.baseUrlFor; exports.buildMessage = _chunk33AQCUGMcjs.buildMessage; exports.centsToDollars = _chunk33AQCUGMcjs.centsToDollars; exports.convertBook = _chunk33AQCUGMcjs.convertBook; exports.convertMarketChannelPayload = _chunk33AQCUGMcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunk33AQCUGMcjs.convertMarketPayload; exports.convertMarketsFrame = _chunk33AQCUGMcjs.convertMarketsFrame; exports.environmentNamed = _chunk33AQCUGMcjs.environmentNamed; exports.errorForStatus = _chunk33AQCUGMcjs.errorForStatus; exports.geoRejection = _chunk33AQCUGMcjs.geoRejection; exports.handshakePath = _chunk33AQCUGMcjs.handshakePath; exports.isValidLine = _chunk33AQCUGMcjs.isValidLine; exports.loadPrivateKey = _chunk33AQCUGMcjs.loadPrivateKey; exports.orderBody = _chunk33AQCUGMcjs.orderBody; exports.requestPath = _chunk33AQCUGMcjs.requestPath; exports.resolveHost = _chunk33AQCUGMcjs.resolveHost; exports.resolveSettings = _chunk33AQCUGMcjs.resolveSettings; exports.signerFromPrivateKey = _chunk33AQCUGMcjs.signerFromPrivateKey; exports.socketUrlFor = _chunk33AQCUGMcjs.socketUrlFor; exports.toDollarString = _chunk33AQCUGMcjs.toDollarString; exports.toQuantity = _chunk33AQCUGMcjs.toQuantity;
127
127
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Channel, l as ChannelMessage, m as CreateMarketResult, n as CreateMarketsOptions, E as Environment, o as Environments, p as Error, q as Event, r as EventPlayer, s as EventPlayers, t as EventStat, u as EventTeam, v as EventsQuery, F as FeeTransaction, w as FetchLike, x as Fill, y as FillsQuery, G as GeoCheckResult, z as GeoLocationProvider, D as GeoOption, H as GeoRejection, I as HOSTS, K as KEY_HEADER, J as KnownStat, L as Leaderboard, M as LeaderboardEntry, N as LeaderboardStanding, O as Logger, P as MAX_MARKETS_PER_REQUEST, Q as Market, R as MarketFilter, S as MarketRejectionReason, T as MarketRequestEcho, U as MarketStat, V as MarketStatsQuery, W as MarketsQuery, X as Me, Y as MessageHandler, Z as NO_RETRY, _ as NewMarketInput, $ as NewOrder, a0 as NewOrderInput, a1 as OPERATIONS, a2 as Operation, a3 as OperationId, a4 as Order, a5 as OrderOptions, a6 as OrdersQuery, a7 as Page, a8 as PageQuery, a9 as PaymentTransaction, aa as Position, ab as PrivateKeyInput, ac as ProfileUpdate, ad as RecentTrade, ae as ReconnectPolicy, af as ReconnectPolicyOptions, ag as Region, ah as ResponseEvent, ai as RetryPolicy, aj as RetryPolicyOptions, ak as SIGNATURE_HEADER, al as SNAPSHOT_EVENTS, am as STX, an as STXAPIException, ao as STXAuthenticationException, ap as STXChannelException, aq as STXConfigException, ar as STXEnvironment, as as STXException, at as STXForbiddenException, au as STXGeoLocationException, av as STXInsufficientScopeException, aw as STXInvalidTokenException, ax as STXNotFoundException, ay as STXOptions, az as STXRateLimitException, aA as STXRejectedException, aB as STXServerException, aC as STXTimeoutException, aD as STXTransportException, aE as STXValidationException, aF as STXWebSocket, aG as STXWebSocketOptions, aH as Settlement, aI as SettlementsQuery, aJ as Signer, aK as Stat, aL as StatDetail, aM as Stats, aN as StrList, aO as TERMINAL_ORDER_STATUSES, aP as TIMESTAMP_HEADER, aQ as Transaction, aR as USER_AGENT, aS as VERSION, aT as WebSocketAuthContext, aU as baseUrlFor, aV as buildMessage, aW as environmentNamed, aX as errorForStatus, aY as geoRejection, aZ as handshakePath, a_ as isValidLine, a$ as loadPrivateKey, b0 as models, b1 as orderBody, b2 as requestPath, b3 as resolveHost, b4 as signerFromPrivateKey, b5 as socketUrlFor } from './client-E5Lg6k8d.cjs';
1
+ export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Channel, l as ChannelMessage, m as CreatableMarketType, n as CreateMarketResult, o as CreateMarketsOptions, E as Environment, p as Environments, q as Error, r as Event, s as EventPlayer, t as EventPlayers, u as EventStat, v as EventTeam, w as EventsQuery, F as FeeTransaction, x as FetchLike, y as Fill, z as FillsQuery, G as GeoCheckResult, D as GeoLocationProvider, H as GeoOption, I as GeoRejection, J as HOSTS, K as KEY_HEADER, L as KnownStat, M as Leaderboard, N as LeaderboardEntry, O as LeaderboardStanding, P as ListedMarketType, Q as Logger, R as MAX_MARKETS_PER_REQUEST, S as Market, T as MarketFilter, U as MarketRejectionReason, V as MarketRule, W as MarketStat, X as MarketStatsQuery, Y as MarketType, Z as MarketTypeEventType, _ as MarketTypeField, $ as MarketTypes, a0 as MarketsQuery, a1 as Me, a2 as MessageHandler, a3 as NO_RETRY, a4 as NewMarket, a5 as NewOrder, a6 as NewOrderInput, a7 as OPERATIONS, a8 as Operation, a9 as OperationId, aa as Order, ab as OrderOptions, ac as OrdersQuery, ad as Page, ae as PageQuery, af as PaymentTransaction, ag as PlayerStatLineMarket, ah as Position, ai as PrivateKeyInput, aj as ProfileUpdate, ak as RecentTrade, al as ReconnectPolicy, am as ReconnectPolicyOptions, an as Region, ao as ResponseEvent, ap as RetryPolicy, aq as RetryPolicyOptions, ar as SIGNATURE_HEADER, as as SNAPSHOT_EVENTS, at as STX, au as STXAPIException, av as STXAuthenticationException, aw as STXChannelException, ax as STXConfigException, ay as STXEnvironment, az as STXException, aA as STXForbiddenException, aB as STXGeoLocationException, aC as STXInsufficientScopeException, aD as STXInvalidTokenException, aE as STXNotFoundException, aF as STXOptions, aG as STXRateLimitException, aH as STXRejectedException, aI as STXServerException, aJ as STXTimeoutException, aK as STXTransportException, aL as STXValidationException, aM as STXWebSocket, aN as STXWebSocketOptions, aO as Settlement, aP as SettlementsQuery, aQ as Signer, aR as Stat, aS as StatDetail, aT as Stats, aU as StrList, aV as TERMINAL_ORDER_STATUSES, aW as TIMESTAMP_HEADER, aX as Transaction, aY as USER_AGENT, aZ as VERSION, a_ as WebSocketAuthContext, a$ as baseUrlFor, b0 as buildMessage, b1 as environmentNamed, b2 as errorForStatus, b3 as geoRejection, b4 as handshakePath, b5 as isValidLine, b6 as loadPrivateKey, b7 as models, b8 as orderBody, b9 as requestPath, ba as resolveHost, bb as signerFromPrivateKey, bc as socketUrlFor } from './client-CNkaTuhG.cjs';
2
2
  import 'node:crypto';
3
3
 
4
4
  /** The fully resolved configuration the clients consume. */
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Channel, l as ChannelMessage, m as CreateMarketResult, n as CreateMarketsOptions, E as Environment, o as Environments, p as Error, q as Event, r as EventPlayer, s as EventPlayers, t as EventStat, u as EventTeam, v as EventsQuery, F as FeeTransaction, w as FetchLike, x as Fill, y as FillsQuery, G as GeoCheckResult, z as GeoLocationProvider, D as GeoOption, H as GeoRejection, I as HOSTS, K as KEY_HEADER, J as KnownStat, L as Leaderboard, M as LeaderboardEntry, N as LeaderboardStanding, O as Logger, P as MAX_MARKETS_PER_REQUEST, Q as Market, R as MarketFilter, S as MarketRejectionReason, T as MarketRequestEcho, U as MarketStat, V as MarketStatsQuery, W as MarketsQuery, X as Me, Y as MessageHandler, Z as NO_RETRY, _ as NewMarketInput, $ as NewOrder, a0 as NewOrderInput, a1 as OPERATIONS, a2 as Operation, a3 as OperationId, a4 as Order, a5 as OrderOptions, a6 as OrdersQuery, a7 as Page, a8 as PageQuery, a9 as PaymentTransaction, aa as Position, ab as PrivateKeyInput, ac as ProfileUpdate, ad as RecentTrade, ae as ReconnectPolicy, af as ReconnectPolicyOptions, ag as Region, ah as ResponseEvent, ai as RetryPolicy, aj as RetryPolicyOptions, ak as SIGNATURE_HEADER, al as SNAPSHOT_EVENTS, am as STX, an as STXAPIException, ao as STXAuthenticationException, ap as STXChannelException, aq as STXConfigException, ar as STXEnvironment, as as STXException, at as STXForbiddenException, au as STXGeoLocationException, av as STXInsufficientScopeException, aw as STXInvalidTokenException, ax as STXNotFoundException, ay as STXOptions, az as STXRateLimitException, aA as STXRejectedException, aB as STXServerException, aC as STXTimeoutException, aD as STXTransportException, aE as STXValidationException, aF as STXWebSocket, aG as STXWebSocketOptions, aH as Settlement, aI as SettlementsQuery, aJ as Signer, aK as Stat, aL as StatDetail, aM as Stats, aN as StrList, aO as TERMINAL_ORDER_STATUSES, aP as TIMESTAMP_HEADER, aQ as Transaction, aR as USER_AGENT, aS as VERSION, aT as WebSocketAuthContext, aU as baseUrlFor, aV as buildMessage, aW as environmentNamed, aX as errorForStatus, aY as geoRejection, aZ as handshakePath, a_ as isValidLine, a$ as loadPrivateKey, b0 as models, b1 as orderBody, b2 as requestPath, b3 as resolveHost, b4 as signerFromPrivateKey, b5 as socketUrlFor } from './client-E5Lg6k8d.js';
1
+ export { A as AcceptTermsOptions, a as AccountChange, b as AccountChangeKind, c as AccountState, d as AccountView, e as AccountViewOptions, f as ApiKeyCredentials, g as AuthProvider, h as AuthRequest, B as Balance, i as BatchOrderResult, j as BookLevel, C as Cancellation, k as Channel, l as ChannelMessage, m as CreatableMarketType, n as CreateMarketResult, o as CreateMarketsOptions, E as Environment, p as Environments, q as Error, r as Event, s as EventPlayer, t as EventPlayers, u as EventStat, v as EventTeam, w as EventsQuery, F as FeeTransaction, x as FetchLike, y as Fill, z as FillsQuery, G as GeoCheckResult, D as GeoLocationProvider, H as GeoOption, I as GeoRejection, J as HOSTS, K as KEY_HEADER, L as KnownStat, M as Leaderboard, N as LeaderboardEntry, O as LeaderboardStanding, P as ListedMarketType, Q as Logger, R as MAX_MARKETS_PER_REQUEST, S as Market, T as MarketFilter, U as MarketRejectionReason, V as MarketRule, W as MarketStat, X as MarketStatsQuery, Y as MarketType, Z as MarketTypeEventType, _ as MarketTypeField, $ as MarketTypes, a0 as MarketsQuery, a1 as Me, a2 as MessageHandler, a3 as NO_RETRY, a4 as NewMarket, a5 as NewOrder, a6 as NewOrderInput, a7 as OPERATIONS, a8 as Operation, a9 as OperationId, aa as Order, ab as OrderOptions, ac as OrdersQuery, ad as Page, ae as PageQuery, af as PaymentTransaction, ag as PlayerStatLineMarket, ah as Position, ai as PrivateKeyInput, aj as ProfileUpdate, ak as RecentTrade, al as ReconnectPolicy, am as ReconnectPolicyOptions, an as Region, ao as ResponseEvent, ap as RetryPolicy, aq as RetryPolicyOptions, ar as SIGNATURE_HEADER, as as SNAPSHOT_EVENTS, at as STX, au as STXAPIException, av as STXAuthenticationException, aw as STXChannelException, ax as STXConfigException, ay as STXEnvironment, az as STXException, aA as STXForbiddenException, aB as STXGeoLocationException, aC as STXInsufficientScopeException, aD as STXInvalidTokenException, aE as STXNotFoundException, aF as STXOptions, aG as STXRateLimitException, aH as STXRejectedException, aI as STXServerException, aJ as STXTimeoutException, aK as STXTransportException, aL as STXValidationException, aM as STXWebSocket, aN as STXWebSocketOptions, aO as Settlement, aP as SettlementsQuery, aQ as Signer, aR as Stat, aS as StatDetail, aT as Stats, aU as StrList, aV as TERMINAL_ORDER_STATUSES, aW as TIMESTAMP_HEADER, aX as Transaction, aY as USER_AGENT, aZ as VERSION, a_ as WebSocketAuthContext, a$ as baseUrlFor, b0 as buildMessage, b1 as environmentNamed, b2 as errorForStatus, b3 as geoRejection, b4 as handshakePath, b5 as isValidLine, b6 as loadPrivateKey, b7 as models, b8 as orderBody, b9 as requestPath, ba as resolveHost, bb as signerFromPrivateKey, bc as socketUrlFor } from './client-CNkaTuhG.js';
2
2
  import 'node:crypto';
3
3
 
4
4
  /** The fully resolved configuration the clients consume. */
package/dist/index.js CHANGED
@@ -60,7 +60,7 @@ import {
60
60
  socketUrlFor,
61
61
  toDollarString,
62
62
  toQuantity
63
- } from "./chunk-H7XZDE2U.js";
63
+ } from "./chunk-4CSBA2YV.js";
64
64
  export {
65
65
  AccountView,
66
66
  ApiKeyCredentials,