@agg-build/hooks 4.7.4 → 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/withdraw.js CHANGED
@@ -98,6 +98,7 @@ var enUsLabels = {
98
98
  kalshi: "Kalshi",
99
99
  opinion: "Opinion",
100
100
  predict: "Predict",
101
+ pred: "PRED",
101
102
  limitless: "Limitless",
102
103
  probable: "Probable",
103
104
  myriad: "Myriad",
@@ -727,7 +728,7 @@ var enUsLabels = {
727
728
  venueMinOrderSize: "Order size is below the venue minimum. Try a larger amount.",
728
729
  sourceBalanceChanged: "Your balance changed since the quote. Refresh and try again, or pick a smaller amount.",
729
730
  venueMarketResolved: "This market just resolved. Pick a different market or wait for the next round.",
730
- dflowWalletUnverified: "Your Solana wallet needs to be verified with dFlow before you can trade Kalshi markets. Verify at https://dflow.net/proof, then try again.",
731
+ dflowWalletUnverified: "This route is unavailable for your wallet. Check your account connection and try again.",
731
732
  venueNoQuotePath: "No active quote path for this market right now. Try a different size, or wait a moment and re-quote.",
732
733
  solanaBlockhashExpired: "Solana transaction expired before submission. Please re-quote and try again.",
733
734
  venueRateLimited: "The venue is rate-limiting requests right now. Please wait a moment and try again.",
@@ -771,6 +772,25 @@ var enUsLabels = {
771
772
  kycSuccessTitle: "Verification successful",
772
773
  kycSuccessDescription: "Your identity has been confirmed and you now have full access to trade on Kalshi markets.",
773
774
  kycSuccessDone: "Done",
775
+ sharedKyc: {
776
+ required: "KYC required",
777
+ completeToTrade: "Complete KYC to trade",
778
+ checkingStatus: "Checking verification status",
779
+ modal: {
780
+ ariaLabel: "Identity verification",
781
+ title: "Verify Your Identity",
782
+ freeDescription: "Complete a one-time identity verification to trade all KYC-required venues.",
783
+ pendingTitle: "Verification pending",
784
+ pendingDescription: "Your verification is being reviewed. Check back for approval before trading.",
785
+ checkStatus: "Check verification status",
786
+ startVerification: "Start verification",
787
+ doItLater: "Do it later",
788
+ successTitle: "Verification successful",
789
+ successDescription: "Your identity has been verified. You can now trade on all KYC-required venues.",
790
+ done: "Done",
791
+ error: "We couldn't confirm your verification."
792
+ }
793
+ },
774
794
  connectKalshi: "Connect to trade Kalshi",
775
795
  tradingAccessVenues: "Venues",
776
796
  tradingAccessAvailable: "Available",
@@ -815,9 +835,13 @@ var enUsLabels = {
815
835
  insufficientVenueInventory: (sharesLabel, priceLabel) => `Only ${sharesLabel} \xB7 ${priceLabel}`,
816
836
  viewAllRoutes: (count) => `View all (${count})`,
817
837
  venueUnavailableInRegion: "Unavailable in your region",
838
+ venueTemporarilyUnavailable: "Temporarily unavailable",
818
839
  verified: "Verified",
819
840
  platformFee: "0% platform fees",
820
841
  estimatedFees: "Estimated fees",
842
+ executionReserve: "Execution reserve",
843
+ executionReserveTooltipAria: "Why funds are reserved",
844
+ executionReserveDescription: "Held for price movement or possible venue charges, not a confirmed fee. Unused funds are returned after execution.",
821
845
  estimatedFeesTooltipAria: "Estimated fees breakdown",
822
846
  feeBreakdownVenueFees: "Venue",
823
847
  feeBreakdownBridgeFees: "Bridging",
@@ -848,6 +872,7 @@ var enUsLabels = {
848
872
  depositingFunds: (amount, tokenSymbol, destinationChain) => `Depositing ${amount} ${tokenSymbol} to ${destinationChain}...`,
849
873
  fundsDeposited: (amount, tokenSymbol, destinationChain) => `Deposited ${amount} ${tokenSymbol} to ${destinationChain}`,
850
874
  fillingOnVenue: (venueLabel) => `Filling on ${venueLabel}...`,
875
+ orderStillSettling: "Still settling. This can take a bit \u2014 check your activity feed. You can keep trading.",
851
876
  venueFilledAtPriceWithAmount: (venueLabel, amountLabel, priceLabel) => `${venueLabel} filled ${amountLabel} at ${priceLabel}`,
852
877
  executionShares: (value) => `${value} shares`,
853
878
  confirmTransactionInWallet: "Confirm the transaction in your wallet",
@@ -1092,6 +1117,35 @@ var enUsLabels = {
1092
1117
  bannerAria: "Site header",
1093
1118
  logoAria: "Home"
1094
1119
  },
1120
+ paperTrading: {
1121
+ badge: "Paper trading",
1122
+ badgeTooltip: "Trade real prediction markets with simulated funds. No real money at risk.",
1123
+ profile: {
1124
+ buyingPower: "Paper Buying Power",
1125
+ earnings: "Paper Earnings",
1126
+ earningsCaption: "Keep what you earn"
1127
+ },
1128
+ onboarding: {
1129
+ stepEyebrow: ({ current, total }) => `STEP ${current} OF ${total}`,
1130
+ skip: "Skip",
1131
+ back: "Back",
1132
+ next: "Next",
1133
+ // Figma reads "Get Strated" (node 4772:31236) — a typo, not copy.
1134
+ done: "Get started",
1135
+ realMarkets: {
1136
+ title: "Real markets, real prices",
1137
+ body: "Follow live prediction markets and trade using real-time market prices from leading venues."
1138
+ },
1139
+ zeroRisk: {
1140
+ title: "Paper trading, zero risk",
1141
+ body: ({ amount }) => `Start with ${amount} in simulated funds. No deposit, no real money, and no risk.`
1142
+ },
1143
+ readyToTrade: {
1144
+ title: "You're ready to trade",
1145
+ body: "Pick a market, make your prediction, and track your performance."
1146
+ }
1147
+ }
1148
+ },
1095
1149
  notifications: {
1096
1150
  order: {
1097
1151
  filledTitle: "Order filled",
@@ -1259,6 +1313,7 @@ var defaultAggUiConfig = {
1259
1313
  // src/core/providers/contexts.ts
1260
1314
  var AggClientContext = (0, import_react.createContext)(null);
1261
1315
  var AggUiContext = (0, import_react.createContext)(defaultAggUiConfig);
1316
+ var AggExecutionModeContext = (0, import_react.createContext)(null);
1262
1317
  var AggLabelsContext = (0, import_react.createContext)(defaultAggUiConfig.general.labels);
1263
1318
  var AggAuthContext = (0, import_react.createContext)(null);
1264
1319
  var AggBalanceContext = (0, import_react.createContext)(null);
@@ -1416,6 +1471,10 @@ function useManagedBalances(options) {
1416
1471
  queryFn: () => client.getManagedBalances(mode ? { mode } : void 0),
1417
1472
  enabled,
1418
1473
  staleTime: 1e4,
1474
+ // A matched fill can precede settlement and the API's next balance snapshot.
1475
+ // Keep visible clients converging even if that first invalidation reads old cash.
1476
+ refetchInterval: mode === "paper" ? false : 5e3,
1477
+ refetchIntervalInBackground: false,
1419
1478
  gcTime: 5 * 6e4,
1420
1479
  retry: 1
1421
1480
  });
package/dist/withdraw.mjs CHANGED
@@ -3,12 +3,12 @@ import {
3
3
  useWithdrawFlow,
4
4
  useWithdrawPreview,
5
5
  useWithdrawalLifecycle
6
- } from "./chunk-FPBMOHIA.mjs";
6
+ } from "./chunk-7DCOWPUQ.mjs";
7
7
  import {
8
8
  useDepositAddresses,
9
9
  useManagedBalances,
10
10
  useWithdrawManaged
11
- } from "./chunk-HDPVTROR.mjs";
11
+ } from "./chunk-SFSGE25P.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": "4.7.4",
3
+ "version": "4.10.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": "^4.7.4"
86
+ "@agg-build/sdk": "^4.10.0"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@solana/wallet-adapter-react": {