@fangorn-network/westmarch 0.0.19-dev → 2026.10.20-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.
Files changed (590) hide show
  1. package/README.md +29 -1
  2. package/docs/app-to-agent.md +81 -26
  3. package/package.json +9 -5
  4. package/plugin/scripts/fx.mjs +7 -9
  5. package/site/dist/assets/AccountNotFoundScreen-C4njXc69-RUyAWRzV.js +1 -0
  6. package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-ZV-LlYBe.js +31 -0
  7. package/site/dist/assets/Address-H8kD1d9O-CGQnt7Pu.js +17 -0
  8. package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-CKn2JLwq.js +6 -0
  9. package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-9oIP9fma.js +1 -0
  10. package/site/dist/assets/ArrowsRightLeftIcon-BEhBD_6N.js +1 -0
  11. package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-D1wLlSJs.js +1 -0
  12. package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-CSBbHTyz.js +1 -0
  13. package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-BsRq-xBt.js +1 -0
  14. package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-BPdhsKvN.js +103 -0
  15. package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-CEGNdrkr.js +1 -0
  16. package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-Da9P7eSx.js +68 -0
  17. package/site/dist/assets/CaptchaScreen-DbpvkIGx-BecgMnD_.js +1 -0
  18. package/site/dist/assets/CheckCircleIcon-DBiWFjO6.js +1 -0
  19. package/site/dist/assets/CheckCircleIcon-DzG2ROJZ.js +1 -0
  20. package/site/dist/assets/Checkbox-D1EDeo41-DMHcj9o_.js +52 -0
  21. package/site/dist/assets/ChevronDownIcon-2Os56gUt.js +1 -0
  22. package/site/dist/assets/Chip-CZKIKt9K-BWzs9fj5.js +26 -0
  23. package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-CFvcSiDs.js +16 -0
  24. package/site/dist/assets/ConnectEmailForm-B-VRE0MN-BozkCg8q.js +3 -0
  25. package/site/dist/assets/ConnectLedgerScreen-DWHABGot-DaCnbBzh.js +10 -0
  26. package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-DUkCLkxD.js +1 -0
  27. package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-Dv_5nMkZ.js +1 -0
  28. package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-DSGEeB3Y.js +1 -0
  29. package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-C-s4s_Lq.js +95 -0
  30. package/site/dist/assets/ConnectWalletView-DqI-PTvX-BKX7fdYr.js +74 -0
  31. package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-DSoAuMFZ.js +7 -0
  32. package/site/dist/assets/CopyToClipboard-i_OQSBJr-CZTXyfV0.js +39 -0
  33. package/site/dist/assets/CopyableText-CQapvaMr-DHO818I0.js +28 -0
  34. package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-DW4nRGfz.js +1 -0
  35. package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-DH8Nnb4Y.js +22 -0
  36. package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-gfUS_uV5.js +1 -0
  37. package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-DZj9HTHc.js +1 -0
  38. package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-eHYsDK9W.js +187 -0
  39. package/site/dist/assets/DepositAddressScreen-DBLRs7aI-DK_XVgVk.js +8 -0
  40. package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-6gRZzhLe.js +1 -0
  41. package/site/dist/assets/{EmailInputForm-Cqo1mda8-B2NG3K5V.js → EmailInputForm-Cqo1mda8-CZD4r5LM.js} +11 -11
  42. package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-BZu2ae0k.js +1 -0
  43. package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-86pviemJ.js +1 -0
  44. package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-vDcvT53Y.js +23 -0
  45. package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-rNJAtSJc.js +1 -0
  46. package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-I8Q95280.js +1 -0
  47. package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-Coi7OxoI.js +1 -0
  48. package/site/dist/assets/EnrollTotp-Dibew4dp-DC7FrDgo.js +66 -0
  49. package/site/dist/assets/EnvelopeIcon-DY6ERnW7.js +1 -0
  50. package/site/dist/assets/ErrorBanner-BcpGRt0h-BvESwN99.js +21 -0
  51. package/site/dist/assets/{ErrorMessage-D8VaAP5m-CrZOnUyg.js → ErrorMessage-D8VaAP5m-oSruKN8L.js} +2 -2
  52. package/site/dist/assets/ErrorScreen-DipdTWzE-DnKGxH1Z.js +4 -0
  53. package/site/dist/assets/ExclamationCircleIcon-BZhlqH0r.js +1 -0
  54. package/site/dist/assets/ExclamationTriangleIcon-CkAOJIYV.js +1 -0
  55. package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-4pi7jooW.js +75 -0
  56. package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-z2XCMaLL.js +28 -0
  57. package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-CBVA9v1-.js +491 -0
  58. package/site/dist/assets/FingerPrintIcon-ra2dqmJO.js +1 -0
  59. package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-DwAwc6Ny.js +1 -0
  60. package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-CZszQsZf.js +1 -0
  61. package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-DfX6nvFQ.js +58 -0
  62. package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-CDS_sk_t.js +1 -0
  63. package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-CPfNQemT.js +1 -0
  64. package/site/dist/assets/GlobeAltIcon-SEUEIe_E.js +1 -0
  65. package/site/dist/assets/GooglePay-B53WnudL-aap7zwag.js +1 -0
  66. package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-DgSjCjQI.js +4 -0
  67. package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-DO4wICml.js +1 -0
  68. package/site/dist/assets/InfoBanner-Cb3p1z12-CDWt2ADo.js +22 -0
  69. package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-Ba19XoBr.js +1 -0
  70. package/site/dist/assets/InstallWalletScreen-DTA8dwLv-DGpewEch.js +1 -0
  71. package/site/dist/assets/{JsonTree-BHzNC-ic-DcNcbSoM.js → JsonTree-BHzNC-ic-pAEq1bl9.js} +3 -3
  72. package/site/dist/assets/{LabelXs-oqZNqbm_-iafrj25N.js → LabelXs-oqZNqbm_-D09YjVR4.js} +2 -2
  73. package/site/dist/assets/LandingScreen-CGWUoSUG-CUOCWUXd.js +1 -0
  74. package/site/dist/assets/{Layouts-BMRfo5hw-CeCOyCLK.js → Layouts-BMRfo5hw-D2u1-w8g.js} +16 -16
  75. package/site/dist/assets/Link-BdDilT2T-BYiP1zvW.js +40 -0
  76. package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-Tb6cAepT.js +77 -0
  77. package/site/dist/assets/LinkEmailScreen-dKo9frwc-pq0NF2JO.js +1 -0
  78. package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-D9MOmDqg.js +117 -0
  79. package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-B80UJqAZ.js +1 -0
  80. package/site/dist/assets/{LoadingSkeleton-BMsgO5PV-CiEyS5PZ.js → LoadingSkeleton-BMsgO5PV-BRMh4Fv4.js} +6 -6
  81. package/site/dist/assets/LockClosedIcon-BqkoEL9J.js +1 -0
  82. package/site/dist/assets/LoginFailedScreen-CN0dJV6U-DlnOM-Kh.js +1 -0
  83. package/site/dist/assets/ManualTransferScreen-CHqcuqbs-DSShupq9.js +1 -0
  84. package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-DUPV_SLA.js +1 -0
  85. package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-D96GpzXX.js +1 -0
  86. package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-CYQDa4ND.js +1 -0
  87. package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-CJtSAXGN.js +1 -0
  88. package/site/dist/assets/ModalFooter-BCuEK_nz-D2I8KWtk.js +403 -0
  89. package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-Bx5aHy-z.js +16 -0
  90. package/site/dist/assets/OAuthStatusScreen-ufbOa-da-CS6988X2.js +1 -0
  91. package/site/dist/assets/OpenLink-CUpJ1mOr-EZWVSX2r.js +39 -0
  92. package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-BY4eK5Jh.js +1 -0
  93. package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-LXys76u9.js +6 -0
  94. package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-RczvLvmo.js +20 -0
  95. package/site/dist/assets/{PhArrowCircleDown-D97G-BOA.js → PhArrowCircleDown-BtlNV0TZ.js} +5 -5
  96. package/site/dist/assets/PhArrowClockwise-mOiWYLMV.js +14 -0
  97. package/site/dist/assets/PhArrowDown-CkoOD89h.js +14 -0
  98. package/site/dist/assets/PhArrowLeft-C0jlxVhM.js +14 -0
  99. package/site/dist/assets/PhArrowRight-BI-V03Xf.js +14 -0
  100. package/site/dist/assets/{PhArrowSquareOut-Bk2CMG3I.js → PhArrowSquareOut-DnQ7n_B4.js} +5 -5
  101. package/site/dist/assets/PhArrowUp-izKvURUW.js +14 -0
  102. package/site/dist/assets/PhArrowUpRight-Bn-JhHsY.js +14 -0
  103. package/site/dist/assets/{PhArrowsClockwise-BXRn1GEl.js → PhArrowsClockwise-Brtx2Re-.js} +5 -5
  104. package/site/dist/assets/{PhArrowsDownUp-DM09Jo_3.js → PhArrowsDownUp-PZosTqZG.js} +5 -5
  105. package/site/dist/assets/PhArrowsLeftRight-CYsRQ2qh.js +14 -0
  106. package/site/dist/assets/{PhBank-fHbgCqqZ.js → PhBank-hhPAIPVb.js} +5 -5
  107. package/site/dist/assets/PhBrowser-BjzAmrHO.js +14 -0
  108. package/site/dist/assets/PhCaretDown-ddSjwcwm.js +14 -0
  109. package/site/dist/assets/PhCaretLeft-B7YLoNEF.js +14 -0
  110. package/site/dist/assets/PhCaretRight-BY8D5MIg.js +14 -0
  111. package/site/dist/assets/PhCaretUp-BG10nSut.js +14 -0
  112. package/site/dist/assets/PhCheck-DrKd7pBC.js +14 -0
  113. package/site/dist/assets/{PhCircleHalf-MJZeRBGF.js → PhCircleHalf-Bk9C4DvT.js} +5 -5
  114. package/site/dist/assets/PhClock-Sj17weCB.js +14 -0
  115. package/site/dist/assets/{PhCompass-hYn3HhGN.js → PhCompass-Df1ugFO-.js} +5 -5
  116. package/site/dist/assets/PhCopy-rgttky8E.js +14 -0
  117. package/site/dist/assets/{PhCreditCard-Fy4pzwtt.js → PhCreditCard-CZpdid2n.js} +5 -5
  118. package/site/dist/assets/{PhCurrencyDollar-BgiaenCi.js → PhCurrencyDollar-B6IKKjue.js} +5 -5
  119. package/site/dist/assets/{PhDesktop-CxrzCSv5.js → PhDesktop-BuCDXYJj.js} +5 -5
  120. package/site/dist/assets/PhDeviceMobile-CnybhXY-.js +14 -0
  121. package/site/dist/assets/PhDotsThree-CSAEcba1.js +14 -0
  122. package/site/dist/assets/PhEnvelope-SmaNeXoQ.js +14 -0
  123. package/site/dist/assets/PhFunnelSimple-DKx35ITq.js +14 -0
  124. package/site/dist/assets/{PhGlobe-DvmSc9_A.js → PhGlobe-q1mqj65V.js} +5 -5
  125. package/site/dist/assets/{PhIdentificationCard-CfkZm-5K.js → PhIdentificationCard-BeLXJpfZ.js} +5 -5
  126. package/site/dist/assets/{PhImage-Cf0J2ZfJ.js → PhImage-BYrKfN9k.js} +5 -5
  127. package/site/dist/assets/{PhInfo-Bwi51-2X.js → PhInfo-X33f06Ej.js} +5 -5
  128. package/site/dist/assets/{PhLightbulb-C4FZV7Es.js → PhLightbulb-DMZJsowR.js} +5 -5
  129. package/site/dist/assets/PhMagnifyingGlass-B6D0sWFL.js +14 -0
  130. package/site/dist/assets/{PhPaperPlaneRight-zxQVvPLX.js → PhPaperPlaneRight-Dvo-nXr9.js} +5 -5
  131. package/site/dist/assets/PhPlus-CBvZvLax.js +14 -0
  132. package/site/dist/assets/{PhPower-CFyWDmgD.js → PhPower-D8-AcNM6.js} +5 -5
  133. package/site/dist/assets/{PhPuzzlePiece-BjoNVfST.js → PhPuzzlePiece-C-7mYqGO.js} +5 -5
  134. package/site/dist/assets/{PhQrCode-CP3tFauY.js → PhQrCode-uIXlI5ER.js} +5 -5
  135. package/site/dist/assets/{PhQuestion-wOWJBd3G.js → PhQuestion-rUoqC2sC.js} +5 -5
  136. package/site/dist/assets/{PhQuestionMark-CV0k9C0Y.js → PhQuestionMark-W55Txvvb.js} +5 -5
  137. package/site/dist/assets/{PhSealCheck-vIKzREuN.js → PhSealCheck-BeVLq9PH.js} +5 -5
  138. package/site/dist/assets/{PhSignOut-CxELV-i0.js → PhSignOut-Cq2PivQ6.js} +5 -5
  139. package/site/dist/assets/{PhSpinner-CGDmbzUd.js → PhSpinner-CZMtAFdX.js} +5 -5
  140. package/site/dist/assets/{PhTrash-C9PD0SAt.js → PhTrash-BamrmMsN.js} +5 -5
  141. package/site/dist/assets/{PhUser-0sWNXQeZ.js → PhUser-A2fxqIV0.js} +5 -5
  142. package/site/dist/assets/{PhVault-6JTskUcC.js → PhVault-B8m1usHw.js} +5 -5
  143. package/site/dist/assets/{PhWarning-CoKs3gz6.js → PhWarning-CpkID9oi.js} +5 -5
  144. package/site/dist/assets/PhWarningCircle-Cm58gXb9.js +14 -0
  145. package/site/dist/assets/PhX-C3b4cCEy.js +14 -0
  146. package/site/dist/assets/PhoneIcon-CzbssTb8.js +1 -0
  147. package/site/dist/assets/PinInput-DbZ0b1i1-1DtLWL81.js +247 -0
  148. package/site/dist/assets/QrCode-DbnZwlkH-ChwcUk_h.js +22 -0
  149. package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-C79jd345.js +1 -0
  150. package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-C9c0x-yq.js +1 -0
  151. package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-PNqHb6CI.js +7 -0
  152. package/site/dist/assets/{Screen-D30meWsY-CCeVNuWs.js → Screen-D30meWsY-DDum2qlY.js} +22 -22
  153. package/site/dist/assets/{ScreenHeader-CHmc4-Lu-DjyrH7IK.js → ScreenHeader-CHmc4-Lu-BqrAEXbV.js} +4 -4
  154. package/site/dist/assets/ScreenLayout-OwaQQcxH-B4Z8FjFp.js +1 -0
  155. package/site/dist/assets/{SelectSourceAsset-CWFog6gm-RKjBsB6m.js → SelectSourceAsset-CWFog6gm-8iXuqbAs.js} +18 -18
  156. package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-CUpQZ9wq.js +14 -0
  157. package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-ZzvPLj2s.js +15 -0
  158. package/site/dist/assets/ShieldCheckIcon-Bjwe_-PV.js +1 -0
  159. package/site/dist/assets/SignRequestScreen-BHKv32KR-0qGeNipB.js +26 -0
  160. package/site/dist/assets/{StackedContainer-B2vaEl56-eQCM2cmv.js → StackedContainer-B2vaEl56-C-ojzCoQ.js} +2 -2
  161. package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-C3lgJb68.js +20 -0
  162. package/site/dist/assets/{Subtitle-CV-2yKE4-zxWw2m1Q.js → Subtitle-CV-2yKE4-o-1FQLlX.js} +2 -2
  163. package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-l35_C2DG.js +1 -0
  164. package/site/dist/assets/{Title-BnzYV3Is-B_JpTatT.js → Title-BnzYV3Is-RX1f0RV-.js} +2 -2
  165. package/site/dist/assets/TodoList-DnyULl18-JxWWU9KA.js +36 -0
  166. package/site/dist/assets/TransactionDetails-e9nesl30-C91nJPM9.js +109 -0
  167. package/site/dist/assets/TransactionErrorView-BDBNqA_f-Cpm-4xzm.js +178 -0
  168. package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-BWCH7-Si.js +31 -0
  169. package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-BWMeJabk.js +6 -0
  170. package/site/dist/assets/TurnstileWrapper-B7sNddys-Dgr80Gih.js +1 -0
  171. package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-Clk4zk-8.js +1 -0
  172. package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-BgRsoR3B.js +1 -0
  173. package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-D-SU-vAz.js +1 -0
  174. package/site/dist/assets/{Value-DTgR824E-BRuIGiec.js → Value-DTgR824E-DZpvBCWi.js} +7 -7
  175. package/site/dist/assets/WalletCards-DH1rqayz-UuZ4i_Ze.js +1 -0
  176. package/site/dist/assets/WalletIcon-B1i03Vqc.js +1 -0
  177. package/site/dist/assets/WalletInfoCard-sq_2wgFg-TXTxmb8L.js +29 -0
  178. package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-CbrFb0ON.js +1 -0
  179. package/site/dist/assets/WalletLink-DK5LB5Ha-BYQZV7UV.js +20 -0
  180. package/site/dist/assets/WalletOverflowButton-bfCnp-9T-CNgSPnTS.js +1 -0
  181. package/site/dist/assets/WarningBanner-ZZqCEtZK-DNZUUOph.js +21 -0
  182. package/site/dist/assets/__vite-browser-external-BIHI7g3E.js +1 -0
  183. package/site/dist/assets/analytics-mkkvFRju-DOXuftJB.js +1 -0
  184. package/site/dist/assets/basic-C9wn6QoQ.js +1575 -0
  185. package/site/dist/assets/bytes-CjWw8TJh.js +1 -0
  186. package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-tV1Idewc.js +1 -0
  187. package/site/dist/assets/ccip-BhHEqVIW.js +1 -0
  188. package/site/dist/assets/check-C_DTyjLS.js +1 -0
  189. package/site/dist/assets/chevron-down-iklXXH-z.js +1 -0
  190. package/site/dist/assets/circle-alert-KEOUF48T.js +1 -0
  191. package/site/dist/assets/circle-check-big-BJ_ADwB4.js +1 -0
  192. package/site/dist/assets/circle-x-BSfWmhYk.js +1 -0
  193. package/site/dist/assets/client-BnDcP42J.js +9 -0
  194. package/site/dist/assets/client-DH86IrJA.js +125 -0
  195. package/site/dist/assets/coinbase-DCPC2L_R-2ivYfoMv.js +3 -0
  196. package/site/dist/assets/copy-sK00DOfH.js +1 -0
  197. package/site/dist/assets/core-CRE213RM.js +211 -0
  198. package/site/dist/assets/createLucideIcon-D9OK_uxG.js +1 -0
  199. package/site/dist/assets/custom-V1wex-Di.js +1 -0
  200. package/site/dist/assets/dijkstra-COg3n3zL.js +1 -0
  201. package/site/dist/assets/embed.worker-BRIYO7m8.js +1 -0
  202. package/site/dist/assets/encodePacked-DyXYq3Cc.js +1 -0
  203. package/site/dist/assets/ethers-zTjbodk5-DSYOi6tU.js +1 -0
  204. package/site/dist/assets/external-link-Cdp8NBio.js +1 -0
  205. package/site/dist/assets/fallback-DiFue5Zm.js +1 -0
  206. package/site/dist/assets/farcaster-DPlSjvF5-DP2DLoHZ.js +1 -0
  207. package/site/dist/assets/features-B6BTj_BL.js +5 -0
  208. package/site/dist/assets/fingerprint-pattern-gFJTz5e4.js +1 -0
  209. package/site/dist/assets/floating-ui.react-D9ndYqYK.js +1 -0
  210. package/site/dist/assets/floating-ui.react-dom-CNbOgOFt.js +1 -0
  211. package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-CkAr4Oc0.js +1 -0
  212. package/site/dist/assets/getChainName-DjpPdUSc-c2urPd0g.js +1 -0
  213. package/site/dist/assets/getErc20Balance-jXNpFf0N-mFQ9Iqk-.js +1 -0
  214. package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-Dx5he_uG.js +1 -0
  215. package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-C446pzMl.js +1 -0
  216. package/site/dist/assets/getTransactionCount-80UHlwAV.js +1 -0
  217. package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-FDalV59C.js +1 -0
  218. package/site/dist/assets/hashTypedData-Beq57Ogb.js +22 -0
  219. package/site/dist/assets/hooks.module-ClpaQ1Tg.js +1 -0
  220. package/site/dist/assets/hourglass-CB7z_I9H.js +1 -0
  221. package/site/dist/assets/http-BocEfKYb.js +19 -0
  222. package/site/dist/assets/index-0knDOgU9.js +1 -0
  223. package/site/dist/assets/index-9jNeS_nC.js +1 -0
  224. package/site/dist/assets/index-B--T-Fmt.js +16 -0
  225. package/site/dist/assets/index-BDkarAkX.js +2 -0
  226. package/site/dist/assets/index-BMfMy017.js +679 -0
  227. package/site/dist/assets/index-BOd8jv8-.js +1 -0
  228. package/site/dist/assets/index-BdEw5wyl-2VGMzHIs.js +1 -0
  229. package/site/dist/assets/index-C8ThRelw.js +9 -0
  230. package/site/dist/assets/{index-CWARkn2w-Cezl_uBr.js → index-CWARkn2w-D6ikWJWj.js} +7 -7
  231. package/site/dist/assets/{wui-ux-by-reown-fVu0QkI4.js → index-CztIxJB6.js} +296 -296
  232. package/site/dist/assets/index-D4LdLFDC.js +1 -0
  233. package/site/dist/assets/index-D6T-s6sR.js +1 -0
  234. package/site/dist/assets/index-D7396TWe.js +1 -0
  235. package/site/dist/assets/index-DdxtHe81.js +2 -0
  236. package/site/dist/assets/index-DvMddJcd-D7AEQrzj.js +12 -0
  237. package/site/dist/assets/index-nibyPLVP.js +1 -0
  238. package/site/dist/assets/index.browser-B6Bt5URJ.js +1 -0
  239. package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-D7xtzRqA.js +1 -0
  240. package/site/dist/assets/landmark-CMLKifhk.js +1 -0
  241. package/site/dist/assets/lock-BkyjNE8h.js +1 -0
  242. package/site/dist/assets/mail-B6-Tq9Ld.js +1 -0
  243. package/site/dist/assets/native-CJ5et6AR.js +1 -0
  244. package/site/dist/assets/nonceManager-zkW7cM66.js +1 -0
  245. package/site/dist/assets/parseEther-C7aOvuze.js +1 -0
  246. package/site/dist/assets/parseSignature-BIjcuWdB.js +1 -0
  247. package/site/dist/assets/preload-helper-PPVm8Dsz.js +1 -0
  248. package/site/dist/assets/privateKeyToAccount-CRvvpHWf.js +1 -0
  249. package/site/dist/assets/property-CnFDNXw5.js +3 -0
  250. package/site/dist/assets/react-auth_false-DedQs79w.js +1 -0
  251. package/site/dist/assets/reservoir-x-nGuZkT-DFxAFt2v.js +1 -0
  252. package/site/dist/assets/roles-DV_6FRBZ.js +1 -0
  253. package/site/dist/assets/safe-url-D7SRPu33-A8zMgOTd.js +1 -0
  254. package/site/dist/assets/serializeErc6492Signature-CeJeL3h6.js +1 -0
  255. package/site/dist/assets/serializeTransaction-L-_Ej-jW.js +8 -0
  256. package/site/dist/assets/{shared-DRZUmnL5-xqAUARWo.js → shared-DRZUmnL5-MWD-C-pp.js} +33 -33
  257. package/site/dist/assets/{shared-FM0rljBt--Avg6q2R.js → shared-FM0rljBt-c4eSjzGj.js} +6 -6
  258. package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-CF2QteTJ.js +1 -0
  259. package/site/dist/assets/simulateTransaction-CfuOrae4-BHUMPf6Q.js +1 -0
  260. package/site/dist/assets/smartphone-DAN5rY0T.js +1 -0
  261. package/site/dist/assets/stripe.esm-Dv8C3q95.js +2 -0
  262. package/site/dist/assets/styles-BsotlekN-Cjuu2SDV.js +9 -0
  263. package/site/dist/assets/{styles-Cm9H63WO-D90SsXOs.js → styles-Cm9H63WO-Cv1TbqYi.js} +17 -17
  264. package/site/dist/assets/{styles-DVyDvTdj-BTABn2K8.js → styles-DVyDvTdj-CI4xZNHp.js} +8 -8
  265. package/site/dist/assets/{styles-hslXy6xG-D-49b1rk.js → styles-hslXy6xG-DeVcFoDD.js} +23 -23
  266. package/site/dist/assets/telegram-B-JqnkqZ-DTjJLkIF.js +1 -0
  267. package/site/dist/assets/to-ui-error-DWe-qwS3-Dx3yzcV0.js +4 -0
  268. package/site/dist/assets/toAccount-Bq6rbpbI.js +1 -0
  269. package/site/dist/assets/transaction-BNTP-bFm-CrebgH-D.js +1 -0
  270. package/site/dist/assets/transactionReceipt-BwJl-gjg.js +1 -0
  271. package/site/dist/assets/transfer-6YztDh-t-DU6hH7CZ.js +1 -0
  272. package/site/dist/assets/transformers.web-BEKVh7pD.js +40 -0
  273. package/site/dist/assets/transformers.web-aWa49tv1.js +40 -0
  274. package/site/dist/assets/triangle-alert-ndoiBs4y.js +1 -0
  275. package/site/dist/assets/twitch-5IOe4sIQ-BXviIywg.js +1 -0
  276. package/site/dist/assets/useGetSolPrice-x7gfUIHJ-C7axYJ--.js +1 -0
  277. package/site/dist/assets/useGetTokenPrice-CaoUkb79-CR4CrguU.js +1 -0
  278. package/site/dist/assets/useI18n-C-5n_noF-C_t8QqBJ.js +1 -0
  279. package/site/dist/assets/useWalletBalance-CZnP5f_f-BnSHLVI_.js +1 -0
  280. package/site/dist/assets/w3m-modal-Bz5KWTQ-.js +1174 -0
  281. package/site/dist/assets/wallet-DTM31trz.js +2 -0
  282. package/site/dist/assets/wallet-UESEqPei.js +1 -0
  283. package/site/dist/assets/wallet-connect-BvJtUsDt-CnvUnFbz.js +1 -0
  284. package/site/dist/assets/walletconnect-v2-3frQFwbg-CzQk99gS.js +15 -0
  285. package/site/dist/assets/x-B2_XdOVQ.js +1 -0
  286. package/site/dist/index.html +120 -8
  287. package/site/feed.js +16 -1
  288. package/site/no-model.js +4 -0
  289. package/site/worker.js +597 -58
  290. package/src/agent/agent-card.js +20 -11
  291. package/src/agent/mcp.js +150 -316
  292. package/src/agent/view-tools.js +53 -12
  293. package/src/agent/x402.js +379 -44
  294. package/src/core/embed.js +51 -52
  295. package/src/core/embed.worker.js +1 -1
  296. package/src/core/shard.js +7 -3
  297. package/src/discover/apps.js +4 -3
  298. package/src/discover/explore.js +36 -22
  299. package/src/market/reactions.js +2 -2
  300. package/src/publish/devnet.js +95 -0
  301. package/src/publish/lint.js +2 -1
  302. package/src/publish/ship.js +517 -236
  303. package/src/publish/view-cli.js +11 -10
  304. package/src/publish/view.js +359 -206
  305. package/src/taste/taste-doc.js +3 -2
  306. package/src/taste/taste.js +2 -2
  307. package/src/taste/vault.js +3 -1
  308. package/site/dist/assets/AccountNotFoundScreen-C4njXc69-BOfmiSH1.js +0 -1
  309. package/site/dist/assets/AddFundsSelectionScreen-RAoCn7ej-B6uvYyqa.js +0 -31
  310. package/site/dist/assets/Address-H8kD1d9O-DcHv7A8C.js +0 -17
  311. package/site/dist/assets/AffirmativeConsentScreen-BG0MJxku-v2wz-N-s.js +0 -6
  312. package/site/dist/assets/AllowlistRejectionScreen-Cae6e1Od-DhVy9iGN.js +0 -1
  313. package/site/dist/assets/ApiController-BbhXeqTV.js +0 -5
  314. package/site/dist/assets/ArrowsRightLeftIcon-cp60yobq.js +0 -1
  315. package/site/dist/assets/AuthenticateWithWalletScreen-CU6hIcFT-B0eT1zE6.js +0 -1
  316. package/site/dist/assets/AwaitingEvmToSolBridgingScreen-D0e_sZMS-DL5PH-v_.js +0 -1
  317. package/site/dist/assets/AwaitingExternalEthereumTransferScreen-ur5HL4R7-n1BsRPqc.js +0 -1
  318. package/site/dist/assets/AwaitingPasswordlessCodeScreen-DRHz76mM-BVl2BJDY.js +0 -103
  319. package/site/dist/assets/AwaitingSolToEvmBridgingScreen-CdLRrGD2-BD-OZUQb.js +0 -1
  320. package/site/dist/assets/BridgeNetworkSelectionView-CFGjB2nO-CaYrzRje.js +0 -68
  321. package/site/dist/assets/CaptchaScreen-DbpvkIGx-BQJ7inx1.js +0 -1
  322. package/site/dist/assets/CheckCircleIcon-BM409mGI.js +0 -1
  323. package/site/dist/assets/CheckCircleIcon-NCOQc0Gs.js +0 -1
  324. package/site/dist/assets/Checkbox-D1EDeo41-rHlvsZzP.js +0 -52
  325. package/site/dist/assets/ChevronDownIcon-CW-4MSpE.js +0 -1
  326. package/site/dist/assets/Chip-CZKIKt9K-CutJG010.js +0 -26
  327. package/site/dist/assets/CoinbaseOnrampStatusScreen-BbyCJDXL-DDaMC7cl.js +0 -16
  328. package/site/dist/assets/ConnectEmailForm-B-VRE0MN-DVSf4tFJ.js +0 -3
  329. package/site/dist/assets/ConnectLedgerScreen-DWHABGot-h0uYIUi6.js +0 -10
  330. package/site/dist/assets/ConnectOnlyLandingScreen-CZYx9Bmp-DP19hJq5.js +0 -1
  331. package/site/dist/assets/ConnectOnlyStatusScreen-DCRzjxHx-DHvijlTx.js +0 -1
  332. package/site/dist/assets/ConnectOrCreateScreen-CUUYUO07-ewmXYPTQ.js +0 -1
  333. package/site/dist/assets/ConnectPhoneForm-Dek5xn4C-DUYdmVtr.js +0 -95
  334. package/site/dist/assets/ConnectWalletView-DqI-PTvX-RobGErVW.js +0 -74
  335. package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-Bbiq3hY6.js +0 -1
  336. package/site/dist/assets/ConnectionStatusScreen-fUfROm9m-DPkOGNWl.js +0 -7
  337. package/site/dist/assets/ConnectorUtil-BO1L6VvV.js +0 -21
  338. package/site/dist/assets/ConstantsUtil-DmLsRHAl.js +0 -198
  339. package/site/dist/assets/CopyToClipboard-i_OQSBJr-DujUHNzW.js +0 -39
  340. package/site/dist/assets/CopyableText-CQapvaMr-DMIdpDaU.js +0 -28
  341. package/site/dist/assets/CrossAppAuthScreen-CLw7ymZq-DbGy4QyA.js +0 -1
  342. package/site/dist/assets/CustomLandingScreenView-Cm_MBSyX-B3WqJZBh.js +0 -22
  343. package/site/dist/assets/DelegatedActionsConsentScreen-DYF2U4y5-CmUDoS0C.js +0 -1
  344. package/site/dist/assets/DelegatedActionsRevokeScreen-bPp6Uwyh-fcO51q5H.js +0 -1
  345. package/site/dist/assets/DepositAddressAddressStepView-4vdkb55L-ClAb_j1B.js +0 -187
  346. package/site/dist/assets/DepositAddressScreen-DBLRs7aI-CN1P_KY9.js +0 -8
  347. package/site/dist/assets/DepositAddressV3Screen-CDqIEMQw-BtDZmuEN.js +0 -1
  348. package/site/dist/assets/EmbeddedWalletConnectingScreen-D4T7DUzs-D3pExuaW.js +0 -1
  349. package/site/dist/assets/EmbeddedWalletCreatedScreen-D7WhW5ve-CLsJbPYQ.js +0 -1
  350. package/site/dist/assets/EmbeddedWalletKeyExportScreen-CqV4NYQ3-DI6bu-oi.js +0 -23
  351. package/site/dist/assets/EmbeddedWalletOnAccountCreateScreen-BoKb3Q2S-BQ9Ygr0P.js +0 -1
  352. package/site/dist/assets/EmbeddedWalletPasswordUpdateScreen-D3rMlqS7-CxrfLr5q.js +0 -1
  353. package/site/dist/assets/EmbeddedWalletPasswordUpdateSplashScreen-BPFkWJeE-DHZRGoTN.js +0 -1
  354. package/site/dist/assets/EnrollTotp-Dibew4dp-7gVtJ1Jt.js +0 -66
  355. package/site/dist/assets/EnvelopeIcon-Dh2vSVj4.js +0 -1
  356. package/site/dist/assets/ErrorBanner-BcpGRt0h-BKOYTyCi.js +0 -21
  357. package/site/dist/assets/ErrorScreen-DipdTWzE-BT8TtRTx.js +0 -4
  358. package/site/dist/assets/ErrorScreen-DipdTWzE-DAam41Xl.js +0 -1
  359. package/site/dist/assets/ExclamationCircleIcon-DUA2wMfO.js +0 -1
  360. package/site/dist/assets/ExclamationTriangleIcon-eZfaqcFq.js +0 -1
  361. package/site/dist/assets/FarcasterConnectStatusScreen-51tjUxqq-BPCBi37Q.js +0 -75
  362. package/site/dist/assets/FarcasterSignerStatusScreen-6x-Uh95G-XCmWpnUd.js +0 -28
  363. package/site/dist/assets/FiatOnrampScreen-BAhYeiTI-DJRcUh2N.js +0 -491
  364. package/site/dist/assets/FingerPrintIcon-Dm6kxmg7.js +0 -1
  365. package/site/dist/assets/FundSolWalletWithExternalSolanaWallet-WtLwYaOl-BfNVSTb1.js +0 -1
  366. package/site/dist/assets/FundWalletMethodHeader-BWNkokCT-BQdbJ5Bb.js +0 -1
  367. package/site/dist/assets/FundWithBankDepositScreen-DajkHxBD-BfvMcHb6.js +0 -58
  368. package/site/dist/assets/FundingEditAmountScreen-CpvpiO4M-VBfbahnA.js +0 -1
  369. package/site/dist/assets/FundingMethodSelectionScreen-Db7vhRlE-CMuBYf64.js +0 -1
  370. package/site/dist/assets/GlobeAltIcon-vqrVV5ho.js +0 -1
  371. package/site/dist/assets/GooglePay-B53WnudL-BX5_WtCx.js +0 -1
  372. package/site/dist/assets/HCaptchaWrapper-CUi9LJsp-D-I8j7NO.js +0 -4
  373. package/site/dist/assets/InAppBrowserLoginNotPossible-BMR9br1T-BY3j50El.js +0 -1
  374. package/site/dist/assets/InfoBanner-Cb3p1z12-DLBl_Ywy.js +0 -22
  375. package/site/dist/assets/InjectedWalletIcon-DLcYOGDj-DLSV_NjP.js +0 -1
  376. package/site/dist/assets/InstallWalletScreen-DTA8dwLv-CxreyXoD.js +0 -1
  377. package/site/dist/assets/LandingScreen-CGWUoSUG-Q7hgXKvM.js +0 -1
  378. package/site/dist/assets/Link-BdDilT2T-BEDEdHuS.js +0 -40
  379. package/site/dist/assets/LinkConflictScreen-C3ZEPsgl-DK1z_v7y.js +0 -77
  380. package/site/dist/assets/LinkEmailScreen-dKo9frwc-BYYpJ5-6.js +0 -1
  381. package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-uhub9C26.js +0 -1
  382. package/site/dist/assets/LinkPasskeyScreen-zbrl_AI_-uid22VTN.js +0 -117
  383. package/site/dist/assets/LinkPhoneScreen-oIUpfj0w-CVQibNi9.js +0 -1
  384. package/site/dist/assets/Loader-UAZqxsnw-Cy7hEE2f.js +0 -62
  385. package/site/dist/assets/LockClosedIcon-BgY_5v_Z.js +0 -1
  386. package/site/dist/assets/LoginFailedScreen-CN0dJV6U-DhUMiJZJ.js +0 -1
  387. package/site/dist/assets/ManualTransferScreen-CHqcuqbs-DMygAXMU.js +0 -1
  388. package/site/dist/assets/MfaAuthEnrollmentFlowScreen-Dj7gPTRC-_1GFUSIg.js +0 -1
  389. package/site/dist/assets/MfaAuthVerifyFlowScreen-DbFpyWMy-DLnBJ5b8.js +0 -1
  390. package/site/dist/assets/MfaEnrollmentFlowScreen-DhLnGgnr-BUJY1lzs.js +0 -1
  391. package/site/dist/assets/MfaVerifyFlowScreen-C_XPjMRP-25l5fVun.js +0 -1
  392. package/site/dist/assets/ModalFooter-BCuEK_nz-c-khvG4Y.js +0 -403
  393. package/site/dist/assets/MoonpayStatusScreen-CzTUtokc-BRFN2eXr.js +0 -16
  394. package/site/dist/assets/OAuthStatusScreen-ufbOa-da-DL30vu07.js +0 -1
  395. package/site/dist/assets/OpenLink-CUpJ1mOr-DfAvJRyK.js +0 -39
  396. package/site/dist/assets/PasskeySelectSignupOrLogin-xh2ScC_l-DtxhRQyw.js +0 -1
  397. package/site/dist/assets/PasskeyStatusScreen-Bla8MaOk-CNfu8ujT.js +0 -6
  398. package/site/dist/assets/PasswordRecoveryScreen-awGXZkQk-BR6z6xE8.js +0 -20
  399. package/site/dist/assets/PhArrowClockwise-DVgyFuez.js +0 -14
  400. package/site/dist/assets/PhArrowDown-87b1BizM.js +0 -14
  401. package/site/dist/assets/PhArrowLeft-Da0MfnbK.js +0 -14
  402. package/site/dist/assets/PhArrowRight-AdrIL4DW.js +0 -14
  403. package/site/dist/assets/PhArrowUp-4sgyKPGx.js +0 -14
  404. package/site/dist/assets/PhArrowUpRight-BNghD2zq.js +0 -14
  405. package/site/dist/assets/PhArrowsLeftRight-MuKBLUoF.js +0 -14
  406. package/site/dist/assets/PhBrowser-2-9m-AkM.js +0 -14
  407. package/site/dist/assets/PhCaretDown-BDNabFuL.js +0 -14
  408. package/site/dist/assets/PhCaretLeft-CI460R-A.js +0 -14
  409. package/site/dist/assets/PhCaretRight-D7ZS3Ls8.js +0 -14
  410. package/site/dist/assets/PhCaretUp-C-iIfyvO.js +0 -14
  411. package/site/dist/assets/PhCheck-DxQXn57r.js +0 -14
  412. package/site/dist/assets/PhClock-x3MS3Mwi.js +0 -14
  413. package/site/dist/assets/PhCopy-CWNYcABI.js +0 -14
  414. package/site/dist/assets/PhDeviceMobile-CsyA5Goi.js +0 -14
  415. package/site/dist/assets/PhDotsThree-D-k1BiYg.js +0 -14
  416. package/site/dist/assets/PhEnvelope-D8kzeNox.js +0 -14
  417. package/site/dist/assets/PhFunnelSimple-CfQs5DAW.js +0 -14
  418. package/site/dist/assets/PhMagnifyingGlass-C9u8jSCJ.js +0 -14
  419. package/site/dist/assets/PhPlus-C4UoW-2n.js +0 -14
  420. package/site/dist/assets/PhWarningCircle-BXHw1fCt.js +0 -14
  421. package/site/dist/assets/PhX-DX0SFIqC.js +0 -14
  422. package/site/dist/assets/PhoneIcon-CvIiPwYQ.js +0 -1
  423. package/site/dist/assets/PinInput-DbZ0b1i1-CDXZBdQx.js +0 -247
  424. package/site/dist/assets/PrivyPluginContext-DA-yS5vO-CtQWBiV2.js +0 -1
  425. package/site/dist/assets/QrCode-DbnZwlkH-BymHrKY7.js +0 -22
  426. package/site/dist/assets/RecoveryOAuthStatusScreen-CsgtTI2x-Dro1btv5.js +0 -1
  427. package/site/dist/assets/RecoveryPasswordCreateScreen-Be-qJ-LU-C1q1hiaN.js +0 -1
  428. package/site/dist/assets/RecoverySelectionScreen-D1iGtpmi-C21D20gD.js +0 -7
  429. package/site/dist/assets/SIWXUtil-CHZVugix.js +0 -1
  430. package/site/dist/assets/ScreenLayout-OwaQQcxH-CrQM6kvA.js +0 -1
  431. package/site/dist/assets/SetAutomaticRecoveryScreen-BO_OEqAZ-BcWHJoEG.js +0 -14
  432. package/site/dist/assets/SetWalletPasswordForm-DwCTVtAh-kq1zvA7d.js +0 -11
  433. package/site/dist/assets/ShieldCheckIcon-o6RHYev1.js +0 -1
  434. package/site/dist/assets/SignRequestScreen-BHKv32KR-iQCaBkcz.js +0 -26
  435. package/site/dist/assets/SolanaWalletConnector-C7Lqk-Wz-BUdJJ0ep.js +0 -1
  436. package/site/dist/assets/StandardSignAndSendTransactionScreen-CfhIXVtd-nART-xUU.js +0 -20
  437. package/site/dist/assets/TelegramAuthScreen-UL9zLfO8-Dw9geyK3.js +0 -1
  438. package/site/dist/assets/TodoList-DnyULl18-C8Eyy28X.js +0 -36
  439. package/site/dist/assets/TransactionDetails-e9nesl30-DeEL1JQS.js +0 -109
  440. package/site/dist/assets/TransactionErrorView-BDBNqA_f-Dffuo7I4.js +0 -178
  441. package/site/dist/assets/TransferFromWalletScreen-Qvn1Yuno-CWLWUiHy.js +0 -31
  442. package/site/dist/assets/TransferOrBridgeLoadingScreen-Dl1I_iIz-Bo-tm6wr.js +0 -6
  443. package/site/dist/assets/TurnstileWrapper-B7sNddys-Jwy1tJtm.js +0 -1
  444. package/site/dist/assets/UpdateEmailScreen-DVOhPV0H-gFbSIUhh.js +0 -1
  445. package/site/dist/assets/UpdatePhoneScreen-CXRswTNZ-Coy4E1NQ.js +0 -1
  446. package/site/dist/assets/UserLimitReachedScreen-5we2DHn8-D7m70C4b.js +0 -1
  447. package/site/dist/assets/WalletCards-DH1rqayz-Bgp9Fsgs.js +0 -1
  448. package/site/dist/assets/WalletIcon-gKf0gTw6.js +0 -1
  449. package/site/dist/assets/WalletInfoCard-sq_2wgFg-ISBsQt8p.js +0 -29
  450. package/site/dist/assets/WalletInterstitialScreen-Sh7LfsAh-DG-RuO-F.js +0 -1
  451. package/site/dist/assets/WalletLink-DK5LB5Ha-CXBqCHf3.js +0 -20
  452. package/site/dist/assets/WalletOverflowButton-bfCnp-9T-DP0-PoZL.js +0 -1
  453. package/site/dist/assets/WarningBanner-ZZqCEtZK-2eU4Qo74.js +0 -21
  454. package/site/dist/assets/__vite-browser-external-CitKSmYk.js +0 -1
  455. package/site/dist/assets/_esm-CJe2F7LL.js +0 -7
  456. package/site/dist/assets/_esm-zhBBffjV.js +0 -1
  457. package/site/dist/assets/accounts-Bq8t1wAD.js +0 -1
  458. package/site/dist/assets/accounts-D96UKWkC.js +0 -1
  459. package/site/dist/assets/analytics-mkkvFRju-BRBcadka.js +0 -1
  460. package/site/dist/assets/baseSepolia-DX-qGsik.js +0 -1
  461. package/site/dist/assets/basic-MlZ7f4s9.js +0 -1575
  462. package/site/dist/assets/capitalizeFirstLetter-DmLYqXsO-DtOXx-2n.js +0 -1
  463. package/site/dist/assets/ccip-BI9LWBBg.js +0 -1
  464. package/site/dist/assets/ccip-C-59SNEF.js +0 -7
  465. package/site/dist/assets/ccip-y08wK9du.js +0 -1
  466. package/site/dist/assets/chain-DM3oH6Px.js +0 -8
  467. package/site/dist/assets/check-BPgcwEPP.js +0 -1
  468. package/site/dist/assets/chevron-down-BSsbXkK-.js +0 -1
  469. package/site/dist/assets/circle-alert-DWaeLZNj.js +0 -1
  470. package/site/dist/assets/circle-check-big-Chb1ivw9.js +0 -1
  471. package/site/dist/assets/circle-x-AV9Cet0R.js +0 -1
  472. package/site/dist/assets/client-D0IV9lV9.js +0 -2
  473. package/site/dist/assets/client-Dsa7_3V3.js +0 -9
  474. package/site/dist/assets/coinbase-DCPC2L_R-Rs9nVCfm.js +0 -3
  475. package/site/dist/assets/copy-Ckr0AkL6.js +0 -1
  476. package/site/dist/assets/core-zQ1tZtVZ.js +0 -12
  477. package/site/dist/assets/createLucideIcon-IPW50ckY.js +0 -1
  478. package/site/dist/assets/defineChain-CiuCXUZW.js +0 -1
  479. package/site/dist/assets/dijkstra-Drfl93V4.js +0 -1
  480. package/site/dist/assets/dist-BxQqwnue.js +0 -16
  481. package/site/dist/assets/dist-Cm7pNAtL.js +0 -1
  482. package/site/dist/assets/dist-CoS6E-3x.js +0 -1
  483. package/site/dist/assets/dist-Dl07uGq1.js +0 -1
  484. package/site/dist/assets/embed.worker-ugGhEqCV.js +0 -1
  485. package/site/dist/assets/errors-BQ3N-RVt-BLqjTPNR.js +0 -1
  486. package/site/dist/assets/esm-C3DslVJx.js +0 -1
  487. package/site/dist/assets/esm-Ci1ogKuK.js +0 -1
  488. package/site/dist/assets/esm-DXsETz3H.js +0 -1
  489. package/site/dist/assets/esm-n2lWo7kz.js +0 -1
  490. package/site/dist/assets/esm-vs5jNx_Y.js +0 -37
  491. package/site/dist/assets/ethers-zTjbodk5-B7BBFFKf.js +0 -1
  492. package/site/dist/assets/eventemitter3-CL76jPsW.js +0 -1
  493. package/site/dist/assets/external-link-D-uehwM2.js +0 -1
  494. package/site/dist/assets/farcaster-DPlSjvF5-BqTvDXBR.js +0 -1
  495. package/site/dist/assets/features-CYXRa3_m.js +0 -2
  496. package/site/dist/assets/fingerprint-pattern-D8ytA16Q.js +0 -1
  497. package/site/dist/assets/floating-ui.react-dom-DKWOL9UG.js +0 -1
  498. package/site/dist/assets/floating-ui.react-xRkl9O3u.js +0 -1
  499. package/site/dist/assets/formatErc20TokenAmount-BuPk9xcy-BVqOKQif.js +0 -1
  500. package/site/dist/assets/formatter-CVbp4SlJ.js +0 -1
  501. package/site/dist/assets/get-entropy-details-for-user-dHRH5Gpi-Dukf7_kJ.js +0 -1
  502. package/site/dist/assets/getChainName-DjpPdUSc-DUyKDrnp.js +0 -1
  503. package/site/dist/assets/getErc20Balance-jXNpFf0N-V2btxzrJ.js +0 -1
  504. package/site/dist/assets/getErc20TokenInfo-BNTrzLMP-CtCwQuGA.js +0 -1
  505. package/site/dist/assets/getFormattedUsdFromLamports-De3U9GlO-Gx4_wxON.js +0 -1
  506. package/site/dist/assets/getUsdcMintAddress-BVgm9GRo-r2UnDeEy.js +0 -1
  507. package/site/dist/assets/guards-BIW-GiMJ-CHfXo8XI.js +0 -1
  508. package/site/dist/assets/hooks.module-BYZGfwDl.js +0 -1
  509. package/site/dist/assets/hourglass-CPG1HZmf.js +0 -1
  510. package/site/dist/assets/id-UqEwL2BI-CdKXapd-.js +0 -1
  511. package/site/dist/assets/index-BdEw5wyl-ChSJvPZk.js +0 -1
  512. package/site/dist/assets/index-CKdAF_dK.js +0 -8
  513. package/site/dist/assets/index-DvMddJcd-D-4mRLKK.js +0 -12
  514. package/site/dist/assets/index-YiCw0Y_x-BX1zsiqG.js +0 -437
  515. package/site/dist/assets/index.browser-B-i-Lj3J.js +0 -1
  516. package/site/dist/assets/index.browser-BMmUcykv.js +0 -1
  517. package/site/dist/assets/index.es-BmqyoBEM.js +0 -2
  518. package/site/dist/assets/index.es-C1v1or--.js +0 -3
  519. package/site/dist/assets/isPaymentRequestAvailable-Bq1cemEn-By6r0dVB.js +0 -1
  520. package/site/dist/assets/jsx-runtime-BbDfbRii.js +0 -1
  521. package/site/dist/assets/landmark-CH6LV6F0.js +0 -1
  522. package/site/dist/assets/lib-BsS8z8Lj.js +0 -1
  523. package/site/dist/assets/localBatchGatewayRequest-5YxrERBj.js +0 -32
  524. package/site/dist/assets/lock-DcskI4Bb.js +0 -1
  525. package/site/dist/assets/logger-CsXm3oIv-B0UYpNFI.js +0 -1
  526. package/site/dist/assets/mail-Bs0r5yOi.js +0 -1
  527. package/site/dist/assets/modal-context-CwmSeFcv-DruX9J1E.js +0 -1
  528. package/site/dist/assets/native-BKj27wfc.js +0 -1
  529. package/site/dist/assets/ofetch.CWycOUEr-CHp-crOQ.js +0 -1
  530. package/site/dist/assets/parseAbi-Csg-8t59.js +0 -2
  531. package/site/dist/assets/parseAbiParameters-BWbIMYe4.js +0 -1
  532. package/site/dist/assets/parseEther-CGP3gnf2.js +0 -1
  533. package/site/dist/assets/pkce-DXF0yKjP-Bqz4wAsq.js +0 -1
  534. package/site/dist/assets/preload-helper-BaNbYf_w.js +0 -1
  535. package/site/dist/assets/privy-context-81KmsBw2-CjWGzyg7.js +0 -2
  536. package/site/dist/assets/property-DuZ9DLP4.js +0 -3
  537. package/site/dist/assets/react-DCXkXSrv.js +0 -1
  538. package/site/dist/assets/react-DQnMl2Xv.js +0 -1
  539. package/site/dist/assets/react-DrJ0MmMO.js +0 -1
  540. package/site/dist/assets/react-auth-sHnipzbS.js +0 -1
  541. package/site/dist/assets/react-dom-5dW7aKoP.js +0 -1
  542. package/site/dist/assets/reservoir-x-nGuZkT-BMX127i6.js +0 -1
  543. package/site/dist/assets/roles-32M1l9jI.js +0 -1
  544. package/site/dist/assets/roles-DKPW79Ca.js +0 -1
  545. package/site/dist/assets/rolldown-runtime-BcKkbAw3.js +0 -1
  546. package/site/dist/assets/safe-url-D7SRPu33-CkMedGro.js +0 -1
  547. package/site/dist/assets/secp256k1-C4nzcPo-.js +0 -1
  548. package/site/dist/assets/secp256k1-D92aGNnU.js +0 -1
  549. package/site/dist/assets/secp256k1-DmbwyFau.js +0 -1
  550. package/site/dist/assets/secp256k1-_MleGpqL.js +0 -1
  551. package/site/dist/assets/secp256k1-xl2og-wO.js +0 -1
  552. package/site/dist/assets/serializeAuthorizationList-CX8hGL56.js +0 -1
  553. package/site/dist/assets/serializeSignature-DfxkPnu-.js +0 -2
  554. package/site/dist/assets/sha2-BU_QyRTx.js +0 -1
  555. package/site/dist/assets/shouldProceedtoEmbeddedWalletCreationFlow-B3vyavrh-ByFOTrQK.js +0 -1
  556. package/site/dist/assets/simulateTransaction-CfuOrae4-CMFGDgT_.js +0 -1
  557. package/site/dist/assets/smartphone-CcEZ-XAy.js +0 -1
  558. package/site/dist/assets/src-BBjkfi-Q.js +0 -1
  559. package/site/dist/assets/storage-Ufl800Ne-EalZTH9q.js +0 -9
  560. package/site/dist/assets/stringify-BlDm7tuc.js +0 -21
  561. package/site/dist/assets/stripe.esm-CZRDpc-N.js +0 -2
  562. package/site/dist/assets/styles-BsotlekN-CXEB4Ud9.js +0 -9
  563. package/site/dist/assets/telegram-B-JqnkqZ-RBoY3PLx.js +0 -1
  564. package/site/dist/assets/to-ui-error-DWe-qwS3-DgCO-Y70.js +0 -4
  565. package/site/dist/assets/toViemAccount-B5iDGq1b-DZ1MBqUW.js +0 -2
  566. package/site/dist/assets/transaction-BNTP-bFm-M5tJx8vY.js +0 -1
  567. package/site/dist/assets/transfer-6YztDh-t-BVQkTvG-.js +0 -1
  568. package/site/dist/assets/transformers.web-D4RvOP4-.js +0 -40
  569. package/site/dist/assets/transformers.web-D8W1u_I2.js +0 -49
  570. package/site/dist/assets/triangle-alert-CWjYH75H.js +0 -1
  571. package/site/dist/assets/twitch-5IOe4sIQ-lDtgk0os.js +0 -1
  572. package/site/dist/assets/types-4CuOD23i.js +0 -1
  573. package/site/dist/assets/use-headless-crypto-deposit-Yn-QRLB3-Dn6_8w-Y.js +0 -1
  574. package/site/dist/assets/use-unlink-wallet-BKK4_5Ur-DgsQ75lh.js +0 -1
  575. package/site/dist/assets/useActiveWallet-B-yZYGc6-B6JWREbk.js +0 -123
  576. package/site/dist/assets/useGetSolPrice-x7gfUIHJ-D1hmQfpA.js +0 -1
  577. package/site/dist/assets/useGetTokenPrice-CaoUkb79-ZnbuJ-vP.js +0 -1
  578. package/site/dist/assets/useI18n-C-5n_noF-BcqC76yj.js +0 -1
  579. package/site/dist/assets/useWalletBalance-CZnP5f_f-L3V0jDjL.js +0 -1
  580. package/site/dist/assets/useWallets-X1ndvJ_U-CLwUcevw.js +0 -1
  581. package/site/dist/assets/utils-BkR7EQjg.js +0 -1
  582. package/site/dist/assets/utils-DJhBNOZA.js +0 -1
  583. package/site/dist/assets/utils-DdckVfQr.js +0 -1
  584. package/site/dist/assets/w3m-modal-BMubXAoG.js +0 -1174
  585. package/site/dist/assets/wallet-Bn85Sg2W.js +0 -1
  586. package/site/dist/assets/wallet-connect-BvJtUsDt-Y03hhqFN.js +0 -1
  587. package/site/dist/assets/wallet-uSKqQsgP.js +0 -2
  588. package/site/dist/assets/walletconnect-registry-xxG8XLCb-D1SSFvMp.js +0 -1
  589. package/site/dist/assets/walletconnect-v2-3frQFwbg-Dv6JY_ko.js +0 -12
  590. package/site/dist/assets/x-rlSp9U7W.js +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @fangorn-network/westmarch
