@agg-build/sdk 4.9.0 → 4.10.0

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.mts CHANGED
@@ -5,6 +5,7 @@ declare enum Venue {
5
5
  limitless = "limitless",
6
6
  opinion = "opinion",
7
7
  predict = "predict",
8
+ pred = "pred",
8
9
  probable = "probable",
9
10
  myriad = "myriad",
10
11
  hyperliquid = "hyperliquid",
@@ -12,7 +13,7 @@ declare enum Venue {
12
13
  prophetx = "prophetx"
13
14
  }
14
15
  /** Single source of truth for venue identifiers. */
15
- declare const VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
16
+ declare const VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.pred, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
16
17
  /** Canonical destination chain for venues with on-chain funding or settlement. */
17
18
  declare const VENUE_CHAIN_IDS: Partial<Record<Venue, number>>;
18
19
  /**
@@ -23,7 +24,7 @@ declare const VENUE_CHAIN_IDS: Partial<Record<Venue, number>>;
23
24
  * Re-activating a venue is therefore an intentional code change here rather
24
25
  * than a runtime configuration toggle.
25
26
  */
26
- declare const ACTIVE_VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
27
+ declare const ACTIVE_VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.pred, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
27
28
  /**
28
29
  * Venues excluded from new user-facing activity. The set is currently empty:
29
30
  * ProphetX has discovery, live books, and a sandbox clearinghouse execution
@@ -2930,6 +2931,7 @@ interface ExecuteManagedParams {
2930
2931
  approveMode?: "sponsored" | "user_broadcast";
2931
2932
  }
2932
2933
  interface ExecuteManagedResponse {
2934
+ alreadyAccepted?: boolean;
2933
2935
  quoteId: string;
2934
2936
  orderIds: string[];
2935
2937
  status: "pending";
@@ -3114,6 +3116,10 @@ interface WithdrawManagedSourceItem {
3114
3116
  */
3115
3117
  decimals: number;
3116
3118
  amountRaw: string;
3119
+ /** Present when funds are withdrawn through a venue-managed deposit wallet. */
3120
+ custodyKind?: "DEPOSIT_WALLET";
3121
+ /** Venue that owns the deposit wallet (for example, `pred`). */
3122
+ venue?: string;
3117
3123
  status: WithdrawalSourceStatus;
3118
3124
  txHash: string | null;
3119
3125
  bridgeOperationId: string | null;
@@ -3636,6 +3642,10 @@ interface SmartRouteFill {
3636
3642
  }
3637
3643
  /** Per-venue routing result with fills and chain info. */
3638
3644
  interface SmartRouteVenueFill {
3645
+ /** CH executable price and normalized input, in micro-USDC. */
3646
+ limitPriceMicroUsdc?: string;
3647
+ inAmount?: string;
3648
+ outAmount?: string;
3639
3649
  venue: string;
3640
3650
  venueMarketId: string;
3641
3651
  venueMarketOutcomeId: string;
@@ -3667,6 +3677,11 @@ interface SmartRouteBridgeStep {
3667
3677
  destTokenAddress?: string;
3668
3678
  }
3669
3679
  interface VenueSoloQuote {
3680
+ quoteFailure?: {
3681
+ venue: string;
3682
+ code: string;
3683
+ retryAt?: string;
3684
+ };
3670
3685
  /**
3671
3686
  * Minted by the API per successful + executable solo; send this to
3672
3687
  * /execution/fill to execute single-venue. `null` when the solo is not
@@ -3841,6 +3856,12 @@ interface SmartRouteSlippage {
3841
3856
  slippageBps: number;
3842
3857
  }
3843
3858
  interface SmartRouteResponse {
3859
+ quoteRefreshNotBefore?: string;
3860
+ quoteFailure?: {
3861
+ venue: string;
3862
+ code: string;
3863
+ retryAt?: string;
3864
+ };
3844
3865
  quoteId: string;
3845
3866
  venueMarketOutcomeId: string;
3846
3867
  venueMarketId: string;
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ declare enum Venue {
5
5
  limitless = "limitless",
6
6
  opinion = "opinion",
7
7
  predict = "predict",
8
+ pred = "pred",
8
9
  probable = "probable",
9
10
  myriad = "myriad",
10
11
  hyperliquid = "hyperliquid",
@@ -12,7 +13,7 @@ declare enum Venue {
12
13
  prophetx = "prophetx"
13
14
  }
14
15
  /** Single source of truth for venue identifiers. */
15
- declare const VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
16
+ declare const VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.pred, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
16
17
  /** Canonical destination chain for venues with on-chain funding or settlement. */
17
18
  declare const VENUE_CHAIN_IDS: Partial<Record<Venue, number>>;
18
19
  /**
@@ -23,7 +24,7 @@ declare const VENUE_CHAIN_IDS: Partial<Record<Venue, number>>;
23
24
  * Re-activating a venue is therefore an intentional code change here rather
24
25
  * than a runtime configuration toggle.
25
26
  */
26
- declare const ACTIVE_VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
27
+ declare const ACTIVE_VENUES: readonly [Venue.kalshi, Venue.polymarket, Venue.limitless, Venue.opinion, Venue.predict, Venue.pred, Venue.probable, Venue.myriad, Venue.hyperliquid, Venue.novig, Venue.prophetx];
27
28
  /**
28
29
  * Venues excluded from new user-facing activity. The set is currently empty:
29
30
  * ProphetX has discovery, live books, and a sandbox clearinghouse execution
@@ -2930,6 +2931,7 @@ interface ExecuteManagedParams {
2930
2931
  approveMode?: "sponsored" | "user_broadcast";
2931
2932
  }
2932
2933
  interface ExecuteManagedResponse {
2934
+ alreadyAccepted?: boolean;
2933
2935
  quoteId: string;
2934
2936
  orderIds: string[];
2935
2937
  status: "pending";
@@ -3114,6 +3116,10 @@ interface WithdrawManagedSourceItem {
3114
3116
  */
3115
3117
  decimals: number;
3116
3118
  amountRaw: string;
3119
+ /** Present when funds are withdrawn through a venue-managed deposit wallet. */
3120
+ custodyKind?: "DEPOSIT_WALLET";
3121
+ /** Venue that owns the deposit wallet (for example, `pred`). */
3122
+ venue?: string;
3117
3123
  status: WithdrawalSourceStatus;
3118
3124
  txHash: string | null;
3119
3125
  bridgeOperationId: string | null;
@@ -3636,6 +3642,10 @@ interface SmartRouteFill {
3636
3642
  }
3637
3643
  /** Per-venue routing result with fills and chain info. */
3638
3644
  interface SmartRouteVenueFill {
3645
+ /** CH executable price and normalized input, in micro-USDC. */
3646
+ limitPriceMicroUsdc?: string;
3647
+ inAmount?: string;
3648
+ outAmount?: string;
3639
3649
  venue: string;
3640
3650
  venueMarketId: string;
3641
3651
  venueMarketOutcomeId: string;
@@ -3667,6 +3677,11 @@ interface SmartRouteBridgeStep {
3667
3677
  destTokenAddress?: string;
3668
3678
  }
3669
3679
  interface VenueSoloQuote {
3680
+ quoteFailure?: {
3681
+ venue: string;
3682
+ code: string;
3683
+ retryAt?: string;
3684
+ };
3670
3685
  /**
3671
3686
  * Minted by the API per successful + executable solo; send this to
3672
3687
  * /execution/fill to execute single-venue. `null` when the solo is not
@@ -3841,6 +3856,12 @@ interface SmartRouteSlippage {
3841
3856
  slippageBps: number;
3842
3857
  }
3843
3858
  interface SmartRouteResponse {
3859
+ quoteRefreshNotBefore?: string;
3860
+ quoteFailure?: {
3861
+ venue: string;
3862
+ code: string;
3863
+ retryAt?: string;
3864
+ };
3844
3865
  quoteId: string;
3845
3866
  venueMarketOutcomeId: string;
3846
3867
  venueMarketId: string;
package/dist/index.js CHANGED
@@ -144,6 +144,7 @@ var Venue = /* @__PURE__ */ ((Venue3) => {
144
144
  Venue3["limitless"] = "limitless";
145
145
  Venue3["opinion"] = "opinion";
146
146
  Venue3["predict"] = "predict";
147
+ Venue3["pred"] = "pred";
147
148
  Venue3["probable"] = "probable";
148
149
  Venue3["myriad"] = "myriad";
149
150
  Venue3["hyperliquid"] = "hyperliquid";
@@ -157,6 +158,7 @@ var VENUES = [
157
158
  "limitless" /* limitless */,
158
159
  "opinion" /* opinion */,
159
160
  "predict" /* predict */,
161
+ "pred" /* pred */,
160
162
  "probable" /* probable */,
161
163
  "myriad" /* myriad */,
162
164
  "hyperliquid" /* hyperliquid */,
@@ -168,6 +170,7 @@ var VENUE_CHAIN_IDS = {
168
170
  ["polymarket" /* polymarket */]: 137,
169
171
  ["limitless" /* limitless */]: 8453,
170
172
  ["predict" /* predict */]: 56,
173
+ ["pred" /* pred */]: 8453,
171
174
  ["myriad" /* myriad */]: 56,
172
175
  ["hyperliquid" /* hyperliquid */]: 1337,
173
176
  ["novig" /* novig */]: 792703809,
@@ -179,6 +182,7 @@ var ACTIVE_VENUES = [
179
182
  "limitless" /* limitless */,
180
183
  "opinion" /* opinion */,
181
184
  "predict" /* predict */,
185
+ "pred" /* pred */,
182
186
  "probable" /* probable */,
183
187
  "myriad" /* myriad */,
184
188
  "hyperliquid" /* hyperliquid */,
@@ -186,7 +190,7 @@ var ACTIVE_VENUES = [
186
190
  "prophetx" /* prophetx */
187
191
  ];
188
192
  var INACTIVE_VENUES = [];
189
- var DEFAULT_DISABLED_VENUES = ["novig" /* novig */, "prophetx" /* prophetx */];
193
+ var DEFAULT_DISABLED_VENUES = ["pred" /* pred */, "novig" /* novig */, "prophetx" /* prophetx */];
190
194
  var ACTIVE_VENUE_SET = new Set(ACTIVE_VENUES);
191
195
  var INACTIVE_VENUE_SET = new Set(INACTIVE_VENUES);
192
196
  function normalizeVenue(venue) {
@@ -686,6 +690,7 @@ var VENUE_SORT_ORDER = [
686
690
  "opinion" /* opinion */,
687
691
  "limitless" /* limitless */,
688
692
  "predict" /* predict */,
693
+ "pred" /* pred */,
689
694
  "myriad" /* myriad */,
690
695
  "hyperliquid" /* hyperliquid */
691
696
  ];
@@ -716,6 +721,10 @@ function buildVenueUrl(venue, opts) {
716
721
  if (opts.eventSlug) return `https://predict.fun/market/${opts.eventSlug}`;
717
722
  return null;
718
723
  }
724
+ case "pred": {
725
+ if (opts.eventSlug) return `https://www.pred.app/trade/${opts.eventSlug}`;
726
+ return null;
727
+ }
719
728
  case "limitless": {
720
729
  if (opts.eventSlug) return `https://limitless.exchange/markets/${opts.eventSlug}`;
721
730
  return null;
package/dist/index.mjs CHANGED
@@ -12,6 +12,7 @@ var Venue = /* @__PURE__ */ ((Venue3) => {
12
12
  Venue3["limitless"] = "limitless";
13
13
  Venue3["opinion"] = "opinion";
14
14
  Venue3["predict"] = "predict";
15
+ Venue3["pred"] = "pred";
15
16
  Venue3["probable"] = "probable";
16
17
  Venue3["myriad"] = "myriad";
17
18
  Venue3["hyperliquid"] = "hyperliquid";
@@ -25,6 +26,7 @@ var VENUES = [
25
26
  "limitless" /* limitless */,
26
27
  "opinion" /* opinion */,
27
28
  "predict" /* predict */,
29
+ "pred" /* pred */,
28
30
  "probable" /* probable */,
29
31
  "myriad" /* myriad */,
30
32
  "hyperliquid" /* hyperliquid */,
@@ -36,6 +38,7 @@ var VENUE_CHAIN_IDS = {
36
38
  ["polymarket" /* polymarket */]: 137,
37
39
  ["limitless" /* limitless */]: 8453,
38
40
  ["predict" /* predict */]: 56,
41
+ ["pred" /* pred */]: 8453,
39
42
  ["myriad" /* myriad */]: 56,
40
43
  ["hyperliquid" /* hyperliquid */]: 1337,
41
44
  ["novig" /* novig */]: 792703809,
@@ -47,6 +50,7 @@ var ACTIVE_VENUES = [
47
50
  "limitless" /* limitless */,
48
51
  "opinion" /* opinion */,
49
52
  "predict" /* predict */,
53
+ "pred" /* pred */,
50
54
  "probable" /* probable */,
51
55
  "myriad" /* myriad */,
52
56
  "hyperliquid" /* hyperliquid */,
@@ -54,7 +58,7 @@ var ACTIVE_VENUES = [
54
58
  "prophetx" /* prophetx */
55
59
  ];
56
60
  var INACTIVE_VENUES = [];
57
- var DEFAULT_DISABLED_VENUES = ["novig" /* novig */, "prophetx" /* prophetx */];
61
+ var DEFAULT_DISABLED_VENUES = ["pred" /* pred */, "novig" /* novig */, "prophetx" /* prophetx */];
58
62
  var ACTIVE_VENUE_SET = new Set(ACTIVE_VENUES);
59
63
  var INACTIVE_VENUE_SET = new Set(INACTIVE_VENUES);
60
64
  function normalizeVenue(venue) {
@@ -554,6 +558,7 @@ var VENUE_SORT_ORDER = [
554
558
  "opinion" /* opinion */,
555
559
  "limitless" /* limitless */,
556
560
  "predict" /* predict */,
561
+ "pred" /* pred */,
557
562
  "myriad" /* myriad */,
558
563
  "hyperliquid" /* hyperliquid */
559
564
  ];
@@ -584,6 +589,10 @@ function buildVenueUrl(venue, opts) {
584
589
  if (opts.eventSlug) return `https://predict.fun/market/${opts.eventSlug}`;
585
590
  return null;
586
591
  }
592
+ case "pred": {
593
+ if (opts.eventSlug) return `https://www.pred.app/trade/${opts.eventSlug}`;
594
+ return null;
595
+ }
587
596
  case "limitless": {
588
597
  if (opts.eventSlug) return `https://limitless.exchange/markets/${opts.eventSlug}`;
589
598
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/sdk",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "Vanilla TypeScript client for the AGG prediction market aggregator (auth, markets, orderbooks, charts, trading, managed execution, WebSockets). Works in browsers, Node.js, and React Native.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",