@agg-build/hooks 4.17.2 → 4.18.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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-KQ5TOPNY.mjs";
4
+ } from "./chunk-ESDA4NZI.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
package/dist/deposit.js CHANGED
@@ -158,6 +158,10 @@ var enUsLabels = {
158
158
  lineChartAria: "Line chart",
159
159
  candlestickChartAria: "Candlestick chart",
160
160
  lineChartSeriesSwitchAria: "Chart series switch",
161
+ chartSources: (historyVenue, liquidityVenue) => `History: ${historyVenue} \xB7 Resting liquidity: ${liquidityVenue != null ? liquidityVenue : "all venues"}`,
162
+ chartBidLiquidity: (amount) => `Bid ${amount}`,
163
+ chartAskLiquidity: (amount) => `Ask ${amount}`,
164
+ chartEmpty: "No price history in this range",
161
165
  lineChartSeriesOptionAria: (seriesLabel) => `Show ${seriesLabel} series`,
162
166
  chartTypeSwitchAria: "Chart type switch",
163
167
  lineChartType: "Line",
@@ -169,12 +173,14 @@ var enUsLabels = {
169
173
  opinion: "Opinion",
170
174
  predict: "Predict",
171
175
  pred: "PRED",
176
+ tiprun: "Tip Run",
172
177
  limitless: "Limitless",
173
178
  probable: "Probable",
174
179
  myriad: "Myriad",
175
180
  hyperliquid: "Hyperliquid",
176
181
  novig: "Novig",
177
- prophetx: "ProphetX"
182
+ prophetx: "ProphetX",
183
+ betdex: "BETDEX"
178
184
  },
179
185
  auth: {
180
186
  connect: (connectorName) => connectorName ? `Sign in with ${connectorName}` : "Sign in",
@@ -465,10 +471,74 @@ var enUsLabels = {
465
471
  positionsValue: "Positions Value",
466
472
  kalshiBalance: "Kalshi Balance",
467
473
  balanceByNetwork: "Balance by network",
474
+ venueAccount: "Venue account",
475
+ balanceUnavailable: "Balance unavailable",
468
476
  paperModeNetwork: "Paper",
469
477
  paperModeWarning: "Paper mode is enabled. These are simulated funds for paper trading.",
470
478
  networkTooltipDescription: "Funds are stored across networks. We handle routing automatically, but keeping funds on the right network enables faster trades and lower fees. When depositing, you can choose your preferred network."
471
479
  },
480
+ hostedBetdex: {
481
+ deposit: "Deposit USDC",
482
+ depositInstructions: {
483
+ production: "Send USDC on Solana to this BETDEX account address.",
484
+ sandbox: "This is a sandbox account. Use sandbox test funds only."
485
+ },
486
+ depositAddress: "BETDEX Solana deposit address",
487
+ transferUnavailable: "This transfer is temporarily unavailable. Check its status before trying again.",
488
+ withdraw: "Withdraw USDC",
489
+ withdrawalAmount: "Amount (USDC)",
490
+ withdrawalDestination: "Your Solana wallet address",
491
+ withdrawalSubmit: "Withdraw from BETDEX",
492
+ withdrawalCheck: "Check withdrawal",
493
+ withdrawalRetry: "Retry the same withdrawal",
494
+ withdrawalNew: "New withdrawal",
495
+ withdrawalUnknown: "The response was not confirmed. Your request is saved; retrying checks the same withdrawal.",
496
+ withdrawalStatuses: {
497
+ processing: "Withdrawal is processing.",
498
+ confirmed: "Withdrawal confirmed.",
499
+ failed: "Withdrawal failed. Funds are available again.",
500
+ flagged: "Withdrawal needs review. Funds remain reserved.",
501
+ review_required: "Withdrawal needs review. Funds remain reserved."
502
+ },
503
+ title: "BETDEX account",
504
+ description: "USDC held with BETDEX, separate from your connected wallets.",
505
+ sandbox: "Sandbox \xB7 simulated funds",
506
+ createAccount: "Set up BETDEX account",
507
+ checkSetup: "Check account setup",
508
+ provisioning: "Account setup is processing. Check again for confirmation.",
509
+ suspended: "This BETDEX account is suspended.",
510
+ unavailable: "BETDEX balance is temporarily unavailable.",
511
+ provisioningUnavailable: "BETDEX account setup is currently unavailable.",
512
+ total: "Total balance",
513
+ available: "Available to trade",
514
+ reserved: "Reserved for open orders",
515
+ refresh: "Refresh account",
516
+ creationFailed: "We could not confirm account setup. Refresh to check its status before trying again.",
517
+ showActivity: "Show account activity",
518
+ hideActivity: "Hide account activity",
519
+ activityTitle: "BETDEX account activity",
520
+ activityDescription: "Observed ledger entries, not spendable balances or per-order fees. A ledger entry alone does not confirm a withdrawal's completion.",
521
+ activityEmpty: "No account activity on this page.",
522
+ activityUnavailable: "BETDEX account activity is temporarily unavailable.",
523
+ activityPrevious: "Previous activity page",
524
+ activityNext: "Next activity page",
525
+ activityRefresh: "Refresh activity",
526
+ activityCodes: {
527
+ Deposit: "Deposit",
528
+ Withdrawal: "Withdrawal",
529
+ TradeCreation: "Trade created",
530
+ TradeVoid: "Trade voided",
531
+ TradeWin: "Trade payout",
532
+ WalletToWallet: "Wallet transfer",
533
+ Commission: "Commission",
534
+ MarketPositionVoid: "Position voided",
535
+ MarketPositionPayout: "Position payout",
536
+ MarketPositionRefund: "Position refund",
537
+ ManualDebit: "Manual debit",
538
+ ManualCredit: "Manual credit",
539
+ SettlementResidual: "Settlement adjustment"
540
+ }
541
+ },
472
542
  activity: {
473
543
  depositType: "Deposit",
474
544
  redeemType: "Claim",
@@ -622,6 +692,17 @@ var enUsLabels = {
622
692
  priceGap: "Price Gap"
623
693
  },
624
694
  eventItemDetails: {
695
+ chartLegend: "Markets on chart",
696
+ selectChartMarkets: "Select a line above to show its history",
697
+ marketHistoryUnavailable: "History unavailable",
698
+ comparisonSource: (venue) => `${venue} \xB7 Outcome probabilities \xB7 Click a line to show or hide it`,
699
+ comparisonSeriesCount: (shown, total) => `Showing ${shown} of ${total} series`,
700
+ comparisonSeriesPage: (page, total) => `Page ${page} of ${total}`,
701
+ comparisonSeriesBudget: (limit) => `Up to ${limit} series are live at once. Change pages to compare others; your selected outcome stays visible.`,
702
+ comparisonPreviousSeries: "Previous series",
703
+ comparisonNextSeries: "Next series",
704
+ comparisonSelectedSeries: "Selected",
705
+ comparisonHiddenSeries: "Hidden",
625
706
  loading: "Loading market details",
626
707
  unavailableAria: "Market details unavailable",
627
708
  unavailableTitle: "Market details unavailable",
@@ -727,6 +808,7 @@ var enUsLabels = {
727
808
  settlementCriticalDifferenceLabel: "Critical",
728
809
  settlementValueUnavailable: "Not provided",
729
810
  settlementLoading: "Loading settlement",
811
+ settlementDetailsLoadError: "Settlement details could not be loaded.",
730
812
  settlementDetailsAria: (venueLabel) => `${venueLabel} settlement details`,
731
813
  settlementShowMoreAria: (ctaLabel, venueLabel) => `${ctaLabel} for ${venueLabel}`,
732
814
  settlementDescriptionLabel: "Description",
@@ -748,6 +830,9 @@ var enUsLabels = {
748
830
  maximumFractionDigits: 2
749
831
  })}\xA2 avg. price`,
750
832
  balance: (value) => `Balance ${value}`,
833
+ betdexBalance: (value) => `BETDEX balance ${value}`,
834
+ betdexBalanceUnavailable: "BETDEX balance unavailable",
835
+ manageBetdexAccount: "Manage BETDEX account",
751
836
  shares: (value) => `${value.toLocaleString("en-US", {
752
837
  minimumFractionDigits: Number.isInteger(value) ? 0 : 1,
753
838
  maximumFractionDigits: 2
@@ -865,6 +950,10 @@ var enUsLabels = {
865
950
  }
866
951
  },
867
952
  connectKalshi: "Connect Kalshi to trade",
953
+ connectProphetx: "Connect ProphetX to trade",
954
+ manageProphetx: "Manage ProphetX connection",
955
+ prophetxFundingNotice: "Manage funds on ProphetX",
956
+ prophetxSettlementNotice: "This position settles on ProphetX",
868
957
  requiresKalshiAccount: "Requires Kalshi account",
869
958
  tradingAccessVenues: "Venues",
870
959
  tradingAccessAvailable: "Available",
@@ -913,6 +1002,7 @@ var enUsLabels = {
913
1002
  verified: "Verified",
914
1003
  platformFee: "0% platform fees",
915
1004
  estimatedFees: "Estimated fees",
1005
+ betdexSettlementFeeNotice: "BETDEX charges 1% of net profit per market at settlement, not per fill. The final fee depends on all positions in that market.",
916
1006
  executionReserve: "Execution reserve",
917
1007
  executionReserveTooltipAria: "Why funds are reserved",
918
1008
  executionReserveDescription: "Held for price movement or possible venue charges, not a confirmed fee. Unused funds are returned after execution.",
@@ -976,6 +1066,11 @@ var enUsLabels = {
976
1066
  orderFullyFilled: "Order fully filled",
977
1067
  orderPartiallyFilled: "Order partially filled",
978
1068
  orderAveragePrice: (priceLabel) => `avg. ${priceLabel}`,
1069
+ orderAmount: "Order amount",
1070
+ orderLimitPrice: (priceLabel) => `limit ${priceLabel}`,
1071
+ limitVenueOrder: (venueLabel) => `${venueLabel} limit order`,
1072
+ limitOrderSubmitting: "Submitting limit order...",
1073
+ limitOrderSubmitted: "Limit order submitted",
979
1074
  orderComplete: "Order complete",
980
1075
  orderFilledAtPrice: (venueLabel, priceLabel) => `${venueLabel} order filled at ${priceLabel}`,
981
1076
  orderFilledAtPriceWithAmount: (venueLabel, priceLabel, amountLabel) => `${venueLabel} order filled at ${priceLabel} (${amountLabel})`,
@@ -1058,6 +1153,22 @@ var enUsLabels = {
1058
1153
  cancel: "Cancel",
1059
1154
  fallbackError: "Signature declined. Please try again."
1060
1155
  },
1156
+ connectProphetxModal: {
1157
+ disconnect: "Disconnect ProphetX",
1158
+ disconnecting: "Disconnecting\u2026",
1159
+ disconnectError: "Could not disconnect ProphetX. Finish any open orders and try again.",
1160
+ title: "Connect ProphetX Account",
1161
+ description: "Add your ProphetX access key and secret key to trade with your existing account.",
1162
+ fundingNotice: "Trades use your ProphetX balance. Deposits, withdrawals, and transfers are managed on ProphetX, outside AGG.",
1163
+ instructions: "Create an API key in your ProphetX account settings",
1164
+ accessKey: "Access key",
1165
+ secretKey: "Secret key",
1166
+ verify: "Verify connection",
1167
+ verifying: "Verifying\u2026",
1168
+ error: "Could not connect to ProphetX. Check your credentials and try again.",
1169
+ connected: "Your ProphetX account is connected.",
1170
+ done: "Done"
1171
+ },
1061
1172
  connectKalshiModal: {
1062
1173
  ariaLabel: "Connect Kalshi Account",
1063
1174
  title: "Connect Kalshi Account",
@@ -1104,6 +1215,20 @@ var enUsLabels = {
1104
1215
  }
1105
1216
  },
1106
1217
  eventMarketPage: {
1218
+ loadMoreMarkets: "Load more markets",
1219
+ loadingMoreMarkets: "Loading markets\u2026",
1220
+ openOrders: {
1221
+ title: "Open orders",
1222
+ limitPriceHeader: "Limit price",
1223
+ filledHeader: "Filled",
1224
+ totalHeader: "Total",
1225
+ expirationHeader: "Expiration",
1226
+ // Abbreviated forms for the stacked mobile card.
1227
+ limitShort: "Limit",
1228
+ filledShort: "Filled",
1229
+ totalShort: "Tot.",
1230
+ expirationShort: "Exp."
1231
+ },
1107
1232
  unavailableAria: "Event market page unavailable",
1108
1233
  unavailableTitle: "Something went wrong",
1109
1234
  unavailableDescription: "We're having trouble loading this event right now.\nTry refreshing or check back later.",
@@ -1391,7 +1516,7 @@ var AggBalanceContext = (0, import_react2.createContext)(null);
1391
1516
  // src/execution/query-keys.ts
1392
1517
  var executionKeys = {
1393
1518
  all: () => ["execution"],
1394
- balances: (mode) => mode ? ["execution", "balances", mode] : ["execution", "balances"],
1519
+ balances: (mode, custody) => custody && custody !== "managed" ? ["execution", "balances", mode != null ? mode : "live", custody] : mode ? ["execution", "balances", mode] : ["execution", "balances"],
1395
1520
  positions: (cursor, limit, status, mode) => mode ? ["execution", "positions", cursor != null ? cursor : null, limit != null ? limit : null, status != null ? status : null, mode] : ["execution", "positions", cursor != null ? cursor : null, limit != null ? limit : null, status != null ? status : null],
1396
1521
  positionsPrefix: () => ["execution", "positions"],
1397
1522
  claimablePositionsCount: () => ["execution", "positions", "claimable-count"],
@@ -1437,6 +1562,7 @@ var invalidateBalanceQueries = (queryClient, options) => {
1437
1562
  queryKey: balanceQueryKeys.venuePrefix(),
1438
1563
  refetchType
1439
1564
  });
1565
+ queryClient.invalidateQueries({ queryKey: ["agg", "hosted-venue-account"], refetchType });
1440
1566
  };
1441
1567
  var invalidatePositionQueries = (queryClient, options) => {
1442
1568
  var _a;
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-BBAKQDOH.mjs";
4
+ } from "./chunk-SBGLJDPJ.mjs";
5
5
  import {
6
6
  __async,
7
7
  useAggAuthState,
@@ -11,7 +11,7 @@ import {
11
11
  useDepositAddresses,
12
12
  useOptionalAggClient,
13
13
  useSyncBalances
14
- } from "./chunk-KQ5TOPNY.mjs";
14
+ } from "./chunk-ESDA4NZI.mjs";
15
15
 
16
16
  // src/deposit/normalize-wallet-error.ts
17
17
  function normalizeWalletError(error, supportedChains) {