2
2
 
3
- Everything you need to get started building Fangorn apps.
3
+ Everything you need to get started building Fangorn apps, and the free tier that runs them.
4
4
 
5
5
  **Start here:** [docs/app-to-agent.md](docs/app-to-agent.md) takes a static site from nothing
6
6
  to a Fangorn app and ERC-8004 agent that any agent can discover, verify and drive.
@@ -9,6 +9,34 @@ to a Fangorn app and ERC-8004 agent that any agent can discover, verify and driv
9
9
  installs `fangorn-mcp` in one command.
10
10
 
11
11
 
12
+ ## The free tier: one Worker per app
13
+
14
+ ```sh
15
+ westmarch-ship app.json # claim the app, commit its schema, run its sources, deploy its Worker
16
+ ```
17
+
18
+ An app on the free tier is one Cloudflare Worker (`site/worker.js`), and nobody runs anything
19
+ after the deploy:
20
+
21
+ - **Indexer.** A cron follows the update log from where it left off, and runs the
22
+ embedding lens (WHITEPAPER_1 §3.4) over every member's repo whose head moved: `view.js`, with
23
+ the Worker's AI binding as the encoder (`@cf/google/embeddinggemma-300m`, 256 dims). The view
24
+ goes to R2. A repo whose publisher leaves the app, or that the app excludes, loses its domain on the next run.
25
+ - **View.** `/view/cdn/…`: the catalog, manifests and content-named shards a reader ranks in
26
+ its own tab, so a query need never leave it.
27
+ - **MCP.** `/mcp`, streamable HTTP: describe, search, get, similar, count, browse and threads
28
+ over the view, the query embedded by the same runtime as the rows. Add it to a client as a
29
+ URL; there is nothing to install.
30
+ - **Site and card.** The stock page, and the agent card naming the app, its repos, its view
31
+ and its MCP endpoint, bound on chain.
32
+
33
+ The whole network embeds with one model (`src/core/embed.js`): EmbeddingGemma-300m, by its
34
+ retrieval prompts, truncated to 256 dims. A tab runs it with transformers.js (q8) and the Worker
35
+ with Workers AI; on the same rows they agree to ~0.996 cosine (`E2E_PARITY=1 npm run e2e:worker`).
36
+
37
+ `npm run e2e:worker` runs the whole tier on this machine: the contracts on anvil, a local IPFS
38
+ gateway, publishers, and the Worker under `wrangler dev` with its real AI binding.
39
+
12
40
  **For Publishers** — shape a tree into a commit graph, describe what's in it, seal and upload the bytes. Needs `fangorn`. Runs anywhere: a script, a server, a browser.
