@seams/wallet 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -5
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/index.js +1 -1
- package/dist/esm/SeamsWeb/walletIframe/client/inboundMessages.js +1 -1
- package/dist/esm/SeamsWeb/walletIframe/client/router.js +10 -4
- package/dist/esm/SeamsWeb/walletIframe/coordinator.js +23 -1
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.js +5 -4
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +121 -246
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/icons.js +37 -1
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +4 -2
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.js +117 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.js +60 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/facadeBoundary.js +2 -0
- package/dist/esm/core/browser/walletIframe/events.js +6 -0
- package/dist/esm/core/config/configBuilder.js +2 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/appearance.js +27 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/export-private-key-reveal.js +155 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/export-viewer-host.js +209 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.js +7 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.js +10 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.js +9 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.js +9 -6
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.js +7 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.js +4 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpContent.js +4 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.js +5 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.js +319 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.js +10 -7
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.js +9 -5
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.js +28 -22
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.js +2 -1
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.js +51 -26
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.js +42 -27
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionReview.js +25 -18
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/TransactionTree.js +8 -5
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/WalletLocale.js +24 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountConfirmationSurface.js +6 -4
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountExportPrivateKeySurface.js +92 -0
- package/dist/esm/core/signingEngine/uiConfirm/ui/preact/mountRecoveryCodeBackupSurface.js +4 -2
- package/dist/esm/core/signingEngine/uiConfirm/ui/surface-measurement-binding.js +12 -0
- package/dist/esm/core/ui/locale.js +10 -0
- package/dist/esm/core/ui/messages.js +698 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonMock.js +7 -3
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +7 -4
- package/dist/esm/react/components/AccountMenuButton/AccountMenuDeviceDetails.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/AccountMenuDialog.js +5 -2
- package/dist/esm/react/components/AccountMenuButton/AccountMenuMockScreens.js +31 -27
- package/dist/esm/react/components/AccountMenuButton/AccountMenuScreen.js +6 -3
- package/dist/esm/react/components/AccountMenuButton/AccountsSection.js +6 -3
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodRow.js +5 -4
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +33 -27
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsView.js +5 -2
- package/dist/esm/react/components/AccountMenuButton/ExportKeysScreen.js +5 -3
- package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.css +20 -0
- package/dist/esm/react/components/AccountMenuButton/ExportKeysSection.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.css +9 -3
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +50 -41
- package/dist/esm/react/components/AccountMenuButton/LockMenuItem.js +2 -1
- package/dist/esm/react/components/AccountMenuButton/MenuItem.js +3 -2
- package/dist/esm/react/components/AccountMenuButton/ProfileDropdown.js +8 -4
- package/dist/esm/react/components/AccountMenuButton/RecoveryCodeAcknowledgement.js +3 -2
- package/dist/esm/react/components/AccountMenuButton/RecoveryCodeActions.js +4 -3
- package/dist/esm/react/components/AccountMenuButton/SegmentedControl.js +2 -1
- package/dist/esm/react/components/AccountMenuButton/TransactionSettingsSection.js +11 -10
- package/dist/esm/react/components/AccountMenuButton/UserAccountButton.css +1 -0
- package/dist/esm/react/components/AccountMenuButton/UserAccountButton.js +8 -4
- package/dist/esm/react/components/AccountMenuButton/WalletRegionSection.js +22 -15
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +20 -16
- package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +15 -0
- package/dist/esm/react/components/AccountMenuButton/index.js +18 -15
- package/dist/esm/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.js +30 -26
- package/dist/esm/react/components/QRCodeScanner.js +28 -23
- package/dist/esm/react/components/ShowQRCode.js +39 -31
- package/dist/esm/react/components/theme/ThemeProvider.js +3 -0
- package/dist/esm/react/context/WalletLocale.js +15 -0
- package/dist/esm/react/context/index.js +8 -3
- package/dist/esm/react/styles/styles.css +36 -0
- package/dist/esm/sdk/ConfirmationDrawer-DCw0m-Iv.js +1 -0
- package/dist/{public/sdk/NonceCoordinator-DuDKN-B8.js → esm/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
- package/dist/{public/sdk/accountLifecycle-D61FIpFS.js → esm/sdk/accountLifecycle-fLNUdjct.js} +1 -1
- package/dist/{public/sdk/activeWalletSession-Ba6X4CUN.js → esm/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
- package/dist/esm/sdk/adapters-BNmcyf9K.js +2 -0
- package/dist/esm/sdk/appearance-token-vars-DxBm_cKA.js +2 -0
- package/dist/esm/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
- package/dist/esm/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
- package/dist/{public/sdk/clientSessionPersistenceState-BHRUSWMt.js → esm/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
- package/dist/esm/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
- package/dist/esm/sdk/configBuilder-BMNShuOu.js +1 -0
- package/dist/esm/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
- package/dist/esm/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
- package/dist/esm/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
- package/dist/{public/sdk/ecdsaCapabilityManifest-DzA996y9.js → esm/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → esm/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationExport-DyugdheE.js → esm/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
- package/dist/esm/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
- package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → esm/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
- package/dist/esm/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-DsdzagKK.js} +1 -1
- package/dist/{public/sdk/exportKeypairOperation-SJPysnE1.js → esm/sdk/exportKeypairOperation-BwW_E4Lt.js} +1 -1
- package/dist/esm/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
- package/dist/esm/sdk/{host-GPb_mSAQ.js → host-DMR4KDy9.js} +1 -1
- package/dist/esm/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
- package/dist/esm/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
- package/dist/esm/sdk/localOnly-DO191vDh.js +1 -0
- package/dist/esm/sdk/mountExportPrivateKeySurface-DQzFzhNu.js +1 -0
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +2 -0
- package/dist/{public/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → esm/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
- package/dist/{public/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → esm/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
- package/dist/esm/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
- package/dist/esm/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
- package/dist/{public/sdk/passkey-custody-CBSal3E9.js → esm/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
- package/dist/esm/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-DOeIn_Qj.js} +1 -1
- package/dist/{public/sdk/presignaturePool-CQNt13kE.js → esm/sdk/presignaturePool-BHoxnbOA.js} +1 -1
- package/dist/esm/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
- package/dist/esm/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
- package/dist/esm/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
- package/dist/esm/sdk/{registration-49OGU_GZ.js → registration-DknFwoqn.js} +1 -1
- package/dist/esm/sdk/{registration-C7tywPXF.js → registration-sQndIWRF.js} +1 -1
- package/dist/esm/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
- package/dist/esm/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
- package/dist/{public/sdk/registrationIntent-PqmcTEE3.js → esm/sdk/registrationIntent-D4YDjf2U.js} +1 -1
- package/dist/esm/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
- package/dist/{public/sdk/routerAbNormalSigning-xxATTIh5.js → esm/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
- package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/esm/sdk/runtime-auth-BxG-J-BB.js +1 -0
- package/dist/esm/sdk/runtime-device-link-Dn_5hPCq.js +1 -0
- package/dist/esm/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js +1 -0
- package/dist/esm/sdk/runtime-email-otp-CPqTCH8Q.js +1 -0
- package/dist/esm/sdk/runtime-export-Brz53_oi.js +1 -0
- package/dist/esm/sdk/runtime-near-Da_xFUXx.js +1 -0
- package/dist/esm/sdk/runtime-preferences-riUZGaTs.js +1 -0
- package/dist/esm/sdk/runtime-recovery-CTj4nDAM.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-D8T9LQ7-.js} +1 -1
- package/dist/esm/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
- package/dist/esm/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
- package/dist/esm/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
- package/dist/esm/sdk/shared-hx7KVyeq.js +6 -0
- package/dist/esm/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
- package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
- package/dist/esm/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
- package/dist/{public/sdk/signNear-Dno7NsP_.js → esm/sdk/signNear-B000QxBd.js} +1 -1
- package/dist/{public/sdk/signingFlow-DtugI_2z.js → esm/sdk/signingFlow-gl85GOW4.js} +1 -1
- package/dist/esm/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
- package/dist/esm/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
- package/dist/{public/sdk/thresholdEcdsa-murTq-xz.js → esm/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
- package/dist/{public/sdk/transactionState-XbZm9Zon.js → esm/sdk/transactionState-lB2qpkOm.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +1799 -432
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/esm/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/{public/sdk/walletAuthMethodRecord-Bv68Vq-g.js → esm/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
- package/dist/{public/sdk/walletAuthority-v5wvv3IB.js → esm/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
- package/dist/{public/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → esm/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
- package/dist/esm/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
- package/dist/{public/sdk/walletOwnershipGeneration-pMmmJ6XA.js → esm/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
- package/dist/esm/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
- package/dist/{public/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → esm/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
- package/dist/{public/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → esm/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
- package/dist/esm/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
- package/dist/{public/sdk/webauthnP256-XgYu-Y6E.js → esm/sdk/webauthnP256-_ajaNl90.js} +1 -1
- package/dist/esm/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/ConfirmationDrawer-DCw0m-Iv.js +1 -0
- package/dist/{esm/sdk/NonceCoordinator-DuDKN-B8.js → public/sdk/NonceCoordinator-Dq-FZpBz.js} +1 -1
- package/dist/{esm/sdk/accountLifecycle-D61FIpFS.js → public/sdk/accountLifecycle-fLNUdjct.js} +1 -1
- package/dist/{esm/sdk/activeWalletSession-Ba6X4CUN.js → public/sdk/activeWalletSession-BpbnpU9s.js} +1 -1
- package/dist/public/sdk/adapters-BNmcyf9K.js +2 -0
- package/dist/public/sdk/appearance-token-vars-DxBm_cKA.js +2 -0
- package/dist/public/sdk/{canonicalPrimitives-BOzRXzfv.js → canonicalPrimitives-BMP5yILS.js} +1 -1
- package/dist/public/sdk/{challengeDelivery-FD9GHK1T.js → challengeDelivery-CG2J5Qxs.js} +1 -1
- package/dist/{esm/sdk/clientSessionPersistenceState-BHRUSWMt.js → public/sdk/clientSessionPersistenceState-BgO4P6CZ.js} +1 -1
- package/dist/public/sdk/{commitQueue-DOIaR0Hr.js → commitQueue-BW7BpYyA.js} +1 -1
- package/dist/public/sdk/configBuilder-BMNShuOu.js +1 -0
- package/dist/public/sdk/{configHelpers-BXdl5Mxs.js → configHelpers-D50F_Txb.js} +1 -1
- package/dist/public/sdk/{digestEncoding-CbEFYvlJ.js → digestEncoding-aC4dSf_x.js} +1 -1
- package/dist/public/sdk/{display-CY_aJEn6.js → display-WtILOPQR.js} +1 -1
- package/dist/{esm/sdk/ecdsaCapabilityManifest-DzA996y9.js → public/sdk/ecdsaCapabilityManifest-DRc423SV.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationClientWasm-DQlajPpE.js → public/sdk/ecdsaDerivationClientWasm-DmwKWUEb.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationExport-DyugdheE.js → public/sdk/ecdsaDerivationExport-DX89rq_u.js} +1 -1
- package/dist/public/sdk/{ecdsaWalletRecords-C_v74n5X.js → ecdsaWalletRecords-CxxUt3fS.js} +1 -1
- package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-BDVjvnmO.js → public/sdk/emailOtpEcdsaDerivationIdentity-CupWCKNg.js} +1 -1
- package/dist/public/sdk/{export-viewer-host-DsRaS0UH.js → export-viewer-host-DsdzagKK.js} +1 -1
- package/dist/{esm/sdk/exportKeypairOperation-SJPysnE1.js → public/sdk/exportKeypairOperation-BwW_E4Lt.js} +1 -1
- package/dist/public/sdk/{helpers-D3CUEdHI.js → helpers-DS0bksx9.js} +1 -1
- package/dist/public/sdk/{host-GPb_mSAQ.js → host-DMR4KDy9.js} +1 -1
- package/dist/public/sdk/{intentDigest-CGLrsMgj.js → intentDigest-Rh5Mg8X7.js} +1 -1
- package/dist/public/sdk/{lanes-DJKIHJBm.js → lanes-BzU7cv2T.js} +1 -1
- package/dist/public/sdk/localOnly-DO191vDh.js +1 -0
- package/dist/public/sdk/mountExportPrivateKeySurface-DQzFzhNu.js +1 -0
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-B1D0ovqx.js +2 -0
- package/dist/{esm/sdk/nearEd25519YaoMaterialActivation-J6EHFScV.js → public/sdk/nearEd25519YaoMaterialActivation-DgWDGRI_.js} +1 -1
- package/dist/{esm/sdk/nearEd25519YaoSigningPreparation-CqBNMG87.js → public/sdk/nearEd25519YaoSigningPreparation-yKDLQXBS.js} +1 -1
- package/dist/public/sdk/{nonceLaneKeys-D18nlLjh.js → nonceLaneKeys-BzMBVxMU.js} +1 -1
- package/dist/public/sdk/{operationFingerprint-Boa9DQ51.js → operationFingerprint-C4VX-0NI.js} +1 -1
- package/dist/{esm/sdk/passkey-custody-CBSal3E9.js → public/sdk/passkey-custody-Ba-NQ_4C.js} +1 -1
- package/dist/public/sdk/{pendingWalletRecoveryCodeBackup-CvsrXbzn.js → pendingWalletRecoveryCodeBackup-DOeIn_Qj.js} +1 -1
- package/dist/{esm/sdk/presignaturePool-CQNt13kE.js → public/sdk/presignaturePool-BHoxnbOA.js} +1 -1
- package/dist/public/sdk/{prfCache-DJ93rtDv.js → prfCache-BAFh1skJ.js} +1 -1
- package/dist/public/sdk/{primitives-cC0a9GRC.js → primitives-CTmDwMNc.js} +1 -1
- package/dist/public/sdk/{recovery-entrypoint-nj7Zo3CR.js → recovery-entrypoint-DWghFZrZ.js} +1 -1
- package/dist/public/sdk/{registration-49OGU_GZ.js → registration-DknFwoqn.js} +1 -1
- package/dist/public/sdk/{registration-C7tywPXF.js → registration-sQndIWRF.js} +1 -1
- package/dist/public/sdk/{registrationAccounts-9GFI0Ger.js → registrationAccounts-CD1u1ZqZ.js} +1 -1
- package/dist/public/sdk/{registrationIds-Br-zI4_5.js → registrationIds-B1OpqRAt.js} +1 -1
- package/dist/{esm/sdk/registrationIntent-PqmcTEE3.js → public/sdk/registrationIntent-D4YDjf2U.js} +1 -1
- package/dist/public/sdk/{requireStepUpAuth-C4PGTly-.js → requireStepUpAuth-CnSCFSOZ.js} +1 -1
- package/dist/{esm/sdk/routerAbNormalSigning-xxATTIh5.js → public/sdk/routerAbNormalSigning-BV1t27aB.js} +1 -1
- package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/runtime-auth-BxG-J-BB.js +1 -0
- package/dist/public/sdk/runtime-device-link-Dn_5hPCq.js +1 -0
- package/dist/public/sdk/runtime-ecdsa-tempo-lTFTb9Rh.js +1 -0
- package/dist/public/sdk/runtime-email-otp-CPqTCH8Q.js +1 -0
- package/dist/public/sdk/runtime-export-Brz53_oi.js +1 -0
- package/dist/public/sdk/runtime-near-Da_xFUXx.js +1 -0
- package/dist/public/sdk/runtime-preferences-riUZGaTs.js +1 -0
- package/dist/public/sdk/runtime-recovery-CTj4nDAM.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-LR4mg7-k.js → runtime-recovery-codes-D8T9LQ7-.js} +1 -1
- package/dist/public/sdk/{secp256k1-BldUPNQI.js → secp256k1-wOOHtPcK.js} +1 -1
- package/dist/public/sdk/{secureRandomId-LwBFx84B.js → secureRandomId-8LSc91aN.js} +1 -1
- package/dist/public/sdk/sessionObservationRevision-C7v-wN8_.js +1 -0
- package/dist/public/sdk/shared-hx7KVyeq.js +6 -0
- package/dist/public/sdk/{signEvmFamily-C_RvEnDB.js → signEvmFamily-DT34Vtpa.js} +1 -1
- package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-CUKdq5dE.js → signEvmFamilyWithUiConfirmForTempo-NYCFU6Li.js} +1 -1
- package/dist/public/sdk/{signEvmWithUiConfirm-CxXzcvj2.js → signEvmWithUiConfirm-D6nmJr_L.js} +1 -1
- package/dist/{esm/sdk/signNear-Dno7NsP_.js → public/sdk/signNear-B000QxBd.js} +1 -1
- package/dist/{esm/sdk/signingFlow-DtugI_2z.js → public/sdk/signingFlow-gl85GOW4.js} +1 -1
- package/dist/public/sdk/{signingQueue-C1Pb07gm.js → signingQueue-gW7wmOuL.js} +1 -1
- package/dist/public/sdk/{singletons-DxIyVhNb.js → singletons-CAsc9LvA.js} +1 -1
- package/dist/{esm/sdk/thresholdEcdsa-murTq-xz.js → public/sdk/thresholdEcdsa-Ci7yz395.js} +1 -1
- package/dist/{esm/sdk/transactionState-XbZm9Zon.js → public/sdk/transactionState-lB2qpkOm.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +1799 -432
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/public/sdk/{wallet-recovery-CVUalZ3p.js → wallet-recovery-DFaS3geI.js} +1 -1
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/{esm/sdk/walletAuthMethodRecord-Bv68Vq-g.js → public/sdk/walletAuthMethodRecord-CWdqdY_s.js} +1 -1
- package/dist/{esm/sdk/walletAuthority-v5wvv3IB.js → public/sdk/walletAuthority-BY3kyKQ-.js} +1 -1
- package/dist/{esm/sdk/walletCustodyEcdsaContinuity-rRHExT_R.js → public/sdk/walletCustodyEcdsaContinuity-mGh1Ysko.js} +1 -1
- package/dist/public/sdk/{walletDbName-DRzPv5Ir.js → walletDbName-BxWApBQF.js} +1 -1
- package/dist/{esm/sdk/walletOwnershipGeneration-pMmmJ6XA.js → public/sdk/walletOwnershipGeneration-DSGfjuV2.js} +1 -1
- package/dist/public/sdk/{walletRecoveryCommit-DvC6WlGz.js → walletRecoveryCommit-DQA_wveK.js} +1 -1
- package/dist/public/sdk/{walletRecoveryRotate-Dd3prJpr.js → walletRecoveryRotate-zvQThn37.js} +1 -1
- package/dist/public/sdk/walletRegistrationSetupPrewarm-DdVpKccU.js +1 -0
- package/dist/{esm/sdk/walletSessionAuthorizationStatus-DVV3xkAx.js → public/sdk/walletSessionAuthorizationStatus-ONPRiEbK.js} +1 -1
- package/dist/{esm/sdk/walletSessionAuthorizationStore-D-MhJ0PC.js → public/sdk/walletSessionAuthorizationStore-DnUMtkev.js} +1 -1
- package/dist/public/sdk/warmSessionHydration-D8Vdro9n.js +1 -0
- package/dist/{esm/sdk/webauthnP256-XgYu-Y6E.js → public/sdk/webauthnP256-_ajaNl90.js} +1 -1
- package/dist/public/sdk/{webauthnPromptCoordinator-D5sP8Q7e.js → webauthnPromptCoordinator-9bVeHcTZ.js} +1 -1
- package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/public/wallet-assets.manifest.json +192 -192
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/SeamsWeb/walletIframe/coordinator.d.ts +2 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/domain.d.ts +20 -3
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/session.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuFooter.d.ts +0 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.d.ts +5 -6
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/icons.d.ts +2 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/presentation.d.ts +35 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/recovery-code-input.d.ts +17 -0
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationDrawer.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.d.ts +1 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationContent.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/PasskeyRegistrationDetails.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/RecoveryCodeBackupSurface.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/ReviewDisclosure.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionLabel.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReceipt.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionReview.d.ts +3 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/TransactionTree.d.ts +0 -1
- package/dist/types/wallet/src/core/signingEngine/uiConfirm/ui/preact/WalletLocale.d.ts +18 -0
- package/dist/types/wallet/src/core/types/seams.d.ts +3 -0
- package/dist/types/wallet/src/core/ui/locale.d.ts +5 -0
- package/dist/types/wallet/src/core/ui/messages.d.ts +8 -0
- package/dist/types/wallet/src/index.d.ts +3 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonMock.d.ts +1 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletRegionSection.d.ts +3 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +4 -1
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/SeamsAuthMenuMock.d.ts +2 -1
- package/dist/types/wallet/src/react/context/WalletLocale.d.ts +16 -0
- package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/esm/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
- package/dist/esm/sdk/adapters-CTlDBRJy.js +0 -2
- package/dist/esm/sdk/configBuilder-BMawmNpz.js +0 -1
- package/dist/esm/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
- package/dist/esm/sdk/localOnly-CPmpw381.js +0 -1
- package/dist/esm/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
- package/dist/esm/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
- package/dist/esm/sdk/runtime-auth-CpjGW90U.js +0 -1
- package/dist/esm/sdk/runtime-device-link-CKgfGi7D.js +0 -1
- package/dist/esm/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
- package/dist/esm/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
- package/dist/esm/sdk/runtime-export-B92wQD25.js +0 -1
- package/dist/esm/sdk/runtime-near-CUuKg38M.js +0 -1
- package/dist/esm/sdk/runtime-preferences-EdL3G_MO.js +0 -1
- package/dist/esm/sdk/runtime-recovery-uyw8sywI.js +0 -1
- package/dist/esm/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
- package/dist/esm/sdk/shared-ha31XIdc.js +0 -6
- package/dist/esm/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
- package/dist/esm/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
- package/dist/public/sdk/ConfirmationDrawer-CXVNmfTy.js +0 -1
- package/dist/public/sdk/adapters-CTlDBRJy.js +0 -2
- package/dist/public/sdk/configBuilder-BMawmNpz.js +0 -1
- package/dist/public/sdk/jsxRuntime.module-DKsgiFjd.js +0 -2
- package/dist/public/sdk/localOnly-CPmpw381.js +0 -1
- package/dist/public/sdk/mountExportPrivateKeySurface-C8_tpDHF.js +0 -1
- package/dist/public/sdk/mountRecoveryCodeBackupSurface-BtNFtmSj.js +0 -2
- package/dist/public/sdk/runtime-auth-CpjGW90U.js +0 -1
- package/dist/public/sdk/runtime-device-link-CKgfGi7D.js +0 -1
- package/dist/public/sdk/runtime-ecdsa-tempo-5VV9xSEh.js +0 -1
- package/dist/public/sdk/runtime-email-otp-D1hYZNn6.js +0 -1
- package/dist/public/sdk/runtime-export-B92wQD25.js +0 -1
- package/dist/public/sdk/runtime-near-CUuKg38M.js +0 -1
- package/dist/public/sdk/runtime-preferences-EdL3G_MO.js +0 -1
- package/dist/public/sdk/runtime-recovery-uyw8sywI.js +0 -1
- package/dist/public/sdk/sessionObservationRevision-DmmNV25w.js +0 -1
- package/dist/public/sdk/shared-ha31XIdc.js +0 -6
- package/dist/public/sdk/walletRegistrationSetupPrewarm-DcbhVNMQ.js +0 -1
- package/dist/public/sdk/warmSessionHydration-CsQpQVuy.js +0 -1
- /package/dist/esm/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
- /package/dist/esm/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
- /package/dist/esm/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
- /package/dist/public/sdk/{base64-DW79QA0h.js → base64-BmKR3UqU.js} +0 -0
- /package/dist/public/sdk/{signingSessionSeal-DX41aXUL.js → signingSessionSeal-DqbjG8c8.js} +0 -0
- /package/dist/public/sdk/{theme-BKaFqCAj.js → theme-os0Salmo.js} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR, createSurfaceHeightReflow } from "../confirm-surface-resize.js";
|
|
2
4
|
import { TransactionTree } from "./TransactionTree.js";
|
|
3
5
|
import { Component, createRef } from "preact";
|
|
@@ -9,6 +11,7 @@ function stopDragStart(event) {
|
|
|
9
11
|
event.stopPropagation();
|
|
10
12
|
}
|
|
11
13
|
var ConfirmContent = class extends Component {
|
|
14
|
+
static contextType = WalletLocaleContext;
|
|
12
15
|
state = { armed: false };
|
|
13
16
|
id = `seams-confirm-content-${++nextContentId}`;
|
|
14
17
|
root = createRef();
|
|
@@ -87,7 +90,7 @@ var ConfirmContent = class extends Component {
|
|
|
87
90
|
this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
88
91
|
class: "error",
|
|
89
92
|
role: "alert",
|
|
90
|
-
children: this.props.errorMessage
|
|
93
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
91
94
|
}),
|
|
92
95
|
this.props.tree && /* @__PURE__ */ jsx("div", {
|
|
93
96
|
class: "tooltip-width",
|
|
@@ -107,7 +110,7 @@ var ConfirmContent = class extends Component {
|
|
|
107
110
|
type: "button",
|
|
108
111
|
class: "cancel",
|
|
109
112
|
onClick: this.cancel,
|
|
110
|
-
children: this.props.cancelText
|
|
113
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.cancelText })
|
|
111
114
|
}), /* @__PURE__ */ jsx("button", {
|
|
112
115
|
type: this.props.decision.kind === "form" ? "submit" : "button",
|
|
113
116
|
form: this.props.decision.kind === "form" ? this.props.decision.formId : void 0,
|
|
@@ -117,8 +120,8 @@ var ConfirmContent = class extends Component {
|
|
|
117
120
|
children: preparing ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
118
121
|
class: "loading-indicator",
|
|
119
122
|
role: "progressbar",
|
|
120
|
-
"aria-label": "Loading"
|
|
121
|
-
}), /* @__PURE__ */ jsx("span", { children: "Loading..." })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [this.props.confirmIcon, this.props.confirmText] })
|
|
123
|
+
"aria-label": walletText(this.context, "Loading")
|
|
124
|
+
}), /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(WalletText, { message: "Loading..." }) })] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [this.props.confirmIcon, /* @__PURE__ */ jsx(WalletText, { copy: this.props.confirmText })] })
|
|
122
125
|
})]
|
|
123
126
|
})
|
|
124
127
|
]
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletText, useWalletLocale } from "./WalletLocale.js";
|
|
1
3
|
import { PadlockIcon } from "./PadlockIcon.js";
|
|
2
4
|
import { PasskeyHaloLoading } from "./PasskeyHaloLoading.js";
|
|
3
5
|
import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
|
|
4
6
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmHeader.tsx
|
|
7
|
+
/** @jsxImportSource preact */
|
|
5
8
|
function ConfirmHeader(props) {
|
|
9
|
+
const locale = useWalletLocale();
|
|
6
10
|
return /* @__PURE__ */ jsxs("div", {
|
|
7
11
|
class: "hero seams-confirm-header",
|
|
8
12
|
children: [/* @__PURE__ */ jsx(PasskeyHaloLoading, {
|
|
@@ -14,11 +18,11 @@ function ConfirmHeader(props) {
|
|
|
14
18
|
children: [
|
|
15
19
|
/* @__PURE__ */ jsx("h2", {
|
|
16
20
|
class: "hero-heading",
|
|
17
|
-
children: props.heading
|
|
21
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.heading })
|
|
18
22
|
}),
|
|
19
23
|
props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
20
24
|
class: "error-banner",
|
|
21
|
-
children: props.errorMessage
|
|
25
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.errorMessage })
|
|
22
26
|
}),
|
|
23
27
|
/* @__PURE__ */ jsx("div", {
|
|
24
28
|
class: "rpid-wrapper",
|
|
@@ -30,8 +34,8 @@ function ConfirmHeader(props) {
|
|
|
30
34
|
role: "status",
|
|
31
35
|
children: props.website.kind === "ready" ? /* @__PURE__ */ jsx("span", {
|
|
32
36
|
class: "domain-text",
|
|
33
|
-
children: props.website.text
|
|
34
|
-
}) : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading website" })
|
|
37
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.website.text })
|
|
38
|
+
}) : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(locale, "Loading website") })
|
|
35
39
|
})]
|
|
36
40
|
}), /* @__PURE__ */ jsxs("span", {
|
|
37
41
|
class: "security-details",
|
|
@@ -52,7 +56,7 @@ function ConfirmHeader(props) {
|
|
|
52
56
|
]
|
|
53
57
|
}), /* @__PURE__ */ jsx("span", {
|
|
54
58
|
role: "status",
|
|
55
|
-
children: props.chainDetails.kind === "ready" ? props.chainDetails.text : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading chain details" })
|
|
59
|
+
children: props.chainDetails.kind === "ready" ? /* @__PURE__ */ jsx(WalletText, { copy: props.chainDetails.text }) : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(locale, "Loading chain details") })
|
|
56
60
|
})]
|
|
57
61
|
})]
|
|
58
62
|
})
|
|
@@ -81,7 +85,7 @@ function LoadingStatus(props) {
|
|
|
81
85
|
]
|
|
82
86
|
}), /* @__PURE__ */ jsx("span", {
|
|
83
87
|
class: "sr-only",
|
|
84
|
-
children: props.label
|
|
88
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: props.label })
|
|
85
89
|
})] });
|
|
86
90
|
}
|
|
87
91
|
//#endregion
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { Component } from "preact";
|
|
2
4
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
3
5
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmationBody.tsx
|
|
@@ -6,6 +8,7 @@ function assertNever(value) {
|
|
|
6
8
|
throw new Error(`Unexpected confirmation body: ${String(value)}`);
|
|
7
9
|
}
|
|
8
10
|
var ConfirmationBody = class extends Component {
|
|
11
|
+
static contextType = WalletLocaleContext;
|
|
9
12
|
copy = () => {
|
|
10
13
|
if (this.props.model.kind === "funding") this.props.onCopyAccount(this.props.model.accountId);
|
|
11
14
|
};
|
|
@@ -15,25 +18,25 @@ var ConfirmationBody = class extends Component {
|
|
|
15
18
|
case "empty": return null;
|
|
16
19
|
case "text": return /* @__PURE__ */ jsx("div", {
|
|
17
20
|
class: "confirmation-body",
|
|
18
|
-
children: model.text
|
|
21
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.text })
|
|
19
22
|
});
|
|
20
23
|
case "status": return /* @__PURE__ */ jsx("div", {
|
|
21
24
|
class: "confirmation-body confirmation-body--status",
|
|
22
|
-
children: model.text
|
|
25
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.text })
|
|
23
26
|
});
|
|
24
27
|
case "funding": return /* @__PURE__ */ jsxs("div", {
|
|
25
28
|
class: "confirmation-body confirmation-body--funding",
|
|
26
29
|
children: [
|
|
27
|
-
"NEAR account",
|
|
30
|
+
/* @__PURE__ */ jsx(WalletText, { message: "NEAR account" }),
|
|
28
31
|
/* @__PURE__ */ jsx("button", {
|
|
29
32
|
type: "button",
|
|
30
33
|
class: "confirmation-body__copy-target",
|
|
31
|
-
title: `Copy ${model.accountId}
|
|
32
|
-
"aria-label": `Copy NEAR account ${model.accountId}
|
|
34
|
+
title: walletDisplayText(this.context, `Copy ${model.accountId}`),
|
|
35
|
+
"aria-label": walletDisplayText(this.context, `Copy NEAR account ${model.accountId}`),
|
|
33
36
|
onClick: this.copy,
|
|
34
37
|
children: model.shortAccountId
|
|
35
38
|
}),
|
|
36
|
-
"needs funding"
|
|
39
|
+
/* @__PURE__ */ jsx(WalletText, { message: "needs funding" })
|
|
37
40
|
]
|
|
38
41
|
});
|
|
39
42
|
default: return assertNever(model);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText, walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { PadlockIcon } from "./PadlockIcon.js";
|
|
2
4
|
import { CONFIRM_SURFACE_HEIGHT_DRIVEN_VAR, createSurfaceHeightReflow } from "../confirm-surface-resize.js";
|
|
3
5
|
import { copySurfaceText } from "./clipboard.js";
|
|
@@ -13,6 +15,7 @@ import { jsx, jsxs } from "preact/jsx-runtime";
|
|
|
13
15
|
/** @jsxImportSource preact */
|
|
14
16
|
let nextConfirmationId = 0;
|
|
15
17
|
var ConfirmationContent = class extends Component {
|
|
18
|
+
static contextType = WalletLocaleContext;
|
|
16
19
|
root = createRef();
|
|
17
20
|
otpFormId = `seams-confirmation-email-${++nextConfirmationId}`;
|
|
18
21
|
reflowId = `seams-confirmation-content-surface-${nextConfirmationId}`;
|
|
@@ -75,29 +78,29 @@ var ConfirmationContent = class extends Component {
|
|
|
75
78
|
children: [
|
|
76
79
|
model.transaction.onBack && /* @__PURE__ */ jsx("button", {
|
|
77
80
|
type: "button",
|
|
78
|
-
"aria-label": "Back to review",
|
|
79
|
-
title: "Back to review",
|
|
81
|
+
"aria-label": walletText(this.context, "Back to review"),
|
|
82
|
+
title: walletText(this.context, "Back to review"),
|
|
80
83
|
disabled: decision.kind === "preparing",
|
|
81
84
|
onClick: model.transaction.onBack,
|
|
82
85
|
children: /* @__PURE__ */ jsx(ReviewIcon, { kind: "back" })
|
|
83
86
|
}),
|
|
84
87
|
/* @__PURE__ */ jsx(PadlockIcon, {}),
|
|
85
|
-
model.header.website.kind === "ready" ? model.header.website.text : /* @__PURE__ */ jsx(LoadingStatus, { label: "Loading website" })
|
|
88
|
+
model.header.website.kind === "ready" ? model.header.website.text : /* @__PURE__ */ jsx(LoadingStatus, { label: walletText(this.context, "Loading website") })
|
|
86
89
|
]
|
|
87
90
|
}), /* @__PURE__ */ jsx("button", {
|
|
88
91
|
type: "button",
|
|
89
|
-
"aria-label": model.transaction.cancelText,
|
|
92
|
+
"aria-label": walletDisplayText(this.context, model.transaction.cancelText),
|
|
90
93
|
onClick: model.transaction.onCancel,
|
|
91
94
|
children: /* @__PURE__ */ jsx(ReviewIcon, { kind: "close" })
|
|
92
95
|
})]
|
|
93
96
|
}),
|
|
94
97
|
model.review.model && /* @__PURE__ */ jsx("div", {
|
|
95
98
|
class: "seams-review-eyebrow",
|
|
96
|
-
children: model.review.model.operations.length === 1 ? model.review.model.operations[0].label.replace(/\s+using\s+[\d,.]+\s+gas$/i, "") : "Transaction"
|
|
99
|
+
children: model.review.model.operations.length === 1 ? /* @__PURE__ */ jsx(WalletText, { copy: model.review.model.operations[0].label.replace(/\s+using\s+[\d,.]+\s+gas$/i, "") }) : /* @__PURE__ */ jsx(WalletText, { message: "Transaction" })
|
|
97
100
|
}),
|
|
98
101
|
/* @__PURE__ */ jsx("h2", {
|
|
99
102
|
class: "seams-review-title",
|
|
100
|
-
children: model.header.heading
|
|
103
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.header.heading })
|
|
101
104
|
}),
|
|
102
105
|
/* @__PURE__ */ jsx(TransactionReview, { data: model.review }),
|
|
103
106
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText, walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText } from "./WalletLocale.js";
|
|
1
3
|
import { drawerDragTranslate, shouldDismissDrawerDrag } from "../drawer-gesture.js";
|
|
2
4
|
import { Component, createRef } from "preact";
|
|
3
5
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
@@ -8,6 +10,7 @@ function ConfirmationDrawer(props) {
|
|
|
8
10
|
return /* @__PURE__ */ jsx(DrawerShell, { ...props }, props.context);
|
|
9
11
|
}
|
|
10
12
|
var DrawerShell = class extends Component {
|
|
13
|
+
static contextType = WalletLocaleContext;
|
|
11
14
|
state = { settled: false };
|
|
12
15
|
id = `seams-confirmation-drawer-${++nextDrawerId}`;
|
|
13
16
|
dialog = createRef();
|
|
@@ -245,7 +248,7 @@ var DrawerShell = class extends Component {
|
|
|
245
248
|
/* @__PURE__ */ jsx("button", {
|
|
246
249
|
type: "button",
|
|
247
250
|
class: "seams-drawer-handle",
|
|
248
|
-
"aria-label": "Dismiss confirmation",
|
|
251
|
+
"aria-label": walletText(this.context, "Dismiss confirmation"),
|
|
249
252
|
disabled: !this.canDrag(),
|
|
250
253
|
onClick: this.cancel,
|
|
251
254
|
children: /* @__PURE__ */ jsx("span", {})
|
|
@@ -253,7 +256,7 @@ var DrawerShell = class extends Component {
|
|
|
253
256
|
/* @__PURE__ */ jsx("button", {
|
|
254
257
|
type: "button",
|
|
255
258
|
class: "seams-drawer-close",
|
|
256
|
-
"aria-label": "Close",
|
|
259
|
+
"aria-label": walletText(this.context, "Close"),
|
|
257
260
|
disabled: !this.canDrag(),
|
|
258
261
|
onClick: this.cancel,
|
|
259
262
|
children: "×"
|
|
@@ -264,7 +267,7 @@ var DrawerShell = class extends Component {
|
|
|
264
267
|
ref: this.body,
|
|
265
268
|
children: [this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
266
269
|
class: "error",
|
|
267
|
-
children: this.props.errorMessage
|
|
270
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
268
271
|
}), /* @__PURE__ */ jsx("div", {
|
|
269
272
|
class: "seams-drawer-content",
|
|
270
273
|
ref: this.content,
|
|
@@ -276,7 +279,7 @@ var DrawerShell = class extends Component {
|
|
|
276
279
|
return /* @__PURE__ */ jsx("dialog", {
|
|
277
280
|
class: "seams-drawer-dialog",
|
|
278
281
|
ref: this.dialog,
|
|
279
|
-
"aria-label": this.props.label,
|
|
282
|
+
"aria-label": walletDisplayText(this.context, this.props.label),
|
|
280
283
|
onCancel: this.cancel,
|
|
281
284
|
onClick: this.backdropClick,
|
|
282
285
|
onClickCapture: this.suppressDragClick,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext } from "./WalletLocale.js";
|
|
1
3
|
import { Component, createRef } from "preact";
|
|
2
4
|
import { jsx } from "preact/jsx-runtime";
|
|
3
5
|
//#region src/core/signingEngine/uiConfirm/ui/preact/ConfirmationModal.tsx
|
|
@@ -7,6 +9,7 @@ function ConfirmationModal(props) {
|
|
|
7
9
|
return /* @__PURE__ */ jsx(ModalShell, { ...props }, props.context);
|
|
8
10
|
}
|
|
9
11
|
var ModalShell = class extends Component {
|
|
12
|
+
static contextType = WalletLocaleContext;
|
|
10
13
|
dialog = createRef();
|
|
11
14
|
hosted = createRef();
|
|
12
15
|
containerId = `seams-confirmation-modal-${++nextModalId}`;
|
|
@@ -35,7 +38,7 @@ var ModalShell = class extends Component {
|
|
|
35
38
|
if (this.props.context === "standalone") return /* @__PURE__ */ jsx("dialog", {
|
|
36
39
|
ref: this.dialog,
|
|
37
40
|
class: "seams-confirmation-modal",
|
|
38
|
-
"aria-label": this.props.label,
|
|
41
|
+
"aria-label": walletDisplayText(this.context, this.props.label),
|
|
39
42
|
onCancel: this.cancel,
|
|
40
43
|
onClick: this.backdropClick,
|
|
41
44
|
children: /* @__PURE__ */ jsx("div", {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { walletDisplayText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext } from "./WalletLocale.js";
|
|
1
3
|
import { formatEmailOtpSentText } from "../../../stepUpConfirmation/otpPrompt/promptText.js";
|
|
2
4
|
import { EmailOtpInput } from "./EmailOtpInput.js";
|
|
3
5
|
import { EmailOtpSession } from "./email-otp-session.js";
|
|
@@ -9,6 +11,7 @@ function EmailOtpContent(props) {
|
|
|
9
11
|
return /* @__PURE__ */ jsx(EmailOtpSessionView, { ...props }, props.prompt.challengeId);
|
|
10
12
|
}
|
|
11
13
|
var EmailOtpSessionView = class extends Component {
|
|
14
|
+
static contextType = WalletLocaleContext;
|
|
12
15
|
session;
|
|
13
16
|
form = createRef();
|
|
14
17
|
lifetime;
|
|
@@ -118,7 +121,7 @@ var EmailOtpSessionView = class extends Component {
|
|
|
118
121
|
challengeId: this.lifetime.kind === "active" ? this.lifetime.challengeId : "",
|
|
119
122
|
code: this.state.code,
|
|
120
123
|
helperText: this.props.prompt.helperText?.trim() || formatEmailOtpSentText(this.lifetime.kind === "active" ? this.lifetime.emailHint : ""),
|
|
121
|
-
errorMessage: this.state.error || void 0,
|
|
124
|
+
errorMessage: walletDisplayText(this.context, this.state.error || void 0),
|
|
122
125
|
state: this.inputState(),
|
|
123
126
|
resend: this.resendAction()
|
|
124
127
|
})
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WalletText } from "./WalletLocale.js";
|
|
1
2
|
import { Component } from "preact";
|
|
2
3
|
import { jsx, jsxs } from "preact/jsx-runtime";
|
|
3
4
|
//#region src/core/signingEngine/uiConfirm/ui/preact/EmailOtpInput.tsx
|
|
@@ -28,7 +29,7 @@ var EmailOtpInput = class extends Component {
|
|
|
28
29
|
/* @__PURE__ */ jsx("label", {
|
|
29
30
|
class: "email-otp-confirm__label",
|
|
30
31
|
for: this.id,
|
|
31
|
-
children: "Email code"
|
|
32
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Email code" })
|
|
32
33
|
}),
|
|
33
34
|
/* @__PURE__ */ jsxs("div", {
|
|
34
35
|
class: "email-otp-confirm__code-field",
|
|
@@ -65,19 +66,19 @@ var EmailOtpInput = class extends Component {
|
|
|
65
66
|
/* @__PURE__ */ jsx("div", {
|
|
66
67
|
id: helperId,
|
|
67
68
|
class: "email-otp-confirm__helper",
|
|
68
|
-
children: this.props.helperText
|
|
69
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.helperText })
|
|
69
70
|
}),
|
|
70
71
|
this.props.errorMessage && /* @__PURE__ */ jsx("div", {
|
|
71
72
|
id: errorId,
|
|
72
73
|
class: "email-otp-confirm__error",
|
|
73
|
-
children: this.props.errorMessage
|
|
74
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.errorMessage })
|
|
74
75
|
}),
|
|
75
76
|
this.props.resend && /* @__PURE__ */ jsx("button", {
|
|
76
77
|
type: "button",
|
|
77
78
|
class: "email-otp-confirm__resend",
|
|
78
79
|
disabled: this.props.resend.kind === "unavailable",
|
|
79
80
|
onClick: this.resend,
|
|
80
|
-
children: this.props.resend.label
|
|
81
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: this.props.resend.label })
|
|
81
82
|
})
|
|
82
83
|
]
|
|
83
84
|
});
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { walletDisplayText, walletText } from "../../../../ui/messages.js";
|
|
2
|
+
import { WalletLocaleContext, WalletText, useWalletLocale } from "./WalletLocale.js";
|
|
3
|
+
import { copySurfaceText } from "./clipboard.js";
|
|
4
|
+
import { CopyStatusIcon } from "./CopyStatusIcon.js";
|
|
5
|
+
import { advanceRevealState, createSpinningState, maskedPrivateKey, settlingState } from "../export-private-key-reveal.js";
|
|
6
|
+
import { Component, createRef } from "preact";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
8
|
+
//#region src/core/signingEngine/uiConfirm/ui/preact/ExportPrivateKeySurface.tsx
|
|
9
|
+
/** @jsxImportSource preact */
|
|
10
|
+
function ExportPrivateKeySurface({ model, onClose }) {
|
|
11
|
+
const locale = useWalletLocale();
|
|
12
|
+
const entries = model.kind === "failed" ? [] : model.entries;
|
|
13
|
+
const showAccount = entries.length === 0 || entries.some(isNearKey);
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
class: "seams-export-key-viewer",
|
|
16
|
+
"data-seams-drawer-no-drag": true,
|
|
17
|
+
onPointerDown: stopDrag,
|
|
18
|
+
onMouseDown: stopDrag,
|
|
19
|
+
onTouchStart: stopDrag,
|
|
20
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
class: "content",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24
|
+
class: "seams-export-header",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
26
|
+
class: "title",
|
|
27
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Exported Keys" })
|
|
28
|
+
}), onClose && /* @__PURE__ */ jsx("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
class: "seams-export-modal-close",
|
|
31
|
+
"aria-label": walletText(locale, "Close exported keys"),
|
|
32
|
+
onClick: onClose,
|
|
33
|
+
children: "×"
|
|
34
|
+
})]
|
|
35
|
+
}),
|
|
36
|
+
model.kind === "failed" && /* @__PURE__ */ jsx("div", {
|
|
37
|
+
class: "error-banner",
|
|
38
|
+
role: "alert",
|
|
39
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: model.message })
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", {
|
|
42
|
+
class: "fields",
|
|
43
|
+
children: [showAccount && /* @__PURE__ */ jsxs("div", {
|
|
44
|
+
class: "field",
|
|
45
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
46
|
+
class: "field-label",
|
|
47
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Near Account ID" })
|
|
48
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
49
|
+
class: "field-value",
|
|
50
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
51
|
+
class: "value",
|
|
52
|
+
children: model.accountId || "—"
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
}), entries.length > 0 ? entries.map(renderKey) : /* @__PURE__ */ jsx("div", {
|
|
56
|
+
class: "field",
|
|
57
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
58
|
+
class: "field-value",
|
|
59
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
60
|
+
class: "muted",
|
|
61
|
+
children: model.kind === "loading" ? /* @__PURE__ */ jsx(WalletText, { message: "Preparing private key…" }) : /* @__PURE__ */ jsx(WalletText, { message: "No keys available" })
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
})]
|
|
65
|
+
}),
|
|
66
|
+
model.guidance && /* @__PURE__ */ jsx(ExportGuidanceContent, { guidance: model.guidance }),
|
|
67
|
+
/* @__PURE__ */ jsx("div", {
|
|
68
|
+
class: "warning",
|
|
69
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Warning: your private keys grant full control of your account and funds. Keep it in a secret place." })
|
|
70
|
+
})
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function isNearKey(entry) {
|
|
76
|
+
return entry.scheme === "ed25519";
|
|
77
|
+
}
|
|
78
|
+
function renderKey(entry) {
|
|
79
|
+
return /* @__PURE__ */ jsx(ExportKeyCard, { entry }, entry.id);
|
|
80
|
+
}
|
|
81
|
+
function stopDrag(event) {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
}
|
|
84
|
+
function ExportGuidanceContent({ guidance }) {
|
|
85
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
class: "warning",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx("strong", { children: /* @__PURE__ */ jsx(WalletText, { copy: guidance.title || "Next Steps" }) }),
|
|
89
|
+
guidance.body && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(WalletText, { copy: guidance.body }) }),
|
|
90
|
+
guidance.steps?.length ? /* @__PURE__ */ jsx("ol", { children: guidance.steps.map(renderGuidanceStep) }) : null
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function renderGuidanceStep(step, index) {
|
|
95
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(WalletText, { copy: step }) }, index);
|
|
96
|
+
}
|
|
97
|
+
var ExportKeyCard = class extends Component {
|
|
98
|
+
static contextType = WalletLocaleContext;
|
|
99
|
+
state = {
|
|
100
|
+
reveal: null,
|
|
101
|
+
publicCopied: false,
|
|
102
|
+
privateCopied: false
|
|
103
|
+
};
|
|
104
|
+
root = createRef();
|
|
105
|
+
frame = null;
|
|
106
|
+
timers = /* @__PURE__ */ new Map();
|
|
107
|
+
generation = 0;
|
|
108
|
+
copyLifetime = new AbortController();
|
|
109
|
+
active = false;
|
|
110
|
+
componentDidMount() {
|
|
111
|
+
this.active = true;
|
|
112
|
+
this.reset(this.props.entry);
|
|
113
|
+
}
|
|
114
|
+
componentWillReceiveProps(next) {
|
|
115
|
+
if (!sameKey(this.props.entry, next.entry)) this.reset(next.entry);
|
|
116
|
+
}
|
|
117
|
+
componentDidUpdate() {
|
|
118
|
+
this.schedule();
|
|
119
|
+
}
|
|
120
|
+
componentWillUnmount() {
|
|
121
|
+
this.active = false;
|
|
122
|
+
this.clearPending();
|
|
123
|
+
this.state.reveal = null;
|
|
124
|
+
}
|
|
125
|
+
clearPending() {
|
|
126
|
+
this.generation += 1;
|
|
127
|
+
this.copyLifetime.abort();
|
|
128
|
+
const view = this.root.current?.ownerDocument.defaultView;
|
|
129
|
+
if (this.frame !== null) view?.cancelAnimationFrame(this.frame);
|
|
130
|
+
this.frame = null;
|
|
131
|
+
for (const timer of this.timers.values()) view?.clearTimeout(timer);
|
|
132
|
+
this.timers.clear();
|
|
133
|
+
}
|
|
134
|
+
reset(entry) {
|
|
135
|
+
this.clearPending();
|
|
136
|
+
this.copyLifetime = new AbortController();
|
|
137
|
+
const view = this.root.current.ownerDocument.defaultView;
|
|
138
|
+
const reduced = view.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
139
|
+
const now = view.performance.now();
|
|
140
|
+
let reveal = null;
|
|
141
|
+
switch (entry.material.kind) {
|
|
142
|
+
case "loading":
|
|
143
|
+
reveal = createSpinningState(entry.id, entry.scheme, reduced, now);
|
|
144
|
+
break;
|
|
145
|
+
case "ready":
|
|
146
|
+
reveal = reduced ? {
|
|
147
|
+
kind: "settled",
|
|
148
|
+
entryKey: entry.id
|
|
149
|
+
} : settlingState(createSpinningState(entry.id, entry.scheme, false, now), maskedPrivateKey(entry.material.value), now);
|
|
150
|
+
break;
|
|
151
|
+
case "unavailable": break;
|
|
152
|
+
default: assertNever(entry.material);
|
|
153
|
+
}
|
|
154
|
+
this.setState({
|
|
155
|
+
reveal,
|
|
156
|
+
publicCopied: false,
|
|
157
|
+
privateCopied: false
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
schedule() {
|
|
161
|
+
const reveal = this.state.reveal;
|
|
162
|
+
if (!this.active || this.frame !== null || !reveal || reveal.kind === "settled") return;
|
|
163
|
+
const view = this.root.current.ownerDocument.defaultView;
|
|
164
|
+
if (view.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
165
|
+
this.frame = view.requestAnimationFrame(this.tick);
|
|
166
|
+
}
|
|
167
|
+
tick = (now) => {
|
|
168
|
+
this.frame = null;
|
|
169
|
+
const reveal = this.state.reveal;
|
|
170
|
+
if (!this.active || !reveal || reveal.kind === "settled") return;
|
|
171
|
+
const next = advanceRevealState(reveal, now);
|
|
172
|
+
if (next !== reveal) this.setState({ reveal: next });
|
|
173
|
+
this.schedule();
|
|
174
|
+
};
|
|
175
|
+
copyPublic = () => {
|
|
176
|
+
this.copy("public");
|
|
177
|
+
};
|
|
178
|
+
copyPrivate = () => {
|
|
179
|
+
this.copy("private");
|
|
180
|
+
};
|
|
181
|
+
clearPublic = () => {
|
|
182
|
+
this.timers.delete("public");
|
|
183
|
+
if (this.active) this.setState({ publicCopied: false });
|
|
184
|
+
};
|
|
185
|
+
clearPrivate = () => {
|
|
186
|
+
this.timers.delete("private");
|
|
187
|
+
if (this.active) this.setState({ privateCopied: false });
|
|
188
|
+
};
|
|
189
|
+
async copy(field) {
|
|
190
|
+
const entry = this.props.entry;
|
|
191
|
+
if (!this.active) return;
|
|
192
|
+
if (field === "private" && (entry.material.kind !== "ready" || this.state.reveal?.kind !== "settled")) return;
|
|
193
|
+
let value = entry.publicKey;
|
|
194
|
+
if (field === "private") {
|
|
195
|
+
if (entry.material.kind !== "ready") return;
|
|
196
|
+
value = entry.material.value;
|
|
197
|
+
}
|
|
198
|
+
if (!value) return;
|
|
199
|
+
const generation = this.generation;
|
|
200
|
+
const root = this.root.current;
|
|
201
|
+
const view = root.ownerDocument.defaultView;
|
|
202
|
+
view.focus();
|
|
203
|
+
if (!await copySurfaceText(root, value, this.copyLifetime.signal).catch(copyFailed) || !this.active || generation !== this.generation) return;
|
|
204
|
+
const previous = this.timers.get(field);
|
|
205
|
+
if (previous !== void 0) view.clearTimeout(previous);
|
|
206
|
+
if (field === "public") this.setState({ publicCopied: true });
|
|
207
|
+
else this.setState({ privateCopied: true });
|
|
208
|
+
this.timers.set(field, view.setTimeout(field === "public" ? this.clearPublic : this.clearPrivate, 3e3));
|
|
209
|
+
}
|
|
210
|
+
render() {
|
|
211
|
+
const entry = this.props.entry;
|
|
212
|
+
const privateReady = entry.material.kind === "ready" && this.state.reveal?.kind === "settled";
|
|
213
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
214
|
+
class: "key-card",
|
|
215
|
+
ref: this.root,
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ jsx("div", {
|
|
218
|
+
class: "key-title",
|
|
219
|
+
children: /* @__PURE__ */ jsx(WalletText, { copy: entry.label })
|
|
220
|
+
}),
|
|
221
|
+
entry.address && /* @__PURE__ */ jsxs("div", {
|
|
222
|
+
class: "field",
|
|
223
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
224
|
+
class: "field-label",
|
|
225
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Address" })
|
|
226
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
227
|
+
class: "field-value",
|
|
228
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
229
|
+
class: "value",
|
|
230
|
+
children: entry.address
|
|
231
|
+
})
|
|
232
|
+
})]
|
|
233
|
+
}),
|
|
234
|
+
entry.scheme === "ed25519" && /* @__PURE__ */ jsxs("button", {
|
|
235
|
+
type: "button",
|
|
236
|
+
class: `field copy-field${this.state.publicCopied ? " copied" : ""}`,
|
|
237
|
+
"aria-label": walletDisplayText(this.context, this.state.publicCopied ? "Public key copied" : "Copy public key"),
|
|
238
|
+
disabled: !entry.publicKey,
|
|
239
|
+
onClick: this.copyPublic,
|
|
240
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
241
|
+
class: "field-label",
|
|
242
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Public Key" })
|
|
243
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
244
|
+
class: "field-value",
|
|
245
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
246
|
+
class: "value",
|
|
247
|
+
children: entry.publicKey || "—"
|
|
248
|
+
}), /* @__PURE__ */ jsx(CopyStatusIcon, {})]
|
|
249
|
+
})]
|
|
250
|
+
}),
|
|
251
|
+
/* @__PURE__ */ jsxs("button", {
|
|
252
|
+
type: "button",
|
|
253
|
+
class: `field copy-field${this.state.privateCopied ? " copied" : ""}`,
|
|
254
|
+
"aria-label": walletDisplayText(this.context, this.state.privateCopied ? "Private key copied" : "Copy private key"),
|
|
255
|
+
disabled: !privateReady,
|
|
256
|
+
onClick: this.copyPrivate,
|
|
257
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
258
|
+
class: "field-label",
|
|
259
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Private Key" })
|
|
260
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
261
|
+
class: "field-value",
|
|
262
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
263
|
+
class: "value private-key",
|
|
264
|
+
children: /* @__PURE__ */ jsx(PrivateKeyText, {
|
|
265
|
+
material: entry.material,
|
|
266
|
+
reveal: this.state.reveal
|
|
267
|
+
})
|
|
268
|
+
}), /* @__PURE__ */ jsx(CopyStatusIcon, {})]
|
|
269
|
+
})]
|
|
270
|
+
})
|
|
271
|
+
]
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
function sameKey(left, right) {
|
|
276
|
+
return left.id === right.id && left.scheme === right.scheme && left.publicKey === right.publicKey && left.material.kind === right.material.kind && left.material.value === right.material.value;
|
|
277
|
+
}
|
|
278
|
+
function copyFailed() {
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
function PrivateKeyText({ material, reveal }) {
|
|
282
|
+
if (reveal && reveal.kind !== "settled") return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
283
|
+
class: "private-key-reel",
|
|
284
|
+
"aria-hidden": "true",
|
|
285
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
286
|
+
class: "reel-prefix",
|
|
287
|
+
children: reveal.prefix
|
|
288
|
+
}), renderSlots(reveal)]
|
|
289
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
290
|
+
class: "seams-sr-only",
|
|
291
|
+
role: "status",
|
|
292
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Decrypting private key" })
|
|
293
|
+
})] });
|
|
294
|
+
if (material.kind !== "ready") return /* @__PURE__ */ jsx("span", {
|
|
295
|
+
class: "muted",
|
|
296
|
+
children: "—"
|
|
297
|
+
});
|
|
298
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { children: maskedPrivateKey(material.value) }), /* @__PURE__ */ jsx("span", {
|
|
299
|
+
class: "seams-sr-only",
|
|
300
|
+
role: "status",
|
|
301
|
+
children: /* @__PURE__ */ jsx(WalletText, { message: "Private key ready" })
|
|
302
|
+
})] });
|
|
303
|
+
}
|
|
304
|
+
function renderSlots(reveal) {
|
|
305
|
+
const lockedSlots = reveal.kind === "settling" ? reveal.lockedSlots : 0;
|
|
306
|
+
const slots = [];
|
|
307
|
+
for (let index = 0; index < reveal.slots.length; index += 1) slots.push(/* @__PURE__ */ jsx("span", {
|
|
308
|
+
class: `reel-slot${index < lockedSlots ? " settled" : ""}`,
|
|
309
|
+
children: reveal.slots[index].glyph
|
|
310
|
+
}, index));
|
|
311
|
+
return slots;
|
|
312
|
+
}
|
|
313
|
+
function assertNever(value) {
|
|
314
|
+
throw new Error(`Unexpected export key material: ${String(value)}`);
|
|
315
|
+
}
|
|
316
|
+
//#endregion
|
|
317
|
+
export { ExportPrivateKeySurface };
|
|
318
|
+
|
|
319
|
+
//# sourceMappingURL=ExportPrivateKeySurface.js.map
|