@agg-build/hooks 2.8.0 → 4.0.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/{chunk-X4MMFGU5.mjs → chunk-AZYAQIZB.mjs} +1 -1
- package/dist/{chunk-LOFGAX6T.mjs → chunk-BR6NZSXN.mjs} +1 -1
- package/dist/{chunk-3UEZQTMJ.mjs → chunk-SC6X5TL4.mjs} +47 -31
- package/dist/deposit.js +28 -1
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +33 -15
- package/dist/index.d.ts +33 -15
- package/dist/index.js +148 -128
- package/dist/index.mjs +11 -8
- package/dist/withdraw.js +28 -1
- package/dist/withdraw.mjs +2 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BR6NZSXN.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useWithdrawEstimate,
|
|
7
7
|
useWithdrawFlow,
|
|
8
8
|
useWithdrawPreview,
|
|
9
9
|
useWithdrawalLifecycle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AZYAQIZB.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AggAuthContext,
|
|
13
13
|
AggBalanceProvider,
|
|
@@ -88,7 +88,6 @@ import {
|
|
|
88
88
|
useOptionalAggClient,
|
|
89
89
|
usePlaceLimitOrder,
|
|
90
90
|
usePositions,
|
|
91
|
-
useQuoteManaged,
|
|
92
91
|
useRedeem,
|
|
93
92
|
useRedeemEligibleCount,
|
|
94
93
|
useRedeemLifecycle,
|
|
@@ -98,7 +97,7 @@ import {
|
|
|
98
97
|
useSyncBalances,
|
|
99
98
|
useWithdrawManaged,
|
|
100
99
|
userActivityQueryKeys
|
|
101
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-SC6X5TL4.mjs";
|
|
102
101
|
|
|
103
102
|
// src/index.ts
|
|
104
103
|
import { QueryClient as QueryClient4, QueryClientProvider, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
@@ -2355,7 +2354,9 @@ function useSmartRoute(options) {
|
|
|
2355
2354
|
refetchInterval: (queryState) => {
|
|
2356
2355
|
var _a2, _b2, _c2, _d2;
|
|
2357
2356
|
return resolveSmartRouteRefetchInterval({
|
|
2358
|
-
|
|
2357
|
+
// SELL already fans out into one quote per venue. Keep that group on a
|
|
2358
|
+
// stable cadence instead of multiplying the adaptive 5s/refreshAt poll.
|
|
2359
|
+
data: tradeSide === "sell" ? void 0 : queryState.state.data,
|
|
2359
2360
|
defaultIntervalMs: staleTimeMs,
|
|
2360
2361
|
isDocumentVisible: getIsDocumentVisible(),
|
|
2361
2362
|
isEditing: (_a2 = refreshContext == null ? void 0 : refreshContext.isEditing) != null ? _a2 : false,
|
|
@@ -2574,10 +2575,13 @@ var useVenueSellQuotes = (options) => {
|
|
|
2574
2575
|
}),
|
|
2575
2576
|
enabled: queryEnabled,
|
|
2576
2577
|
staleTime: staleTimeMs,
|
|
2577
|
-
refetchInterval: (
|
|
2578
|
+
refetchInterval: (_queryState) => {
|
|
2578
2579
|
var _a2, _b2, _c, _d;
|
|
2579
2580
|
return resolveSmartRouteRefetchInterval({
|
|
2580
|
-
|
|
2581
|
+
// Venue quotes are display companions to the aggregate SELL quote.
|
|
2582
|
+
// Poll them at the normal cadence rather than independently
|
|
2583
|
+
// accelerating every venue to the thin-liquidity interval.
|
|
2584
|
+
data: void 0,
|
|
2581
2585
|
defaultIntervalMs: staleTimeMs,
|
|
2582
2586
|
isDocumentVisible: getIsDocumentVisible3(),
|
|
2583
2587
|
isEditing: (_a2 = refreshContext == null ? void 0 : refreshContext.isEditing) != null ? _a2 : false,
|
|
@@ -3435,7 +3439,6 @@ export {
|
|
|
3435
3439
|
usePlaceLimitOrder,
|
|
3436
3440
|
usePositions,
|
|
3437
3441
|
useQueryClient3 as useQueryClient,
|
|
3438
|
-
useQuoteManaged,
|
|
3439
3442
|
useRampQuotes,
|
|
3440
3443
|
useRampSession,
|
|
3441
3444
|
useRedeem,
|
package/dist/withdraw.js
CHANGED
|
@@ -154,6 +154,28 @@ var enUsLabels = {
|
|
|
154
154
|
saved: "Refill settings saved.",
|
|
155
155
|
consent: "By enabling, you authorize AGG to move USDC between your managed wallets within these limits.",
|
|
156
156
|
lastRefill: "Latest refill",
|
|
157
|
+
manageTitle: "Manage balances",
|
|
158
|
+
manageDescription: "Set a minimum balance and refill target for each venue. When a venue falls below your minimum, funds are automatically transferred from your balances on other venues to restore it to your refill target.",
|
|
159
|
+
noAutoRefill: "No auto-refill",
|
|
160
|
+
autoRefill: "Auto-refill",
|
|
161
|
+
minimumShortLabel: "Min",
|
|
162
|
+
refillToLabel: "Refill to",
|
|
163
|
+
unitLabel: "USDC",
|
|
164
|
+
resetAction: "Reset",
|
|
165
|
+
cancelAction: "Cancel",
|
|
166
|
+
saveChangesAction: "Save changes",
|
|
167
|
+
modalLoading: "Loading balances...",
|
|
168
|
+
modalEmptyTitle: "No supported networks",
|
|
169
|
+
modalEmptyDescription: "There are no supported networks to manage yet.",
|
|
170
|
+
modalLoadError: "Balances could not be loaded.",
|
|
171
|
+
requiredError: "Enter an amount.",
|
|
172
|
+
positiveError: "Enter an amount greater than 0.",
|
|
173
|
+
precisionError: "Use no more than 6 decimal places.",
|
|
174
|
+
relationshipError: "Refill to must be greater than or equal to Min.",
|
|
175
|
+
maximumError: (maximum) => `Enter an amount no greater than ${maximum} USDC.`,
|
|
176
|
+
createUnavailableError: "Auto-refill cannot be enabled for this network until refill limits are supported by the API.",
|
|
177
|
+
expandNetwork: (network) => `Expand ${network} balance settings`,
|
|
178
|
+
collapseNetwork: (network) => `Collapse ${network} balance settings`,
|
|
157
179
|
statuses: {
|
|
158
180
|
reserved: "Funds reserved",
|
|
159
181
|
executing: "Refill in progress",
|
|
@@ -364,7 +386,8 @@ var enUsLabels = {
|
|
|
364
386
|
activity: "Activity"
|
|
365
387
|
},
|
|
366
388
|
balance: {
|
|
367
|
-
availableBalance: "
|
|
389
|
+
availableBalance: "Withdrawable Balance",
|
|
390
|
+
manage: "Manage",
|
|
368
391
|
reservedForOpenOrders: (amount) => `${amount} reserved for open orders`,
|
|
369
392
|
positionsValue: "Positions Value",
|
|
370
393
|
kalshiBalance: "Kalshi Balance",
|
|
@@ -762,6 +785,10 @@ var enUsLabels = {
|
|
|
762
785
|
limitOrderPlacedDescription: "Your limit order has been submitted.",
|
|
763
786
|
orderSplitting: "Order Splitting",
|
|
764
787
|
splitOrderDescription: "We split your order for the best price:",
|
|
788
|
+
maximizePayout: "Maximize payout",
|
|
789
|
+
maximizePayoutDescription: "We\u2019ll route your shares for the highest payout:",
|
|
790
|
+
venueInventory: (sharesLabel, priceLabel) => `${sharesLabel} \xB7 ${priceLabel}`,
|
|
791
|
+
insufficientVenueInventory: (sharesLabel, priceLabel) => `Only ${sharesLabel} \xB7 ${priceLabel}`,
|
|
765
792
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
766
793
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
767
794
|
verified: "Verified",
|
package/dist/withdraw.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
useWithdrawFlow,
|
|
4
4
|
useWithdrawPreview,
|
|
5
5
|
useWithdrawalLifecycle
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AZYAQIZB.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useDepositAddresses,
|
|
9
9
|
useManagedBalances,
|
|
10
10
|
useWithdrawManaged
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SC6X5TL4.mjs";
|
|
12
12
|
export {
|
|
13
13
|
useDepositAddresses,
|
|
14
14
|
useManagedBalances,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/hooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "React hooks and providers for the AGG prediction market aggregator. Wraps @agg-build/sdk with TanStack Query, shared session state, and live WebSocket data.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"react": "^18.0.0 || ^19.0.0",
|
|
84
84
|
"viem": "^2.0.0",
|
|
85
85
|
"wagmi": "^3.0.0 || ^2.0.0",
|
|
86
|
-
"@agg-build/sdk": "^
|
|
86
|
+
"@agg-build/sdk": "^4.0.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@solana/wallet-adapter-react": {
|