@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.
- package/README.md +29 -4
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/publicApi/createPublicApi.js +11 -0
- package/dist/esm/SeamsWeb/publicApi/near.js +3 -0
- package/dist/esm/SeamsWeb/publicApi/ownerNearOperation.js +175 -0
- package/dist/esm/SeamsWeb/walletIframe/client/nearCommands.js +4 -0
- package/dist/esm/SeamsWeb/walletIframe/client/ownerNearOperation.js +67 -0
- package/dist/esm/SeamsWeb/walletIframe/client/progress/on-events-progress-bus.js +27 -17
- package/dist/esm/SeamsWeb/walletIframe/client/router.js +63 -2
- package/dist/esm/SeamsWeb/walletIframe/client/sessionCommands.js +20 -0
- package/dist/esm/SeamsWeb/walletIframe/host/walletMutationGuard.js +6 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/exactSessionState.js +42 -5
- package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +1 -1
- package/dist/esm/SeamsWeb/walletIframe/shared/ownerNearOperation.js +152 -0
- package/dist/esm/core/accountData/near/accountProjection.js +1 -1
- package/dist/esm/core/authMethods/plugins.js +8 -2
- package/dist/esm/core/indexedDB/seamsWalletDB/repositories.js +4 -3
- package/dist/esm/core/rpcClients/relayer/walletRegistration.js +1 -1
- package/dist/esm/core/signingEngine/flows/registration/accountLifecycle.js +1 -1
- package/dist/esm/core/signingEngine/flows/shared/signingConfirmation.js +1 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signEvmFamily.js +1 -1
- package/dist/esm/core/signingEngine/flows/signEvmFamily/signingFlow.js +1 -1
- package/dist/esm/core/signingEngine/flows/signNear/shared/ed25519YaoNormalSigning.js +2 -2
- package/dist/esm/core/signingEngine/flows/signNear/signDelegate.js +2 -2
- package/dist/esm/core/signingEngine/flows/signNear/signNear.js +3 -8
- package/dist/esm/core/signingEngine/flows/signNear/signNep413.js +1 -1
- package/dist/esm/core/signingEngine/flows/signNear/signTransactions.js +3 -4
- package/dist/esm/core/signingEngine/session/identity/exactSigningLaneIdentity.js +1 -1
- package/dist/esm/core/ui/messages.js +5 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/react/boundWallet.js +24 -0
- package/dist/esm/react/components/AccountMenuButton/AccountMenuButtonView.js +35 -22
- package/dist/esm/react/components/AccountMenuButton/AccountSettingsDialog.js +157 -0
- package/dist/esm/react/components/AccountMenuButton/AuthenticationMethodsModal.js +13 -1
- package/dist/esm/react/components/AccountMenuButton/ExternalWalletSettings.js +46 -0
- package/dist/esm/react/components/AccountMenuButton/LinkedDevicesModal.js +14 -2
- package/dist/esm/react/components/AccountMenuButton/WalletSettingsLayout.js +1 -1
- package/dist/esm/react/components/AccountMenuButton/Web3AuthProfileButton.css +154 -5
- package/dist/esm/react/components/AccountMenuButton/index.js +7 -3
- package/dist/esm/react/context/reactLoginStateBuilders.js +20 -0
- package/dist/esm/react/context/useLoginStateRefresher.js +1 -0
- package/dist/esm/react/hooks/useAccountInput.js +1 -1
- package/dist/esm/react/hooks/useOwnerNearOperation.js +10 -0
- package/dist/esm/react/index.js +3 -2
- package/dist/esm/react/styles/styles.css +154 -5
- package/dist/esm/sdk/{ConfirmationDrawer-AZruQmhP.js → ConfirmationDrawer-BRnd5SEf.js} +1 -1
- package/dist/esm/sdk/NonceCoordinator-CNXYrOoy.js +1 -0
- package/dist/{public/sdk/SeamsWordmark-DwvPx2UA.js → esm/sdk/SeamsWordmark-CeEi2RlU.js} +1 -1
- package/dist/esm/sdk/accountLifecycle-B5a9SCM7.js +1 -0
- package/dist/esm/sdk/{adapters-d9yh1bdC.js → adapters-B2k8y0MB.js} +1 -1
- package/dist/esm/sdk/appearance-token-vars-DkF3EBbF.js +1 -0
- package/dist/esm/sdk/authorization-gVWwKwav.js +1 -0
- package/dist/esm/sdk/clientSessionPersistenceState-BxpITYM_.js +1 -0
- package/dist/esm/sdk/{collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js → collectAuthenticationCredentialForChallengeB64u-BoFVpdRS.js} +1 -1
- package/dist/esm/sdk/{commitQueue-CYruPlkm.js → commitQueue-C1wkey4q.js} +1 -1
- package/dist/esm/sdk/configBuilder-DpChXfDO.js +1 -0
- package/dist/esm/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
- package/dist/esm/sdk/confirm-ui-Dx6c4-Rk.js +2 -0
- package/dist/esm/sdk/{device-linking-DiCNt3iA.js → device-linking-_o3_fgiG.js} +1 -1
- package/dist/esm/sdk/{deviceLinkApproval-CfEiotVt.js → deviceLinkApproval-CObsEWBa.js} +1 -1
- package/dist/esm/sdk/{display-D0EPmU4w.js → display-CUWg48tD.js} +1 -1
- package/dist/{public/sdk/ecdsaCapabilityManifest-DAJEVjlP.js → esm/sdk/ecdsaCapabilityManifest--1Ztngfx.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js → esm/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js} +1 -1
- package/dist/esm/sdk/ecdsaDerivationExport-BUUUGc6o.js +1 -0
- package/dist/esm/sdk/{ecdsaWalletRecords-WLyq414E.js → ecdsaWalletRecords-CKaXfsVu.js} +1 -1
- package/dist/esm/sdk/ed25519OperationFingerprint-Dev4P6Og.js +1 -0
- package/dist/{public/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js → esm/sdk/emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js} +1 -1
- package/dist/esm/sdk/{enrichDisplayModelWithAbi-O6Mw4i2E.js → enrichDisplayModelWithAbi-JeAcpa7r.js} +1 -1
- package/dist/esm/sdk/{evmCryptoWasm-BUPb4hBH.js → evmCryptoWasm-CeH6Qeaa.js} +1 -1
- package/dist/esm/sdk/{export-viewer-host-BtrKVXxu.js → export-viewer-host-O0OV1Oou.js} +1 -1
- package/dist/esm/sdk/exportKeypairOperation-DkqY9Bpf.js +1 -0
- package/dist/esm/sdk/host-BeE2dIU4.js +1 -0
- package/dist/{public/sdk/icons-BlMXolHv.js → esm/sdk/icons-pSZJ5Xrm.js} +1 -1
- package/dist/esm/sdk/indexedDB-CA4tGqkr.js +1 -0
- package/dist/esm/sdk/{intentDigest-HvRsBQ1z.js → intentDigest-gM3r4SVX.js} +1 -1
- package/dist/esm/sdk/{lanes-BU-fGqY4.js → lanes-vBKm6yBJ.js} +1 -1
- package/dist/esm/sdk/{localOnly-BATWJj78.js → localOnly-U_MucUAe.js} +1 -1
- package/dist/{public/sdk/mountExportPrivateKeySurface-CyHU8bVc.js → esm/sdk/mountExportPrivateKeySurface-C2-fnvP6.js} +1 -1
- package/dist/{public/sdk/mountRecoveryCodeBackupSurface-C7aglQxf.js → esm/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js} +1 -1
- package/dist/esm/sdk/nearEd25519YaoSigningPreparation-CnbgQfZc.js +1 -0
- package/dist/esm/sdk/{nonceLaneKeys-BF_UpvIy.js → nonceLaneKeys-DtBpxubF.js} +1 -1
- package/dist/esm/sdk/{normalization-Df9fZWJC.js → normalization-DmfGvZ_3.js} +1 -1
- package/dist/esm/sdk/ownerNearOperation-DjNDxW3_.js +1 -0
- package/dist/{public/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js → esm/sdk/pendingWalletRecoveryCodeBackup-DXFrQmO5.js} +1 -1
- package/dist/esm/sdk/{presignaturePool-BbvqRWYw.js → presignaturePool-Dq4RhzXn.js} +1 -1
- package/dist/{public/sdk/recovery-entrypoint-DJbMDC_m.js → esm/sdk/recovery-entrypoint-s9OoKBcl.js} +1 -1
- package/dist/esm/sdk/registration-CTtTocyo.js +1 -0
- package/dist/esm/sdk/{registration-HSwOHZOo.js → registration-D3p7muCc.js} +1 -1
- package/dist/esm/sdk/{registrationAccounts-4r74gX1l.js → registrationAccounts-Bso0ntMs.js} +1 -1
- package/dist/{public/sdk/registrationIntent-Do1tD1V7.js → esm/sdk/registrationIntent-C1-Kyx_-.js} +1 -1
- package/dist/esm/sdk/{registrationSignerPlan-DK2b3N_p.js → registrationSignerPlan-CeMidFme.js} +1 -1
- package/dist/{public/sdk/requireStepUpAuth-COqCGb1i.js → esm/sdk/requireStepUpAuth-iVo6h_U-.js} +1 -1
- package/dist/esm/sdk/resealedEnvelopeResult-DXDo-72P.js +1 -0
- package/dist/esm/sdk/{routerAbNormalSigning-D-UZmCBS.js → routerAbNormalSigning-DVFFkNhJ.js} +1 -1
- package/dist/esm/sdk/runtime-auth-Dsmw_dUA.js +1 -0
- package/dist/esm/sdk/runtime-device-link-qmYvGep9.js +1 -0
- package/dist/esm/sdk/runtime-ecdsa-tempo-Zh95TuLV.js +1 -0
- package/dist/esm/sdk/runtime-email-otp-CnLuW4H1.js +1 -0
- package/dist/esm/sdk/runtime-export-m8lvrXtw.js +1 -0
- package/dist/esm/sdk/runtime-near-BiXzXXhH.js +1 -0
- package/dist/esm/sdk/runtime-preferences-DlKHDIjb.js +1 -0
- package/dist/esm/sdk/runtime-recovery-C6lS71Jp.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-DeUjQsxZ.js → runtime-recovery-codes-B033ake_.js} +1 -1
- package/dist/esm/sdk/runtimeContext-RNS2E5wy.js +7 -0
- package/dist/{public/sdk/secp256k1-CE7-q9Sn.js → esm/sdk/secp256k1-DPeaOjM0.js} +1 -1
- package/dist/esm/sdk/signEvmFamily-Cksw3RpU.js +1 -0
- package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js → signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js} +1 -1
- package/dist/esm/sdk/{signEvmWithUiConfirm-CGrLtMV6.js → signEvmWithUiConfirm-B14zYdwE.js} +1 -1
- package/dist/esm/sdk/signNear-D0rFEYP1.js +1 -0
- package/dist/esm/sdk/{signatureUses-kSrUHSSH.js → signatureUses-BLOoPRsb.js} +1 -1
- package/dist/{public/sdk/signingFlow-BcetvUeS.js → esm/sdk/signingFlow-Bd1X0e-1.js} +2 -2
- package/dist/{public/sdk/signingQueue-dMFOFOP5.js → esm/sdk/signingQueue-DoUBeaCv.js} +1 -1
- package/dist/esm/sdk/{thresholdEcdsa-CqR1fFA-.js → thresholdEcdsa-BxfOZmiR.js} +1 -1
- package/dist/esm/sdk/{trace--mRP2OQc.js → trace-BnhLKxcu.js} +1 -1
- package/dist/esm/sdk/{transaction-activity-DCzHGg3b.js → transaction-activity-BXSxMp1E.js} +1 -1
- package/dist/{public/sdk/transactionState-29T9xfvL.js → esm/sdk/transactionState-G_FPe-U8.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +8 -0
- package/dist/esm/sdk/{types-f7dyj5N6.js → types-A-w1cYlJ.js} +1 -1
- package/dist/esm/sdk/{unlockedEd25519ExportRootCapability-yzxQjIFd.js → unlockedEd25519ExportRootCapability-5F1egCSv.js} +1 -1
- package/dist/esm/sdk/voiceid-host.js +1 -1
- 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-BZB2Vu3X.js → wallet-recovery-DXdm68_Q.js} +1 -1
- package/dist/{public/sdk/walletAuthMethodRecord-DLBB5fez.js → esm/sdk/walletAuthMethodRecord-BW-XV4fv.js} +1 -1
- package/dist/esm/sdk/{walletAuthority-BTGAuOi8.js → walletAuthority-DbGaSw7D.js} +1 -1
- package/dist/esm/sdk/{walletCapabilityBindings-D5YYB7nN.js → walletCapabilityBindings-mPx-6_r-.js} +1 -1
- package/dist/{public/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js → esm/sdk/walletCustodyEcdsaContinuity-BnyL1Ryu.js} +1 -1
- package/dist/esm/sdk/{walletOwnershipGeneration-CgjCtPrV.js → walletOwnershipGeneration-BZc6UKqX.js} +1 -1
- package/dist/esm/sdk/walletRecoveryAdminProof-DdwikrW3.js +1 -0
- package/dist/esm/sdk/walletRecoveryCommit-DbAoiJp5.js +1 -0
- package/dist/{public/sdk/walletSessionAuthorizationStore-B9Vwkshr.js → esm/sdk/walletSessionAuthorizationStore-BivTUoKY.js} +1 -1
- package/dist/esm/sdk/{webauthnP256-BsQQPurm.js → webauthnP256-BGHikiNl.js} +1 -1
- package/dist/esm/shared-ts/src/auth/externalAuth.js +53 -0
- package/dist/esm/shared-ts/src/utils/index.js +2 -2
- package/dist/esm/voiceid-host.js +2 -2
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/{ConfirmationDrawer-AZruQmhP.js → ConfirmationDrawer-BRnd5SEf.js} +1 -1
- package/dist/public/sdk/NonceCoordinator-CNXYrOoy.js +1 -0
- package/dist/{esm/sdk/SeamsWordmark-DwvPx2UA.js → public/sdk/SeamsWordmark-CeEi2RlU.js} +1 -1
- package/dist/public/sdk/accountLifecycle-B5a9SCM7.js +1 -0
- package/dist/public/sdk/{adapters-d9yh1bdC.js → adapters-B2k8y0MB.js} +1 -1
- package/dist/public/sdk/appearance-token-vars-DkF3EBbF.js +1 -0
- package/dist/public/sdk/authorization-gVWwKwav.js +1 -0
- package/dist/public/sdk/clientSessionPersistenceState-BxpITYM_.js +1 -0
- package/dist/public/sdk/{collectAuthenticationCredentialForChallengeB64u-I4wq8OGq.js → collectAuthenticationCredentialForChallengeB64u-BoFVpdRS.js} +1 -1
- package/dist/public/sdk/{commitQueue-CYruPlkm.js → commitQueue-C1wkey4q.js} +1 -1
- package/dist/public/sdk/configBuilder-DpChXfDO.js +1 -0
- package/dist/public/sdk/{configuration-DBEc3bsj.js → configuration-BAad7ngq.js} +1 -1
- package/dist/public/sdk/confirm-ui-Dx6c4-Rk.js +2 -0
- package/dist/public/sdk/{device-linking-DiCNt3iA.js → device-linking-_o3_fgiG.js} +1 -1
- package/dist/public/sdk/{deviceLinkApproval-CfEiotVt.js → deviceLinkApproval-CObsEWBa.js} +1 -1
- package/dist/public/sdk/{display-D0EPmU4w.js → display-CUWg48tD.js} +1 -1
- package/dist/{esm/sdk/ecdsaCapabilityManifest-DAJEVjlP.js → public/sdk/ecdsaCapabilityManifest--1Ztngfx.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationClientWasm-AYOJgTJm.js → public/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js} +1 -1
- package/dist/public/sdk/ecdsaDerivationExport-BUUUGc6o.js +1 -0
- package/dist/public/sdk/{ecdsaWalletRecords-WLyq414E.js → ecdsaWalletRecords-CKaXfsVu.js} +1 -1
- package/dist/public/sdk/ed25519OperationFingerprint-Dev4P6Og.js +1 -0
- package/dist/{esm/sdk/emailOtpEcdsaDerivationIdentity-HFQXc1Yw.js → public/sdk/emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js} +1 -1
- package/dist/public/sdk/{enrichDisplayModelWithAbi-O6Mw4i2E.js → enrichDisplayModelWithAbi-JeAcpa7r.js} +1 -1
- package/dist/public/sdk/{evmCryptoWasm-BUPb4hBH.js → evmCryptoWasm-CeH6Qeaa.js} +1 -1
- package/dist/public/sdk/{export-viewer-host-BtrKVXxu.js → export-viewer-host-O0OV1Oou.js} +1 -1
- package/dist/public/sdk/exportKeypairOperation-DkqY9Bpf.js +1 -0
- package/dist/public/sdk/host-BeE2dIU4.js +1 -0
- package/dist/{esm/sdk/icons-BlMXolHv.js → public/sdk/icons-pSZJ5Xrm.js} +1 -1
- package/dist/public/sdk/indexedDB-CA4tGqkr.js +1 -0
- package/dist/public/sdk/{intentDigest-HvRsBQ1z.js → intentDigest-gM3r4SVX.js} +1 -1
- package/dist/public/sdk/{lanes-BU-fGqY4.js → lanes-vBKm6yBJ.js} +1 -1
- package/dist/public/sdk/{localOnly-BATWJj78.js → localOnly-U_MucUAe.js} +1 -1
- package/dist/{esm/sdk/mountExportPrivateKeySurface-CyHU8bVc.js → public/sdk/mountExportPrivateKeySurface-C2-fnvP6.js} +1 -1
- package/dist/{esm/sdk/mountRecoveryCodeBackupSurface-C7aglQxf.js → public/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js} +1 -1
- package/dist/public/sdk/nearEd25519YaoSigningPreparation-CnbgQfZc.js +1 -0
- package/dist/public/sdk/{nonceLaneKeys-BF_UpvIy.js → nonceLaneKeys-DtBpxubF.js} +1 -1
- package/dist/public/sdk/{normalization-Df9fZWJC.js → normalization-DmfGvZ_3.js} +1 -1
- package/dist/public/sdk/ownerNearOperation-DjNDxW3_.js +1 -0
- package/dist/{esm/sdk/pendingWalletRecoveryCodeBackup-Cjx-X-pP.js → public/sdk/pendingWalletRecoveryCodeBackup-DXFrQmO5.js} +1 -1
- package/dist/public/sdk/{presignaturePool-BbvqRWYw.js → presignaturePool-Dq4RhzXn.js} +1 -1
- package/dist/{esm/sdk/recovery-entrypoint-DJbMDC_m.js → public/sdk/recovery-entrypoint-s9OoKBcl.js} +1 -1
- package/dist/public/sdk/registration-CTtTocyo.js +1 -0
- package/dist/public/sdk/{registration-HSwOHZOo.js → registration-D3p7muCc.js} +1 -1
- package/dist/public/sdk/{registrationAccounts-4r74gX1l.js → registrationAccounts-Bso0ntMs.js} +1 -1
- package/dist/{esm/sdk/registrationIntent-Do1tD1V7.js → public/sdk/registrationIntent-C1-Kyx_-.js} +1 -1
- package/dist/public/sdk/{registrationSignerPlan-DK2b3N_p.js → registrationSignerPlan-CeMidFme.js} +1 -1
- package/dist/{esm/sdk/requireStepUpAuth-COqCGb1i.js → public/sdk/requireStepUpAuth-iVo6h_U-.js} +1 -1
- package/dist/public/sdk/resealedEnvelopeResult-DXDo-72P.js +1 -0
- package/dist/public/sdk/{routerAbNormalSigning-D-UZmCBS.js → routerAbNormalSigning-DVFFkNhJ.js} +1 -1
- package/dist/public/sdk/runtime-auth-Dsmw_dUA.js +1 -0
- package/dist/public/sdk/runtime-device-link-qmYvGep9.js +1 -0
- package/dist/public/sdk/runtime-ecdsa-tempo-Zh95TuLV.js +1 -0
- package/dist/public/sdk/runtime-email-otp-CnLuW4H1.js +1 -0
- package/dist/public/sdk/runtime-export-m8lvrXtw.js +1 -0
- package/dist/public/sdk/runtime-near-BiXzXXhH.js +1 -0
- package/dist/public/sdk/runtime-preferences-DlKHDIjb.js +1 -0
- package/dist/public/sdk/runtime-recovery-C6lS71Jp.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-DeUjQsxZ.js → runtime-recovery-codes-B033ake_.js} +1 -1
- package/dist/public/sdk/runtimeContext-RNS2E5wy.js +7 -0
- package/dist/{esm/sdk/secp256k1-CE7-q9Sn.js → public/sdk/secp256k1-DPeaOjM0.js} +1 -1
- package/dist/public/sdk/signEvmFamily-Cksw3RpU.js +1 -0
- package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-CrMIAXUe.js → signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js} +1 -1
- package/dist/public/sdk/{signEvmWithUiConfirm-CGrLtMV6.js → signEvmWithUiConfirm-B14zYdwE.js} +1 -1
- package/dist/public/sdk/signNear-D0rFEYP1.js +1 -0
- package/dist/public/sdk/{signatureUses-kSrUHSSH.js → signatureUses-BLOoPRsb.js} +1 -1
- package/dist/{esm/sdk/signingFlow-BcetvUeS.js → public/sdk/signingFlow-Bd1X0e-1.js} +2 -2
- package/dist/{esm/sdk/signingQueue-dMFOFOP5.js → public/sdk/signingQueue-DoUBeaCv.js} +1 -1
- package/dist/public/sdk/{thresholdEcdsa-CqR1fFA-.js → thresholdEcdsa-BxfOZmiR.js} +1 -1
- package/dist/public/sdk/{trace--mRP2OQc.js → trace-BnhLKxcu.js} +1 -1
- package/dist/public/sdk/{transaction-activity-DCzHGg3b.js → transaction-activity-BXSxMp1E.js} +1 -1
- package/dist/{esm/sdk/transactionState-29T9xfvL.js → public/sdk/transactionState-G_FPe-U8.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +8 -0
- package/dist/public/sdk/{types-f7dyj5N6.js → types-A-w1cYlJ.js} +1 -1
- package/dist/public/sdk/{unlockedEd25519ExportRootCapability-yzxQjIFd.js → unlockedEd25519ExportRootCapability-5F1egCSv.js} +1 -1
- package/dist/public/sdk/voiceid-host.js +1 -1
- 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-BZB2Vu3X.js → wallet-recovery-DXdm68_Q.js} +1 -1
- package/dist/{esm/sdk/walletAuthMethodRecord-DLBB5fez.js → public/sdk/walletAuthMethodRecord-BW-XV4fv.js} +1 -1
- package/dist/public/sdk/{walletAuthority-BTGAuOi8.js → walletAuthority-DbGaSw7D.js} +1 -1
- package/dist/public/sdk/{walletCapabilityBindings-D5YYB7nN.js → walletCapabilityBindings-mPx-6_r-.js} +1 -1
- package/dist/{esm/sdk/walletCustodyEcdsaContinuity-C31YQ9av.js → public/sdk/walletCustodyEcdsaContinuity-BnyL1Ryu.js} +1 -1
- package/dist/public/sdk/{walletOwnershipGeneration-CgjCtPrV.js → walletOwnershipGeneration-BZc6UKqX.js} +1 -1
- package/dist/public/sdk/walletRecoveryAdminProof-DdwikrW3.js +1 -0
- package/dist/public/sdk/walletRecoveryCommit-DbAoiJp5.js +1 -0
- package/dist/{esm/sdk/walletSessionAuthorizationStore-B9Vwkshr.js → public/sdk/walletSessionAuthorizationStore-BivTUoKY.js} +1 -1
- package/dist/public/sdk/{webauthnP256-BsQQPurm.js → webauthnP256-BGHikiNl.js} +1 -1
- package/dist/public/wallet-assets.manifest.json +262 -262
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/shared-ts/src/auth/externalAuth.d.ts +127 -0
- package/dist/types/shared-ts/src/authorization/index.d.ts +1 -1
- package/dist/types/shared-ts/src/authorization/walletOwnerOperation.d.ts +10 -0
- package/dist/types/shared-ts/src/utils/registrationEstablishedSession.d.ts +4 -0
- package/dist/types/shared-ts/src/utils/registrationIntent.d.ts +2 -0
- package/dist/types/shared-ts/src/utils/walletManagementProtocol.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/operations/devices/walletHostOwnerAuthority.d.ts +2 -1
- package/dist/types/wallet/src/SeamsWeb/operations/registration/pendingRegistrationRecovery.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/operations/registration/registration.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/operations/registration/registrationPasskeyMaterial.d.ts +24 -0
- package/dist/types/wallet/src/SeamsWeb/publicApi/auth.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/publicApi/createPublicApi.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/publicApi/nearCommands.d.ts +2 -0
- package/dist/types/wallet/src/SeamsWeb/publicApi/ownerNearOperation.d.ts +58 -0
- package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +21 -2
- package/dist/types/wallet/src/SeamsWeb/signingSurface/BrowserSigningSurface.d.ts +57 -56
- package/dist/types/wallet/src/SeamsWeb/signingSurface/nearOwnerOperation.d.ts +16 -0
- package/dist/types/wallet/src/SeamsWeb/signingSurface/nearPasskeyOperationMaterial.d.ts +72 -0
- package/dist/types/wallet/src/SeamsWeb/signingSurface/types.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/ownerNearOperation.d.ts +25 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +8 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/WalletHostRuntime.d.ts +8 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createNearCommands.d.ts +2 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/createSessionCommands.d.ts +9 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalAuth.d.ts +31 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/externalOwnerApproval.d.ts +24 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ownerNearOperation.d.ts +12 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestRouter.d.ts +2 -2
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/sessionObserver.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/exactSessionState.d.ts +8 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +17 -7
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/ownerNearOperation.d.ts +51 -0
- package/dist/types/wallet/src/core/authMethods/plugins.d.ts +2 -0
- package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/registrationSetup.d.ts +1 -0
- package/dist/types/wallet/src/core/indexedDB/seamsWalletDB/repositories.d.ts +4 -0
- package/dist/types/wallet/src/core/rpcClients/near/NearClient.d.ts +4 -0
- package/dist/types/wallet/src/core/rpcClients/relayer/walletRecoveryRotate.d.ts +2 -2
- package/dist/types/wallet/src/core/rpcClients/relayer/walletRegistration.d.ts +1 -0
- package/dist/types/wallet/src/core/signingEngine/session/passkey/ed25519YaoLocalMaterial.d.ts +21 -0
- package/dist/types/wallet/src/core/types/seams.d.ts +21 -6
- package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
- package/dist/types/wallet/src/index.d.ts +3 -0
- package/dist/types/wallet/src/react/boundWallet.d.ts +21 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuButtonView.d.ts +2 -1
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountSettingsDialog.d.ts +10 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/AuthenticationMethodsModal.d.ts +1 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/ExternalWalletSettings.d.ts +10 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/LinkedDevicesModal.d.ts +1 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/WalletSettingsLayout.d.ts +1 -0
- package/dist/types/wallet/src/react/components/AccountMenuButton/hooks/useProfileState.d.ts +2 -2
- package/dist/types/wallet/src/react/components/AccountMenuButton/types.d.ts +4 -3
- package/dist/types/wallet/src/react/context/reactLoginStateBuilders.d.ts +1 -1
- package/dist/types/wallet/src/react/hooks/useOwnerNearOperation.d.ts +4 -0
- package/dist/types/wallet/src/react/index.d.ts +3 -0
- package/dist/types/wallet/src/react/types.d.ts +13 -3
- package/dist/types/wallet/src/voiceid-host.d.ts +2 -2
- package/package.json +1 -1
- package/dist/esm/react/components/AccountMenuButton/AccountMenuModal.js +0 -66
- package/dist/esm/sdk/NonceCoordinator-3YhmDTS5.js +0 -1
- package/dist/esm/sdk/accountLifecycle-6DHYWf0v.js +0 -1
- package/dist/esm/sdk/appearance-token-vars-BJydfWT_.js +0 -1
- package/dist/esm/sdk/clientSessionPersistenceState-BCkJAYSz.js +0 -1
- package/dist/esm/sdk/configBuilder-CSwJrmcR.js +0 -1
- package/dist/esm/sdk/confirm-ui-nU6ymgiv.js +0 -2
- package/dist/esm/sdk/ecdsaDerivationExport-DJKOzDbS.js +0 -1
- package/dist/esm/sdk/exportKeypairOperation-CGE9ZU1m.js +0 -1
- package/dist/esm/sdk/host-DayrOrgm.js +0 -1
- package/dist/esm/sdk/indexedDB-C4SDsyOG.js +0 -1
- package/dist/esm/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +0 -1
- package/dist/esm/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +0 -1
- package/dist/esm/sdk/registration-CNLUYN-p.js +0 -1
- package/dist/esm/sdk/resealedEnvelopeResult-B1p5UkYg.js +0 -1
- package/dist/esm/sdk/runtime-auth-BCoj7_-G.js +0 -1
- package/dist/esm/sdk/runtime-device-link-DAsq5tGT.js +0 -1
- package/dist/esm/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +0 -1
- package/dist/esm/sdk/runtime-email-otp-BxSKK9AG.js +0 -1
- package/dist/esm/sdk/runtime-export-BWnQXMzT.js +0 -1
- package/dist/esm/sdk/runtime-near-CuzPZrDS.js +0 -1
- package/dist/esm/sdk/runtime-preferences-B-nDWlm3.js +0 -1
- package/dist/esm/sdk/runtime-recovery-DpOdEJ8N.js +0 -1
- package/dist/esm/sdk/runtimeContext-5JcewRo3.js +0 -6
- package/dist/esm/sdk/sessionObservationRevision-JOvVF4Hf.js +0 -1
- package/dist/esm/sdk/signEvmFamily-BY5jlZEG.js +0 -1
- package/dist/esm/sdk/signNear-DMpJFkwF.js +0 -1
- package/dist/esm/sdk/signer-worker-BNodGJKY.js +0 -1
- package/dist/esm/sdk/walletRecoveryAdminProof-CvSYbyg5.js +0 -1
- package/dist/esm/sdk/walletRecoveryCommit-Cc2LAkCS.js +0 -1
- package/dist/public/sdk/NonceCoordinator-3YhmDTS5.js +0 -1
- package/dist/public/sdk/accountLifecycle-6DHYWf0v.js +0 -1
- package/dist/public/sdk/appearance-token-vars-BJydfWT_.js +0 -1
- package/dist/public/sdk/clientSessionPersistenceState-BCkJAYSz.js +0 -1
- package/dist/public/sdk/configBuilder-CSwJrmcR.js +0 -1
- package/dist/public/sdk/confirm-ui-nU6ymgiv.js +0 -2
- package/dist/public/sdk/ecdsaDerivationExport-DJKOzDbS.js +0 -1
- package/dist/public/sdk/exportKeypairOperation-CGE9ZU1m.js +0 -1
- package/dist/public/sdk/host-DayrOrgm.js +0 -1
- package/dist/public/sdk/indexedDB-C4SDsyOG.js +0 -1
- package/dist/public/sdk/nearEd25519YaoMaterialActivation-BfXmy3Jr.js +0 -1
- package/dist/public/sdk/nearEd25519YaoSigningPreparation-DHNk0F8e.js +0 -1
- package/dist/public/sdk/registration-CNLUYN-p.js +0 -1
- package/dist/public/sdk/resealedEnvelopeResult-B1p5UkYg.js +0 -1
- package/dist/public/sdk/runtime-auth-BCoj7_-G.js +0 -1
- package/dist/public/sdk/runtime-device-link-DAsq5tGT.js +0 -1
- package/dist/public/sdk/runtime-ecdsa-tempo-CVh_Vwl6.js +0 -1
- package/dist/public/sdk/runtime-email-otp-BxSKK9AG.js +0 -1
- package/dist/public/sdk/runtime-export-BWnQXMzT.js +0 -1
- package/dist/public/sdk/runtime-near-CuzPZrDS.js +0 -1
- package/dist/public/sdk/runtime-preferences-B-nDWlm3.js +0 -1
- package/dist/public/sdk/runtime-recovery-DpOdEJ8N.js +0 -1
- package/dist/public/sdk/runtimeContext-5JcewRo3.js +0 -6
- package/dist/public/sdk/sessionObservationRevision-JOvVF4Hf.js +0 -1
- package/dist/public/sdk/signEvmFamily-BY5jlZEG.js +0 -1
- package/dist/public/sdk/signNear-DMpJFkwF.js +0 -1
- package/dist/public/sdk/signer-worker-BNodGJKY.js +0 -1
- package/dist/public/sdk/walletRecoveryAdminProof-CvSYbyg5.js +0 -1
- package/dist/public/sdk/walletRecoveryCommit-Cc2LAkCS.js +0 -1
- package/dist/types/shared-ts/src/authorization/walletCustodyOperation.d.ts +0 -10
- package/dist/types/wallet/src/react/components/AccountMenuButton/AccountMenuModal.d.ts +0 -9
- /package/dist/esm/sdk/{accountIds-CW2BP-d9.js → accountIds-DGWFzEnw.js} +0 -0
- /package/dist/esm/sdk/{actions-DrtSTGus.js → actions-7SvZZut1.js} +0 -0
- /package/dist/esm/sdk/{authenticatorOptions-WCDKYRux.js → authenticatorOptions-B4q62CLs.js} +0 -0
- /package/dist/esm/sdk/{confirmTypes-BvVtQs-M.js → confirmTypes-DmEPoxys.js} +0 -0
- /package/dist/esm/sdk/{csp-stylesheet-DUSqfXvZ.js → csp-stylesheet-5LU6VGKK.js} +0 -0
- /package/dist/esm/sdk/{digestEncoding-CqNXPZY9.js → digestEncoding-34kXJoJr.js} +0 -0
- /package/dist/esm/sdk/{ecdsaChainTarget-Bm5X4k-V.js → ecdsaChainTarget-BoRVQtjQ.js} +0 -0
- /package/dist/esm/sdk/{executeWorkerOperation-C9FOCCR7.js → executeWorkerOperation-CAYSt0NA.js} +0 -0
- /package/dist/esm/sdk/{helpers-Dubwo5uK.js → helpers-B7c1zc7h.js} +0 -0
- /package/dist/esm/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-DGzeiNSa.js} +0 -0
- /package/dist/esm/sdk/{keccak-mS0Mejjx.js → keccak-DGHI1G6t.js} +0 -0
- /package/dist/esm/sdk/{keyMaterialEnvelope-Dm2ZEilb.js → keyMaterialEnvelope-Czkks9Ki.js} +0 -0
- /package/dist/esm/sdk/{presignatures-BCeq56DG.js → presignatures-CkhuZ0YQ.js} +0 -0
- /package/dist/esm/sdk/{profileAccountProjection-C5sNt-s2.js → profileAccountProjection-dvLchPBo.js} +0 -0
- /package/dist/esm/sdk/{registrationAuthMethodInput-BR1WVbK3.js → registrationAuthMethodInput-C4o7yFBJ.js} +0 -0
- /package/dist/esm/sdk/{sdkSentEvents-DjOlKtdW.js → sdkSentEvents-BFwv3mBw.js} +0 -0
- /package/dist/esm/sdk/{signerDomain-BAsLT3XN.js → signerDomain-D-EUTlLK.js} +0 -0
- /package/dist/esm/sdk/{signerSlot-D2RZnb27.js → signerSlot-BlijMq8C.js} +0 -0
- /package/dist/esm/sdk/{surface-measurement-reporter-DXsvq401.js → surface-measurement-reporter-DJ_dQhBV.js} +0 -0
- /package/dist/esm/sdk/{walletCustodyOperation-DimzAbCB.js → walletOwnerOperation-CScYv2K6.js} +0 -0
- /package/dist/esm/sdk/{walletSessionAuthorizationStatus-DG7DPcgR.js → walletSessionAuthorizationStatus-GhcGvDCX.js} +0 -0
- /package/dist/public/sdk/{accountIds-CW2BP-d9.js → accountIds-DGWFzEnw.js} +0 -0
- /package/dist/public/sdk/{actions-DrtSTGus.js → actions-7SvZZut1.js} +0 -0
- /package/dist/public/sdk/{authenticatorOptions-WCDKYRux.js → authenticatorOptions-B4q62CLs.js} +0 -0
- /package/dist/public/sdk/{confirmTypes-BvVtQs-M.js → confirmTypes-DmEPoxys.js} +0 -0
- /package/dist/public/sdk/{csp-stylesheet-DUSqfXvZ.js → csp-stylesheet-5LU6VGKK.js} +0 -0
- /package/dist/public/sdk/{digestEncoding-CqNXPZY9.js → digestEncoding-34kXJoJr.js} +0 -0
- /package/dist/public/sdk/{ecdsaChainTarget-Bm5X4k-V.js → ecdsaChainTarget-BoRVQtjQ.js} +0 -0
- /package/dist/public/sdk/{executeWorkerOperation-C9FOCCR7.js → executeWorkerOperation-CAYSt0NA.js} +0 -0
- /package/dist/public/sdk/{helpers-Dubwo5uK.js → helpers-B7c1zc7h.js} +0 -0
- /package/dist/public/sdk/{jsonRpc-BVDv1wfm.js → jsonRpc-DGzeiNSa.js} +0 -0
- /package/dist/public/sdk/{keccak-mS0Mejjx.js → keccak-DGHI1G6t.js} +0 -0
- /package/dist/public/sdk/{keyMaterialEnvelope-Dm2ZEilb.js → keyMaterialEnvelope-Czkks9Ki.js} +0 -0
- /package/dist/public/sdk/{presignatures-BCeq56DG.js → presignatures-CkhuZ0YQ.js} +0 -0
- /package/dist/public/sdk/{profileAccountProjection-C5sNt-s2.js → profileAccountProjection-dvLchPBo.js} +0 -0
- /package/dist/public/sdk/{registrationAuthMethodInput-BR1WVbK3.js → registrationAuthMethodInput-C4o7yFBJ.js} +0 -0
- /package/dist/public/sdk/{sdkSentEvents-DjOlKtdW.js → sdkSentEvents-BFwv3mBw.js} +0 -0
- /package/dist/public/sdk/{signerDomain-BAsLT3XN.js → signerDomain-D-EUTlLK.js} +0 -0
- /package/dist/public/sdk/{signerSlot-D2RZnb27.js → signerSlot-BlijMq8C.js} +0 -0
- /package/dist/public/sdk/{surface-measurement-reporter-DXsvq401.js → surface-measurement-reporter-DJ_dQhBV.js} +0 -0
- /package/dist/public/sdk/{walletCustodyOperation-DimzAbCB.js → walletOwnerOperation-CScYv2K6.js} +0 -0
- /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
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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 = "
|
|
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).
|
|
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({
|
|
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]: "
|
|
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 =
|
|
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
|
-
}
|
|
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
|
|