@stxapp/stx-typescript 0.11.0 → 0.12.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.
@@ -3322,8 +3322,8 @@ declare class ApiKeyCredentials implements AuthProvider {
3322
3322
  toString(): string;
3323
3323
  }
3324
3324
 
3325
- declare const VERSION = "0.11.0";
3326
- declare const USER_AGENT = "stx-typescript/0.11.0";
3325
+ declare const VERSION = "0.12.1";
3326
+ declare const USER_AGENT = "stx-typescript/0.12.1";
3327
3327
  /**
3328
3328
  * `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
3329
3329
  * `await using client = new STX()` works there; a registered stand-in on
@@ -4376,7 +4376,7 @@ declare class STX {
4376
4376
  get host(): string;
4377
4377
  /**
4378
4378
  * Which features this exchange has, from what it publishes: its OAuth
4379
- * discovery document, `/api_version`, a signed GET of the routes that not
4379
+ * discovery document, a signed GET of the routes that not
4380
4380
  * every exchange has yet, and a join of a combos topic nobody owns. Nothing
4381
4381
  * is created or changed. Checked once per client and cached; pass
4382
4382
  * `{ refresh: true }` to check again.
@@ -4478,10 +4478,11 @@ declare class STX {
4478
4478
  * comes back `accepted` (or `delayed` in play); follow it on the `orders`
4479
4479
  * channel or with `order()` to see it `filled` or `cancelled`.
4480
4480
  *
4481
- * Before sending either mode, the client checks once that the exchange offers
4482
- * it (`GET /api_version`, cached) and throws `STXNotAvailableException`
4483
- * (`orders.post_only`, `orders.fill_or_kill`) without sending the order when
4484
- * it does not. A combination market throws `STXFillModeNotAllowedException`.
4481
+ * The exchange decides whether it takes either mode. Where a mode is not
4482
+ * enabled it rejects the order and this throws `STXNotAvailableException`
4483
+ * (`orders.post_only`, `orders.fill_or_kill`). An exchange on a release from
4484
+ * before fill modes places the order as a normal limit order. A combination
4485
+ * market throws `STXFillModeNotAllowedException`.
4485
4486
  *
4486
4487
  * The exchange validates the order: a bad price step or a fractional
4487
4488
  * quantity throws `STXValidationException` (400) or `STXRejectedException`
@@ -4499,9 +4500,8 @@ declare class STX {
4499
4500
  * matched comes back as its order, `cancelled` with `cancellation_reason`
4500
4501
  * `auto_matching`.
4501
4502
  *
4502
- * When any order has a `fillMode` other than `"normal"`, the exchange is
4503
- * checked first as in `placeOrder()`, and `STXNotAvailableException` is
4504
- * thrown with nothing sent.
4503
+ * When the exchange rejects the call because a `fillMode` is not enabled
4504
+ * there, this throws `STXNotAvailableException`, as `placeOrder()` does.
4505
4505
  */
4506
4506
  placeOrders(orders: readonly NewOrderInput[]): Promise<BatchOrderResult[]>;
4507
4507
  /**
@@ -3322,8 +3322,8 @@ declare class ApiKeyCredentials implements AuthProvider {
3322
3322
  toString(): string;
3323
3323
  }
3324
3324
 
3325
- declare const VERSION = "0.11.0";
3326
- declare const USER_AGENT = "stx-typescript/0.11.0";
3325
+ declare const VERSION = "0.12.1";
3326
+ declare const USER_AGENT = "stx-typescript/0.12.1";
3327
3327
  /**
3328
3328
  * `Symbol.asyncDispose` where the runtime has it (Node 20+, Bun), so
3329
3329
  * `await using client = new STX()` works there; a registered stand-in on
@@ -4376,7 +4376,7 @@ declare class STX {
4376
4376
  get host(): string;
4377
4377
  /**
4378
4378
  * Which features this exchange has, from what it publishes: its OAuth
4379
- * discovery document, `/api_version`, a signed GET of the routes that not
4379
+ * discovery document, a signed GET of the routes that not
4380
4380
  * every exchange has yet, and a join of a combos topic nobody owns. Nothing
4381
4381
  * is created or changed. Checked once per client and cached; pass
4382
4382
  * `{ refresh: true }` to check again.
@@ -4478,10 +4478,11 @@ declare class STX {
4478
4478
  * comes back `accepted` (or `delayed` in play); follow it on the `orders`
4479
4479
  * channel or with `order()` to see it `filled` or `cancelled`.
4480
4480
  *
4481
- * Before sending either mode, the client checks once that the exchange offers
4482
- * it (`GET /api_version`, cached) and throws `STXNotAvailableException`
4483
- * (`orders.post_only`, `orders.fill_or_kill`) without sending the order when
4484
- * it does not. A combination market throws `STXFillModeNotAllowedException`.
4481
+ * The exchange decides whether it takes either mode. Where a mode is not
4482
+ * enabled it rejects the order and this throws `STXNotAvailableException`
4483
+ * (`orders.post_only`, `orders.fill_or_kill`). An exchange on a release from
4484
+ * before fill modes places the order as a normal limit order. A combination
4485
+ * market throws `STXFillModeNotAllowedException`.
4485
4486
  *
4486
4487
  * The exchange validates the order: a bad price step or a fractional
4487
4488
  * quantity throws `STXValidationException` (400) or `STXRejectedException`
@@ -4499,9 +4500,8 @@ declare class STX {
4499
4500
  * matched comes back as its order, `cancelled` with `cancellation_reason`
4500
4501
  * `auto_matching`.
4501
4502
  *
4502
- * When any order has a `fillMode` other than `"normal"`, the exchange is
4503
- * checked first as in `placeOrder()`, and `STXNotAvailableException` is
4504
- * thrown with nothing sent.
4503
+ * When the exchange rejects the call because a `fillMode` is not enabled
4504
+ * there, this throws `STXNotAvailableException`, as `placeOrder()` does.
4505
4505
  */
