@seams/wallet 0.27.0 → 0.29.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 (389) hide show
  1. package/README.md +29 -4
  2. package/dist/.build-inputs.sha256 +1 -1
  3. package/dist/esm/SeamsWeb/publicApi/createPublicApi.js +11 -0
  4. package/dist/esm/SeamsWeb/publicApi/near.js +3 -0
  5. package/dist/esm/SeamsWeb/publicApi/ownerNearOperation.js +175 -0
  6. package/dist/esm/SeamsWeb/walletIframe/client/nearCommands.js +4 -0
  7. package/dist/esm/SeamsWeb/walletIframe/client/ownerNearOperation.js +67 -0
  8. package/dist/esm/SeamsWeb/walletIframe/client/progress/on-events-progress-bus.js +27 -17
  9. package/dist/esm/SeamsWeb/walletIframe/client/router.js +63 -2
  10. package/dist/esm/SeamsWeb/walletIframe/client/sessionCommands.js +20 -0
  11. package/dist/esm/SeamsWeb/walletIframe/host/walletMutationGuard.js +6 -0
  12. package/dist/esm/SeamsWeb/walletIframe/shared/exactSessionState.js +42 -5
  13. package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +1 -1
  14. package/dist/esm/SeamsWeb/walletIframe/shared/ownerNearOperation.js +152 -0
  15. package/dist/esm/core/accountData/near/accountProjection.js +1 -1
  16. package/dist/esm/core/authMethods/plugins.js +8 -2
  17. package/dist/esm/core/indexedDB/seamsWalletDB/repositories.js +4 -3
  18. package/dist/esm/core/rpcClients/relayer/walletRegistration.js +1 -1
  19. package/dist/esm/core/signingEngine/flows/registration/accountLifecycle.js +1 -1
  20. package/dist/esm/core/signingEngine/flows/shared/signingConfirmation.js +1 -1
  21. package/dist/esm/core/signingEngine/flows/signEvmFamily/signEvmFamily.js +1 -1
  22. package/dist/esm/core/signingEngine/flows/signEvmFamily/signingFlow.js +1 -1
  23. package/dist/esm/core/signingEngine/flows/signNear/shared/ed25519YaoNormalSigning.js +2 -2
  24. package/dist/esm/core/signingEngine/flows/signNear/signDelegate.js +2 -2
  25. package/dist/esm/core/signingEngine/flows/signNear/signNear.js +3 -8
  26. package/dist/esm/core/signingEngine/flows/signNear/signNep413.js +1 -1
  27. package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +3 -4
  28. package/dist/esm/core/signingEngine/session/identity/exactSigningLaneIdentity.js +1 -1
  29. package/dist/esm/core/ui/messages.js +5 -0
  30. package/dist/esm/index.js +3 -2
  31. package/dist/esm/react/boundWallet.js +24 -0
  32. package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +35 -22
  33. package/dist/esm/react/components/AccountMenuButton/AccountSettingsDialog.js +157 -0
  34. package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +13 -1
  35. package/dist/esm/react/components/AccountMenuButton/ExternalWalletSettings.js +46 -0
  36. package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +14 -2
  37. package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +1 -1
  38. package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +154 -5
  39. package/dist/esm/react/components/AccountMenuButton/index.js +7 -3
  40. package/dist/esm/react/context/reactLoginStateBuilders.js +20 -0
  41. package/dist/esm/react/context/useLoginStateRefresher.js +1 -0
  42. package/dist/esm/react/hooks/useAccountInput.js +1 -1
  43. package/dist/esm/react/hooks/useOwnerNearOperation.js +10 -0
  44. package/dist/esm/react/index.js +3 -2
  45. package/dist/esm/react/styles/styles.css +154 -5
  46. package/dist/esm/sdk/{ConfirmationDrawer-AZruQmhP.js → ConfirmationDrawer-BRnd5SEf.js} +1 -1
  47. package/dist/esm/sdk/NonceCoordinator-CNXYrOoy.js +1 -0
  48. package/dist/{public/sdk/SeamsWordmark-DwvPx2UA.js → esm/sdk/SeamsWordmark-CeEi2RlU.js} +1 -1
  49. package/dist/esm/sdk/accountLifecycle-B5a9SCM7.js +1 -0
  50. package/dist/esm/sdk/{adapters-d9yh1bdC.js → adapters-B2k8y0MB.js} +1 -1
  51. package/dist/esm/sdk/appearance-token-vars-DkF3EBbF.js +1 -0
  52. package/dist/esm/sdk/authorization-gVWwKwav.js +1 -0
  53. package/dist/esm/sdk/clientSessionPersistenceState-BxpITYM_.js +1 -0
  54. package/dist/esm/sdk/{collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js → collectAuthenticationCredentialForChallengeB64u-BoFVpdRS.js} +1 -1
  55. package/dist/esm/sdk/{commitQueue-CYruPlkm.js → commitQueue-C1wkey4q.js} +1 -1
  56. package/dist/esm/sdk/configBuilder-DpChXfDO.js +1 -0
  57. package/dist/esm/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
  58. package/dist/esm/sdk/confirm-ui-Dx6c4-Rk.js +2 -0
  59. package/dist/esm/sdk/{device-linking-DiCNt3iA.js → device-linking-_o3_fgiG.js} +1 -1
  60. package/dist/esm/sdk/{deviceLinkApproval-CfEiotVt.js → deviceLinkApproval-CObsEWBa.js} +1 -1
  61. package/dist/esm/sdk/{display-D0EPmU4w.js → display-CUWg48tD.js} +1 -1
  62. package/dist/{public/sdk/ecdsaCapabilityManifest-DAJEVjlP.js → esm/sdk/ecdsaCapabilityManifest--1Ztngfx.js} +1 -1
  63. package/dist/{public/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js → esm/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js} +1 -1
  64. package/dist/esm/sdk/ecdsaDerivationExport-BUUUGc6o.js +1 -0
  65. package/dist/esm/sdk/{ecdsaWalletRecords-WLyq414E.js → ecdsaWalletRecords-CKaXfsVu.js} +1 -1
  66. package/dist/esm/sdk/ed25519OperationFingerprint-Dev4P6Og.js +1 -0
  67. package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js → esm/sdk/emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js} +1 -1
  68. package/dist/esm/sdk/{enrichDisplayModelWithAbi-O6Mw4i2E.js → enrichDisplayModelWithAbi-JeAcpa7r.js} +1 -1
  69. package/dist/esm/sdk/{evmCryptoWasm-BUPb4hBH.js → evmCryptoWasm-CeH6Qeaa.js} +1 -1
  70. package/dist/esm/sdk/{export-viewer-host-BtrKVXxu.js → export-viewer-host-O0OV1Oou.js} +1 -1
  71. package/dist/esm/sdk/exportKeypairOperation-DkqY9Bpf.js +1 -0
  72. package/dist/esm/sdk/host-BeE2dIU4.js +1 -0
  73. package/dist/{public/sdk/icons-BlMXolHv.js → esm/sdk/icons-pSZJ5Xrm.js} +1 -1
  74. package/dist/esm/sdk/indexedDB-CA4tGqkr.js +1 -0
  75. package/dist/esm/sdk/{intentDigest-HvRsBQ1z.js → intentDigest-gM3r4SVX.js} +1 -1
  76. package/dist/esm/sdk/{lanes-BU-fGqY4.js → lanes-vBKm6yBJ.js} +1 -1
  77. package/dist/esm/sdk/{localOnly-BATWJj78.js → localOnly-U_MucUAe.js} +1 -1
  78. package/dist/{public/sdk/mountExportPrivateKeySurface-CyHU8bVc.js → esm/sdk/mountExportPrivateKeySurface-C2-fnvP6.js} +1 -1
  79. package/dist/{public/sdk/mountRecoveryCodeBackupSurface-C7aglQxf.js → esm/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js} +1 -1
  80. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-CnbgQfZc.js +1 -0
  81. package/dist/esm/sdk/{nonceLaneKeys-BF_UpvIy.js → nonceLaneKeys-DtBpxubF.js} +1 -1
  82. package/dist/esm/sdk/{normalization-Df9fZWJC.js → normalization-DmfGvZ_3.js} +1 -1
  83. package/dist/esm/sdk/ownerNearOperation-DjNDxW3_.js +1 -0
  84. package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js → esm/sdk/pendingWalletRecoveryCodeBackup-DXFrQmO5.js} +1 -1
  85. package/dist/esm/sdk/{presignaturePool-BbvqRWYw.js → presignaturePool-Dq4RhzXn.js} +1 -1
  86. package/dist/{public/sdk/recovery-entrypoint-DJbMDC_m.js → esm/sdk/recovery-entrypoint-s9OoKBcl.js} +1 -1
  87. package/dist/esm/sdk/registration-CTtTocyo.js +1 -0
  88. package/dist/esm/sdk/{registration-HSwOHZOo.js → registration-D3p7muCc.js} +1 -1
  89. package/dist/esm/sdk/{registrationAccounts-4r74gX1l.js → registrationAccounts-Bso0ntMs.js} +1 -1
  90. package/dist/{public/sdk/registrationIntent-Do1tD1V7.js → esm/sdk/registrationIntent-C1-Kyx_-.js} +1 -1
  91. package/dist/esm/sdk/{registrationSignerPlan-DK2b3N_p.js → registrationSignerPlan-CeMidFme.js} +1 -1
  92. package/dist/{public/sdk/requireStepUpAuth-COqCGb1i.js → esm/sdk/requireStepUpAuth-iVo6h_U-.js} +1 -1
  93. package/dist/esm/sdk/resealedEnvelopeResult-DXDo-72P.js +1 -0
  94. package/dist/esm/sdk/{routerAbNormalSigning-D-UZmCBS.js → routerAbNormalSigning-DVFFkNhJ.js} +1 -1
  95. package/dist/esm/sdk/runtime-auth-Dsmw_dUA.js +1 -0
  96. package/dist/esm/sdk/runtime-device-link-qmYvGep9.js +1 -0
  97. package/dist/esm/sdk/runtime-ecdsa-tempo-Zh95TuLV.js +1 -0
  98. package/dist/esm/sdk/runtime-email-otp-CnLuW4H1.js +1 -0
  99. package/dist/esm/sdk/runtime-export-m8lvrXtw.js +1 -0
  100. package/dist/esm/sdk/runtime-near-BiXzXXhH.js +1 -0
  101. package/dist/esm/sdk/runtime-preferences-DlKHDIjb.js +1 -0
  102. package/dist/esm/sdk/runtime-recovery-C6lS71Jp.js +1 -0
  103. package/dist/esm/sdk/{runtime-recovery-codes-DeUjQsxZ.js → runtime-recovery-codes-B033ake_.js} +1 -1
  104. package/dist/esm/sdk/runtimeContext-RNS2E5wy.js +7 -0
  105. package/dist/{public/sdk/secp256k1-CE7-q9Sn.js → esm/sdk/secp256k1-DPeaOjM0.js} +1 -1
  106. package/dist/esm/sdk/signEvmFamily-Cksw3RpU.js +1 -0
  107. package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js → signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js} +1 -1
  108. package/dist/esm/sdk/{signEvmWithUiConfirm-CGrLtMV6.js → signEvmWithUiConfirm-B14zYdwE.js} +1 -1
  109. package/dist/esm/sdk/signNear-D0rFEYP1.js +1 -0
  110. package/dist/esm/sdk/{signatureUses-kSrUHSSH.js → signatureUses-BLOoPRsb.js} +1 -1
  111. package/dist/{public/sdk/signingFlow-BcetvUeS.js → esm/sdk/signingFlow-Bd1X0e-1.js} +2 -2
  112. package/dist/{public/sdk/signingQueue-dMFOFOP5.js → esm/sdk/signingQueue-DoUBeaCv.js} +1 -1
  113. package/dist/esm/sdk/{thresholdEcdsa-CqR1fFA-.js → thresholdEcdsa-BxfOZmiR.js} +1 -1
  114. package/dist/esm/sdk/{trace--mRP2OQc.js → trace-BnhLKxcu.js} +1 -1
  115. package/dist/esm/sdk/{transaction-activity-DCzHGg3b.js → transaction-activity-BXSxMp1E.js} +1 -1
  116. package/dist/{public/sdk/transactionState-29T9xfvL.js → esm/sdk/transactionState-G_FPe-U8.js} +1 -1
  117. package/dist/esm/sdk/tx-confirm-ui.js +8 -0
  118. package/dist/esm/sdk/{types-f7dyj5N6.js → types-A-w1cYlJ.js} +1 -1
  119. package/dist/esm/sdk/{unlockedEd25519ExportRootCapability-yzxQjIFd.js → unlockedEd25519ExportRootCapability-5F1egCSv.js} +1 -1
  120. package/dist/esm/sdk/voiceid-host.js +1 -1
  121. package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
  122. package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
  123. package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
  124. package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
  125. package/dist/esm/sdk/{wallet-recovery-BZB2Vu3X.js → wallet-recovery-DXdm68_Q.js} +1 -1
  126. package/dist/{public/sdk/walletAuthMethodRecord-DLBB5fez.js → esm/sdk/walletAuthMethodRecord-BW-XV4fv.js} +1 -1
  127. package/dist/esm/sdk/{walletAuthority-BTGAuOi8.js → walletAuthority-DbGaSw7D.js} +1 -1
  128. package/dist/esm/sdk/{walletCapabilityBindings-D5YYB7nN.js → walletCapabilityBindings-mPx-6_r-.js} +1 -1
  129. package/dist/{public/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js → esm/sdk/walletCustodyEcdsaContinuity-BnyL1Ryu.js} +1 -1
  130. package/dist/esm/sdk/{walletOwnershipGeneration-CgjCtPrV.js → walletOwnershipGeneration-BZc6UKqX.js} +1 -1
  131. package/dist/esm/sdk/walletRecoveryAdminProof-DdwikrW3.js +1 -0
  132. package/dist/esm/sdk/walletRecoveryCommit-DbAoiJp5.js +1 -0
  133. package/dist/{public/sdk/walletSessionAuthorizationStore-B9Vwkshr.js → esm/sdk/walletSessionAuthorizationStore-BivTUoKY.js} +1 -1
  134. package/dist/esm/sdk/{webauthnP256-BsQQPurm.js → webauthnP256-BGHikiNl.js} +1 -1
  135. package/dist/esm/shared-ts/src/auth/externalAuth.js +53 -0
  136. package/dist/esm/shared-ts/src/utils/index.js +2 -2
  137. package/dist/esm/voiceid-host.js +2 -2
  138. package/dist/public/headers.manifest.json +1 -1
  139. package/dist/public/sdk/{ConfirmationDrawer-AZruQmhP.js → ConfirmationDrawer-BRnd5SEf.js} +1 -1
  140. package/dist/public/sdk/NonceCoordinator-CNXYrOoy.js +1 -0
  141. package/dist/{esm/sdk/SeamsWordmark-DwvPx2UA.js → public/sdk/SeamsWordmark-CeEi2RlU.js} +1 -1
  142. package/dist/public/sdk/accountLifecycle-B5a9SCM7.js +1 -0
  143. package/dist/public/sdk/{adapters-d9yh1bdC.js → adapters-B2k8y0MB.js} +1 -1
  144. package/dist/public/sdk/appearance-token-vars-DkF3EBbF.js +1 -0
  145. package/dist/public/sdk/authorization-gVWwKwav.js +1 -0
  146. package/dist/public/sdk/clientSessionPersistenceState-BxpITYM_.js +1 -0
  147. package/dist/public/sdk/{collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js → collectAuthenticationCredentialForChallengeB64u-BoFVpdRS.js} +1 -1
  148. package/dist/public/sdk/{commitQueue-CYruPlkm.js → commitQueue-C1wkey4q.js} +1 -1
  149. package/dist/public/sdk/configBuilder-DpChXfDO.js +1 -0
  150. package/dist/public/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
  151. package/dist/public/sdk/confirm-ui-Dx6c4-Rk.js +2 -0
  152. package/dist/public/sdk/{device-linking-DiCNt3iA.js → device-linking-_o3_fgiG.js} +1 -1
  153. package/dist/public/sdk/{deviceLinkApproval-CfEiotVt.js → deviceLinkApproval-CObsEWBa.js} +1 -1
  154. package/dist/public/sdk/{display-D0EPmU4w.js → display-CUWg48tD.js} +1 -1
  155. package/dist/{esm/sdk/ecdsaCapabilityManifest-DAJEVjlP.js → public/sdk/ecdsaCapabilityManifest--1Ztngfx.js} +1 -1
  156. package/dist/{esm/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js → public/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js} +1 -1
  157. package/dist/public/sdk/ecdsaDerivationExport-BUUUGc6o.js +1 -0
  158. package/dist/public/sdk/{ecdsaWalletRecords-WLyq414E.js → ecdsaWalletRecords-CKaXfsVu.js} +1 -1
  159. package/dist/public/sdk/ed25519OperationFingerprint-Dev4P6Og.js +1 -0
  160. package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js → public/sdk/emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js} +1 -1
  161. package/dist/public/sdk/{enrichDisplayModelWithAbi-O6Mw4i2E.js → enrichDisplayModelWithAbi-JeAcpa7r.js} +1 -1
  162. package/dist/public/sdk/{evmCryptoWasm-BUPb4hBH.js → evmCryptoWasm-CeH6Qeaa.js} +1 -1
  163. package/dist/public/sdk/{export-viewer-host-BtrKVXxu.js → export-viewer-host-O0OV1Oou.js} +1 -1
  164. package/dist/public/sdk/exportKeypairOperation-DkqY9Bpf.js +1 -0
  165. package/dist/public/sdk/host-BeE2dIU4.js +1 -0
  166. package/dist/{esm/sdk/icons-BlMXolHv.js → public/sdk/icons-pSZJ5Xrm.js} +1 -1
  167. package/dist/public/sdk/indexedDB-CA4tGqkr.js +1 -0
  168. package/dist/public/sdk/{intentDigest-HvRsBQ1z.js → intentDigest-gM3r4SVX.js} +1 -1
  169. package/dist/public/sdk/{lanes-BU-fGqY4.js → lanes-vBKm6yBJ.js} +1 -1
  170. package/dist/public/sdk/{localOnly-BATWJj78.js → localOnly-U_MucUAe.js} +1 -1
  171. package/dist/{esm/sdk/mountExportPrivateKeySurface-CyHU8bVc.js → public/sdk/mountExportPrivateKeySurface-C2-fnvP6.js} +1 -1
  172. package/dist/{esm/sdk/mountRecoveryCodeBackupSurface-C7aglQxf.js → public/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js} +1 -1
  173. package/dist/public/sdk/nearEd25519YaoSigningPreparation-CnbgQfZc.js +1 -0
  174. package/dist/public/sdk/{nonceLaneKeys-BF_UpvIy.js → nonceLaneKeys-DtBpxubF.js} +1 -1
  175. package/dist/public/sdk/{normalization-Df9fZWJC.js → normalization-DmfGvZ_3.js} +1 -1
  176. package/dist/public/sdk/ownerNearOperation-DjNDxW3_.js +1 -0
  177. package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js → public/sdk/pendingWalletRecoveryCodeBackup-DXFrQmO5.js} +1 -1
  178. package/dist/public/sdk/{presignaturePool-BbvqRWYw.js → presignaturePool-Dq4RhzXn.js} +1 -1
  179. package/dist/{esm/sdk/recovery-entrypoint-DJbMDC_m.js → public/sdk/recovery-entrypoint-s9OoKBcl.js} +1 -1
  180. package/dist/public/sdk/registration-CTtTocyo.js +1 -0
  181. package/dist/public/sdk/{registration-HSwOHZOo.js → registration-D3p7muCc.js} +1 -1
  182. package/dist/public/sdk/{registrationAccounts-4r74gX1l.js → registrationAccounts-Bso0ntMs.js} +1 -1
  183. package/dist/{esm/sdk/registrationIntent-Do1tD1V7.js → public/sdk/registrationIntent-C1-Kyx_-.js} +1 -1
  184. package/dist/public/sdk/{registrationSignerPlan-DK2b3N_p.js → registrationSignerPlan-CeMidFme.js} +1 -1
  185. package/dist/{esm/sdk/requireStepUpAuth-COqCGb1i.js → public/sdk/requireStepUpAuth-iVo6h_U-.js} +1 -1
  186. package/dist/public/sdk/resealedEnvelopeResult-DXDo-72P.js +1 -0
  187. package/dist/public/sdk/{routerAbNormalSigning-D-UZmCBS.js → routerAbNormalSigning-DVFFkNhJ.js} +1 -1
  188. package/dist/public/sdk/runtime-auth-Dsmw_dUA.js +1 -0
  189. package/dist/public/sdk/runtime-device-link-qmYvGep9.js +1 -0
  190. package/dist/public/sdk/runtime-ecdsa-tempo-Zh95TuLV.js +1 -0
  191. package/dist/public/sdk/runtime-email-otp-CnLuW4H1.js +1 -0
  192. package/dist/public/sdk/runtime-export-m8lvrXtw.js +1 -0
  193. package/dist/public/sdk/runtime-near-BiXzXXhH.js +1 -0
  194. package/dist/public/sdk/runtime-preferences-DlKHDIjb.js +1 -0
  195. package/dist/public/sdk/runtime-recovery-C6lS71Jp.js +1 -0
  196. package/dist/public/sdk/{runtime-recovery-codes-DeUjQsxZ.js → runtime-recovery-codes-B033ake_.js} +1 -1
  197. package/dist/public/sdk/runtimeContext-RNS2E5wy.js +7 -0
  198. package/dist/{esm/sdk/secp256k1-CE7-q9Sn.js → public/sdk/secp256k1-DPeaOjM0.js} +1 -1
  199. package/dist/public/sdk/signEvmFamily-Cksw3RpU.js +1 -0
  200. package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js → signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js} +1 -1
  201. package/dist/public/sdk/{signEvmWithUiConfirm-CGrLtMV6.js → signEvmWithUiConfirm-B14zYdwE.js} +1 -1
  202. package/dist/public/sdk/signNear-D0rFEYP1.js +1 -0
  203. package/dist/public/sdk/{signatureUses-kSrUHSSH.js → signatureUses-BLOoPRsb.js} +1 -1
  204. package/dist/{esm/sdk/signingFlow-BcetvUeS.js → public/sdk/signingFlow-Bd1X0e-1.js} +2 -2
  205. package/dist/{esm/sdk/signingQueue-dMFOFOP5.js → public/sdk/signingQueue-DoUBeaCv.js} +1 -1
  206. package/dist/public/sdk/{thresholdEcdsa-CqR1fFA-.js → thresholdEcdsa-BxfOZmiR.js} +1 -1
  207. package/dist/public/sdk/{trace--mRP2OQc.js → trace-BnhLKxcu.js} +1 -1
  208. package/dist/public/sdk/{transaction-activity-DCzHGg3b.js → transaction-activity-BXSxMp1E.js} +1 -1
  209. package/dist/{esm/sdk/transactionState-29T9xfvL.js → public/sdk/transactionState-G_FPe-U8.js} +1 -1
  210. package/dist/public/sdk/tx-confirm-ui.js +8 -0
  211. package/dist/public/sdk/{types-f7dyj5N6.js → types-A-w1cYlJ.js} +1 -1
  212. package/dist/public/sdk/{unlockedEd25519ExportRootCapability-yzxQjIFd.js → unlockedEd25519ExportRootCapability-5F1egCSv.js} +1 -1
  213. package/dist/public/sdk/voiceid-host.js +1 -1
  214. package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
  215. package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
  216. package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
  217. package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
  218. package/dist/public/sdk/{wallet-recovery-BZB2Vu3X.js → wallet-recovery-DXdm68_Q.js} +1 -1
  219. package/dist/{esm/sdk/walletAuthMethodRecord-DLBB5fez.js → public/sdk/walletAuthMethodRecord-BW-XV4fv.js} +1 -1
  220. package/dist/public/sdk/{walletAuthority-BTGAuOi8.js → walletAuthority-DbGaSw7D.js} +1 -1
  221. package/dist/public/sdk/{walletCapabilityBindings-D5YYB7nN.js → walletCapabilityBindings-mPx-6_r-.js} +1 -1
  222. package/dist/{esm/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js → public/sdk/walletCustodyEcdsaContinuity-BnyL1Ryu.js} +1 -1
  223. package/dist/public/sdk/{walletOwnershipGeneration-CgjCtPrV.js → walletOwnershipGeneration-BZc6UKqX.js} +1 -1
  224. package/dist/public/sdk/walletRecoveryAdminProof-DdwikrW3.js +1 -0
  225. package/dist/public/sdk/walletRecoveryCommit-DbAoiJp5.js +1 -0
  226. package/dist/{esm/sdk/walletSessionAuthorizationStore-B9Vwkshr.js → public/sdk/walletSessionAuthorizationStore-BivTUoKY.js} +1 -1
  227. package/dist/public/sdk/{webauthnP256-BsQQPurm.js → webauthnP256-BGHikiNl.js} +1 -1
  228. package/dist/public/wallet-assets.manifest.json +262 -262
  229. package/dist/public/wallet-service/index.html +4 -4
  230. package/dist/types/shared-ts/src/auth/externalAuth.d.ts +127 -0
  231. package/dist/types/shared-ts/src/authorization/index.d.ts +1 -1
  232. package/dist/types/shared-ts/src/authorization/walletOwnerOperation.d.ts +10 -0
  233. package/dist/types/shared-ts/src/utils/registrationEstablishedSession.d.ts +4 -0
  234. package/dist/types/shared-ts/src/utils/registrationIntent.d.ts +2 -0
  235. package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
  236. package/dist/types/wallet/src/SeamsWeb/operations/devices/walletHostOwnerAuthority.d.ts +2 -1
  237. package/dist/types/wallet/src/SeamsWeb/operations/registration/pendingRegistrationRecovery.d.ts +1 -0
  238. package/dist/types/wallet/src/SeamsWeb/operations/registration/registration.d.ts +1 -0
  239. package/dist/types/wallet/src/SeamsWeb/operations/registration/registrationPasskeyMaterial.d.ts +24 -0
  240. package/dist/types/wallet/src/SeamsWeb/publicApi/auth.d.ts +1 -1
  241. package/dist/types/wallet/src/SeamsWeb/publicApi/createPublicApi.d.ts +1 -0
  242. package/dist/types/wallet/src/SeamsWeb/publicApi/nearCommands.d.ts +2 -0
  243. package/dist/types/wallet/src/SeamsWeb/publicApi/ownerNearOperation.d.ts +58 -0
  244. package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +21 -2
  245. package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +57 -56
  246. package/dist/types/wallet/src/SeamsWeb/signingSurface/nearOwnerOperation.d.ts +16 -0
  247. package/dist/types/wallet/src/SeamsWeb/signingSurface/nearPasskeyOperationMaterial.d.ts +72 -0
  248. package/dist/types/wallet/src/SeamsWeb/signingSurface/types.d.ts +3 -0
  249. package/dist/types/wallet/src/SeamsWeb/walletIframe/client/ownerNearOperation.d.ts +25 -0
  250. package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +8 -1
  251. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +8 -2
  252. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createNearCommands.d.ts +2 -1
  253. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createSessionCommands.d.ts +9 -2
  254. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalAuth.d.ts +31 -0
  255. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalOwnerApproval.d.ts +24 -0
  256. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ownerNearOperation.d.ts +12 -0
  257. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestRouter.d.ts +2 -2
  258. package/dist/types/wallet/src/SeamsWeb/walletIframe/host/sessionObserver.d.ts +1 -0
  259. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/exactSessionState.d.ts +8 -0
  260. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +17 -7
  261. package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/ownerNearOperation.d.ts +51 -0
  262. package/dist/types/wallet/src/core/authMethods/plugins.d.ts +2 -0
  263. package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/registrationSetup.d.ts +1 -0
  264. package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/repositories.d.ts +4 -0
  265. package/dist/types/wallet/src/core/rpcClients/near/NearClient.d.ts +4 -0
  266. package/dist/types/wallet/src/core/rpcClients/relayer/walletRecoveryRotate.d.ts +2 -2
  267. package/dist/types/wallet/src/core/rpcClients/relayer/walletRegistration.d.ts +1 -0
  268. package/dist/types/wallet/src/core/signingEngine/session/passkey/ed25519YaoLocalMaterial.d.ts +21 -0
  269. package/dist/types/wallet/src/core/types/seams.d.ts +21 -6
  270. package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
  271. package/dist/types/wallet/src/index.d.ts +3 -0
  272. package/dist/types/wallet/src/react/boundWallet.d.ts +21 -1
  273. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +2 -1
  274. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountSettingsDialog.d.ts +10 -0
  275. package/dist/types/wallet/src/react/components/AccountMenuButton/AuthenticationMethodsModal.d.ts +1 -2
  276. package/dist/types/wallet/src/react/components/AccountMenuButton/ExternalWalletSettings.d.ts +10 -0
  277. package/dist/types/wallet/src/react/components/AccountMenuButton/LinkedDevicesModal.d.ts +1 -2
  278. package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +1 -0
  279. package/dist/types/wallet/src/react/components/AccountMenuButton/hooks/useProfileState.d.ts +2 -2
  280. package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +4 -3
  281. package/dist/types/wallet/src/react/context/reactLoginStateBuilders.d.ts +1 -1
  282. package/dist/types/wallet/src/react/hooks/useOwnerNearOperation.d.ts +4 -0
  283. package/dist/types/wallet/src/react/index.d.ts +3 -0
  284. package/dist/types/wallet/src/react/types.d.ts +13 -3
  285. package/dist/types/wallet/src/voiceid-host.d.ts +2 -2
  286. package/package.json +1 -1
  287. package/dist/esm/react/components/AccountMenuButton/AccountMenuModal.js +0 -66
  288. package/dist/esm/sdk/NonceCoordinator-3YhmDTS5.js +0 -1
  289. package/dist/esm/sdk/accountLifecycle-6DHYWf0v.js +0 -1
  290. package/dist/esm/sdk/appearance-token-vars-BJydfWT_.js +0 -1
  291. package/dist/esm/sdk/clientSessionPersistenceState-BCkJAYSz.js +0 -1
  292. package/dist/esm/sdk/configBuilder-CSwJrmcR.js +0 -1
  293. package/dist/esm/sdk/confirm-ui-nU6ymgiv.js +0 -2
  294. package/dist/esm/sdk/ecdsaDerivationExport-DJKOzDbS.js +0 -1
  295. package/dist/esm/sdk/exportKeypairOperation-CGE9ZU1m.js +0 -1
  296. package/dist/esm/sdk/host-DayrOrgm.js +0 -1
  297. package/dist/esm/sdk/indexedDB-C4SDsyOG.js +0 -1
  298. package/dist/esm/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +0 -1
  299. package/dist/esm/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +0 -1
  300. package/dist/esm/sdk/registration-CNLUYN-p.js +0 -1
  301. package/dist/esm/sdk/resealedEnvelopeResult-B1p5UkYg.js +0 -1
  302. package/dist/esm/sdk/runtime-auth-BCoj7_-G.js +0 -1
  303. package/dist/esm/sdk/runtime-device-link-DAsq5tGT.js +0 -1
  304. package/dist/esm/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +0 -1
  305. package/dist/esm/sdk/runtime-email-otp-BxSKK9AG.js +0 -1
  306. package/dist/esm/sdk/runtime-export-BWnQXMzT.js +0 -1
  307. package/dist/esm/sdk/runtime-near-CuzPZrDS.js +0 -1
  308. package/dist/esm/sdk/runtime-preferences-B-nDWlm3.js +0 -1
  309. package/dist/esm/sdk/runtime-recovery-DpOdEJ8N.js +0 -1
  310. package/dist/esm/sdk/runtimeContext-5JcewRo3.js +0 -6
  311. package/dist/esm/sdk/sessionObservationRevision-JOvVF4Hf.js +0 -1
  312. package/dist/esm/sdk/signEvmFamily-BY5jlZEG.js +0 -1
  313. package/dist/esm/sdk/signNear-DMpJFkwF.js +0 -1
  314. package/dist/esm/sdk/signer-worker-BNodGJKY.js +0 -1
  315. package/dist/esm/sdk/walletRecoveryAdminProof-CvSYbyg5.js +0 -1
  316. package/dist/esm/sdk/walletRecoveryCommit-Cc2LAkCS.js +0 -1
  317. package/dist/public/sdk/NonceCoordinator-3YhmDTS5.js +0 -1
  318. package/dist/public/sdk/accountLifecycle-6DHYWf0v.js +0 -1
  319. package/dist/public/sdk/appearance-token-vars-BJydfWT_.js +0 -1
  320. package/dist/public/sdk/clientSessionPersistenceState-BCkJAYSz.js +0 -1
  321. package/dist/public/sdk/configBuilder-CSwJrmcR.js +0 -1
  322. package/dist/public/sdk/confirm-ui-nU6ymgiv.js +0 -2
  323. package/dist/public/sdk/ecdsaDerivationExport-DJKOzDbS.js +0 -1
  324. package/dist/public/sdk/exportKeypairOperation-CGE9ZU1m.js +0 -1
  325. package/dist/public/sdk/host-DayrOrgm.js +0 -1
  326. package/dist/public/sdk/indexedDB-C4SDsyOG.js +0 -1
  327. package/dist/public/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +0 -1
  328. package/dist/public/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +0 -1
  329. package/dist/public/sdk/registration-CNLUYN-p.js +0 -1
  330. package/dist/public/sdk/resealedEnvelopeResult-B1p5UkYg.js +0 -1
  331. package/dist/public/sdk/runtime-auth-BCoj7_-G.js +0 -1
  332. package/dist/public/sdk/runtime-device-link-DAsq5tGT.js +0 -1
  333. package/dist/public/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +0 -1
  334. package/dist/public/sdk/runtime-email-otp-BxSKK9AG.js +0 -1
  335. package/dist/public/sdk/runtime-export-BWnQXMzT.js +0 -1
  336. package/dist/public/sdk/runtime-near-CuzPZrDS.js +0 -1
  337. package/dist/public/sdk/runtime-preferences-B-nDWlm3.js +0 -1
  338. package/dist/public/sdk/runtime-recovery-DpOdEJ8N.js +0 -1
  339. package/dist/public/sdk/runtimeContext-5JcewRo3.js +0 -6
  340. package/dist/public/sdk/sessionObservationRevision-JOvVF4Hf.js +0 -1
  341. package/dist/public/sdk/signEvmFamily-BY5jlZEG.js +0 -1
  342. package/dist/public/sdk/signNear-DMpJFkwF.js +0 -1
  343. package/dist/public/sdk/signer-worker-BNodGJKY.js +0 -1
  344. package/dist/public/sdk/walletRecoveryAdminProof-CvSYbyg5.js +0 -1
  345. package/dist/public/sdk/walletRecoveryCommit-Cc2LAkCS.js +0 -1
  346. package/dist/types/shared-ts/src/authorization/walletCustodyOperation.d.ts +0 -10
  347. package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuModal.d.ts +0 -9
  348. /package/dist/esm/sdk/{accountIds-CW2BP-d9.js → accountIds-DGWFzEnw.js} +0 -0
  349. /package/dist/esm/sdk/{actions-DrtSTGus.js → actions-7SvZZut1.js} +0 -0
  350. /package/dist/esm/sdk/{authenticatorOptions-WCDKYRux.js → authenticatorOptions-B4q62CLs.js} +0 -0
  351. /package/dist/esm/sdk/{confirmTypes-BvVtQs-M.js → confirmTypes-DmEPoxys.js} +0 -0
  352. /package/dist/esm/sdk/{csp-stylesheet-DUSqfXvZ.js → csp-stylesheet-5LU6VGKK.js} +0 -0
  353. /package/dist/esm/sdk/{digestEncoding-CqNXPZY9.js → digestEncoding-34kXJoJr.js} +0 -0
  354. /package/dist/esm/sdk/{ecdsaChainTarget-Bm5X4k-V.js → ecdsaChainTarget-BoRVQtjQ.js} +0 -0
  355. /package/dist/esm/sdk/{executeWorkerOperation-C9FOCCR7.js → executeWorkerOperation-CAYSt0NA.js} +0 -0
  356. /package/dist/esm/sdk/{helpers-Dubwo5uK.js → helpers-B7c1zc7h.js} +0 -0
  357. /package/dist/esm/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-DGzeiNSa.js} +0 -0
  358. /package/dist/esm/sdk/{keccak-mS0Mejjx.js → keccak-DGHI1G6t.js} +0 -0
  359. /package/dist/esm/sdk/{keyMaterialEnvelope-Dm2ZEilb.js → keyMaterialEnvelope-Czkks9Ki.js} +0 -0
  360. /package/dist/esm/sdk/{presignatures-BCeq56DG.js → presignatures-CkhuZ0YQ.js} +0 -0
  361. /package/dist/esm/sdk/{profileAccountProjection-C5sNt-s2.js → profileAccountProjection-dvLchPBo.js} +0 -0
  362. /package/dist/esm/sdk/{registrationAuthMethodInput-BR1WVbK3.js → registrationAuthMethodInput-C4o7yFBJ.js} +0 -0
  363. /package/dist/esm/sdk/{sdkSentEvents-DjOlKtdW.js → sdkSentEvents-BFwv3mBw.js} +0 -0
  364. /package/dist/esm/sdk/{signerDomain-BAsLT3XN.js → signerDomain-D-EUTlLK.js} +0 -0
  365. /package/dist/esm/sdk/{signerSlot-D2RZnb27.js → signerSlot-BlijMq8C.js} +0 -0
  366. /package/dist/esm/sdk/{surface-measurement-reporter-DXsvq401.js → surface-measurement-reporter-DJ_dQhBV.js} +0 -0
  367. /package/dist/esm/sdk/{walletCustodyOperation-DimzAbCB.js → walletOwnerOperation-CScYv2K6.js} +0 -0
  368. /package/dist/esm/sdk/{walletSessionAuthorizationStatus-DG7DPcgR.js → walletSessionAuthorizationStatus-GhcGvDCX.js} +0 -0
  369. /package/dist/public/sdk/{accountIds-CW2BP-d9.js → accountIds-DGWFzEnw.js} +0 -0
  370. /package/dist/public/sdk/{actions-DrtSTGus.js → actions-7SvZZut1.js} +0 -0
  371. /package/dist/public/sdk/{authenticatorOptions-WCDKYRux.js → authenticatorOptions-B4q62CLs.js} +0 -0
  372. /package/dist/public/sdk/{confirmTypes-BvVtQs-M.js → confirmTypes-DmEPoxys.js} +0 -0
  373. /package/dist/public/sdk/{csp-stylesheet-DUSqfXvZ.js → csp-stylesheet-5LU6VGKK.js} +0 -0
  374. /package/dist/public/sdk/{digestEncoding-CqNXPZY9.js → digestEncoding-34kXJoJr.js} +0 -0
  375. /package/dist/public/sdk/{ecdsaChainTarget-Bm5X4k-V.js → ecdsaChainTarget-BoRVQtjQ.js} +0 -0
  376. /package/dist/public/sdk/{executeWorkerOperation-C9FOCCR7.js → executeWorkerOperation-CAYSt0NA.js} +0 -0
  377. /package/dist/public/sdk/{helpers-Dubwo5uK.js → helpers-B7c1zc7h.js} +0 -0
  378. /package/dist/public/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-DGzeiNSa.js} +0 -0
  379. /package/dist/public/sdk/{keccak-mS0Mejjx.js → keccak-DGHI1G6t.js} +0 -0
  380. /package/dist/public/sdk/{keyMaterialEnvelope-Dm2ZEilb.js → keyMaterialEnvelope-Czkks9Ki.js} +0 -0
  381. /package/dist/public/sdk/{presignatures-BCeq56DG.js → presignatures-CkhuZ0YQ.js} +0 -0
  382. /package/dist/public/sdk/{profileAccountProjection-C5sNt-s2.js → profileAccountProjection-dvLchPBo.js} +0 -0
  383. /package/dist/public/sdk/{registrationAuthMethodInput-BR1WVbK3.js → registrationAuthMethodInput-C4o7yFBJ.js} +0 -0
  384. /package/dist/public/sdk/{sdkSentEvents-DjOlKtdW.js → sdkSentEvents-BFwv3mBw.js} +0 -0
  385. /package/dist/public/sdk/{signerDomain-BAsLT3XN.js → signerDomain-D-EUTlLK.js} +0 -0
  386. /package/dist/public/sdk/{signerSlot-D2RZnb27.js → signerSlot-BlijMq8C.js} +0 -0
  387. /package/dist/public/sdk/{surface-measurement-reporter-DXsvq401.js → surface-measurement-reporter-DJ_dQhBV.js} +0 -0
  388. /package/dist/public/sdk/{walletCustodyOperation-DimzAbCB.js → walletOwnerOperation-CScYv2K6.js} +0 -0
  389. /package/dist/public/sdk/{walletSessionAuthorizationStatus-DG7DPcgR.js → walletSessionAuthorizationStatus-GhcGvDCX.js} +0 -0
