@seams/wallet 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/dist/.build-inputs.sha256 +1 -1
  2. package/dist/esm/SeamsWeb/SeamsWeb.js +2 -2
  3. package/dist/esm/SeamsWeb/operations/recovery/walletRecoveryCodeBackup.js +25 -5
  4. package/dist/esm/SeamsWeb/operations/tempo/executeEvmFamilyTransaction.js +4 -2
  5. package/dist/esm/SeamsWeb/walletIframe/client/router.js +5 -2
  6. package/dist/esm/core/rpcClients/evm/EvmClient.js +11 -9
  7. package/dist/esm/core/signingEngine/flows/signEvmFamily/thresholdAdmission.js +1 -1
  8. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.js +20 -9
  9. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +107 -43
  10. package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +1 -1
  11. package/dist/esm/core/signingEngine/uiConfirm/ui/transaction-receipt.js +36 -6
  12. package/dist/esm/core/ui/messages.js +9 -14
  13. package/dist/esm/plugins/SeamsWeb/walletIframe/sanitization.js +18 -0
  14. package/dist/esm/plugins/plugin-utils.js +5 -2
  15. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +3 -9
  16. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +2 -2
  17. package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +23 -9
  18. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.css +376 -84
  19. package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +87 -167
  20. package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +11 -9
  21. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.css +76 -74
  22. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +23 -22
  23. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +1 -5
  24. package/dist/esm/react/components/AccountMenuButton/icons/MapPinIcon.js +12 -0
  25. package/dist/esm/react/components/AccountMenuButton/index.js +13 -2
  26. package/dist/esm/react/styles/styles.css +452 -162
  27. package/dist/esm/sdk/{ConfirmationDrawer-DCw0m-Iv.js → ConfirmationDrawer-Ck33ZmU-.js} +1 -1
  28. package/dist/esm/sdk/{NonceCoordinator-Dq-FZpBz.js → NonceCoordinator-Do23iTzQ.js} +1 -1
  29. package/dist/esm/sdk/accountLifecycle-CXTlwnAS.js +1 -0
  30. package/dist/esm/sdk/activeWalletSession-BtEHhe99.js +1 -0
  31. package/dist/esm/sdk/adapters-CgJpSAxH.js +2 -0
  32. package/dist/esm/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
  33. package/dist/esm/sdk/challengeDelivery-C88JNwKf.js +1 -0
  34. package/dist/esm/sdk/clientSessionPersistenceState-DFGHXoKK.js +1 -0
  35. package/dist/esm/sdk/collectAuthenticationCredentialForChallengeB64u-CSwy9csE.js +1 -0
  36. package/dist/esm/sdk/{commitQueue-BW7BpYyA.js → commitQueue-BQPOhyGl.js} +1 -1
  37. package/dist/esm/sdk/{display-WtILOPQR.js → display-Dtugjeya.js} +1 -1
  38. package/dist/esm/sdk/ecdsaCapabilityManifest-B3u6J5gn.js +1 -0
  39. package/dist/{public/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js → esm/sdk/ecdsaDerivationClientWasm-D1HzwUgV.js} +1 -1
  40. package/dist/esm/sdk/ecdsaDerivationExport-DrFESeRP.js +1 -0
  41. package/dist/esm/sdk/ecdsaWalletRecords-BmhuJF1y.js +1 -0
  42. package/dist/esm/sdk/emailOtpEcdsaDerivationIdentity-DreNrM6n.js +1 -0
  43. package/dist/esm/sdk/{enrichDisplayModelWithAbi-DSj4NAlY.js → enrichDisplayModelWithAbi-D0o0IL7_.js} +1 -1
  44. package/dist/esm/sdk/{evmCryptoWasm-DeobzyP-.js → evmCryptoWasm-S2gL5ht4.js} +1 -1
  45. package/dist/esm/sdk/{export-viewer-host-DsdzagKK.js → export-viewer-host-C9n-62Pi.js} +1 -1
  46. package/dist/esm/sdk/exportKeypairOperation-Du9HKB8f.js +1 -0
  47. package/dist/esm/sdk/host-DoftJdVQ.js +1 -0
  48. package/dist/esm/sdk/keyMaterialEnvelope-B3v6HLtz.js +1 -0
  49. package/dist/esm/sdk/{lanes-BzU7cv2T.js → lanes-l274pbT5.js} +1 -1
  50. package/dist/esm/sdk/localOnly-CvFSZFUy.js +1 -0
  51. package/dist/esm/sdk/{mountExportPrivateKeySurface-DQzFzhNu.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
  52. package/dist/esm/sdk/mountRecoveryCodeBackupSurface-D3QFgMGE.js +2 -0
  53. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-BK8_DxHs.js +1 -0
  54. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-BgCxoh9S.js +1 -0
  55. package/dist/esm/sdk/{nonceLaneKeys-BzMBVxMU.js → nonceLaneKeys-CR2XEvnk.js} +1 -1
  56. package/dist/esm/sdk/{normalization-Ct9-AY13.js → normalization-Ctkj80dW.js} +1 -1
  57. package/dist/esm/sdk/{operationFingerprint-C4VX-0NI.js → operationFingerprint-DRPONhBD.js} +1 -1
  58. package/dist/esm/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js +1 -0
  59. package/dist/esm/sdk/presignaturePool-DNiA3sgr.js +1 -0
  60. package/dist/esm/sdk/{singletons-CAsc9LvA.js → presignatures-DGLNs29C.js} +1 -1
  61. package/dist/esm/sdk/recovery-entrypoint-CNVjXz6A.js +1 -0
  62. package/dist/esm/sdk/recoveryAuthorization-BplZWc-N.js +1 -0
  63. package/dist/esm/sdk/{registration-DknFwoqn.js → registration-CIxJvbTo.js} +1 -1
  64. package/dist/esm/sdk/registration-CeOmKyCG.js +1 -0
  65. package/dist/esm/sdk/registrationAccounts-BfO6Ztye.js +1 -0
  66. package/dist/esm/sdk/registrationIntent-DW_kKWlx.js +1 -0
  67. package/dist/esm/sdk/{registrationSignerPlan-BHkqlian.js → registrationSignerPlan-B66FjqIp.js} +1 -1
  68. package/dist/esm/sdk/{requireStepUpAuth-CnSCFSOZ.js → requireStepUpAuth-DsNLml1i.js} +1 -1
  69. package/dist/esm/sdk/routerAbNormalSigning-DSAfCcND.js +1 -0
  70. package/dist/esm/sdk/runtime-auth-C0V-5znH.js +1 -0
  71. package/dist/{public/sdk/runtime-device-link-Dn_5hPCq.js → esm/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
  72. package/dist/{public/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js → esm/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
  73. package/dist/esm/sdk/runtime-email-otp-DXuxFOjL.js +1 -0
  74. package/dist/esm/sdk/{runtime-export-Brz53_oi.js → runtime-export-Ba12ChDI.js} +1 -1
  75. package/dist/{public/sdk/runtime-near-Da_xFUXx.js → esm/sdk/runtime-near-DRrdWzmr.js} +1 -1
  76. package/dist/esm/sdk/runtime-preferences-BWyhRaBA.js +1 -0
  77. package/dist/esm/sdk/runtime-recovery-DlJlaZlf.js +1 -0
  78. package/dist/esm/sdk/runtime-recovery-codes-CuqYWqK7.js +1 -0
  79. package/dist/esm/sdk/secp256k1-CYu8ENjP.js +1 -0
  80. package/dist/esm/sdk/sessionObservationRevision-abErAhd6.js +1 -0
  81. package/dist/esm/sdk/shared-B95wnpoD.js +6 -0
  82. package/dist/esm/sdk/signEvmFamily-C4XMiSue.js +1 -0
  83. package/dist/{public/sdk/signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js → esm/sdk/signEvmFamilyWithUiConfirmForTempo-4A3D9nKv.js} +1 -1
  84. package/dist/esm/sdk/{signEvmWithUiConfirm-D6nmJr_L.js → signEvmWithUiConfirm-lZyPfrGe.js} +1 -1
  85. package/dist/esm/sdk/signNear-B_UcqMRf.js +1 -0
  86. package/dist/esm/sdk/{signatureUses-B_nN17i7.js → signatureUses-CY4U-X6V.js} +1 -1
  87. package/dist/esm/sdk/{registrationIds-B1OpqRAt.js → signerSlot-CpyIfl3J.js} +1 -1
  88. package/dist/esm/sdk/signingFlow-Co_QtuHK.js +2 -0
  89. package/dist/esm/sdk/signingQueue-Cj9sCJLj.js +1 -0
  90. package/dist/esm/sdk/thresholdEcdsa-LvkD6z8-.js +1 -0
  91. package/dist/esm/sdk/{trace-CsRMlSh1.js → trace-CWTzEALZ.js} +1 -1
  92. package/dist/esm/sdk/transaction-activity-CpDMkSPm.js +1 -0
  93. package/dist/{public/sdk/transactionState-lB2qpkOm.js → esm/sdk/transactionState-BaFSiA9t.js} +1 -1
  94. package/dist/esm/sdk/tx-confirm-ui.js +186 -71
  95. package/dist/esm/sdk/{types-CQTWmtqu.js → types-BrEW276O.js} +1 -1
  96. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  97. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  98. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  99. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  100. package/dist/esm/sdk/wallet-recovery-BEui57xM.js +1 -0
  101. package/dist/esm/sdk/wallet-ui.css +1 -1
  102. package/dist/esm/sdk/{walletAuthMethodRecord-CWdqdY_s.js → walletAuthMethodRecord-Cv_MYpxt.js} +1 -1
  103. package/dist/esm/sdk/walletCapabilityBindings-CKOK39sP.js +1 -0
  104. package/dist/esm/sdk/walletCustodyEcdsaContinuity-5XsLsT8D.js +1 -0
  105. package/dist/esm/sdk/walletCustodyOperation-BO_tSfGY.js +1 -0
  106. package/dist/esm/sdk/walletDbName-BVZhb4xF.js +1 -0
  107. package/dist/esm/sdk/walletOwnershipGeneration-CQzaodhB.js +1 -0
  108. package/dist/esm/sdk/walletRecoveryAdminProof-CtH8_lph.js +1 -0
  109. package/dist/esm/sdk/walletRecoveryCommit-B_e4k5Pa.js +1 -0
  110. package/dist/esm/sdk/walletRegistrationSetupPrewarm-CQow9u8m.js +1 -0
  111. package/dist/esm/sdk/walletSessionAuthorizationStatus-_KtCVFYW.js +1 -0
  112. package/dist/esm/sdk/walletSessionAuthorizationStore-DYRMCkiT.js +1 -0
  113. package/dist/esm/sdk/warmSessionHydration-CY9ofEGr.js +1 -0
  114. package/dist/{public/sdk/webauthnP256-_ajaNl90.js → esm/sdk/webauthnP256-unqBoZCk.js} +1 -1
  115. package/dist/esm/shared-ts/src/device-linking/deviceManagement.js +2 -3
  116. package/dist/esm/shared-ts/src/utils/evmRpcResults.js +5 -3
  117. package/dist/esm/shared-ts/src/utils/routerAbEcdsaDerivation.js +2 -1
  118. package/dist/public/headers.manifest.json +1 -1
  119. package/dist/public/sdk/{ConfirmationDrawer-DCw0m-Iv.js → ConfirmationDrawer-Ck33ZmU-.js} +1 -1
  120. package/dist/public/sdk/{NonceCoordinator-Dq-FZpBz.js → NonceCoordinator-Do23iTzQ.js} +1 -1
  121. package/dist/public/sdk/accountLifecycle-CXTlwnAS.js +1 -0
  122. package/dist/public/sdk/activeWalletSession-BtEHhe99.js +1 -0
  123. package/dist/public/sdk/adapters-CgJpSAxH.js +2 -0
  124. package/dist/public/sdk/appearance-token-vars-BA3KQyEE.js +2 -0
  125. package/dist/public/sdk/challengeDelivery-C88JNwKf.js +1 -0
  126. package/dist/public/sdk/clientSessionPersistenceState-DFGHXoKK.js +1 -0
  127. package/dist/public/sdk/collectAuthenticationCredentialForChallengeB64u-CSwy9csE.js +1 -0
  128. package/dist/public/sdk/{commitQueue-BW7BpYyA.js → commitQueue-BQPOhyGl.js} +1 -1
  129. package/dist/public/sdk/{display-WtILOPQR.js → display-Dtugjeya.js} +1 -1
  130. package/dist/public/sdk/ecdsaCapabilityManifest-B3u6J5gn.js +1 -0
  131. package/dist/{esm/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js → public/sdk/ecdsaDerivationClientWasm-D1HzwUgV.js} +1 -1
  132. package/dist/public/sdk/ecdsaDerivationExport-DrFESeRP.js +1 -0
  133. package/dist/public/sdk/ecdsaWalletRecords-BmhuJF1y.js +1 -0
  134. package/dist/public/sdk/emailOtpEcdsaDerivationIdentity-DreNrM6n.js +1 -0
  135. package/dist/public/sdk/{enrichDisplayModelWithAbi-DSj4NAlY.js → enrichDisplayModelWithAbi-D0o0IL7_.js} +1 -1
  136. package/dist/public/sdk/{evmCryptoWasm-DeobzyP-.js → evmCryptoWasm-S2gL5ht4.js} +1 -1
  137. package/dist/public/sdk/{export-viewer-host-DsdzagKK.js → export-viewer-host-C9n-62Pi.js} +1 -1
  138. package/dist/public/sdk/exportKeypairOperation-Du9HKB8f.js +1 -0
  139. package/dist/public/sdk/host-DoftJdVQ.js +1 -0
  140. package/dist/public/sdk/keyMaterialEnvelope-B3v6HLtz.js +1 -0
  141. package/dist/public/sdk/{lanes-BzU7cv2T.js → lanes-l274pbT5.js} +1 -1
  142. package/dist/public/sdk/localOnly-CvFSZFUy.js +1 -0
  143. package/dist/public/sdk/{mountExportPrivateKeySurface-DQzFzhNu.js → mountExportPrivateKeySurface-DdJHWwqY.js} +1 -1
  144. package/dist/public/sdk/mountRecoveryCodeBackupSurface-D3QFgMGE.js +2 -0
  145. package/dist/public/sdk/nearEd25519YaoMaterialActivation-BK8_DxHs.js +1 -0
  146. package/dist/public/sdk/nearEd25519YaoSigningPreparation-BgCxoh9S.js +1 -0
  147. package/dist/public/sdk/{nonceLaneKeys-BzMBVxMU.js → nonceLaneKeys-CR2XEvnk.js} +1 -1
  148. package/dist/public/sdk/{normalization-Ct9-AY13.js → normalization-Ctkj80dW.js} +1 -1
  149. package/dist/public/sdk/{operationFingerprint-C4VX-0NI.js → operationFingerprint-DRPONhBD.js} +1 -1
  150. package/dist/public/sdk/pendingWalletRecoveryCodeBackup-LbstFwcY.js +1 -0
  151. package/dist/public/sdk/presignaturePool-DNiA3sgr.js +1 -0
  152. package/dist/public/sdk/{singletons-CAsc9LvA.js → presignatures-DGLNs29C.js} +1 -1
  153. package/dist/public/sdk/recovery-entrypoint-CNVjXz6A.js +1 -0
  154. package/dist/public/sdk/recoveryAuthorization-BplZWc-N.js +1 -0
  155. package/dist/public/sdk/{registration-DknFwoqn.js → registration-CIxJvbTo.js} +1 -1
  156. package/dist/public/sdk/registration-CeOmKyCG.js +1 -0
  157. package/dist/public/sdk/registrationAccounts-BfO6Ztye.js +1 -0
  158. package/dist/public/sdk/registrationIntent-DW_kKWlx.js +1 -0
  159. package/dist/public/sdk/{registrationSignerPlan-BHkqlian.js → registrationSignerPlan-B66FjqIp.js} +1 -1
  160. package/dist/public/sdk/{requireStepUpAuth-CnSCFSOZ.js → requireStepUpAuth-DsNLml1i.js} +1 -1
  161. package/dist/public/sdk/routerAbNormalSigning-DSAfCcND.js +1 -0
  162. package/dist/public/sdk/runtime-auth-C0V-5znH.js +1 -0
  163. package/dist/{esm/sdk/runtime-device-link-Dn_5hPCq.js → public/sdk/runtime-device-link-B1jpHQSF.js} +1 -1
  164. package/dist/{esm/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js → public/sdk/runtime-ecdsa-tempo-CDSZ3pxS.js} +1 -1
  165. package/dist/public/sdk/runtime-email-otp-DXuxFOjL.js +1 -0
  166. package/dist/public/sdk/{runtime-export-Brz53_oi.js → runtime-export-Ba12ChDI.js} +1 -1
  167. package/dist/{esm/sdk/runtime-near-Da_xFUXx.js → public/sdk/runtime-near-DRrdWzmr.js} +1 -1
  168. package/dist/public/sdk/runtime-preferences-BWyhRaBA.js +1 -0
  169. package/dist/public/sdk/runtime-recovery-DlJlaZlf.js +1 -0
  170. package/dist/public/sdk/runtime-recovery-codes-CuqYWqK7.js +1 -0
  171. package/dist/public/sdk/secp256k1-CYu8ENjP.js +1 -0
  172. package/dist/public/sdk/sessionObservationRevision-abErAhd6.js +1 -0
  173. package/dist/public/sdk/shared-B95wnpoD.js +6 -0
  174. package/dist/public/sdk/signEvmFamily-C4XMiSue.js +1 -0
  175. package/dist/{esm/sdk/signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js → public/sdk/signEvmFamilyWithUiConfirmForTempo-4A3D9nKv.js} +1 -1
  176. package/dist/public/sdk/{signEvmWithUiConfirm-D6nmJr_L.js → signEvmWithUiConfirm-lZyPfrGe.js} +1 -1
  177. package/dist/public/sdk/signNear-B_UcqMRf.js +1 -0
  178. package/dist/public/sdk/{signatureUses-B_nN17i7.js → signatureUses-CY4U-X6V.js} +1 -1
  179. package/dist/public/sdk/{registrationIds-B1OpqRAt.js → signerSlot-CpyIfl3J.js} +1 -1
  180. package/dist/public/sdk/signingFlow-Co_QtuHK.js +2 -0
  181. package/dist/public/sdk/signingQueue-Cj9sCJLj.js +1 -0
  182. package/dist/public/sdk/thresholdEcdsa-LvkD6z8-.js +1 -0
  183. package/dist/public/sdk/{trace-CsRMlSh1.js → trace-CWTzEALZ.js} +1 -1
  184. package/dist/public/sdk/transaction-activity-CpDMkSPm.js +1 -0
  185. package/dist/{esm/sdk/transactionState-lB2qpkOm.js → public/sdk/transactionState-BaFSiA9t.js} +1 -1
  186. package/dist/public/sdk/tx-confirm-ui.js +186 -71
  187. package/dist/public/sdk/{types-CQTWmtqu.js → types-BrEW276O.js} +1 -1
  188. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  189. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  190. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  191. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  192. package/dist/public/sdk/wallet-recovery-BEui57xM.js +1 -0
  193. package/dist/public/sdk/wallet-ui.css +1 -1
  194. package/dist/public/sdk/{walletAuthMethodRecord-CWdqdY_s.js → walletAuthMethodRecord-Cv_MYpxt.js} +1 -1
  195. package/dist/public/sdk/walletCapabilityBindings-CKOK39sP.js +1 -0
  196. package/dist/public/sdk/walletCustodyEcdsaContinuity-5XsLsT8D.js +1 -0
  197. package/dist/public/sdk/walletCustodyOperation-BO_tSfGY.js +1 -0
  198. package/dist/public/sdk/walletDbName-BVZhb4xF.js +1 -0
  199. package/dist/public/sdk/walletOwnershipGeneration-CQzaodhB.js +1 -0
  200. package/dist/public/sdk/walletRecoveryAdminProof-CtH8_lph.js +1 -0
  201. package/dist/public/sdk/walletRecoveryCommit-B_e4k5Pa.js +1 -0
  202. package/dist/public/sdk/walletRegistrationSetupPrewarm-CQow9u8m.js +1 -0
  203. package/dist/public/sdk/walletSessionAuthorizationStatus-_KtCVFYW.js +1 -0
  204. package/dist/public/sdk/walletSessionAuthorizationStore-DYRMCkiT.js +1 -0
  205. package/dist/public/sdk/warmSessionHydration-CY9ofEGr.js +1 -0
  206. package/dist/{esm/sdk/webauthnP256-_ajaNl90.js → public/sdk/webauthnP256-unqBoZCk.js} +1 -1
  207. package/dist/public/sdk/workers/email-otp.worker.js +6 -1
  208. package/dist/public/wallet-assets.manifest.json +253 -276
  209. package/dist/public/wallet-service/index.html +4 -4
  210. package/dist/types/shared-ts/src/authorization/walletCustodyOperation.d.ts +1 -1
  211. package/dist/types/shared-ts/src/device-linking/contracts.d.ts +1 -7
  212. package/dist/types/shared-ts/src/passkey-custody/ceremonyCommitPayload.d.ts +5 -0
  213. package/dist/types/shared-ts/src/utils/evmRpcResults.d.ts +3 -3
  214. package/dist/types/shared-ts/src/utils/routerAbEcdsaDerivation.d.ts +1 -1
  215. package/dist/types/wallet/src/SeamsWeb/operations/recovery/walletRecoveryAdminProof.d.ts +46 -0
  216. package/dist/types/wallet/src/SeamsWeb/operations/recovery/walletRecoveryCodeBackup.d.ts +4 -1
  217. package/dist/types/wallet/src/SeamsWeb/operations/recovery/walletRecoveryRotation.d.ts +11 -7
  218. package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +9 -1
  219. package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +4 -3
  220. package/dist/types/wallet/src/SeamsWeb/signingSurface/ports.d.ts +6 -4
  221. package/dist/types/wallet/src/SeamsWeb/signingSurface/types.d.ts +2 -2
  222. package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +2 -6
  223. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +1 -0
  224. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/controller.d.ts +2 -0
  225. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestWalletMove.d.ts +1 -1
  226. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +5 -1
  227. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/recoveryAuthorization.d.ts +6 -0
  228. package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/pendingWalletRecoveryCodeBackup.d.ts +14 -3
  229. package/dist/types/wallet/src/core/rpcClients/relayer/walletRecoveryRotate.d.ts +8 -0
  230. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.d.ts +1 -0
  231. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-activity.d.ts +2 -2
  232. package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/transaction-receipt.d.ts +25 -6
  233. package/dist/types/wallet/src/core/signingEngine/walletCustody/walletRecoveryRotation.d.ts +22 -3
  234. package/dist/types/wallet/src/core/signingEngine/workerManager/workerTypes.d.ts +1 -0
  235. package/dist/types/wallet/src/core/signingEngine/workerManager/workers/email-otp/unlock.d.ts +1 -0
  236. package/dist/types/wallet/src/core/types/sdkSentEvents.d.ts +8 -2
  237. package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
  238. package/dist/types/wallet/src/plugins/plugin-utils.d.ts +1 -1
  239. package/dist/types/wallet/src/react/components/AccountMenuButton/icons/MapPinIcon.d.ts +2 -0
  240. package/dist/workers/email-otp.worker.js +6 -1
  241. package/package.json +1 -1
  242. package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +0 -77
  243. package/dist/esm/sdk/accountLifecycle-fLNUdjct.js +0 -1
  244. package/dist/esm/sdk/activeWalletSession-BpbnpU9s.js +0 -1
  245. package/dist/esm/sdk/adapters-BNmcyf9K.js +0 -2
  246. package/dist/esm/sdk/appearance-token-vars-DxBm_cKA.js +0 -2
  247. package/dist/esm/sdk/challengeDelivery-CG2J5Qxs.js +0 -1
  248. package/dist/esm/sdk/clientSessionPersistenceState-BgO4P6CZ.js +0 -1
  249. package/dist/esm/sdk/digestEncoding-aC4dSf_x.js +0 -1
  250. package/dist/esm/sdk/ecdsaCapabilityManifest-DRc423SV.js +0 -1
  251. package/dist/esm/sdk/ecdsaDerivationExport-DX89rq_u.js +0 -1
  252. package/dist/esm/sdk/ecdsaWalletRecords-CxxUt3fS.js +0 -1
  253. package/dist/esm/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js +0 -1
  254. package/dist/esm/sdk/exportKeypairOperation-BwW_E4Lt.js +0 -1
  255. package/dist/esm/sdk/host-DMR4KDy9.js +0 -1
  256. package/dist/esm/sdk/localOnly-DO191vDh.js +0 -1
  257. package/dist/esm/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +0 -2
  258. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js +0 -1
  259. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js +0 -1
  260. package/dist/esm/sdk/passkey-custody-Ba-NQ_4C.js +0 -1
  261. package/dist/esm/sdk/pendingWalletRecoveryCodeBackup-DOeIn_Qj.js +0 -1
  262. package/dist/esm/sdk/presignaturePool-BHoxnbOA.js +0 -1
  263. package/dist/esm/sdk/presignatures-K-yuzOE0.js +0 -1
  264. package/dist/esm/sdk/primitives-CTmDwMNc.js +0 -1
  265. package/dist/esm/sdk/recovery-entrypoint-DWghFZrZ.js +0 -1
  266. package/dist/esm/sdk/registration-sQndIWRF.js +0 -1
  267. package/dist/esm/sdk/registrationAccounts-CD1u1ZqZ.js +0 -1
  268. package/dist/esm/sdk/registrationIntent-D4YDjf2U.js +0 -1
  269. package/dist/esm/sdk/routerAbNormalSigning-BV1t27aB.js +0 -1
  270. package/dist/esm/sdk/runtime-auth-BxG-J-BB.js +0 -1
  271. package/dist/esm/sdk/runtime-email-otp-CPqTCH8Q.js +0 -1
  272. package/dist/esm/sdk/runtime-preferences-riUZGaTs.js +0 -1
  273. package/dist/esm/sdk/runtime-recovery-CTj4nDAM.js +0 -1
  274. package/dist/esm/sdk/runtime-recovery-codes-D8T9LQ7-.js +0 -1
  275. package/dist/esm/sdk/secp256k1-wOOHtPcK.js +0 -1
  276. package/dist/esm/sdk/sessionObservationRevision-C7v-wN8_.js +0 -1
  277. package/dist/esm/sdk/shared-hx7KVyeq.js +0 -6
  278. package/dist/esm/sdk/signEvmFamily-DT34Vtpa.js +0 -1
  279. package/dist/esm/sdk/signNear-B000QxBd.js +0 -1
  280. package/dist/esm/sdk/signerSlot-FJAGOhmg.js +0 -1
  281. package/dist/esm/sdk/signingFlow-gl85GOW4.js +0 -2
  282. package/dist/esm/sdk/signingQueue-gW7wmOuL.js +0 -1
  283. package/dist/esm/sdk/thresholdEcdsa-Ci7yz395.js +0 -1
  284. package/dist/esm/sdk/transaction-activity-C0nCSW6c.js +0 -1
  285. package/dist/esm/sdk/wallet-recovery-DFaS3geI.js +0 -1
  286. package/dist/esm/sdk/walletAuthority-BY3kyKQ-.js +0 -1
  287. package/dist/esm/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js +0 -1
  288. package/dist/esm/sdk/walletDbName-BxWApBQF.js +0 -1
  289. package/dist/esm/sdk/walletOwnershipGeneration-DSGfjuV2.js +0 -1
  290. package/dist/esm/sdk/walletRecoveryCommit-DQA_wveK.js +0 -1
  291. package/dist/esm/sdk/walletRecoveryRotate-zvQThn37.js +0 -1
  292. package/dist/esm/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +0 -1
  293. package/dist/esm/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js +0 -1
  294. package/dist/esm/sdk/walletSessionAuthorizationStore-DnUMtkev.js +0 -1
  295. package/dist/esm/sdk/warmSessionHydration-D8Vdro9n.js +0 -1
  296. package/dist/public/sdk/accountLifecycle-fLNUdjct.js +0 -1
  297. package/dist/public/sdk/activeWalletSession-BpbnpU9s.js +0 -1
  298. package/dist/public/sdk/adapters-BNmcyf9K.js +0 -2
  299. package/dist/public/sdk/appearance-token-vars-DxBm_cKA.js +0 -2
  300. package/dist/public/sdk/challengeDelivery-CG2J5Qxs.js +0 -1
  301. package/dist/public/sdk/clientSessionPersistenceState-BgO4P6CZ.js +0 -1
  302. package/dist/public/sdk/digestEncoding-aC4dSf_x.js +0 -1
  303. package/dist/public/sdk/ecdsaCapabilityManifest-DRc423SV.js +0 -1
  304. package/dist/public/sdk/ecdsaDerivationExport-DX89rq_u.js +0 -1
  305. package/dist/public/sdk/ecdsaWalletRecords-CxxUt3fS.js +0 -1
  306. package/dist/public/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js +0 -1
  307. package/dist/public/sdk/exportKeypairOperation-BwW_E4Lt.js +0 -1
  308. package/dist/public/sdk/host-DMR4KDy9.js +0 -1
  309. package/dist/public/sdk/localOnly-DO191vDh.js +0 -1
  310. package/dist/public/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +0 -2
  311. package/dist/public/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js +0 -1
  312. package/dist/public/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js +0 -1
  313. package/dist/public/sdk/passkey-custody-Ba-NQ_4C.js +0 -1
  314. package/dist/public/sdk/pendingWalletRecoveryCodeBackup-DOeIn_Qj.js +0 -1
  315. package/dist/public/sdk/presignaturePool-BHoxnbOA.js +0 -1
  316. package/dist/public/sdk/presignatures-K-yuzOE0.js +0 -1
  317. package/dist/public/sdk/primitives-CTmDwMNc.js +0 -1
  318. package/dist/public/sdk/recovery-entrypoint-DWghFZrZ.js +0 -1
  319. package/dist/public/sdk/registration-sQndIWRF.js +0 -1
  320. package/dist/public/sdk/registrationAccounts-CD1u1ZqZ.js +0 -1
  321. package/dist/public/sdk/registrationIntent-D4YDjf2U.js +0 -1
  322. package/dist/public/sdk/routerAbNormalSigning-BV1t27aB.js +0 -1
  323. package/dist/public/sdk/runtime-auth-BxG-J-BB.js +0 -1
  324. package/dist/public/sdk/runtime-email-otp-CPqTCH8Q.js +0 -1
  325. package/dist/public/sdk/runtime-preferences-riUZGaTs.js +0 -1
  326. package/dist/public/sdk/runtime-recovery-CTj4nDAM.js +0 -1
  327. package/dist/public/sdk/runtime-recovery-codes-D8T9LQ7-.js +0 -1
  328. package/dist/public/sdk/secp256k1-wOOHtPcK.js +0 -1
  329. package/dist/public/sdk/sessionObservationRevision-C7v-wN8_.js +0 -1
  330. package/dist/public/sdk/shared-hx7KVyeq.js +0 -6
  331. package/dist/public/sdk/signEvmFamily-DT34Vtpa.js +0 -1
  332. package/dist/public/sdk/signNear-B000QxBd.js +0 -1
  333. package/dist/public/sdk/signerSlot-FJAGOhmg.js +0 -1
  334. package/dist/public/sdk/signingFlow-gl85GOW4.js +0 -2
  335. package/dist/public/sdk/signingQueue-gW7wmOuL.js +0 -1
  336. package/dist/public/sdk/thresholdEcdsa-Ci7yz395.js +0 -1
  337. package/dist/public/sdk/transaction-activity-C0nCSW6c.js +0 -1
  338. package/dist/public/sdk/wallet-recovery-DFaS3geI.js +0 -1
  339. package/dist/public/sdk/walletAuthority-BY3kyKQ-.js +0 -1
  340. package/dist/public/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js +0 -1
  341. package/dist/public/sdk/walletDbName-BxWApBQF.js +0 -1
  342. package/dist/public/sdk/walletOwnershipGeneration-DSGfjuV2.js +0 -1
  343. package/dist/public/sdk/walletRecoveryCommit-DQA_wveK.js +0 -1
  344. package/dist/public/sdk/walletRecoveryRotate-zvQThn37.js +0 -1
  345. package/dist/public/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +0 -1
  346. package/dist/public/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js +0 -1
  347. package/dist/public/sdk/walletSessionAuthorizationStore-DnUMtkev.js +0 -1
  348. package/dist/public/sdk/warmSessionHydration-D8Vdro9n.js +0 -1
  349. package/dist/types/wallet/src/react/components/AccountMenuButton/SegmentedControl.d.ts +0 -25
  350. /package/dist/esm/sdk/{accountIds-Cpvlkvbe.js → accountIds-BzZs7YoX.js} +0 -0
  351. /package/dist/esm/sdk/{appearance-4DmzKUWf.js → appearance-ZGVLwA4N.js} +0 -0
  352. /package/dist/esm/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-BB_sU4uA.js} +0 -0
  353. /package/dist/esm/sdk/{authorizationAdmission-Dd23mTx7.js → authorizationAdmission-D7nx2n4d.js} +0 -0
  354. /package/dist/esm/sdk/{browser-n3IVr7qu.js → browser-DkCRXFkk.js} +0 -0
  355. /package/dist/esm/sdk/{bytes-DZRW2UDg.js → bytes-Cv07P0Pu.js} +0 -0
  356. /package/dist/esm/sdk/{canonicalPrimitives-BMP5yILS.js → canonicalPrimitives-D_1HyEuJ.js} +0 -0
  357. /package/dist/esm/sdk/{canonicalSignerErrorCode-Cz48v4oy.js → canonicalSignerErrorCode-CqHi6ji6.js} +0 -0
  358. /package/dist/esm/sdk/{capabilityKinds-D0Yrp9uf.js → capabilityKinds-CqHVzVsJ.js} +0 -0
  359. /package/dist/esm/sdk/{ecdsaChainTarget-DkOrgv4y.js → ecdsaChainTarget-svSlzhze.js} +0 -0
  360. /package/dist/esm/sdk/{errors-ADOZT8oV.js → errors-CI1xdN0d.js} +0 -0
  361. /package/dist/esm/sdk/{executeWorkerOperation-DKCRRq5E.js → executeWorkerOperation-S6glYwAs.js} +0 -0
  362. /package/dist/esm/sdk/{helpers-DS0bksx9.js → helpers-BXezXx19.js} +0 -0
  363. /package/dist/esm/sdk/{intentDigest-Rh5Mg8X7.js → intentDigest--FZ63NBy.js} +0 -0
  364. /package/dist/esm/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-B5zMY6lE.js} +0 -0
  365. /package/dist/esm/sdk/{keccak-mS0Mejjx.js → keccak-CaPOCznk.js} +0 -0
  366. /package/dist/esm/sdk/{normalization-C6fQN6mW.js → normalization-CpLZcL2f.js} +0 -0
  367. /package/dist/esm/sdk/{prfCache-BAFh1skJ.js → prfCache-D25ZCg5n.js} +0 -0
  368. /package/dist/esm/sdk/{profileAccountProjection-BNVJLOt2.js → profileAccountProjection-C1z9sKHa.js} +0 -0
  369. /package/dist/esm/sdk/{promptText-CnyrLxgj.js → promptText-D2f5Rg0h.js} +0 -0
  370. /package/dist/esm/sdk/{registrationAuthMethodInput-B23_HRil.js → registrationAuthMethodInput-DKz6Mgg4.js} +0 -0
  371. /package/dist/esm/sdk/{sdkSentEvents-DujYAPEM.js → sdkSentEvents-BzMVO1AR.js} +0 -0
  372. /package/dist/esm/sdk/{signer-worker-DlK58rEA.js → signer-worker-Bh_5foqX.js} +0 -0
  373. /package/dist/esm/sdk/{signerDomain-BFqRQ0Jl.js → signerDomain-YEHkugWX.js} +0 -0
  374. /package/dist/esm/sdk/{surface-measurement-reporter-BJhfiPw6.js → surface-measurement-reporter-F-fVB7d3.js} +0 -0
  375. /package/dist/esm/sdk/{types-Buoe6179.js → types-BNUuaUtl.js} +0 -0
  376. /package/dist/esm/sdk/{walletIframeIdentity-Cz82I_Uh.js → walletIframeIdentity-DJ0KOBHg.js} +0 -0
  377. /package/dist/esm/sdk/{walletSessionAuthorizationProjection-DuU6w0FP.js → walletSessionAuthorizationProjection-UdGeS6x3.js} +0 -0
  378. /package/dist/esm/sdk/{walletSessionFailure-C6TAQTZn.js → walletSessionFailure-Ct412mDZ.js} +0 -0
  379. /package/dist/esm/sdk/{webauthnPromptCoordinator-9bVeHcTZ.js → webauthnPromptCoordinator-CBkTiMP0.js} +0 -0
  380. /package/dist/public/sdk/{accountIds-Cpvlkvbe.js → accountIds-BzZs7YoX.js} +0 -0
  381. /package/dist/public/sdk/{appearance-4DmzKUWf.js → appearance-ZGVLwA4N.js} +0 -0
  382. /package/dist/public/sdk/{authenticatorOptions-2_XK8aXv.js → authenticatorOptions-BB_sU4uA.js} +0 -0
  383. /package/dist/public/sdk/{authorizationAdmission-Dd23mTx7.js → authorizationAdmission-D7nx2n4d.js} +0 -0
  384. /package/dist/public/sdk/{browser-n3IVr7qu.js → browser-DkCRXFkk.js} +0 -0
  385. /package/dist/public/sdk/{bytes-DZRW2UDg.js → bytes-Cv07P0Pu.js} +0 -0
  386. /package/dist/public/sdk/{canonicalPrimitives-BMP5yILS.js → canonicalPrimitives-D_1HyEuJ.js} +0 -0
  387. /package/dist/public/sdk/{canonicalSignerErrorCode-Cz48v4oy.js → canonicalSignerErrorCode-CqHi6ji6.js} +0 -0
  388. /package/dist/public/sdk/{capabilityKinds-D0Yrp9uf.js → capabilityKinds-CqHVzVsJ.js} +0 -0
  389. /package/dist/public/sdk/{ecdsaChainTarget-DkOrgv4y.js → ecdsaChainTarget-svSlzhze.js} +0 -0
  390. /package/dist/public/sdk/{errors-ADOZT8oV.js → errors-CI1xdN0d.js} +0 -0
  391. /package/dist/public/sdk/{executeWorkerOperation-DKCRRq5E.js → executeWorkerOperation-S6glYwAs.js} +0 -0
  392. /package/dist/public/sdk/{helpers-DS0bksx9.js → helpers-BXezXx19.js} +0 -0
  393. /package/dist/public/sdk/{intentDigest-Rh5Mg8X7.js → intentDigest--FZ63NBy.js} +0 -0
  394. /package/dist/public/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-B5zMY6lE.js} +0 -0
  395. /package/dist/public/sdk/{keccak-mS0Mejjx.js → keccak-CaPOCznk.js} +0 -0
  396. /package/dist/public/sdk/{normalization-C6fQN6mW.js → normalization-CpLZcL2f.js} +0 -0
  397. /package/dist/public/sdk/{prfCache-BAFh1skJ.js → prfCache-D25ZCg5n.js} +0 -0
  398. /package/dist/public/sdk/{profileAccountProjection-BNVJLOt2.js → profileAccountProjection-C1z9sKHa.js} +0 -0
  399. /package/dist/public/sdk/{promptText-CnyrLxgj.js → promptText-D2f5Rg0h.js} +0 -0
  400. /package/dist/public/sdk/{registrationAuthMethodInput-B23_HRil.js → registrationAuthMethodInput-DKz6Mgg4.js} +0 -0
  401. /package/dist/public/sdk/{sdkSentEvents-DujYAPEM.js → sdkSentEvents-BzMVO1AR.js} +0 -0
  402. /package/dist/public/sdk/{signer-worker-DlK58rEA.js → signer-worker-Bh_5foqX.js} +0 -0
  403. /package/dist/public/sdk/{signerDomain-BFqRQ0Jl.js → signerDomain-YEHkugWX.js} +0 -0
  404. /package/dist/public/sdk/{surface-measurement-reporter-BJhfiPw6.js → surface-measurement-reporter-F-fVB7d3.js} +0 -0
  405. /package/dist/public/sdk/{types-Buoe6179.js → types-BNUuaUtl.js} +0 -0
  406. /package/dist/public/sdk/{walletIframeIdentity-Cz82I_Uh.js → walletIframeIdentity-DJ0KOBHg.js} +0 -0
  407. /package/dist/public/sdk/{walletSessionAuthorizationProjection-DuU6w0FP.js → walletSessionAuthorizationProjection-UdGeS6x3.js} +0 -0
  408. /package/dist/public/sdk/{walletSessionFailure-C6TAQTZn.js → walletSessionFailure-Ct412mDZ.js} +0 -0
  409. /package/dist/public/sdk/{webauthnPromptCoordinator-9bVeHcTZ.js → webauthnPromptCoordinator-CBkTiMP0.js} +0 -0