13
41
 
14
42
  **For Consumers** — read a quickbeam view's Semantic CDN shards in the reader's own process and rank them there. Needs a view URL and nothing else. No index server, no chain read, and the query never leaves the tab.
@@ -9,7 +9,8 @@ browser and any agent can find, verify and query. By the end you have:
9
9
  - **your data** committed on chain under your namespace;
10
10
  - **a view** of it: your committed data embedded and sharded as static files, so people
11
11
  and agents can search it by meaning, updated with one command after each commit;
12
- - **a static site** with no server: the view, and a page for people;
12
+ - **a site**: the view, a page for people, and an MCP endpoint for agents (one Cloudflare
13
+ Worker with `ship`, or static files by hand);
13
14
  - **an agent card** bound to the app on chain, and registered as an ERC-8004 agent;
14
15
  - **agents using it:** anyone running `fangorn-mcp` can `open-app` it by name.
15
16
 
@@ -39,7 +40,10 @@ which anything can produce: a scraper, a database export, a converted spreadshee
39
40
  writes the same files, so moving an app to it means changing the `views` URL in its
40
41
  card.
41
42
 
42
- It runs on Arbitrum Sepolia.
43
+ It runs on Base Sepolia (new apps) or Arbitrum Sepolia (apps claimed there before the move).
44
+ `"network"` in `app.json` is required: `"baseSepolia"`, or the network the app was claimed on.
45
+ `westmarch-view` and `fangorn-mcp` read Base Sepolia unless `FANGORN_NETWORK=arbitrumSepolia`;
46
+ the CLI signs on `CHAIN_NAME`.
43
47
 
