@agg-build/sdk 4.10.0 → 4.11.2
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 +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +7 -6
- package/dist/index.mjs +7 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3655,6 +3655,12 @@ interface SmartRouteVenueFill {
|
|
|
3655
3655
|
noPrice: number;
|
|
3656
3656
|
fills: SmartRouteFill[];
|
|
3657
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;
|
|
3658
3664
|
/** Inclusive fee/reserve funding budget. For fee display, use the route's
|
|
3659
3665
|
* feeBreakdown.venueFees and executionReserve instead. */
|
|
3660
3666
|
venueFee?: number;
|
|
@@ -3671,7 +3677,16 @@ interface SmartRouteAllocation {
|
|
|
3671
3677
|
interface SmartRouteBridgeStep {
|
|
3672
3678
|
sourceChainId: string;
|
|
3673
3679
|
destChainId: string;
|
|
3680
|
+
/** Source-side amount sent into the bridge, in USD: the allocations this lane funds plus `cost`. */
|
|
3674
3681
|
amount: number;
|
|
3682
|
+
/**
|
|
3683
|
+
* Delivery margin, in USD, sent on top of the allocations so the destination
|
|
3684
|
+
* still receives them in full after the bridge takes its fee. A planning
|
|
3685
|
+
* reserve, not the expected fee: excluded from `feeBreakdown.bridgeFees` and
|
|
3686
|
+
* `totalCost`, and whatever the bridge does not charge arrives at the
|
|
3687
|
+
* destination as the user's balance. Read `feeBreakdown.bridgeFees` for the
|
|
3688
|
+
* expected bridge fee.
|
|
3689
|
+
*/
|
|
3675
3690
|
cost: number;
|
|
3676
3691
|
sourceTokenAddress?: string;
|
|
3677
3692
|
destTokenAddress?: string;
|
|
@@ -3797,6 +3812,13 @@ interface SmartRouteSetupCostLine {
|
|
|
3797
3812
|
interface SmartRouteFeeBreakdown {
|
|
3798
3813
|
rawExecCost: number;
|
|
3799
3814
|
venueFees: number;
|
|
3815
|
+
/**
|
|
3816
|
+
* Builder fee in USD — the slice paid to a builder code rather than to the
|
|
3817
|
+
* venue. Partners with their own builder code see their own rate here;
|
|
3818
|
+
* everyone else sees the platform default. Excluded from `venueFees`,
|
|
3819
|
+
* included in `totalCost`.
|
|
3820
|
+
*/
|
|
3821
|
+
builderFee?: number;
|
|
3800
3822
|
/** Additional CH funding reserve for slippage or possible venue charges.
|
|
3801
3823
|
* Excluded from venueFees and totalCost; included in funding allocations.
|
|
3802
3824
|
* Only the unused portion is released after execution. */
|
|
@@ -3916,6 +3938,21 @@ interface SmartRouteResponse {
|
|
|
3916
3938
|
* `setupCostsTotal` fields are populated only when the request set
|
|
3917
3939
|
* `deepEstimate=true`. */
|
|
3918
3940
|
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
3941
|
+
/**
|
|
3942
|
+
* Quote-time snapshot of the partner fee configuration that produced
|
|
3943
|
+
* `feeBreakdown.appFee`, frozen so config drift between quote and execute
|
|
3944
|
+
* cannot change what the user is charged.
|
|
3945
|
+
*
|
|
3946
|
+
* This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
|
|
3947
|
+
* This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
|
|
3948
|
+
* 6-decimal USD atoms, and is what a partner reconciles against their
|
|
3949
|
+
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3950
|
+
*/
|
|
3951
|
+
appFee?: {
|
|
3952
|
+
bips: number;
|
|
3953
|
+
categoryKey: string;
|
|
3954
|
+
quotedAppFeeRaw: string;
|
|
3955
|
+
} | null;
|
|
3919
3956
|
/** Populated only when status === "insufficient_position". */
|
|
3920
3957
|
positionAvailability?: {
|
|
3921
3958
|
totalSellableShares: number;
|
|
@@ -4496,7 +4533,6 @@ declare class AggClient {
|
|
|
4496
4533
|
search?: string;
|
|
4497
4534
|
matchStatus?: MatchStatus;
|
|
4498
4535
|
status?: MarketStatus;
|
|
4499
|
-
categoryIds?: string[];
|
|
4500
4536
|
aggKey?: string[];
|
|
4501
4537
|
sportsMarketType?: string[];
|
|
4502
4538
|
period?: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -3655,6 +3655,12 @@ interface SmartRouteVenueFill {
|
|
|
3655
3655
|
noPrice: number;
|
|
3656
3656
|
fills: SmartRouteFill[];
|
|
3657
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;
|
|
3658
3664
|
/** Inclusive fee/reserve funding budget. For fee display, use the route's
|
|
3659
3665
|
* feeBreakdown.venueFees and executionReserve instead. */
|
|
3660
3666
|
venueFee?: number;
|
|
@@ -3671,7 +3677,16 @@ interface SmartRouteAllocation {
|
|
|
3671
3677
|
interface SmartRouteBridgeStep {
|
|
3672
3678
|
sourceChainId: string;
|
|
3673
3679
|
destChainId: string;
|
|
3680
|
+
/** Source-side amount sent into the bridge, in USD: the allocations this lane funds plus `cost`. */
|
|
3674
3681
|
amount: number;
|
|
3682
|
+
/**
|
|
3683
|
+
* Delivery margin, in USD, sent on top of the allocations so the destination
|
|
3684
|
+
* still receives them in full after the bridge takes its fee. A planning
|
|
3685
|
+
* reserve, not the expected fee: excluded from `feeBreakdown.bridgeFees` and
|
|
3686
|
+
* `totalCost`, and whatever the bridge does not charge arrives at the
|
|
3687
|
+
* destination as the user's balance. Read `feeBreakdown.bridgeFees` for the
|
|
3688
|
+
* expected bridge fee.
|
|
3689
|
+
*/
|
|
3675
3690
|
cost: number;
|
|
3676
3691
|
sourceTokenAddress?: string;
|
|
3677
3692
|
destTokenAddress?: string;
|
|
@@ -3797,6 +3812,13 @@ interface SmartRouteSetupCostLine {
|
|
|
3797
3812
|
interface SmartRouteFeeBreakdown {
|
|
3798
3813
|
rawExecCost: number;
|
|
3799
3814
|
venueFees: number;
|
|
3815
|
+
/**
|
|
3816
|
+
* Builder fee in USD — the slice paid to a builder code rather than to the
|
|
3817
|
+
* venue. Partners with their own builder code see their own rate here;
|
|
3818
|
+
* everyone else sees the platform default. Excluded from `venueFees`,
|
|
3819
|
+
* included in `totalCost`.
|
|
3820
|
+
*/
|
|
3821
|
+
builderFee?: number;
|
|
3800
3822
|
/** Additional CH funding reserve for slippage or possible venue charges.
|
|
3801
3823
|
* Excluded from venueFees and totalCost; included in funding allocations.
|
|
3802
3824
|
* Only the unused portion is released after execution. */
|
|
@@ -3916,6 +3938,21 @@ interface SmartRouteResponse {
|
|
|
3916
3938
|
* `setupCostsTotal` fields are populated only when the request set
|
|
3917
3939
|
* `deepEstimate=true`. */
|
|
3918
3940
|
feeBreakdown?: SmartRouteFeeBreakdown;
|
|
3941
|
+
/**
|
|
3942
|
+
* Quote-time snapshot of the partner fee configuration that produced
|
|
3943
|
+
* `feeBreakdown.appFee`, frozen so config drift between quote and execute
|
|
3944
|
+
* cannot change what the user is charged.
|
|
3945
|
+
*
|
|
3946
|
+
* This is NOT the display number — that is `feeBreakdown.appFee`, in USD.
|
|
3947
|
+
* This is the audit record: `quotedAppFeeRaw` is the worst-case charge in
|
|
3948
|
+
* 6-decimal USD atoms, and is what a partner reconciles against their
|
|
3949
|
+
* `AppFeeCharge` rows. `null` when the app has no fee configured.
|
|
3950
|
+
*/
|
|
3951
|
+
appFee?: {
|
|
3952
|
+
bips: number;
|
|
3953
|
+
categoryKey: string;
|
|
3954
|
+
quotedAppFeeRaw: string;
|
|
3955
|
+
} | null;
|
|
3919
3956
|
/** Populated only when status === "insufficient_position". */
|
|
3920
3957
|
positionAvailability?: {
|
|
3921
3958
|
totalSellableShares: number;
|
|
@@ -4496,7 +4533,6 @@ declare class AggClient {
|
|
|
4496
4533
|
search?: string;
|
|
4497
4534
|
matchStatus?: MatchStatus;
|
|
4498
4535
|
status?: MarketStatus;
|
|
4499
|
-
categoryIds?: string[];
|
|
4500
4536
|
aggKey?: string[];
|
|
4501
4537
|
sportsMarketType?: string[];
|
|
4502
4538
|
period?: string[];
|
package/dist/index.js
CHANGED
|
@@ -686,13 +686,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
|
|
|
686
686
|
// ../common/src/utils/sort-venues.ts
|
|
687
687
|
var VENUE_SORT_ORDER = [
|
|
688
688
|
"polymarket" /* polymarket */,
|
|
689
|
+
"hyperliquid" /* hyperliquid */,
|
|
690
|
+
"predict" /* predict */,
|
|
691
|
+
"prophetx" /* prophetx */,
|
|
689
692
|
"kalshi" /* kalshi */,
|
|
690
|
-
"opinion" /* opinion */,
|
|
691
693
|
"limitless" /* limitless */,
|
|
692
|
-
"predict" /* predict */,
|
|
693
|
-
"pred" /* pred */,
|
|
694
694
|
"myriad" /* myriad */,
|
|
695
|
-
"
|
|
695
|
+
"pred" /* pred */,
|
|
696
|
+
"probable" /* probable */,
|
|
697
|
+
"novig" /* novig */,
|
|
698
|
+
"opinion" /* opinion */
|
|
696
699
|
];
|
|
697
700
|
var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
|
|
698
701
|
var getVenueOrder = (venue) => {
|
|
@@ -3015,8 +3018,6 @@ Issued At: ${issuedAt}`;
|
|
|
3015
3018
|
if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
|
|
3016
3019
|
if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
|
|
3017
3020
|
if (options == null ? void 0 : options.status) query.status = options.status;
|
|
3018
|
-
if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
|
|
3019
|
-
query.categoryIds = options.categoryIds;
|
|
3020
3021
|
if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
|
|
3021
3022
|
if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
|
|
3022
3023
|
query.sportsMarketType = options.sportsMarketType;
|
package/dist/index.mjs
CHANGED
|
@@ -554,13 +554,16 @@ var normalizeVenueMarketCluster = (markets, selectedMarketId) => {
|
|
|
554
554
|
// ../common/src/utils/sort-venues.ts
|
|
555
555
|
var VENUE_SORT_ORDER = [
|
|
556
556
|
"polymarket" /* polymarket */,
|
|
557
|
+
"hyperliquid" /* hyperliquid */,
|
|
558
|
+
"predict" /* predict */,
|
|
559
|
+
"prophetx" /* prophetx */,
|
|
557
560
|
"kalshi" /* kalshi */,
|
|
558
|
-
"opinion" /* opinion */,
|
|
559
561
|
"limitless" /* limitless */,
|
|
560
|
-
"predict" /* predict */,
|
|
561
|
-
"pred" /* pred */,
|
|
562
562
|
"myriad" /* myriad */,
|
|
563
|
-
"
|
|
563
|
+
"pred" /* pred */,
|
|
564
|
+
"probable" /* probable */,
|
|
565
|
+
"novig" /* novig */,
|
|
566
|
+
"opinion" /* opinion */
|
|
564
567
|
];
|
|
565
568
|
var venueOrderIndex = new Map(VENUE_SORT_ORDER.map((v, i) => [v, i]));
|
|
566
569
|
var getVenueOrder = (venue) => {
|
|
@@ -2883,8 +2886,6 @@ Issued At: ${issuedAt}`;
|
|
|
2883
2886
|
if ((_a = options == null ? void 0 : options.search) == null ? void 0 : _a.trim()) query.search = options.search.trim();
|
|
2884
2887
|
if (options == null ? void 0 : options.matchStatus) query.matchStatus = options.matchStatus;
|
|
2885
2888
|
if (options == null ? void 0 : options.status) query.status = options.status;
|
|
2886
|
-
if ((options == null ? void 0 : options.categoryIds) && options.categoryIds.length > 0)
|
|
2887
|
-
query.categoryIds = options.categoryIds;
|
|
2888
2889
|
if ((options == null ? void 0 : options.aggKey) && options.aggKey.length > 0) query.aggKey = options.aggKey;
|
|
2889
2890
|
if ((options == null ? void 0 : options.sportsMarketType) && options.sportsMarketType.length > 0) {
|
|
2890
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.2",
|
|
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",
|