@@ -1 +1 @@
1
- ef30321cd5b565616660d36d432cfc1cbad35e5433fc5a146f3d33cf9d2d6dda
1
+ 457a3a44df7bb82ea046daa003a51f06837f317a1ab7bbe92293931ea7e74773
@@ -176,10 +176,10 @@ var SeamsWeb = class {
176
176
  return this.events.subscribe(deliverNearProvisioningStateChanged.bind(null, listener));
177
177
  }
178
178
  async getCodeStatusDomain(args) {
179
- return await (await this.walletIframe.requireRouter()).getCodeStatus({ walletId: args.walletId });
179
+ return await (await this.walletIframe.requireRouter()).getCodeStatus(args);
180
180
  }
181
181
  async confirmBackupDomain(args) {
182
- return await (await this.walletIframe.requireRouter()).confirmBackup({ walletId: args.walletId });
182
+ return await (await this.walletIframe.requireRouter()).confirmBackup(args);
183
183
  }
184
184
  async requestWalletCustodyEmailOtpChallengeDomain(args) {
185
185
  return await requestWalletCustodyEmailOtpChallenge({
@@ -38,11 +38,22 @@ async function showRecoveryCodeExperience(experience, measurementBinding = { kin
38
38
  return;
39
39
  case "recovery_codes":
40
40
  if (detail.acknowledged) {
41
- settle({ kind: "wallet_recovery_codes_backed_up_v1" });
41
+ if (experience.kind === "account_menu") {
42
+ if (detail.request.continuation !== "pending_backup_must_finish") {
43
+ settle(/* @__PURE__ */ new Error("Displayed recovery codes have no committed issuance"));
44
+ return;
45
+ }
46
+ settle({
47
+ kind: "account_menu_backed_up",
48
+ issuedAtMs: detail.request.issuedAtMs
49
+ });
50
+ return;
51
+ }
52
+ settle({ kind: "registration_backed_up" });
42
53
  return;
43
54
  }
44
55
  if (experience.kind === "direct_backup" && experience.request.continuation === "registration_may_defer") {
45
- settle({ kind: "wallet_recovery_code_backup_deferred_v1" });
56
+ settle({ kind: "deferred" });
46
57
  return;
47
58
  }
48
59
  settle(new Error(CANCELLED_MESSAGE));
@@ -73,16 +84,25 @@ async function showRecoveryCodeExperience(experience, measurementBinding = { kin
73
84
  });
74
85
  }
75
86
  async function showWalletRecoveryCodeBackupUi(request, measurementBinding = { kind: "disabled" }) {
76
- return await showRecoveryCodeExperience({
87
+ switch ((await showRecoveryCodeExperience({
77
88
  kind: "direct_backup",
78
89
  request
79
- }, measurementBinding);
90
+ }, measurementBinding)).kind) {
91
+ case "registration_backed_up": return { kind: "wallet_recovery_codes_backed_up_v1" };
92
+ case "deferred": return { kind: "wallet_recovery_code_backup_deferred_v1" };
93
+ case "account_menu_backed_up": throw new Error("Registration backup returned an account-menu issuance");
94
+ }
80
95
  }
81
96
  async function showWalletRecoveryCodesUi(request, measurementBinding = { kind: "disabled" }, options = {}) {
82
- return await showRecoveryCodeExperience({
97
+ const result = await showRecoveryCodeExperience({
83
98
  kind: "account_menu",
84
99
  ...request
85
100
  }, measurementBinding, options);
101
+ if (result.kind !== "account_menu_backed_up") throw new Error("Account-menu backup did not acknowledge committed recovery codes");
102
+ return {
103
+ kind: "wallet_recovery_codes_backed_up_v1",
104
+ issuedAtMs: result.issuedAtMs
105
+ };
86
106
  }
87
107
  function postRecoveryMeasurement(dialog, postMeasurement, measurement) {
88
108
  if (measurement.kind !== "measured_v1") throw new Error("Recovery codes require a request surface measurement");
@@ -1,6 +1,7 @@
1
1
  import { chainFamilyFromNetwork } from "../../../core/config/chains.js";
2
2
  import { thresholdEcdsaChainTargetFromConfig, thresholdEcdsaChainTargetKey, toWalletId } from "../../../core/signingEngine/interfaces/ecdsaChainTarget.js";
3
3
  import { SigningEventPhase, createSigningFlowEvent } from "../../../core/types/sdkSentEvents.js";
4
+ import { parseRpcHexQuantity } from "../../../shared-ts/src/utils/evmRpcResults.js";
4
5
  import { createEvmClient } from "../../../core/rpcClients/evm/EvmClient.js";
5
6
  //#region src/SeamsWeb/operations/tempo/executeEvmFamilyTransaction.ts
6
7
  /**
@@ -427,8 +428,8 @@ async function executeEvmFamilyTransactionLifecycle(args) {
427
428
  abortController.abort(createLifecycleTimeoutError("Transaction finalization watchdog timed out"));
428
429
  }
429
430
  });
430
- const status = normalizeToken(receipt.status);
431
- if (status && status !== "0x1" && status !== "0x01") {
431
+ const status = parseRpcHexQuantity(receipt.status, "receipt.status");
432
+ if (status === 0n) {
432
433
  await args.lifecycle.reportFinalized({
433
434
  walletSession: args.input.walletSession,
434
435
  signedResult,
@@ -442,6 +443,7 @@ async function executeEvmFamilyTransactionLifecycle(args) {
442
443
  reverted.txHash = txHash;
443
444
  throw reverted;
444
445
  }
446
+ if (status !== 1n) throw new Error(`Unexpected transaction receipt status ${receipt.status}`);
445
447
  const payloadExpectation = ensurePayloadExpectation(args.input);
446
448
  const payloadVerification = await verifyFinalizedPayload({
447
449
  rpcUrl,
@@ -41,6 +41,7 @@ function requestSurfaceKindForMessage(type, payload) {
41
41
  case "PM_ADD_PASSKEY":
42
42
  case "PM_ROTATE_WALLET_RECOVERY_CODES": return "registration";
43
43
  case "PM_ADD_EMAIL_OTP": return "email_otp_enrollment";
44
+ case "PM_GET_WALLET_RECOVERY_CODE_STATUS":
44
45
  case "PM_ACKNOWLEDGE_WALLET_RECOVERY_CODE_BACKUP": return "recovery_codes";
45
46
  case "PM_SIGN_TX_WITH_ACTIONS":
46
47
  case "PM_SIGN_AND_SEND_TX":
@@ -2047,10 +2048,11 @@ var WalletIframeRouter = class {
2047
2048
  } : res.result;
2048
2049
  }
2049
2050
  async getCodeStatus(payload) {
2051
+ await this.ensureConfigured();
2050
2052
  return (await this.post({
2051
2053
  type: "PM_GET_WALLET_RECOVERY_CODE_STATUS",
2052
2054
  payload
2053
- })).result;
2055
+ }, { timeout: "interactive" })).result;
2054
2056
  }
2055
2057
  async confirmBackup(payload) {
2056
2058
  await this.ensureConfigured();
@@ -2066,10 +2068,11 @@ var WalletIframeRouter = class {
2066
2068
  })).result;
2067
2069
  }
2068
2070
  async rotateCodes(payload) {
2071
+ await this.ensureConfigured();
2069
2072
  return (await this.post({
2070
2073
  type: "PM_ROTATE_WALLET_RECOVERY_CODES",
2071
2074
  payload
2072
- })).result;
2075
+ }, { timeoutMs: WALLET_IFRAME_REGISTRATION_TIMEOUT_MS })).result;
2073
2076
  }
2074
2077
  async checkLoginStatus() {
2075
2078
  return {
@@ -175,11 +175,15 @@ function createEvmClient(args) {
175
175
  }
176
176
  return payload.result;
177
177
  };
178
- const getTransactionReceipt = async (receiptArgs) => decodeEvmTransactionReceipt(await request({
179
- method: "eth_getTransactionReceipt",
180
- params: [receiptArgs.txHash],
181
- ...receiptArgs.timeoutMs != null ? { timeoutMs: receiptArgs.timeoutMs } : {}
182
- }));
178
+ const getTransactionReceipt = async (receiptArgs) => {
179
+ const receipt = decodeEvmTransactionReceipt(await request({
180
+ method: "eth_getTransactionReceipt",
181
+ params: [receiptArgs.txHash],
182
+ ...receiptArgs.timeoutMs != null ? { timeoutMs: receiptArgs.timeoutMs } : {}
183
+ }));
184
+ if (receipt && receipt.transactionHash.toLowerCase() !== receiptArgs.txHash.toLowerCase()) throw new Error("Receipt transactionHash does not match the requested transaction");
185
+ return receipt;
186
+ };
183
187
  const getBlockByNumber = async (blockArgs) => decodeEvmBlockHeader(await request({
184
188
  method: "eth_getBlockByNumber",
185
189
  params: [blockArgs.blockTag, false],
@@ -230,10 +234,8 @@ function createEvmClient(args) {
230
234
  } catch (error) {
231
235
  lastRpcError = error instanceof Error ? error.message : String(error);
232
236
  }
233
- if (receipt && typeof receipt === "object" && typeof receipt.blockNumber === "string") {
234
- const receiptBlockHex = toHexQuantityOrNull(receipt.blockNumber);
235
- if (!receiptBlockHex) throw new Error("Receipt missing valid blockNumber");
236
- const receiptBlockNumber = parseRpcHexQuantity(receiptBlockHex, "receipt.blockNumber");
237
+ if (receipt) {
238
+ const receiptBlockNumber = parseRpcHexQuantity(receipt.blockNumber, "receipt.blockNumber");
237
239
  if (confirmations <= 1) return receipt;
238
240
  const remainingMs = Math.max(1, deadline - Date.now());
239
241
  const latestBlockHex = toHexQuantityOrNull((await getBlockByNumber({
@@ -73,7 +73,7 @@ function operationStepUpProof(args) {
73
73
  signature: credential.response.signature,
74
74
  userHandle: credential.response.userHandle ?? null
75
75
  },
76
- clientExtensionResults: credential.clientExtensionResults ?? null
76
+ clientExtensionResults: null
77
77
  }
78
78
  };
79
79
  }
@@ -52,14 +52,7 @@ function statusLabel(status) {
52
52
  }
53
53
  }
54
54
  function canViewPendingRecoveryCodes(loadState) {
55
- if (loadState.kind !== "loaded") return true;
56
- switch (loadState.status.kind) {
57
- case "ready": return loadState.status.pendingLocalBackup;
58
- case "unauthorized":
59
- case "transport_failed": return true;
60
- case "no_recovery_set": return false;
61
- default: return assertNever(loadState.status);
62
- }
55
+ return loadState.kind === "loaded" && loadState.status.kind === "ready" && loadState.status.pendingLocalBackup;
63
56
  }
64
57
  function recoveryStatusFailureMessage(loadState) {
65
58
  if (loadState.kind === "error") return loadState.message;
@@ -211,6 +204,14 @@ var RecoveryCodeBackupSurface = class extends Component {
211
204
  const experience = this.props.experience;
212
205
  const current = this.state.viewState;
213
206
  if (experience.kind !== "account_menu" || current.kind !== "summary") return;
207
+ if (current.loadState.kind !== "loaded" || current.loadState.status.kind !== "ready") {
208
+ this.setState({ viewState: {
209
+ ...current,
210
+ actionError: "Verify recovery-code status before opening saved codes."
211
+ } });
212
+ return;
213
+ }
214
+ const issuedAtMs = current.loadState.status.issuedAtMs;
214
215
  const generation = this.loadGeneration;
215
216
  this.setState({ viewState: {
216
217
  ...current,
@@ -227,6 +228,13 @@ var RecoveryCodeBackupSurface = class extends Component {
227
228
  } });
228
229
  return;
229
230
  }
231
+ if (request.continuation !== "pending_backup_must_finish" || request.issuedAtMs !== issuedAtMs) {
232
+ this.setState({ viewState: {
233
+ ...current,
234
+ actionError: "These saved codes belong to a different recovery set. Check status again."
235
+ } });
236
+ return;
237
+ }
230
238
  this.setState({ viewState: {
231
239
  kind: "recovery_codes",
232
240
  request
@@ -243,9 +251,12 @@ var RecoveryCodeBackupSurface = class extends Component {
243
251
  this.props.onClose({ kind: "dismissed" });
244
252
  };
245
253
  closeRecoveryCodes = () => {
254
+ const viewState = this.state.viewState;
255
+ if (viewState.kind !== "recovery_codes") return;
246
256
  this.props.onClose({
247
257
  kind: "recovery_codes",
248
- acknowledged: this.state.acknowledged
258
+ acknowledged: this.state.acknowledged,
259
+ request: viewState.request
249
260
  });
250
261
  };
251
262
  onAcknowledgementChange = (event) => {
@@ -1,10 +1,10 @@
1
1
  import { walletDisplayText, walletText } from "../../../../ui/messages.js";
2
- import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
2
+ import { WalletLocaleContext, WalletText, useWalletLocale } from "./WalletLocale.js";
3
3
  import { announceClampedSurfaceResize } from "../confirm-surface-resize.js";
4
4
  import { confirmationDocumentStyles } from "./confirmation-styles.js";
5
5
  import { ReviewDisclosure } from "./ReviewDisclosure.js";
6
6
  import { CopyReviewValue, ReviewAmount, ReviewIcon, ReviewMiddleTruncated, WalletReceiptFooter, reviewNetwork, reviewRecipient } from "./TransactionReview.js";
7
- import { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsPending } from "../transaction-receipt.js";
7
+ import { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsComplete, receiptIsPending, receiptTitle } from "../transaction-receipt.js";
8
8
  import { Component, createRef } from "preact";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
10
10
  //#region src/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.tsx
@@ -23,12 +23,12 @@ var TransactionReceipt = class extends Component {
23
23
  this.props.receipt.onView("expanded");
24
24
  };
25
25
  close = () => {
26
- if (receiptIsPending(this.props.receipt.state)) this.minimize();
26
+ if (receiptIsPending(this.props.receipt)) this.minimize();
27
27
  else this.props.receipt.onDismiss();
28
28
  };
29
29
  componentDidUpdate(previous) {
30
30
  const { receipt } = this.props;
31
- if (receipt.view === "expanded" && previous.receipt.view === "expanded" && receipt.state.kind === "confirmed" && previous.receipt.state.kind !== "confirmed") this.revealExplorerLink();
31
+ if (receipt.view === "expanded" && previous.receipt.view === "expanded" && receipt.subject === "transaction" && receipt.state.kind === "confirmed" && previous.receipt.state.kind !== "confirmed") this.revealExplorerLink();
32
32
  }
33
33
  componentWillUnmount() {
34
34
  this.releaseExplorerRow();
@@ -85,12 +85,13 @@ var TransactionReceipt = class extends Component {
85
85
  }
86
86
  render() {
87
87
  const { receipt, data } = this.props;
88
- const heading = receiptHeading(receipt.state);
89
- const complete = receipt.state.kind === "confirmed" || receipt.state.kind === "signed";
90
- const pending = receiptIsPending(receipt.state);
91
- const completedStages = receiptCompletedStages(receipt.state);
88
+ const heading = receiptHeading(receipt);
89
+ const complete = receiptIsComplete(receipt);
90
+ const pending = receiptIsPending(receipt);
91
+ const completedStages = receiptCompletedStages(receipt);
92
92
  const recipient = reviewRecipient(data.model);
93
- const explorerHref = receipt.state.kind === "confirmed" && receipt.state.hash ? transactionExplorerHref(data.model, this.props.explorers, receipt.state.hash) : null;
93
+ const transaction = receipt.subject === "transaction" ? receipt.state : null;
94
+ const explorerHref = transaction?.kind === "confirmed" && transaction.hash ? transactionExplorerHref(data.model, this.props.explorers, transaction.hash) : null;
94
95
  if (receipt.view === "toast") return /* @__PURE__ */ jsxs("div", {
95
96
  class: "seams-transaction-toast",
96
97
  "data-completed-stages": completedStages,
@@ -141,7 +142,7 @@ var TransactionReceipt = class extends Component {
141
142
  children: [
142
143
  /* @__PURE__ */ jsxs("div", {
143
144
  class: "seams-review-toolbar",
144
- children: [/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction receipt" }) }), /* @__PURE__ */ jsx("button", {
145
+ children: [/* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptTitle(receipt) }) }), /* @__PURE__ */ jsx("button", {
145
146
  type: "button",
146
147
  "aria-label": walletText(this.context, "Minimize transaction"),
147
148
  onClick: this.minimize,
@@ -157,7 +158,7 @@ var TransactionReceipt = class extends Component {
157
158
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h2", {
158
159
  role: "status",
159
160
  children: /* @__PURE__ */ jsx(WalletText, { copy: heading })
160
- }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptDescription(receipt.state) }) })] })]
161
+ }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(WalletText, { copy: receiptDescription(receipt) }) })] })]
161
162
  }),