44
48
  ## The short way: one config, one command
45
49
 
@@ -58,8 +62,9 @@ update: each step checks the chain (or Cloudflare) first and acts only on a diff
58
62
  "presentation": { "facets": ["category"] } } },
59
63
  "relations": [],
60
64
  "sources": [{ "namespace": "things", "command": ["python", "-m", "my_source"] }],
65
+ "network": "baseSepolia", // required: where the app is (or will be) claimed
61
66
  "fangorn": "fangorn", // the CLI that signs
62
- "paid": { "price": "0.01", "network": "arbitrum-sepolia", "description": "the full record" }
67
+ "paid": { "price": "0.01", "description": "the full record" } // optional: USDC on the app's network, x402 v2
63
68
  }
64
69
  ```
65
70
 
@@ -68,25 +73,30 @@ npx westmarch-ship app.json # claim, join, schema, crawl + publish, v
68
73
  npx westmarch-ship app.json --dry-run # every step, printed, none done
69
74
  npx westmarch-ship app.json --no-crawl # rebuild view, site and card from what is on chain
70
75
  npx westmarch-ship app.json --replace # each source's crawl becomes its namespace's whole state
76
+ npx westmarch-ship app.json --index # build the deployed app's view once, on this machine
71
77
  ```
72
78
 