@@ -4,8 +4,9 @@ import { parseWalletSessionAuthorizationId, parseWalletSessionId } from "../../.
4
4
  import { thresholdEcdsaChainTargetFromRequest } from "../../../core/signingEngine/interfaces/ecdsaChainTarget.js";
5
5
  import "../../../shared-ts/src/device-linking/activeWalletSession.js";
6
6
  import { parseWalletAuthAuthorityRef } from "../../../shared-ts/src/utils/walletAuthAuthority.js";
7
- import { toAccountId } from "../../../core/types/accountIds.js";
8
7
  import { isWalletAuthMethod } from "../../../shared-ts/src/utils/signerDomain.js";
8
+ import { toAccountId } from "../../../core/types/accountIds.js";
9
+ import { parseExternalWalletAuthentication, parseExternalWalletSettings } from "../../../shared-ts/src/auth/externalAuth.js";
9
10
  import { NonceCoordinatorDegradationReason, NonceCoordinatorFallback, NonceLeaseState } from "../../../core/signingEngine/nonce/nonceTypes.js";
10
11
  import { parseEcdsaThresholdKeyId } from "../../../core/signingEngine/session/keyMaterialBrands.js";
11
12
  import { parseNearEd25519SigningKeyId } from "../../../shared-ts/src/utils/registrationIds.js";