162
163
  /* @__PURE__ */ jsx(ReviewAmount, {
163
164
  model: data.model,
@@ -183,39 +184,13 @@ var TransactionReceipt = class extends Component {
183
184
  data.model.totals.feeSymbol
184
185
  ] })] })
185
186
  }),
186
- /* @__PURE__ */ jsxs("div", {
187
- class: "seams-receipt-steps",
188
- "aria-label": walletText(this.context, "Transaction progress"),
189
- children: [
190
- /* @__PURE__ */ jsx(ReceiptStep, {
191
- stage: "signing",
192
- label: walletText(this.context, "Signed"),
193
- activeLabel: "Signing",
194
- complete: completedStages >= 1,
195
- active: receipt.state.kind === "signing"
196
- }),
197
- /* @__PURE__ */ jsx(ReceiptStep, {
198
- stage: "broadcast",
199
- label: walletText(this.context, "Broadcast"),
200
- activeLabel: "Broadcasting",
201
- complete: completedStages >= 2,
202
- active: receipt.state.kind === "broadcasting"
203
- }),
204
- /* @__PURE__ */ jsx(ReceiptStep, {
205
- stage: "confirming",
206
- label: walletDisplayText(this.context, receipt.state.kind === "reverted" ? "Reverted" : "Confirmed"),
207
- activeLabel: "Confirming",
208
- complete: completedStages === 3,
209
- active: receipt.state.kind === "submitted"
210
- })
211
- ]
212
- }),
187
+ transaction ? /* @__PURE__ */ jsx(ReceiptSteps, { state: transaction }) : receipt.subject === "message" && /* @__PURE__ */ jsx(MessageReceiptSteps, { state: receipt.state }),
213
188
  /* @__PURE__ */ jsx(ReviewDisclosure, {
214
189
  label: walletText(this.context, "Receipt details"),
215
190
  children: /* @__PURE__ */ jsxs("dl", {
216
191
  class: "seams-review-fields",
217
192
  children: [
218
- data.model?.signerAccount && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "From" }) }), /* @__PURE__ */ jsx("dd", {
193
+ transaction && data.model?.signerAccount && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "From" }) }), /* @__PURE__ */ jsx("dd", {
219
194
  class: "seams-review-recipient",
220
195
  children: /* @__PURE__ */ jsx(CopyReviewValue, {
221
196
  value: data.model.signerAccount,
@@ -231,10 +206,11 @@ var TransactionReceipt = class extends Component {
231
206
  label: walletDisplayText(this.context, `Copy recipient address ${recipient}`)
232
207
  })
233
208
  })] }),