4506
4506
  placeOrders(orders: readonly NewOrderInput[]): Promise<BatchOrderResult[]>;
4507
4507
  /**
package/dist/index.cjs CHANGED
@@ -74,7 +74,7 @@
74
74
 
75
75
 
76
76
 
77
- var _chunkBSX65XEAcjs = require('./chunk-BSX65XEA.cjs');
77
+ var _chunkWTKAZNEPcjs = require('./chunk-WTKAZNEP.cjs');
78
78
 
79
79
 
80
80
 
@@ -151,5 +151,5 @@ var _chunkBSX65XEAcjs = require('./chunk-BSX65XEA.cjs');
151
151
 
152
152
 
153
153
 
154
- exports.AccountView = _chunkBSX65XEAcjs.AccountView; exports.ApiKeyCredentials = _chunkBSX65XEAcjs.ApiKeyCredentials; exports.Capabilities = _chunkBSX65XEAcjs.Capabilities; exports.Channel = _chunkBSX65XEAcjs.Channel; exports.ChannelMessage = _chunkBSX65XEAcjs.ChannelMessage; exports.ComboMaker = _chunkBSX65XEAcjs.ComboMaker; exports.ComboPlayer = _chunkBSX65XEAcjs.ComboPlayer; exports.Environment = _chunkBSX65XEAcjs.Environment; exports.Environments = _chunkBSX65XEAcjs.Environments; exports.FEATURES = _chunkBSX65XEAcjs.FEATURES; exports.HOSTS = _chunkBSX65XEAcjs.HOSTS; exports.KEY_HEADER = _chunkBSX65XEAcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunkBSX65XEAcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunkBSX65XEAcjs.NO_RETRY; exports.OPERATIONS = _chunkBSX65XEAcjs.OPERATIONS; exports.Page = _chunkBSX65XEAcjs.Page; exports.ReconnectPolicy = _chunkBSX65XEAcjs.ReconnectPolicy; exports.Region = _chunkBSX65XEAcjs.Region; exports.RetryPolicy = _chunkBSX65XEAcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunkBSX65XEAcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunkBSX65XEAcjs.SNAPSHOT_EVENTS; exports.STX = _chunkBSX65XEAcjs.STX; exports.STXAPIException = _chunkBSX65XEAcjs.STXAPIException; exports.STXAuthenticationException = _chunkBSX65XEAcjs.STXAuthenticationException; exports.STXBlockedException = _chunkBSX65XEAcjs.STXBlockedException; exports.STXChannelException = _chunkBSX65XEAcjs.STXChannelException; exports.STXComboPriceMovedException = _chunkBSX65XEAcjs.STXComboPriceMovedException; exports.STXComboRefusedException = _chunkBSX65XEAcjs.STXComboRefusedException; exports.STXCombosUnavailableException = _chunkBSX65XEAcjs.STXCombosUnavailableException; exports.STXConfigException = _chunkBSX65XEAcjs.STXConfigException; exports.STXException = _chunkBSX65XEAcjs.STXException; exports.STXFillModeNotAllowedException = _chunkBSX65XEAcjs.STXFillModeNotAllowedException; exports.STXForbiddenException = _chunkBSX65XEAcjs.STXForbiddenException; exports.STXIPNotAllowedException = _chunkBSX65XEAcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunkBSX65XEAcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkBSX65XEAcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunkBSX65XEAcjs.STXNotAvailableException; exports.STXNotFoundException = _chunkBSX65XEAcjs.STXNotFoundException; exports.STXPostOnlyWouldMatchException = _chunkBSX65XEAcjs.STXPostOnlyWouldMatchException; exports.STXRateLimitException = _chunkBSX65XEAcjs.STXRateLimitException; exports.STXRejectedException = _chunkBSX65XEAcjs.STXRejectedException; exports.STXRestrictedJurisdictionException = _chunkBSX65XEAcjs.STXRestrictedJurisdictionException; exports.STXServerException = _chunkBSX65XEAcjs.STXServerException; exports.STXTermsRequiredException = _chunkBSX65XEAcjs.STXTermsRequiredException; exports.STXTimeoutException = _chunkBSX65XEAcjs.STXTimeoutException; exports.STXTransportException = _chunkBSX65XEAcjs.STXTransportException; exports.STXUnusualNetworkException = _chunkBSX65XEAcjs.STXUnusualNetworkException; exports.STXValidationException = _chunkBSX65XEAcjs.STXValidationException; exports.STXWebSocket = _chunkBSX65XEAcjs.STXWebSocket; exports.Stats = _chunkBSX65XEAcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunkBSX65XEAcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunkBSX65XEAcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunkBSX65XEAcjs.USER_AGENT; exports.VERSION = _chunkBSX65XEAcjs.VERSION; exports.baseUrlFor = _chunkBSX65XEAcjs.baseUrlFor; exports.buildMessage = _chunkBSX65XEAcjs.buildMessage; exports.centsToDollars = _chunkBSX65XEAcjs.centsToDollars; exports.convertBook = _chunkBSX65XEAcjs.convertBook; exports.convertMarketChannelPayload = _chunkBSX65XEAcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunkBSX65XEAcjs.convertMarketPayload; exports.convertMarketsFrame = _chunkBSX65XEAcjs.convertMarketsFrame; exports.environmentNamed = _chunkBSX65XEAcjs.environmentNamed; exports.errorForStatus = _chunkBSX65XEAcjs.errorForStatus; exports.handshakePath = _chunkBSX65XEAcjs.handshakePath; exports.isValidLine = _chunkBSX65XEAcjs.isValidLine; exports.loadPrivateKey = _chunkBSX65XEAcjs.loadPrivateKey; exports.notAvailableMessage = _chunkBSX65XEAcjs.notAvailableMessage; exports.orderBody = _chunkBSX65XEAcjs.orderBody; exports.requestPath = _chunkBSX65XEAcjs.requestPath; exports.resolveHost = _chunkBSX65XEAcjs.resolveHost; exports.resolveSettings = _chunkBSX65XEAcjs.resolveSettings; exports.signerFromPrivateKey = _chunkBSX65XEAcjs.signerFromPrivateKey; exports.socketUrlFor = _chunkBSX65XEAcjs.socketUrlFor; exports.toDollarString = _chunkBSX65XEAcjs.toDollarString; exports.toQuantity = _chunkBSX65XEAcjs.toQuantity;
154
+ exports.AccountView = _chunkWTKAZNEPcjs.AccountView; exports.ApiKeyCredentials = _chunkWTKAZNEPcjs.ApiKeyCredentials; exports.Capabilities = _chunkWTKAZNEPcjs.Capabilities; exports.Channel = _chunkWTKAZNEPcjs.Channel; exports.ChannelMessage = _chunkWTKAZNEPcjs.ChannelMessage; exports.ComboMaker = _chunkWTKAZNEPcjs.ComboMaker; exports.ComboPlayer = _chunkWTKAZNEPcjs.ComboPlayer; exports.Environment = _chunkWTKAZNEPcjs.Environment; exports.Environments = _chunkWTKAZNEPcjs.Environments; exports.FEATURES = _chunkWTKAZNEPcjs.FEATURES; exports.HOSTS = _chunkWTKAZNEPcjs.HOSTS; exports.KEY_HEADER = _chunkWTKAZNEPcjs.KEY_HEADER; exports.MAX_MARKETS_PER_REQUEST = _chunkWTKAZNEPcjs.MAX_MARKETS_PER_REQUEST; exports.NO_RETRY = _chunkWTKAZNEPcjs.NO_RETRY; exports.OPERATIONS = _chunkWTKAZNEPcjs.OPERATIONS; exports.Page = _chunkWTKAZNEPcjs.Page; exports.ReconnectPolicy = _chunkWTKAZNEPcjs.ReconnectPolicy; exports.Region = _chunkWTKAZNEPcjs.Region; exports.RetryPolicy = _chunkWTKAZNEPcjs.RetryPolicy; exports.SIGNATURE_HEADER = _chunkWTKAZNEPcjs.SIGNATURE_HEADER; exports.SNAPSHOT_EVENTS = _chunkWTKAZNEPcjs.SNAPSHOT_EVENTS; exports.STX = _chunkWTKAZNEPcjs.STX; exports.STXAPIException = _chunkWTKAZNEPcjs.STXAPIException; exports.STXAuthenticationException = _chunkWTKAZNEPcjs.STXAuthenticationException; exports.STXBlockedException = _chunkWTKAZNEPcjs.STXBlockedException; exports.STXChannelException = _chunkWTKAZNEPcjs.STXChannelException; exports.STXComboPriceMovedException = _chunkWTKAZNEPcjs.STXComboPriceMovedException; exports.STXComboRefusedException = _chunkWTKAZNEPcjs.STXComboRefusedException; exports.STXCombosUnavailableException = _chunkWTKAZNEPcjs.STXCombosUnavailableException; exports.STXConfigException = _chunkWTKAZNEPcjs.STXConfigException; exports.STXException = _chunkWTKAZNEPcjs.STXException; exports.STXFillModeNotAllowedException = _chunkWTKAZNEPcjs.STXFillModeNotAllowedException; exports.STXForbiddenException = _chunkWTKAZNEPcjs.STXForbiddenException; exports.STXIPNotAllowedException = _chunkWTKAZNEPcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunkWTKAZNEPcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkWTKAZNEPcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunkWTKAZNEPcjs.STXNotAvailableException; exports.STXNotFoundException = _chunkWTKAZNEPcjs.STXNotFoundException; exports.STXPostOnlyWouldMatchException = _chunkWTKAZNEPcjs.STXPostOnlyWouldMatchException; exports.STXRateLimitException = _chunkWTKAZNEPcjs.STXRateLimitException; exports.STXRejectedException = _chunkWTKAZNEPcjs.STXRejectedException; exports.STXRestrictedJurisdictionException = _chunkWTKAZNEPcjs.STXRestrictedJurisdictionException; exports.STXServerException = _chunkWTKAZNEPcjs.STXServerException; exports.STXTermsRequiredException = _chunkWTKAZNEPcjs.STXTermsRequiredException; exports.STXTimeoutException = _chunkWTKAZNEPcjs.STXTimeoutException; exports.STXTransportException = _chunkWTKAZNEPcjs.STXTransportException; exports.STXUnusualNetworkException = _chunkWTKAZNEPcjs.STXUnusualNetworkException; exports.STXValidationException = _chunkWTKAZNEPcjs.STXValidationException; exports.STXWebSocket = _chunkWTKAZNEPcjs.STXWebSocket; exports.Stats = _chunkWTKAZNEPcjs.Stats; exports.TERMINAL_ORDER_STATUSES = _chunkWTKAZNEPcjs.TERMINAL_ORDER_STATUSES; exports.TIMESTAMP_HEADER = _chunkWTKAZNEPcjs.TIMESTAMP_HEADER; exports.USER_AGENT = _chunkWTKAZNEPcjs.USER_AGENT; exports.VERSION = _chunkWTKAZNEPcjs.VERSION; exports.baseUrlFor = _chunkWTKAZNEPcjs.baseUrlFor; exports.buildMessage = _chunkWTKAZNEPcjs.buildMessage; exports.centsToDollars = _chunkWTKAZNEPcjs.centsToDollars; exports.convertBook = _chunkWTKAZNEPcjs.convertBook; exports.convertMarketChannelPayload = _chunkWTKAZNEPcjs.convertMarketChannelPayload; exports.convertMarketPayload = _chunkWTKAZNEPcjs.convertMarketPayload; exports.convertMarketsFrame = _chunkWTKAZNEPcjs.convertMarketsFrame; exports.environmentNamed = _chunkWTKAZNEPcjs.environmentNamed; exports.errorForStatus = _chunkWTKAZNEPcjs.errorForStatus; exports.handshakePath = _chunkWTKAZNEPcjs.handshakePath; exports.isValidLine = _chunkWTKAZNEPcjs.isValidLine; exports.loadPrivateKey = _chunkWTKAZNEPcjs.loadPrivateKey; exports.notAvailableMessage = _chunkWTKAZNEPcjs.notAvailableMessage; exports.orderBody = _chunkWTKAZNEPcjs.orderBody; exports.requestPath = _chunkWTKAZNEPcjs.requestPath; exports.resolveHost = _chunkWTKAZNEPcjs.resolveHost; exports.resolveSettings = _chunkWTKAZNEPcjs.resolveSettings; exports.signerFromPrivateKey = _chunkWTKAZNEPcjs.signerFromPrivateKey; exports.socketUrlFor = _chunkWTKAZNEPcjs.socketUrlFor; exports.toDollarString = _chunkWTKAZNEPcjs.toDollarString; exports.toQuantity = _chunkWTKAZNEPcjs.toQuantity;
155
155
  //# 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 Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-DxY8eJ58.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 Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-CjXFrcQR.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 Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-DxY8eJ58.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 Capabilities, l as Channel, m as ChannelMessage, n as ComboBestQuote, o as ComboBestQuoteEvent, p as ComboCancelReply, q as ComboCashOutReply, r as ComboJoinOptions, s as ComboJoinReply, t as ComboLeg, u as ComboMaker, v as ComboMakerEvent, w as ComboMakerPlacedEvent, x as ComboOutcome, y as ComboPlacedEvent, z as ComboPlacement, D as ComboPlayer, E as ComboPlayerEvent, F as ComboQuoteAcceptedEvent, G as ComboQuoteClosedEvent, H as ComboQuoteClosedReason, I as ComboQuoteReply, J as ComboRefusalReason, K as ComboRequestClosedEvent, L as ComboRequestClosedReason, M as ComboRequestReply, N as ComboRfqClosedEvent, O as ComboRfqClosedReason, P as ComboRfqLeg, Q as ComboRfqOpenedEvent, R as ComboSnapshot, S as ComboWithdrawReply, T as CreatableMarketType, U as CreateMarketResult, V as CreateMarketsOptions, W as Environment, X as Environments, Y as Error, Z as Event, _ as EventPlayer, $ as EventPlayers, a0 as EventStat, a1 as EventTeam, a2 as EventsQuery, a3 as FEATURES, a4 as Feature, a5 as FeatureMap, a6 as FeeTransaction, a7 as FetchLike, a8 as Fill, a9 as FillMode, aa as FillsQuery, ab as ForbiddenError, ac as HOSTS, ad as KEY_HEADER, ae as KnownStat, af as Leaderboard, ag as LeaderboardEntry, ah as LeaderboardQuery, ai as LeaderboardStanding, aj as ListedMarketType, ak as Logger, al as MAX_MARKETS_PER_REQUEST, am as Market, an as MarketFilter, ao as MarketRejectionReason, ap as MarketRequestEcho, aq as MarketRule, ar as MarketStat, as as MarketStatsQuery, at as MarketType, au as MarketTypeEventType, av as MarketTypeField, aw as MarketTypes, ax as MarketsQuery, ay as Me, az as MessageHandler, aA as NO_RETRY, aB as NewMarket, aC as NewMarketInput, aD as NewOrder, aE as NewOrderInput, aF as OPERATIONS, aG as Operation, aH as OperationId, aI as Order, aJ as OrderOptions, aK as OrdersQuery, aL as Page, aM as PageQuery, aN as PaymentTransaction, aO as PlayerStatLineMarket, aP as Position, aQ as PoweredBy, aR as PrivateKeyInput, aS as ProfileUpdate, aT as RecentTrade, aU as ReconnectPolicy, aV as ReconnectPolicyOptions, aW as Region, aX as ResponseEvent, aY as RetryPolicy, aZ as RetryPolicyOptions, a_ as SIGNATURE_HEADER, a$ as SNAPSHOT_EVENTS, b0 as STX, b1 as STXAPIException, b2 as STXAuthenticationException, b3 as STXBlockedException, b4 as STXChannelException, b5 as STXComboPriceMovedException, b6 as STXComboRefusedException, b7 as STXCombosUnavailableException, b8 as STXConfigException, b9 as STXEnvironment, ba as STXException, bb as STXFillModeNotAllowedException, bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bh as STXNotFoundException, bi as STXOptions, bj as STXPostOnlyWouldMatchException, bk as STXRateLimitException, bl as STXRejectedException, bm as STXRestrictedJurisdictionException, bn as STXServerException, bo as STXTermsRequiredException, bp as STXTimeoutException, bq as STXTransportException, br as STXUnusualNetworkException, bs as STXValidationException, bt as STXWebSocket, bu as STXWebSocketOptions, bv as Settlement, bw as SettlementsQuery, bx as Signer, by as Stat, bz as StatDetail, bA as Stats, bB as StrList, bC as TERMINAL_ORDER_STATUSES, bD as TIMESTAMP_HEADER, bE as Transaction, bF as USER_AGENT, bG as VERSION, bH as WebSocketAuthContext, bI as baseUrlFor, bJ as buildMessage, bK as environmentNamed, bL as errorForStatus, bM as handshakePath, bN as isValidLine, bO as loadPrivateKey, bP as models, bQ as notAvailableMessage, bR as orderBody, bS as requestPath, bT as resolveHost, bU as signerFromPrivateKey, bV as socketUrlFor } from './client-CjXFrcQR.js';
2
2
  import 'node:crypto';
3
3
 
4
4
  /** The fully resolved configuration the clients consume. */
