@predictasiax/api 2.2.0 → 2.5.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.
package/dist/index.d.cts CHANGED
@@ -593,9 +593,11 @@ declare class AccountResource extends Resource {
593
593
  * GET /v1/audit/proof/{seq} getProof(seq)
594
594
  * GET /v1/audit/anchor/{num} getAnchor(num)
595
595
  *
596
- * v2.2+ — Polymarket has no equivalent surface. Merkle algo is OpenZeppelin
597
- * sorted-pair sha256, so Solidity `MerkleProof.verify` can verify proofs
598
- * on-chain without changes.
596
+ * v2.2+ — Public Merkle audit chain surface. Algorithm is sorted-pair SHA-256
597
+ * over the raw 32-byte digests (OpenZeppelin-style pair ordering, hashed with
598
+ * SHA-256 — NOT keccak256). On-chain, verify with a SHA-256 sorted-pair verifier
599
+ * (e.g. sha256(abi.encodePacked(a, b))); stock OZ `MerkleProof.verify` hashes
600
+ * with keccak256 and will not match these roots.
599
601
  */
600
602
 
601
603
  interface AuditStatus {
@@ -659,10 +661,9 @@ declare class AuditResource extends Resource {
659
661
  getProof(seq: number, opts?: RequestOptions): APIPromise<MerkleProof>;
660
662
  getAnchor(batchNum: number, opts?: RequestOptions): APIPromise<AuditBatch>;
661
663
  /**
662
- * Verify a Merkle inclusion proof locally (client-side). Mirrors
663
- * OpenZeppelin's sorted-pair sha256 algorithm — identical logic to the
664
- * server-side batcher, so callers can independently confirm inclusion
665
- * without trusting the API response.
664
+ * Verify a Merkle inclusion proof locally (client-side). Sorted-pair SHA-256
665
+ * over the raw 32-byte digests — identical logic to the server-side batcher,
666
+ * so callers can independently confirm inclusion without trusting the API.
666
667
  */
667
668
  static verifyProof(leaf: string, root: string, proof: string[]): boolean;
668
669
  /** Async variant using WebCrypto — works in browsers, Deno, Bun, edge runtimes. */
@@ -674,7 +675,7 @@ declare class AuditResource extends Resource {
674
675
  *
675
676
  * GET /v1/fees/estimate estimate()
676
677
  *
677
- * v2.1+ — Polymarket has no equivalent. Returns identical shape to the `fee`
678
+ * v2.1+ — Exposes the 5-actor split before order placement (matches the
678
679
  * block on post-trade responses (same 5-actor `splits` + `attribution` +
679
680
  * `breakdown` + `ledger_preview`). Powered server-side by `lib/fiveActorFees`
680
681
  * so env-tunable bps flow through automatically without SDK bumps.
@@ -999,6 +1000,48 @@ declare class ApplyResource extends Resource {
999
1000
  declare class SandboxResource extends Resource {
1000
1001
  }
1001
1002
 
1003
+ /**
1004
+ * Settle resource — claim accrued fee revenue (v2.4+).
1005
+ *
1006
+ * Three surfaces:
1007
+ * - `me()` — builder self-serve claim of their own execution +
1008
+ * acquisition builder fees. Uses api-key auth.
1009
+ * - `adminBuilder()` — admin claim of a specific builder's accrued fees.
1010
+ * Requires X-Admin-Key header.
1011
+ * - `adminCreator()` — admin claim of a market creator's FEE_MARKET_CREATOR
1012
+ * fees. Requires X-Admin-Key header.
1013
+ *
1014
+ * All three insert a `withdrawal_state` row with the appropriate source tag
1015
+ * and mark the underlying `financial_event` rows settled. The existing
1016
+ * withdrawal pipeline delivers USDT to the provided address.
1017
+ */
1018
+ interface SettleParams {
1019
+ address: string;
1020
+ asset?: string;
1021
+ network?: string;
1022
+ min_amount?: number;
1023
+ }
1024
+ interface SettleResult {
1025
+ withdrawal_state_id: string;
1026
+ user_id: string;
1027
+ asset: string;
1028
+ amount: number;
1029
+ event_count: number;
1030
+ network: string;
1031
+ address: string;
1032
+ status: string;
1033
+ note?: string;
1034
+ }
1035
+ declare class SettleResource extends Resource {
1036
+ /** Builder self-serve settle — POST /v1/builders/me/settle. */
1037
+ me(params: SettleParams, opts?: RequestOptions): APIPromise<SettleResult>;
1038
+ /** Admin settle a specific builder's fees — POST /v1/admin/builders/{userId}/settle.
1039
+ * Requires X-Admin-Key header. */
1040
+ adminBuilder(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
1041
+ /** Admin settle a market creator's fees — POST /v1/admin/creators/{userId}/settle. */
1042
+ adminCreator(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
1043
+ }
1044
+
1002
1045
  /**
1003
1046
  * Templates resource — parameterized market blueprints.
1004
1047
  *
@@ -1064,6 +1107,7 @@ declare class PaxClient {
1064
1107
  readonly grants: GrantsResource;
1065
1108
  readonly fees: FeesResource;
1066
1109
  readonly audit: AuditResource;
1110
+ readonly settle: SettleResource;
1067
1111
  constructor(opts: PaxClientOptions);
1068
1112
  get baseUrl(): string;
1069
1113
  get userAgent(): string;
@@ -1071,6 +1115,80 @@ declare class PaxClient {
1071
1115
  health(opts?: RequestOptions): APIPromise<HealthStatus>;
1072
1116
  }
1073
1117
 
1118
+ /**
1119
+ * attach-ref.ts — Wave-2b (2026-09-08)
1120
+ *
1121
+ * Reads a builder referral code from the current URL's `?ref=` (or configured)
1122
+ * query parameter, persists it in cookie / localStorage / memory, and returns
1123
+ * a `defaultHeaders` object with `X-Builder-Ref` set. The returned headers
1124
+ * are meant to be spread into `PaxClient` construction via `defaultHeaders`
1125
+ * OR into a per-request `RequestOptions.headers`.
1126
+ *
1127
+ * Backend behavior: `POST /v1/orders` reads the `X-Builder-Ref` header and,
1128
+ * IF the acting user has no existing acquisition attribution, sets it once
1129
+ * (sticky, never overwrites — same semantics as signup `?ref=`). Response
1130
+ * echoes `attribution.ref_applied` for confirmation.
1131
+ *
1132
+ * @example
1133
+ * import { PaxClient, attachRef } from "@predictasiax/api";
1134
+ *
1135
+ * const { headers, ref } = attachRef({ storage: "localStorage" });
1136
+ * const pax = new PaxClient({ apiKey: "sk_live_...", defaultHeaders: headers });
1137
+ * // From now on every request carries X-Builder-Ref: <ref>.
1138
+ *
1139
+ * @example
1140
+ * // Manual override — server-side or when URL parsing not available:
1141
+ * const { headers } = attachRef({ ref: "BLD_kol_alpha" });
1142
+ */
1143
+ interface AttachRefOptions {
1144
+ /** URL query param name to read the ref from. Default: "ref". */
1145
+ queryParam?: string;
1146
+ /** Explicit ref value (skips URL parsing entirely). */
1147
+ ref?: string;
1148
+ /** Where to persist the ref for cross-request continuity. */
1149
+ storage?: "cookie" | "localStorage" | "memory";
1150
+ /** Cookie / localStorage key. Default: "pax_builder_ref". */
1151
+ storageKey?: string;
1152
+ /** Cookie max-age in seconds. Default 90d. */
1153
+ cookieMaxAgeSec?: number;
1154
+ /** Cookie domain. Default: current host. */
1155
+ cookieDomain?: string;
1156
+ /** Optional pre-existing URL to parse instead of `window.location.href`. */
1157
+ url?: string;
1158
+ }
1159
+ interface AttachRefResult {
1160
+ /** The resolved ref value or null if none found. */
1161
+ ref: string | null;
1162
+ /**
1163
+ * Default headers ready to spread into PaxClient constructor
1164
+ * (`defaultHeaders`) or per-request `RequestOptions.headers`.
1165
+ * Empty object when ref is null.
1166
+ */
1167
+ headers: Record<string, string>;
1168
+ /** Whether the ref was persisted this call. */
1169
+ persisted: boolean;
1170
+ /** Source: "explicit" | "url" | "cookie" | "localStorage" | "memory" | "none". */
1171
+ source: string;
1172
+ }
1173
+ /**
1174
+ * Detect + persist a builder ref, then return headers ready for PaxClient.
1175
+ *
1176
+ * Precedence: explicit `ref` opt → URL `?ref=` → cookie → localStorage →
1177
+ * in-memory (this process) → none.
1178
+ *
1179
+ * When a fresh value is found in URL / explicit, it is persisted according
1180
+ * to `storage` (default `cookie` in the browser, `memory` server-side).
1181
+ */
1182
+ declare function attachRef(opts?: AttachRefOptions): AttachRefResult;
1183
+ /**
1184
+ * Explicit clear — removes the ref from all storages this SDK owns.
1185
+ * Useful on logout or user-initiated attribution reset.
1186
+ */
1187
+ declare function clearRef(opts?: {
1188
+ storageKey?: string;
1189
+ cookieDomain?: string;
1190
+ }): void;
1191
+
1074
1192
  /**
1075
1193
  * PaxWSClient — real-time market data + private events over WebSocket.
1076
1194
  *
@@ -1167,7 +1285,7 @@ declare class PaxWSClient {
1167
1285
  }
1168
1286
 
1169
1287
  /**
1170
- * HMAC signing helpers — Polymarket-compatible 5-header pattern.
1288
+ * HMAC signing helpers — 5-header pattern with PAX-ADDRESS, PAX-TIMESTAMP, PAX-NONCE, PAX-SIGNATURE plus Content-Type.
1171
1289
  *
1172
1290
  * Signature construction:
1173
1291
  * message = timestamp_ms + method_upper + path_with_query + body
@@ -1305,4 +1423,4 @@ declare function runWithRetry<T>(fn: () => Promise<T>, opts?: {
1305
1423
  onRetry?: (attempt: number, error: Error) => void;
1306
1424
  }): Promise<T>;
1307
1425
 
1308
- export { APIPromise, type APIResponseInfo, type Account, type AccountBalance, AccountResource, type ApiKey, type ApplicationResult, type ApplicationStatus, type ApplyCreateParams, ApplyResource, type AuditBatch, type AuditEvent, AuditResource, type AuditStatus, type BatchCancelResult, type BatchCancelResultItem, type BatchOrderResultItem, type BatchOrderSummary, type BatchOrdersResult, type Candle, type CandleInterval, type CandlesParams, type Category, type CreateKeyParams, type CreateMarketParams, CursorPage, type CursorPageInit, type CursorPageParams, type Decimal, type Env, type Envelope, type FeeEstimate, type FeeEstimateParams, FeesResource, type GrantClaimResult, type GrantEvent, type GrantEventType, type GrantPhase, type GrantTier, type GrantVesting, GrantsResource, type HealthStatus, type HmacHeaders, type HttpClientOptions, type KeyScope, KeysResource, type ListEnvelope, type ListMarketsParams, type ListOrdersParams, type ListTemplatesParams, type ListTradesParams, type Market, type MarketStatus, type MarketTemplate, type MarketTradesParams, type MarketType, MarketsResource, type MerkleProof, type Order, type OrderStatus, type OrderType, type Orderbook, type OrderbookLevel, type OrderbookParams, OrdersResource, type Outcome, PagePromise, PaxAuthError, PaxCircuitBreakerError, PaxClient, type PaxClientOptions, PaxConflictError, PaxError, type PaxErrorDetails, type PaxErrorPayload, PaxNotFoundError, PaxRateLimitError, PaxReadOnlyModeError, PaxSandboxOnlyError, PaxServerError, PaxValidationError, PaxWSClient, type PaxWSClientOptions, PaxWrongEnvKeyError, type PlaceOrderParams, type Position, type RequestOptions, type ResponseMeta, type SandboxKeyMintParams, type SandboxKeyResult, SandboxKeysResource, SandboxResource, type Side, type SignInput, TemplatesResource, type Tier, type TierLimits, type TimeInForce, type TokenGrant, type Trade, VERSION, type WithResponseResult, type WsEvent, type WsHandler, buildError, buildMessage, computeBackoff, runWithRetry, signRequest };
1426
+ export { APIPromise, type APIResponseInfo, type Account, type AccountBalance, AccountResource, type ApiKey, type ApplicationResult, type ApplicationStatus, type ApplyCreateParams, ApplyResource, type AttachRefOptions, type AttachRefResult, type AuditBatch, type AuditEvent, AuditResource, type AuditStatus, type BatchCancelResult, type BatchCancelResultItem, type BatchOrderResultItem, type BatchOrderSummary, type BatchOrdersResult, type Candle, type CandleInterval, type CandlesParams, type Category, type CreateKeyParams, type CreateMarketParams, CursorPage, type CursorPageInit, type CursorPageParams, type Decimal, type Env, type Envelope, type FeeEstimate, type FeeEstimateParams, FeesResource, type GrantClaimResult, type GrantEvent, type GrantEventType, type GrantPhase, type GrantTier, type GrantVesting, GrantsResource, type HealthStatus, type HmacHeaders, type HttpClientOptions, type KeyScope, KeysResource, type ListEnvelope, type ListMarketsParams, type ListOrdersParams, type ListTemplatesParams, type ListTradesParams, type Market, type MarketStatus, type MarketTemplate, type MarketTradesParams, type MarketType, MarketsResource, type MerkleProof, type Order, type OrderStatus, type OrderType, type Orderbook, type OrderbookLevel, type OrderbookParams, OrdersResource, type Outcome, PagePromise, PaxAuthError, PaxCircuitBreakerError, PaxClient, type PaxClientOptions, PaxConflictError, PaxError, type PaxErrorDetails, type PaxErrorPayload, PaxNotFoundError, PaxRateLimitError, PaxReadOnlyModeError, PaxSandboxOnlyError, PaxServerError, PaxValidationError, PaxWSClient, type PaxWSClientOptions, PaxWrongEnvKeyError, type PlaceOrderParams, type Position, type RequestOptions, type ResponseMeta, type SandboxKeyMintParams, type SandboxKeyResult, SandboxKeysResource, SandboxResource, type Side, type SignInput, TemplatesResource, type Tier, type TierLimits, type TimeInForce, type TokenGrant, type Trade, VERSION, type WithResponseResult, type WsEvent, type WsHandler, attachRef, buildError, buildMessage, clearRef, computeBackoff, runWithRetry, signRequest };
package/dist/index.d.ts CHANGED
@@ -593,9 +593,11 @@ declare class AccountResource extends Resource {
593
593
  * GET /v1/audit/proof/{seq} getProof(seq)
594
594
  * GET /v1/audit/anchor/{num} getAnchor(num)
595
595
  *
596
- * v2.2+ — Polymarket has no equivalent surface. Merkle algo is OpenZeppelin
597
- * sorted-pair sha256, so Solidity `MerkleProof.verify` can verify proofs
598
- * on-chain without changes.
596
+ * v2.2+ — Public Merkle audit chain surface. Algorithm is sorted-pair SHA-256
597
+ * over the raw 32-byte digests (OpenZeppelin-style pair ordering, hashed with
598
+ * SHA-256 — NOT keccak256). On-chain, verify with a SHA-256 sorted-pair verifier
599
+ * (e.g. sha256(abi.encodePacked(a, b))); stock OZ `MerkleProof.verify` hashes
600
+ * with keccak256 and will not match these roots.
599
601
  */
600
602
 
601
603
  interface AuditStatus {
@@ -659,10 +661,9 @@ declare class AuditResource extends Resource {
659
661
  getProof(seq: number, opts?: RequestOptions): APIPromise<MerkleProof>;
660
662
  getAnchor(batchNum: number, opts?: RequestOptions): APIPromise<AuditBatch>;
661
663
  /**
662
- * Verify a Merkle inclusion proof locally (client-side). Mirrors
663
- * OpenZeppelin's sorted-pair sha256 algorithm — identical logic to the
664
- * server-side batcher, so callers can independently confirm inclusion
665
- * without trusting the API response.
664
+ * Verify a Merkle inclusion proof locally (client-side). Sorted-pair SHA-256
665
+ * over the raw 32-byte digests — identical logic to the server-side batcher,
666
+ * so callers can independently confirm inclusion without trusting the API.
666
667
  */
667
668
  static verifyProof(leaf: string, root: string, proof: string[]): boolean;
668
669
  /** Async variant using WebCrypto — works in browsers, Deno, Bun, edge runtimes. */
@@ -674,7 +675,7 @@ declare class AuditResource extends Resource {
674
675
  *
675
676
  * GET /v1/fees/estimate estimate()
676
677
  *
677
- * v2.1+ — Polymarket has no equivalent. Returns identical shape to the `fee`
678
+ * v2.1+ — Exposes the 5-actor split before order placement (matches the
678
679
  * block on post-trade responses (same 5-actor `splits` + `attribution` +
679
680
  * `breakdown` + `ledger_preview`). Powered server-side by `lib/fiveActorFees`
680
681
  * so env-tunable bps flow through automatically without SDK bumps.
@@ -999,6 +1000,48 @@ declare class ApplyResource extends Resource {
999
1000
  declare class SandboxResource extends Resource {
1000
1001
  }
1001
1002
 
1003
+ /**
1004
+ * Settle resource — claim accrued fee revenue (v2.4+).
1005
+ *
1006
+ * Three surfaces:
1007
+ * - `me()` — builder self-serve claim of their own execution +
1008
+ * acquisition builder fees. Uses api-key auth.
1009
+ * - `adminBuilder()` — admin claim of a specific builder's accrued fees.
1010
+ * Requires X-Admin-Key header.
1011
+ * - `adminCreator()` — admin claim of a market creator's FEE_MARKET_CREATOR
1012
+ * fees. Requires X-Admin-Key header.
1013
+ *
1014
+ * All three insert a `withdrawal_state` row with the appropriate source tag
1015
+ * and mark the underlying `financial_event` rows settled. The existing
1016
+ * withdrawal pipeline delivers USDT to the provided address.
1017
+ */
1018
+ interface SettleParams {
1019
+ address: string;
1020
+ asset?: string;
1021
+ network?: string;
1022
+ min_amount?: number;
1023
+ }
1024
+ interface SettleResult {
1025
+ withdrawal_state_id: string;
1026
+ user_id: string;
1027
+ asset: string;
1028
+ amount: number;
1029
+ event_count: number;
1030
+ network: string;
1031
+ address: string;
1032
+ status: string;
1033
+ note?: string;
1034
+ }
1035
+ declare class SettleResource extends Resource {
1036
+ /** Builder self-serve settle — POST /v1/builders/me/settle. */
1037
+ me(params: SettleParams, opts?: RequestOptions): APIPromise<SettleResult>;
1038
+ /** Admin settle a specific builder's fees — POST /v1/admin/builders/{userId}/settle.
1039
+ * Requires X-Admin-Key header. */
1040
+ adminBuilder(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
1041
+ /** Admin settle a market creator's fees — POST /v1/admin/creators/{userId}/settle. */
1042
+ adminCreator(userId: string, params: SettleParams, adminKey: string, opts?: RequestOptions): APIPromise<SettleResult>;
1043
+ }
1044
+
1002
1045
  /**
1003
1046
  * Templates resource — parameterized market blueprints.
1004
1047
  *
@@ -1064,6 +1107,7 @@ declare class PaxClient {
1064
1107
  readonly grants: GrantsResource;
1065
1108
  readonly fees: FeesResource;
1066
1109
  readonly audit: AuditResource;
1110
+ readonly settle: SettleResource;
1067
1111
  constructor(opts: PaxClientOptions);
1068
1112
  get baseUrl(): string;
1069
1113
  get userAgent(): string;
@@ -1071,6 +1115,80 @@ declare class PaxClient {
1071
1115
  health(opts?: RequestOptions): APIPromise<HealthStatus>;
1072
1116
  }
1073
1117
 
1118
+ /**
1119
+ * attach-ref.ts — Wave-2b (2026-09-08)
1120
+ *
1121
+ * Reads a builder referral code from the current URL's `?ref=` (or configured)
1122
+ * query parameter, persists it in cookie / localStorage / memory, and returns
1123
+ * a `defaultHeaders` object with `X-Builder-Ref` set. The returned headers
1124
+ * are meant to be spread into `PaxClient` construction via `defaultHeaders`
1125
+ * OR into a per-request `RequestOptions.headers`.
1126
+ *
1127
+ * Backend behavior: `POST /v1/orders` reads the `X-Builder-Ref` header and,
1128
+ * IF the acting user has no existing acquisition attribution, sets it once
1129
+ * (sticky, never overwrites — same semantics as signup `?ref=`). Response
1130
+ * echoes `attribution.ref_applied` for confirmation.
1131
+ *
1132
+ * @example
1133
+ * import { PaxClient, attachRef } from "@predictasiax/api";
1134
+ *
1135
+ * const { headers, ref } = attachRef({ storage: "localStorage" });
1136
+ * const pax = new PaxClient({ apiKey: "sk_live_...", defaultHeaders: headers });
1137
+ * // From now on every request carries X-Builder-Ref: <ref>.
1138
+ *
1139
+ * @example
1140
+ * // Manual override — server-side or when URL parsing not available:
1141
+ * const { headers } = attachRef({ ref: "BLD_kol_alpha" });
1142
+ */
1143
+ interface AttachRefOptions {
1144
+ /** URL query param name to read the ref from. Default: "ref". */
1145
+ queryParam?: string;
1146
+ /** Explicit ref value (skips URL parsing entirely). */
1147
+ ref?: string;
1148
+ /** Where to persist the ref for cross-request continuity. */
1149
+ storage?: "cookie" | "localStorage" | "memory";
1150
+ /** Cookie / localStorage key. Default: "pax_builder_ref". */
1151
+ storageKey?: string;
1152
+ /** Cookie max-age in seconds. Default 90d. */
1153
+ cookieMaxAgeSec?: number;
1154
+ /** Cookie domain. Default: current host. */
1155
+ cookieDomain?: string;
1156
+ /** Optional pre-existing URL to parse instead of `window.location.href`. */
1157
+ url?: string;
1158
+ }
1159
+ interface AttachRefResult {
1160
+ /** The resolved ref value or null if none found. */
1161
+ ref: string | null;
1162
+ /**
1163
+ * Default headers ready to spread into PaxClient constructor
1164
+ * (`defaultHeaders`) or per-request `RequestOptions.headers`.
1165
+ * Empty object when ref is null.
1166
+ */
1167
+ headers: Record<string, string>;
1168
+ /** Whether the ref was persisted this call. */
1169
+ persisted: boolean;
1170
+ /** Source: "explicit" | "url" | "cookie" | "localStorage" | "memory" | "none". */
1171
+ source: string;
1172
+ }
1173
+ /**
1174
+ * Detect + persist a builder ref, then return headers ready for PaxClient.
1175
+ *
1176
+ * Precedence: explicit `ref` opt → URL `?ref=` → cookie → localStorage →
1177
+ * in-memory (this process) → none.
1178
+ *
1179
+ * When a fresh value is found in URL / explicit, it is persisted according
1180
+ * to `storage` (default `cookie` in the browser, `memory` server-side).
1181
+ */
1182
+ declare function attachRef(opts?: AttachRefOptions): AttachRefResult;
1183
+ /**
1184
+ * Explicit clear — removes the ref from all storages this SDK owns.
1185
+ * Useful on logout or user-initiated attribution reset.
1186
+ */
1187
+ declare function clearRef(opts?: {
1188
+ storageKey?: string;
1189
+ cookieDomain?: string;
1190
+ }): void;
1191
+
1074
1192
  /**
1075
1193
  * PaxWSClient — real-time market data + private events over WebSocket.
1076
1194
  *
@@ -1167,7 +1285,7 @@ declare class PaxWSClient {
1167
1285
  }
1168
1286
 
1169
1287
  /**
1170
- * HMAC signing helpers — Polymarket-compatible 5-header pattern.
1288
+ * HMAC signing helpers — 5-header pattern with PAX-ADDRESS, PAX-TIMESTAMP, PAX-NONCE, PAX-SIGNATURE plus Content-Type.
1171
1289
  *
1172
1290
  * Signature construction:
1173
1291
  * message = timestamp_ms + method_upper + path_with_query + body
@@ -1305,4 +1423,4 @@ declare function runWithRetry<T>(fn: () => Promise<T>, opts?: {
1305
1423
  onRetry?: (attempt: number, error: Error) => void;
1306
1424
  }): Promise<T>;
1307
1425
 
1308
- export { APIPromise, type APIResponseInfo, type Account, type AccountBalance, AccountResource, type ApiKey, type ApplicationResult, type ApplicationStatus, type ApplyCreateParams, ApplyResource, type AuditBatch, type AuditEvent, AuditResource, type AuditStatus, type BatchCancelResult, type BatchCancelResultItem, type BatchOrderResultItem, type BatchOrderSummary, type BatchOrdersResult, type Candle, type CandleInterval, type CandlesParams, type Category, type CreateKeyParams, type CreateMarketParams, CursorPage, type CursorPageInit, type CursorPageParams, type Decimal, type Env, type Envelope, type FeeEstimate, type FeeEstimateParams, FeesResource, type GrantClaimResult, type GrantEvent, type GrantEventType, type GrantPhase, type GrantTier, type GrantVesting, GrantsResource, type HealthStatus, type HmacHeaders, type HttpClientOptions, type KeyScope, KeysResource, type ListEnvelope, type ListMarketsParams, type ListOrdersParams, type ListTemplatesParams, type ListTradesParams, type Market, type MarketStatus, type MarketTemplate, type MarketTradesParams, type MarketType, MarketsResource, type MerkleProof, type Order, type OrderStatus, type OrderType, type Orderbook, type OrderbookLevel, type OrderbookParams, OrdersResource, type Outcome, PagePromise, PaxAuthError, PaxCircuitBreakerError, PaxClient, type PaxClientOptions, PaxConflictError, PaxError, type PaxErrorDetails, type PaxErrorPayload, PaxNotFoundError, PaxRateLimitError, PaxReadOnlyModeError, PaxSandboxOnlyError, PaxServerError, PaxValidationError, PaxWSClient, type PaxWSClientOptions, PaxWrongEnvKeyError, type PlaceOrderParams, type Position, type RequestOptions, type ResponseMeta, type SandboxKeyMintParams, type SandboxKeyResult, SandboxKeysResource, SandboxResource, type Side, type SignInput, TemplatesResource, type Tier, type TierLimits, type TimeInForce, type TokenGrant, type Trade, VERSION, type WithResponseResult, type WsEvent, type WsHandler, buildError, buildMessage, computeBackoff, runWithRetry, signRequest };
1426
+ export { APIPromise, type APIResponseInfo, type Account, type AccountBalance, AccountResource, type ApiKey, type ApplicationResult, type ApplicationStatus, type ApplyCreateParams, ApplyResource, type AttachRefOptions, type AttachRefResult, type AuditBatch, type AuditEvent, AuditResource, type AuditStatus, type BatchCancelResult, type BatchCancelResultItem, type BatchOrderResultItem, type BatchOrderSummary, type BatchOrdersResult, type Candle, type CandleInterval, type CandlesParams, type Category, type CreateKeyParams, type CreateMarketParams, CursorPage, type CursorPageInit, type CursorPageParams, type Decimal, type Env, type Envelope, type FeeEstimate, type FeeEstimateParams, FeesResource, type GrantClaimResult, type GrantEvent, type GrantEventType, type GrantPhase, type GrantTier, type GrantVesting, GrantsResource, type HealthStatus, type HmacHeaders, type HttpClientOptions, type KeyScope, KeysResource, type ListEnvelope, type ListMarketsParams, type ListOrdersParams, type ListTemplatesParams, type ListTradesParams, type Market, type MarketStatus, type MarketTemplate, type MarketTradesParams, type MarketType, MarketsResource, type MerkleProof, type Order, type OrderStatus, type OrderType, type Orderbook, type OrderbookLevel, type OrderbookParams, OrdersResource, type Outcome, PagePromise, PaxAuthError, PaxCircuitBreakerError, PaxClient, type PaxClientOptions, PaxConflictError, PaxError, type PaxErrorDetails, type PaxErrorPayload, PaxNotFoundError, PaxRateLimitError, PaxReadOnlyModeError, PaxSandboxOnlyError, PaxServerError, PaxValidationError, PaxWSClient, type PaxWSClientOptions, PaxWrongEnvKeyError, type PlaceOrderParams, type Position, type RequestOptions, type ResponseMeta, type SandboxKeyMintParams, type SandboxKeyResult, SandboxKeysResource, SandboxResource, type Side, type SignInput, TemplatesResource, type Tier, type TierLimits, type TimeInForce, type TokenGrant, type Trade, VERSION, type WithResponseResult, type WsEvent, type WsHandler, attachRef, buildError, buildMessage, clearRef, computeBackoff, runWithRetry, signRequest };
package/dist/index.js CHANGED
Binary file