@xochi/widget 0.0.0-stage → 0.1.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/CHANGELOG.md +76 -0
- package/LICENSE +21 -0
- package/README.md +420 -2
- package/THIRD_PARTY_NOTICES.txt +44 -0
- package/dist/ConfiguratorApp.js +19 -0
- package/dist/EmbedApp.js +57 -0
- package/dist/assets/MonaspaceArgon-Bold-D9kWRRK5.woff2 +0 -0
- package/dist/assets/MonaspaceArgon-Light-Dt_6qXbW.woff2 +0 -0
- package/dist/assets/MonaspaceArgon-Medium-B1gMZwrU.woff2 +0 -0
- package/dist/assets/MonaspaceArgon-Regular-RS-2TGNg.woff2 +0 -0
- package/dist/assets/MonaspaceArgon-SemiBold-PYusZXE_.woff2 +0 -0
- package/dist/assets/MonaspaceNeon-Italic-C9u9eioB.woff2 +0 -0
- package/dist/assets/MonaspaceNeon-Light-CJkxpyfT.woff2 +0 -0
- package/dist/assets/MonaspaceNeon-Medium-DCChELAx.woff2 +0 -0
- package/dist/assets/MonaspaceNeon-Regular-BZtV1wRa.woff2 +0 -0
- package/dist/assets/MonaspaceXenon-Bold-KacFhGOf.woff2 +0 -0
- package/dist/assets/MonaspaceXenon-Medium-Dqqg-cnL.woff2 +0 -0
- package/dist/assets/MonaspaceXenon-Regular-BRsdKART.woff2 +0 -0
- package/dist/assets/MonaspaceXenon-SemiBold-DNjPl3uE.woff2 +0 -0
- package/dist/assets/alipay-3tx9-HPp.svg +1 -0
- package/dist/assets/arb-CCfLcB_X.svg +7 -0
- package/dist/assets/arc-Dy98eSCd.svg +10 -0
- package/dist/assets/aztec-DiLp9qTG.svg +4 -0
- package/dist/assets/base-Ch0ino36.svg +4 -0
- package/dist/assets/cashapp-lOg0DIt8.svg +1 -0
- package/dist/assets/chains/arbitrum.svg.js +4 -0
- package/dist/assets/chains/arc.svg.js +4 -0
- package/dist/assets/chains/aztec.svg.js +4 -0
- package/dist/assets/chains/base.svg.js +4 -0
- package/dist/assets/chains/ethereum.svg.js +4 -0
- package/dist/assets/chains/gnosis.png.js +4 -0
- package/dist/assets/chains/index.js +31 -0
- package/dist/assets/chains/optimism.svg.js +4 -0
- package/dist/assets/chains/polygon.svg.js +4 -0
- package/dist/assets/chains/robinhood.svg.js +4 -0
- package/dist/assets/chains/tron.svg.js +4 -0
- package/dist/assets/chains/xochi.svg.js +4 -0
- package/dist/assets/dai-XuyZLceZ.png +0 -0
- package/dist/assets/defillama-BU037Unq.svg +1 -0
- package/dist/assets/defillama.svg.js +4 -0
- package/dist/assets/eth-Dvbng9UB.svg +8 -0
- package/dist/assets/eurc-NI9zNgOQ.png +0 -0
- package/dist/assets/eure-BH9vpwcv.png +0 -0
- package/dist/assets/gnosis-fRzAZQFj.png +0 -0
- package/dist/assets/mercadopago-gjsFb6F7.svg +1 -0
- package/dist/assets/monzo-B9XD4bL5.png +0 -0
- package/dist/assets/monzo-SZnIdUKN.svg +1 -0
- package/dist/assets/monzo-dark-Bwzg90UC.png +0 -0
- package/dist/assets/n26-cANcjY2T.svg +1 -0
- package/dist/assets/op-DF67SbB6.png +0 -0
- package/dist/assets/optimism-B3cTNxEQ.svg +4 -0
- package/dist/assets/paypal-D8xqXEtN.svg +1 -0
- package/dist/assets/pol-uLmSo2O8.svg +3 -0
- package/dist/assets/rails/SOURCES.md +50 -0
- package/dist/assets/rails/alipay.svg.js +4 -0
- package/dist/assets/rails/cashapp.svg.js +4 -0
- package/dist/assets/rails/index.js +59 -0
- package/dist/assets/rails/mercadopago.svg.js +4 -0
- package/dist/assets/rails/monzo-dark.png.js +4 -0
- package/dist/assets/rails/monzo.png.js +4 -0
- package/dist/assets/rails/monzo.svg.js +4 -0
- package/dist/assets/rails/n26.svg.js +4 -0
- package/dist/assets/rails/paypal.svg.js +4 -0
- package/dist/assets/rails/revolut-dark.png.js +4 -0
- package/dist/assets/rails/revolut.png.js +4 -0
- package/dist/assets/rails/revolut.svg.js +4 -0
- package/dist/assets/rails/venmo.svg.js +4 -0
- package/dist/assets/rails/wise-dark.png.js +4 -0
- package/dist/assets/rails/wise.png.js +4 -0
- package/dist/assets/rails/wise.svg.js +4 -0
- package/dist/assets/rails/xmoney.svg.js +4 -0
- package/dist/assets/rails/zelle.svg.js +4 -0
- package/dist/assets/raxol-86FmC34h.png +0 -0
- package/dist/assets/revolut-CiBtyALA.png +0 -0
- package/dist/assets/revolut-D7qr5Vzs.svg +1 -0
- package/dist/assets/revolut-dark-RQdWGM_p.png +0 -0
- package/dist/assets/robinhood-DgdGTQ1I.svg +8 -0
- package/dist/assets/tokens/arb.svg.js +4 -0
- package/dist/assets/tokens/dai.png.js +4 -0
- package/dist/assets/tokens/eth.svg.js +4 -0
- package/dist/assets/tokens/eurc.png.js +4 -0
- package/dist/assets/tokens/eure.png.js +4 -0
- package/dist/assets/tokens/index.js +36 -0
- package/dist/assets/tokens/op.png.js +4 -0
- package/dist/assets/tokens/pol.svg.js +4 -0
- package/dist/assets/tokens/raxol.png.js +4 -0
- package/dist/assets/tokens/usdc.png.js +4 -0
- package/dist/assets/tokens/usdg.png.js +4 -0
- package/dist/assets/tokens/usdt.png.js +4 -0
- package/dist/assets/tokens/wbtc.png.js +4 -0
- package/dist/assets/tokens/wsteth.png.js +4 -0
- package/dist/assets/tokens/zchf.png.js +4 -0
- package/dist/assets/tron-Dtumyzha.svg +4 -0
- package/dist/assets/usdc-UHSd0FoM.png +0 -0
- package/dist/assets/usdg-Cd5nCzbC.png +0 -0
- package/dist/assets/usdt-3G3YdPq8.png +0 -0
- package/dist/assets/venmo-CMHeCn-D.svg +1 -0
- package/dist/assets/wbtc-CV8uE44Q.png +0 -0
- package/dist/assets/wise-BUOflsWL.svg +1 -0
- package/dist/assets/wise-JLpDvCdq.png +0 -0
- package/dist/assets/wise-dark-_Q8pbCom.png +0 -0
- package/dist/assets/wsteth-BamwtTCR.png +0 -0
- package/dist/assets/xmoney-CwY9KVlD.svg +1 -0
- package/dist/assets/xochi-DL2f8G4R.svg +4 -0
- package/dist/assets/zchf-BLBNdTGJ.png +0 -0
- package/dist/assets/zelle-t15cG4SB.svg +1 -0
- package/dist/browser.js +4 -0
- package/dist/components/AccountChip.js +29 -0
- package/dist/components/ActivityFeed.js +710 -0
- package/dist/components/AssetsStrip.js +133 -0
- package/dist/components/AuthorizedAgents.js +197 -0
- package/dist/components/Chevron.js +22 -0
- package/dist/components/ErrorDisplay.js +66 -0
- package/dist/components/InfoButton.js +27 -0
- package/dist/components/IntentTimeline.js +202 -0
- package/dist/components/LinksSignIn.js +26 -0
- package/dist/components/MobileSigningBanner.js +44 -0
- package/dist/components/PrivacyBars.js +44 -0
- package/dist/components/PrivacyPanel.js +99 -0
- package/dist/components/QuoteDetails.js +327 -0
- package/dist/components/ReceiptCommand.js +46 -0
- package/dist/components/SessionReloadBanner.js +19 -0
- package/dist/components/SolverRace.js +62 -0
- package/dist/components/StealthClaims.js +179 -0
- package/dist/components/SwapFlowModal.js +398 -0
- package/dist/components/Toast.js +40 -0
- package/dist/components/TokenIcon.js +21 -0
- package/dist/components/TokenSearchModal.js +331 -0
- package/dist/components/TransactionPreview.js +207 -0
- package/dist/components/WalletProvider.js +41 -0
- package/dist/components/WrapModal.js +192 -0
- package/dist/components/swap-flow/CantonEscrowPanel.js +28 -0
- package/dist/components/swap-flow/CantonEscrowStatus.js +160 -0
- package/dist/components/swap-flow/DepositInstructions.js +156 -0
- package/dist/components/swap-flow/QrCode.js +22 -0
- package/dist/components/swap-flow/SwapResult.js +323 -0
- package/dist/components/swap-flow/depositScreen.js +36 -0
- package/dist/components/widgetTabsContext.js +17 -0
- package/dist/config.js +132 -0
- package/dist/configurator-model.js +71 -0
- package/dist/configurator.js +11 -0
- package/dist/constants.js +53 -0
- package/dist/hooks/applyTheme.js +10 -0
- package/dist/hooks/useAgentRegistry.js +28 -0
- package/dist/hooks/useAgentStream.js +89 -0
- package/dist/hooks/useCantonEscrow.js +89 -0
- package/dist/hooks/useCapabilities.js +86 -0
- package/dist/hooks/useEmbedLook.js +23 -0
- package/dist/hooks/useFocusTrap.js +44 -0
- package/dist/hooks/useIntent.js +435 -0
- package/dist/hooks/useIntentStatusPoll.js +71 -0
- package/dist/hooks/useIntentStream.js +95 -0
- package/dist/hooks/useLocalActivity.js +114 -0
- package/dist/hooks/useLocalSends.js +15 -0
- package/dist/hooks/useLocalStorage.js +26 -0
- package/dist/hooks/useOrderHistory.js +307 -0
- package/dist/hooks/usePermit.js +131 -0
- package/dist/hooks/usePrices.js +49 -0
- package/dist/hooks/usePublicBalances.js +186 -0
- package/dist/hooks/useRampSummaries.js +19 -0
- package/dist/hooks/useRecipientBalance.js +98 -0
- package/dist/hooks/useSettlements.js +33 -0
- package/dist/hooks/useStealth.js +324 -0
- package/dist/hooks/useStealthClaim.js +183 -0
- package/dist/hooks/useStealthScanner.js +259 -0
- package/dist/hooks/useTheme.js +48 -0
- package/dist/hooks/useTierInfo.js +20 -0
- package/dist/hooks/useTrustScore.js +16 -0
- package/dist/hooks/useWalletSession.js +70 -0
- package/dist/hooks/useWrapEth.js +60 -0
- package/dist/index.js +41 -0
- package/dist/integration.js +19 -0
- package/dist/lib/activityValue.js +20 -0
- package/dist/lib/agentConnect.js +11 -0
- package/dist/lib/agentRegistry.js +83 -0
- package/dist/lib/agentStreamVerify.js +47 -0
- package/dist/lib/api.js +67 -0
- package/dist/lib/auth.js +8 -0
- package/dist/lib/authFetch.js +33 -0
- package/dist/lib/aztecTokens.js +13 -0
- package/dist/lib/balances.js +77 -0
- package/dist/lib/capabilities.js +40 -0
- package/dist/lib/claimSubmitPoll.js +63 -0
- package/dist/lib/debug.js +7 -0
- package/dist/lib/declineGuidance.js +31 -0
- package/dist/lib/displayFallbacks.js +25 -0
- package/dist/lib/eip712.js +38 -0
- package/dist/lib/errorCategory.js +200 -0
- package/dist/lib/errorReport.js +19 -0
- package/dist/lib/explorerLinks.js +30 -0
- package/dist/lib/feesLabel.js +19 -0
- package/dist/lib/glyphs.js +58 -0
- package/dist/lib/hostBridge.js +41 -0
- package/dist/lib/hostOrigin.js +52 -0
- package/dist/lib/intentAPI.js +39 -0
- package/dist/lib/linksSignIn.js +9 -0
- package/dist/lib/localActivity.js +247 -0
- package/dist/lib/localSends.js +129 -0
- package/dist/lib/mobileWallet.js +17 -0
- package/dist/lib/pairAvailability.js +29 -0
- package/dist/lib/paymentSummary.js +23 -0
- package/dist/lib/permits.js +27 -0
- package/dist/lib/priceImpact.js +101 -0
- package/dist/lib/providers.js +124 -0
- package/dist/lib/qr.js +20 -0
- package/dist/lib/quoteCost.js +34 -0
- package/dist/lib/quoteCountdown.js +24 -0
- package/dist/lib/rampHostGate.js +24 -0
- package/dist/lib/rampLifecycle.js +63 -0
- package/dist/lib/receiptCost.js +64 -0
- package/dist/lib/recipient/index.js +302 -0
- package/dist/lib/recipient/recent.js +47 -0
- package/dist/lib/recipientReceipt.js +16 -0
- package/dist/lib/reportClient.js +32 -0
- package/dist/lib/sessionExpiry.js +11 -0
- package/dist/lib/settlementAvailability.js +34 -0
- package/dist/lib/stealth.js +110 -0
- package/dist/lib/swapFlowPhase.js +52 -0
- package/dist/lib/swapStatusCopy.js +59 -0
- package/dist/lib/tradeLifecycle.js +40 -0
- package/dist/lib/tronlink.js +71 -0
- package/dist/lib/walletSession.js +87 -0
- package/dist/pages/Configurator.js +390 -0
- package/dist/pages/Trade.js +635 -0
- package/dist/pages/configurator/AllowedAssetsSection.js +98 -0
- package/dist/pages/configurator/AppearanceSection.js +44 -0
- package/dist/pages/configurator/CodeDock.js +140 -0
- package/dist/pages/configurator/DeveloperSection.js +40 -0
- package/dist/pages/configurator/IntegrationSection.js +105 -0
- package/dist/pages/configurator/LayoutSection.js +83 -0
- package/dist/pages/configurator/PolicyNote.js +7 -0
- package/dist/pages/configurator/PreviewStage.js +165 -0
- package/dist/pages/configurator/PrivacySection.js +54 -0
- package/dist/pages/configurator/RouteSection.js +211 -0
- package/dist/pages/configurator/Settings.js +35 -0
- package/dist/pages/configurator/SharedLinkBanner.js +25 -0
- package/dist/pages/configurator/SurfaceSection.js +124 -0
- package/dist/pages/configurator/WhatUsersSee.js +268 -0
- package/dist/pages/configurator/codeShown.js +8 -0
- package/dist/pages/configurator/configuratorUrl.js +33 -0
- package/dist/pages/configurator/paramsDraft.js +82 -0
- package/dist/pages/configurator/previewModel.js +10 -0
- package/dist/pages/configurator/previewQuote.js +109 -0
- package/dist/pages/configurator/routePicks.js +131 -0
- package/dist/pages/configurator/snippets.js +98 -0
- package/dist/pages/configurator/surfaceParams.js +51 -0
- package/dist/pages/configurator/useCodeCheck.js +79 -0
- package/dist/pages/configurator/useConfiguratorUrl.js +24 -0
- package/dist/pages/configurator/useMediaQuery.js +20 -0
- package/dist/pages/configurator/useParamsDraft.js +33 -0
- package/dist/pages/configurator/usePreviewFee.js +100 -0
- package/dist/pages/send/MetaAddressValue.js +28 -0
- package/dist/pages/send/Receive.js +168 -0
- package/dist/pages/send/RecentRecipients.js +23 -0
- package/dist/pages/send/RecipientChip.js +26 -0
- package/dist/pages/send/ScanRecipient.js +85 -0
- package/dist/pages/send/SendForm.js +516 -0
- package/dist/pages/send/SendPanel.js +30 -0
- package/dist/pages/send/ShieldedDisclosure.js +12 -0
- package/dist/pages/send/StealthInvite.js +27 -0
- package/dist/pages/send/addressSend.js +92 -0
- package/dist/pages/send/sendCopy.js +10 -0
- package/dist/pages/send/sendRetry.js +24 -0
- package/dist/pages/send/stealthRecipient.js +65 -0
- package/dist/pages/send/stealthSend.js +15 -0
- package/dist/pages/send/useAddressSend.js +257 -0
- package/dist/pages/send/useSendRecipient.js +61 -0
- package/dist/pages/trade/BuyPanel.js +70 -0
- package/dist/pages/trade/RampRecovery.js +41 -0
- package/dist/pages/trade/RecipientSheet.js +182 -0
- package/dist/pages/trade/Selectors.js +152 -0
- package/dist/pages/trade/SwapPanel.js +971 -0
- package/dist/pages/trade/WidgetTabs.js +109 -0
- package/dist/pages/trade/canton.js +122 -0
- package/dist/pages/trade/config.js +70 -0
- package/dist/pages/trade/embedNarrowing.js +25 -0
- package/dist/pages/trade/embedParams.js +532 -0
- package/dist/pages/trade/embedTheme.js +9 -0
- package/dist/pages/trade/orderMinimum.js +8 -0
- package/dist/pages/trade/resumeSwap.js +55 -0
- package/dist/pages/trade/settlementCopy.js +32 -0
- package/dist/pages/trade/useAmountFit.js +31 -0
- package/dist/pages/trade/useEmbedDefaults.js +18 -0
- package/dist/pages/trade/useSettlementGating.js +289 -0
- package/dist/pages/trade/useSwapAmount.js +191 -0
- package/dist/pages/trade/useSwapFlow.js +511 -0
- package/dist/pages/trade/useSwapPanel.js +475 -0
- package/dist/pages/trade/useSwapRoute.js +634 -0
- package/dist/pages/trade/useTronLinkFill.js +34 -0
- package/dist/pages/trade/zkMoney.js +46 -0
- package/dist/promiseWithResolvers.js +20 -0
- package/dist/ramp/availability/RailTiles.js +156 -0
- package/dist/ramp/availability/RampDisclosure.js +38 -0
- package/dist/ramp/availability/RampRails.js +170 -0
- package/dist/ramp/availability/model.js +207 -0
- package/dist/ramp/availability/useRampDiscovery.js +83 -0
- package/dist/ramp/offramp/CompletedPrerequisite.js +23 -0
- package/dist/ramp/offramp/OfframpActivityList.js +16 -0
- package/dist/ramp/offramp/OfframpRoute.js +222 -0
- package/dist/ramp/offramp/OfframpRouteReview.js +94 -0
- package/dist/ramp/offramp/PaymentAppSend.js +765 -0
- package/dist/ramp/offramp/localOfframps.js +101 -0
- package/dist/ramp/offramp/model.js +154 -0
- package/dist/ramp/offramp/port.js +134 -0
- package/dist/ramp/offramp/prerequisite.js +143 -0
- package/dist/ramp/offramp/useOfframp.js +505 -0
- package/dist/ramp/offramp/useOfframpRails.js +73 -0
- package/dist/ramp/peer/BuyOnramp.js +292 -0
- package/dist/ramp/peer/OnrampSteps.js +148 -0
- package/dist/ramp/peer/buyerDriver.js +461 -0
- package/dist/ramp/peer/discovery.js +231 -0
- package/dist/ramp/peer/environment.js +7 -0
- package/dist/ramp/peer/liveProvider.js +87 -0
- package/dist/ramp/peer/liveReads.js +488 -0
- package/dist/ramp/peer/maker.js +92 -0
- package/dist/ramp/peer/normalization.js +184 -0
- package/dist/ramp/peer/offramp.js +648 -0
- package/dist/ramp/peer/onramp.js +353 -0
- package/dist/ramp/peer/preview.js +52 -0
- package/dist/ramp/peer/protectedMapping.js +67 -0
- package/dist/ramp/peer/runtime.js +55 -0
- package/dist/ramp/peer/sdkMaker.js +107 -0
- package/dist/ramp/recovery/ResumeOnramp.js +153 -0
- package/dist/ramp/recovery/summaries.js +173 -0
- package/dist/ramp/route/OnrampRoute.js +255 -0
- package/dist/ramp/route/RampRouteSteps.js +148 -0
- package/dist/ramp/route/routeActivity.js +12 -0
- package/dist/ramp/route/useXochiRampDriver.js +203 -0
- package/dist/styles.css +17448 -0
- package/dist/styles.js +2 -0
- package/dist/types/ConfiguratorApp.d.ts +6 -0
- package/dist/types/EmbedApp.d.ts +2 -0
- package/dist/types/activity.js +50 -0
- package/dist/types/asset.d.ts +2 -0
- package/dist/types/assets/chains/index.d.ts +3 -0
- package/dist/types/assets/rails/index.d.ts +12 -0
- package/dist/types/assets/tokens/index.d.ts +1 -0
- package/dist/types/browser.d.ts +1 -0
- package/dist/types/components/AccountChip.d.ts +10 -0
- package/dist/types/components/ActivityFeed.d.ts +46 -0
- package/dist/types/components/AssetsStrip.d.ts +14 -0
- package/dist/types/components/AuthorizedAgents.d.ts +15 -0
- package/dist/types/components/Chevron.d.ts +16 -0
- package/dist/types/components/ErrorDisplay.d.ts +44 -0
- package/dist/types/components/InfoButton.d.ts +6 -0
- package/dist/types/components/IntentTimeline.d.ts +41 -0
- package/dist/types/components/LinksSignIn.d.ts +13 -0
- package/dist/types/components/MobileSigningBanner.d.ts +16 -0
- package/dist/types/components/PermitBadge.d.ts +17 -0
- package/dist/types/components/PrivacyBars.d.ts +12 -0
- package/dist/types/components/PrivacyPanel.d.ts +33 -0
- package/dist/types/components/QuoteDetails.d.ts +56 -0
- package/dist/types/components/RampActivityList.d.ts +14 -0
- package/dist/types/components/ReceiptCommand.d.ts +12 -0
- package/dist/types/components/SessionReloadBanner.d.ts +8 -0
- package/dist/types/components/SolverRace.d.ts +35 -0
- package/dist/types/components/StealthClaims.d.ts +51 -0
- package/dist/types/components/SwapFlowModal.d.ts +138 -0
- package/dist/types/components/Toast.d.ts +10 -0
- package/dist/types/components/TokenIcon.d.ts +17 -0
- package/dist/types/components/TokenSearchModal.d.ts +28 -0
- package/dist/types/components/TransactionPreview.d.ts +34 -0
- package/dist/types/components/WalletProvider.d.ts +12 -0
- package/dist/types/components/WrapModal.d.ts +19 -0
- package/dist/types/components/swap-flow/CantonEscrowPanel.d.ts +14 -0
- package/dist/types/components/swap-flow/CantonEscrowStatus.d.ts +30 -0
- package/dist/types/components/swap-flow/DepositInstructions.d.ts +75 -0
- package/dist/types/components/swap-flow/QrCode.d.ts +18 -0
- package/dist/types/components/swap-flow/SwapResult.d.ts +66 -0
- package/dist/types/components/swap-flow/depositScreen.d.ts +67 -0
- package/dist/types/components/widgetTabsContext.d.ts +21 -0
- package/dist/types/config.d.ts +104 -0
- package/dist/types/configurator-model.d.ts +9 -0
- package/dist/types/configurator.d.ts +3 -0
- package/dist/types/constants.d.ts +52 -0
- package/dist/types/hooks/applyTheme.d.ts +7 -0
- package/dist/types/hooks/useAgentRegistry.d.ts +13 -0
- package/dist/types/hooks/useAgentStream.d.ts +15 -0
- package/dist/types/hooks/useCantonEscrow.d.ts +40 -0
- package/dist/types/hooks/useCapabilities.d.ts +83 -0
- package/dist/types/hooks/useEmbedLook.d.ts +4 -0
- package/dist/types/hooks/useFocusTrap.d.ts +7 -0
- package/dist/types/hooks/useIntent.d.ts +156 -0
- package/dist/types/hooks/useIntentStatusPoll.d.ts +107 -0
- package/dist/types/hooks/useIntentStream.d.ts +34 -0
- package/dist/types/hooks/useLocalActivity.d.ts +22 -0
- package/dist/types/hooks/useLocalSends.d.ts +8 -0
- package/dist/types/hooks/useLocalStorage.d.ts +8 -0
- package/dist/types/hooks/useOrderHistory.d.ts +52 -0
- package/dist/types/hooks/usePermit.d.ts +84 -0
- package/dist/types/hooks/usePrices.d.ts +72 -0
- package/dist/types/hooks/usePublicBalances.d.ts +19 -0
- package/dist/types/hooks/useRampSummaries.d.ts +9 -0
- package/dist/types/hooks/useRecipientBalance.d.ts +58 -0
- package/dist/types/hooks/useSettlements.d.ts +14 -0
- package/dist/types/hooks/useStealth.d.ts +72 -0
- package/dist/types/hooks/useStealthClaim.d.ts +96 -0
- package/dist/types/hooks/useStealthScanner.d.ts +44 -0
- package/dist/types/hooks/useTheme.d.ts +29 -0
- package/dist/types/hooks/useTierInfo.d.ts +23 -0
- package/dist/types/hooks/useTrustScore.d.ts +16 -0
- package/dist/types/hooks/useWalletSession.d.ts +21 -0
- package/dist/types/hooks/useWrapEth.d.ts +21 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +8 -0
- package/dist/types/integration.d.ts +9 -0
- package/dist/types/intent.js +85 -0
- package/dist/types/lib/activityValue.d.ts +16 -0
- package/dist/types/lib/agentConnect.d.ts +23 -0
- package/dist/types/lib/agentRegistry.d.ts +47 -0
- package/dist/types/lib/agentStreamVerify.d.ts +29 -0
- package/dist/types/lib/api.d.ts +41 -0
- package/dist/types/lib/auth.d.ts +6 -0
- package/dist/types/lib/authFetch.d.ts +14 -0
- package/dist/types/lib/aztecTokens.d.ts +15 -0
- package/dist/types/lib/balances.d.ts +88 -0
- package/dist/types/lib/capabilities.d.ts +3 -0
- package/dist/types/lib/claimSubmitPoll.d.ts +114 -0
- package/dist/types/lib/debug.d.ts +13 -0
- package/dist/types/lib/declineGuidance.d.ts +55 -0
- package/dist/types/lib/displayFallbacks.d.ts +7 -0
- package/dist/types/lib/eip712.d.ts +61 -0
- package/dist/types/lib/errorCategory.d.ts +48 -0
- package/dist/types/lib/errorReport.d.ts +15 -0
- package/dist/types/lib/explorerLinks.d.ts +67 -0
- package/dist/types/lib/feesLabel.d.ts +20 -0
- package/dist/types/lib/glyphs.d.ts +52 -0
- package/dist/types/lib/hostBridge.d.ts +11 -0
- package/dist/types/lib/hostOrigin.d.ts +30 -0
- package/dist/types/lib/intentAPI.d.ts +15 -0
- package/dist/types/lib/linksSignIn.d.ts +13 -0
- package/dist/types/lib/localActivity.d.ts +135 -0
- package/dist/types/lib/localSends.d.ts +55 -0
- package/dist/types/lib/mobileWallet.d.ts +27 -0
- package/dist/types/lib/pairAvailability.d.ts +106 -0
- package/dist/types/lib/paymentSummary.d.ts +18 -0
- package/dist/types/lib/permits.d.ts +25 -0
- package/dist/types/lib/priceImpact.d.ts +165 -0
- package/dist/types/lib/providers.d.ts +14 -0
- package/dist/types/lib/qr.d.ts +19 -0
- package/dist/types/lib/quoteCost.d.ts +45 -0
- package/dist/types/lib/quoteCountdown.d.ts +34 -0
- package/dist/types/lib/rampHostGate.d.ts +15 -0
- package/dist/types/lib/rampLifecycle.d.ts +20 -0
- package/dist/types/lib/receiptCost.d.ts +64 -0
- package/dist/types/lib/recipient/index.d.ts +33 -0
- package/dist/types/lib/recipient/recent.d.ts +5 -0
- package/dist/types/lib/recipientReceipt.d.ts +25 -0
- package/dist/types/lib/reportClient.d.ts +9 -0
- package/dist/types/lib/sessionExpiry.d.ts +11 -0
- package/dist/types/lib/settlementAvailability.d.ts +61 -0
- package/dist/types/lib/stealth.d.ts +75 -0
- package/dist/types/lib/swapFlowPhase.d.ts +76 -0
- package/dist/types/lib/swapStatusCopy.d.ts +57 -0
- package/dist/types/lib/tierProgressDisplay.d.ts +35 -0
- package/dist/types/lib/tierUnlock.d.ts +25 -0
- package/dist/types/lib/tradeLifecycle.d.ts +32 -0
- package/dist/types/lib/tronlink.d.ts +62 -0
- package/dist/types/lib/walletSession.d.ts +38 -0
- package/dist/types/pages/Configurator.d.ts +25 -0
- package/dist/types/pages/Trade.d.ts +36 -0
- package/dist/types/pages/configurator/AllowedAssetsSection.d.ts +17 -0
- package/dist/types/pages/configurator/AppearanceSection.d.ts +22 -0
- package/dist/types/pages/configurator/CodeDock.d.ts +19 -0
- package/dist/types/pages/configurator/DeveloperSection.d.ts +12 -0
- package/dist/types/pages/configurator/IntegrationSection.d.ts +20 -0
- package/dist/types/pages/configurator/LayoutSection.d.ts +20 -0
- package/dist/types/pages/configurator/PolicyNote.d.ts +6 -0
- package/dist/types/pages/configurator/PreviewStage.d.ts +22 -0
- package/dist/types/pages/configurator/PrivacySection.d.ts +16 -0
- package/dist/types/pages/configurator/RouteSection.d.ts +30 -0
- package/dist/types/pages/configurator/Settings.d.ts +25 -0
- package/dist/types/pages/configurator/SharedLinkBanner.d.ts +16 -0
- package/dist/types/pages/configurator/SurfaceSection.d.ts +5 -0
- package/dist/types/pages/configurator/WhatUsersSee.d.ts +30 -0
- package/dist/types/pages/configurator/codeShown.d.ts +15 -0
- package/dist/types/pages/configurator/configuratorUrl.d.ts +38 -0
- package/dist/types/pages/configurator/paramsDraft.d.ts +32 -0
- package/dist/types/pages/configurator/previewModel.d.ts +20 -0
- package/dist/types/pages/configurator/previewQuote.d.ts +96 -0
- package/dist/types/pages/configurator/routePicks.d.ts +75 -0
- package/dist/types/pages/configurator/snippets.d.ts +23 -0
- package/dist/types/pages/configurator/surfaceParams.d.ts +9 -0
- package/dist/types/pages/configurator/useCodeCheck.d.ts +56 -0
- package/dist/types/pages/configurator/useConfiguratorUrl.d.ts +21 -0
- package/dist/types/pages/configurator/useMediaQuery.d.ts +5 -0
- package/dist/types/pages/configurator/useParamsDraft.d.ts +29 -0
- package/dist/types/pages/configurator/usePreviewFee.d.ts +74 -0
- package/dist/types/pages/send/MetaAddressValue.d.ts +9 -0
- package/dist/types/pages/send/Receive.d.ts +3 -0
- package/dist/types/pages/send/RecentRecipients.d.ts +3 -0
- package/dist/types/pages/send/RecipientChip.d.ts +4 -0
- package/dist/types/pages/send/ScanRecipient.d.ts +3 -0
- package/dist/types/pages/send/SendForm.d.ts +17 -0
- package/dist/types/pages/send/SendPanel.d.ts +19 -0
- package/dist/types/pages/send/ShieldedDisclosure.d.ts +1 -0
- package/dist/types/pages/send/StealthInvite.d.ts +1 -0
- package/dist/types/pages/send/addressSend.d.ts +62 -0
- package/dist/types/pages/send/sendCopy.d.ts +9 -0
- package/dist/types/pages/send/sendRetry.d.ts +10 -0
- package/dist/types/pages/send/stealthRecipient.d.ts +37 -0
- package/dist/types/pages/send/stealthSend.d.ts +18 -0
- package/dist/types/pages/send/useAddressSend.d.ts +61 -0
- package/dist/types/pages/send/useSendRecipient.d.ts +13 -0
- package/dist/types/pages/trade/BuyPanel.d.ts +22 -0
- package/dist/types/pages/trade/RampRecovery.d.ts +22 -0
- package/dist/types/pages/trade/RecipientSheet.d.ts +11 -0
- package/dist/types/pages/trade/Selectors.d.ts +24 -0
- package/dist/types/pages/trade/SwapPanel.d.ts +34 -0
- package/dist/types/pages/trade/WidgetTabs.d.ts +46 -0
- package/dist/types/pages/trade/canton.d.ts +94 -0
- package/dist/types/pages/trade/config.d.ts +185 -0
- package/dist/types/pages/trade/embedNarrowing.d.ts +28 -0
- package/dist/types/pages/trade/embedParams.d.ts +299 -0
- package/dist/types/pages/trade/embedTheme.d.ts +14 -0
- package/dist/types/pages/trade/harness.d.ts +120 -0
- package/dist/types/pages/trade/orderMinimum.d.ts +5 -0
- package/dist/types/pages/trade/resumeSwap.d.ts +139 -0
- package/dist/types/pages/trade/settlementCopy.d.ts +42 -0
- package/dist/types/pages/trade/useAmountFit.d.ts +25 -0
- package/dist/types/pages/trade/useEmbedDefaults.d.ts +28 -0
- package/dist/types/pages/trade/useSettlementGating.d.ts +152 -0
- package/dist/types/pages/trade/useSwapAmount.d.ts +93 -0
- package/dist/types/pages/trade/useSwapFlow.d.ts +152 -0
- package/dist/types/pages/trade/useSwapPanel.d.ts +170 -0
- package/dist/types/pages/trade/useSwapRoute.d.ts +215 -0
- package/dist/types/pages/trade/useTronLinkFill.d.ts +13 -0
- package/dist/types/pages/trade/zkMoney.d.ts +28 -0
- package/dist/types/promiseWithResolvers.d.ts +12 -0
- package/dist/types/ramp/availability/RailTiles.d.ts +26 -0
- package/dist/types/ramp/availability/RampDisclosure.d.ts +9 -0
- package/dist/types/ramp/availability/RampRails.d.ts +27 -0
- package/dist/types/ramp/availability/model.d.ts +51 -0
- package/dist/types/ramp/availability/useRampDiscovery.d.ts +60 -0
- package/dist/types/ramp/offramp/CompletedPrerequisite.d.ts +5 -0
- package/dist/types/ramp/offramp/OfframpActivityList.d.ts +12 -0
- package/dist/types/ramp/offramp/OfframpRoute.d.ts +8 -0
- package/dist/types/ramp/offramp/OfframpRouteReview.d.ts +12 -0
- package/dist/types/ramp/offramp/PaymentAppSend.d.ts +27 -0
- package/dist/types/ramp/offramp/localOfframps.d.ts +58 -0
- package/dist/types/ramp/offramp/model.d.ts +46 -0
- package/dist/types/ramp/offramp/port.d.ts +55 -0
- package/dist/types/ramp/offramp/prerequisite.d.ts +271 -0
- package/dist/types/ramp/offramp/useOfframp.d.ts +87 -0
- package/dist/types/ramp/offramp/useOfframpRails.d.ts +36 -0
- package/dist/types/ramp/peer/BuyOnramp.d.ts +21 -0
- package/dist/types/ramp/peer/OnrampSteps.d.ts +32 -0
- package/dist/types/ramp/peer/buyerDriver.d.ts +48 -0
- package/dist/types/ramp/peer/discovery.d.ts +17 -0
- package/dist/types/ramp/peer/environment.d.ts +2 -0
- package/dist/types/ramp/peer/index.d.ts +14 -0
- package/dist/types/ramp/peer/liveProvider.d.ts +15 -0
- package/dist/types/ramp/peer/liveReads.d.ts +102 -0
- package/dist/types/ramp/peer/maker.d.ts +4 -0
- package/dist/types/ramp/peer/normalization.d.ts +33 -0
- package/dist/types/ramp/peer/offramp.d.ts +130 -0
- package/dist/types/ramp/peer/onramp.d.ts +134 -0
- package/dist/types/ramp/peer/preview.d.ts +14 -0
- package/dist/types/ramp/peer/protectedMapping.d.ts +22 -0
- package/dist/types/ramp/peer/runtime.d.ts +15 -0
- package/dist/types/ramp/peer/sdkMaker.d.ts +67 -0
- package/dist/types/ramp/peer/types.d.ts +64 -0
- package/dist/types/ramp/recovery/ResumeOnramp.d.ts +37 -0
- package/dist/types/ramp/recovery/summaries.d.ts +71 -0
- package/dist/types/ramp/route/OnrampRoute.d.ts +12 -0
- package/dist/types/ramp/route/RampRouteSteps.d.ts +16 -0
- package/dist/types/ramp/route/routeActivity.d.ts +4 -0
- package/dist/types/ramp/route/useXochiRampDriver.d.ts +22 -0
- package/dist/types/result.js +14 -0
- package/dist/types/styles.d.ts +1 -0
- package/dist/types/types/activity.d.ts +184 -0
- package/dist/types/types/index.d.ts +20 -0
- package/dist/types/types/intent.d.ts +85 -0
- package/dist/types/types/result.d.ts +53 -0
- package/dist/types/utils/format.d.ts +88 -0
- package/dist/types/wagmi.d.ts +142 -0
- package/dist/types/widgetLibModule.d.ts +8 -0
- package/dist/utils/format.js +109 -0
- package/dist/wagmi.js +188 -0
- package/dist/widgetLibModule.js +4 -0
- package/licenses/Monaspace-OFL-1.1.txt +93 -0
- package/licenses/assets.json +132 -0
- package/licenses/rainbowkit-MIT.txt +9 -0
- package/licenses/xochi-shared-MIT.txt +21 -0
- package/package.json +115 -4
package/dist/styles.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The configurator at `/`. Its only provider is a query client, for the one
|
|
3
|
+
* read it makes itself: the solver capability matrix its options are built
|
|
4
|
+
* from. The live preview is an iframe of /embed, which brings its own.
|
|
5
|
+
*/
|
|
6
|
+
export default function ConfiguratorApp(): import("react").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { failureMayHaveMoved } from "@xochi/client";
|
|
2
|
+
function getActivityIcon(type) {
|
|
3
|
+
const icons = {
|
|
4
|
+
swap: "~",
|
|
5
|
+
x402_payment: "$",
|
|
6
|
+
permit: "#"
|
|
7
|
+
};
|
|
8
|
+
return icons[type];
|
|
9
|
+
}
|
|
10
|
+
function getActivityLabel(type) {
|
|
11
|
+
const labels = {
|
|
12
|
+
swap: "Swap",
|
|
13
|
+
x402_payment: "x402 Payment",
|
|
14
|
+
permit: "Permit"
|
|
15
|
+
};
|
|
16
|
+
return labels[type];
|
|
17
|
+
}
|
|
18
|
+
function getSwapStatusBadge(status) {
|
|
19
|
+
const badges = {
|
|
20
|
+
idle: { label: "Pending", className: "status-pending" },
|
|
21
|
+
pending: { label: "Pending", className: "status-pending" },
|
|
22
|
+
quoting: { label: "Pending", className: "status-pending" },
|
|
23
|
+
quoted: { label: "Pending", className: "status-pending" },
|
|
24
|
+
signing: { label: "Pending", className: "status-pending" },
|
|
25
|
+
awaiting_deposit: { label: "Awaiting deposit", className: "status-awaiting" },
|
|
26
|
+
executing: { label: "Processing", className: "status-processing" },
|
|
27
|
+
bridging: { label: "Bridging", className: "status-processing" },
|
|
28
|
+
settling: { label: "Settling", className: "status-processing" },
|
|
29
|
+
completed: { label: "Complete", className: "status-completed" },
|
|
30
|
+
refunded: { label: "Refunded", className: "status-refunded" },
|
|
31
|
+
failed: { label: "Failed", className: "status-failed" },
|
|
32
|
+
expired: { label: "Expired", className: "status-expired" }
|
|
33
|
+
};
|
|
34
|
+
const badge = badges[status];
|
|
35
|
+
return badge ?? { label: status, className: "status-pending" };
|
|
36
|
+
}
|
|
37
|
+
function isReportableSwapStatus(status) {
|
|
38
|
+
return status === "failed" || status === "expired" || status === "refunded";
|
|
39
|
+
}
|
|
40
|
+
function isRetryableSwapStatus(status, substatus) {
|
|
41
|
+
if (status === "failed") return !failureMayHaveMoved(substatus);
|
|
42
|
+
return status === "refunded" || status === "expired";
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
getActivityIcon,
|
|
46
|
+
getActivityLabel,
|
|
47
|
+
getSwapStatusBadge,
|
|
48
|
+
isReportableSwapStatus,
|
|
49
|
+
isRetryableSwapStatus
|
|
50
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface RailLogo {
|
|
2
|
+
readonly light: string;
|
|
3
|
+
readonly dark?: string;
|
|
4
|
+
readonly brandColor?: string;
|
|
5
|
+
/** Aspect ratio of the light image canvas. Dark variants can use different canvas sizes. */
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
/** Minimum distance from the artwork to adjacent content, in units of the light canvas height. */
|
|
9
|
+
readonly clearSpaceRatio: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function railLogo(railId: string): RailLogo | undefined;
|
|
12
|
+
export declare function selectedRailIcon(brand: string | undefined, background: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TOKEN_ICONS: Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AccountChip
|
|
3
|
+
*
|
|
4
|
+
* The connected wallet on the widget's top row: chain badge + short address,
|
|
5
|
+
* opening RainbowKit's account modal (switch / disconnect). Renders nothing
|
|
6
|
+
* while disconnected, because the card's own CTA is the one connect action.
|
|
7
|
+
* On a chain the app does not support RainbowKit offers no account modal, so
|
|
8
|
+
* the chip opens the chain switcher instead of being a dead button.
|
|
9
|
+
*/
|
|
10
|
+
export declare function AccountChip(): import("react").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ActivityFeed Component
|
|
3
|
+
*
|
|
4
|
+
* Wallet activity with expandable swap details and recovery actions.
|
|
5
|
+
*/
|
|
6
|
+
import type { SwapActivityItem } from "../types/activity.js";
|
|
7
|
+
import type { SendActivityItem } from "../lib/localSends.js";
|
|
8
|
+
import type { OfframpActivityItem } from "../ramp/offramp/localOfframps.js";
|
|
9
|
+
import { type RampOperationSummary } from "../ramp/recovery/summaries.js";
|
|
10
|
+
interface LocalHistory {
|
|
11
|
+
sends: readonly SendActivityItem[];
|
|
12
|
+
purchases: readonly RampOperationSummary[];
|
|
13
|
+
cashOuts: readonly OfframpActivityItem[];
|
|
14
|
+
}
|
|
15
|
+
interface ActivityFeedProps {
|
|
16
|
+
activities: SwapActivityItem[];
|
|
17
|
+
localHistory?: LocalHistory;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
error: string | null;
|
|
20
|
+
hasMore: boolean;
|
|
21
|
+
isConnected: boolean;
|
|
22
|
+
enableAgents?: boolean;
|
|
23
|
+
/** Connected wallet; used to choose per-row private-intent recovery. */
|
|
24
|
+
connectedWallet?: string;
|
|
25
|
+
/** Wallet bound to the active SIWE session, when one exists. */
|
|
26
|
+
sessionWallet?: string;
|
|
27
|
+
/** Connected but no wallet session yet: server history needs a one-time sign-in. */
|
|
28
|
+
needsSignIn: boolean;
|
|
29
|
+
/** Sign-in is in progress (wallet signature pending). */
|
|
30
|
+
isSigningIn: boolean;
|
|
31
|
+
/** Prompt the wallet sign-in, then load history. */
|
|
32
|
+
onSignIn: () => void;
|
|
33
|
+
onRefresh: () => void;
|
|
34
|
+
onLoadMore: () => void;
|
|
35
|
+
/** Report a failed/expired/refunded swap from its history row (optional). */
|
|
36
|
+
onReportSwap?: (item: SwapActivityItem) => void;
|
|
37
|
+
/** Re-open the swap panel prefilled with a failed/refunded swap (optional). */
|
|
38
|
+
onRetrySwap?: (item: SwapActivityItem) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Take the user to the claim. Turns the "N claimable" row from a statement
|
|
41
|
+
* into the action it is describing (#352 item 3).
|
|
42
|
+
*/
|
|
43
|
+
onClaimNudge?: () => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function ActivityFeed({ activities, localHistory, isLoading, error, hasMore, isConnected, enableAgents, connectedWallet, sessionWallet, needsSignIn, isSigningIn, onSignIn, onRefresh, onLoadMore, onReportSwap, onRetrySwap, onClaimNudge, }: ActivityFeedProps): import("react").JSX.Element;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AssetsStrip
|
|
3
|
+
*
|
|
4
|
+
* Compact holdings row for the unified launch screen. Shows the connected
|
|
5
|
+
* wallet's total value with a few token chips and a claimable-settlements
|
|
6
|
+
* badge; expands to a per-token breakdown. Renders nothing when no wallet is
|
|
7
|
+
* connected: the form CTA is the page's one contextual wallet action
|
|
8
|
+
* (trade-widget-mvp.md Phase 2), so this component must never grow its own
|
|
9
|
+
* connect prompt back.
|
|
10
|
+
*
|
|
11
|
+
* Balances are read client-side (usePublicBalances, L1 EVM) and priced via
|
|
12
|
+
* usePrices. There is no server-side balance endpoint.
|
|
13
|
+
*/
|
|
14
|
+
export declare function AssetsStrip(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AuthorizedAgents
|
|
3
|
+
*
|
|
4
|
+
* Lists the agents this wallet has authorized to act on its behalf, each with a
|
|
5
|
+
* private stream key. Authorized agents can stream their swap activity into
|
|
6
|
+
* the feed live; the server never learns the link. Each row can reveal a
|
|
7
|
+
* copyable setup so you can hand the key to your own agent out of band.
|
|
8
|
+
*
|
|
9
|
+
* Phase 3.0: the client-side registry + a manual authorize/revoke + the handoff.
|
|
10
|
+
* The signed Mandate flow that auto-populates this lands with the agent-auth
|
|
11
|
+
* surface.
|
|
12
|
+
*/
|
|
13
|
+
export declare function AuthorizedAgents({ enabled }: {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chevron -- the one disclosure/dropdown affordance.
|
|
3
|
+
*
|
|
4
|
+
* A single glyph that ROTATES 180deg on open (via CSS), rather than swapping a
|
|
5
|
+
* character (the old "^" / "v" pattern) or re-inlining the same <path> per
|
|
6
|
+
* component. Purely decorative: aria-hidden, since the control it sits inside
|
|
7
|
+
* carries the accessible name and aria-expanded state.
|
|
8
|
+
*/
|
|
9
|
+
interface ChevronProps {
|
|
10
|
+
/** Rotates the chevron up when true (disclosure open / dropdown expanded). */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
/** Extra class for size/color overrides at the call site. */
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Chevron({ open, className }: ChevronProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorDisplay Component
|
|
3
|
+
*
|
|
4
|
+
* Displays error messages with retry functionality.
|
|
5
|
+
* Supports both raw string errors and structured error objects
|
|
6
|
+
* with status codes, retry timers, and categorized messaging.
|
|
7
|
+
*
|
|
8
|
+
* The category/copy mapping lives in `../lib/errorCategory` so the swap result
|
|
9
|
+
* view can reuse the exact same friendly copy.
|
|
10
|
+
*/
|
|
11
|
+
import type { StructuredError } from "@xochi/client";
|
|
12
|
+
interface ErrorDisplayProps {
|
|
13
|
+
/** Error message or structured error object */
|
|
14
|
+
error: string | StructuredError | null;
|
|
15
|
+
/** Callback when retry is clicked */
|
|
16
|
+
onRetry?: () => void;
|
|
17
|
+
/** Whether a retry is in progress */
|
|
18
|
+
isRetrying?: boolean;
|
|
19
|
+
/** Optional custom class name */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Solver-supported origin tokens for the "what you can send" copy. */
|
|
22
|
+
originTokens?: readonly string[];
|
|
23
|
+
/** Machine category from the declined quote or structured HTTP failure. */
|
|
24
|
+
errorCategory?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The intent ended `may-have-moved`: show that ending's notice instead of the
|
|
27
|
+
* categorized copy, and never a Retry beside it.
|
|
28
|
+
*/
|
|
29
|
+
mayHaveMoved?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Seconds remaining until an ABSOLUTE unix-seconds `retryAfter`, or null when the
|
|
33
|
+
* target is absent or already past. Pure so it can seed the hook's initial state
|
|
34
|
+
* (server render / first paint show the countdown without waiting for an effect).
|
|
35
|
+
*/
|
|
36
|
+
export declare function computeRemaining(retryAfter?: number): number | null;
|
|
37
|
+
/**
|
|
38
|
+
* Live countdown to an absolute unix-seconds `retryAfter`. Seeds from
|
|
39
|
+
* computeRemaining so the first render already reflects the wait, then ticks each
|
|
40
|
+
* second. Shared by ErrorDisplay and the swap result view.
|
|
41
|
+
*/
|
|
42
|
+
export declare function useCountdown(retryAfter?: number): number | null;
|
|
43
|
+
export declare function ErrorDisplay({ error, onRetry, isRetrying, className, originTokens, errorCategory, mayHaveMoved, }: ErrorDisplayProps): import("react").JSX.Element | null;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type SendRecipientDisplay } from "../pages/send/sendCopy.js";
|
|
2
|
+
import type { IntentStatus, SelectableChainId } from "../types/intent.js";
|
|
3
|
+
interface IntentTimelineProps {
|
|
4
|
+
status: IntentStatus;
|
|
5
|
+
isCrossChain: boolean;
|
|
6
|
+
fromChainId: SelectableChainId;
|
|
7
|
+
toChainId: SelectableChainId;
|
|
8
|
+
/** Origin transaction hash (deposit/send leg). */
|
|
9
|
+
txHash: string | null;
|
|
10
|
+
/** Destination fill hash (cross-chain); surfaces a second link when present. */
|
|
11
|
+
receivingTxHash?: string | null;
|
|
12
|
+
/** Public fill receipt (Riddler #632) + its chain; the receipt link keys off these. */
|
|
13
|
+
settlementTxHash?: string | null;
|
|
14
|
+
settlementChainId?: SelectableChainId | null;
|
|
15
|
+
/** Riddler's granular fill substatus; `filled` confirms the destination leg landed. */
|
|
16
|
+
substatus?: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Stealth settlement. A delivered stealth leg is NOT a finished swap: the money
|
|
19
|
+
* is at the one-time address but taking custody needs the claim, so the
|
|
20
|
+
* delivered copy must not read like a public fill (xochi#376).
|
|
21
|
+
*/
|
|
22
|
+
isStealth?: boolean;
|
|
23
|
+
/** `"other"`: the Stealth payout is someone else's to claim, not this wallet's. */
|
|
24
|
+
stealthPayee?: "self" | "other";
|
|
25
|
+
sendRecipientDisplay?: SendRecipientDisplay;
|
|
26
|
+
/**
|
|
27
|
+
* Deposit route (Tron origin): the user sends from an external wallet and
|
|
28
|
+
* nothing is signed, so the timeline opens on the deposit rather than a
|
|
29
|
+
* signature that never happened.
|
|
30
|
+
*/
|
|
31
|
+
isDeposit?: boolean;
|
|
32
|
+
startTime?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Seconds; the normal-fill envelope. NO LONGER DISPLAYED. It only flags a
|
|
35
|
+
* fill that has run unusually long (drives the "taking longer than usual"
|
|
36
|
+
* note), since the visible timer counts up from the start instead.
|
|
37
|
+
*/
|
|
38
|
+
estimatedDuration?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function IntentTimeline({ status, isCrossChain, fromChainId, toChainId, txHash, receivingTxHash, settlementTxHash, settlementChainId, substatus, isStealth, stealthPayee, sendRecipientDisplay, isDeposit, startTime, estimatedDuration, }: IntentTimelineProps): import("react").JSX.Element;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const LINKS_SIGN_IN_LABEL = "Sign in with your wallet to see transaction links";
|
|
2
|
+
export type LinksSignInAction = {
|
|
3
|
+
kind: "sign_in";
|
|
4
|
+
onSignIn: () => void;
|
|
5
|
+
isSigningIn: boolean;
|
|
6
|
+
} | {
|
|
7
|
+
kind: "switch_wallet";
|
|
8
|
+
ownerWallet: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function LinksSignIn({ action, className, }: {
|
|
11
|
+
action: LinksSignInAction;
|
|
12
|
+
className: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MobileSigningBanner
|
|
3
|
+
*
|
|
4
|
+
* On some mobile browsers -- DuckDuckGo especially -- aggressive storage
|
|
5
|
+
* partitioning breaks the WalletConnect session, so the sign request never
|
|
6
|
+
* reaches the wallet and a swap can never be signed. Safari works, and Coinbase
|
|
7
|
+
* Wallet is relay-free, so this banner points relay-bound mobile users at a path
|
|
8
|
+
* that actually signs. Shown only on a mobile browser that is not already a wallet
|
|
9
|
+
* in-app browser; dismissible and remembered.
|
|
10
|
+
*
|
|
11
|
+
* (An "Open in MetaMask" one-tap deep link is the nicer fix, but MetaMask's in-app
|
|
12
|
+
* browser currently crashes to a blank page; see the mobile signing issue. Until
|
|
13
|
+
* that is fixed we guide to Safari / Coinbase, which work today.)
|
|
14
|
+
*/
|
|
15
|
+
import "../styles/mobile-signing-banner.css";
|
|
16
|
+
export declare function MobileSigningBanner(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PermitBadge Component
|
|
3
|
+
*
|
|
4
|
+
* Displays the permit type and signed status for token authorization.
|
|
5
|
+
* Shows ERC-3009 (USDC), Permit2, or EIP-2612 based on token.
|
|
6
|
+
*/
|
|
7
|
+
import type { PermitType } from "../types/intent.js";
|
|
8
|
+
import "../styles/permit-badge.css";
|
|
9
|
+
interface PermitBadgeProps {
|
|
10
|
+
permitType: PermitType;
|
|
11
|
+
tokenSymbol: string;
|
|
12
|
+
isSigned: boolean;
|
|
13
|
+
needsPermit: boolean;
|
|
14
|
+
showDetails?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function PermitBadge({ permitType, tokenSymbol, isSigned, needsPermit, showDetails, }: PermitBadgeProps): import("react").JSX.Element | null;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PrivacyBars
|
|
3
|
+
*
|
|
4
|
+
* Three ascending bars that signal a settlement's privacy depth at a glance:
|
|
5
|
+
* more filled bars = more private. Public fills 1, Stealth fills 2. `active`
|
|
6
|
+
* inks the filled bars in the current accent; inactive renders them ghosted so
|
|
7
|
+
* the shape still reads.
|
|
8
|
+
*/
|
|
9
|
+
export declare function PrivacyBars({ count, active }: {
|
|
10
|
+
count: number;
|
|
11
|
+
active: boolean;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PrivacyPanel
|
|
3
|
+
*
|
|
4
|
+
* Unified privacy control panel for the Assets page.
|
|
5
|
+
* Replaces: trust card, Aztec card, stealth card, info panel.
|
|
6
|
+
* Progressive disclosure: compact by default, expandable for detail.
|
|
7
|
+
*/
|
|
8
|
+
import "../styles/privacy-panel.css";
|
|
9
|
+
interface PrivacyPanelProps {
|
|
10
|
+
trustScore: number;
|
|
11
|
+
/**
|
|
12
|
+
* Whether attestation disclosures are actionable yet (Xochi's
|
|
13
|
+
* VERIFICATION_BETA_LIVE flag). While it is off, the section is glassed out
|
|
14
|
+
* (non-interactive, "Soon") since connecting a provider would do nothing.
|
|
15
|
+
*/
|
|
16
|
+
disclosuresLive?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether shielded accounts (Aztec L2 balances) are usable yet. While false
|
|
19
|
+
* the panel shows an inert "Unavailable" row so the receive surface names the mode
|
|
20
|
+
* without offering setup that would do nothing. Defaults to NOT live: an
|
|
21
|
+
* omitted prop should never be read as a promise that the rail works.
|
|
22
|
+
*/
|
|
23
|
+
shieldedAccountsLive?: boolean;
|
|
24
|
+
connectedProviders: string[];
|
|
25
|
+
isConnected: boolean;
|
|
26
|
+
stealthInitialized: boolean;
|
|
27
|
+
stealthRegistered: boolean;
|
|
28
|
+
onInitializeStealth: () => void;
|
|
29
|
+
onRegisterStealth: () => void;
|
|
30
|
+
stealthLoading: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function PrivacyPanel({ trustScore, disclosuresLive, shieldedAccountsLive, connectedProviders, isConnected, stealthInitialized, stealthRegistered, onInitializeStealth, onRegisterStealth, stealthLoading, }: PrivacyPanelProps): import("react").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QuoteDetails Component
|
|
3
|
+
*
|
|
4
|
+
* The compact quote panel. At rest it states the payout and the failure
|
|
5
|
+
* outcome in one headline, the all-in gap to market in one line, the route and
|
|
6
|
+
* privacy, the payment path, and the rate. The rate line opens the drawer:
|
|
7
|
+
* fees, the spread, the total against market, the market reference, the fee
|
|
8
|
+
* split and the tier note.
|
|
9
|
+
*
|
|
10
|
+
* Two cost measurements, labelled apart: the gap to market (an estimate from
|
|
11
|
+
* the price feed, the only figure that sees the exchange rate, so it is
|
|
12
|
+
* all-in) and "Fees" (the server's `cost_bps`, which sees fees and network
|
|
13
|
+
* cost only, so it is never called a total or all-in). Every figure derives
|
|
14
|
+
* from the one quote this component is handed. Each appears only when its own
|
|
15
|
+
* input is available.
|
|
16
|
+
*/
|
|
17
|
+
import type { QuoteResponse, SelectableChainId, PermitType, OriginApproval, SettlementType } from "../types/intent.js";
|
|
18
|
+
interface QuoteDetailsProps {
|
|
19
|
+
quote: QuoteResponse;
|
|
20
|
+
fromAmount: string;
|
|
21
|
+
fromSymbol: string;
|
|
22
|
+
fromDecimals: number;
|
|
23
|
+
toSymbol: string;
|
|
24
|
+
toDecimals: number;
|
|
25
|
+
fromChainId: SelectableChainId;
|
|
26
|
+
toChainId: SelectableChainId;
|
|
27
|
+
permitType?: PermitType;
|
|
28
|
+
/** Whether the pull needs an approval transaction first (usePermit, on-chain allowance). */
|
|
29
|
+
approval: OriginApproval;
|
|
30
|
+
/** The settlement the user selected, confirmed here against the quote. */
|
|
31
|
+
settlement: SettlementType;
|
|
32
|
+
/** Trust score; used to derive the fee anatomy when the quote omits it. */
|
|
33
|
+
trustScore: number;
|
|
34
|
+
/**
|
|
35
|
+
* Whether credentials change the fee tier (Xochi's TRUST_ECONOMICS_LIVE flag,
|
|
36
|
+
* served on /api/capabilities). The "a higher tier would pay less" line is
|
|
37
|
+
* shown only while it is on. Defaults to off: an omitted prop must never
|
|
38
|
+
* promise a fee benefit.
|
|
39
|
+
*/
|
|
40
|
+
trustEconomicsLive?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Seconds until the quote hard-expires (useIntent.quoteExpiresIn). The panel
|
|
43
|
+
* auto-reprices before expiry, so the timer counts down to that refresh.
|
|
44
|
+
*/
|
|
45
|
+
quoteExpiresIn?: number | null;
|
|
46
|
+
/**
|
|
47
|
+
* The zk.money tag this quote pays (no `@`). Arrival fees are disclosed separately.
|
|
48
|
+
*/
|
|
49
|
+
recipientTag?: string;
|
|
50
|
+
swapRecipientLabel?: string;
|
|
51
|
+
sendRecipientLabel?: string;
|
|
52
|
+
/** The Send payee and route are already displayed above the receipt. */
|
|
53
|
+
sendMode?: "Stealth" | "Shielded";
|
|
54
|
+
}
|
|
55
|
+
export declare function QuoteDetails({ quote, fromAmount, fromSymbol, fromDecimals, toSymbol, toDecimals, fromChainId, toChainId, permitType, approval, settlement, trustScore, trustEconomicsLive, quoteExpiresIn, recipientTag, swapRecipientLabel, sendRecipientLabel, sendMode, }: QuoteDetailsProps): import("react").JSX.Element;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RampActivityList
|
|
3
|
+
*
|
|
4
|
+
* Peer onramp purchases in Activity, beside the swap log and public sends.
|
|
5
|
+
* Each row is a sanitized local summary (ramp/recovery/summaries): what the
|
|
6
|
+
* review screen showed and a bounded state. No provider id, payment handle or
|
|
7
|
+
* transaction link is stored for it, so none is shown. Renders nothing for a
|
|
8
|
+
* wallet without purchases.
|
|
9
|
+
*/
|
|
10
|
+
import type { RampOperationSummary } from "../ramp/recovery/summaries.js";
|
|
11
|
+
export declare function RampActivityList({ ramps, wallet, }: {
|
|
12
|
+
ramps: readonly RampOperationSummary[];
|
|
13
|
+
wallet: string | undefined;
|
|
14
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The recipient receipt step on a shielded payout row: where to run the
|
|
3
|
+
* command, what it needs, and a Copy that puts only the command on the
|
|
4
|
+
* clipboard. The session token is never copied: the recipient supplies the
|
|
5
|
+
* same XOCHI_JWT and options they used for `enroll`.
|
|
6
|
+
*
|
|
7
|
+
* Copy follows the agents panel (AuthorizedAgents): a refused clipboard selects
|
|
8
|
+
* the command and says to copy it by hand. Both outcomes are announced.
|
|
9
|
+
*/
|
|
10
|
+
export declare function ReceiptCommand({ command }: {
|
|
11
|
+
command: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionReloadBanner
|
|
3
|
+
*
|
|
4
|
+
* Listens for the one-shot session-expired signal (fired when an authed API
|
|
5
|
+
* call returns a 401 expired-token) and shows a fixed banner prompting a
|
|
6
|
+
* reload -- which pulls a fresh build and a new login.
|
|
7
|
+
*/
|
|
8
|
+
export declare function SessionReloadBanner(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SolverRace
|
|
3
|
+
*
|
|
4
|
+
* Live view of the fill race while an intent executes: one lane per competing
|
|
5
|
+
* solver, a running clock, and the winner flagged when the round resolves.
|
|
6
|
+
* Renders inside SwapFlowModal's progress view above IntentTimeline. The
|
|
7
|
+
* timeline says where the swap is; this says who is fighting to fill it.
|
|
8
|
+
*
|
|
9
|
+
* HONESTY RULES. This component sits on the screen at the moment a user is
|
|
10
|
+
* waiting on their money, which is exactly when a reassuring animation is most
|
|
11
|
+
* tempting and least defensible:
|
|
12
|
+
*
|
|
13
|
+
* - Lanes render only from real `solver_bid` / `race_won` frames. No frames --
|
|
14
|
+
* Riddler has not shipped race telemetry for the route, the socket died, or
|
|
15
|
+
* the quote carried no stream topic -- renders the sealed-intent line alone,
|
|
16
|
+
* which is true unconditionally. It never invents bids or animates fake
|
|
17
|
+
* competitors.
|
|
18
|
+
* - With one active solver the copy leads with speed and sealed intents rather
|
|
19
|
+
* than "competition", because there is not any.
|
|
20
|
+
* - The clock freezes on the server's `elapsedMs` at race_won. The local timer
|
|
21
|
+
* is display-only and never outruns the server's number.
|
|
22
|
+
* - HANDLES ONLY, no figures (register R19). Bid amounts and improvement bps
|
|
23
|
+
* arrive on the frames, and rendering them would promise money: the payout
|
|
24
|
+
* pays the signed quote exactly, and no settlement path can pay a winning
|
|
25
|
+
* bid today. Until the delivered amount is a served field and improvements
|
|
26
|
+
* are actually payable, a lane is a solver handle and a status word.
|
|
27
|
+
*/
|
|
28
|
+
import type { RaceWebSocketMessage } from "../types/intent.js";
|
|
29
|
+
interface SolverRaceProps {
|
|
30
|
+
raceEvents: RaceWebSocketMessage[];
|
|
31
|
+
/** True once the intent reached a terminal or settling state (stops the clock). */
|
|
32
|
+
settled: boolean;
|
|
33
|
+
}
|
|
34
|
+
export declare function SolverRace({ raceEvents, settled }: SolverRaceProps): import("react").JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StealthClaims
|
|
3
|
+
*
|
|
4
|
+
* Displays claimable stealth payments found by scanning ERC-5564 announcements.
|
|
5
|
+
* Users can scan for payments, view details, and claim (gasless via Pimlico).
|
|
6
|
+
*/
|
|
7
|
+
import type { ClaimResult } from "../hooks/useStealthClaim.js";
|
|
8
|
+
import type { ChainStealthPayment } from "../hooks/useStealthScanner.js";
|
|
9
|
+
interface StealthClaimsProps {
|
|
10
|
+
payments: ChainStealthPayment[];
|
|
11
|
+
isScanning: boolean;
|
|
12
|
+
isClaiming: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The in-progress claim was sent and is waiting to be mined; it is being
|
|
15
|
+
* checked on, not failed. Shown as a pending state, never as an error.
|
|
16
|
+
*/
|
|
17
|
+
isConfirming?: boolean;
|
|
18
|
+
/** True only when secret keys are in memory (keysReady), not merely cached */
|
|
19
|
+
isStealthReady: boolean;
|
|
20
|
+
/** Re-derive keys from a wallet signature (used post-reload before scanning) */
|
|
21
|
+
onResign: () => void;
|
|
22
|
+
/** Whether a re-sign (key derivation) is in progress */
|
|
23
|
+
isResigning: boolean;
|
|
24
|
+
walletAddress: string | undefined;
|
|
25
|
+
error: string | null;
|
|
26
|
+
lastScannedBlock: bigint | null;
|
|
27
|
+
/** A scan has completed this session (drives the honest empty state) */
|
|
28
|
+
hasScanned: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The announcements index is wallet-session gated, so scanning is impossible
|
|
31
|
+
* without signing in. True when that is the only thing in the way.
|
|
32
|
+
*/
|
|
33
|
+
needsSignIn: boolean;
|
|
34
|
+
isSigningIn: boolean;
|
|
35
|
+
onSignIn: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* Settlements the server already holds as claimable for this wallet. Lets the
|
|
38
|
+
* panel say "you have something waiting" BEFORE a scan has run -- the scan
|
|
39
|
+
* needs keys in memory, which a returning user does not have.
|
|
40
|
+
*/
|
|
41
|
+
claimableCount?: number;
|
|
42
|
+
onScan: () => Promise<void>;
|
|
43
|
+
onClaim: (payment: ChainStealthPayment, recipient: string) => Promise<ClaimResult>;
|
|
44
|
+
onClaimAll: (recipient: string) => Promise<{
|
|
45
|
+
claimed: number;
|
|
46
|
+
failed: number;
|
|
47
|
+
pending: number;
|
|
48
|
+
}>;
|
|
49
|
+
}
|
|
50
|
+
export declare function StealthClaims({ payments, isScanning, isClaiming, isConfirming, isStealthReady, onResign, isResigning, walletAddress, error, lastScannedBlock, hasScanned, needsSignIn, isSigningIn, onSignIn, claimableCount, onScan, onClaim, onClaimAll, }: StealthClaimsProps): import("react").JSX.Element;
|
|
51
|
+
export {};
|