package/dist/index.js CHANGED
@@ -74,7 +74,7 @@ import {
74
74
  socketUrlFor,
75
75
  toDollarString,
76
76
  toQuantity
77
- } from "./chunk-2PYJI3JS.js";
77
+ } from "./chunk-NYUIPUZH.js";
78
78
  export {
79
79
  AccountView,
80
80
  ApiKeyCredentials,
package/dist/oauth.cjs CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkBSX65XEAcjs = require('./chunk-BSX65XEA.cjs');
14
+ var _chunkWTKAZNEPcjs = require('./chunk-WTKAZNEP.cjs');
15
15
 
16
16
  // src/oauth/endpoints.ts
17
17
  var DEFAULT_ENDPOINTS = {
@@ -28,12 +28,12 @@ var WELL_KNOWN = {
28
28
  function resolveOAuthConfig(input) {
29
29
  const env = _nullishCoalesce(_optionalChain([globalThis, 'access', _ => _.process, 'optionalAccess', _2 => _2.env]), () => ( {}));
30
30
  const host = _nullishCoalesce(_nullishCoalesce(input.baseUrl, () => ( env.STX_HOST)), () => ( env.STX_BASE_URL));
31
- if (!host) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("An OAuth base URL is required. Pass { baseUrl } or set STX_HOST.");
31
+ if (!host) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("An OAuth base URL is required. Pass { baseUrl } or set STX_HOST.");
32
32
  const fetchImpl = _nullishCoalesce(input.fetch, () => ( globalThis.fetch));
33
33
  if (typeof fetchImpl !== "function") {
34
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)("No fetch implementation available. Use Node 18+, or pass { fetch }.");
34
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("No fetch implementation available. Use Node 18+, or pass { fetch }.");
35
35
  }
36
- return { baseUrl: _chunkBSX65XEAcjs.baseUrlFor.call(void 0, null, null, host), fetch: fetchImpl };
36
+ return { baseUrl: _chunkWTKAZNEPcjs.baseUrlFor.call(void 0, null, null, host), fetch: fetchImpl };
37
37
  }
38
38
  function joinUrl(baseUrl, path) {
39
39
  if (/^https?:\/\//i.test(path)) return path;
@@ -41,7 +41,7 @@ function joinUrl(baseUrl, path) {
41
41
  }
42
42
 
43
43
  // src/oauth/errors.ts
44
- var STXOAuthException = class extends _chunkBSX65XEAcjs.STXAuthenticationException {
44
+ var STXOAuthException = class extends _chunkWTKAZNEPcjs.STXAuthenticationException {
45
45
  /** The RFC error code: `invalid_client`, `invalid_grant`, `invalid_scope`, ... */
46
46
 
47
47
 
@@ -82,7 +82,7 @@ function callbackError(error, errorDescription, endpoint) {
82
82
  const Class = error === "account_pending" ? STXAccountPendingException : error === "terms_required" ? STXTermsNotAcceptedException : error === "access_denied" ? STXAccessDeniedException : STXOAuthException;
83
83
  return new Class(error, errorDescription, 400, endpoint);
84
84
  }
85
- var STXGrantRevokedException = class extends _chunkBSX65XEAcjs.STXAuthenticationException {
85
+ var STXGrantRevokedException = class extends _chunkWTKAZNEPcjs.STXAuthenticationException {
86
86
  constructor(message = "OAuth grant revoked: the member must re-authorize.") {
87
87
  super(message, { statusCode: 400 });
88
88
  }
@@ -120,8 +120,8 @@ async function fetchWellKnown(baseUrl, path, opts) {
120
120
  headers: { Accept: "application/json" }
121
121
  });
122
122
  const text = await res.text();
123
- if (res.status === 404 || _chunkBSX65XEAcjs.isEdgeBlock.call(void 0, res.status, text)) {
124
- throw new (0, _chunkBSX65XEAcjs.STXNotAvailableException)("oauth", new URL(cfg.baseUrl).host, {
123
+ if (res.status === 404 || _chunkWTKAZNEPcjs.isEdgeBlock.call(void 0, res.status, text)) {
124
+ throw new (0, _chunkWTKAZNEPcjs.STXNotAvailableException)("oauth", new URL(cfg.baseUrl).host, {
125
125
  statusCode: res.status,
126
126
  body: text,
127
127
  method: "GET",
@@ -136,7 +136,7 @@ async function fetchWellKnown(baseUrl, path, opts) {
136
136
  }
137
137
  }
138
138
  function httpError(status, text, path) {
139
- return new (0, _chunkBSX65XEAcjs.STXAPIException)(`HTTP ${status} from ${path}: ${text.slice(0, 500)}`, {
139
+ return new (0, _chunkWTKAZNEPcjs.STXAPIException)(`HTTP ${status} from ${path}: ${text.slice(0, 500)}`, {
140
140
  statusCode: status,
141
141
  body: text,
142
142
  path
@@ -224,7 +224,7 @@ function rfcError(text) {
224
224
  }
225
225
  }
226
226
  function httpError2(status, text, path) {
227
- return new (0, _chunkBSX65XEAcjs.STXAPIException)(`HTTP ${status} from ${path}: ${text.slice(0, 500)}`, {
227
+ return new (0, _chunkWTKAZNEPcjs.STXAPIException)(`HTTP ${status} from ${path}: ${text.slice(0, 500)}`, {
228
228
  statusCode: status,
229
229
  body: text,
230
230
  path
@@ -402,7 +402,7 @@ var OAuthClient = (_class = class _OAuthClient {
402
402
  */
403
403
  async beginAuthorization(pending, params = {}) {
404
404
  const redirectUri = _nullishCoalesce(params.redirectUri, () => ( this.redirectUri));
405
- if (!redirectUri) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("redirectUri is required to build an authorize URL.");
405
+ if (!redirectUri) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("redirectUri is required to build an authorize URL.");
406
406
  const auth = await this.authorizationUrl({ ...params, redirectUri });
407
407
  await pending.put(auth.state, {
408
408
  codeVerifier: auth.codeVerifier,
@@ -448,12 +448,12 @@ var OAuthClient = (_class = class _OAuthClient {
448
448
  if (!offered || !requested) return void 0;
449
449
  const missing = parseScopes(requested).find((s) => !offered.includes(s));
450
450
  if (!missing) return void 0;
451
- return new (0, _chunkBSX65XEAcjs.STXNotAvailableException)(`scope:${missing}`, this.host, { statusCode: 400, cause });
451
+ return new (0, _chunkWTKAZNEPcjs.STXNotAvailableException)(`scope:${missing}`, this.host, { statusCode: 400, cause });
452
452
  }
453
453
  /** `STXNotAvailableException` (feature `oauth`) for an OAuth endpoint the exchange does not have. */
454
454
  oauthMissing(status, text, endpoint) {
455
- if (status !== 404 && !_chunkBSX65XEAcjs.isEdgeBlock.call(void 0, status, text)) return void 0;
456
- return new (0, _chunkBSX65XEAcjs.STXNotAvailableException)("oauth", this.host, {
455
+ if (status !== 404 && !_chunkWTKAZNEPcjs.isEdgeBlock.call(void 0, status, text)) return void 0;
456
+ return new (0, _chunkWTKAZNEPcjs.STXNotAvailableException)("oauth", this.host, {
457
457
  statusCode: status,
458
458
  body: text,
459
459
  method: "POST",
@@ -475,7 +475,7 @@ var OAuthClient = (_class = class _OAuthClient {
475
475
  let memberKey;
476
476
  if (opts.store) {
477
477
  memberKey = typeof opts.memberKey === "function" ? opts.memberKey(entry.data) : opts.memberKey;
478
- if (!memberKey) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("Pass memberKey along with store.");
478
+ if (!memberKey) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("Pass memberKey along with store.");
479
479
  await opts.store.set(memberKey, tokenSetToStored(tokens));
480
480
  }
481
481
  return { tokens, scopes: parseScopes(tokens.scope), data: entry.data, memberKey };
@@ -484,7 +484,7 @@ var OAuthClient = (_class = class _OAuthClient {
484
484
  buildAuthorizeUrl(params) {
485
485
  const redirectUri = _nullishCoalesce(params.redirectUri, () => ( this.redirectUri));
486
486
  if (!redirectUri) {
487
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)("redirectUri is required to build an authorize URL.");
487
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("redirectUri is required to build an authorize URL.");
488
488
  }
489
489
  const url = new URL(joinUrl(this.baseUrl, this.endpoints.authorize));
490
490
  const search = {
@@ -506,7 +506,7 @@ var OAuthClient = (_class = class _OAuthClient {
506
506
  exchangeCode(args) {
507
507
  const redirectUri = _nullishCoalesce(args.redirectUri, () => ( this.redirectUri));
508
508
  if (!redirectUri) {
509
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)("redirectUri is required to exchange a code.");
509
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("redirectUri is required to exchange a code.");
510
510
  }
511
511
  return this.postToken(
512
512
  new URLSearchParams({
@@ -550,7 +550,7 @@ var OAuthClient = (_class = class _OAuthClient {
550
550
  */
551
551
  clientCredentials(scope) {
552
552
  if (this.isPublic) {
553
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)(
553
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)(
554
554
  "client_credentials needs a client secret; a public client cannot mint an app token."
555
555
  );
556
556
  }
@@ -659,7 +659,7 @@ var OAuthClient = (_class = class _OAuthClient {
659
659
  */
660
660
  memberClient(store, memberKey, opts = {}) {
661
661
  const { session, ...rest } = opts;
662
- return new (0, _chunkBSX65XEAcjs.STX)({
662
+ return new (0, _chunkWTKAZNEPcjs.STX)({
663
663
  ...rest,
664
664
  host: this.baseUrl,
665
665
  fetch: _nullishCoalesce(rest.fetch, () => ( this.fetch)),
@@ -672,7 +672,7 @@ var OAuthClient = (_class = class _OAuthClient {
672
672
  * market channels. Scope defaults to every app scope the client may hold.
673
673
  */
674
674
  appClient(scope, opts = {}) {
675
- return new (0, _chunkBSX65XEAcjs.STX)({ ...opts, host: this.baseUrl, fetch: _nullishCoalesce(opts.fetch, () => ( this.fetch)), auth: this.app(scope) });
675
+ return new (0, _chunkWTKAZNEPcjs.STX)({ ...opts, host: this.baseUrl, fetch: _nullishCoalesce(opts.fetch, () => ( this.fetch)), auth: this.app(scope) });
676
676
  }
677
677
  /** @internal The in-flight refresh map for one store; see `OAuthSessionAuth`. */
678
678
  _refreshesFor(store) {
@@ -880,7 +880,7 @@ var OAuthSessionAuth = (_class4 = class {
880
880
  async tokens() {
881
881
  let tokens = await this.load();
882
882
  if (!tokens) {
883
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)(`No tokens stored for member "${this.memberKey}". Complete the OAuth flow first.`);
883
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)(`No tokens stored for member "${this.memberKey}". Complete the OAuth flow first.`);
884
884
  }
885
885
  if (tokens.refreshToken && tokens.expiresAt !== void 0 && tokens.expiresAt - Date.now() <= this.skewMs) {
886
886
  const refreshed = await this.refresh(tokens.refreshToken);
@@ -1050,13 +1050,13 @@ function termsUrlWithReturn(termsUrl, returnTo) {
1050
1050
 
1051
1051
  // src/oauth/connect.ts
1052
1052
  function createConnect(opts) {
1053
- if (!opts.issuer) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("issuer is required.");
1054
- if (!opts.clientId || !opts.clientSecret) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("clientId and clientSecret are required.");
1055
- if (!opts.redirectUri) throw new (0, _chunkBSX65XEAcjs.STXConfigException)("redirectUri is required.");
1053
+ if (!opts.issuer) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("issuer is required.");
1054
+ if (!opts.clientId || !opts.clientSecret) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("clientId and clientSecret are required.");
1055
+ if (!opts.redirectUri) throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("redirectUri is required.");
1056
1056
  const issuer = opts.issuer.replace(/\/+$/, "");
1057
1057
  const fetchImpl = _nullishCoalesce(opts.fetch, () => ( globalThis.fetch));
1058
1058
  if (typeof fetchImpl !== "function") {
1059
- throw new (0, _chunkBSX65XEAcjs.STXConfigException)("No fetch implementation available. Use Node 18+, or pass { fetch }.");
1059
+ throw new (0, _chunkWTKAZNEPcjs.STXConfigException)("No fetch implementation available. Use Node 18+, or pass { fetch }.");
1060
1060
  }
1061
1061
  const skew = _nullishCoalesce(opts.clockSkewSeconds, () => ( 60));
1062
1062
  let config;
@@ -1195,8 +1195,8 @@ function createConnect(opts) {
1195
1195
  headers: { Accept: "application/json", Authorization: `Bearer ${accessToken}` }
1196
1196
  });
1197
1197
  const text = await res.text();
1198
- if (res.status === 404 || _chunkBSX65XEAcjs.isEdgeBlock.call(void 0, res.status, text)) {
1199
- throw new (0, _chunkBSX65XEAcjs.STXNotAvailableException)("connect", new URL(endpoint).host, {
1198
+ if (res.status === 404 || _chunkWTKAZNEPcjs.isEdgeBlock.call(void 0, res.status, text)) {
1199
+ throw new (0, _chunkWTKAZNEPcjs.STXNotAvailableException)("connect", new URL(endpoint).host, {
1200
1200
  statusCode: res.status,
1201
1201
  body: text,
1202
1202
  method: "GET",
@@ -1262,8 +1262,8 @@ function withOpenId(scopes) {
1262
1262
  async function fetchJson(fetchImpl, url, feature) {
1263
1263
  const res = await fetchImpl(url, { method: "GET", headers: { Accept: "application/json" } });
1264
1264
  const text = await res.text();
1265
- if (feature && (res.status === 404 || _chunkBSX65XEAcjs.isEdgeBlock.call(void 0, res.status, text))) {
1266
- throw new (0, _chunkBSX65XEAcjs.STXNotAvailableException)(feature, new URL(url).host, {
1265
+ if (feature && (res.status === 404 || _chunkWTKAZNEPcjs.isEdgeBlock.call(void 0, res.status, text))) {
1266
+ throw new (0, _chunkWTKAZNEPcjs.STXNotAvailableException)(feature, new URL(url).host, {
1267
1267
  statusCode: res.status,
1268
1268
  body: text,
1269
1269
  method: "GET",
@@ -1437,5 +1437,5 @@ var MemoryPendingAuthorizationStore = (_class7 = class {constructor() { _class7.
1437
1437
 
1438
1438
 
1439
1439
 
1440
- exports.ALL_APP_SCOPES = ALL_APP_SCOPES; exports.ALL_MEMBER_SCOPES = ALL_MEMBER_SCOPES; exports.AppScopes = AppScopes; exports.AppTokenProvider = AppTokenProvider; exports.DEFAULT_ENDPOINTS = DEFAULT_ENDPOINTS; exports.LEGACY_SCOPES = LEGACY_SCOPES; exports.MemberScopes = MemberScopes; exports.MemoryPendingAuthorizationStore = MemoryPendingAuthorizationStore; exports.MemoryTokenStore = MemoryTokenStore; exports.OAuthAppAuth = OAuthAppAuth; exports.OAuthBearerAuth = OAuthBearerAuth; exports.OAuthClient = OAuthClient; exports.OAuthSessionAuth = OAuthSessionAuth; exports.STXAccessDeniedException = STXAccessDeniedException; exports.STXAccountPendingException = STXAccountPendingException; exports.STXAuthenticationException = _chunkBSX65XEAcjs.STXAuthenticationException; exports.STXForbiddenException = _chunkBSX65XEAcjs.STXForbiddenException; exports.STXGrantRevokedException = STXGrantRevokedException; exports.STXIPNotAllowedException = _chunkBSX65XEAcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunkBSX65XEAcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkBSX65XEAcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunkBSX65XEAcjs.STXNotAvailableException; exports.STXOAuthException = STXOAuthException; exports.STXTermsNotAcceptedException = STXTermsNotAcceptedException; exports.STXTermsRequiredException = _chunkBSX65XEAcjs.STXTermsRequiredException; exports.Scopes = Scopes; exports.WELL_KNOWN = WELL_KNOWN; exports.base64url = base64url; exports.canonicalScope = canonicalScope; exports.codeChallengeS256 = codeChallengeS256; exports.createConnect = createConnect; exports.createPkce = createPkce; exports.discoverMetadata = discoverMetadata; exports.discoverProtectedResource = discoverProtectedResource; exports.formatScopes = formatScopes; exports.generateCodeVerifier = generateCodeVerifier; exports.generateState = generateState; exports.isAppScope = isAppScope; exports.isMemberScope = isMemberScope; exports.joinUrl = joinUrl; exports.parseScopes = parseScopes; exports.parseTokenResponse = parseTokenResponse; exports.readCallback = readCallback; exports.registerClient = registerClient; exports.rfcError = rfcError; exports.termsUrlWithReturn = termsUrlWithReturn; exports.tokenSetToStored = tokenSetToStored;
1440
+ exports.ALL_APP_SCOPES = ALL_APP_SCOPES; exports.ALL_MEMBER_SCOPES = ALL_MEMBER_SCOPES; exports.AppScopes = AppScopes; exports.AppTokenProvider = AppTokenProvider; exports.DEFAULT_ENDPOINTS = DEFAULT_ENDPOINTS; exports.LEGACY_SCOPES = LEGACY_SCOPES; exports.MemberScopes = MemberScopes; exports.MemoryPendingAuthorizationStore = MemoryPendingAuthorizationStore; exports.MemoryTokenStore = MemoryTokenStore; exports.OAuthAppAuth = OAuthAppAuth; exports.OAuthBearerAuth = OAuthBearerAuth; exports.OAuthClient = OAuthClient; exports.OAuthSessionAuth = OAuthSessionAuth; exports.STXAccessDeniedException = STXAccessDeniedException; exports.STXAccountPendingException = STXAccountPendingException; exports.STXAuthenticationException = _chunkWTKAZNEPcjs.STXAuthenticationException; exports.STXForbiddenException = _chunkWTKAZNEPcjs.STXForbiddenException; exports.STXGrantRevokedException = STXGrantRevokedException; exports.STXIPNotAllowedException = _chunkWTKAZNEPcjs.STXIPNotAllowedException; exports.STXInsufficientScopeException = _chunkWTKAZNEPcjs.STXInsufficientScopeException; exports.STXInvalidTokenException = _chunkWTKAZNEPcjs.STXInvalidTokenException; exports.STXNotAvailableException = _chunkWTKAZNEPcjs.STXNotAvailableException; exports.STXOAuthException = STXOAuthException; exports.STXTermsNotAcceptedException = STXTermsNotAcceptedException; exports.STXTermsRequiredException = _chunkWTKAZNEPcjs.STXTermsRequiredException; exports.Scopes = Scopes; exports.WELL_KNOWN = WELL_KNOWN; exports.base64url = base64url; exports.canonicalScope = canonicalScope; exports.codeChallengeS256 = codeChallengeS256; exports.createConnect = createConnect; exports.createPkce = createPkce; exports.discoverMetadata = discoverMetadata; exports.discoverProtectedResource = discoverProtectedResource; exports.formatScopes = formatScopes; exports.generateCodeVerifier = generateCodeVerifier; exports.generateState = generateState; exports.isAppScope = isAppScope; exports.isMemberScope = isMemberScope; exports.joinUrl = joinUrl; exports.parseScopes = parseScopes; exports.parseTokenResponse = parseTokenResponse; exports.readCallback = readCallback; exports.registerClient = registerClient; exports.rfcError = rfcError; exports.termsUrlWithReturn = termsUrlWithReturn; exports.tokenSetToStored = tokenSetToStored;
1441
1441
  //# sourceMappingURL=oauth.cjs.map
package/dist/oauth.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { b2 as STXAuthenticationException, g as AuthProvider, h as AuthRequest, bH as WebSocketAuthContext, bi as STXOptions, b0 as STX } from './client-DxY8eJ58.cjs';
2
- export { bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bo as STXTermsRequiredException } from './client-DxY8eJ58.cjs';
1
+ import { b2 as STXAuthenticationException, g as AuthProvider, h as AuthRequest, bH as WebSocketAuthContext, bi as STXOptions, b0 as STX } from './client-CjXFrcQR.cjs';
2
+ export { bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bo as STXTermsRequiredException } from './client-CjXFrcQR.cjs';
3
3
  import 'node:crypto';
4
4
 
5
5
  interface OAuthEndpoints$1 {
package/dist/oauth.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { b2 as STXAuthenticationException, g as AuthProvider, h as AuthRequest, bH as WebSocketAuthContext, bi as STXOptions, b0 as STX } from './client-DxY8eJ58.js';
2
- export { bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bo as STXTermsRequiredException } from './client-DxY8eJ58.js';
1
+ import { b2 as STXAuthenticationException, g as AuthProvider, h as AuthRequest, bH as WebSocketAuthContext, bi as STXOptions, b0 as STX } from './client-CjXFrcQR.js';
2
+ export { bc as STXForbiddenException, bd as STXIPNotAllowedException, be as STXInsufficientScopeException, bf as STXInvalidTokenException, bg as STXNotAvailableException, bo as STXTermsRequiredException } from './client-CjXFrcQR.js';
3
3
  import 'node:crypto';
4
4
 
5
5
  interface OAuthEndpoints$1 {
package/dist/oauth.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  STXTermsRequiredException,
12
12
  baseUrlFor,
13
13
  isEdgeBlock
14
- } from "./chunk-2PYJI3JS.js";
14
+ } from "./chunk-NYUIPUZH.js";
15
15
 
16
16
  // src/oauth/endpoints.ts
17
17
  var DEFAULT_ENDPOINTS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stxapp/stx-typescript",
3
- "version": "0.11.0",
3
+ "version": "0.12.1",
4
4
  "description": "The TypeScript SDK for the STX exchange: markets, trading, your account and live WebSocket channels, with API-key signing and typed responses.",
5
5
  "type": "module",
6
6
  "license": "MIT",