@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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatting Utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared formatting functions for strings, numbers, and dates.
|
|
5
|
+
* Token-amount conversion uses integer arithmetic to avoid precision loss.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Format a BigInt token amount to a human-readable string.
|
|
9
|
+
*
|
|
10
|
+
* @param amount - Token amount as BigInt (in smallest unit, e.g., wei)
|
|
11
|
+
* @param decimals - Token decimals (e.g., 18 for ETH, 6 for USDC)
|
|
12
|
+
* @param displayDecimals - Max decimal places to show (default: 4)
|
|
13
|
+
* @returns Formatted string with proper decimal placement
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* formatTokenAmount(1234567890123456789n, 18) // "1.2345"
|
|
17
|
+
* formatTokenAmount(1000000n, 6) // "1"
|
|
18
|
+
* formatTokenAmount(123456n, 6, 2) // "0.12"
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatTokenAmount(amount: bigint, decimals: number, displayDecimals?: number): string;
|
|
21
|
+
/**
|
|
22
|
+
* Parse a human-readable token amount string to BigInt.
|
|
23
|
+
*
|
|
24
|
+
* @param input - User input string (e.g., "1.5", "0.001")
|
|
25
|
+
* @param decimals - Token decimals (e.g., 18 for ETH, 6 for USDC)
|
|
26
|
+
* @returns BigInt amount in smallest unit
|
|
27
|
+
* @throws Error if input is invalid
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* parseTokenAmount("1.5", 18) // 1500000000000000000n
|
|
31
|
+
* parseTokenAmount("1", 6) // 1000000n
|
|
32
|
+
* parseTokenAmount("0.000001", 6) // 1n
|
|
33
|
+
* parseTokenAmount("-1", 18) // throws: token amounts are never negative
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseTokenAmount(input: string, decimals: number): bigint;
|
|
36
|
+
/** Truncate an address for display. */
|
|
37
|
+
export declare function truncateAddress(address: string, prefixLength?: number, suffixLength?: number): string;
|
|
38
|
+
/**
|
|
39
|
+
* Format a timestamp as relative time (e.g., "5m ago", "2h ago").
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatTimeAgo(timestamp: number): string;
|
|
42
|
+
/**
|
|
43
|
+
* Parse a value to bigint without ever throwing.
|
|
44
|
+
*
|
|
45
|
+
* Returns `fallback` for null/empty input or anything BigInt() rejects --
|
|
46
|
+
* decimals like "0.05" (a USD-formatted field landing where wei was expected),
|
|
47
|
+
* non-numeric strings, etc. Quote/amount fields from the API are not always
|
|
48
|
+
* clean integers; a malformed one must degrade gracefully, never white-screen
|
|
49
|
+
* the page (regression: BigInt("0.05") used to crash the trade view).
|
|
50
|
+
*/
|
|
51
|
+
export declare function safeBigInt(value: string | number | null | undefined, fallback?: bigint): bigint;
|
|
52
|
+
/**
|
|
53
|
+
* Format a raw on-chain token amount string for compact row display.
|
|
54
|
+
*
|
|
55
|
+
* Parses a smallest-unit integer string, shows up to 4 decimal places with
|
|
56
|
+
* trailing zeros trimmed, and returns "..." for non-integer input. No
|
|
57
|
+
* thousands separators (distinct from shared formatTokenAmount).
|
|
58
|
+
*/
|
|
59
|
+
export declare function formatRawAmount(amount: string, decimals: number): string;
|
|
60
|
+
/**
|
|
61
|
+
* Display decimals for a payout figure, chosen from its magnitude so a large
|
|
62
|
+
* amount never needs truncating and a small one keeps its significant digits:
|
|
63
|
+
* 2 at or above 1,000 whole tokens, 4 at or above 1, 6 below. Pure BigInt, so a
|
|
64
|
+
* 4e21-wei RAXOL payout is never routed through a lossy Number.
|
|
65
|
+
*/
|
|
66
|
+
export declare function payoutDisplayDecimals(amount: bigint, decimals: number): number;
|
|
67
|
+
/**
|
|
68
|
+
* Display decimals for the payout FIELD, which is narrower than any other place
|
|
69
|
+
* the payout is shown: at 390px it is about 69px beside the token selector, and
|
|
70
|
+
* its type shrinks to a floor (`.amount-fit`, trade-layout.css). Whole tokens
|
|
71
|
+
* only at or above 100,000, so every payout below 10,000,000 fits in 9
|
|
72
|
+
* characters ("99,999.99", "9,999,999") and never clips. The field truncates,
|
|
73
|
+
* so it never overstates; the quote headline carries the payout to the cent.
|
|
74
|
+
*/
|
|
75
|
+
export declare function payoutFieldDecimals(amount: bigint, decimals: number): number;
|
|
76
|
+
/** How many token symbols to spell out in copy before eliding to "and more". */
|
|
77
|
+
export declare const SUPPORTED_TOKEN_DISPLAY_MAX = 3;
|
|
78
|
+
/**
|
|
79
|
+
* Human-readable list of token symbols for UI copy, capped at `max` with an
|
|
80
|
+
* "and more" overflow once the canonical list grows past it.
|
|
81
|
+
*
|
|
82
|
+
* [] -> ""
|
|
83
|
+
* ["USDC"] -> "USDC"
|
|
84
|
+
* ["USDC","USDT"] -> "USDC and USDT"
|
|
85
|
+
* ["USDC","USDT","WETH"] -> "USDC, USDT and WETH"
|
|
86
|
+
* ["USDC","USDT","WETH","DAI"] -> "USDC, USDT, WETH and more" (max 3)
|
|
87
|
+
*/
|
|
88
|
+
export declare function formatSupportedTokens(symbols: readonly string[], max?: number): string;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { type Wallet } from "@rainbow-me/rainbowkit";
|
|
2
|
+
import { type Config } from "wagmi";
|
|
3
|
+
import type { HostConnection } from "@xochi/widget-lib";
|
|
4
|
+
export declare const robinhood: {
|
|
5
|
+
blockExplorers: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly name: "Blockscout";
|
|
8
|
+
readonly url: "https://robinhoodchain.blockscout.com";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
blockTime?: number | undefined | undefined;
|
|
12
|
+
contracts?: {
|
|
13
|
+
[x: string]: import("viem").ChainContract | {
|
|
14
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
15
|
+
} | undefined;
|
|
16
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
17
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
18
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
19
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
ensTlds?: readonly string[] | undefined;
|
|
22
|
+
id: 4663;
|
|
23
|
+
name: "Robinhood Chain";
|
|
24
|
+
nativeCurrency: {
|
|
25
|
+
readonly name: "Ether";
|
|
26
|
+
readonly symbol: "ETH";
|
|
27
|
+
readonly decimals: 18;
|
|
28
|
+
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
30
|
+
rpcUrls: {
|
|
31
|
+
readonly default: {
|
|
32
|
+
readonly http: readonly ["https://rpc.mainnet.chain.robinhood.com"];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
sourceId?: number | undefined | undefined;
|
|
36
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
37
|
+
testnet?: boolean | undefined | undefined;
|
|
38
|
+
custom?: Record<string, unknown> | undefined;
|
|
39
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
40
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
41
|
+
formatters?: undefined;
|
|
42
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
43
|
+
client: import("viem").Client;
|
|
44
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
45
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
46
|
+
client: import("viem").Client;
|
|
47
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
48
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
49
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
50
|
+
}] | undefined;
|
|
51
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
52
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
53
|
+
};
|
|
54
|
+
export declare const arc: {
|
|
55
|
+
blockExplorers: {
|
|
56
|
+
readonly default: {
|
|
57
|
+
readonly name: "Arc Explorer";
|
|
58
|
+
readonly url: "https://explorer.arc.io";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
blockTime?: number | undefined | undefined;
|
|
62
|
+
contracts?: {
|
|
63
|
+
[x: string]: import("viem").ChainContract | {
|
|
64
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
67
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
68
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
69
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
ensTlds?: readonly string[] | undefined;
|
|
72
|
+
id: 5042;
|
|
73
|
+
name: "Arc";
|
|
74
|
+
nativeCurrency: {
|
|
75
|
+
readonly name: "USDC";
|
|
76
|
+
readonly symbol: "USDC";
|
|
77
|
+
readonly decimals: 18;
|
|
78
|
+
};
|
|
79
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
80
|
+
rpcUrls: {
|
|
81
|
+
readonly default: {
|
|
82
|
+
readonly http: readonly [string];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
sourceId?: number | undefined | undefined;
|
|
86
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
87
|
+
testnet?: boolean | undefined | undefined;
|
|
88
|
+
custom?: Record<string, unknown> | undefined;
|
|
89
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
90
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
91
|
+
formatters?: undefined;
|
|
92
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
93
|
+
client: import("viem").Client;
|
|
94
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
95
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
96
|
+
client: import("viem").Client;
|
|
97
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
98
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
99
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
100
|
+
}] | undefined;
|
|
101
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
102
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* The embedding page's wallet, lent over the @xochi/widget-lib bridge. An
|
|
106
|
+
* injected connector over the bridge's EIP-1193 provider, so wagmi drives it
|
|
107
|
+
* exactly like an extension; every request is a `xochi:rpc` the host answers.
|
|
108
|
+
*
|
|
109
|
+
* Listed as an option and connected when the user picks it. It is never
|
|
110
|
+
* connected silently unless the host opted in (`autoConnect`): wagmi's
|
|
111
|
+
* reconnect-on-mount asks every connector `isAuthorized()`, and an injected one
|
|
112
|
+
* answers from `eth_accounts`, which a host wallet that is already connected to
|
|
113
|
+
* the host page answers with its account. So `isAuthorized()` here is false
|
|
114
|
+
* until the host says `autoConnect`, and the on-load connect itself is
|
|
115
|
+
* `autoConnectHostWallet`.
|
|
116
|
+
*/
|
|
117
|
+
export declare const HOST_WALLET_ID = "xochiHost";
|
|
118
|
+
/** A relay can see the signature that derives the Stealth keys. */
|
|
119
|
+
export declare function refusesStealth(connector: {
|
|
120
|
+
readonly id: string;
|
|
121
|
+
} | undefined): boolean;
|
|
122
|
+
export declare function hostWallet(bridge: HostConnection): Wallet;
|
|
123
|
+
/**
|
|
124
|
+
* Connect the embedding page's wallet on load when, and only when, the host
|
|
125
|
+
* passed `autoConnect: true`: once per attachment of its wallet (widget-lib's
|
|
126
|
+
* `onAutoConnect`). Otherwise it is an option in the connect modal like any
|
|
127
|
+
* other wallet. Returns the unsubscribe.
|
|
128
|
+
*
|
|
129
|
+
* Waits until wagmi is not settling a connection. Its mount-time reconnect
|
|
130
|
+
* starts from the previous page's connections, restored from storage under
|
|
131
|
+
* connector uids this page never created, and clears them only if it ends
|
|
132
|
+
* still `reconnecting`: connecting during it left the stale connection beside
|
|
133
|
+
* the live one, and Disconnect in the frame then fell back to it instead of
|
|
134
|
+
* disconnecting. That reconnect may also end disconnected, so the wait ends in
|
|
135
|
+
* a fresh check rather than a skip, and that check asks the bridge again: the
|
|
136
|
+
* host may have detached its wallet or withdrawn `autoConnect` meanwhile, and
|
|
137
|
+
* connecting then would prompt for a wallet the host no longer lends.
|
|
138
|
+
*/
|
|
139
|
+
export declare function autoConnectHostWallet(config: Config, bridge: HostConnection): () => void;
|
|
140
|
+
export declare function createWagmiConfig(bridge?: HostConnection | null): Config;
|
|
141
|
+
/** Standalone config: no embedding page means no "This site's wallet" option. */
|
|
142
|
+
export declare const config: Config;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where the widget serves a `@xochi/widget-lib` browser ESM release on its own
|
|
3
|
+
* origin: public/widget-lib/<version>/ holds every version ever shipped
|
|
4
|
+
* (scripts/check-widget-lib-versions.mjs), and the configurator's HTML snippet
|
|
5
|
+
* imports the installed one, so an integrator's page loads no third-party
|
|
6
|
+
* script and an older snippet keeps loading after an upgrade.
|
|
7
|
+
*/
|
|
8
|
+
export declare const widgetLibModuleDir: (version: string) => string;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
function formatTokenAmount(amount, decimals, displayDecimals = 4) {
|
|
2
|
+
if (amount === 0n) return "0";
|
|
3
|
+
const isNegative = amount < 0n;
|
|
4
|
+
const absAmount = isNegative ? -amount : amount;
|
|
5
|
+
const divisor = 10n ** BigInt(decimals);
|
|
6
|
+
const wholePart = absAmount / divisor;
|
|
7
|
+
const fractionalPart = absAmount % divisor;
|
|
8
|
+
if (fractionalPart === 0n) {
|
|
9
|
+
const wholeStr2 = wholePart.toString();
|
|
10
|
+
return isNegative ? `-${formatWithCommas(wholeStr2)}` : formatWithCommas(wholeStr2);
|
|
11
|
+
}
|
|
12
|
+
const fractionalStr = fractionalPart.toString().padStart(decimals, "0");
|
|
13
|
+
const trimmedFractional = fractionalStr.slice(0, displayDecimals).replace(/0+$/, "");
|
|
14
|
+
const wholeStr = wholePart.toString();
|
|
15
|
+
const formattedWhole = formatWithCommas(wholeStr);
|
|
16
|
+
if (trimmedFractional.length === 0) {
|
|
17
|
+
return isNegative ? `-${formattedWhole}` : formattedWhole;
|
|
18
|
+
}
|
|
19
|
+
const result = `${formattedWhole}.${trimmedFractional}`;
|
|
20
|
+
return isNegative ? `-${result}` : result;
|
|
21
|
+
}
|
|
22
|
+
function parseTokenAmount(input, decimals) {
|
|
23
|
+
const cleaned = input.replace(/,/g, "").trim();
|
|
24
|
+
if (cleaned === "" || cleaned === ".") {
|
|
25
|
+
return 0n;
|
|
26
|
+
}
|
|
27
|
+
if (!/^\d*\.?\d*$/.test(cleaned)) {
|
|
28
|
+
throw new Error(`Invalid amount format: ${input}`);
|
|
29
|
+
}
|
|
30
|
+
const [wholePart = "0", fractionalPart = ""] = cleaned.split(".");
|
|
31
|
+
if (fractionalPart.length > decimals) {
|
|
32
|
+
throw new Error(`Too many decimal places. Max ${decimals} allowed.`);
|
|
33
|
+
}
|
|
34
|
+
const paddedFractional = fractionalPart.padEnd(decimals, "0");
|
|
35
|
+
const combinedStr = wholePart + paddedFractional;
|
|
36
|
+
const normalizedStr = combinedStr.replace(/^0+/, "") || "0";
|
|
37
|
+
return BigInt(normalizedStr);
|
|
38
|
+
}
|
|
39
|
+
function formatWithCommas(value) {
|
|
40
|
+
return value.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
41
|
+
}
|
|
42
|
+
function truncateAddress(address, prefixLength = 6, suffixLength = 4) {
|
|
43
|
+
if (!address || address.length <= prefixLength + suffixLength + 3) {
|
|
44
|
+
return address;
|
|
45
|
+
}
|
|
46
|
+
return `${address.slice(0, prefixLength)}...${address.slice(-suffixLength)}`;
|
|
47
|
+
}
|
|
48
|
+
function formatTimeAgo(timestamp) {
|
|
49
|
+
const seconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
50
|
+
if (seconds < 60) return "Just now";
|
|
51
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m ago`;
|
|
52
|
+
if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
|
|
53
|
+
return `${Math.floor(seconds / 86400)}d ago`;
|
|
54
|
+
}
|
|
55
|
+
function safeBigInt(value, fallback = 0n) {
|
|
56
|
+
if (value === null || value === void 0 || value === "") return fallback;
|
|
57
|
+
try {
|
|
58
|
+
return BigInt(value);
|
|
59
|
+
} catch {
|
|
60
|
+
return fallback;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function formatRawAmount(amount, decimals) {
|
|
64
|
+
try {
|
|
65
|
+
const value = BigInt(amount);
|
|
66
|
+
const divisor = BigInt(10 ** decimals);
|
|
67
|
+
const whole = value / divisor;
|
|
68
|
+
const fraction = value % divisor;
|
|
69
|
+
if (fraction === 0n) return whole.toString();
|
|
70
|
+
const fractionStr = fraction.toString().padStart(decimals, "0");
|
|
71
|
+
const trimmed = fractionStr.replace(/0+$/, "");
|
|
72
|
+
const display = trimmed.slice(0, 4);
|
|
73
|
+
return display ? `${whole}.${display}` : whole.toString();
|
|
74
|
+
} catch {
|
|
75
|
+
return "...";
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function payoutDisplayDecimals(amount, decimals) {
|
|
79
|
+
const whole = (amount < 0n ? -amount : amount) / 10n ** BigInt(decimals);
|
|
80
|
+
if (whole >= 1000n) return 2;
|
|
81
|
+
if (whole >= 1n) return 4;
|
|
82
|
+
return 6;
|
|
83
|
+
}
|
|
84
|
+
function payoutFieldDecimals(amount, decimals) {
|
|
85
|
+
const whole = (amount < 0n ? -amount : amount) / 10n ** BigInt(decimals);
|
|
86
|
+
return whole >= 100000n ? 0 : payoutDisplayDecimals(amount, decimals);
|
|
87
|
+
}
|
|
88
|
+
const SUPPORTED_TOKEN_DISPLAY_MAX = 3;
|
|
89
|
+
function formatSupportedTokens(symbols, max = SUPPORTED_TOKEN_DISPLAY_MAX) {
|
|
90
|
+
if (symbols.length === 0) return "";
|
|
91
|
+
if (symbols.length === 1) return symbols[0];
|
|
92
|
+
if (symbols.length > max) {
|
|
93
|
+
return `${symbols.slice(0, max).join(", ")} and more`;
|
|
94
|
+
}
|
|
95
|
+
const head = symbols.slice(0, -1).join(", ");
|
|
96
|
+
return `${head} and ${symbols[symbols.length - 1]}`;
|
|
97
|
+
}
|
|
98
|
+
export {
|
|
99
|
+
SUPPORTED_TOKEN_DISPLAY_MAX,
|
|
100
|
+
formatRawAmount,
|
|
101
|
+
formatSupportedTokens,
|
|
102
|
+
formatTimeAgo,
|
|
103
|
+
formatTokenAmount,
|
|
104
|
+
parseTokenAmount,
|
|
105
|
+
payoutDisplayDecimals,
|
|
106
|
+
payoutFieldDecimals,
|
|
107
|
+
safeBigInt,
|
|
108
|
+
truncateAddress
|
|
109
|
+
};
|
package/dist/wagmi.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { getDefaultConfig } from "@rainbow-me/rainbowkit";
|
|
2
|
+
import { coinbaseWallet, metaMaskWallet, walletConnectWallet, safeWallet, rainbowWallet, baseAccount, ledgerWallet, safeheronWallet, bitskiWallet } from "@rainbow-me/rainbowkit/wallets";
|
|
3
|
+
import { mainnet, arbitrum, optimism, base, polygon, gnosis } from "wagmi/chains";
|
|
4
|
+
import { createConnector, http } from "wagmi";
|
|
5
|
+
import { getAccount, watchAccount, connect } from "wagmi/actions";
|
|
6
|
+
import { injected } from "wagmi/connectors";
|
|
7
|
+
import { defineChain, fallback } from "viem";
|
|
8
|
+
import { SITE_URL as SITE_URL$1, WALLETCONNECT_PROJECT_ID, RPC_URLS, ARC_BROWSER_RPC_URL, ARC_BROWSER_ENABLED, GNOSIS_ENABLED } from "./config.js";
|
|
9
|
+
import { isFirstPartyHost } from "./lib/hostBridge.js";
|
|
10
|
+
const robinhood = defineChain({
|
|
11
|
+
id: 4663,
|
|
12
|
+
name: "Robinhood Chain",
|
|
13
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
14
|
+
rpcUrls: {
|
|
15
|
+
default: { http: ["https://rpc.mainnet.chain.robinhood.com"] }
|
|
16
|
+
},
|
|
17
|
+
blockExplorers: {
|
|
18
|
+
default: { name: "Blockscout", url: "https://robinhoodchain.blockscout.com" }
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const arc = defineChain({
|
|
22
|
+
id: 5042,
|
|
23
|
+
name: "Arc",
|
|
24
|
+
nativeCurrency: { name: "USDC", symbol: "USDC", decimals: 18 },
|
|
25
|
+
rpcUrls: {
|
|
26
|
+
default: { http: [ARC_BROWSER_RPC_URL ?? "https://rpc.mainnet.arc.io"] }
|
|
27
|
+
},
|
|
28
|
+
blockExplorers: {
|
|
29
|
+
default: { name: "Arc Explorer", url: "https://explorer.arc.io" }
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const env = RPC_URLS;
|
|
33
|
+
const rpcs = {
|
|
34
|
+
mainnet: [env.mainnet, "https://ethereum-rpc.publicnode.com", "https://eth.drpc.org"],
|
|
35
|
+
arbitrum: [
|
|
36
|
+
env.arbitrum,
|
|
37
|
+
"https://arbitrum-one-rpc.publicnode.com",
|
|
38
|
+
"https://arb1.arbitrum.io/rpc"
|
|
39
|
+
],
|
|
40
|
+
optimism: [env.optimism, "https://optimism-rpc.publicnode.com", "https://mainnet.optimism.io"],
|
|
41
|
+
base: [env.base, "https://base-rpc.publicnode.com", "https://mainnet.base.org"],
|
|
42
|
+
polygon: [env.polygon, "https://polygon-bor-rpc.publicnode.com", "https://polygon.drpc.org"],
|
|
43
|
+
robinhood: [env.robinhood, "https://rpc.mainnet.chain.robinhood.com"],
|
|
44
|
+
arc: [ARC_BROWSER_RPC_URL ?? "https://rpc.mainnet.arc.io"],
|
|
45
|
+
gnosis: [env.gnosis, "https://gnosis-rpc.publicnode.com", "https://rpc.gnosischain.com"]
|
|
46
|
+
};
|
|
47
|
+
const transportOpts = { retryCount: 2, retryDelay: 1e3, timeout: 1e4 };
|
|
48
|
+
const toTransport = (urls) => fallback(urls.filter((u) => !!u).map((u) => http(u, transportOpts)));
|
|
49
|
+
const transports = {
|
|
50
|
+
[mainnet.id]: toTransport(rpcs.mainnet),
|
|
51
|
+
[arbitrum.id]: toTransport(rpcs.arbitrum),
|
|
52
|
+
[optimism.id]: toTransport(rpcs.optimism),
|
|
53
|
+
[base.id]: toTransport(rpcs.base),
|
|
54
|
+
[polygon.id]: toTransport(rpcs.polygon),
|
|
55
|
+
[robinhood.id]: toTransport(rpcs.robinhood),
|
|
56
|
+
[arc.id]: toTransport(rpcs.arc),
|
|
57
|
+
[gnosis.id]: toTransport(rpcs.gnosis)
|
|
58
|
+
};
|
|
59
|
+
const PROJECT_ID = WALLETCONNECT_PROJECT_ID;
|
|
60
|
+
const SITE_URL = typeof window !== "undefined" && window.location.origin || SITE_URL$1;
|
|
61
|
+
const HOST_WALLET_ID = "xochiHost";
|
|
62
|
+
function refusesStealth(connector) {
|
|
63
|
+
if (connector?.id !== HOST_WALLET_ID) return false;
|
|
64
|
+
return !("firstPartyHost" in connector && typeof connector.firstPartyHost === "function" && connector.firstPartyHost() === true);
|
|
65
|
+
}
|
|
66
|
+
function hostWallet(bridge) {
|
|
67
|
+
return {
|
|
68
|
+
id: HOST_WALLET_ID,
|
|
69
|
+
name: "This site's wallet",
|
|
70
|
+
iconUrl: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Crect width='28' height='28' rx='6' fill='%23b8963e'/%3E%3Cpath d='M7 10h14v9H7z' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E",
|
|
71
|
+
iconBackground: "#b8963e",
|
|
72
|
+
installed: true,
|
|
73
|
+
createConnector: (walletDetails) => createConnector((wagmiConfig) => {
|
|
74
|
+
const base2 = injected({
|
|
75
|
+
target: () => ({
|
|
76
|
+
id: HOST_WALLET_ID,
|
|
77
|
+
name: "This site's wallet",
|
|
78
|
+
provider: bridge.provider
|
|
79
|
+
})
|
|
80
|
+
})(wagmiConfig);
|
|
81
|
+
return {
|
|
82
|
+
...base2,
|
|
83
|
+
...walletDetails,
|
|
84
|
+
firstPartyHost: () => isFirstPartyHost(bridge),
|
|
85
|
+
isAuthorized() {
|
|
86
|
+
return bridge.autoConnect() ? base2.isAuthorized.call(this) : Promise.resolve(false);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
})
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
let hostAutoConnecting = false;
|
|
93
|
+
const settling = (status) => status === "reconnecting" || status === "connecting";
|
|
94
|
+
function autoConnectHostWallet(config2, bridge) {
|
|
95
|
+
let unwatch;
|
|
96
|
+
const connectHost = () => {
|
|
97
|
+
const connector = config2.connectors.find((c) => c.id === HOST_WALLET_ID);
|
|
98
|
+
if (!connector || hostAutoConnecting || getAccount(config2).status === "connected") return;
|
|
99
|
+
if (!bridge.available() || !bridge.autoConnect()) return;
|
|
100
|
+
hostAutoConnecting = true;
|
|
101
|
+
connect(config2, { connector }).catch((err) => {
|
|
102
|
+
console.error("[wagmi] Connecting the host wallet failed", err);
|
|
103
|
+
}).finally(() => {
|
|
104
|
+
hostAutoConnecting = false;
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const stop = bridge.onAutoConnect(() => {
|
|
108
|
+
unwatch?.();
|
|
109
|
+
unwatch = void 0;
|
|
110
|
+
if (!settling(getAccount(config2).status)) {
|
|
111
|
+
connectHost();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
unwatch = watchAccount(config2, {
|
|
115
|
+
onChange(account) {
|
|
116
|
+
if (settling(account.status)) return;
|
|
117
|
+
unwatch?.();
|
|
118
|
+
unwatch = void 0;
|
|
119
|
+
connectHost();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
return () => {
|
|
124
|
+
stop();
|
|
125
|
+
unwatch?.();
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
const hostConfigs = /* @__PURE__ */ new WeakMap();
|
|
129
|
+
function createWagmiConfig(bridge = null) {
|
|
130
|
+
if (bridge !== null) {
|
|
131
|
+
const cached = hostConfigs.get(bridge);
|
|
132
|
+
if (cached) return cached;
|
|
133
|
+
}
|
|
134
|
+
const wagmiConfig = getDefaultConfig({
|
|
135
|
+
appName: "Xochi",
|
|
136
|
+
appDescription: "The agentic dark pool on Ethereum",
|
|
137
|
+
appIcon: `${SITE_URL}/android-chrome-512x512.png`,
|
|
138
|
+
projectId: PROJECT_ID,
|
|
139
|
+
appUrl: SITE_URL,
|
|
140
|
+
chains: [
|
|
141
|
+
mainnet,
|
|
142
|
+
arbitrum,
|
|
143
|
+
optimism,
|
|
144
|
+
base,
|
|
145
|
+
polygon,
|
|
146
|
+
robinhood,
|
|
147
|
+
...ARC_BROWSER_ENABLED ? [arc] : [],
|
|
148
|
+
...GNOSIS_ENABLED ? [gnosis] : []
|
|
149
|
+
],
|
|
150
|
+
transports,
|
|
151
|
+
ssr: false,
|
|
152
|
+
// A frame's connection belongs to this host lease, never widget-origin
|
|
153
|
+
// persistence or ambient injected-provider discovery.
|
|
154
|
+
storage: bridge === null ? void 0 : null,
|
|
155
|
+
multiInjectedProviderDiscovery: bridge === null,
|
|
156
|
+
wallets: [
|
|
157
|
+
// The host connector exists only while the embedding page has actually
|
|
158
|
+
// attached a provider. A frame alone is not a wallet choice.
|
|
159
|
+
...bridge ? [{ groupName: "Embedding site", wallets: [() => hostWallet(bridge)] }] : [],
|
|
160
|
+
{
|
|
161
|
+
groupName: "Recommended",
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated -- classic Coinbase Wallet kept as the EOA relay-free lead: ERC-3009 needs ecrecover, which no smart account can provide (see note above)
|
|
163
|
+
wallets: [coinbaseWallet, metaMaskWallet, walletConnectWallet]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
groupName: "More",
|
|
167
|
+
wallets: [safeWallet, rainbowWallet, baseAccount]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
groupName: "Institutional",
|
|
171
|
+
wallets: [ledgerWallet, safeheronWallet, bitskiWallet]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
});
|
|
175
|
+
if (bridge !== null) hostConfigs.set(bridge, wagmiConfig);
|
|
176
|
+
return wagmiConfig;
|
|
177
|
+
}
|
|
178
|
+
const config = createWagmiConfig();
|
|
179
|
+
export {
|
|
180
|
+
HOST_WALLET_ID,
|
|
181
|
+
arc,
|
|
182
|
+
autoConnectHostWallet,
|
|
183
|
+
config,
|
|
184
|
+
createWagmiConfig,
|
|
185
|
+
hostWallet,
|
|
186
|
+
refusesStealth,
|
|
187
|
+
robinhood
|
|
188
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright (c) 2023, GitHub https://github.com/githubnext/monaspace
|
|
2
|
+
with Reserved Font Name "Monaspace", including subfamilies: "Argon", "Neon", "Xenon", "Radon", and "Krypton"
|
|
3
|
+
|
|
4
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
5
|
+
This license is copied below, and is also available with a FAQ at:
|
|
6
|
+
http://scripts.sil.org/OFL
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting — in part or in whole — any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|