@fangorn-network/westmarch 2026.10.2-0.0-dev → 2026.10.2-2.0-dev
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/docs/app-to-agent.md +25 -41
- package/package.json +6 -5
- package/site/dist/assets/AccountNotFoundScreen-C4njXc69-DyVH4CEz.js +1 -0
- package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-Dz1--SS9.js +31 -0
- package/site/dist/assets/Address-H8kD1d9O-BdFZmRwI.js +17 -0
- package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-CxaCAisL.js +6 -0
- package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-JGk7vndN.js +1 -0
- package/site/dist/assets/ApiController-CTLbMCcH.js +5 -0
- package/site/dist/assets/ArrowsRightLeftIcon-B8g9adpz.js +1 -0
- package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-CXD9_OP8.js +1 -0
- package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-BtJCglvU.js +1 -0
- package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-BgC2TsqH.js +1 -0
- package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-B9OzLeEO.js +103 -0
- package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-C7r5snUL.js +1 -0
- package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-BTV0NRio.js +68 -0
- package/site/dist/assets/CaptchaScreen-DbpvkIGx-7rSZIuM-.js +1 -0
- package/site/dist/assets/CheckCircleIcon-B1l17ioc.js +1 -0
- package/site/dist/assets/CheckCircleIcon-BGSI8nKf.js +1 -0
- package/site/dist/assets/Checkbox-D1EDeo41-BUfq0w99.js +52 -0
- package/site/dist/assets/ChevronDownIcon-B6uJvPHu.js +1 -0
- package/site/dist/assets/Chip-CZKIKt9K-r9Nk__0-.js +26 -0
- package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-DWWNHxmR.js +16 -0
- package/site/dist/assets/ConnectEmailForm-B-VRE0MN-CRQwS0Xu.js +3 -0
- package/site/dist/assets/ConnectLedgerScreen-DWHABGot-CZcCt31O.js +10 -0
- package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-C5IOf-SQ.js +1 -0
- package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-cwg74F3A.js +1 -0
- package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-D28oeK6b.js +1 -0
- package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-EEdkKeTp.js +95 -0
- package/site/dist/assets/ConnectWalletView-DqI-PTvX-C2mEzukj.js +74 -0
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-CH_7r8iV.js +7 -0
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-Z33kis0B.js +1 -0
- package/site/dist/assets/ConnectorUtil-DH4NePk5.js +21 -0
- package/site/dist/assets/ConstantsUtil-DmLsRHAl.js +198 -0
- package/site/dist/assets/CopyToClipboard-i_OQSBJr-_G88JCVR.js +39 -0
- package/site/dist/assets/CopyableText-CQapvaMr-CGGfc_zM.js +28 -0
- package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-C9Okoc0V.js +1 -0
- package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-D2l6hdSl.js +22 -0
- package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-Dda3KKqS.js +1 -0
- package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-DG8kJPt1.js +1 -0
- package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-CcOUfn6f.js +187 -0
- package/site/dist/assets/DepositAddressScreen-DBLRs7aI-DeituDNh.js +8 -0
- package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-FDg6K14-.js +1 -0
- package/site/dist/assets/{EmailInputForm-Cqo1mda8-CZD4r5LM.js → EmailInputForm-Cqo1mda8-BmbxvPHC.js} +11 -11
- package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-B05CQ9rx.js +1 -0
- package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-Cxd1b9XH.js +1 -0
- package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-CrJy0ViX.js +23 -0
- package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-Bakaa3zu.js +1 -0
- package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-j78vKrcj.js +1 -0
- package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-D3dr7W9_.js +1 -0
- package/site/dist/assets/EnrollTotp-Dibew4dp-BXbYV8nI.js +66 -0
- package/site/dist/assets/EnvelopeIcon-DjPofnRI.js +1 -0
- package/site/dist/assets/ErrorBanner-BcpGRt0h-BhH6_V-9.js +21 -0
- package/site/dist/assets/{ErrorMessage-D8VaAP5m-oSruKN8L.js → ErrorMessage-D8VaAP5m-Bs7uX2a9.js} +2 -2
- package/site/dist/assets/ErrorScreen-DipdTWzE-BgPRgnOb.js +4 -0
- package/site/dist/assets/ErrorScreen-DipdTWzE-CvxXC6pz.js +1 -0
- package/site/dist/assets/ExclamationCircleIcon-BE-WGrut.js +1 -0
- package/site/dist/assets/ExclamationTriangleIcon-Ca1Xlc_f.js +1 -0
- package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-De2JvZdV.js +75 -0
- package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-bLp3hXoO.js +28 -0
- package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-Jr6D6JiZ.js +491 -0
- package/site/dist/assets/FingerPrintIcon-DOCbS93y.js +1 -0
- package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-A_G5kfa1.js +1 -0
- package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-LPv35wkD.js +1 -0
- package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-0hfGrfvf.js +58 -0
- package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-Dz0s_NWR.js +1 -0
- package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-ZGm-3-Io.js +1 -0
- package/site/dist/assets/GlobeAltIcon-BBRl2MMn.js +1 -0
- package/site/dist/assets/GooglePay-B53WnudL-BGiVpB8y.js +1 -0
- package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-CHdfIeD_.js +4 -0
- package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-Cgoiow3m.js +1 -0
- package/site/dist/assets/InfoBanner-Cb3p1z12-_YqQmRiu.js +22 -0
- package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-tuIrKQHH.js +1 -0
- package/site/dist/assets/InstallWalletScreen-DTA8dwLv-BMU_wa61.js +1 -0
- package/site/dist/assets/{JsonTree-BHzNC-ic-pAEq1bl9.js → JsonTree-BHzNC-ic-DcVr0YF0.js} +3 -3
- package/site/dist/assets/{LabelXs-oqZNqbm_-D09YjVR4.js → LabelXs-oqZNqbm_-CNprGVQM.js} +2 -2
- package/site/dist/assets/LandingScreen-CGWUoSUG-fH6rsQen.js +1 -0
- package/site/dist/assets/{Layouts-BMRfo5hw-D2u1-w8g.js → Layouts-BMRfo5hw-e-sepi6F.js} +16 -16
- package/site/dist/assets/Link-BdDilT2T-BdwlRJch.js +40 -0
- package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-BXKN2Qm5.js +77 -0
- package/site/dist/assets/LinkEmailScreen-dKo9frwc-Cyn7Q8p1.js +1 -0
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-CWiqnwLM.js +117 -0
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-YmDevJzf.js +1 -0
- package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-h7shW-Ay.js +1 -0
- package/site/dist/assets/Loader-UAZqxsnw-DJEVblm1.js +62 -0
- package/site/dist/assets/{LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js → LoadingSkeleton-BMsgO5PV-D2atjsP5.js} +6 -6
- package/site/dist/assets/LockClosedIcon-9EFzWK1C.js +1 -0
- package/site/dist/assets/LoginFailedScreen-CN0dJV6U-By3Si77a.js +1 -0
- package/site/dist/assets/ManualTransferScreen-CHqcuqbs-BAHPY8rs.js +1 -0
- package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-CLjffFG1.js +1 -0
- package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-BmQg1Y61.js +1 -0
- package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-DmBtTtlw.js +1 -0
- package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-4a683Bmf.js +1 -0
- package/site/dist/assets/ModalFooter-BCuEK_nz-C_71qsaz.js +403 -0
- package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-DEHHcEf8.js +16 -0
- package/site/dist/assets/OAuthStatusScreen-ufbOa-da-BjAb_WsY.js +1 -0
- package/site/dist/assets/OpenLink-CUpJ1mOr-BLWFsPOW.js +39 -0
- package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-2PJTJxX-.js +1 -0
- package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-DCEg761l.js +6 -0
- package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-8nVjNc8k.js +20 -0
- package/site/dist/assets/{PhArrowCircleDown-BtlNV0TZ.js → PhArrowCircleDown-D97G-BOA.js} +5 -5
- package/site/dist/assets/PhArrowClockwise-DVgyFuez.js +14 -0
- package/site/dist/assets/PhArrowDown-87b1BizM.js +14 -0
- package/site/dist/assets/PhArrowLeft-Da0MfnbK.js +14 -0
- package/site/dist/assets/PhArrowRight-AdrIL4DW.js +14 -0
- package/site/dist/assets/{PhArrowSquareOut-DnQ7n_B4.js → PhArrowSquareOut-Bk2CMG3I.js} +5 -5
- package/site/dist/assets/PhArrowUp-4sgyKPGx.js +14 -0
- package/site/dist/assets/PhArrowUpRight-BNghD2zq.js +14 -0
- package/site/dist/assets/{PhArrowsClockwise-Brtx2Re-.js → PhArrowsClockwise-BXRn1GEl.js} +5 -5
- package/site/dist/assets/{PhArrowsDownUp-PZosTqZG.js → PhArrowsDownUp-DM09Jo_3.js} +5 -5
- package/site/dist/assets/PhArrowsLeftRight-MuKBLUoF.js +14 -0
- package/site/dist/assets/{PhBank-hhPAIPVb.js → PhBank-fHbgCqqZ.js} +5 -5
- package/site/dist/assets/PhBrowser-2-9m-AkM.js +14 -0
- package/site/dist/assets/PhCaretDown-BDNabFuL.js +14 -0
- package/site/dist/assets/PhCaretLeft-CI460R-A.js +14 -0
- package/site/dist/assets/PhCaretRight-D7ZS3Ls8.js +14 -0
- package/site/dist/assets/PhCaretUp-C-iIfyvO.js +14 -0
- package/site/dist/assets/PhCheck-DxQXn57r.js +14 -0
- package/site/dist/assets/{PhCircleHalf-Bk9C4DvT.js → PhCircleHalf-MJZeRBGF.js} +5 -5
- package/site/dist/assets/PhClock-x3MS3Mwi.js +14 -0
- package/site/dist/assets/{PhCompass-Df1ugFO-.js → PhCompass-hYn3HhGN.js} +5 -5
- package/site/dist/assets/PhCopy-CWNYcABI.js +14 -0
- package/site/dist/assets/{PhCreditCard-CZpdid2n.js → PhCreditCard-Fy4pzwtt.js} +5 -5
- package/site/dist/assets/{PhCurrencyDollar-B6IKKjue.js → PhCurrencyDollar-BgiaenCi.js} +5 -5
- package/site/dist/assets/{PhDesktop-BuCDXYJj.js → PhDesktop-CxrzCSv5.js} +5 -5
- package/site/dist/assets/PhDeviceMobile-CsyA5Goi.js +14 -0
- package/site/dist/assets/PhDotsThree-D-k1BiYg.js +14 -0
- package/site/dist/assets/PhEnvelope-D8kzeNox.js +14 -0
- package/site/dist/assets/PhFunnelSimple-CfQs5DAW.js +14 -0
- package/site/dist/assets/{PhGlobe-q1mqj65V.js → PhGlobe-DvmSc9_A.js} +5 -5
- package/site/dist/assets/{PhIdentificationCard-BeLXJpfZ.js → PhIdentificationCard-CfkZm-5K.js} +5 -5
- package/site/dist/assets/{PhImage-BYrKfN9k.js → PhImage-Cf0J2ZfJ.js} +5 -5
- package/site/dist/assets/{PhInfo-X33f06Ej.js → PhInfo-Bwi51-2X.js} +5 -5
- package/site/dist/assets/{PhLightbulb-DMZJsowR.js → PhLightbulb-C4FZV7Es.js} +5 -5
- package/site/dist/assets/PhMagnifyingGlass-C9u8jSCJ.js +14 -0
- package/site/dist/assets/{PhPaperPlaneRight-Dvo-nXr9.js → PhPaperPlaneRight-zxQVvPLX.js} +5 -5
- package/site/dist/assets/PhPlus-C4UoW-2n.js +14 -0
- package/site/dist/assets/{PhPower-D8-AcNM6.js → PhPower-CFyWDmgD.js} +5 -5
- package/site/dist/assets/{PhPuzzlePiece-C-7mYqGO.js → PhPuzzlePiece-BjoNVfST.js} +5 -5
- package/site/dist/assets/{PhQrCode-uIXlI5ER.js → PhQrCode-CP3tFauY.js} +5 -5
- package/site/dist/assets/{PhQuestion-rUoqC2sC.js → PhQuestion-wOWJBd3G.js} +5 -5
- package/site/dist/assets/{PhQuestionMark-W55Txvvb.js → PhQuestionMark-CV0k9C0Y.js} +5 -5
- package/site/dist/assets/{PhSealCheck-BeVLq9PH.js → PhSealCheck-vIKzREuN.js} +5 -5
- package/site/dist/assets/{PhSignOut-Cq2PivQ6.js → PhSignOut-CxELV-i0.js} +5 -5
- package/site/dist/assets/{PhSpinner-CZMtAFdX.js → PhSpinner-CGDmbzUd.js} +5 -5
- package/site/dist/assets/{PhTrash-BamrmMsN.js → PhTrash-C9PD0SAt.js} +5 -5
- package/site/dist/assets/{PhUser-A2fxqIV0.js → PhUser-0sWNXQeZ.js} +5 -5
- package/site/dist/assets/{PhVault-B8m1usHw.js → PhVault-6JTskUcC.js} +5 -5
- package/site/dist/assets/{PhWarning-CpkID9oi.js → PhWarning-CoKs3gz6.js} +5 -5
- package/site/dist/assets/PhWarningCircle-BXHw1fCt.js +14 -0
- package/site/dist/assets/PhX-DX0SFIqC.js +14 -0
- package/site/dist/assets/PhoneIcon-CZ47md80.js +1 -0
- package/site/dist/assets/PinInput-DbZ0b1i1-BrTXu3Km.js +247 -0
- package/site/dist/assets/PrivyPluginContext-DA-yS5vO-CY60yubk.js +1 -0
- package/site/dist/assets/QrCode-DbnZwlkH-CcMrWV5D.js +22 -0
- package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-DgeDnHOK.js +1 -0
- package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-CvJJwLhK.js +1 -0
- package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-CADtGtSV.js +7 -0
- package/site/dist/assets/SIWXUtil-Cpiv91-M.js +1 -0
- package/site/dist/assets/{Screen-D30meWsY-DDum2qlY.js → Screen-D30meWsY-vEusJ7KX.js} +22 -22
- package/site/dist/assets/{ScreenHeader-CHmc4-Lu-BqrAEXbV.js → ScreenHeader-CHmc4-Lu-BvGTLg53.js} +4 -4
- package/site/dist/assets/ScreenLayout-OwaQQcxH-cfOTmyl0.js +1 -0
- package/site/dist/assets/{SelectSourceAsset-CWFog6gm-8iXuqbAs.js → SelectSourceAsset-CWFog6gm-DxYklZYs.js} +18 -18
- package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-oeqeo05x.js +14 -0
- package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-BxFee9UA.js +11 -0
- package/site/dist/assets/ShieldCheckIcon-eFjsosCA.js +1 -0
- package/site/dist/assets/SignRequestScreen-BHKv32KR-z8ixfIma.js +26 -0
- package/site/dist/assets/SolanaWalletConnector-C7Lqk-Wz-Bc_lvdiF.js +1 -0
- package/site/dist/assets/{StackedContainer-B2vaEl56-C-ojzCoQ.js → StackedContainer-B2vaEl56-Do5dXB8-.js} +2 -2
- package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-DudetZAc.js +20 -0
- package/site/dist/assets/{Subtitle-CV-2yKE4-o-1FQLlX.js → Subtitle-CV-2yKE4-DV0o1av3.js} +2 -2
- package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-Bo3sONvf.js +1 -0
- package/site/dist/assets/{Title-BnzYV3Is-RX1f0RV-.js → Title-BnzYV3Is-C3qOPnO_.js} +2 -2
- package/site/dist/assets/TodoList-DnyULl18-BvxvubbF.js +36 -0
- package/site/dist/assets/TransactionDetails-e9nesl30-WWflkOIi.js +109 -0
- package/site/dist/assets/TransactionErrorView-BDBNqA_f-CotYKcgf.js +178 -0
- package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-sVFlWqa8.js +31 -0
- package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-CV2-mY19.js +6 -0
- package/site/dist/assets/TurnstileWrapper-B7sNddys-oPbuMTQt.js +1 -0
- package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-D_mjSpAy.js +1 -0
- package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-6RLG0ahv.js +1 -0
- package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-CaVN0bti.js +1 -0
- package/site/dist/assets/{Value-DTgR824E-DZpvBCWi.js → Value-DTgR824E-Bp6WGZZm.js} +7 -7
- package/site/dist/assets/WalletCards-DH1rqayz-D3cOTb9x.js +1 -0
- package/site/dist/assets/WalletIcon-DOIZhb2l.js +1 -0
- package/site/dist/assets/WalletInfoCard-sq_2wgFg-bOqfl5MA.js +29 -0
- package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-DWaVkMCA.js +1 -0
- package/site/dist/assets/WalletLink-DK5LB5Ha-DjUZvqs-.js +20 -0
- package/site/dist/assets/WalletOverflowButton-bfCnp-9T-B6P7DQXA.js +1 -0
- package/site/dist/assets/WarningBanner-ZZqCEtZK-Bc2YKZb7.js +21 -0
- package/site/dist/assets/__vite-browser-external-NciY4Vu1.js +1 -0
- package/site/dist/assets/_esm-BZP3cXTv.js +1 -0
- package/site/dist/assets/_esm-ZmzBJpEs.js +6 -0
- package/site/dist/assets/accounts-D4AXF17G.js +1 -0
- package/site/dist/assets/accounts-IkdFx9nq.js +1 -0
- package/site/dist/assets/analytics-mkkvFRju-BRBcadka.js +1 -0
- package/site/dist/assets/baseSepolia-Bn1j1Ysw.js +1 -0
- package/site/dist/assets/basic-Cz1YiCSk.js +1575 -0
- package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-DtOXx-2n.js +1 -0
- package/site/dist/assets/ccip-B1J3oTZx.js +7 -0
- package/site/dist/assets/ccip-Bd7261zy.js +1 -0
- package/site/dist/assets/ccip-D6EHKpjI.js +1 -0
- package/site/dist/assets/chain-scefkYIH.js +5 -0
- package/site/dist/assets/check-DHnllI8N.js +1 -0
- package/site/dist/assets/chevron-down-1y-r4bGO.js +1 -0
- package/site/dist/assets/circle-alert-OwxamXUX.js +1 -0
- package/site/dist/assets/circle-check-big-3sZGVC10.js +1 -0
- package/site/dist/assets/circle-x-DQjNUV9J.js +1 -0
- package/site/dist/assets/client-B-BpRtwY.js +1 -0
- package/site/dist/assets/client-BfIR1FvH.js +9 -0
- package/site/dist/assets/coinbase-DCPC2L_R-YEuIn3jh.js +3 -0
- package/site/dist/assets/copy-DMOX_yn7.js +1 -0
- package/site/dist/assets/core-GIEmxmAa.js +12 -0
- package/site/dist/assets/createLucideIcon-BsERoFTA.js +1 -0
- package/site/dist/assets/defineChain-B-SQDLTG.js +1 -0
- package/site/dist/assets/dijkstra-CY95afk4.js +1 -0
- package/site/dist/assets/dist-CoS6E-3x.js +1 -0
- package/site/dist/assets/dist-Cp6IXeJd.js +1 -0
- package/site/dist/assets/dist-CrNxmdZj.js +1 -0
- package/site/dist/assets/dist-DYGtf4F0.js +16 -0
- package/site/dist/assets/embed.worker-Cnl4VGr3.js +1 -0
- package/site/dist/assets/errors-BQ3N-RVt-CZPAWCgC.js +1 -0
- package/site/dist/assets/esm-C3DslVJx.js +1 -0
- package/site/dist/assets/esm-Ci1ogKuK.js +1 -0
- package/site/dist/assets/esm-Co94ENUV.js +37 -0
- package/site/dist/assets/esm-bb8SANZh.js +1 -0
- package/site/dist/assets/esm-n2lWo7kz.js +1 -0
- package/site/dist/assets/ethers-zTjbodk5-Cs648CnD.js +1 -0
- package/site/dist/assets/eventemitter3-Dzc_0Uq2.js +1 -0
- package/site/dist/assets/external-link-BBPG3rG7.js +1 -0
- package/site/dist/assets/farcaster-DPlSjvF5-CzBCmgyL.js +1 -0
- package/site/dist/assets/features-CuiHbgEJ.js +2 -0
- package/site/dist/assets/fingerprint-pattern-CjLtyIxB.js +1 -0
- package/site/dist/assets/floating-ui.react-DmaCfayr.js +1 -0
- package/site/dist/assets/floating-ui.react-dom-CaoMF8mP.js +1 -0
- package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-BVqOKQif.js +1 -0
- package/site/dist/assets/formatter-CVbp4SlJ.js +1 -0
- package/site/dist/assets/get-entropy-details-for-user-dHRH5Gpi-BNiOFXbK.js +1 -0
- package/site/dist/assets/getChainName-DjpPdUSc-DUyKDrnp.js +1 -0
- package/site/dist/assets/getErc20Balance-jXNpFf0N-q4bV8kQq.js +1 -0
- package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-DcnTFrXN.js +1 -0
- package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-Gx4_wxON.js +1 -0
- package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-r2UnDeEy.js +1 -0
- package/site/dist/assets/guards-BIW-GiMJ-D3tWTQAR.js +1 -0
- package/site/dist/assets/hooks.module-BYZGfwDl.js +1 -0
- package/site/dist/assets/hourglass-D_GfQdJr.js +1 -0
- package/site/dist/assets/id-UqEwL2BI-CTlvRMA5.js +1 -0
- package/site/dist/assets/index-BdEw5wyl-kLbhqLbv.js +1 -0
- package/site/dist/assets/index-C2h3EneX.js +8 -0
- package/site/dist/assets/{index-CWARkn2w-D6ikWJWj.js → index-CWARkn2w-DxuckIFn.js} +7 -7
- package/site/dist/assets/index-DvMddJcd-CNBb4VUn.js +12 -0
- package/site/dist/assets/index-YiCw0Y_x-Czl0tWfF.js +436 -0
- package/site/dist/assets/index.browser-B-i-Lj3J.js +1 -0
- package/site/dist/assets/index.browser-BMmUcykv.js +1 -0
- package/site/dist/assets/index.es-Crd0TyUS.js +2 -0
- package/site/dist/assets/index.es-DQbup1WG.js +3 -0
- package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-Cjf3l05I.js +1 -0
- package/site/dist/assets/jsx-runtime-CndCZlyt.js +1 -0
- package/site/dist/assets/landmark-BZPqMFEf.js +1 -0
- package/site/dist/assets/lib-DGtzi2DK.js +1 -0
- package/site/dist/assets/localBatchGatewayRequest-B71J8sQ9.js +29 -0
- package/site/dist/assets/lock-DyN_c-ud.js +1 -0
- package/site/dist/assets/logger-CsXm3oIv-B0UYpNFI.js +1 -0
- package/site/dist/assets/mail-V_mcPb64.js +1 -0
- package/site/dist/assets/modal-context-CwmSeFcv-DPWNJrfK.js +1 -0
- package/site/dist/assets/native-BKj27wfc.js +1 -0
- package/site/dist/assets/ofetch.CWycOUEr-Duby3iHT.js +1 -0
- package/site/dist/assets/parseAbi-Csg-8t59.js +2 -0
- package/site/dist/assets/parseAbiParameters-BWbIMYe4.js +1 -0
- package/site/dist/assets/parseEther-CHS0GNkM.js +1 -0
- package/site/dist/assets/pkce-DXF0yKjP-7_VY-d83.js +1 -0
- package/site/dist/assets/preload-helper-CRzLMJPS.js +1 -0
- package/site/dist/assets/privy-context-81KmsBw2-DiR6-Yq8.js +2 -0
- package/site/dist/assets/property-DuZ9DLP4.js +3 -0
- package/site/dist/assets/react-BfYA1q0G.js +1 -0
- package/site/dist/assets/react-CK2HRI1t.js +1 -0
- package/site/dist/assets/react-DxGeY8B8.js +1 -0
- package/site/dist/assets/react-auth-sHnipzbS.js +1 -0
- package/site/dist/assets/react-dom-BI2Koe4o.js +1 -0
- package/site/dist/assets/reservoir-x-nGuZkT-BguVFH3D.js +1 -0
- package/site/dist/assets/roles-BDPDWrwo.js +1 -0
- package/site/dist/assets/roles-DKPW79Ca.js +1 -0
- package/site/dist/assets/rolldown-runtime-Bjp52BOI.js +1 -0
- package/site/dist/assets/safe-url-D7SRPu33-CkMedGro.js +1 -0
- package/site/dist/assets/secp256k1-BeYL8aZl.js +1 -0
- package/site/dist/assets/secp256k1-Bh4MSkhz.js +1 -0
- package/site/dist/assets/secp256k1-Ci4cqHl0.js +1 -0
- package/site/dist/assets/secp256k1-DsxXqbXv.js +1 -0
- package/site/dist/assets/secp256k1-N9RUmafO.js +1 -0
- package/site/dist/assets/serializeAuthorizationList-DGMik9Wx.js +1 -0
- package/site/dist/assets/serializeSignature-CWKpxoab.js +2 -0
- package/site/dist/assets/sha2-C6s7zZmb.js +1 -0
- package/site/dist/assets/{shared-DRZUmnL5-MWD-C-pp.js → shared-DRZUmnL5-BewE5wK8.js} +33 -33
- package/site/dist/assets/{shared-FM0rljBt-c4eSjzGj.js → shared-FM0rljBt-CxLACri_.js} +6 -6
- package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-BkAKsRNi.js +1 -0
- package/site/dist/assets/simulateTransaction-CfuOrae4-PjA_tGjX.js +1 -0
- package/site/dist/assets/smartphone-3p8nFSTE.js +1 -0
- package/site/dist/assets/src-BBjkfi-Q.js +1 -0
- package/site/dist/assets/storage-Ufl800Ne-1qCR2JMO.js +8 -0
- package/site/dist/assets/stringify-DqUj9VzO.js +20 -0
- package/site/dist/assets/stripe.esm-DEi2D291.js +2 -0
- package/site/dist/assets/styles-BsotlekN-Aq27nZGc.js +9 -0
- package/site/dist/assets/{styles-Cm9H63WO-Cv1TbqYi.js → styles-Cm9H63WO-p_ic_dxE.js} +17 -17
- package/site/dist/assets/{styles-DVyDvTdj-CI4xZNHp.js → styles-DVyDvTdj-CjsWqAld.js} +8 -8
- package/site/dist/assets/{styles-hslXy6xG-DeVcFoDD.js → styles-hslXy6xG-D5QHIrJU.js} +23 -23
- package/site/dist/assets/telegram-B-JqnkqZ-Dqkm4rDn.js +1 -0
- package/site/dist/assets/to-ui-error-DWe-qwS3-Bi1HUQI9.js +4 -0
- package/site/dist/assets/toViemAccount-B5iDGq1b-CdFZwv07.js +2 -0
- package/site/dist/assets/transaction-BNTP-bFm-M5tJx8vY.js +1 -0
- package/site/dist/assets/transfer-6YztDh-t-BVQkTvG-.js +1 -0
- package/site/dist/assets/transformers.web-BTyOEJ0C.js +40 -0
- package/site/dist/assets/transformers.web-CUZUFjAK.js +49 -0
- package/site/dist/assets/triangle-alert-BG3Qw-Hq.js +1 -0
- package/site/dist/assets/twitch-5IOe4sIQ-CaXHFlAu.js +1 -0
- package/site/dist/assets/types-4CuOD23i.js +1 -0
- package/site/dist/assets/use-headless-crypto-deposit-Yn-QRLB3-CQqeyhGY.js +1 -0
- package/site/dist/assets/use-unlink-wallet-BKK4_5Ur-C0xQN_Lp.js +1 -0
- package/site/dist/assets/useActiveWallet-B-yZYGc6-BkK6rFBm.js +123 -0
- package/site/dist/assets/useGetSolPrice-x7gfUIHJ-CLVXqv6I.js +1 -0
- package/site/dist/assets/useGetTokenPrice-CaoUkb79-DAXXs3rs.js +1 -0
- package/site/dist/assets/useI18n-C-5n_noF-CGpkgIVy.js +1 -0
- package/site/dist/assets/useWalletBalance-CZnP5f_f-Cfd64m4n.js +1 -0
- package/site/dist/assets/useWallets-X1ndvJ_U-CAYqg7Za.js +1 -0
- package/site/dist/assets/utils-BkR7EQjg.js +1 -0
- package/site/dist/assets/utils-DJhBNOZA.js +1 -0
- package/site/dist/assets/utils-DdckVfQr.js +1 -0
- package/site/dist/assets/w3m-modal-B4H_uiPH.js +1174 -0
- package/site/dist/assets/wallet-BNI12IYk.js +1 -0
- package/site/dist/assets/wallet-CITSaPlB.js +2 -0
- package/site/dist/assets/wallet-connect-BvJtUsDt-CVlSNIXP.js +1 -0
- package/site/dist/assets/walletconnect-registry-xxG8XLCb-BpzpBq5s.js +1 -0
- package/site/dist/assets/walletconnect-v2-3frQFwbg-CzZ6oybX.js +12 -0
- package/site/dist/assets/{index-CztIxJB6.js → wui-ux-by-reown-XyHdtV1O.js} +296 -296
- package/site/dist/assets/x-gjDrY2rk.js +1 -0
- package/site/dist/index.html +5 -117
- package/site/worker.js +20 -32
- package/src/agent/mcp.js +46 -14
- package/src/agent/view-tools.js +3 -11
- package/src/agent/x402.js +3 -42
- package/src/discover/apps.js +37 -2
- package/src/discover/explore.js +19 -13
- package/src/publish/init.js +74 -0
- package/src/publish/ship.js +90 -79
- package/src/publish/view-cli.js +6 -3
- package/src/publish/view.js +27 -43
- package/template/README.md +49 -0
- package/template/app.json +27 -0
- package/template/eval/goals.md +7 -0
- package/template/eval/golden.jsonl +0 -0
- package/template/gitignore +3 -0
- package/template/package.json +13 -0
- package/template/wrangler.json +12 -0
- package/site/dist/assets/AccountNotFoundScreen-C4njXc69-RUyAWRzV.js +0 -1
- package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-ZV-LlYBe.js +0 -31
- package/site/dist/assets/Address-H8kD1d9O-CGQnt7Pu.js +0 -17
- package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-CKn2JLwq.js +0 -6
- package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-9oIP9fma.js +0 -1
- package/site/dist/assets/ArrowsRightLeftIcon-BEhBD_6N.js +0 -1
- package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-D1wLlSJs.js +0 -1
- package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-CSBbHTyz.js +0 -1
- package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-BsRq-xBt.js +0 -1
- package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-BPdhsKvN.js +0 -103
- package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-CEGNdrkr.js +0 -1
- package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js +0 -68
- package/site/dist/assets/CaptchaScreen-DbpvkIGx-BecgMnD_.js +0 -1
- package/site/dist/assets/CheckCircleIcon-DBiWFjO6.js +0 -1
- package/site/dist/assets/CheckCircleIcon-DzG2ROJZ.js +0 -1
- package/site/dist/assets/Checkbox-D1EDeo41-DMHcj9o_.js +0 -52
- package/site/dist/assets/ChevronDownIcon-2Os56gUt.js +0 -1
- package/site/dist/assets/Chip-CZKIKt9K-BWzs9fj5.js +0 -26
- package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-CFvcSiDs.js +0 -16
- package/site/dist/assets/ConnectEmailForm-B-VRE0MN-BozkCg8q.js +0 -3
- package/site/dist/assets/ConnectLedgerScreen-DWHABGot-DaCnbBzh.js +0 -10
- package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-DUkCLkxD.js +0 -1
- package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-Dv_5nMkZ.js +0 -1
- package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-DSGEeB3Y.js +0 -1
- package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-C-s4s_Lq.js +0 -95
- package/site/dist/assets/ConnectWalletView-DqI-PTvX-BKX7fdYr.js +0 -74
- package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-DSoAuMFZ.js +0 -7
- package/site/dist/assets/CopyToClipboard-i_OQSBJr-CZTXyfV0.js +0 -39
- package/site/dist/assets/CopyableText-CQapvaMr-DHO818I0.js +0 -28
- package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-DW4nRGfz.js +0 -1
- package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-DH8Nnb4Y.js +0 -22
- package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-gfUS_uV5.js +0 -1
- package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-DZj9HTHc.js +0 -1
- package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-eHYsDK9W.js +0 -187
- package/site/dist/assets/DepositAddressScreen-DBLRs7aI-DK_XVgVk.js +0 -8
- package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-6gRZzhLe.js +0 -1
- package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-BZu2ae0k.js +0 -1
- package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-86pviemJ.js +0 -1
- package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-vDcvT53Y.js +0 -23
- package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-rNJAtSJc.js +0 -1
- package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-I8Q95280.js +0 -1
- package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-Coi7OxoI.js +0 -1
- package/site/dist/assets/EnrollTotp-Dibew4dp-DC7FrDgo.js +0 -66
- package/site/dist/assets/EnvelopeIcon-DY6ERnW7.js +0 -1
- package/site/dist/assets/ErrorBanner-BcpGRt0h-BvESwN99.js +0 -21
- package/site/dist/assets/ErrorScreen-DipdTWzE-DnKGxH1Z.js +0 -4
- package/site/dist/assets/ExclamationCircleIcon-BZhlqH0r.js +0 -1
- package/site/dist/assets/ExclamationTriangleIcon-CkAOJIYV.js +0 -1
- package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-4pi7jooW.js +0 -75
- package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-z2XCMaLL.js +0 -28
- package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-CBVA9v1-.js +0 -491
- package/site/dist/assets/FingerPrintIcon-ra2dqmJO.js +0 -1
- package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-DwAwc6Ny.js +0 -1
- package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-CZszQsZf.js +0 -1
- package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-DfX6nvFQ.js +0 -58
- package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-CDS_sk_t.js +0 -1
- package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-CPfNQemT.js +0 -1
- package/site/dist/assets/GlobeAltIcon-SEUEIe_E.js +0 -1
- package/site/dist/assets/GooglePay-B53WnudL-aap7zwag.js +0 -1
- package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-DgSjCjQI.js +0 -4
- package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-DO4wICml.js +0 -1
- package/site/dist/assets/InfoBanner-Cb3p1z12-CDWt2ADo.js +0 -22
- package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js +0 -1
- package/site/dist/assets/InstallWalletScreen-DTA8dwLv-DGpewEch.js +0 -1
- package/site/dist/assets/LandingScreen-CGWUoSUG-CUOCWUXd.js +0 -1
- package/site/dist/assets/Link-BdDilT2T-BYiP1zvW.js +0 -40
- package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-Tb6cAepT.js +0 -77
- package/site/dist/assets/LinkEmailScreen-dKo9frwc-pq0NF2JO.js +0 -1
- package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js +0 -117
- package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-B80UJqAZ.js +0 -1
- package/site/dist/assets/LockClosedIcon-BqkoEL9J.js +0 -1
- package/site/dist/assets/LoginFailedScreen-CN0dJV6U-DlnOM-Kh.js +0 -1
- package/site/dist/assets/ManualTransferScreen-CHqcuqbs-DSShupq9.js +0 -1
- package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-DUPV_SLA.js +0 -1
- package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-D96GpzXX.js +0 -1
- package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-CYQDa4ND.js +0 -1
- package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-CJtSAXGN.js +0 -1
- package/site/dist/assets/ModalFooter-BCuEK_nz-D2I8KWtk.js +0 -403
- package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-Bx5aHy-z.js +0 -16
- package/site/dist/assets/OAuthStatusScreen-ufbOa-da-CS6988X2.js +0 -1
- package/site/dist/assets/OpenLink-CUpJ1mOr-EZWVSX2r.js +0 -39
- package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-BY4eK5Jh.js +0 -1
- package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-LXys76u9.js +0 -6
- package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-RczvLvmo.js +0 -20
- package/site/dist/assets/PhArrowClockwise-mOiWYLMV.js +0 -14
- package/site/dist/assets/PhArrowDown-CkoOD89h.js +0 -14
- package/site/dist/assets/PhArrowLeft-C0jlxVhM.js +0 -14
- package/site/dist/assets/PhArrowRight-BI-V03Xf.js +0 -14
- package/site/dist/assets/PhArrowUp-izKvURUW.js +0 -14
- package/site/dist/assets/PhArrowUpRight-Bn-JhHsY.js +0 -14
- package/site/dist/assets/PhArrowsLeftRight-CYsRQ2qh.js +0 -14
- package/site/dist/assets/PhBrowser-BjzAmrHO.js +0 -14
- package/site/dist/assets/PhCaretDown-ddSjwcwm.js +0 -14
- package/site/dist/assets/PhCaretLeft-B7YLoNEF.js +0 -14
- package/site/dist/assets/PhCaretRight-BY8D5MIg.js +0 -14
- package/site/dist/assets/PhCaretUp-BG10nSut.js +0 -14
- package/site/dist/assets/PhCheck-DrKd7pBC.js +0 -14
- package/site/dist/assets/PhClock-Sj17weCB.js +0 -14
- package/site/dist/assets/PhCopy-rgttky8E.js +0 -14
- package/site/dist/assets/PhDeviceMobile-CnybhXY-.js +0 -14
- package/site/dist/assets/PhDotsThree-CSAEcba1.js +0 -14
- package/site/dist/assets/PhEnvelope-SmaNeXoQ.js +0 -14
- package/site/dist/assets/PhFunnelSimple-DKx35ITq.js +0 -14
- package/site/dist/assets/PhMagnifyingGlass-B6D0sWFL.js +0 -14
- package/site/dist/assets/PhPlus-CBvZvLax.js +0 -14
- package/site/dist/assets/PhWarningCircle-Cm58gXb9.js +0 -14
- package/site/dist/assets/PhX-C3b4cCEy.js +0 -14
- package/site/dist/assets/PhoneIcon-CzbssTb8.js +0 -1
- package/site/dist/assets/PinInput-DbZ0b1i1-1DtLWL81.js +0 -247
- package/site/dist/assets/QrCode-DbnZwlkH-ChwcUk_h.js +0 -22
- package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-C79jd345.js +0 -1
- package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-C9c0x-yq.js +0 -1
- package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-PNqHb6CI.js +0 -7
- package/site/dist/assets/ScreenLayout-OwaQQcxH-B4Z8FjFp.js +0 -1
- package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-CUpQZ9wq.js +0 -14
- package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-ZzvPLj2s.js +0 -15
- package/site/dist/assets/ShieldCheckIcon-Bjwe_-PV.js +0 -1
- package/site/dist/assets/SignRequestScreen-BHKv32KR-0qGeNipB.js +0 -26
- package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-C3lgJb68.js +0 -20
- package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-l35_C2DG.js +0 -1
- package/site/dist/assets/TodoList-DnyULl18-JxWWU9KA.js +0 -36
- package/site/dist/assets/TransactionDetails-e9nesl30-C91nJPM9.js +0 -109
- package/site/dist/assets/TransactionErrorView-BDBNqA_f-Cpm-4xzm.js +0 -178
- package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-BWCH7-Si.js +0 -31
- package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js +0 -6
- package/site/dist/assets/TurnstileWrapper-B7sNddys-Dgr80Gih.js +0 -1
- package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-Clk4zk-8.js +0 -1
- package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-BgRsoR3B.js +0 -1
- package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-D-SU-vAz.js +0 -1
- package/site/dist/assets/WalletCards-DH1rqayz-UuZ4i_Ze.js +0 -1
- package/site/dist/assets/WalletIcon-B1i03Vqc.js +0 -1
- package/site/dist/assets/WalletInfoCard-sq_2wgFg-TXTxmb8L.js +0 -29
- package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-CbrFb0ON.js +0 -1
- package/site/dist/assets/WalletLink-DK5LB5Ha-BYQZV7UV.js +0 -20
- package/site/dist/assets/WalletOverflowButton-bfCnp-9T-CNgSPnTS.js +0 -1
- package/site/dist/assets/WarningBanner-ZZqCEtZK-DNZUUOph.js +0 -21
- package/site/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
- package/site/dist/assets/analytics-mkkvFRju-DOXuftJB.js +0 -1
- package/site/dist/assets/basic-C9wn6QoQ.js +0 -1575
- package/site/dist/assets/bytes-CjWw8TJh.js +0 -1
- package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-tV1Idewc.js +0 -1
- package/site/dist/assets/ccip-BhHEqVIW.js +0 -1
- package/site/dist/assets/check-C_DTyjLS.js +0 -1
- package/site/dist/assets/chevron-down-iklXXH-z.js +0 -1
- package/site/dist/assets/circle-alert-KEOUF48T.js +0 -1
- package/site/dist/assets/circle-check-big-BJ_ADwB4.js +0 -1
- package/site/dist/assets/circle-x-BSfWmhYk.js +0 -1
- package/site/dist/assets/client-BnDcP42J.js +0 -9
- package/site/dist/assets/client-DH86IrJA.js +0 -125
- package/site/dist/assets/coinbase-DCPC2L_R-2ivYfoMv.js +0 -3
- package/site/dist/assets/copy-sK00DOfH.js +0 -1
- package/site/dist/assets/core-CRE213RM.js +0 -211
- package/site/dist/assets/createLucideIcon-D9OK_uxG.js +0 -1
- package/site/dist/assets/custom-V1wex-Di.js +0 -1
- package/site/dist/assets/dijkstra-COg3n3zL.js +0 -1
- package/site/dist/assets/embed.worker-BRIYO7m8.js +0 -1
- package/site/dist/assets/encodePacked-DyXYq3Cc.js +0 -1
- package/site/dist/assets/ethers-zTjbodk5-DSYOi6tU.js +0 -1
- package/site/dist/assets/external-link-Cdp8NBio.js +0 -1
- package/site/dist/assets/fallback-DiFue5Zm.js +0 -1
- package/site/dist/assets/farcaster-DPlSjvF5-DP2DLoHZ.js +0 -1
- package/site/dist/assets/features-B6BTj_BL.js +0 -5
- package/site/dist/assets/fingerprint-pattern-gFJTz5e4.js +0 -1
- package/site/dist/assets/floating-ui.react-D9ndYqYK.js +0 -1
- package/site/dist/assets/floating-ui.react-dom-CNbOgOFt.js +0 -1
- package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js +0 -1
- package/site/dist/assets/getChainName-DjpPdUSc-c2urPd0g.js +0 -1
- package/site/dist/assets/getErc20Balance-jXNpFf0N-mFQ9Iqk-.js +0 -1
- package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-Dx5he_uG.js +0 -1
- package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-C446pzMl.js +0 -1
- package/site/dist/assets/getTransactionCount-80UHlwAV.js +0 -1
- package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-FDalV59C.js +0 -1
- package/site/dist/assets/hashTypedData-Beq57Ogb.js +0 -22
- package/site/dist/assets/hooks.module-ClpaQ1Tg.js +0 -1
- package/site/dist/assets/hourglass-CB7z_I9H.js +0 -1
- package/site/dist/assets/http-BocEfKYb.js +0 -19
- package/site/dist/assets/index-0knDOgU9.js +0 -1
- package/site/dist/assets/index-9jNeS_nC.js +0 -1
- package/site/dist/assets/index-B--T-Fmt.js +0 -16
- package/site/dist/assets/index-BDkarAkX.js +0 -2
- package/site/dist/assets/index-BMfMy017.js +0 -679
- package/site/dist/assets/index-BOd8jv8-.js +0 -1
- package/site/dist/assets/index-BdEw5wyl-2VGMzHIs.js +0 -1
- package/site/dist/assets/index-C8ThRelw.js +0 -9
- package/site/dist/assets/index-D4LdLFDC.js +0 -1
- package/site/dist/assets/index-D6T-s6sR.js +0 -1
- package/site/dist/assets/index-D7396TWe.js +0 -1
- package/site/dist/assets/index-DdxtHe81.js +0 -2
- package/site/dist/assets/index-DvMddJcd-D7AEQrzj.js +0 -12
- package/site/dist/assets/index-nibyPLVP.js +0 -1
- package/site/dist/assets/index.browser-B6Bt5URJ.js +0 -1
- package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-D7xtzRqA.js +0 -1
- package/site/dist/assets/landmark-CMLKifhk.js +0 -1
- package/site/dist/assets/lock-BkyjNE8h.js +0 -1
- package/site/dist/assets/mail-B6-Tq9Ld.js +0 -1
- package/site/dist/assets/native-CJ5et6AR.js +0 -1
- package/site/dist/assets/nonceManager-zkW7cM66.js +0 -1
- package/site/dist/assets/parseEther-C7aOvuze.js +0 -1
- package/site/dist/assets/parseSignature-BIjcuWdB.js +0 -1
- package/site/dist/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/site/dist/assets/privateKeyToAccount-CRvvpHWf.js +0 -1
- package/site/dist/assets/property-CnFDNXw5.js +0 -3
- package/site/dist/assets/react-auth_false-DedQs79w.js +0 -1
- package/site/dist/assets/reservoir-x-nGuZkT-DFxAFt2v.js +0 -1
- package/site/dist/assets/roles-DV_6FRBZ.js +0 -1
- package/site/dist/assets/safe-url-D7SRPu33-A8zMgOTd.js +0 -1
- package/site/dist/assets/serializeErc6492Signature-CeJeL3h6.js +0 -1
- package/site/dist/assets/serializeTransaction-L-_Ej-jW.js +0 -8
- package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js +0 -1
- package/site/dist/assets/simulateTransaction-CfuOrae4-BHUMPf6Q.js +0 -1
- package/site/dist/assets/smartphone-DAN5rY0T.js +0 -1
- package/site/dist/assets/stripe.esm-Dv8C3q95.js +0 -2
- package/site/dist/assets/styles-BsotlekN-Cjuu2SDV.js +0 -9
- package/site/dist/assets/telegram-B-JqnkqZ-DTjJLkIF.js +0 -1
- package/site/dist/assets/to-ui-error-DWe-qwS3-Dx3yzcV0.js +0 -4
- package/site/dist/assets/toAccount-Bq6rbpbI.js +0 -1
- package/site/dist/assets/transaction-BNTP-bFm-CrebgH-D.js +0 -1
- package/site/dist/assets/transactionReceipt-BwJl-gjg.js +0 -1
- package/site/dist/assets/transfer-6YztDh-t-DU6hH7CZ.js +0 -1
- package/site/dist/assets/transformers.web-BEKVh7pD.js +0 -40
- package/site/dist/assets/transformers.web-aWa49tv1.js +0 -40
- package/site/dist/assets/triangle-alert-ndoiBs4y.js +0 -1
- package/site/dist/assets/twitch-5IOe4sIQ-BXviIywg.js +0 -1
- package/site/dist/assets/useGetSolPrice-x7gfUIHJ-C7axYJ--.js +0 -1
- package/site/dist/assets/useGetTokenPrice-CaoUkb79-CR4CrguU.js +0 -1
- package/site/dist/assets/useI18n-C-5n_noF-C_t8QqBJ.js +0 -1
- package/site/dist/assets/useWalletBalance-CZnP5f_f-BnSHLVI_.js +0 -1
- package/site/dist/assets/w3m-modal-Bz5KWTQ-.js +0 -1174
- package/site/dist/assets/wallet-DTM31trz.js +0 -2
- package/site/dist/assets/wallet-UESEqPei.js +0 -1
- package/site/dist/assets/wallet-connect-BvJtUsDt-CnvUnFbz.js +0 -1
- package/site/dist/assets/walletconnect-v2-3frQFwbg-CzQk99gS.js +0 -15
- package/site/dist/assets/x-B2_XdOVQ.js +0 -1
package/src/publish/view.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// site/worker.js, on a cron (the free tier)
|
|
6
6
|
//
|
|
7
7
|
// Reads the registry and storage and nothing else: every repo the app presents (its
|
|
8
|
-
// members' repos, less its exclusions, `appRepos`), at their latest heads
|
|
9
|
-
//
|
|
8
|
+
// members' repos, less its exclusions, `appRepos`), at their latest heads; the schema
|
|
9
|
+
// (app.json's `types` + `relations`) comes from the caller. Embeds only records the view does not hold
|
|
10
10
|
// yet, drops removed ones, and writes, through a store (a directory or an R2 bucket):
|
|
11
11
|
//
|
|
12
12
|
// cdn/catalog
|
|
@@ -40,15 +40,9 @@ import { dirname } from "node:path";
|
|
|
40
40
|
import { EMBED_DIM, EMBED_DTYPE, EMBED_MODEL, embedDocumentDirect, packVec, unpackVec } from "../core/embed.js";
|
|
41
41
|
import { coverage as fitCoverage } from "../market/reactions.js";
|
|
42
42
|
|
|
43
|
-
/** The app owner's repo that declares the app's types: one TYPE_TAG record per type, one
|
|
44
|
-
* RELATION_TAG record per allowed reference between two of them. */
|
|
45
|
-
export const SCHEMA_REPO = "fangorn.schema";
|
|
46
|
-
export const TYPE_TAG = "fangorn.type.v1";
|
|
47
|
-
export const RELATION_TAG = "fangorn.relation.v1";
|
|
48
43
|
export const EMBEDDER = { runtime: "transformers.js", model: EMBED_MODEL, dtype: EMBED_DTYPE };
|
|
49
44
|
const SINGULAR = ["identity", "title", "subtitle", "temporal", "spatial", "media", "thread"];
|
|
50
45
|
const MULTI = ["tags", "measures", "relations", "text"];
|
|
51
|
-
const ZERO = "0x0000000000000000000000000000000000000000";
|
|
52
46
|
// Refit coverage once a domain has grown this many times over what it was fit on.
|
|
53
47
|
const COVERAGE_REFIT = 2;
|
|
54
48
|
|
|
@@ -75,17 +69,13 @@ export function composeText(fields, rm) {
|
|
|
75
69
|
return s.slice(0, 1000 - "search_document: ".length);
|
|
76
70
|
}
|
|
77
71
|
|
|
78
|
-
/**
|
|
79
|
-
export function
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
else if (r.type === RELATION_TAG && p.rel && p.from && p.to)
|
|
86
|
-
relations.push({ rel: String(p.rel), from: String(p.from), to: String(p.to) });
|
|
87
|
-
}
|
|
88
|
-
return { types, relations };
|
|
72
|
+
/** app.json's `types` + `relations` → { types: {tag: {description, role_map, presentation}}, relations }. */
|
|
73
|
+
export function schemaOf({ types = {}, relations = [] } = {}) {
|
|
74
|
+
return {
|
|
75
|
+
types: Object.fromEntries(Object.entries(types).map(([tag, t]) =>
|
|
76
|
+
[tag, { description: String(t.description ?? ""), role_map: t.role_map ?? {}, presentation: t.presentation ?? {} }])),
|
|
77
|
+
relations: relations.filter((r) => r.rel && r.from && r.to).map((r) => ({ rel: String(r.rel), from: String(r.from), to: String(r.to) })),
|
|
78
|
+
};
|
|
89
79
|
}
|
|
90
80
|
|
|
91
81
|
/** Declared means declared: every role present, left-out ones empty. */
|
|
@@ -281,7 +271,7 @@ const sha256 = (s) => createHash("sha256").update(s).digest("hex");
|
|
|
281
271
|
|
|
282
272
|
/**
|
|
283
273
|
* Bring the view up to date with what the app presents. `fangorn` is an SDK client (reads
|
|
284
|
-
* only); the view goes to `store`, or the directory `out`. `repos` narrows it to those repo
|
|
274
|
+
* only); `schema` is app.json's { types, relations } (a type it leaves out is guessed); the view goes to `store`, or the directory `out`. `repos` narrows it to those repo
|
|
285
275
|
* names (every publisher's); without it, every repo the app presents. `fromBlock` must be
|
|
286
276
|
* at or before the first update to a repo the app presents, or a repo the scan misses is left out;
|
|
287
277
|
* left out, the SDK's deployment start. `embedBatch(texts)` embeds many at once where the
|
|
@@ -290,25 +280,20 @@ const sha256 = (s) => createHash("sha256").update(s).digest("hex");
|
|
|
290
280
|
* ([{owner, repo, root}], exclusions already applied), as a Worker does across runs.
|
|
291
281
|
* Returns per-domain counts of what changed.
|
|
292
282
|
*/
|
|
293
|
-
export async function publishView({ fangorn, app, repos, out, store = fsStore(out), fromBlock, presented, rebake = false,
|
|
283
|
+
export async function publishView({ fangorn, app, schema, repos, out, store = fsStore(out), fromBlock, presented, rebake = false,
|
|
294
284
|
embed = embedDocumentDirect, embedBatch = (ts) => Promise.all(ts.map(embed)),
|
|
295
285
|
embedder = EMBEDDER, log = console.log, shardRows = 20000, concurrency = 4, open = (p) => p }) {
|
|
296
286
|
fangorn.setAppId(app);
|
|
297
287
|
const appId = fangorn.getAppId();
|
|
298
|
-
|
|
299
|
-
let schema = { types: {}, relations: [] };
|
|
300
|
-
if (owner === ZERO) log(`app ${app} is unclaimed, so it has no schema; every type will be guessed`);
|
|
301
|
-
else {
|
|
302
|
-
try { schema = parseSchema((await retry(() => fangorn.readRepo(owner, SCHEMA_REPO))).contents); }
|
|
303
|
-
catch (e) { log(`schema: none read (${e.message}); every type will be guessed`); }
|
|
304
|
-
}
|
|
288
|
+
schema = schemaOf(schema);
|
|
305
289
|
const declared = Object.keys(schema.types);
|
|
306
290
|
log(`schema: ${declared.length ? declared.join(", ") : "no declared types"}`);
|
|
307
291
|
const schemaHash = sha256(JSON.stringify(schema));
|
|
308
292
|
|
|
309
293
|
// Every repo the app presents, at its accepted head: one log scan, exclusions applied.
|
|
310
294
|
const listed = (presented ?? await retry(() => fangorn.appRepos(fromBlock == null ? {} : { fromBlock: BigInt(fromBlock) })))
|
|
311
|
-
|
|
295
|
+
// ponytail: "fangorn.schema" is where apps shipped before 2026-10-22 committed their schema; never data.
|
|
296
|
+
.filter((t) => t.repo !== "fangorn.schema" && (!repos?.length || repos.includes(t.repo)));
|
|
312
297
|
log(`${listed.length} repo(s) presented${repos?.length ? ` of ${repos.join(", ")}` : ""}`);
|
|
313
298
|
|
|
314
299
|
const report = {};
|
|
@@ -535,10 +520,9 @@ if (typeof process !== "undefined" && import.meta.url === `file://${process.argv
|
|
|
535
520
|
|
|
536
521
|
const APP = `0x${"ab".repeat(32)}`, OWNER = `0x${"11".repeat(20)}`, PUB = `0x${"22".repeat(20)}`;
|
|
537
522
|
const TAG = "shop.item.v1";
|
|
523
|
+
const schema = { types: { [TAG]: { description: "Things for a room.", role_map: { identity: "sku", title: "name", text: "about" },
|
|
524
|
+
presentation: { externalUrl: { [TAG]: "https://shop.example/{sku}" } } } } };
|
|
538
525
|
const chain = {
|
|
539
|
-
[`${OWNER}/${SCHEMA_REPO}`]: { records: [rec("t1", TYPE_TAG, {
|
|
540
|
-
tag: TAG, description: "Things for a room.", role_map: { identity: "sku", title: "name", text: "about" },
|
|
541
|
-
presentation: { externalUrl: { [TAG]: "https://shop.example/{sku}" } } })] },
|
|
542
526
|
[`${PUB}/shop`]: { records: [
|
|
543
527
|
rec("c1", TAG, { sku: "a1", name: "Oak table", about: "a solid oak dining table", price: 3 }),
|
|
544
528
|
rec("c2", TAG, { sku: "b2", name: "Lamp", about: "brass reading lamp", price: 1 }),
|
|
@@ -557,11 +541,11 @@ if (typeof process !== "undefined" && import.meta.url === `file://${process.argv
|
|
|
557
541
|
appendFileSync(`${out}/vectors.ndjson`, '["cut sho');
|
|
558
542
|
eq(packVec(await cachedEmbed(`${out}/vectors.ndjson`, embed)("Title: Oak")), packVec(v1), "a line cut short by a kill is skipped, not fatal");
|
|
559
543
|
embedded.length = 0; rmSync(`${out}/vectors.ndjson`);
|
|
560
|
-
const run = () => publishView({ fangorn, app: APP, out, embed, log: () => {} });
|
|
544
|
+
const run = () => publishView({ fangorn, app: APP, schema, out, embed, log: () => {} });
|
|
561
545
|
|
|
562
546
|
const d = domainFor(APP, PUB, "shop");
|
|
563
547
|
const split = mkdtempSync(`${tmpdir()}/view-`);
|
|
564
|
-
await publishView({ fangorn, app: APP, out: split, embed, log: () => {}, shardRows: 2 });
|
|
548
|
+
await publishView({ fangorn, app: APP, schema, out: split, embed, log: () => {}, shardRows: 2 });
|
|
565
549
|
eq(manifestOf(split, d).shards.map((s) => s.count), [2, 1], "rows past shardRows go to the next shard");
|
|
566
550
|
embedded.length = 0;
|
|
567
551
|
eq((await run())[d], { added: 3, removed: 0 }, "first run embeds everything");
|
|
@@ -626,16 +610,16 @@ if (typeof process !== "undefined" && import.meta.url === `file://${process.argv
|
|
|
626
610
|
let budget = 40;
|
|
627
611
|
const capped = (ts) => (budget -= ts.length) < 0 ? Promise.reject(new Error("daily allowance used")) : Promise.all(ts.map(embed));
|
|
628
612
|
const bd = domainFor(APP, PUB, "big");
|
|
629
|
-
eq((await publishView({ fangorn, app: APP, out: big, repos: ["big"], embedBatch: capped, log: () => {} }))[bd],
|
|
613
|
+
eq((await publishView({ fangorn, app: APP, schema, out: big, repos: ["big"], embedBatch: capped, log: () => {} }))[bd],
|
|
630
614
|
{ added: 32, removed: 0, partial: true }, "an encoder that gives out keeps what it embedded");
|
|
631
615
|
eq([manifestOf(big, bd).count, manifestOf(big, bd).head], [32, null], "served, and the head not taken");
|
|
632
616
|
budget = 1e9;
|
|
633
|
-
eq((await publishView({ fangorn, app: APP, out: big, repos: ["big"], embedBatch: capped, log: () => {} }))[bd],
|
|
617
|
+
eq((await publishView({ fangorn, app: APP, schema, out: big, repos: ["big"], embedBatch: capped, log: () => {} }))[bd],
|
|
634
618
|
{ added: 48, removed: 0 }, "the next run embeds only the rest");
|
|
635
619
|
eq(manifestOf(big, bd).count, 80, "and serves all of it");
|
|
636
620
|
delete chain[BIG];
|
|
637
621
|
rmSync(big, { recursive: true, force: true });
|
|
638
|
-
eq((await publishView({ fangorn, app: APP, out, embed, rebake: true, log: () => {} }))[d],
|
|
622
|
+
eq((await publishView({ fangorn, app: APP, schema, out, embed, rebake: true, log: () => {} }))[d],
|
|
639
623
|
{ added: 2, removed: 0 }, "--rebake starts the domain over");
|
|
640
624
|
eq(readdirSync(`${out}/cdn/domains/${d}/shards`).length, 1, "and leaves no orphaned shards");
|
|
641
625
|
rmSync(out, { recursive: true, force: true });
|
|
@@ -644,16 +628,16 @@ if (typeof process !== "undefined" && import.meta.url === `file://${process.argv
|
|
|
644
628
|
// undeclared one is left alone; a target whose identity moves relinks the row without embedding it.
|
|
645
629
|
{
|
|
646
630
|
const T = "civic.item.v1", M = "civic.matter.v1";
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
631
|
+
const relSchema = { types: { [T]: { role_map: { identity: "item_id", title: "heading", thread: "part_of" } },
|
|
632
|
+
[M]: { role_map: { identity: "matter_id", title: "title" } } },
|
|
633
|
+
relations: [{ rel: "part_of", from: T, to: M }] };
|
|
634
|
+
const rel = {
|
|
651
635
|
[`${PUB}/civic`]: { records: [
|
|
652
636
|
rec("i1", T, { item_id: "a#1", heading: "Rezone, committee", part_of: { local: "m" } }),
|
|
653
637
|
rec("i2", T, { item_id: "b#4", heading: "Rezone, council", cites: { local: "m" } }),
|
|
654
638
|
rec("m1", M, { matter_id: "plover:7", title: "Rezone" }, "m")] } };
|
|
655
639
|
const o = mkdtempSync(`${tmpdir()}/view-`), dr = domainFor(APP, PUB, "civic");
|
|
656
|
-
const go = () => publishView({ fangorn: localFangorn(rel, { appId: APP, owner: OWNER }), app: APP, out: o, embed, log: () => {} });
|
|
640
|
+
const go = () => publishView({ fangorn: localFangorn(rel, { appId: APP, owner: OWNER }), app: APP, schema: relSchema, out: o, embed, log: () => {} });
|
|
657
641
|
const rows = async () => Object.fromEntries([...(await loadDomain(fsStore(o), `cdn/domains/${dr}`)).rows.values()]
|
|
658
642
|
.map((r) => [r.fields.heading ?? r.fields.title, r.fields.part_of ?? r.fields.cites ?? null]));
|
|
659
643
|
await go();
|
|
@@ -682,7 +666,7 @@ if (typeof process !== "undefined" && import.meta.url === `file://${process.argv
|
|
|
682
666
|
},
|
|
683
667
|
};
|
|
684
668
|
const r2 = r2Store(bucket);
|
|
685
|
-
const via = await publishView({ fangorn, app: APP, store: r2, embed, log: () => {} });
|
|
669
|
+
const via = await publishView({ fangorn, app: APP, schema, store: r2, embed, log: () => {} });
|
|
686
670
|
eq(Object.keys(via), [d], "a view builds into a bucket");
|
|
687
671
|
eq(await r2.list("cdn/domains"), [d], "list names a folder's children");
|
|
688
672
|
eq((await liveFields(r2)).length, 2, "and reads back");
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# A Fangorn app
|
|
2
|
+
|
|
3
|
+
This repo holds the app's recipe, not its data: what a record is (`app.json`), what a good
|
|
4
|
+
answer looks like (`eval/`), and the Worker that serves it (`wrangler.json`). It can be
|
|
5
|
+
public. The data lives on chain and IPFS, committed by the app's members; the Worker
|
|
6
|
+
indexes it every 5 minutes, and serves the site, the view, `/mcp` and the agent card.
|
|
7
|
+
|
|
8
|
+
## Deploy
|
|
9
|
+
|
|
10
|
+
[](https://deploy.workers.cloudflare.com/?url=https://github.com/fangorn-network/westmarch/tree/main/template)
|
|
11
|
+
|
|
12
|
+
1. Claim the app at [fangorn.network](https://fangorn.network).
|
|
13
|
+
2. Press the button. Name the Worker after the app (`my-app`) and its R2 bucket
|
|
14
|
+
`my-app-view`. Cloudflare copies this repo into your GitHub, makes the bucket and
|
|
15
|
+
deploys; every push to `main` deploys again.
|
|
16
|
+
3. Back at fangorn.network, give the app its Worker's URL. Your wallet registers the
|
|
17
|
+
app's agent and binds its card there.
|
|
18
|
+
|
|
19
|
+
An app name with a dot or an underscore can't be a Worker name: set `"app"` in
|
|
20
|
+
`app.json` to the name you claimed.
|
|
21
|
+
|
|
22
|
+
`npm run build` (`westmarch build`) is what Cloudflare runs: it builds the site and writes
|
|
23
|
+
the app's config into `wrangler.json`, without signing or deploying anything.
|
|
24
|
+
|
|
25
|
+
## Make it yours
|
|
26
|
+
|
|
27
|
+
Edit `app.json`: `name`, `description`, and the type: rename `my-app.item.v1` and map your
|
|
28
|
+
fields in `role_map`. Push, and the Worker follows.
|
|
29
|
+
|
|
30
|
+
## Publish data
|
|
31
|
+
|
|
32
|
+
Any member of the app commits records of its type, from anywhere:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
echo '{"records":[{"id":"first","type":"my-app.item.v1","payload":{"id":"first","title":"Hello","text":"The first item.","tags":["demo"]}}]}' > items.json
|
|
36
|
+
fangorn --app my-app repo init items
|
|
37
|
+
fangorn --app my-app commit items.json -m "first items"
|
|
38
|
+
fangorn --app my-app push
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The view picks it up within 5 minutes at `<url>/view`. A source that crawls something
|
|
42
|
+
on a schedule goes in `app.json` `sources`, and ships with `npx westmarch-ship app.json`;
|
|
43
|
+
see westmarch's docs.
|
|
44
|
+
|
|
45
|
+
## Keep it good
|
|
46
|
+
|
|
47
|
+
Write `eval/goals.md` (who it serves) and `eval/golden.jsonl` (one check per line:
|
|
48
|
+
`{"id","q","expect","min","goal"}`), then grade the live view:
|
|
49
|
+
`npx westmarch-eval <url>/view`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"app": "my-app",
|
|
3
|
+
"name": "my-app",
|
|
4
|
+
"description": "One sentence: what is in here, and who it is for.",
|
|
5
|
+
"network": "baseSepolia",
|
|
6
|
+
"site": {
|
|
7
|
+
"project": "my-app",
|
|
8
|
+
"examples": []
|
|
9
|
+
},
|
|
10
|
+
"tags": [],
|
|
11
|
+
"types": {
|
|
12
|
+
"my-app.item.v1": {
|
|
13
|
+
"description": "One item: what a record is, in the words a searcher would use.",
|
|
14
|
+
"role_map": {
|
|
15
|
+
"identity": "id",
|
|
16
|
+
"title": "title",
|
|
17
|
+
"tags": ["tags"],
|
|
18
|
+
"text": ["text"]
|
|
19
|
+
},
|
|
20
|
+
"presentation": {
|
|
21
|
+
"types": { "my-app.item.v1": { "singular": "item", "plural": "items" } },
|
|
22
|
+
"facets": ["tags"]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"sources": []
|
|
27
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Goals
|
|
2
|
+
|
|
3
|
+
One section per kind of person this app serves. Each check in golden.jsonl names one with `goal`.
|
|
4
|
+
|
|
5
|
+
## <goal-id>: who finds what
|
|
6
|
+
- **They ask:** two or three real questions, in their words.
|
|
7
|
+
- **Failure looks like:** what a wrong or missing answer would be.
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"type": "module",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "westmarch build",
|
|
6
|
+
"deploy": "wrangler deploy"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@fangorn-network/westmarch": "2026.10.22-dev",
|
|
10
|
+
"@huggingface/transformers": "^4.3.1",
|
|
11
|
+
"wrangler": "^4.83.0"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app",
|
|
3
|
+
"main": "node_modules/@fangorn-network/westmarch/site/worker.js",
|
|
4
|
+
"compatibility_date": "2025-09-15",
|
|
5
|
+
"compatibility_flags": ["nodejs_compat"],
|
|
6
|
+
"assets": { "directory": ".ship/site", "binding": "ASSETS" },
|
|
7
|
+
"r2_buckets": [{ "binding": "VIEW", "bucket_name": "my-app-view" }],
|
|
8
|
+
"ai": { "binding": "AI" },
|
|
9
|
+
"triggers": { "crons": ["*/5 * * * *"] },
|
|
10
|
+
"alias": { "@huggingface/transformers": "./node_modules/@fangorn-network/westmarch/site/no-model.js" },
|
|
11
|
+
"vars": {}
|
|
12
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as p,W as m,l,j as n}from"./index-BMfMy017.js";import{n as s}from"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import{c as u}from"./createLucideIcon-D9OK_uxG.js";import"./preload-helper-PPVm8Dsz.js";import"./index-BOd8jv8-.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./index-CWARkn2w-D6ikWJWj.js";const g=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],d=u("circle-question-mark",g),y=({title:o="Account not found",subtitle:i,appName:t="this app",ctaText:a="Try logging in again",onRetry:e})=>n.jsx(s,{title:o,subtitle:i||`Please try logging in again or go to ${t} to create an account.`,icon:d,iconVariant:"warning",primaryCta:{label:a,onClick:e},watermark:!0}),V={component:()=>{let{navigate:o,setModalData:i,data:t}=p(),a=m(),{getAuthMeta:e,client:r}=l();return n.jsx(y,{appName:a?.name,onRetry:()=>{let c=e();i({...t,login:{...t?.login,...c?.disableSignup?{disableSignup:!0}:{}}}),r?.authFlow&&(r.authFlow=void 0),o("LandingScreen")}})}};export{V as AccountNotFoundScreen,y as AccountNotFoundScreenView,V as default};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import{Y as A,u as k,W as b,J as L,j as e,g as p}from"./index-BMfMy017.js";import{r as t}from"./index-BOd8jv8-.js";import{n as F}from"./index-CWARkn2w-D6ikWJWj.js";import{h as G,t as O}from"./GooglePay-B53WnudL-aap7zwag.js";import{a as g,o as Y,p as _}from"./isPaymentRequestAvailable-Bq1cemEn-D7xtzRqA.js";import{n as R}from"./styles-DVyDvTdj-CI4xZNHp.js";import{i as w,l as n,s as l}from"./styles-hslXy6xG-DeVcFoDD.js";import{C as D,L as T}from"./landmark-CMLKifhk.js";import{W as S}from"./wallet-UESEqPei.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./createLucideIcon-D9OK_uxG.js";const ae={component:()=>{let r=A(),{onUserCloseViaDialogOrKeybindRef:d}=k(),P=b(),i=t.useRef(!1),h=g(Y),y=g(_),[v,E]=t.useState(!1),m=h?"APPLE_PAY":h===!1&&y?"GOOGLE_PAY":null,x=h===!0||h===!1&&y!==void 0,f=!r?.startFiat||x||v;t.useEffect((()=>{let j=window.setTimeout((()=>E(!0)),2e3);return()=>window.clearTimeout(j)}),[]),t.useEffect((()=>{r&&(i.current=!1)}),[r]);let C=t.useRef(null);t.useEffect((()=>{r&&!r.error&&f&&C.current!==r&&(C.current=r,r.recordRowsViewed?.({walletPay:r.startFiat?m:void 0,walletPayTimedOut:r.startFiat?!x:void 0}))}),[f,r,m,x]);let s=t.useCallback((async()=>{!i.current&&r&&(i.current=!0,L(),await r.onCancel())}),[r]);if(t.useEffect((()=>(d.current=s,()=>{d.current===s&&(d.current=null)})),[s,d]),!r)return null;if(r.error)return e.jsx(w,{title:"Unable to add funds",subtitle:r.error,showClose:!0,onClose:s,primaryCta:{label:"Close",onClick:s}});let u=async j=>{i.current||(i.current=!0,await r.startFiat?.(j))};return e.jsx(w,{title:"Pay with",subtitle:"Debit cards typically have higher success rates than credit cards, even with Apple Pay or Google Pay.",showClose:!0,onClose:s,children:f?e.jsxs(R,{style:{marginTop:"1rem"},$colorScheme:P.appearance.palette.colorScheme,children:[r.startFiat&&e.jsxs(n,{onClick:()=>u("CREDIT_DEBIT_CARD"),children:[e.jsx(o,{children:e.jsx(D,{})}),e.jsxs(a,{children:[e.jsx(l,{children:"Debit or credit card"}),e.jsx(c,{children:"Less than 10 minutes"})]})]}),r.startFiat&&m==="APPLE_PAY"&&e.jsxs(n,{onClick:()=>u("APPLE_PAY"),children:[e.jsx(o,{children:e.jsx(G,{width:18,height:18})}),e.jsxs(a,{children:[e.jsx(l,{children:"Apple Pay"}),e.jsx(c,{children:"Less than 10 minutes"})]})]}),r.startFiat&&m==="GOOGLE_PAY"&&e.jsxs(n,{onClick:()=>u("GOOGLE_PAY"),children:[e.jsx(o,{children:e.jsx(O,{width:18,height:18})}),e.jsxs(a,{children:[e.jsx(l,{children:"Google Pay"}),e.jsx(c,{children:"Less than 10 minutes"})]})]}),r.startFiat&&e.jsxs(n,{onClick:()=>u("BANK"),children:[e.jsx(o,{children:e.jsx(T,{})}),e.jsxs(a,{children:[e.jsx(l,{children:"Bank account"}),e.jsx(c,{children:"1–2 days"})]})]}),r.startCrypto&&e.jsxs(n,{onClick:async()=>{i.current||(i.current=!0,await r.startCrypto?.())},children:[e.jsx(o,{children:e.jsx(S,{})}),e.jsxs(a,{children:[e.jsx(l,{children:"Crypto wallet or exchange"}),e.jsx(c,{children:"Instant"})]})]})]}):e.jsx(B,{children:e.jsx(F,{size:"50px"})})})}};let B=p.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
align-items: center;
|
|
5
|
-
margin-top: 1rem;
|
|
6
|
-
min-height: 8rem;
|
|
7
|
-
`,o=p.span`
|
|
8
|
-
width: 2rem;
|
|
9
|
-
height: 2rem;
|
|
10
|
-
border-radius: var(--privy-border-radius-full);
|
|
11
|
-
background-color: var(--privy-color-background-2);
|
|
12
|
-
color: var(--privy-color-icon-muted);
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
flex-shrink: 0;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
|
|
19
|
-
svg {
|
|
20
|
-
width: 1.125rem;
|
|
21
|
-
height: 1.125rem;
|
|
22
|
-
}
|
|
23
|
-
`,a=p.span`
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
align-items: flex-start;
|
|
27
|
-
`,c=p.span`
|
|
28
|
-
font-size: 0.875rem;
|
|
29
|
-
line-height: 1.25rem;
|
|
30
|
-
color: var(--privy-color-foreground-3);
|
|
31
|
-
`;export{ae as AddFundsSelectionScreen,ae as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{j as e,o as p,g as t}from"./index-BMfMy017.js";import{r as m}from"./index-BOd8jv8-.js";import{f as d}from"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import{C as x}from"./check-C_DTyjLS.js";import{C as f}from"./copy-sK00DOfH.js";const k=({address:r,showCopyIcon:i,url:n,className:l})=>{let[o,a]=m.useState(!1);function c(s){s.stopPropagation(),navigator.clipboard.writeText(r).then((()=>a(!0))).catch(console.error)}return m.useEffect((()=>{if(o){let s=setTimeout((()=>a(!1)),3e3);return()=>clearTimeout(s)}}),[o]),e.jsxs(h,n?{children:[e.jsx(g,{title:r,className:l,href:`${n}/address/${r}`,target:"_blank",children:p(r)}),i&&e.jsx(d,{onClick:c,size:"sm",style:{gap:"0.375rem"},children:e.jsxs(e.Fragment,o?{children:["Copied",e.jsx(x,{size:16})]}:{children:["Copy",e.jsx(f,{size:16})]})})]}:{children:[e.jsx(u,{title:r,className:l,children:p(r)}),i&&e.jsx(d,{onClick:c,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:e.jsxs(e.Fragment,o?{children:["Copied",e.jsx(x,{size:14})]}:{children:["Copy",e.jsx(f,{size:14})]})})]})};let h=t.span`
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 0.5rem;
|
|
5
|
-
`,u=t.span`
|
|
6
|
-
font-size: 14px;
|
|
7
|
-
font-weight: 500;
|
|
8
|
-
color: var(--privy-color-foreground);
|
|
9
|
-
`,g=t.a`
|
|
10
|
-
font-size: 14px;
|
|
11
|
-
color: var(--privy-color-foreground);
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
text-decoration: underline;
|
|
16
|
-
}
|
|
17
|
-
`;export{k as d};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{B as f,u as h,W as g,l as v,j as e,g as C}from"./index-BMfMy017.js";import"./index-BOd8jv8-.js";import{v as m}from"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import{a as k}from"./shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js";import{n as x}from"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import{c as A}from"./createLucideIcon-D9OK_uxG.js";import{E as d}from"./external-link-Cdp8NBio.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./index-CWARkn2w-D6ikWJWj.js";const b=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],j=A("file-check",b),q={component:()=>{let{user:t,logout:r}=f(),{onUserCloseViaDialogOrKeybindRef:i,setModalData:o,navigate:n}=h(),a=g(),{acceptTerms:u,closePrivyModal:s,createAnalyticsEvent:y}=v(),c=l=>{l?.preventDefault(),s({shouldCallAuthOnSuccess:!1}),r()};return i.current=c,e.jsx(w,{termsAndConditionsUrl:a?.legal.termsAndConditionsUrl,privacyPolicyUrl:a?.legal.privacyPolicyUrl,onAccept:async l=>{l?.preventDefault(),await u(),t&&k(t,a.embeddedWallets)?(o({createWallet:{onSuccess:()=>{},onFailure:p=>{console.error(p),y({eventName:"embedded_wallet_creation_failure_logout",payload:{error:p,screen:"AffirmativeConsentScreen"}}),r()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")):s()},onDecline:c})}},w=({termsAndConditionsUrl:t,privacyPolicyUrl:r,onAccept:i,onDecline:o,title:n="One last step",subtitle:a="By signing up, you agree to our terms and privacy policy."})=>e.jsx(x,{title:n,subtitle:a,icon:j,primaryCta:{label:"Accept",onClick:i},secondaryCta:{label:"No thanks",onClick:o},watermark:!0,children:(t||r)&&e.jsxs(_,{children:[t&&e.jsxs(m,{variant:"muted",href:t,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Terms",e.jsx(d,{width:16,height:16,strokeWidth:2.25})]}),r&&e.jsxs(m,{variant:"muted",href:r,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Privacy Policy",e.jsx(d,{width:16,height:16,strokeWidth:2.25})]})]})});let _=C.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 12px;
|
|
5
|
-
margin-top: var(--screen-space);
|
|
6
|
-
`;export{q as AffirmativeConsentScreen,w as AffirmativeConsentScreenView,q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as l,W as p,j as a}from"./index-BMfMy017.js";import"./index-BOd8jv8-.js";import{n as s}from"./safe-url-D7SRPu33-A8zMgOTd.js";import{n as m}from"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import{L as c}from"./lock-BkyjNE8h.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./index-CWARkn2w-D6ikWJWj.js";import"./createLucideIcon-D9OK_uxG.js";const u=({title:i="You don't have access to this app",subtitle:t="Have you been invited?",ctaText:e="Try another account",ctaLink:r,onCtaClick:n})=>a.jsx(m,{title:i,subtitle:t,icon:c,iconVariant:"warning",primaryCta:{label:e,onClick:()=>{let o=s(r);o?window.open(o,"_blank","noopener,noreferrer"):n?.()}},watermark:!0}),W={component:()=>{let{navigate:i}=l(),t=p(),e=t?.allowlistConfig.errorTitle||"You don't have access to this app",r=t?.allowlistConfig.errorDetail||"Have you been invited?",n=t?.allowlistConfig.errorCtaText||"Try another account",o=t?.allowlistConfig.errorCtaLink;return a.jsx(u,{title:e,subtitle:r,ctaText:n,ctaLink:o??void 0,onCtaClick:()=>{i("LandingScreen")}})}};export{W as AllowlistRejectionScreen,u as AllowlistRejectionScreenView,W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./index-BOd8jv8-.js";function o({title:a,titleId:l,...r},t){return e.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":l},r),a?e.createElement("title",{id:l},a):null,e.createElement("path",{fillRule:"evenodd",d:"M15.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H7.5a.75.75 0 0 1 0-1.5h11.69l-3.22-3.22a.75.75 0 0 1 0-1.06Zm-7.94 9a.75.75 0 0 1 0 1.06l-3.22 3.22H16.5a.75.75 0 0 1 0 1.5H4.81l3.22 3.22a.75.75 0 1 1-1.06 1.06l-4.5-4.5a.75.75 0 0 1 0-1.06l4.5-4.5a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const i=e.forwardRef(o);export{i as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as R,u as S,W as w,P as x,j as f,t as L,i}from"./index-BMfMy017.js";import{r as l}from"./index-BOd8jv8-.js";import{R as N}from"./ConnectWalletView-DqI-PTvX-BKX7fdYr.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import"./CopyableText-CQapvaMr-DHO818I0.js";import"./check-C_DTyjLS.js";import"./createLucideIcon-D9OK_uxG.js";import"./copy-sK00DOfH.js";import"./Link-BdDilT2T-BYiP1zvW.js";import"./QrCode-DbnZwlkH-ChwcUk_h.js";import"./dijkstra-COg3n3zL.js";import"./EmailInputForm-Cqo1mda8-CZD4r5LM.js";import"./ErrorMessage-D8VaAP5m-oSruKN8L.js";import"./useI18n-C-5n_noF-C_t8QqBJ.js";import"./WalletCards-DH1rqayz-UuZ4i_Ze.js";import"./wallet-connect-BvJtUsDt-CnvUnFbz.js";import"./styles-DVyDvTdj-CI4xZNHp.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./index-CWARkn2w-D6ikWJWj.js";const Z={component:()=>{let{setWalletConnectionStatus:a,closePrivyModal:p,inProgressAuthFlowRef:m}=R(),{data:t,navigate:n}=S(),o=w(),r=x(),s=t?.externalConnectWallet?.description,u=l.useRef(t?.externalConnectWallet?.walletList??o.appearance.walletList),W=l.useRef(t?.externalConnectWallet?.walletChainType??o.appearance.walletChainType),C=u.current,d=W.current,E=m.current==="link"?void 0:()=>n("LandingScreen");return f.jsx(N,{walletList:C,walletChainType:d,onClose:p,onConnect:l.useCallback((({connector:e,wallet:c})=>{r("connectWallet","onSuccess",{wallet:c}),a({status:"connected",connectedWallet:c,connector:e,connectError:null,connectRetry:()=>null}),n("ConnectionStatusScreen",!t?.externalConnectWallet?.preSelectedWalletId)}),[a,n,t?.login?.disableSignup,t?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof L?(console.warn(e.cause?e.cause:e.message),r("connectWallet","onError",e.privyErrorCode||i.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),r("connectWallet","onError",i.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:E,customDescription:s||"",preSelectedWalletId:t?.externalConnectWallet?.preSelectedWalletId,app:o})},isUnauthenticatedScreem:!0};export{Z as AuthenticateWithWalletScreen,Z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as D,l as Se,u as Te,v as Ie,p as we,Z as xe,a as Ce,b as g,o as U,i as v,n as be,V as Ee,j as i}from"./index-BMfMy017.js";import{F as Fe}from"./CheckCircleIcon-DBiWFjO6.js";import{r as a}from"./index-BOd8jv8-.js";import{c as Ne,n as $e,s as Ae}from"./Layouts-BMRfo5hw-D2u1-w8g.js";import{h as G}from"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import{o as Pe}from"./ScreenHeader-CHmc4-Lu-BqrAEXbV.js";import{t as V}from"./FundWalletMethodHeader-BWNkokCT-CZszQsZf.js";import{n as je}from"./index-CWARkn2w-D6ikWJWj.js";import{c as Ue}from"./useGetTokenPrice-CaoUkb79-CR4CrguU.js";import{t as Z}from"./analytics-mkkvFRju-DOXuftJB.js";import{l as K,o as Q,s as Y,r as z,u as J,h as Be}from"./reservoir-x-nGuZkT-DFxAFt2v.js";import{e as ke}from"./getChainName-DjpPdUSc-c2urPd0g.js";import{t as Le,n as We}from"./transaction-BNTP-bFm-CrebgH-D.js";import{U as qe,K as Me}from"./BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js";import{I as He}from"./TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js";import{al as Oe,cs as Re,ai as _e,aj as De,ah as x}from"./http-BocEfKYb.js";import{c as Ge}from"./custom-V1wex-Di.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./transactionReceipt-BwJl-gjg.js";import"./getTransactionCount-80UHlwAV.js";import"./toAccount-Bq6rbpbI.js";import"./hashTypedData-Beq57Ogb.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./useGetSolPrice-x7gfUIHJ-C7axYJ--.js";import"./getFormattedUsdFromLamports-De3U9GlO-C446pzMl.js";import"./getErc20Balance-jXNpFf0N-mFQ9Iqk-.js";import"./Value-DTgR824E-DZpvBCWi.js";import"./LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js";import"./ErrorMessage-D8VaAP5m-oSruKN8L.js";import"./Subtitle-CV-2yKE4-o-1FQLlX.js";import"./Title-BnzYV3Is-RX1f0RV-.js";import"./WalletIcon-B1i03Vqc.js";import"./Chip-CZKIKt9K-BWzs9fj5.js";import"./shared-FM0rljBt-c4eSjzGj.js";import"./ChevronDownIcon-2Os56gUt.js";import"./formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js";import"./ethers-zTjbodk5-DSYOi6tU.js";import"./styles-Cm9H63WO-Cv1TbqYi.js";import"./LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js";import"./TodoList-DnyULl18-JxWWU9KA.js";import"./x-B2_XdOVQ.js";import"./createLucideIcon-D9OK_uxG.js";import"./check-C_DTyjLS.js";import"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./circle-check-big-BJ_ADwB4.js";import"./fingerprint-pattern-gFJTz5e4.js";import"./floating-ui.react-D9ndYqYK.js";import"./floating-ui.react-dom-CNbOgOFt.js";import"./InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js";import"./Address-H8kD1d9O-CGQnt7Pu.js";import"./copy-sK00DOfH.js";import"./GlobeAltIcon-SEUEIe_E.js";const Kt={component:()=>{let X=D(),{rpcConfig:B,appId:y,closePrivyModal:ee,createAnalyticsEvent:k}=Se(),{navigate:te,setModalData:ae,data:d}=Te(),L=D(),{wallets:ne}=Ie(),[C,m]=a.useState(null),[ie,b]=a.useState(null),[p,re]=a.useState([]),[W,oe]=a.useState(0),[q,E]=a.useState(!1),[M,S]=a.useState(!1),[F,N]=a.useState(!1),[$,H]=a.useState(!1),[se,de]=a.useState(),[le,O]=a.useState();if(!d?.funding||d.funding.chainType!=="solana")throw Error("Invalid funding data");let{address:u,chain:T,connectedWallet:R}=d.funding,[I,ce]=a.useState(d.funding.amount),t=(R?.type==="ethereum"?R:void 0)??ne[0],ue=we(t?.walletClientType||"unknown"),_=ue?.name||"wallet",[l,me]=a.useState(null);a.useEffect((()=>{(async()=>{if(!t)return;let e=await t.getEthereumProvider();me(Oe({account:t.address,transport:Ge(e)}).extend(Re))})().catch(console.error)}),[t]);let[pe,fe]=a.useState(0n),he=Le(pe);a.useEffect((()=>{let e=X.solanaRpcs[T];e?xe({rpc:e.rpc,address:u}).then((o=>fe(BigInt(o)))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")}),[]);let[n,A]=a.useState(),{tokenPrice:ge}=Ue("solana"),{fundingAmountInBaseUnit:w,fundingAmountInUsd:ve}=We({amount:I,fee:0n,tokenPrice:ge,isUsdc:d.funding.isUSDC});if(a.useEffect((()=>{(async()=>{if(!l||!t)return;let e=["solana:testnet","solana:devnet"].includes(T);e&&console.warn("Solana testnets are not supported for bridging");let o=Ce(L.chains).filter((({testnet:r})=>!!r===e)),f=(await qe({chains:o,address:t.address,appId:y,rpcConfig:B})).filter((r=>r.balance>0n));if(f.length<1)return void m(new g(`Wallet ${U(t.address)} does not have enough funds.`,void 0,v.INSUFFICIENT_BALANCE));f.sort(((r,j)=>Number(j.balance-r.balance)));let s=(await Promise.allSettled(f.map((async r=>({...r,quote:await K({isTestnet:!1,input:Q({appId:y,amount:w.toString(),user:t.address,recipient:u,destinationChainId:z,destinationCurrency:Y,originChainId:r.chain.id})})}))))).filter((r=>r.status==="fulfilled")).map((r=>r.value));if(s.length<1)return void m(new g(`Unable to fetch quotes for bridging. Wallet ${U(t.address)} does not have enough funds.`,void 0,v.INSUFFICIENT_BALANCE));let P=s.map((({quote:r,balance:j,chain:ye})=>({bridgeTx:J(r),balance:j,chain:ye,isErc20Quote:!1}))).filter((({bridgeTx:r})=>!!r));if(P.length>1)return void re(P);let h=P.at(0);h?(S(!0),A({data:h.bridgeTx.data,to:h.bridgeTx.to,value:h.bridgeTx.value,chain:h.chain})):m(new g(`Unable to select bridge option from quotes. Wallet ${U(t.address)} does not have enough funds.`,void 0,v.INSUFFICIENT_BALANCE))})().catch(console.error)}),[l]),a.useEffect((()=>{(async()=>{let e,o;if(!l||!t||q||F||!n)return;E(!0);let f=_e({chain:n.chain,transport:De(be(n.chain,B,y))});try{e=await f.prepareTransactionRequest({account:t.address,to:n.to,chain:n.chain,data:n.data,value:BigInt(n.value??0)})}catch(s){console.error(s),p.length>1&&b(s.shortMessage??"Something went wrong")}if(e){e.type==="eip1559"||e.type==="eip4844"||e.type==="eip7702"?e.gasPrice!==void 0&&delete e.gasPrice:(e.type==="legacy"||e.type==="eip2930")&&(e.maxFeePerGas!==void 0&&delete e.maxFeePerGas,e.maxPriorityFeePerGas!==void 0&&delete e.maxPriorityFeePerGas),E(!1),N(!0);try{await l.switchChain({id:n.chain.id})}catch{await l.addChain({chain:n.chain}),await l.switchChain({id:n.chain.id})}try{o=await l.sendTransaction(e)}catch(s){console.error(s),s.name==="TransactionExecutionError"&&(p.length<1?m(new g(s.shortMessage,void 0,v.TRANSACTION_FAILURE)):b(s.shortMessage??"Something went wrong"))}if(o)return await l.waitForTransactionReceipt({hash:o}),M?(O("pending"),void de(o)):(N(!1),H(!0),void k({eventName:Z,payload:{provider:"external",status:"success",txHash:o,address:t.address,chainId:n.chain.id,chainType:"ethereum",value:n.value?x(BigInt(n.value),18):void 0,token:"ETH",destination:u,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:x(w,9),destinationToken:"SOL"}}));N(!1)}else E(!1)})().catch(console.error)}),[l,n]),Be({transactionHash:se,isTestnet:!1,bridgingStatus:le,setBridgingStatus:O,onSuccess({transactionHash:e}){S(!1),H(!0),k({eventName:Z,payload:{provider:"external",status:"success",txHash:e,address:t?.address,chainId:n?.chain.id,chainType:"ethereum",value:n?.value?x(BigInt(n.value),18):void 0,token:"ETH",destination:u,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:x(w,9),destinationToken:"SOL"}})},onFailure({error:e}){S(!1),m(e)}}),a.useEffect((()=>{C&&(ae({funding:d?.funding,solanaFundingData:d?.solanaFundingData,sendTransaction:d?.sendTransaction,errorModalData:{error:C,previousScreen:"TransferFromWalletScreen"}}),te("ErrorScreen",!1))}),[C]),a.useEffect((()=>{if(!$)return;let e=setTimeout(ee,Ee);return()=>clearTimeout(e)}),[$]),$)return i.jsxs(i.Fragment,{children:[i.jsx(V,{}),i.jsx(Ne,{}),i.jsxs($e,{children:[i.jsx(Fe,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),i.jsx(Pe,{title:"Success!",description:`You’ve successfully added ${I} SOL to your ${L.name} wallet. It may take a minute before the funds are available to use.`})]}),i.jsx(Ae,{}),i.jsx(G,{})]});let c=p[W];return p.length>1&&c?i.jsx(Me,{displayName:_,configuredFundingChain:T,formattedBalance:he,fundingAmount:I,fundingCurrency:"SOL",fundingAmountInUsd:ve,options:p,selectedOption:c,isPreparing:q,isSubmitting:F,addressToFund:u,fundingWalletAddress:t?.address||"",errorMessage:ie,onSubmit:()=>{d.funding?.amount!==I?(async function(){if(t&&c)try{let e=await K({isTestnet:!1,input:Q({appId:y,amount:w.toString(),user:t.address,recipient:u,destinationChainId:z,destinationCurrency:Y,originChainId:c.chain.id})}),o=J(e);if(!o)throw Error("Invalid transaction request");S(!0),A({data:o.data,to:o.to,value:o.value,chain:c.chain})}catch(e){console.error(e),m(new g("Unable to fetch quotes for bridging",e,v.INSUFFICIENT_BALANCE))}})().catch(console.error):A({to:c.bridgeTx.to,data:c.bridgeTx.data,value:c.bridgeTx.value,chain:c.chain})},onSelect:e=>{e!==W&&(b(null),oe(e))},onAmountChange:ce}):F&&t?i.jsx(He,{walletClientType:t?.walletClientType||"unknown",displayName:_,addressToFund:u,isBridging:M,isErc20Flow:!1,chainId:"solana",chainName:ke(T),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):i.jsxs(i.Fragment,{children:[i.jsx(V,{}),i.jsx(je,{}),i.jsx("div",{style:{marginTop:"1rem"}}),i.jsx(G,{})]})}};export{Kt as AwaitingEvmToSolBridgingScreen,Kt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as Re,u as Ge,W as Qe,v as Ve,p as Ze,n as se,b as S,o as $,i as w,c as oe,a as Ke,V as Oe,j as c}from"./index-BMfMy017.js";import{F as Ye}from"./CheckCircleIcon-DBiWFjO6.js";import{r}from"./index-BOd8jv8-.js";import{c as Je,n as ze,s as Xe}from"./Layouts-BMRfo5hw-D2u1-w8g.js";import{h as de}from"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import{o as et}from"./ScreenHeader-CHmc4-Lu-BqrAEXbV.js";import{t as ce}from"./FundWalletMethodHeader-BWNkokCT-CZszQsZf.js";import{n as tt}from"./index-CWARkn2w-D6ikWJWj.js";import{c as at}from"./useGetTokenPrice-CaoUkb79-CR4CrguU.js";import{t as le,a as nt}from"./transfer-6YztDh-t-DU6hH7CZ.js";import{t as rt}from"./formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js";import{n as it,o as ue,c as Q,i as st}from"./ethers-zTjbodk5-DSYOi6tU.js";import{t as me}from"./analytics-mkkvFRju-DOXuftJB.js";import{o as V,l as pe,f as he,u as ot,h as dt}from"./reservoir-x-nGuZkT-DFxAFt2v.js";import{U as ct,K as lt}from"./BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js";import{n as ut}from"./getErc20Balance-jXNpFf0N-mFQ9Iqk-.js";import{I as mt}from"./TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js";import{p as pt}from"./parseEther-C7aOvuze.js";import{al as ht,cs as ft,ai as fe,aj as ge,a5 as gt,ah as q}from"./http-BocEfKYb.js";import{c as vt}from"./custom-V1wex-Di.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./transactionReceipt-BwJl-gjg.js";import"./getTransactionCount-80UHlwAV.js";import"./toAccount-Bq6rbpbI.js";import"./hashTypedData-Beq57Ogb.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./useGetSolPrice-x7gfUIHJ-C7axYJ--.js";import"./Value-DTgR824E-DZpvBCWi.js";import"./LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js";import"./ErrorMessage-D8VaAP5m-oSruKN8L.js";import"./Subtitle-CV-2yKE4-o-1FQLlX.js";import"./Title-BnzYV3Is-RX1f0RV-.js";import"./WalletIcon-B1i03Vqc.js";import"./getChainName-DjpPdUSc-c2urPd0g.js";import"./Chip-CZKIKt9K-BWzs9fj5.js";import"./shared-FM0rljBt-c4eSjzGj.js";import"./ChevronDownIcon-2Os56gUt.js";import"./styles-Cm9H63WO-Cv1TbqYi.js";import"./LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js";import"./TodoList-DnyULl18-JxWWU9KA.js";import"./x-B2_XdOVQ.js";import"./createLucideIcon-D9OK_uxG.js";import"./check-C_DTyjLS.js";import"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./circle-check-big-BJ_ADwB4.js";import"./fingerprint-pattern-gFJTz5e4.js";import"./floating-ui.react-D9ndYqYK.js";import"./floating-ui.react-dom-CNbOgOFt.js";import"./InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js";import"./Address-H8kD1d9O-CGQnt7Pu.js";import"./copy-sK00DOfH.js";import"./GlobeAltIcon-SEUEIe_E.js";const Ia={component:()=>{let{rpcConfig:P,appId:I,closePrivyModal:ve,createAnalyticsEvent:Z}=Re(),{navigate:ye,setModalData:H,data:l}=Ge(),K=Qe(),{wallets:Ce}=Ve(),[Ie,Te]=r.useState(!1),[T,Se]=r.useState(0n),[O,Y]=r.useState(!1),[M,v]=r.useState(null),[we,L]=r.useState(null),[E,Ee]=r.useState([]),[J,be]=r.useState(0),[z,U]=r.useState([]),[X,F]=r.useState(!1),[_,N]=r.useState(!1),[ee,D]=r.useState(!1),[R,te]=r.useState(!1),[xe,$e]=r.useState(),[Fe,ae]=r.useState();if(!l?.funding||l.funding.chainType!=="ethereum")throw Error("Invalid funding data");let{erc20ContractInfo:o,chain:a,connectedWallet:ne}=l.funding,p=l.funding.address,m=l.funding.erc20Address,[b,Ne]=r.useState(l.funding.amount);r.useEffect((()=>{m&&!o&&v(Error("Unable to fetch token details"))}),[]);let u=!!m&&!!o,h=u?BigInt(parseFloat(b)*10**o.decimals):pt(b),n=(ne?.type==="ethereum"?ne:void 0)??Ce[0],Ae=Ze(n?.walletClientType||"unknown"),re=Ae?.name||"wallet",[y,je]=r.useState(null);r.useEffect((()=>{(async()=>{if(!n)return;let e=await n.getEthereumProvider();je(ht({account:n.address,transport:vt(e)}).extend(ft))})().catch(console.error)}),[n]);let[Be,Pe]=r.useState(0n);r.useEffect((()=>{fe({chain:a,transport:ge(se(a,P,I))}).getBalance({address:p}).then(Pe).catch(console.error)}),[]);let[Ue,We]=r.useState(0n);r.useEffect((()=>{u&&ut({chain:a,address:p,appId:I,rpcConfig:P,erc20Address:m}).then((e=>We(e.balance))).catch(console.error)}),[]);let{tokenPrice:x}=at(a.id),[s,A]=r.useState({to:p,chain:a,value:h,data:void 0});r.useEffect((()=>{(async()=>{let e,d;if(!y||!n||X||ee)return;F(!0);let f=fe({chain:s.chain,transport:ge(se(s.chain,P,I))});if(u&&!s.data)return await f.simulateContract({address:m,chain:s.chain,abi:le,functionName:"transfer",args:[p,h],account:n.address}).catch((i=>{if(i?.cause?.name==="ContractFunctionZeroDataError"||i?.message?.includes("returned no data"))return f.simulateContract({address:m,chain:s.chain,abi:nt,functionName:"transfer",args:[p,h],account:n.address}).catch((C=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",C)}));console.warn("Simulated token transfer failed with error, fetching bridge options.",i)}))?(F(!1),void A({to:m,chain:s.chain,data:gt({abi:le,functionName:"transfer",args:[p,h]}),value:"0x0"})):(F(!1),void Y(!0));try{e=await f.prepareTransactionRequest({account:n.address,to:s.to,chain:s.chain,data:s.data,value:BigInt(s.value??0)})}catch(i){if(console.error(i),E.length>1)L(i.shortMessage??"Something went wrong");else if(_&&E.length===0)return void v(new S(`Wallet ${$(n.address)} does not have enough funds.`,void 0,w.INSUFFICIENT_BALANCE))}if(!e)return F(!1),void Y(!0);e.type==="eip1559"||e.type==="eip4844"||e.type==="eip7702"?e.gasPrice!==void 0&&delete e.gasPrice:(e.type==="legacy"||e.type==="eip2930")&&(e.maxFeePerGas!==void 0&&delete e.maxFeePerGas,e.maxPriorityFeePerGas!==void 0&&delete e.maxPriorityFeePerGas),F(!1),D(!0),Te(!0),Se(e.gas);try{await y.switchChain({id:s.chain.id})}catch{await y.addChain({chain:s.chain}),await y.switchChain({id:s.chain.id})}try{d=await y.sendTransaction(e)}catch(i){if(console.error(i),i.name==="TransactionExecutionError")if(E.length<1){let C=i.shortMessage;(i.shortMessage.includes("rejected the request")||i.details.includes("rejected the request"))&&(C="User rejected the request."),v(new S(C,void 0,w.TRANSACTION_FAILURE))}else L(i.shortMessage??"Something went wrong")}if(d){if(await y.waitForTransactionReceipt({hash:d}),D(!1),_){if(z.length>0){let[i,...C]=z;return i?(U(C),void A(i)):void 0}return $e(d),void ae("pending")}te(!0),H(oe(l,"completed",d,n?.walletClientType,u,o,a)),Z({eventName:me,payload:{provider:"external",status:"success",txHash:d,address:n.address,chainId:s.chain.id,chainType:"ethereum",value:s.value?q(BigInt(s.value),o?.decimals??18):void 0,token:o?.symbol??m??"ETH",destinationAddress:p,destinationChainId:a.id,destinationChainType:"ethereum",destinationValue:h?q(h,o?.decimals??18):void 0,destinationToken:o?.symbol??m??a.nativeCurrency.name}})}else D(!1)})().catch(console.error)}),[y,s]),r.useEffect((()=>{(async()=>{if(!O||!y||!n)return;let e=Ke(K.chains).filter((t=>t.id!==a.id&&!!t.testnet==!!a.testnet));u&&e.unshift(a);let d=await ct({chains:e,address:n.address,appId:I,rpcConfig:P}),f=u?d.filter((t=>t.balance>0n)):d.filter((t=>t.balance>h)),i=u&&d.every((t=>t.balance===0n));if(f.length<1)return void v(new S(i?`Wallet ${$(n.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${$(n.address)} does not have enough funds.`,void 0,w.INSUFFICIENT_BALANCE));f.sort(((t,B)=>Number(u?(B.erc20Balance??0n)-(t.erc20Balance??0n):B.balance-t.balance)));let C=f.flatMap((t=>{let B=[{...t,isErc20Quote:!1,isTestnet:!!a.testnet,input:V({appId:I,amount:h.toString(),user:n.address,recipient:p,destinationChainId:a.id,destinationCurrency:m,originChainId:t.chain.id})}];return u&&m&&(t.erc20Balance??0n)>0n&&B.push({...t,isErc20Quote:!0,isTestnet:!!a.testnet,input:V({appId:I,amount:h.toString(),user:n.address,recipient:p,destinationChainId:a.id,destinationCurrency:m,originChainId:t.chain.id,originCurrency:t.erc20Address})}),B})),ie=(await Promise.allSettled(C.map((async t=>({...t,quote:await pe(t)}))))).filter((t=>t.status==="fulfilled")).map((t=>t.value));if(ie.length<1)return void v(new S(`Wallet ${$(n.address)} does not have enough funds.`,void 0,w.INSUFFICIENT_BALANCE));let G=ie.map((t=>({bridgeTx:ot(t.quote),allTxSteps:he(t.quote),balance:t.balance,chain:t.chain,erc20Balance:t.erc20Balance,isErc20Quote:t.isErc20Quote}))).filter((t=>!!t.bridgeTx));if(G.length>1)return void Ee(G);let j=G[0];if(!j)return void v(new S(`Wallet ${$(n.address)} does not have enough funds.`,void 0,w.INSUFFICIENT_BALANCE));let[k,...De]=j.allTxSteps??[j.bridgeTx];k?(N(!0),U(De.map((t=>({...t,chain:j.chain})))),A({data:k.data,to:k.to,value:k.value,chain:j.chain})):v(new S(`Wallet ${$(n.address)} does not have enough funds.`,void 0,w.INSUFFICIENT_BALANCE))})().catch(console.error)}),[O]),dt({transactionHash:xe,isTestnet:!!a.testnet,bridgingStatus:Fe,setBridgingStatus:ae,onSuccess({transactionHash:e}){N(!1),te(!0),H(oe(l,"completed",e,n?.walletClientType,u,o,a)),Z({eventName:me,payload:{provider:"external",status:"success",txHash:e,address:n?.address,chainId:s.chain.id,chainType:"ethereum",value:s.value?q(BigInt(s.value),o?.decimals??18):void 0,token:o?.symbol??m??"ETH",destinationAddress:p,destinationChainId:a.id,destinationChainType:"ethereum",destinationValue:h?q(h,o?.decimals??18):void 0,destinationToken:o?.symbol??m??a.nativeCurrency.name}})},onFailure({error:e}){N(!1),v(e)}}),r.useEffect((()=>{M&&(H({funding:l?.funding,solanaFundingData:l?.solanaFundingData,sendTransaction:l?.sendTransaction,errorModalData:{error:M,previousScreen:"TransferFromWalletScreen"}}),ye("ErrorScreen",!1))}),[M]);let ke=!u&&x?it(b??"0",x):void 0,W=u?T:st([T,h]),qe=W&&x?ue(W,x):void 0,He=W?Q(W,l?.funding?.erc20Address?l?.funding?.erc20ContractInfo?.symbol||"ETH":l?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,Me=T&&x?ue(T,x):void 0,Le=T?Q(T,a?.nativeCurrency?.symbol||"ETH"):void 0;if(r.useEffect((()=>{if(!R)return;let e=setTimeout(ve,Oe);return()=>clearTimeout(e)}),[R]),R)return c.jsxs(c.Fragment,{children:[c.jsx(ce,{}),c.jsx(Je,{}),c.jsxs(ze,{children:[c.jsx(Ye,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),c.jsx(et,{title:"Success!",description:`You’ve successfully added ${b} ${u?o.symbol:a.nativeCurrency.symbol} to your ${K.name} wallet. It may take a minute before the funds are available to use.`})]}),c.jsx(Xe,{}),c.jsx(de,{})]});let _e=u?`${rt({amount:Ue,decimals:o.decimals})} ${o.symbol}`:Q(Be,a.nativeCurrency.symbol,3,!0),g=E[J];return E.length>1&&g?c.jsx(lt,{displayName:re,configuredFundingChain:a,formattedBalance:_e,fundingAmount:b,fundingCurrency:u?o.symbol:a.nativeCurrency.symbol,fundingAmountInUsd:ke,options:E,selectedOption:g,isPreparing:X,isSubmitting:ee,addressToFund:p,fundingWalletAddress:n?.address||"",errorMessage:we,onSubmit:()=>{if(l.funding?.amount===b){let[e,...d]=g.allTxSteps??[g.bridgeTx];return e?(N(!0),U(d.map((f=>({...f,chain:g.chain})))),void A({to:e.to,data:e.data,value:e.value,chain:g.chain})):void 0}(async function(){if(n&&g)try{let e=await pe({isTestnet:!!a.testnet,input:V({appId:I,amount:h.toString(),user:n.address,recipient:p,destinationChainId:a.id,destinationCurrency:m,originChainId:g.chain.id})}),[d,...f]=he(e);if(!d)throw Error("Invalid transaction request");N(!0),U(f.map((i=>({...i,chain:g.chain})))),A({data:d.data,to:d.to,value:d.value,chain:g.chain})}catch(e){console.error(e),v(new S("Unable to fetch quotes for bridging",e,w.INSUFFICIENT_BALANCE))}})().catch(console.error)},onSelect:e=>{e!==J&&(L(null),be(e))},onAmountChange:Ne}):Ie&&T&&n&&l?.funding?c.jsx(mt,{walletClientType:n?.walletClientType||"unknown",displayName:re,addressToFund:p,isBridging:_,isErc20Flow:u,totalPriceInUsd:qe,totalPriceInNativeCurrency:He,gasPriceInUsd:Me,gasPriceInNativeCurrency:Le,chainId:a.id,chainName:a.name}):c.jsxs(c.Fragment,{children:[c.jsx(ce,{}),c.jsx(tt,{}),c.jsx("div",{style:{marginTop:"1rem"}}),c.jsx(de,{})]})}};export{Ia as AwaitingExternalEthereumTransferScreen,Ia as default};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import{u as B,W as $,l as q,B as V,ah as F,j as r,ai as h,i as x,aj as K,ak as z,g as b}from"./index-BMfMy017.js";import{r as i}from"./index-BOd8jv8-.js";import{F as X}from"./EnvelopeIcon-DY6ERnW7.js";import{F as Y}from"./PhoneIcon-CzbssTb8.js";import{o as H}from"./Layouts-BMRfo5hw-D2u1-w8g.js";import{i as Q}from"./Link-BdDilT2T-BYiP1zvW.js";import{a as Z}from"./shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js";import{n as G}from"./ScreenLayout-OwaQQcxH-B4Z8FjFp.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import"./Screen-D30meWsY-DDum2qlY.js";import"./index-CWARkn2w-D6ikWJWj.js";function J({title:o,titleId:d,...w},u){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:u,"aria-labelledby":d},w),o?i.createElement("title",{id:d},o):null,i.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const ee=i.forwardRef(J),re=({contactMethod:o,authFlow:d,emailDomain:w,appName:u="Privy",whatsAppEnabled:R=!1,onBack:g,onCodeSubmit:k,onResend:j,errorMessage:p,success:f=!1,resendCountdown:I=0,onInvalidInput:M,onClearError:T})=>{let[c,S]=i.useState(P);i.useEffect((()=>{p||S(P)}),[p]);let y=async v=>{v.preventDefault();let t=v.currentTarget.value.replace(" ","");if(t==="")return;if(isNaN(Number(t)))return void M?.("Code should be numeric");T?.();let m=Number(v.currentTarget.name?.charAt(5)),n=[...t||[""]].slice(0,U-m),s=[...c.slice(0,m),...n,...c.slice(m+n.length)];S(s);let E=Math.min(Math.max(m+n.length,0),U-1);isNaN(Number(v.currentTarget.value))||document.querySelector(`input[name=code-${E}]`)?.focus(),s.every((l=>l&&!isNaN(+l)))&&(document.querySelector(`input[name=code-${E}]`)?.blur(),await k?.(s.join("")))};return r.jsx(G,{title:"Enter confirmation code",subtitle:r.jsxs("span",d==="email"?{children:["Please check ",r.jsx(W,{children:o})," for an email from"," ",w??"privy.io"," and enter your code below."]}:{children:["Please check ",r.jsx(W,{children:o})," for a",R?" WhatsApp":""," message from ",u," and enter your code below."]}),icon:d==="email"?X:Y,onBack:g,showBack:!0,helpText:r.jsxs(se,{children:[r.jsxs("span",{children:["Didn't get ",d==="email"?"an email":"a message","?"]}),I?r.jsxs(le,{children:[r.jsx(ee,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),r.jsx("span",{children:"Code sent"})]}):r.jsx(Q,{as:"button",size:"sm",onClick:j,children:"Resend code"})]}),children:r.jsx(ae,{children:r.jsx(H,{children:r.jsxs(ie,{children:[r.jsx("div",{children:c.map(((v,t)=>r.jsx("input",{name:`code-${t}`,type:"text",value:c[t],onChange:y,onKeyUp:m=>{m.key==="Backspace"&&(n=>{T?.(),S([...c.slice(0,n),"",...c.slice(n+1)]),n>0&&document.querySelector(`input[name=code-${n-1}]`)?.focus()})(t)},inputMode:"numeric",autoFocus:t===0,pattern:"[0-9]",className:`${f?"success":""} ${p?"fail":""}`,autoComplete:z.isMobile?"one-time-code":"off"},t)))}),r.jsx(ne,{$fail:!!p,$success:f,children:r.jsx("span",{children:p==="Invalid or expired verification code"?"Incorrect code":p||(f?"Success!":"")})})]})})})})};let U=6,P=Array(6).fill("");var C,A,oe=((C=oe||{})[C.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",C[C.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",C),te=((A=te||{})[A.EMAIL=0]="EMAIL",A[A.SMS=1]="SMS",A);const ke={component:()=>{let{navigate:o,lastScreen:d,navigateBack:w,setModalData:u,onUserCloseViaDialogOrKeybindRef:R}=B(),g=$(),{closePrivyModal:k,resendEmailCode:j,resendSmsCode:p,getAuthMeta:f,loginWithCode:I,updateWallets:M,createAnalyticsEvent:T}=q(),{authenticated:c,logout:S,user:y}=V(),{whatsAppEnabled:v}=$(),[t,m]=i.useState(!1),[n,s]=i.useState(null),[E,l]=i.useState(null),[N,D]=i.useState(0);R.current=()=>null;let _=f()?.email?0:1,L=_===0?f()?.email||"":f()?.phoneNumber||"",O=F-500;return i.useEffect((()=>{if(N){let a=setTimeout((()=>{D(N-1)}),1e3);return()=>clearTimeout(a)}}),[N]),i.useEffect((()=>{if(c&&t&&y){if(g?.legal.requireUsersAcceptTerms&&!y.hasAcceptedTerms){let a=setTimeout((()=>{o("AffirmativeConsentScreen")}),O);return()=>clearTimeout(a)}if(Z(y,g.embeddedWallets)){let a=setTimeout((()=>{u({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),S()},callAuthOnSuccessOnClose:!0}}),o("EmbeddedWalletOnAccountCreateScreen")}),O);return()=>clearTimeout(a)}{M();let a=setTimeout((()=>k({shouldCallAuthOnSuccess:!0,isSuccess:!0})),F);return()=>clearTimeout(a)}}}),[c,t,y]),i.useEffect((()=>{if(n&&E===0){let a=setTimeout((()=>{s(null),l(null),document.querySelector("input[name=code-0]")?.focus()}),1400);return()=>clearTimeout(a)}}),[n,E]),r.jsx(re,{contactMethod:L,authFlow:_===0?"email":"sms",emailDomain:g?.appearance.emailDomain,appName:g?.name,whatsAppEnabled:v,onBack:()=>w(),onCodeSubmit:async a=>{try{await I(a),m(!0)}catch(e){if(e instanceof h&&e.privyErrorCode===x.INVALID_CREDENTIALS)s("Invalid or expired verification code"),l(0);else if(e instanceof h&&e.privyErrorCode===x.CANNOT_LINK_MORE_OF_TYPE)s(e.message);else{if(e instanceof h&&e.privyErrorCode===x.USER_LIMIT_REACHED)return console.error(new K(e).toString()),void o("UserLimitReachedScreen");if(e instanceof h&&e.privyErrorCode===x.USER_DOES_NOT_EXIST)return void o("AccountNotFoundScreen");if(e instanceof h&&e.privyErrorCode===x.LINKED_TO_ANOTHER_USER)return u({errorModalData:{error:e,previousScreen:d??"AwaitingPasswordlessCodeScreen"}}),void o("ErrorScreen",!1);if(e instanceof h&&e.privyErrorCode===x.DISALLOWED_PLUS_EMAIL)return u({inlineError:{error:e}}),void o("ConnectOrCreateScreen",!1);if(e instanceof h&&e.privyErrorCode===x.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return u({accountTransfer:{nonce:e.data?.data?.nonce,account:L,displayName:e.data?.data?.account?.displayName,linkMethod:_===0?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void o("LinkConflictScreen");s("Issue verifying code"),l(0)}}},onResend:async()=>{D(30),_===0?await j():await p()},errorMessage:n||void 0,success:t,resendCountdown:N,onInvalidInput:a=>{s(a),l(1)},onClearError:()=>{E===1&&(s(null),l(null))}})}};let ae=b.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
margin: auto;
|
|
7
|
-
gap: 16px;
|
|
8
|
-
flex-grow: 1;
|
|
9
|
-
width: 100%;
|
|
10
|
-
`,ie=b.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
width: 100%;
|
|
14
|
-
gap: 12px;
|
|
15
|
-
|
|
16
|
-
> div:first-child {
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
gap: 0.5rem;
|
|
20
|
-
width: 100%;
|
|
21
|
-
border-radius: var(--privy-border-radius-sm);
|
|
22
|
-
|
|
23
|
-
> input {
|
|
24
|
-
border: 1px solid var(--privy-color-foreground-4);
|
|
25
|
-
background: var(--privy-color-background);
|
|
26
|
-
border-radius: var(--privy-border-radius-sm);
|
|
27
|
-
padding: 8px 10px;
|
|
28
|
-
height: 48px;
|
|
29
|
-
width: 40px;
|
|
30
|
-
text-align: center;
|
|
31
|
-
font-size: 18px;
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
color: var(--privy-color-foreground);
|
|
34
|
-
transition: all 0.2s ease;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
> input:focus {
|
|
38
|
-
border: 1px solid var(--privy-color-foreground);
|
|
39
|
-
box-shadow: 0 0 0 1px var(--privy-color-foreground);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
> input:invalid {
|
|
43
|
-
border: 1px solid var(--privy-color-error);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
> input.success {
|
|
47
|
-
border: 1px solid var(--privy-color-border-success);
|
|
48
|
-
background: var(--privy-color-success-bg);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
> input.fail {
|
|
52
|
-
border: 1px solid var(--privy-color-border-error);
|
|
53
|
-
background: var(--privy-color-error-bg);
|
|
54
|
-
animation: shake 180ms;
|
|
55
|
-
animation-iteration-count: 2;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@keyframes shake {
|
|
60
|
-
0% {
|
|
61
|
-
transform: translate(1px, 0);
|
|
62
|
-
}
|
|
63
|
-
33% {
|
|
64
|
-
transform: translate(-1px, 0);
|
|
65
|
-
}
|
|
66
|
-
67% {
|
|
67
|
-
transform: translate(-1px, 0);
|
|
68
|
-
}
|
|
69
|
-
100% {
|
|
70
|
-
transform: translate(1px, 0);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`,ne=b.div`
|
|
74
|
-
line-height: 20px;
|
|
75
|
-
min-height: 20px;
|
|
76
|
-
font-size: 14px;
|
|
77
|
-
font-weight: 400;
|
|
78
|
-
color: ${o=>o.$success?"var(--privy-color-success-dark)":o.$fail?"var(--privy-color-error-dark)":"transparent"};
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
width: 100%;
|
|
82
|
-
text-align: center;
|
|
83
|
-
`,se=b.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
width: 100%;
|
|
89
|
-
color: var(--privy-color-foreground-2);
|
|
90
|
-
`,le=b.div`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
border-radius: var(--privy-border-radius-sm);
|
|
95
|
-
padding: 2px 8px;
|
|
96
|
-
gap: 4px;
|
|
97
|
-
background: var(--privy-color-background-2);
|
|
98
|
-
color: var(--privy-color-foreground-2);
|
|
99
|
-
`,W=b.span`
|
|
100
|
-
font-weight: 500;
|
|
101
|
-
word-break: break-all;
|
|
102
|
-
color: var(--privy-color-foreground);
|
|
103
|
-
`;export{ke as AwaitingPasswordlessCodeScreen,re as AwaitingPasswordlessCodeScreenView,ke as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as N,l as G,u as J,b as o,al as K,am as U,an as b,p as X,ao as j,ap as C,i as m,V as Z,j as e}from"./index-BMfMy017.js";import{F as ee}from"./CheckCircleIcon-DBiWFjO6.js";import{r}from"./index-BOd8jv8-.js";import{c as te,n as ne,s as ae}from"./Layouts-BMRfo5hw-D2u1-w8g.js";import{h as R}from"./ModalFooter-BCuEK_nz-D2I8KWtk.js";import{o as re}from"./ScreenHeader-CHmc4-Lu-BqrAEXbV.js";import{t as W}from"./FundWalletMethodHeader-BWNkokCT-CZszQsZf.js";import{n as oe}from"./index-CWARkn2w-D6ikWJWj.js";import{t as se}from"./analytics-mkkvFRju-DOXuftJB.js";import{l as ie,o as de,h as le,n as ce,s as ue,r as me}from"./reservoir-x-nGuZkT-DFxAFt2v.js";import{I as pe}from"./TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js";import{p as fe}from"./parseEther-C7aOvuze.js";import"./preload-helper-PPVm8Dsz.js";import"./index-9jNeS_nC.js";import"./serializeTransaction-L-_Ej-jW.js";import"./http-BocEfKYb.js";import"./hashTypedData-Beq57Ogb.js";import"./getTransactionCount-80UHlwAV.js";import"./transactionReceipt-BwJl-gjg.js";import"./toAccount-Bq6rbpbI.js";import"./parseSignature-BIjcuWdB.js";import"./index-D6T-s6sR.js";import"./InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js";import"./WalletIcon-B1i03Vqc.js";import"./Value-DTgR824E-DZpvBCWi.js";import"./LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js";import"./Address-H8kD1d9O-CGQnt7Pu.js";import"./check-C_DTyjLS.js";import"./createLucideIcon-D9OK_uxG.js";import"./copy-sK00DOfH.js";import"./GlobeAltIcon-SEUEIe_E.js";const Qe={component:function(){let D=N(),{closePrivyModal:B,createAnalyticsEvent:P,connectors:I}=G(),{navigate:k,setModalData:L,data:s}=J(),x=N(),y=r.useRef(!1),[$,h]=r.useState(!1),[w,M]=r.useState(!1),[v,d]=r.useState(null),[_,q]=r.useState(),[H,E]=r.useState();if(!s?.funding||s.funding.chainType!=="ethereum")throw Error("Invalid funding data");let{amount:p,connectedWallet:f,chain:l,solanaChain:O,isUSDC:g}=s.funding,S=s.funding.address,V=s.funding.erc20Address,F=s.funding.isUSDC?"USDC":l.nativeCurrency.symbol,n=r.useMemo((()=>f?.type==="solana"?f.provider:(function({connectors:t,connectedWalletAddress:i}){let c=t.find((a=>a.chainType==="solana"&&a.wallets.some((T=>T.address===i)))),u=c?.wallet.accounts.find((a=>a.address===i));if(!c||!u)throw new o("Unable to find source wallet connector");return new K({wallet:c.wallet,account:u})})({connectors:I,connectedWalletAddress:f?.address||""})),[f,I]),A=r.useMemo((()=>{let t=U(b);if(!t)throw new o("Unable to load solana plugin");let i=D.solanaRpcs["solana:mainnet"];if(!i)throw new o("Unable to load mainnet RPC");return t.getSolanaRpcClient({rpc:i.rpc,rpcSubscriptions:i.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:i.blockExplorerUrl??"https://explorer.solana.com"})}),[]),Q=X(j(n?.standardWallet.name||"unknown")),Y=Q?.name||"wallet";return r.useEffect((()=>{(async function(){if(!n||!l||y.current)return;let t=U(b);if(!t)return void d(new o("Unable to solana plugin"));y.current=!0,l?.testnet&&console.warn("Solana testnets are not supported for bridging");let i=g?1e6*parseFloat(p):fe(p),c=await ie({isTestnet:!!l.testnet,input:de({appId:x.id,amount:i.toString(),user:n.address,recipient:S,destinationChainId:l.id,originChainId:me,originCurrency:g?ce:ue,destinationCurrency:g?V:void 0})}).catch(console.error);if(!c)return void d(new o(`Unable to fetch quotes for bridging. Wallet ${C(n.address)} does not have enough funds.`,void 0,m.INSUFFICIENT_BALANCE));let u=await t.createTransactionFromRelayQuote({quote:c,source:n.address,solanaClient:A});if(u)try{h(!0);let a=await t.simulateTransaction({solanaClient:A,tx:u});if(a.hasError)return a.hasFunds?(console.error("Transaction failed:",a.error),void d(new o("Something went wrong",void 0,m.TRANSACTION_FAILURE))):void d(new o(`Wallet ${C(n?.address)} does not have enough funds. ${c.details.currencyIn.amountFormatted} ${F} are needed to complete the transaction.`,void 0,m.INSUFFICIENT_BALANCE));let{signature:T}=await n.signAndSendTransaction({chain:"solana:mainnet",transaction:u}),z=t.getAddressFromBuffer(T);q(z),E("pending")}catch(a){if(console.error(a),/user rejected the request/gi.test(a.message||""))return void d(new o("Transaction was rejected by the user",void 0,m.TRANSACTION_FAILURE));d(new o("Something went wrong",void 0,m.TRANSACTION_FAILURE))}else d(new o(`Unable to select bridge option from quotes. Wallet ${C(n.address)} does not have enough funds.`,void 0,m.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),le({transactionHash:_,isTestnet:!1,bridgingStatus:H,setBridgingStatus:E,onSuccess({transactionHash:t}){h(!1),M(!0),P({eventName:se,payload:{provider:"external",status:"success",txHash:t,address:n.address,chainType:"solana",clusterName:O,token:"SOL",destinationAddress:S,destinationChainId:l.id,destinationChainType:"ethereum",destinationValue:p,destinationToken:g?"USDC":"ETH"}})},onFailure({error:t}){h(!1),d(t)}}),r.useEffect((()=>{if(!w)return;let t=setTimeout(B,Z);return()=>clearTimeout(t)}),[w]),r.useEffect((()=>{v&&(L({funding:s?.funding,solanaFundingData:s?.solanaFundingData,sendTransaction:s?.sendTransaction,errorModalData:{error:v,previousScreen:"TransferFromWalletScreen"}}),k("ErrorScreen",!1))}),[v]),w?e.jsxs(e.Fragment,{children:[e.jsx(W,{}),e.jsx(te,{}),e.jsxs(ne,{children:[e.jsx(ee,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),e.jsx(re,{title:"Success!",description:`You’ve successfully added ${p} ${F} to your ${x.name} wallet. It may take a minute before the funds are available to use.`})]}),e.jsx(ae,{}),e.jsx(R,{})]}):$&&n?e.jsx(pe,{walletClientType:j(n?.standardWallet.name||"unknown"),displayName:Y,addressToFund:S,isBridging:$,isErc20Flow:!1,chainId:l.id,chainName:l.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):e.jsxs(e.Fragment,{children:[e.jsx(W,{}),e.jsx(oe,{}),e.jsx("div",{style:{marginTop:"1rem"}}),e.jsx(R,{})]})}};export{Qe as AwaitingSolToEvmBridgingScreen,Qe as default};
|