234
- receipt.state.hash && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction" }) }), /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx(ReviewMiddleTruncated, {
235
- value: receipt.state.hash,
209
+ transaction?.hash && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Transaction" }) }), /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx(ReviewMiddleTruncated, {
210
+ value: transaction.hash,
236
211
  class: "seams-review-hash"
237
- }), /* @__PURE__ */ jsx(CopyReviewValue, { value: receipt.state.hash })] })] }),
212
+ }), /* @__PURE__ */ jsx(CopyReviewValue, { value: transaction.hash })] })] }),
213
+ receipt.subject === "message" && /* @__PURE__ */ jsx(MessageReceiptFields, { model: data.model }),
238
214
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { message: "Status" }) }), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(WalletText, { copy: heading }) })] })
239
215
  ]
240
216
  })
@@ -243,7 +219,7 @@ var TransactionReceipt = class extends Component {
243
219
  type: "button",
244
220
  class: "seams-receipt-primary",
245
221
  onClick: this.close,
246
- children: receiptIsPending(receipt.state) ? /* @__PURE__ */ jsx(WalletText, { message: "Continue in background" }) : /* @__PURE__ */ jsx(WalletText, { message: "Done" })
222
+ children: pending ? /* @__PURE__ */ jsx(WalletText, { message: "Continue in background" }) : /* @__PURE__ */ jsx(WalletText, { message: "Done" })
247
223
  }),