73
- What it does, in order (the long way, below, is the same steps by hand):
79
+ The app is one Cloudflare Worker: a cron that indexes the chain into R2 (embedding with
80
+ Workers AI), the view, `/mcp`, and the page. What `ship` does, in order:
74
81
 
75
82
  1. **claim** the app on the first run, and record the claim block (the card's `fromBlock`);
76
- 2. **join** it as a publisher, if the wallet has not;
77
- 3. **commit the schema** (`types`, `relations`) to `fangorn.schema`, if the chain's differs;
78
- 4. **run each source**: a command that publishes into `--namespace` when given `--publish`.
83
+ the claimer is the app's first member;
84
+ 2. **commit the schema** (`types`, `relations`) to `fangorn.schema`, if the chain's differs;
85
+ 3. **run each source**: a command that publishes into `--namespace` when given `--publish`.
79
86
  Every quickbeam scraper Source does. A source with `"each": "rows.json"` is a template,
80
87
  one source per row (`{field}`, `{field|slug}`, `{args...}`), so adding a town, a feed or
81
88
  an account is adding a row;
82
- 5. **westmarch-view**: the app's commits → `.ship/site/view`, embedding only what changed.
83
- A removal rewrites the domain, so a retracted record's bytes stop being served;
84
- 6. **the site**: the stock page (search, plus a feed of what is coming up and what just
85
- happened, by the `temporal` role and the first `facets` field), the agent card and
86
- `_headers`. With `paid`, also `_worker.js`, which sells each record over x402; only
87
- records whose sha256 a live row carries are for sale;
88
- 7. **deploy** to Cloudflare Pages (`wrangler`; the project is created if missing);
89
- 8. **register** the ERC-8004 agent and bind the card, if the chain points elsewhere.
89
+ 4. **the site** in `.ship/site`: the stock page (search, plus a feed of what is coming up and
90
+ what just happened, by the `temporal` role and the first `facets` field; for rows that are
91
+ not meetings, an explore page: `site.examples` as searches to try, the latest records by
92
+ `temporal`, and each declared facet's values to browse), the agent card,
93
+ `/openapi.json` and `/.well-known/x402` when anything is for sale, and `_headers`;
94
+ 5. **deploy the Worker** (`wrangler deploy`): its R2 bucket (created if missing), Workers AI,
95
+ the cron (`site.cron`, default every 5 minutes) and its CONFIG. With `paid`, it sells each
96
+ record over x402; only records whose sha256 a live row carries are for sale. If the app
97
+ has no view yet, ship builds the first one here (`--index`) rather than wait for the cron;
98
+ 6. **register** the ERC-8004 agent and bind the card, if the chain points elsewhere. An
99
+ agent is minted once; later runs only rebind.
90
100
 
91
101
  State lives in `.ship/` next to `app.json`. In CI, cache `.ship/cache` and `.ship/stage`
92
102
  and commit `.ship/state.json`; Quorum's `.github/workflows/ship.yml` is a working example
@@ -95,7 +105,40 @@ and commit `.ship/state.json`; Quorum's `.github/workflows/ship.yml` is a workin
95
105
  **What was run:** all of it, for Quorum (`https://quorum-bua.pages.dev`, agent `421614:245`):
96
106
  five towns' meetings crawled, published, embedded and deployed by `westmarch-ship`, then
97
107
  searched and bought (x402, settled on Arbitrum Sepolia) from `fangorn-mcp` in a fresh
98
- session. Kingsfoil, the reference at the end, predates `ship` and was built by hand.
108
+ session. FAR Desk (`https://far-desk.quickbeam.workers.dev`, agent `84532:10323`) is the
109
+ private one: 3,113 sealed FAR sections on Base Sepolia, searched per call and with a pass.
110
+ Kingsfoil, the reference at the end, predates `ship` and was built by hand.
111
+
112
+ ## A private app: the data is the product
113
+
114
+ `"private": { "pass": { "price": "5", "days": 30 }, "call": "0.01" }` in `app.json`, settled like
115
+ `paid` (`network`, `payTo`, `asset`, `facilitator`). What changes:
116
+
117
+ - **Storage.** Each source stages its records (it needs `--output-dir`); ship seals every row whole,
118
+ `{sealed: base64(nonce ‖ AES-256-GCM(rowKey, row))}` with rowKey = HMAC-SHA256(PAID_SECRET,
119
+ "fangorn.row.v1"), and commits that. The nonce is derived from the row, so an unchanged row keeps
120
+ its CID and is not re-embedded. PAID_SECRET is `$PAID_SECRET` or made once in `.ship/secret`:
121
+ **back it up**, it is the only way to open the rows.
122
+ - **Index.** The Worker (which ship gives the secret on every deploy) opens rows in its cron and
123
+ builds the view in R2 as for any app. `--index` does the same once on your machine
124
+ (`wrangler dev` against the app's own R2 and Workers AI), for the first view or a catalog too
125
+ big for one cron run.
126
+ - **Serving.** `/view/*` (but `cdn/catalog`) and every MCP tool but `describe` need access: a pass
127
+ (`POST /pass`, x402 v2, a bearer token good for `days`) or one x402 payment per tool call over
128
+ x402's MCP transport (`_meta["x402/payment"]`). A call that fails or misses is not charged.
129
+ `fangorn-mcp` pays by itself with `FANGORN_MCP_WALLET_KEY`: a pass at or under
130
+ `FANGORN_MCP_MAX_PASS`, else per call at or under `FANGORN_MCP_MAX_PRICE`.
131
+ - **Discovery.** The card's Fangorn extension carries `access` (pass URL and prices), and its
132
+ skills are tagged `x402`, so the ERC-8004 registration says `x402Support: true`.
133
+ `/openapi.json` and `/.well-known/x402` list `POST /pass` for x402scan; the facilitator's Bazaar
134
+ lists `/pass` and each tool (as `type: "mcp"`) after its first sale.
135
+ - **The page.** Without a pass it shows what is inside (the free catalog and `describe`: how many
136
+ records, when they were updated), a "Get a pass" button (Privy sign-in, then x402; on a testnet
137
+ it links the faucet when the balance is short), and the lines to add the app to an agent
138
+ (`#/agents`). The pass is kept on the device and sent with every read, and the agent line
139
+ carries it too. Add the app's origin to Privy's allowed origins.
140
+
141
+ Not yet: memberships on a private app's page.
99
142
 
100
143
  ## Grading a change before it ships
101
144
 
@@ -157,8 +200,8 @@ What `ship` does, one step at a time: for understanding it, or for doing one ste
157
200
  ### What you need
158
201
 
159
202
  - Node 22.
160
- - The Fangorn CLI: `npm i -g @fangorn-network/sdk@2026.9.22-dev` (gives `fangorn`).
161
- - A wallet on Arbitrum Sepolia with a little ETH. **It owns the app forever**, so use the
203
+ - The Fangorn CLI: `npm i -g @fangorn-network/sdk@2026.10.20-dev` (gives `fangorn`).
204
+ - A wallet on the app's network (Base Sepolia, or Arbitrum Sepolia for older apps) with a little ETH. **It owns the app forever**, so use the
162
205
  wallet that will publish the data.
163
206
  - A Pinata JWT. Registering the ERC-8004 agent (step 11) pins a file to IPFS.
164
207
  - A static host that serves `/.well-known/` and custom headers. Cloudflare Pages does
@@ -192,8 +235,8 @@ First, note the current block. It becomes the card's `fromBlock` (step 9), which
192
235
  readers start scanning the chain for your app:
193
236
 
194
237
  ```sh
195
- node -e 'const {createPublicClient,http}=require("viem");const {arbitrumSepolia}=require("viem/chains");
196
- createPublicClient({chain:arbitrumSepolia,transport:http()}).getBlockNumber().then(String).then(console.log)'
238
+ node -e 'const {createPublicClient,http}=require("viem");const {baseSepolia}=require("viem/chains");
239
+ createPublicClient({chain:baseSepolia,transport:http()}).getBlockNumber().then(String).then(console.log)' # arbitrumSepolia for older apps
197
240
  ```
198
241
 
199
242
  Then claim the name:
@@ -541,7 +584,7 @@ live before step 11, because the CLI fetches it.
541
584
 
542
585
  ```sh
543
586
  fangorn app agent https://my-app.pages.dev/.well-known/agent-card.json
544
- # Agent ID: 421614:…
587
+ # Agent ID: 84532:…
545
588
  # Card: https://my-app.pages.dev/.well-known/agent-card.json
546
589
  # Tx: 0x…
547
590
  ```
@@ -556,8 +599,16 @@ This does two things:
556
599
  2. **Fangorn.** It calls `setAppAgentUri(cardUrl)`, which emits `AppAgentChanged`. That log
557
600
  is the app directory: `list-apps` and `listApps` read it.
558
601
 
559
- `--skip-register` does only the second step, e.g. to move an already-registered card to a
560
- new URL.
602
+ **Mint once.** Every run without flags mints a new agent. After the first:
603
+
604
+ - `--update <agentId>` refreshes the existing agent's registration from the card as it is now
605
+ (name, description, skills, `x402Support`), re-pins it and sets its URI. It rebinds only if
606
+ the chain points elsewhere.
607
+ - `--skip-register` does only the second step, e.g. to move a card to a new URL.
608
+
609
+ The bind retries on a nonce race (`replacement transaction underpriced`), which load-balanced
610
+ RPCs cause right after the mint. If a run failed after `Agent ID:` printed, the agent exists:
611
+ finish with `--skip-register`, don't run it again.
561
612
 
562
613
  ## 12. Use it as an agent would
563
614
 
@@ -597,13 +648,14 @@ can keep an app current: a cron job, a CI workflow, or an agent that just publis
597
648
  registration. Install it through npm (node ≥ 20):
598
649
 
599
650
  ```sh
600
- claude mcp add fangorn -e FANGORN_LOG_WINDOW=100000 -- \
651
+ claude mcp add fangorn -- \
601
652
  npx -y -p @fangorn-network/westmarch -p @huggingface/transformers fangorn-mcp
602
653
  ```
603
654
 
604
655
  Without `-p @huggingface/transformers`, the install is ~500 MB lighter and `search` ranks by
605
- words, not meaning. Without `FANGORN_LOG_WINDOW`, `list-apps` scans the chain 1,000 blocks
606
- per call and takes minutes.
656
+ words, not meaning. It lists the apps on Base Sepolia; add `-e FANGORN_NETWORK=arbitrumSepolia`
657
+ before `--` for those still on Arbitrum Sepolia. For private apps, `-e FANGORN_MCP_WALLET_KEY=…`
658
+ lets it pay (see [A private app](#a-private-app-the-data-is-the-product)).
607
659
 
608
660
  [docs/mcp.md](mcp.md) has the full setup: other MCP clients, every setting, running from
609
661
  source, and troubleshooting. A single-file binary (`bun build-bin.js`) exists but is not
@@ -727,6 +779,9 @@ const { contents } = await fangorn.readNamespace(timelines[0].owner, namespaces[
727
779
  | `listApps` takes forever | `fromBlock` is too early; the scan is 1000 blocks per RPC call |
728
780
  | `app agent`: "ERC-8004 registration pins the registration file to IPFS" | no Pinata JWT in `fangorn init` |
729
781
  | `app agent` signs as the wrong wallet | `~/.fangorn/config.json` beats `ETH_PRIVATE_KEY` |
782
+ | `app agent`: "replacement transaction underpriced" | a nonce race after the mint; the agent exists, so rerun with `--skip-register` (step 11) |
783
+ | the 8004 registration says `x402Support: false` | no card skill is tagged `x402`; rebuild the card, then `fangorn app agent <card> --update <agentId>` |
784
+ | a private app's page says the data is still being indexed | the cron hasn't run yet; `westmarch-ship app.json --index` |
730
785
  | search on the page matches words, never meaning | the bundler pre-bundled westmarch; `optimizeDeps.exclude` it |
731
786
  | an agent's first call returns empty, later calls work | the tools registered before their data loaded (step 8) |
732
787
  | an agent opens the page and finds no tools | `card.url` is not the page that registers them |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangorn-network/westmarch",
3
- "version": "0.0.19-dev",
4
- "description": "Publisher and consumer surfaces for a Fangorn app: shape a graph, publish it, read it back as a searchable, agent-drivable catalog",
3
+ "version": "2026.10.20-dev",
4
+ "description": "The free tier for a Fangorn app: one Cloudflare Worker that indexes what the app presents, serves it as a view and an MCP server, and hosts its site",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -38,13 +38,14 @@
38
38
  "build": "tsc -p .",
39
39
  "prepare": "tsc -p .",
40
40
  "test": "node scripts/test.js",
41
- "lint": "node src/publish/lint.js"
41
+ "lint": "node src/publish/lint.js",
42
+ "e2e:worker": "node scripts/e2e-worker.mjs"
42
43
  },
43
44
  "dependencies": {
44
45
  "@fangorn-network/markov": "^0.1.0"
45
46
  },
46
47
  "peerDependencies": {
47
- "@fangorn-network/sdk": "^2026.9.22-dev",
48
+ "@fangorn-network/sdk": "^2026.10.20-dev",
48
49
  "@huggingface/transformers": "^4.2.0",
49
50
  "@noble/curves": "^1.9.1",
50
51
  "viem": "^2.55.1"
@@ -55,11 +56,13 @@
55
56
  }
56
57
  },
57
58
  "devDependencies": {
58
- "@fangorn-network/sdk": "^2026.9.22-dev",
59
+ "@fangorn-network/barliman": "file:../barliman",
60
+ "@fangorn-network/sdk": "^2026.10.20-dev",
59
61
  "@huggingface/transformers": "^4.2.0",
60
62
  "@noble/curves": "^1.9.1",
61
63
  "@privy-io/react-auth": "^3.47.0",
62
64
  "@stripe/stripe-js": "^10.0.0",
65
+ "graphql": "^16.14.2",
63
66
  "react": "^19.3.0",
64
67
  "react-dom": "^19.3.0",
65
68
  "typescript": "^5.9.3",
@@ -81,6 +84,7 @@
81
84
  "site/dist",
82
85
  "site/feed.js",
83
86
  "site/worker.js",
87
+ "site/no-model.js",
84
88
  "site/store.js",
85
89
  "dist/ts",
86
90
  "plugin/scripts/fx.mjs"
@@ -92,16 +92,14 @@ const sources = async () => {
92
92
  return chainSources();
93
93
  };
94
94
 
95
- // Every app bound on chain, the scan fangorn-mcp's list-apps runs. From the
96
- // current AppRegistry's first event on Arbitrum Sepolia; --from-block overrides.
95
+ // Every app bound on chain, the scan fangorn-mcp's list-apps runs, on FANGORN_NETWORK
96
+ // (default arbitrumSepolia). From its AppRegistry's deployment; --from-block overrides.
97
97
  async function chainSources() {
98
- // The SDK scans 1,000 blocks per log request by default, which on the public
99
- // RPC takes minutes; fangorn-mcp's install line sets the same window.
100
- process.env.FANGORN_LOG_WINDOW ??= "100000";
101
- const [{ Fangorn, FangornConfig }, { generatePrivateKey }] = await Promise.all([
102
- import("@fangorn-network/sdk"), import("viem/accounts")]);
103
- const fangorn = Fangorn.create({ privateKey: generatePrivateKey(), config: FangornConfig }); // reads only
104
- const { sources } = await sourcesFromChain(fangorn, { fromBlock: BigInt(flag("from-block", "311637349")) });
98
+ const [{ Fangorn }, { generatePrivateKey }, { network }] = await Promise.all([
99
+ import("@fangorn-network/sdk"), import("viem/accounts"), import("../../src/publish/view.js")]);
100
+ const config = await network();
101
+ const fangorn = Fangorn.create({ privateKey: generatePrivateKey(), config }); // reads only
102
+ const { sources } = await sourcesFromChain(fangorn, { fromBlock: BigInt(flag("from-block", String(config.appRegistryFromBlock))) });
105
103
  return sources;
106
104
  }
107
105
 
@@ -0,0 +1 @@
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};
@@ -0,0 +1,31 @@
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};
@@ -0,0 +1,17 @@
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};
@@ -0,0 +1,6 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1 @@
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};
@@ -0,0 +1,103 @@
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};
@@ -0,0 +1 @@
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};