@@ -29,6 +30,9 @@ function parseWalletIframeExactSessionSnapshot(value) {
29
30
  const state = parseWalletIframeExactSessionState(record.state);
30
31
  if (state.kind !== "wallet_locked" && state.walletId !== walletId) throw new Error("Wallet session snapshot identity differs from its projection");
31
32
  const session = parseWalletSessionFromBoundary(record.session, state.kind === "wallet_locked" ? void 0 : state.walletId);
33
+ if (state.kind === "external_read") {
34
+ if (session.authentication.kind !== "external_authenticated" || session.authentication.walletId !== state.walletId || session.authentication.sessionId !== state.externalSessionId || session.authentication.expiresAtMs !== state.expiresAtMs) throw new Error("External read snapshot differs from its authenticated session");
35
+ } else if (session.authentication.kind === "external_authenticated") throw new Error("External authentication requires an external read state");
32
36
  if (state.kind === "wallet_locked" && (session.authentication.kind !== "signed_out" || session.appIdentity.kind !== "anonymous")) throw new Error("Locked wallet snapshot must publish an anonymous session");
33
37
  return {
34
38
  revision: parseWalletIframeSessionRevision(record.revision),
@@ -41,6 +45,17 @@ function parseWalletIframeExactSessionState(value) {
41
45
  if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Wallet iframe exact session state must be an object");
42
46
  switch (Reflect.get(value, "kind")) {
43
47
  case "wallet_locked": return { kind: "wallet_locked" };
48
+ case "external_read": {
49
+ const expiresAtMs = Reflect.get(value, "expiresAtMs");
50
+ if (!isPositiveSafeInteger(expiresAtMs)) throw new Error("External read expiry is invalid");
51
+ if ("walletSessionId" in value || "authorizationId" in value || "authMethod" in value) throw new Error("External read state cannot contain signing authority");
52
+ return {
53
+ kind: "external_read",
54
+ walletId: requireWalletId(Reflect.get(value, "walletId")),
55
+ externalSessionId: requireNonEmptyString(Reflect.get(value, "externalSessionId"), "externalSessionId"),
56
+ expiresAtMs
57
+ };
58
+ }
44
59
  case "wallet_authenticated_identity_unresolvable": return {
45
60
  kind: "wallet_authenticated_identity_unresolvable",
46
61
  walletId: requireWalletId(Reflect.get(value, "walletId")),
@@ -89,12 +104,33 @@ function parseWalletIframeExactSessionState(value) {
89
104
  function parseWalletSessionFromBoundary(value, expectedWalletId) {
90
105
  if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Wallet Session must be an object");
91
106
  if (Reflect.get(value, "reusableWalletSession") !== void 0) throw new Error("Wallet Session contains removed reusable-session fields");
92
- const parsed = {
93
- appIdentity: parseWalletSessionAppIdentity(Reflect.get(value, "appIdentity")),
94
- authentication: parseWalletAuthenticationState(Reflect.get(value, "authentication")),
95
- capabilityProjection: parseWalletSessionCapabilityProjection(Reflect.get(value, "capabilityProjection")),
107
+ const appIdentity = parseWalletSessionAppIdentity(Reflect.get(value, "appIdentity"));
108
+ const authentication = parseWalletAuthenticationState(Reflect.get(value, "authentication"));
109
+ const capabilityProjection = parseWalletSessionCapabilityProjection(Reflect.get(value, "capabilityProjection"));
110
+ const common = {
111
+ appIdentity,
96
112
  nonceDiagnostics: parseNullableNonceDiagnostics(Reflect.get(value, "nonceDiagnostics"))
97
113
  };
114
+ let parsed;
115
+ if (authentication.kind === "external_authenticated") {
116
+ if (appIdentity.kind !== "resolved") throw new Error("External authentication requires a resolved wallet");
117
+ if (common.nonceDiagnostics !== null) throw new Error("External authentication has no signing runtime");
118
+ if (capabilityProjection.kind !== "not_requested") throw new Error("External authentication cannot grant signing capabilities");
119
+ const externalSettings = parseExternalWalletSettings(Reflect.get(value, "externalSettings"));
120
+ if (externalSettings.authentication.sessionId !== authentication.sessionId || externalSettings.authentication.walletId !== authentication.walletId || externalSettings.authentication.associationId !== authentication.associationId || externalSettings.authentication.environmentId !== authentication.environmentId || externalSettings.authentication.expiresAtMs !== authentication.expiresAtMs) throw new Error("External settings identity mismatch");
121
+ parsed = {
122
+ appIdentity,
123
+ nonceDiagnostics: common.nonceDiagnostics,
124
+ authentication,
125
+ capabilityProjection,
126
+ externalSettings
127
+ };
128
+ } else parsed = {
129
+ appIdentity: common.appIdentity,
130
+ nonceDiagnostics: common.nonceDiagnostics,
131
+ authentication,
132
+ capabilityProjection
133
+ };
98
134
  const expected = expectedWalletId === void 0 ? null : requireWalletId(expectedWalletId);
99
135
  const canonicalWalletId = walletSessionCanonicalWalletId(parsed);
100
136
  if (expected !== null && canonicalWalletId === null) throw new Error("Wallet iframe Wallet Session omitted the requested wallet identity");
@@ -106,6 +142,7 @@ function parseWalletAuthenticationState(value) {
106
142
  if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Wallet Session authentication must be an object");
107
143
  switch (Reflect.get(value, "kind")) {
108
144
  case "signed_out": return { kind: "signed_out" };
145
+ case "external_authenticated": return parseExternalWalletAuthentication(value);
109
146
  case "authenticated": {
110
147
  const authMethod = Reflect.get(value, "authMethod");
111
148
  if (!isWalletAuthMethod(authMethod)) throw new Error("Wallet Session authentication method is invalid");
@@ -470,7 +470,7 @@ function parseHostedAuthMenuOutcome(value) {
470
470
  default: return null;
471
471
  }
472
472
  }
473
- const WALLET_PROTOCOL_VERSION = "17.0.0";
473
+ const WALLET_PROTOCOL_VERSION = "19.0.0";
474
474
  const WALLET_IFRAME_PROTOCOL_VERSION_MISMATCH = "WALLET_IFRAME_PROTOCOL_VERSION_MISMATCH";
475
475
  const HOSTED_WALLET_REDEMPTION_PAYLOAD_FIELDS = [
476
476
  "home",
@@ -0,0 +1,152 @@
1
+ import { requireCanonicalString, requireRecord } from "../../../shared-ts/src/utils/validation.js";
2
+ import { parseWalletId } from "../../../shared-ts/src/utils/domainIds.js";
3
+ import { parseNearTransactionResult } from "../../../core/signingEngine/nearTransactionSubmission.js";
4
+ import { SigningSessionIds } from "../../../core/signingEngine/session/operationState/types.js";
5
+ import { toAccountId } from "../../../core/types/accountIds.js";
6
+ import { ActionType } from "../../../shared-ts/src/near/actions.js";
7
+ import { parseExternalWalletAuthentication } from "../../../shared-ts/src/auth/externalAuth.js";
8
+ import { parseThresholdEd25519NearTransaction } from "../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
9
+ //#region src/SeamsWeb/walletIframe/shared/ownerNearOperation.ts
10
+ function parseOwnerNearRecovery(raw) {
11
+ const value = requireRecord(raw, "owner operation recovery");
12
+ const operationId = requireCanonicalString(value.operationId, "operationId");
13
+ if (!/^owner-near:[A-Za-z0-9_-]{32,64}$/.test(operationId)) throw new Error("Invalid owner operation ID.");
14
+ const walletId = parseWalletId(value.walletId);
15
+ if (!walletId.ok) throw new Error("Invalid owner operation wallet.");
16
+ return {
17
+ operationId: SigningSessionIds.signingOperation(operationId),
18
+ walletId: walletId.value,
19
+ nearAccountId: toAccountId(requireCanonicalString(value.nearAccountId, "nearAccountId"))
20
+ };
21
+ }
22
+ function parseOwnerNearCommand(raw) {
23
+ const value = requireRecord(raw, "owner operation command");
24
+ const authentication = parseExternalWalletAuthentication(value.authentication);
25
+ const recovery = parseOwnerNearRecovery(value.recovery);
26
+ if (recovery.walletId !== String(authentication.walletId)) throw new Error("Owner operation wallet mismatch.");
27
+ switch (value.action) {
28
+ case "recover": return {
29
+ action: "recover",
30
+ authentication,
31
+ recovery
32
+ };
33
+ case "approve": {
34
+ const rawTransaction = requireRecord(value.transaction, "transaction");
35
+ const transaction = parseThresholdEd25519NearTransaction({
36
+ nearAccountId: recovery.nearAccountId,
37
+ receiverId: rawTransaction.receiverId,
38
+ actions: rawTransaction.actions
39
+ }, "transaction");
40
+ if (transaction.nearAccountId !== String(recovery.nearAccountId)) throw new Error("Owner operation account mismatch.");
41
+ const expiresAtMs = value.expiresAtMs;
42
+ if (typeof expiresAtMs !== "number" || !Number.isSafeInteger(expiresAtMs) || expiresAtMs <= 0) throw new Error("Invalid owner operation expiry.");
43
+ return {
44
+ action: "approve",
45
+ authentication,
46
+ recovery,
47
+ expiresAtMs,
48
+ transaction: {
49
+ receiverId: transaction.receiverId,
50
+ actions: transaction.actions.map(ownerNearAction)
51
+ }
52
+ };
53
+ }
54
+ default: throw new Error("Invalid owner operation action.");
55
+ }
56
+ }
57
+ function parseOwnerNearOutcome(raw) {
58
+ const value = requireRecord(raw, "owner operation outcome");
59
+ switch (value.kind) {
60
+ case "completed": {
61
+ const result = parseNearTransactionResult(value.result);
62
+ if (!result.success) throw new Error("A completed owner operation requires a successful transaction.");
63
+ return {
64
+ kind: "completed",
65
+ result
66
+ };
67
+ }
68
+ case "reverted": return {
69
+ kind: "reverted",
70
+ transactionId: requireCanonicalString(value.transactionId, "transactionId"),
71
+ error: requireCanonicalString(value.error, "error")
72
+ };
73
+ case "cancelled": return { kind: "cancelled" };
74
+ case "expired": return { kind: "expired" };
75
+ case "failed": return {
76
+ kind: "failed",
77
+ error: requireCanonicalString(value.error, "error")
78
+ };
79
+ case "unknown": return {
80
+ kind: "unknown",
81
+ recovery: parseOwnerNearRecovery(value.recovery)
82
+ };
83
+ default: throw new Error("Invalid owner operation outcome.");
84
+ }
85
+ }
86
+ function ownerNearAction(action) {
87
+ switch (action.action_type) {
88
+ case "CreateAccount": return { action_type: ActionType.CreateAccount };
89
+ case "DeployContract": return {
90
+ action_type: ActionType.DeployContract,
91
+ code: [...action.code]
92
+ };
93
+ case "FunctionCall": return {
94
+ action_type: ActionType.FunctionCall,
95
+ method_name: action.method_name,
96
+ args: action.args,
97
+ gas: action.gas,
98
+ deposit: action.deposit
99
+ };
100
+ case "Transfer": return {
101
+ action_type: ActionType.Transfer,
102
+ deposit: action.deposit
103
+ };
104
+ case "Stake": return {
105
+ action_type: ActionType.Stake,
106
+ stake: action.stake,
107
+ public_key: action.public_key
108
+ };
109
+ case "AddKey": return {
110
+ action_type: ActionType.AddKey,
111
+ public_key: action.public_key,
112
+ access_key: action.access_key
113
+ };
114
+ case "DeleteKey": return {
115
+ action_type: ActionType.DeleteKey,
116
+ public_key: action.public_key
117
+ };
118
+ case "DeleteAccount": return {
119
+ action_type: ActionType.DeleteAccount,
120
+ beneficiary_id: action.beneficiary_id
121
+ };
122
+ case "DeployGlobalContract": return {
123
+ action_type: ActionType.DeployGlobalContract,
124
+ code: [...action.code],
125
+ deploy_mode: action.deploy_mode
126
+ };
127
+ case "UseGlobalContract":
128
+ if (action.account_id !== void 0) return {
129
+ action_type: ActionType.UseGlobalContract,
130
+ account_id: action.account_id
131
+ };
132
+ return {
133
+ action_type: ActionType.UseGlobalContract,
134
+ code_hash: action.code_hash
135
+ };
136
+ case "SignedDelegate": throw new Error("Use the delegate API for delegated actions.");
137
+ default: throw new Error("Unsupported owner transaction action.");
138
+ }
139
+ }
140
+ function parseOwnerNearSubmissionProgress(raw) {
141
+ if (!raw || typeof raw !== "object" || Array.isArray(raw) || Reflect.get(raw, "event") !== "owner_near_submitting") return null;
142
+ const operationId = Reflect.get(raw, "operationId");
143
+ if (typeof operationId !== "string" || !/^owner-near:[A-Za-z0-9_-]{32,64}$/.test(operationId)) return null;
144
+ return {
145
+ event: "owner_near_submitting",
146
+ operationId: SigningSessionIds.signingOperation(operationId)
147
+ };
148
+ }
149
+ //#endregion
150
+ export { parseOwnerNearCommand, parseOwnerNearOutcome, parseOwnerNearRecovery, parseOwnerNearSubmissionProgress };
151
+
152
+ //# sourceMappingURL=ownerNearOperation.js.map
@@ -1,6 +1,6 @@
1
1
  import { normalizeTrimmedString } from "../../../shared-ts/src/utils/normalize.js";
2
- import { toAccountId } from "../../types/accountIds.js";
3
2
  import { SIGNER_AUTH_METHODS, SIGNER_KINDS } from "../../../shared-ts/src/utils/signerDomain.js";
3
+ import { toAccountId } from "../../types/accountIds.js";
4
4
  import { normalizeIndexedDbAccountAddress } from "../../indexedDB/normalization.js";
5
5
  import { getLastSelectedProfileAccountByChain, resolveProfileAccountProjection } from "../../indexedDB/profileAccountProjection.js";
6
6
  import { getNearChainCandidates } from "./accountRefs.js";
@@ -5,12 +5,18 @@ function parseWalletAuthMethodPlugins(value) {
5
5
  const plugins = [];
6
6
  const seen = /* @__PURE__ */ new Set();
7
7
  for (const candidate of value) {
8
- if (!isPlainObject(candidate) || Object.keys(candidate).length !== 1 || candidate.kind !== "voiceid" || seen.has(candidate.kind)) throw new Error("Unsupported or duplicate wallet auth method plugin.");
8
+ if (!isPlainObject(candidate) || Object.keys(candidate).some(unknownVoiceIdOption) || candidate.kind !== "voiceid" || candidate.transcriptionModel !== void 0 && candidate.transcriptionModel !== "aurora" && candidate.transcriptionModel !== "citrinet" || seen.has(candidate.kind)) throw new Error("Unsupported or duplicate wallet auth method plugin.");
9
9
  seen.add(candidate.kind);
10
- plugins.push({ kind: "voiceid" });
10
+ plugins.push({
11
+ kind: "voiceid",
12
+ transcriptionModel: candidate.transcriptionModel ?? "citrinet"
13
+ });
11
14
  }
12
15
  return plugins;
13
16
  }
17
+ function unknownVoiceIdOption(key) {
18
+ return key !== "kind" && key !== "transcriptionModel";
19
+ }
14
20
  //#endregion
15
21
  export { parseWalletAuthMethodPlugins };
16
22
 
@@ -11,8 +11,8 @@ import { parseWalletAuthMethodRecordV2 } from "../../../shared-ts/src/utils/wall
11
11
  import { encodeWalletSignerActivationSetV1, extendEcdsaWalletAuthorityWithEd25519, isActiveEcdsaWalletAuthorityV1, isActiveRecoveredWalletAuthorityV1, isEcdsaExtensionOfEd25519WalletAuthority, parseWalletAuthorityV1, walletAuthorityDigestsMatchV1 } from "../../../shared-ts/src/authorization/walletAuthority.js";
12
12
  import { parseLocalAuthorityInstallationReceiptV1 } from "../../../shared-ts/src/device-linking/authorityActivation.js";
13
13
  import "../../../shared-ts/src/device-linking/index.js";
14
- import { toAccountId } from "../../types/accountIds.js";
15
14
  import { SIGNER_KINDS } from "../../../shared-ts/src/utils/signerDomain.js";
15
+ import { toAccountId } from "../../types/accountIds.js";
16
16
  import { parseNearProvisioningState } from "../../types/sdkSentEvents.js";
17
17
  import { parseEcdsaThresholdKeyId } from "../../signingEngine/session/keyMaterialBrands.js";
18
18
  import { walletIdFromString } from "../../../shared-ts/src/utils/registrationIds.js";
@@ -3719,7 +3719,7 @@ var SeamsWalletRepositories = class {
3719
3719
  registration: input.registration
3720
3720
  });
3721
3721
  const walletSession = input.walletSessionPublication.walletSession;
3722
- if (walletSession.walletId !== pending.walletId || walletSession.authorityId !== foundingAuthority.authority.authorityId || walletSession.authMethodId !== pending.walletAuthMethodId || walletSession.authorityDigestB64u !== foundingAuthority.authority.authorityDigestB64u || walletSession.authorityRevocationEpoch !== foundingAuthority.authority.revocationEpoch) throw new Error("registration Wallet Session identity does not match the pending wallet");
3722
+ if (walletSession !== void 0 && (walletSession.walletId !== pending.walletId || walletSession.authorityId !== foundingAuthority.authority.authorityId || walletSession.authMethodId !== pending.walletAuthMethodId || walletSession.authorityDigestB64u !== foundingAuthority.authority.authorityDigestB64u || walletSession.authorityRevocationEpoch !== foundingAuthority.authority.revocationEpoch)) throw new Error("registration Wallet Session identity does not match the pending wallet");
3723
3723
  return this.manager.runTransaction(WALLET_REGISTRATION_PUBLICATION_STORES, "readwrite", this.publishPendingWalletRegistrationCommitInTransaction.bind(this, {
3724
3724
  request: input.request,
3725
3725
  pending,
@@ -3771,7 +3771,8 @@ var SeamsWalletRepositories = class {
3771
3771
  active: input.walletSessionPublication.walletSession,
3772
3772
  operationCredential: input.walletSessionPublication.operationCredential
3773
3773
  });
3774
- } else {
3774
+ } else if (input.walletSessionPublication.kind === "owner_operations") sessionPublication = "locked_identity";
3775
+ else {
3775
3776
  const existingSession = await readExactActiveWalletSessionForScopeInTransaction({
3776
3777
  ctx,
3777
3778
  walletId: input.pending.walletId,
@@ -80,7 +80,7 @@ async function postJson(args) {
80
80
  const response = await fetch(`${normalizeRelayerBaseUrl(args.relayerUrl, { trim: false })}${args.path}`, buildRelayerJsonPostRequestInit({
81
81
  headers: {
82
82
  ...args.headers,
83
- [WALLET_MANAGEMENT_PROTOCOL_HEADER]: "4"
83
+ [WALLET_MANAGEMENT_PROTOCOL_HEADER]: "5"
84
84
  },
85
85
  body: args.body,
86
86
  bodyJson: requestBody
@@ -1,9 +1,9 @@
1
1
  import { base64UrlDecode, base64UrlEncode } from "../../../../shared-ts/src/utils/base64.js";
2
2
  import { sha256HexUtf8 } from "../../../../shared-ts/src/utils/digests.js";
3
3
  import { thresholdEcdsaChainTargetKey, toWalletId } from "../../interfaces/ecdsaChainTarget.js";
4
+ import { SIGNER_AUTH_METHODS, SIGNER_KINDS, SIGNER_SOURCES } from "../../../../shared-ts/src/utils/signerDomain.js";
4
5
  import { compactImplicitNearAccountId } from "../../../../shared-ts/src/utils/near.js";
5
6
  import { toAccountId } from "../../../types/accountIds.js";
6
- import { SIGNER_AUTH_METHODS, SIGNER_KINDS, SIGNER_SOURCES } from "../../../../shared-ts/src/utils/signerDomain.js";
7
7
  import { NEAR_ED25519_YAO_KEY_VERSION_V1 } from "../../../../shared-ts/src/utils/registrationSignerPlan.js";
8
8
  import { nearEd25519SigningKeyIdFromString } from "../../../../shared-ts/src/utils/registrationIds.js";
9
9
  import { parseSignerSlot } from "../../../../shared-ts/src/utils/signerSlot.js";
@@ -1,8 +1,8 @@
1
1
  import { isUserCancellationError } from "../../../../shared-ts/src/utils/errors.js";
2
2
  import { secureRandomId } from "../../../../shared-ts/src/utils/secureRandomId.js";
3
- import { SigningEventPhase } from "../../../types/sdkSentEvents.js";
4
3
  import { signingLaneAuthMethod } from "../../session/identity/signingLaneAuthBinding.js";
5
4
  import { SigningKeyRefIntentKind, SigningSessionPlanKind } from "../../session/operationState/types.js";
5
+ import { SigningEventPhase } from "../../../types/sdkSentEvents.js";
6
6
  import { SigningAuthPlanKind } from "../../stepUpConfirmation/types.js";
7
7
  import { SigningOperationCancellationPhase, SigningOperationCommandKind, applySigningOperationInteractionEvent, cancelSigningOperation, planSigningOperationAttempt, runSigningOperationCommand } from "./signingStateMachine.js";
8
8
  import { confirmSigningOperation } from "../../stepUpConfirmation/confirmOperation.js";
@@ -1,8 +1,8 @@
1
1
  import { thresholdEcdsaChainTargetKey, toWalletId } from "../../interfaces/ecdsaChainTarget.js";
2
2
  import { SIGNER_AUTH_METHODS } from "../../../../shared-ts/src/utils/signerDomain.js";
3
- import { SigningEventPhase } from "../../../types/sdkSentEvents.js";
4
3
  import { signingLaneAuthBindingKey } from "../../session/identity/signingLaneAuthBinding.js";
5
4
  import { SigningOperationIntent } from "../../session/operationState/types.js";
5
+ import { SigningEventPhase } from "../../../types/sdkSentEvents.js";
6
6
  import { exactEcdsaSigningLaneIdentityFromSelectedLane, requireEvmFamilyEcdsaSigner } from "../../session/identity/exactSigningLaneIdentity.js";
7
7
  import { reviewAdmissionForBinding } from "../../uiConfirm/transactionReviewAdmission.js";
8
8
  import { buildEvmDisplayModel } from "../../chains/evm/display/evmTx.js";
@@ -1,8 +1,8 @@
1
1
  import { base64UrlEncode } from "../../../../shared-ts/src/utils/base64.js";
2
2
  import { alphabetizeStringify } from "../../../../shared-ts/src/utils/digests.js";
3
3
  import { parseDigestB64u, sha256Utf8DigestB64u } from "../../../../shared-ts/src/utils/canonicalPrimitives.js";
4
- import { SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
5
4
  import { SigningSessionIds } from "../../session/operationState/types.js";
5
+ import { SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
6
6
  import { normalizeAuthenticationCredential } from "../../webauthnAuth/credentials/helpers.js";
7
7
  import { bytesToHex } from "../../chains/evm/bytes.js";
8
8
  import { isActiveWalletAuthoritySigningAuthPlan, isWarmSessionSigningAuthPlan } from "../../stepUpConfirmation/types.js";
@@ -5,15 +5,15 @@ import { WorkerResponseType } from "../../../../types/signer-worker.js";
5
5
  import { resolveNearNetwork } from "../../../../config/chains.js";
6
6
  import { PASSKEY_MANAGER_DEFAULT_CONFIGS } from "../../../../config/defaultConfigs.js";
7
7
  import { activeWalletSessionV1RecordsEqual } from "../../../../../shared-ts/src/device-linking/activeWalletSession.js";
8
+ import { SigningSessionIds } from "../../../session/operationState/types.js";
8
9
  import { base58Decode } from "../../../../../shared-ts/src/utils/base58.js";
9
10
  import { ensureEd25519Prefix } from "../../../../../shared-ts/src/utils/near.js";
10
- import { SigningSessionIds } from "../../../session/operationState/types.js";
11
11
  import { ActionType, fromActionArgsWasm } from "../../../../../shared-ts/src/near/actions.js";
12
+ import { parseThresholdEd25519NearTransaction, thresholdEd25519NearTransactionOperationFingerprint } from "../../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
12
13
  import { WalletSessionStatusReadScope } from "../../../../rpcClients/relayer/walletSessionAuthorizationStatus.js";
13
14
  import { emitEd25519SigningTiming } from "../../../session/operationState/trace.js";
14
15
  import { buildCapabilityOperationEnvelope, parseSigningOperationFingerprintDigest } from "../../../../../shared-ts/src/authorization/operationFingerprint.js";
15
16
  import { buildRouterAbEd25519DelegateActionPrepareRequestV2, buildRouterAbEd25519NearTransactionPrepareRequestV2, buildRouterAbEd25519Nep413PrepareRequestV2, buildRouterAbEd25519NormalSigningFinalizeRequestV2, finalizeRouterAbNormalSigningV2, prepareRouterAbNormalSigningV2, routerAbCanonicalWireBytesToB64u, routerAbNormalSigningActionFingerprint } from "../../../../rpcClients/relayer/routerAbNormalSigning.js";
16
- import { parseThresholdEd25519NearTransaction, thresholdEd25519NearTransactionOperationFingerprint } from "../../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
17
17
  import { buildThresholdEd25519DelegateSigningPayloadWasm, buildThresholdEd25519NearTxUnsignedBorshWasm, decodeThresholdEd25519SignedNearTxBorshWasm, finalizeThresholdEd25519DelegateFromSignatureWasm, finalizeThresholdEd25519NearTxFromSignatureWasm } from "../../../chains/near/nearSignerWasm.js";
18
18
  import { requireRouterAbNormalSigningPrepareMatchesRequest, requireRouterAbNormalSigningResponseMatchesRequest } from "../../../../rpcClients/relayer/routerAbNormalSigningValidation.js";
19
19
  import { requireRouterAbEd25519NormalSigningReadyState } from "../../../session/warmCapabilities/routerAbWalletSessionCredential.js";
@@ -2,17 +2,17 @@ import { WorkerResponseType } from "../../../types/signer-worker.js";
2
2
  import { resolveNearNetwork, resolvePrimaryNearRpcUrl } from "../../../config/chains.js";
3
3
  import { normalizeThresholdEd25519ParticipantIds } from "../../../../shared-ts/src/threshold/participants.js";
4
4
  import { PASSKEY_MANAGER_DEFAULT_CONFIGS } from "../../../config/defaultConfigs.js";
5
+ import { SigningOperationIntent, SigningSessionIds } from "../../session/operationState/types.js";
5
6
  import { ensureEd25519Prefix } from "../../../../shared-ts/src/utils/near.js";
6
7
  import { toAccountId } from "../../../types/accountIds.js";
8
+ import { parseThresholdEd25519NearAction, thresholdEd25519DelegateActionOperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
7
9
  import { SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
8
- import { SigningOperationIntent, SigningSessionIds } from "../../session/operationState/types.js";
9
10
  import { computeUiIntentDigestFromTxs, orderActionForDigest } from "../../../../utils/intentDigest.js";
10
11
  import { isWarmSessionSigningAuthPlan } from "../../stepUpConfirmation/types.js";
11
12
  import { emitEd25519SigningTiming } from "../../session/operationState/trace.js";
12
13
  import { SigningOperationCommandKind, runSigningOperationCommand } from "../shared/signingStateMachine.js";
13
14
  import { resolveNearSigningMaterials } from "./shared/signingMaterials.js";
14
15
  import { buildNearDelegateSigningPayloads } from "../../chains/near/payloads.js";
15
- import { parseThresholdEd25519NearAction, thresholdEd25519DelegateActionOperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
16
16
  import { computeThresholdEd25519DelegateSigningDigestWasm } from "../../chains/near/nearSignerWasm.js";
17
17
  import { finalizeThresholdEd25519DelegateSignatureResult } from "./shared/ed25519YaoNormalSigning.js";
18
18
  import { toPublicKeyString } from "../../workerManager/validation.js";
@@ -1,11 +1,10 @@
1
- import { secureRandomBase64Url } from "../../../../shared-ts/src/utils/secureRandomId.js";
2
1
  import { toWalletId } from "../../interfaces/ecdsaChainTarget.js";
3
2
  import { parsePasskeyWalletAuthAuthority, walletAuthAuthorityRef } from "../../../../shared-ts/src/utils/walletAuthAuthority.js";
4
- import { toAccountId } from "../../../types/accountIds.js";
5
3
  import { SENSITIVE_OPERATION_POLICIES, SIGNER_AUTH_METHODS } from "../../../../shared-ts/src/utils/signerDomain.js";
6
- import { SIGNING_SESSION_EXPIRY_DETECTION_SOURCES, SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
7
4
  import { signingLaneAuthBindingKey, signingLaneAuthMethod } from "../../session/identity/signingLaneAuthBinding.js";
8
5
  import { SigningOperationIntent, SigningSessionIds, SigningSessionPlanKind } from "../../session/operationState/types.js";
6
+ import { toAccountId } from "../../../types/accountIds.js";
7
+ import { SIGNING_SESSION_EXPIRY_DETECTION_SOURCES, SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
9
8
  import { parseSignerSlot } from "../../../../shared-ts/src/utils/signerSlot.js";
10
9
  import { exactEd25519SigningLaneIdentityFromSelectedLane, exactSigningLaneIdentityKey, nearEd25519SignerBindingFromBoundaryFields } from "../../session/identity/exactSigningLaneIdentity.js";
11
10
  import { demoEmailOtpCodeFromDelivery } from "../../session/emailOtp/challengeDelivery.js";
@@ -80,10 +79,6 @@ function prepareReviewBoundNearMaterial(prepare, admission, input) {
80
79
  admission?.assertAuthMethodPolicy(method);
81
80
  return prepare(input);
82
81
  }
83
- function createNearTransactionSigningOperationId() {
84
- const randomId = secureRandomBase64Url(32, "NEAR transaction signing operation IDs");
85
- return SigningSessionIds.signingOperation(`near-transaction-sign:${randomId}`);
86
- }
87
82
  function summarizeNearEd25519Lane(lane) {
88
83
  if (lane.state === "missing") return {
89
84
  state: lane.state,
@@ -759,7 +754,7 @@ async function signTransaction(deps, args) {
759
754
  confirmationConfigOverride: args.confirmationConfigOverride
760
755
  });
761
756
  try {
762
- const operationId = createNearTransactionSigningOperationId();
757
+ const operationId = SigningSessionIds.signingOperation(deps.createSigningSessionId("near-transaction-sign"));
763
758
  emitEd25519SigningTiming(String(operationId), "preparation_modal", modalStartedAt);
764
759
  return await signTransactionWithActionsAttempt(deps, args, { signingOperationState: createSigningOperationStateRef({ operationId }) });
765
760
  } finally {
@@ -4,11 +4,11 @@ import { resolveNearNetwork } from "../../../config/chains.js";
4
4
  import { normalizeThresholdEd25519ParticipantIds } from "../../../../shared-ts/src/threshold/participants.js";
5
5
  import { PASSKEY_MANAGER_DEFAULT_CONFIGS } from "../../../config/defaultConfigs.js";
6
6
  import { SigningOperationIntent, SigningSessionIds } from "../../session/operationState/types.js";
7
+ import { thresholdEd25519Nep413OperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
7
8
  import { computeUiIntentDigestFromNep413 } from "../../../../utils/intentDigest.js";
8
9
  import { emitEd25519SigningTiming } from "../../session/operationState/trace.js";
9
10
  import { SigningOperationCommandKind, runSigningOperationCommand } from "../shared/signingStateMachine.js";
10
11
  import { resolveNearSigningMaterials } from "./shared/signingMaterials.js";
11
- import { thresholdEd25519Nep413OperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
12
12
  import { computeThresholdEd25519Nep413SigningDigestWasm } from "../../chains/near/nearSignerWasm.js";
13
13
  import { authorizeNearSignatureOnlyOperation, confirmNearSignatureOnlyOperation, prepareNearSignatureOnlyStepUp, resolveNearSignatureOnlySigningMaterial, resolveNearSignatureOnlySigningPlans, runNearSignatureOnlySignCommand, signNearSignatureOnlyOperation, startNearSignatureOnlyPrepare } from "./shared/signatureOnlySigning.js";
14
14
  //#region src/core/signingEngine/flows/signNear/signNep413.ts
@@ -2,9 +2,10 @@ import { resolveNearNetwork, resolvePrimaryNearRpcUrl } from "../../../config/ch
2
2
  import { normalizeThresholdEd25519ParticipantIds } from "../../../../shared-ts/src/threshold/participants.js";
3
3
  import { PASSKEY_MANAGER_DEFAULT_CONFIGS } from "../../../config/defaultConfigs.js";
4
4
  import { SignedTransaction } from "../../../rpcClients/near/NearClient.js";
5
+ import { SigningOperationIntent, SigningSessionIds, SigningSessionPlanKind } from "../../session/operationState/types.js";
5
6
  import { toAccountId } from "../../../types/accountIds.js";
7
+ import { parseThresholdEd25519NearTransaction, thresholdEd25519NearTransactionPlanningOperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
6
8
  import { SigningEventPhase, createSigningFlowEvent } from "../../../types/sdkSentEvents.js";
7
- import { SigningOperationIntent, SigningSessionIds, SigningSessionPlanKind } from "../../session/operationState/types.js";
8
9
  import { nearEd25519SignerBindingFromBoundaryFields } from "../../session/identity/exactSigningLaneIdentity.js";
9
10
  import { computeUiIntentDigestFromTxs, orderActionForDigest } from "../../../../utils/intentDigest.js";
10
11
  import { isWarmSessionSigningAuthPlan } from "../../stepUpConfirmation/types.js";
@@ -15,7 +16,6 @@ import { buildSigningConfirmationAuthParams } from "../../stepUpConfirmation/con
15
16
  import { confirmationConfigForSigningAuthPlan, resolveSigningConfirmationAuthMethod, runTransactionSigningConfirmationCommand } from "../shared/signingConfirmation.js";
16
17
  import { resolveNearSigningMaterials } from "./shared/signingMaterials.js";
17
18
  import { buildNearTransactionSigningPayload } from "../../chains/near/payloads.js";
18
- import { parseThresholdEd25519NearTransaction, thresholdEd25519NearTransactionPlanningOperationFingerprint } from "../../../../shared-ts/src/threshold/ed25519OperationFingerprint.js";
19
19
  import { requireNearStepUpAuth, signingAuthPlanForNearMaterialRequirement } from "./requireNearStepUpAuth.js";
20
20
  import { emitNearSigningConfirmationProgress } from "./shared/confirmationProgress.js";
21
21
  import { buildNearEd25519StepUpAuthorization } from "./stepUpAuthorization.js";
@@ -415,12 +415,11 @@ async function runNearAuthorizationRequiredTransactionSigning(payload) {
415
415
  });
416
416
  await markNearNonceLeasesSigned(ctx, confirmation.readiness.nonceLeases);
417
417
  return signed;
418
- } catch (error) {
418
+ } finally {
419
419
  disposeOwnedNearOperationStepUpMaterial({
420
420
  resolved: resolvedOperationStepUpMaterial,
421
421
  owned: operationStepUpMaterial.kind === "passkey_sealed" || operationStepUpMaterial.kind === "email_otp_sealed"
422
422
  });
423
- throw error;
424
423
  }
425
424
  }
426
425
  async function runAuthorizedNearTransactionWithActionsSigning({ ctx, commandSubject, nearAccount, transaction, rpcCall, onEvent, confirmationConfigOverride, title, body, signerSlot, signingOperationState, signingSessionCoordinator: sessionCoordinator, transactionOperation, ed25519SigningBoundary, passkeyEd25519OperationStepUp, emailOtpEd25519StepUp, yaoSigningPreparation, yaoMaterialExecutor }) {
@@ -2,8 +2,8 @@ import { parseMpcMaterialActivationRef, parseWalletAuthMethodId } from "../../..
2
2
  import { alphabetizeStringify } from "../../../../shared-ts/src/utils/digests.js";
3
3
  import { parseDigestB64u } from "../../../../shared-ts/src/utils/canonicalPrimitives.js";
4
4
  import { thresholdEcdsaChainTargetFromRequest, thresholdEcdsaChainTargetKey, toWalletId } from "../../interfaces/ecdsaChainTarget.js";
5
- import { isImplicitNearAccountId, parseNearAccountId } from "../../../../shared-ts/src/utils/near.js";
6
5
  import { SigningSessionIds } from "../operationState/types.js";
6
+ import { isImplicitNearAccountId, parseNearAccountId } from "../../../../shared-ts/src/utils/near.js";
7
7
  import { buildImplicitNearAccountBinding, buildNamedNearAccountBinding, buildNearEd25519SignerBinding, buildWalletIdentity, nearEd25519SignerBindingFromRaw } from "../../../../shared-ts/src/utils/walletCapabilityBindings.js";
8
8
  import { buildBaseEvmFamilyEcdsaKeyIdentity, toEvmFamilyEcdsaKeyHandle, toRpId } from "./evmFamilyEcdsaIdentity.js";
9
9
  //#region src/core/signingEngine/session/identity/exactSigningLaneIdentity.ts
@@ -305,6 +305,11 @@ const walletMessages = [
305
305
  ["Dark mode", "ダークモード"],
306
306
  ["Unable to lock your wallet. Try again.", "ウォレットをロックできません。もう一度お試しください。"],
307
307
  ["Unlocked on this device", "このデバイスでロック解除済み"],
308
+ ["Connected with Google", "Google で接続中"],
309
+ ["Wallet access", "ウォレットへのアクセス"],
310
+ ["Connected to your wallet", "ウォレットに接続しています"],
311
+ ["Method {value0}", "認証方法 {value0}"],
312
+ ["Confirm with a wallet authentication method to make security changes.", "セキュリティ設定を変更するには、ウォレットの認証方法で本人確認してください。"],
308
313
  ["All settings", "すべての設定"],
309
314
  ["Locking…", "ロック中…"],
310
315
  ["Lock wallet", "ウォレットをロック"],
package/dist/esm/index.js CHANGED
@@ -4,6 +4,8 @@ import { PASSKEY_MANAGER_DEFAULT_CONFIGS, buildConfigsFromEnv } from "./core/con
4
4
  import { configuredThresholdEcdsaChainTargets, nearAccountRefFromAccountId, thresholdEcdsaChainTargetFromChainFamily, thresholdEcdsaChainTargetFromConfig, thresholdEcdsaChainTargetFromConfiguredRequest, thresholdEcdsaChainTargetFromRequest, thresholdEcdsaChainTargetKey, thresholdEcdsaChainTargetsEqual, toWalletId, walletIdFromWalletProfile, walletSessionRefFromSession } from "./core/signingEngine/interfaces/ecdsaChainTarget.js";
5
5
  import { BrowserCapabilityUnavailableError } from "./SeamsWeb/publicApi/capabilitySelection.js";
6
6
  import { toAccountId } from "./core/types/accountIds.js";
7
+ import { ActionType } from "./shared-ts/src/near/actions.js";
8
+ import { parseOwnerNearRecovery } from "./SeamsWeb/walletIframe/shared/ownerNearOperation.js";
7
9
  import { AccountSyncEventPhase, KeyExportEventPhase, LinkDeviceEventPhase, RegistrationEventPhase, SigningEventPhase, UnlockEventPhase, WALLET_FLOW_EVENT_MESSAGES, WALLET_FLOW_EVENT_STEPS, WALLET_FLOW_EVENT_VERSION, createAccountSyncFlowEvent, createKeyExportFlowEvent, createLinkDeviceFlowEvent, createRegistrationFlowEvent, createSigningFlowEvent, createUnlockFlowEvent, createWalletFlowEvent, isWalletFlowEvent } from "./core/types/sdkSentEvents.js";
8
10
  import { buildHostedAuthMenuOpenRequest, hostedAuthMenuExternalAuthRequestIdFromBoundary, hostedAuthMenuSessionIdFromBoundary } from "./SeamsWeb/walletIframe/shared/messages.js";
9
11
  import { SeamsWeb } from "./SeamsWeb/SeamsWeb.js";
@@ -11,8 +13,7 @@ import { ExternalEvmController } from "./externalEvm/controller.js";
11
13
  import { DEVICE_LINKING_CONFIG, SIGNER_WORKER_MANAGER_CONFIG } from "./config.js";
12
14
  import { defineSeamsConfig, seamsTestnetConfig } from "./core/config/defineConfig.js";
13
15
  import { DEFAULT_WAIT_STATUS } from "./core/types/rpc.js";
14
- import { ActionType } from "./shared-ts/src/near/actions.js";
15
16
  import { AmountError, parseEther, parseNear, parseUnits, yoctoNear } from "./core/types/amounts.js";
16
17
  import { addKey, createAccount, deleteAccount, deleteKey, deployContract, functionCall, stake, transfer } from "./core/types/actionBuilders.js";
17
18
  import { logWalletEvents } from "./core/types/eventLogging.js";
18
- export { AccountSyncEventPhase, ActionType, AmountError, BrowserCapabilityUnavailableError, DEFAULT_WAIT_STATUS, DEVICE_LINKING_CONFIG, ExternalEvmController, KeyExportEventPhase, LinkDeviceEventPhase, PASSKEY_MANAGER_DEFAULT_CONFIGS, RegistrationEventPhase, SIGNER_WORKER_MANAGER_CONFIG, SeamsWeb, SigningEventPhase, UnlockEventPhase, WALLET_FLOW_EVENT_MESSAGES, WALLET_FLOW_EVENT_STEPS, WALLET_FLOW_EVENT_VERSION, addKey, buildConfigsFromEnv, buildHostedAuthMenuOpenRequest, configuredThresholdEcdsaChainTargets, createAccount, createAccountSyncFlowEvent, createKeyExportFlowEvent, createLinkDeviceFlowEvent, createRegistrationFlowEvent, createSigningFlowEvent, createUnlockFlowEvent, createWalletFlowEvent, defineSeamsConfig, deleteAccount, deleteKey, deployContract, functionCall, hostedAuthMenuExternalAuthRequestIdFromBoundary, hostedAuthMenuSessionIdFromBoundary, isWalletFlowEvent, logWalletEvents, nearAccountRefFromAccountId, normalizeWalletLocale, parseEther, parseNear, parseUnits, parseWalletMoveId, seamsTestnetConfig, stake, thresholdEcdsaChainTargetFromChainFamily, thresholdEcdsaChainTargetFromConfig, thresholdEcdsaChainTargetFromConfiguredRequest, thresholdEcdsaChainTargetFromRequest, thresholdEcdsaChainTargetKey, thresholdEcdsaChainTargetsEqual, toAccountId, toWalletId, transfer, walletIdFromWalletProfile, walletSessionRefFromSession, yoctoNear };
19
+ export { AccountSyncEventPhase, ActionType, AmountError, BrowserCapabilityUnavailableError, DEFAULT_WAIT_STATUS, DEVICE_LINKING_CONFIG, ExternalEvmController, KeyExportEventPhase, LinkDeviceEventPhase, PASSKEY_MANAGER_DEFAULT_CONFIGS, RegistrationEventPhase, SIGNER_WORKER_MANAGER_CONFIG, SeamsWeb, SigningEventPhase, UnlockEventPhase, WALLET_FLOW_EVENT_MESSAGES, WALLET_FLOW_EVENT_STEPS, WALLET_FLOW_EVENT_VERSION, addKey, buildConfigsFromEnv, buildHostedAuthMenuOpenRequest, configuredThresholdEcdsaChainTargets, createAccount, createAccountSyncFlowEvent, createKeyExportFlowEvent, createLinkDeviceFlowEvent, createRegistrationFlowEvent, createSigningFlowEvent, createUnlockFlowEvent, createWalletFlowEvent, defineSeamsConfig, deleteAccount, deleteKey, deployContract, functionCall, hostedAuthMenuExternalAuthRequestIdFromBoundary, hostedAuthMenuSessionIdFromBoundary, isWalletFlowEvent, logWalletEvents, nearAccountRefFromAccountId, normalizeWalletLocale, parseEther, parseNear, parseOwnerNearRecovery, parseUnits, parseWalletMoveId, seamsTestnetConfig, stake, thresholdEcdsaChainTargetFromChainFamily, thresholdEcdsaChainTargetFromConfig, thresholdEcdsaChainTargetFromConfiguredRequest, thresholdEcdsaChainTargetFromRequest, thresholdEcdsaChainTargetKey, thresholdEcdsaChainTargetsEqual, toAccountId, toWalletId, transfer, walletIdFromWalletProfile, walletSessionRefFromSession, yoctoNear };
@@ -2,6 +2,16 @@ import { nearAccountRefFromAccountId, walletSessionRefFromSession } from "../cor
2
2
  import { createReviewedBoundCalls } from "./transactionReview/boundCalls.js";
3
3
  //#region src/react/boundWallet.ts
4
4
  function createBoundWallet(seams, loginState, host, owner) {
5
+ if (loginState.access === "external") return {
6
+ access: "external",
7
+ walletId: loginState.walletId,
8
+ authentication: loginState.externalSettings.authentication,
9
+ near: loginState.nearAccountId ? {
10
+ accountId: loginState.nearAccountId,
11
+ prepareOwnerTransaction: prepareReadableOwnerTransaction.bind(null, seams, loginState.externalSettings.authentication, loginState.nearAccountId),
12
+ resumeOwnerTransaction: resumeReadableOwnerTransaction.bind(null, seams, loginState.externalSettings.authentication)
13
+ } : null
14
+ };
5
15
  const { walletId, nearAccountId } = loginState;
6
16
  const walletSession = walletSessionRefFromSession({ walletId });
7
17
  const nearAccount = nearAccountId ? nearAccountRefFromAccountId(nearAccountId) : null;
@@ -14,6 +24,7 @@ function createBoundWallet(seams, loginState, host, owner) {
14
24
  owner
15
25
  });
16
26
  return {
27
+ access: "wallet",
17
28
  walletId,
18
29
  walletSession,
19
30
  near: nearAccount && nearAccountId ? {
@@ -50,6 +61,19 @@ function exportKey(seams, walletSession, nearAccount, input) {
50
61
  walletSession
51
62
  });
52
63
  }
64
+ function prepareReadableOwnerTransaction(seams, authentication, nearAccountId, input) {
65
+ return seams.near.prepareOwnerTransaction({
66
+ authentication,
67
+ nearAccountId,
68
+ transaction: input.transaction
69
+ });
70
+ }
71
+ function resumeReadableOwnerTransaction(seams, authentication, input) {
72
+ return seams.near.resumeOwnerTransaction({
73
+ authentication,
74
+ recovery: input.recovery
75
+ });
76
+ }
53
77
  //#endregion
54
78
  export { createBoundWallet };
55
79