248
224
  explorerHref && /* @__PURE__ */ jsx("div", {
249
225
  id: this.explorerRowId,
@@ -289,6 +265,94 @@ function transactionExplorerHref(model, explorers, hash) {
289
265
  function assertNeverDisplayChain(chain) {
290
266
  throw new Error(`Unexpected display chain: ${String(chain)}`);
291
267
  }
268
+ function ReceiptSteps({ state }) {
269
+ const locale = useWalletLocale();
270
+ const completedStages = receiptCompletedStages({
271
+ subject: "transaction",
272
+ state
273
+ });
274
+ return /* @__PURE__ */ jsxs("div", {
275
+ class: "seams-receipt-steps",
276
+ "aria-label": walletText(locale, "Transaction progress"),
277
+ children: [
278
+ /* @__PURE__ */ jsx(ReceiptStep, {
279
+ stage: "signing",
280
+ label: walletText(locale, "Signed"),
281
+ activeLabel: "Signing",
282
+ complete: completedStages >= 1,
283
+ active: state.kind === "signing"
284
+ }),
285
+ /* @__PURE__ */ jsx(ReceiptStep, {
286
+ stage: "broadcast",
287
+ label: walletText(locale, "Broadcast"),
288
+ activeLabel: "Broadcasting",
289
+ complete: completedStages >= 2,
290
+ active: state.kind === "broadcasting"
291
+ }),
292
+ /* @__PURE__ */ jsx(ReceiptStep, {
293
+ stage: "confirming",
294
+ label: walletDisplayText(locale, state.kind === "reverted" ? "Reverted" : "Confirmed"),
295
+ activeLabel: "Confirming",
296
+ complete: completedStages === 3,
297
+ active: state.kind === "submitted"
298
+ })
299
+ ]
300
+ });
301
+ }
302
+ /**
303
+ * A message signature has one stage. It keeps the transaction's three tracks, so
304
+ * the receipt has the same height, and fills them all once signed. Only the first
305
+ * track has a label: there is no broadcast or confirmation.
306
+ */
307
+ function MessageReceiptSteps({ state }) {
308
+ const locale = useWalletLocale();
309
+ const complete = state.kind === "signed";
310
+ const active = state.kind === "signing";
311
+ return /* @__PURE__ */ jsxs("div", {
312
+ class: "seams-receipt-steps",
313
+ "aria-label": walletText(locale, "Transaction progress"),
314
+ children: [
315
+ /* @__PURE__ */ jsx(ReceiptStep, {
316
+ stage: "signing",
317
+ label: walletText(locale, "Signed"),
318
+ activeLabel: "Signing",
319
+ complete,
320
+ active
321
+ }),
322
+ /* @__PURE__ */ jsx(ReceiptStep, {
323
+ stage: "signed",
324
+ label: "",
325
+ activeLabel: "",
326
+ complete,
327
+ active: false
328
+ }),
329
+ /* @__PURE__ */ jsx(ReceiptStep, {
330
+ stage: "signed",
331
+ label: "",
332
+ activeLabel: "",
333
+ complete,
334
+ active: false
335
+ })
336
+ ]
337
+ });
338
+ }
339
+ /** The signed message's own fields: signer, recipient and message text. */
340
+ function MessageReceiptFields({ model }) {
341
+ const locale = useWalletLocale();
342
+ const operation = model?.operations.length === 1 ? model.operations[0] : null;
343
+ if (operation?.kind !== "near.message") return null;
344
+ return /* @__PURE__ */ jsx(Fragment$1, { children: operation.fields?.map((field) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(WalletText, { copy: field.label }) }), field.renderAs === "file-content" ? /* @__PURE__ */ jsxs("dd", { children: [/* @__PURE__ */ jsx("span", {
345
+ class: "seams-receipt-message",
346
+ children: field.value
347
+ }), /* @__PURE__ */ jsx(CopyReviewValue, { value: field.copyValue ?? field.value })] }) : /* @__PURE__ */ jsx("dd", {
348
+ class: "seams-review-recipient",
349
+ children: /* @__PURE__ */ jsx(CopyReviewValue, {
350
+ value: field.copyValue ?? field.value,
351
+ address: true,
352
+ label: walletDisplayText(locale, `Copy ${field.label.toLowerCase()} address ${field.value}`)
353
+ })
354
+ })] }, field.label)) });
355
+ }
292
356
  function ReceiptStep(props) {
293
357
  const state = props.complete ? "complete" : props.active ? "active" : "waiting";
294
358
  return /* @__PURE__ */ jsxs("span", {
@@ -191,7 +191,7 @@ var MountedConfirmationSurface = class {
191
191
  cancel = () => {
192
192
  if (this.state.kind !== "mounted") return;
193
193
  if (this.receipt) {
194
- if (receiptIsPending(this.receipt.state)) this.receipt.onView("toast");
194
+ if (receiptIsPending(this.receipt)) this.receipt.onView("toast");
195
195
  else this.receipt.onDismiss();
196
196
  return;
197
197
  }
@@ -1,8 +1,15 @@
1
1
  //#region src/core/signingEngine/uiConfirm/ui/transaction-receipt.ts
2
- function receiptIsPending(state) {
3
- return state.kind === "signing" || state.kind === "broadcasting" || state.kind === "submitted";
2
+ function receiptIsPending(receipt) {
3
+ const { kind } = receipt.state;
4
+ return kind === "signing" || kind === "broadcasting" || kind === "submitted";
4
5
  }
5
- function receiptCompletedStages(state) {
6
+ function receiptIsComplete(receipt) {
7
+ return receipt.state.kind === "confirmed" || receipt.state.kind === "signed";
8
+ }
9
+ /** A message signature has one stage, so its toast fills at once when signed. */
10
+ function receiptCompletedStages(receipt) {
11
+ if (receipt.subject === "message") return receipt.state.kind === "signed" ? 3 : 0;
12
+ const { state } = receipt;
6
13
  switch (state.kind) {
7
14
  case "signing": return 0;
8
15
  case "signed":
@@ -15,7 +22,12 @@ function receiptCompletedStages(state) {
15
22
  default: return assertNever(state);
16
23
  }
17
24
  }
18
- function receiptHeading(state) {
25
+ function receiptTitle(receipt) {
26
+ return receipt.subject === "message" ? "Message signature" : "Transaction receipt";
27
+ }
28
+ function receiptHeading(receipt) {
29
+ if (receipt.subject === "message") return messageHeading(receipt.state);
30
+ const { state } = receipt;
19
31
  switch (state.kind) {
20
32
  case "signing": return "Signing transaction";
21
33
  case "signed": return "Signature ready";
@@ -28,7 +40,9 @@ function receiptHeading(state) {
28
40
  default: return assertNever(state);
29
41
  }
30
42
  }
31
- function receiptDescription(state) {
43
+ function receiptDescription(receipt) {
44
+ if (receipt.subject === "message") return messageDescription(receipt.state);
45
+ const { state } = receipt;
32
46
  switch (state.kind) {
33
47
  case "signing": return "Preparing your signed transaction.";
34
48
  case "signed": return "Signature created, ready to broadcast.";
@@ -41,10 +55,26 @@ function receiptDescription(state) {
41
55
  default: return assertNever(state);
42
56
  }
43
57
  }
58
+ function messageHeading(state) {
59
+ switch (state.kind) {
60
+ case "signing": return "Signing message";
61
+ case "signed": return "Message signed";
62
+ case "failed": return "Signature failed";
63
+ default: return assertNever(state);
64
+ }
65
+ }
66
+ function messageDescription(state) {
67
+ switch (state.kind) {
68
+ case "signing": return "Preparing your message signature.";
69
+ case "signed": return "Signed off-chain. Nothing was sent to the network.";
70
+ case "failed": return state.message;
71
+ default: return assertNever(state);
72
+ }
73
+ }
44
74
  function assertNever(value) {
45
75
  throw new Error(`Unexpected transaction receipt state: ${String(value)}`);
46
76
  }
47
77
  //#endregion
48
- export { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsPending };
78
+ export { receiptCompletedStages, receiptDescription, receiptHeading, receiptIsComplete, receiptIsPending, receiptTitle };
49
79
 
50
80
  //# sourceMappingURL=transaction-receipt.js.map
@@ -113,27 +113,18 @@ const walletMessages = [
113
113
  ["Yes, remove", "削除する"],
114
114
  ["Removing…", "削除中…"],
115
115
  ["Review appearance", "確認画面の表示"],
116
+ ["Review before signing", "署名前に確認"],
117
+ ["Show the transaction details, then click Continue to sign.", "トランザクションの詳細を表示し、「続ける」をクリックして署名します。"],
118
+ ["Passkey authentication starts as soon as the details appear.", "詳細が表示されると同時にパスキー認証を開始します。"],
119
+ ["On phones, in Safari and for Email OTP sign-in, the wallet always waits for Continue.", "スマートフォン、Safari、メールOTPでのサインインでは、常に「続ける」のクリックを待ちます。"],
116
120
  ["Choose where transaction details appear before signing.", "署名前にトランザクションの詳細を表示する場所を選択してください。"],
117
- ["Confirmation step", "確認操作"],
118
- ["Choose Modal or Drawer to configure the confirmation step.", "確認操作を設定するには、モーダルまたはドロワーを選択してください。"],
119
- ["Choose whether to click Continue before authentication starts.", "認証開始前に「続ける」をクリックするか選択してください。"],
120
- ["Confirmer UI", "確認画面"],
121
- ["Confirmation Options", "確認オプション"],
122
- ["skip click", "クリックを省略"],
123
- ["require click", "クリックが必要"],
124
121
  ["none", "表示なし"],
125
122
  ["modal", "モーダル"],
126
123
  ["drawer", "ドロワー"],
127
- ["No review", "確認画面なし"],
128
- ["Start authentication without showing a review panel.", "確認画面を表示せずに認証を開始します。"],
129
124
  ["Modal", "モーダル"],
130
125
  ["Review the transaction in a centered dialog.", "画面中央のダイアログでトランザクションを確認します。"],
131
126
  ["Drawer", "ドロワー"],
132
127
  ["Review the transaction in a slide-out panel.", "スライド式パネルでトランザクションを確認します。"],
133
- ["Start automatically", "自動で開始"],
134
- ["Begin authentication as soon as the review opens.", "確認画面を開くと同時に認証を開始します。"],
135
- ["Click to continue", "クリックして続ける"],
136
- ["Review the details, then click Continue to start authentication.", "詳細を確認し、「続ける」をクリックして認証を開始します。"],
137
128
  ["Unable to refresh your wallet. Try again.", "ウォレットを更新できません。もう一度お試しください。"],
138
129
  ["Key export is unavailable for this wallet.", "このウォレットでは鍵をエクスポートできません。"],
139
130
  ["NEAR signer provisioning is still in progress. Try again shortly.", "NEAR 署名機能を準備中です。しばらくしてからもう一度お試しください。"],
@@ -176,7 +167,6 @@ const walletMessages = [
176
167
  ["Reveal with passkey", "パスキーで表示"],
177
168
  ["View on explorer", "エクスプローラーで表示"],
178
169
  ["This wallet", "このウォレット"],
179
- ["Addresses", "アドレス"],
180
170
  ["Security & devices", "セキュリティとデバイス"],
181
171
  ["Close wallet settings", "ウォレット設定を閉じる"],
182
172
  ["Wallet account", "ウォレットアカウント"],
@@ -213,6 +203,11 @@ const walletMessages = [
213
203
  ["Confirmation unavailable", "承認状態を取得できません"],
214
204
  ["Preparing your signed transaction.", "署名済みトランザクションを準備中です。"],
215
205
  ["Signature created, ready to broadcast.", "署名を作成しました。送信する準備ができました。"],
206
+ ["Signing message", "メッセージに署名中"],
207
+ ["Message signed", "メッセージに署名しました"],
208
+ ["Signature failed", "署名に失敗しました"],
209
+ ["Preparing your message signature.", "メッセージへの署名を準備中です。"],
210
+ ["Signed off-chain. Nothing was sent to the network.", "オフチェーンで署名しました。ネットワークには何も送信していません。"],
216
211
  ["Submitting your signed transaction to the network.", "署名済みトランザクションをネットワークに送信中です。"],
217
212
  ["Submitted to the network. Waiting for the receipt.", "ネットワークに送信しました。レシートを待機中です。"],
218
213
  ["The network confirmed your transaction.", "ネットワークがトランザクションを承認しました。"],
@@ -0,0 +1,18 @@
1
+ //#region src/SeamsWeb/walletIframe/sanitization.ts
2
+ /**
3
+ * Escapes HTML attribute values to prevent injection
4
+ *
5
+ * Converts special characters to HTML entities:
6
+ * - & -> &amp;
7
+ * - " -> &quot;
8
+ * - ' -> &#x27;
9
+ * - < -> &lt;
10
+ * - > -> &gt;
11
+ */
12
+ function escapeHtmlAttribute(value) {
13
+ return value.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
14
+ }
15
+ //#endregion
16
+ export { escapeHtmlAttribute };
17
+
18
+ //# sourceMappingURL=sanitization.js.map
@@ -1,3 +1,4 @@
1
+ import { escapeHtmlAttribute } from "./SeamsWeb/walletIframe/sanitization.js";
1
2
  import { normalizeWalletHostVariant, walletHostScriptFileForVariant } from "./core/browser/walletIframe/hostVariant.js";
2
3
  //#region src/plugins/plugin-utils.ts
3
4
  function withAssetVersion(url, assetVersion) {
@@ -5,17 +6,19 @@ function withAssetVersion(url, assetVersion) {
5
6
  if (!version) return url;
6
7
  return `${url}${url.includes("?") ? "&" : "?"}v=${encodeURIComponent(version)}`;
7
8
  }
8
- function buildWalletServiceHtml(sdkBasePath = "/sdk", assetVersion, walletHostVariant = "runtime") {
9
+ function buildWalletServiceHtml(sdkBasePath = "/sdk", assetVersion, walletHostVariant = "runtime", approvedRelayerOrigins = []) {
9
10
  const walletUiCss = withAssetVersion(`${sdkBasePath}/wallet-ui.css`, assetVersion);
10
11
  const walletShimsJs = withAssetVersion(`${sdkBasePath}/wallet-shims.js`, assetVersion);
11
12
  const walletHostScript = withAssetVersion(`${sdkBasePath}/${walletHostScriptFileForVariant(normalizeWalletHostVariant(walletHostVariant))}`, assetVersion);
13
+ let relayerPolicy = "";
14
+ for (const origin of approvedRelayerOrigins) relayerPolicy += ` <meta name="seams-wallet-relayer-origin" content="${escapeHtmlAttribute(origin)}" />\n`;
12
15
  return `<!doctype html>
13
16
  <html lang="en">
14
17
  <head>
15
18
  <meta charset="utf-8" />
16
19
  <meta name="viewport" content="width=device-width, initial-scale=1" />
17
20
  <title>Web3Authn Wallet Service</title>
18
- <!-- Surface styles are external so strict CSP can keep style-src 'self' -->
21
+ ${relayerPolicy} <!-- Surface styles are external so strict CSP can keep style-src 'self' -->
19
22
  <link rel="stylesheet" href="${walletUiCss}" />
20
23
  <!-- Minimal shims some ESM bundles expect (externalized to enable strict CSP) -->
21
24
  <script src="${walletShimsJs}"><\/script>