@agg-build/sdk 4.9.2 → 4.11.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 +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +16 -6
- package/dist/index.mjs +16 -6
- package/package.json +1 -1
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;
|
|
@@ -3649,6 +3655,12 @@ interface SmartRouteVenueFill {
|
|
|
3649
3655
|
noPrice: number;
|
|
3650
3656
|
fills: SmartRouteFill[];
|
|
3651
3657
|
venueQty: number;
|
|
3658
|
+
/**
|
|
3659
|
+
* Builder fee for this fill in USD — the slice paid to a builder code
|
|
3660
|
+
* rather than to the venue. Excluded from `venueFee`. Optional so an
|
|
3661
|
+
* older engine build that does not emit it still validates.
|
|
3662
|
+
*/
|
|
3663
|
+
builderFee?: number;
|
|
3652
3664
|
/** Inclusive fee/reserve funding budget. For fee display, use the route's
|
|
3653
3665
|
* feeBreakdown.venueFees and executionReserve instead. */
|
|
3654
3666
|
venueFee?: number;
|
|
@@ -3671,6 +3683,11 @@ interface SmartRouteBridgeStep {
|
|
|
3671
3683
|
destTokenAddress?: string;
|
|
3672
3684
|
}
|
|
3673
3685
|
interface VenueSoloQuote {
|
|
3686
|
+
quoteFailure?: {
|
|
3687
|
+
venue: string;
|
|
3688
|
+
code: string;
|
|
3689
|
+
retryAt?: string;
|
|
3690
|
+
};
|
|
3674
3691
|
/**
|
|
3675
3692
|
* Minted by the API per successful + executable solo; send this to
|
|
3676
3693
|
* /execution/fill to execute single-venue. `null` when the solo is not
|
|
@@ -3786,6 +3803,13 @@ interface SmartRouteSetupCostLine {
|
|
|
3786
3803
|
interface SmartRouteFeeBreakdown {
|
|
3787
3804
|
rawExecCost: number;
|
|
3788
3805
|
venueFees: number;
|
|
3806
|
+
/**
|
|
3807
|
+
* Builder fee in USD — the slice paid to a builder code rather than to the
|
|
3808
|
+
* venue. Partners with their own builder code see their own rate here;
|
|
3809
|
+
* everyone else sees the platform default. Excluded from `venueFees`,
|
|
3810
|
+
* included in `totalCost`.
|
|
3811
|
+
*/
|
|
3812
|
+
builderFee?: number;
|
|
3789
3813
|
/** Additional CH funding reserve for slippage or possible venue charges.
|
|
3790
3814
|
* Excluded from venueFees and totalCost; included in funding allocations.
|
|
3791
3815
|
* Only the unused portion is released after execution. */
|
|
@@ -3845,6 +3869,12 @@ interface SmartRouteSlippage {
|
|
|
3845
3869
|
slippageBps: number;
|
|
3846
3870
|
}
|
|
3847
3871
|
interface SmartRouteResponse {
|
|
3872
|
+
quoteRefreshNotBefore?: string;
|
|
3873
|
+
quoteFailure?: {
|
|
3874
|
+
venue: string;
|
|
3875
|
+
code: string;
|
|
3876
|
+
retryAt?: string;
|
|
3877
|
+
};
|
|
3848
3878
|
quoteId: string;
|
|
3849
3879
|
venueMarketOutcomeId: string;
|
|
3850
3880
|
venueMarketId: string;
|
|
@@ -3899,6 +3929,21 @@ interface SmartRouteResponse {
|
|
|
3899
3929
|
* `setupCostsTotal` fields are populated only when the request set
|
|
3900
3930
|
* `deepEstimate=true`. */
|
|
3901
3931
|
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
3932
|
+
/**
|
|
3933
|
+
* Quote-time snapshot of the partner fee configuration that produced
|
|
3934
|
+
* `feeBreakdown.appFee`, frozen so config drift between quote and execute
|
|
3935
|
+
* cannot change what the user is charged.
|
|
3936
|
+
*
|
|
3937
|
+
* This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
|
|
3938
|
+
* This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
|
|
3939
|
+
* 6-decimal USD atoms, and is what a partner reconciles against their
|
|
3940
|
+
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3941
|
+
*/
|
|
3942
|
+
appFee?: {
|
|
3943
|
+
bips: number;
|
|
3944
|
+
categoryKey: string;
|
|
3945
|
+
quotedAppFeeRaw: string;
|
|
3946
|
+
} | null;
|
|
3902
3947
|
/** Populated only when status === "insufficient_position". */
|
|
3903
3948
|
positionAvailability?: {
|
|
3904
3949
|
totalSellableShares: number;
|
|
@@ -4479,7 +4524,6 @@ declare class AggClient {
|
|
|
4479
4524
|
search?: string;
|
|
4480
4525
|
matchStatus?: MatchStatus;
|
|
4481
4526
|
status?: MarketStatus;
|
|
4482
|
-
categoryIds?: string[];
|
|
4483
4527
|
aggKey?: string[];
|
|
4484
4528
|
sportsMarketType?: string[];
|
|
4485
4529
|
period?: 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;
|
|
@@ -3649,6 +3655,12 @@ interface SmartRouteVenueFill {
|
|
|
3649
3655
|
noPrice: number;
|
|
3650
3656
|
fills: SmartRouteFill[];
|
|
3651
3657
|
venueQty: number;
|
|
3658
|
+
/**
|
|
3659
|
+
* Builder fee for this fill in USD — the slice paid to a builder code
|
|
3660
|
+
* rather than to the venue. Excluded from `venueFee`. Optional so an
|
|
3661
|
+
* older engine build that does not emit it still validates.
|
|
3662
|
+
*/
|
|
3663
|
+
builderFee?: number;
|
|
3652
3664
|
/** Inclusive fee/reserve funding budget. For fee display, use the route's
|
|
3653
3665
|
* feeBreakdown.venueFees and executionReserve instead. */
|
|
3654
3666
|
venueFee?: number;
|
|
@@ -3671,6 +3683,11 @@ interface SmartRouteBridgeStep {
|
|
|
3671
3683
|
destTokenAddress?: string;
|
|
3672
3684
|
}
|
|
3673
3685
|
interface VenueSoloQuote {
|
|
3686
|
+
quoteFailure?: {
|
|
3687
|
+
venue: string;
|
|
3688
|
+
code: string;
|
|
3689
|
+
retryAt?: string;
|
|
3690
|
+
};
|
|
3674
3691
|
/**
|
|
3675
3692
|
* Minted by the API per successful + executable solo; send this to
|
|
3676
3693
|
* /execution/fill to execute single-venue. `null` when the solo is not
|
|
@@ -3786,6 +3803,13 @@ interface SmartRouteSetupCostLine {
|
|
|
3786
3803
|
interface SmartRouteFeeBreakdown {
|
|
3787
3804
|
rawExecCost: number;
|
|
3788
3805
|
venueFees: number;
|
|
3806
|
+
/**
|
|
3807
|
+
* Builder fee in USD — the slice paid to a builder code rather than to the
|
|
3808
|
+
* venue. Partners with their own builder code see their own rate here;
|
|
3809
|
+
* everyone else sees the platform default. Excluded from `venueFees`,
|
|
3810
|
+
* included in `totalCost`.
|
|
3811
|
+
*/
|
|
3812
|
+
builderFee?: number;
|
|
3789
3813
|
/** Additional CH funding reserve for slippage or possible venue charges.
|
|
3790
3814
|
* Excluded from venueFees and totalCost; included in funding allocations.
|
|
3791
3815
|
* Only the unused portion is released after execution. */
|
|
@@ -3845,6 +3869,12 @@ interface SmartRouteSlippage {
|
|
|
3845
3869
|
slippageBps: number;
|
|
3846
3870
|
}
|
|
3847
3871
|
interface SmartRouteResponse {
|
|
3872
|
+
quoteRefreshNotBefore?: string;
|
|
3873
|
+
quoteFailure?: {
|
|
3874
|
+
venue: string;
|
|
3875
|
+
code: string;
|
|
3876
|
+
retryAt?: string;
|
|
3877
|
+
};
|
|
3848
3878
|
quoteId: string;
|
|
3849
3879
|
venueMarketOutcomeId: string;
|
|
3850
3880
|
venueMarketId: string;
|
|
@@ -3899,6 +3929,21 @@ interface SmartRouteResponse {
|
|
|
3899
3929
|
* `setupCostsTotal` fields are populated only when the request set
|
|
3900
3930
|
* `deepEstimate=true`. */
|
|
3901
3931
|
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
3932
|
+
/**
|
|
3933
|
+
* Quote-time snapshot of the partner fee configuration that produced
|
|
3934
|
+
* `feeBreakdown.appFee`, frozen so config drift between quote and execute
|
|
3935
|
+
* cannot change what the user is charged.
|
|
3936
|
+
*
|
|
3937
|
+
* This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
|
|
3938
|
+
* This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
|
|
3939
|
+
* 6-decimal USD atoms, and is what a partner reconciles against their
|
|
3940
|
+
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3941
|
+
*/
|
|
3942
|
+
appFee?: {
|
|
3943
|
+
bips: number;
|
|
3944
|
+
categoryKey: string;
|
|
3945
|
+
quotedAppFeeRaw: string;
|
|
3946
|
+
} | null;
|
|
3902
3947
|
/** Populated only when status === "insufficient_position". */
|
|
3903
3948
|
positionAvailability?: {
|
|
3904
3949
|
totalSellableShares: number;
|
|
@@ -4479,7 +4524,6 @@ declare class AggClient {
|
|
|
4479
4524
|
search?: string;
|
|
4480
4525
|
matchStatus?: MatchStatus;
|
|
4481
4526
|
status?: MarketStatus;
|
|
4482
|
-
categoryIds?: string[];
|
|
4483
4527
|
aggKey?: string[];
|
|
4484
4528
|
sportsMarketType?: string[];
|
|
4485
4529
|
period?: 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) {
|
|
@@ -682,12 +686,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
|
|
|
682
686
|
// ../common/src/utils/sort-venues.ts
|
|
683
687
|
var VENUE_SORT_ORDER = [
|
|
684
688
|
"polymarket" /* polymarket */,
|
|
689
|
+
"hyperliquid" /* hyperliquid */,
|
|
690
|
+
"predict" /* predict */,
|
|
691
|
+
"prophetx" /* prophetx */,
|
|
685
692
|
"kalshi" /* kalshi */,
|
|
686
|
-
"opinion" /* opinion */,
|
|
687
693
|
"limitless" /* limitless */,
|
|
688
|
-
"predict" /* predict */,
|
|
689
694
|
"myriad" /* myriad */,
|
|
690
|
-
"
|
|
695
|
+
"pred" /* pred */,
|
|
696
|
+
"probable" /* probable */,
|
|
697
|
+
"novig" /* novig */,
|
|
698
|
+
"opinion" /* opinion */
|
|
691
699
|
];
|
|
692
700
|
var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
|
|
693
701
|
var getVenueOrder = (venue) => {
|
|
@@ -716,6 +724,10 @@ function buildVenueUrl(venue, opts) {
|
|
|
716
724
|
if (opts.eventSlug) return `https://predict.fun/market/${opts.eventSlug}`;
|
|
717
725
|
return null;
|
|
718
726
|
}
|
|
727
|
+
case "pred": {
|
|
728
|
+
if (opts.eventSlug) return `https://www.pred.app/trade/${opts.eventSlug}`;
|
|
729
|
+
return null;
|
|
730
|
+
}
|
|
719
731
|
case "limitless": {
|
|
720
732
|
if (opts.eventSlug) return `https://limitless.exchange/markets/${opts.eventSlug}`;
|
|
721
733
|
return null;
|
|
@@ -3006,8 +3018,6 @@ Issued At: ${issuedAt}`;
|
|
|
3006
3018
|
if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
|
|
3007
3019
|
if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
|
|
3008
3020
|
if (options == null ? void 0 : options.status) query.status = options.status;
|
|
3009
|
-
if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
|
|
3010
|
-
query.categoryIds = options.categoryIds;
|
|
3011
3021
|
if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
|
|
3012
3022
|
if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
|
|
3013
3023
|
query.sportsMarketType = options.sportsMarketType;
|
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) {
|
|
@@ -550,12 +554,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
|
|
|
550
554
|
// ../common/src/utils/sort-venues.ts
|
|
551
555
|
var VENUE_SORT_ORDER = [
|
|
552
556
|
"polymarket" /* polymarket */,
|
|
557
|
+
"hyperliquid" /* hyperliquid */,
|
|
558
|
+
"predict" /* predict */,
|
|
559
|
+
"prophetx" /* prophetx */,
|
|
553
560
|
"kalshi" /* kalshi */,
|
|
554
|
-
"opinion" /* opinion */,
|
|
555
561
|
"limitless" /* limitless */,
|
|
556
|
-
"predict" /* predict */,
|
|
557
562
|
"myriad" /* myriad */,
|
|
558
|
-
"
|
|
563
|
+
"pred" /* pred */,
|
|
564
|
+
"probable" /* probable */,
|
|
565
|
+
"novig" /* novig */,
|
|
566
|
+
"opinion" /* opinion */
|
|
559
567
|
];
|
|
560
568
|
var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
|
|
561
569
|
var getVenueOrder = (venue) => {
|
|
@@ -584,6 +592,10 @@ function buildVenueUrl(venue, opts) {
|
|
|
584
592
|
if (opts.eventSlug) return `https://predict.fun/market/${opts.eventSlug}`;
|
|
585
593
|
return null;
|
|
586
594
|
}
|
|
595
|
+
case "pred": {
|
|
596
|
+
if (opts.eventSlug) return `https://www.pred.app/trade/${opts.eventSlug}`;
|
|
597
|
+
return null;
|
|
598
|
+
}
|
|
587
599
|
case "limitless": {
|
|
588
600
|
if (opts.eventSlug) return `https://limitless.exchange/markets/${opts.eventSlug}`;
|
|
589
601
|
return null;
|
|
@@ -2874,8 +2886,6 @@ Issued At: ${issuedAt}`;
|
|
|
2874
2886
|
if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
|
|
2875
2887
|
if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
|
|
2876
2888
|
if (options == null ? void 0 : options.status) query.status = options.status;
|
|
2877
|
-
if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
|
|
2878
|
-
query.categoryIds = options.categoryIds;
|
|
2879
2889
|
if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
|
|
2880
2890
|
if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
|
|
2881
2891
|
query.sportsMarketType = options.sportsMarketType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.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",
|