@seams/wallet 0.29.0 → 0.31.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 +7 -7
- package/THIRD_PARTY_NOTICES.md +1 -127
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/SeamsWeb/SeamsWeb.js +2 -0
- package/dist/esm/SeamsWeb/walletIframe/client/inboundMessages.js +9 -0
- package/dist/esm/SeamsWeb/walletIframe/client/router.js +30 -0
- package/dist/esm/SeamsWeb/walletIframe/coordinator.js +18 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.js +88 -47
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/WalletAlternativesSection.js +67 -0
- package/dist/esm/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.js +13 -0
- package/dist/esm/SeamsWeb/walletIframe/host/walletMutationGuard.js +1 -0
- package/dist/esm/SeamsWeb/walletIframe/shared/messages.js +20 -6
- package/dist/esm/SeamsWeb/walletIframe/shared/walletAlternatives.js +109 -0
- package/dist/esm/core/config/configBuilder.js +1 -1
- package/dist/esm/core/config/defaultConfigs.js +9 -2
- package/dist/esm/core/ui/messages.js +3 -1
- package/dist/esm/core/ui/walletIcon.js +10 -0
- package/dist/esm/externalEvm/boundary.js +4 -2
- package/dist/esm/react/components/HostedSeamsAuthMenu/shell.js +26 -6
- package/dist/esm/react/components/HostedSeamsAuthMenu/walletAlternatives.js +178 -0
- package/dist/esm/react/index.js +1 -2
- package/dist/esm/react/styles/styles.css +0 -183
- package/dist/esm/react/styles.css +0 -1
- package/dist/esm/sdk/{ConfirmationDrawer-BRnd5SEf.js → ConfirmationDrawer-fyl4IDRl.js} +1 -1
- package/dist/{public/sdk/NonceCoordinator-CNXYrOoy.js → esm/sdk/NonceCoordinator-C1lw03Ce.js} +1 -1
- package/dist/esm/sdk/{activeWalletSession-BJ4B-nJo.js → activeWalletSession-HAOgRKzn.js} +1 -1
- package/dist/esm/sdk/{adapters-B2k8y0MB.js → adapters-BY1wGpm5.js} +1 -1
- package/dist/esm/sdk/appearance-token-vars-CzlRDVQ7.js +1 -0
- package/dist/esm/sdk/{authorization-gVWwKwav.js → authorization-D_NueqAv.js} +1 -1
- package/dist/esm/sdk/{clientSessionPersistenceState-BxpITYM_.js → clientSessionPersistenceState-B3gU3515.js} +1 -1
- package/dist/esm/sdk/{commitQueue-C1wkey4q.js → commitQueue-CbyuhEW9.js} +1 -1
- package/dist/{public/sdk/confirm-ui-Dx6c4-Rk.js → esm/sdk/confirm-ui-DWFcGTsT.js} +1 -1
- package/dist/{public/sdk/device-linking-_o3_fgiG.js → esm/sdk/device-linking-BL2aDEUF.js} +1 -1
- package/dist/esm/sdk/{deviceLinkApproval-CObsEWBa.js → deviceLinkApproval-C4T8XAmi.js} +1 -1
- package/dist/esm/sdk/{digestEncoding-34kXJoJr.js → digestEncoding-Rx8Vjy4J.js} +1 -1
- package/dist/esm/sdk/{display-CUWg48tD.js → display-8NGPOhQT.js} +1 -1
- package/dist/{public/sdk/ecdsaCapabilityManifest--1Ztngfx.js → esm/sdk/ecdsaCapabilityManifest-BbPXL-qh.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js → esm/sdk/ecdsaDerivationClientWasm-GCt9yVsd.js} +1 -1
- package/dist/{public/sdk/ecdsaDerivationExport-BUUUGc6o.js → esm/sdk/ecdsaDerivationExport-jm2VBMz_.js} +1 -1
- package/dist/esm/sdk/{emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js → emailOtpEcdsaDerivationIdentity-DJmMyqL-.js} +1 -1
- package/dist/esm/sdk/{export-viewer-host-O0OV1Oou.js → export-viewer-host-TzgdJQuZ.js} +1 -1
- package/dist/{public/sdk/exportKeypairOperation-DkqY9Bpf.js → esm/sdk/exportKeypairOperation-B9_ulzNz.js} +1 -1
- package/dist/esm/sdk/host-DltV2Oan.js +1 -0
- package/dist/esm/sdk/{indexedDB-CA4tGqkr.js → indexedDB-BqsYXybq.js} +1 -1
- package/dist/esm/sdk/{lanes-vBKm6yBJ.js → lanes-0WT2w1Xz.js} +1 -1
- package/dist/esm/sdk/{localOnly-U_MucUAe.js → localOnly-DFrtrfdO.js} +1 -1
- package/dist/esm/sdk/{mountExportPrivateKeySurface-C2-fnvP6.js → mountExportPrivateKeySurface-D8juRQJM.js} +1 -1
- package/dist/{public/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js → esm/sdk/mountRecoveryCodeBackupSurface-CMtByh-L.js} +1 -1
- package/dist/esm/sdk/{nearEd25519YaoSigningPreparation-CnbgQfZc.js → nearEd25519YaoSigningPreparation-Cz2Gb95g.js} +1 -1
- package/dist/esm/sdk/{operationFingerprint-Bas59T7L.js → operationFingerprint-GKEY-X5I.js} +1 -1
- package/dist/esm/sdk/ownerNearOperation-DCxxHcwX.js +1 -0
- package/dist/esm/sdk/{pendingWalletRecoveryCodeBackup-DXFrQmO5.js → pendingWalletRecoveryCodeBackup-8iMhQU-E.js} +1 -1
- package/dist/{public/sdk/presignaturePool-Dq4RhzXn.js → esm/sdk/presignaturePool-CaI45td2.js} +1 -1
- package/dist/esm/sdk/{presignatures-CkhuZ0YQ.js → presignatures-B9KnQyfE.js} +1 -1
- package/dist/esm/sdk/{recovery-entrypoint-s9OoKBcl.js → recovery-entrypoint-DA2FGLG6.js} +1 -1
- package/dist/esm/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/esm/sdk/{registration-D3p7muCc.js → registration-XNyt1YRK.js} +1 -1
- package/dist/esm/sdk/{registrationIntent-C1-Kyx_-.js → registrationIntent-Cb3tggIM.js} +1 -1
- package/dist/{public/sdk/requireStepUpAuth-iVo6h_U-.js → esm/sdk/requireStepUpAuth-ByMTPBu4.js} +1 -1
- package/dist/esm/sdk/resealedEnvelopeResult-DKY5fVNY.js +1 -0
- package/dist/esm/sdk/routerAbNormalSigning-CPLDkttX.js +1 -0
- package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/esm/sdk/runtime-auth-CP6P681o.js +1 -0
- package/dist/esm/sdk/{runtime-device-link-qmYvGep9.js → runtime-device-link-CGDZQK-D.js} +1 -1
- package/dist/{public/sdk/runtime-ecdsa-tempo-Zh95TuLV.js → esm/sdk/runtime-ecdsa-tempo-BiJYKWK4.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-CnLuW4H1.js → runtime-email-otp-B0XCNDRb.js} +1 -1
- package/dist/esm/sdk/{runtime-export-m8lvrXtw.js → runtime-export-CXxv6KIx.js} +1 -1
- package/dist/esm/sdk/{runtime-near-BiXzXXhH.js → runtime-near-CuyS57wu.js} +1 -1
- package/dist/esm/sdk/runtime-preferences-B2WBUZO7.js +1 -0
- package/dist/esm/sdk/runtime-recovery-KwVdSe94.js +1 -0
- package/dist/esm/sdk/{runtime-recovery-codes-B033ake_.js → runtime-recovery-codes-CFOWDVd9.js} +1 -1
- package/dist/esm/sdk/{runtimeContext-RNS2E5wy.js → runtimeContext-Iy1vecX0.js} +3 -3
- package/dist/esm/sdk/{secp256k1-DPeaOjM0.js → secp256k1-sDDAa4Ga.js} +1 -1
- package/dist/{public/sdk/signEvmFamily-Cksw3RpU.js → esm/sdk/signEvmFamily-CMrXkVsZ.js} +1 -1
- package/dist/esm/sdk/{signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js → signEvmFamilyWithUiConfirmForTempo-CnRoo0e8.js} +1 -1
- package/dist/esm/sdk/{signEvmWithUiConfirm-B14zYdwE.js → signEvmWithUiConfirm-yITc3ZvP.js} +1 -1
- package/dist/esm/sdk/{signNear-D0rFEYP1.js → signNear-DyFk--I3.js} +1 -1
- package/dist/{public/sdk/signingFlow-Bd1X0e-1.js → esm/sdk/signingFlow-DTP4D19E.js} +1 -1
- package/dist/{public/sdk/signingQueue-DoUBeaCv.js → esm/sdk/signingQueue-Dy5mYMus.js} +1 -1
- package/dist/esm/sdk/{thresholdEcdsa-BxfOZmiR.js → thresholdEcdsa-CRfx6RP1.js} +1 -1
- package/dist/esm/sdk/{trace-BnhLKxcu.js → trace-BA8jya7O.js} +1 -1
- package/dist/{public/sdk/transactionState-G_FPe-U8.js → esm/sdk/transactionState-BCbaT2hO.js} +1 -1
- package/dist/esm/sdk/tx-confirm-ui.js +3 -1
- package/dist/esm/sdk/{types-A-w1cYlJ.js → types-D2Zk1W7I.js} +1 -1
- package/dist/{public/sdk/unlockedEd25519ExportRootCapability-5F1egCSv.js → esm/sdk/unlockedEd25519ExportRootCapability-BbGMlikr.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-DXdm68_Q.js → wallet-recovery-Bfm-oUoP.js} +1 -1
- package/dist/esm/sdk/wallet-ui.css +1 -1
- package/dist/{public/sdk/walletAuthMethodRecord-BW-XV4fv.js → esm/sdk/walletAuthMethodRecord--fvGr8r1.js} +1 -1
- package/dist/{public/sdk/walletAuthority-DbGaSw7D.js → esm/sdk/walletAuthority-CU9nO0Ze.js} +1 -1
- package/dist/esm/sdk/{walletCustodyEcdsaContinuity-BnyL1Ryu.js → walletCustodyEcdsaContinuity-BUdDyRl_.js} +1 -1
- package/dist/esm/sdk/{walletDbName-Ca0rCq5r.js → walletDbName-B6-CV_Rq.js} +1 -1
- package/dist/esm/sdk/{walletOwnerOperation-CScYv2K6.js → walletOwnerOperation-BJPxzo-k.js} +1 -1
- package/dist/esm/sdk/{walletOwnershipGeneration-BZc6UKqX.js → walletOwnershipGeneration-B3uE9GRG.js} +1 -1
- package/dist/{public/sdk/walletRecoveryAdminProof-DdwikrW3.js → esm/sdk/walletRecoveryAdminProof-BmZaP0Q8.js} +1 -1
- package/dist/{public/sdk/walletRecoveryCommit-DbAoiJp5.js → esm/sdk/walletRecoveryCommit-CSYNbYNd.js} +1 -1
- package/dist/esm/sdk/{walletSessionAuthorizationStatus-GhcGvDCX.js → walletSessionAuthorizationStatus-CQ3qA9tI.js} +1 -1
- package/dist/{public/sdk/walletSessionAuthorizationStore-BivTUoKY.js → esm/sdk/walletSessionAuthorizationStore-CGt-s5fX.js} +1 -1
- package/dist/esm/shared-ts/src/utils/index.js +1 -1
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ecdsa_client/pkg/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.d.ts +212 -233
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.js +675 -694
- 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-BRnd5SEf.js → ConfirmationDrawer-fyl4IDRl.js} +1 -1
- package/dist/{esm/sdk/NonceCoordinator-CNXYrOoy.js → public/sdk/NonceCoordinator-C1lw03Ce.js} +1 -1
- package/dist/public/sdk/{activeWalletSession-BJ4B-nJo.js → activeWalletSession-HAOgRKzn.js} +1 -1
- package/dist/public/sdk/{adapters-B2k8y0MB.js → adapters-BY1wGpm5.js} +1 -1
- package/dist/public/sdk/appearance-token-vars-CzlRDVQ7.js +1 -0
- package/dist/public/sdk/{authorization-gVWwKwav.js → authorization-D_NueqAv.js} +1 -1
- package/dist/public/sdk/{clientSessionPersistenceState-BxpITYM_.js → clientSessionPersistenceState-B3gU3515.js} +1 -1
- package/dist/public/sdk/{commitQueue-C1wkey4q.js → commitQueue-CbyuhEW9.js} +1 -1
- package/dist/{esm/sdk/confirm-ui-Dx6c4-Rk.js → public/sdk/confirm-ui-DWFcGTsT.js} +1 -1
- package/dist/{esm/sdk/device-linking-_o3_fgiG.js → public/sdk/device-linking-BL2aDEUF.js} +1 -1
- package/dist/public/sdk/{deviceLinkApproval-CObsEWBa.js → deviceLinkApproval-C4T8XAmi.js} +1 -1
- package/dist/public/sdk/{digestEncoding-34kXJoJr.js → digestEncoding-Rx8Vjy4J.js} +1 -1
- package/dist/public/sdk/{display-CUWg48tD.js → display-8NGPOhQT.js} +1 -1
- package/dist/{esm/sdk/ecdsaCapabilityManifest--1Ztngfx.js → public/sdk/ecdsaCapabilityManifest-BbPXL-qh.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationClientWasm-DJh2uN-q.js → public/sdk/ecdsaDerivationClientWasm-GCt9yVsd.js} +1 -1
- package/dist/{esm/sdk/ecdsaDerivationExport-BUUUGc6o.js → public/sdk/ecdsaDerivationExport-jm2VBMz_.js} +1 -1
- package/dist/public/sdk/{emailOtpEcdsaDerivationIdentity-Qd4pBwHv.js → emailOtpEcdsaDerivationIdentity-DJmMyqL-.js} +1 -1
- package/dist/public/sdk/{export-viewer-host-O0OV1Oou.js → export-viewer-host-TzgdJQuZ.js} +1 -1
- package/dist/{esm/sdk/exportKeypairOperation-DkqY9Bpf.js → public/sdk/exportKeypairOperation-B9_ulzNz.js} +1 -1
- package/dist/public/sdk/host-DltV2Oan.js +1 -0
- package/dist/public/sdk/{indexedDB-CA4tGqkr.js → indexedDB-BqsYXybq.js} +1 -1
- package/dist/public/sdk/{lanes-vBKm6yBJ.js → lanes-0WT2w1Xz.js} +1 -1
- package/dist/public/sdk/{localOnly-U_MucUAe.js → localOnly-DFrtrfdO.js} +1 -1
- package/dist/public/sdk/{mountExportPrivateKeySurface-C2-fnvP6.js → mountExportPrivateKeySurface-D8juRQJM.js} +1 -1
- package/dist/{esm/sdk/mountRecoveryCodeBackupSurface-C_tJNPJX.js → public/sdk/mountRecoveryCodeBackupSurface-CMtByh-L.js} +1 -1
- package/dist/public/sdk/{nearEd25519YaoSigningPreparation-CnbgQfZc.js → nearEd25519YaoSigningPreparation-Cz2Gb95g.js} +1 -1
- package/dist/public/sdk/{operationFingerprint-Bas59T7L.js → operationFingerprint-GKEY-X5I.js} +1 -1
- package/dist/public/sdk/ownerNearOperation-DCxxHcwX.js +1 -0
- package/dist/public/sdk/{pendingWalletRecoveryCodeBackup-DXFrQmO5.js → pendingWalletRecoveryCodeBackup-8iMhQU-E.js} +1 -1
- package/dist/{esm/sdk/presignaturePool-Dq4RhzXn.js → public/sdk/presignaturePool-CaI45td2.js} +1 -1
- package/dist/public/sdk/{presignatures-CkhuZ0YQ.js → presignatures-B9KnQyfE.js} +1 -1
- package/dist/public/sdk/{recovery-entrypoint-s9OoKBcl.js → recovery-entrypoint-DA2FGLG6.js} +1 -1
- package/dist/public/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/public/sdk/{registration-D3p7muCc.js → registration-XNyt1YRK.js} +1 -1
- package/dist/public/sdk/{registrationIntent-C1-Kyx_-.js → registrationIntent-Cb3tggIM.js} +1 -1
- package/dist/{esm/sdk/requireStepUpAuth-iVo6h_U-.js → public/sdk/requireStepUpAuth-ByMTPBu4.js} +1 -1
- package/dist/public/sdk/resealedEnvelopeResult-DKY5fVNY.js +1 -0
- package/dist/public/sdk/routerAbNormalSigning-CPLDkttX.js +1 -0
- package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/runtime-auth-CP6P681o.js +1 -0
- package/dist/public/sdk/{runtime-device-link-qmYvGep9.js → runtime-device-link-CGDZQK-D.js} +1 -1
- package/dist/{esm/sdk/runtime-ecdsa-tempo-Zh95TuLV.js → public/sdk/runtime-ecdsa-tempo-BiJYKWK4.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-CnLuW4H1.js → runtime-email-otp-B0XCNDRb.js} +1 -1
- package/dist/public/sdk/{runtime-export-m8lvrXtw.js → runtime-export-CXxv6KIx.js} +1 -1
- package/dist/public/sdk/{runtime-near-BiXzXXhH.js → runtime-near-CuyS57wu.js} +1 -1
- package/dist/public/sdk/runtime-preferences-B2WBUZO7.js +1 -0
- package/dist/public/sdk/runtime-recovery-KwVdSe94.js +1 -0
- package/dist/public/sdk/{runtime-recovery-codes-B033ake_.js → runtime-recovery-codes-CFOWDVd9.js} +1 -1
- package/dist/public/sdk/{runtimeContext-RNS2E5wy.js → runtimeContext-Iy1vecX0.js} +3 -3
- package/dist/public/sdk/{secp256k1-DPeaOjM0.js → secp256k1-sDDAa4Ga.js} +1 -1
- package/dist/{esm/sdk/signEvmFamily-Cksw3RpU.js → public/sdk/signEvmFamily-CMrXkVsZ.js} +1 -1
- package/dist/public/sdk/{signEvmFamilyWithUiConfirmForTempo-B7p9UVix.js → signEvmFamilyWithUiConfirmForTempo-CnRoo0e8.js} +1 -1
- package/dist/public/sdk/{signEvmWithUiConfirm-B14zYdwE.js → signEvmWithUiConfirm-yITc3ZvP.js} +1 -1
- package/dist/public/sdk/{signNear-D0rFEYP1.js → signNear-DyFk--I3.js} +1 -1
- package/dist/{esm/sdk/signingFlow-Bd1X0e-1.js → public/sdk/signingFlow-DTP4D19E.js} +1 -1
- package/dist/{esm/sdk/signingQueue-DoUBeaCv.js → public/sdk/signingQueue-Dy5mYMus.js} +1 -1
- package/dist/public/sdk/{thresholdEcdsa-BxfOZmiR.js → thresholdEcdsa-CRfx6RP1.js} +1 -1
- package/dist/public/sdk/{trace-BnhLKxcu.js → trace-BA8jya7O.js} +1 -1
- package/dist/{esm/sdk/transactionState-G_FPe-U8.js → public/sdk/transactionState-BCbaT2hO.js} +1 -1
- package/dist/public/sdk/tx-confirm-ui.js +3 -1
- package/dist/public/sdk/{types-A-w1cYlJ.js → types-D2Zk1W7I.js} +1 -1
- package/dist/{esm/sdk/unlockedEd25519ExportRootCapability-5F1egCSv.js → public/sdk/unlockedEd25519ExportRootCapability-BbGMlikr.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-DXdm68_Q.js → wallet-recovery-Bfm-oUoP.js} +1 -1
- package/dist/public/sdk/wallet-ui.css +1 -1
- package/dist/{esm/sdk/walletAuthMethodRecord-BW-XV4fv.js → public/sdk/walletAuthMethodRecord--fvGr8r1.js} +1 -1
- package/dist/{esm/sdk/walletAuthority-DbGaSw7D.js → public/sdk/walletAuthority-CU9nO0Ze.js} +1 -1
- package/dist/public/sdk/{walletCustodyEcdsaContinuity-BnyL1Ryu.js → walletCustodyEcdsaContinuity-BUdDyRl_.js} +1 -1
- package/dist/public/sdk/{walletDbName-Ca0rCq5r.js → walletDbName-B6-CV_Rq.js} +1 -1
- package/dist/public/sdk/{walletOwnerOperation-CScYv2K6.js → walletOwnerOperation-BJPxzo-k.js} +1 -1
- package/dist/public/sdk/{walletOwnershipGeneration-BZc6UKqX.js → walletOwnershipGeneration-B3uE9GRG.js} +1 -1
- package/dist/{esm/sdk/walletRecoveryAdminProof-DdwikrW3.js → public/sdk/walletRecoveryAdminProof-BmZaP0Q8.js} +1 -1
- package/dist/{esm/sdk/walletRecoveryCommit-DbAoiJp5.js → public/sdk/walletRecoveryCommit-CSYNbYNd.js} +1 -1
- package/dist/public/sdk/{walletSessionAuthorizationStatus-GhcGvDCX.js → walletSessionAuthorizationStatus-CQ3qA9tI.js} +1 -1
- package/dist/{esm/sdk/walletSessionAuthorizationStore-BivTUoKY.js → public/sdk/walletSessionAuthorizationStore-CGt-s5fX.js} +1 -1
- package/dist/public/sdk/workers/device-linking-key.worker.js +454 -947
- package/dist/public/sdk/workers/email-otp.worker.js +588 -820
- package/dist/public/sdk/workers/email_otp_runtime_bg.wasm +0 -0
- package/dist/public/sdk/workers/evm_crypto_bg.wasm +0 -0
- package/dist/public/sdk/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/public/sdk/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/shamir3pass_runtime_bg.wasm +0 -0
- package/dist/public/sdk/workers/tempo_signer_bg.wasm +0 -0
- package/dist/public/sdk/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/public/sdk/workers/wasm_signer_worker_bg.wasm +0 -0
- package/dist/public/wallet-assets.manifest.json +153 -153
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/types/wallet/src/SeamsWeb/index.d.ts +1 -0
- package/dist/types/wallet/src/SeamsWeb/publicApi/types.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/inboundMessages.d.ts +5 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/client/router.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/coordinator.d.ts +6 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/controller.d.ts +2 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/domain.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/auth-menu/session.d.ts +4 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/requestRouter.d.ts +1 -1
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/AuthMenuSurface.d.ts +5 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/WalletAlternativesSection.d.ts +13 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/host/ui/auth-menu/mountAuthMenuSurface.d.ts +3 -0
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/messages.d.ts +11 -4
- package/dist/types/wallet/src/SeamsWeb/walletIframe/shared/walletAlternatives.d.ts +52 -0
- package/dist/types/wallet/src/core/types/seams.d.ts +2 -2
- package/dist/types/wallet/src/core/ui/messages.d.ts +1 -1
- package/dist/types/wallet/src/core/ui/walletIcon.d.ts +3 -0
- package/dist/types/wallet/src/index.d.ts +1 -0
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/public.d.ts +1 -0
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/types.d.ts +4 -0
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/walletAlternatives.d.ts +48 -0
- package/dist/types/wallet/src/react/index.d.ts +1 -2
- package/dist/workers/device-linking-key.worker.js +454 -947
- package/dist/workers/email-otp.worker.js +588 -820
- package/dist/workers/email_otp_runtime_bg.wasm +0 -0
- package/dist/workers/evm_crypto_bg.wasm +0 -0
- package/dist/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/workers/shamir3pass_runtime_bg.wasm +0 -0
- package/dist/workers/tempo_signer_bg.wasm +0 -0
- package/dist/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/workers/wasm_signer_worker_bg.wasm +0 -0
- package/package.json +17 -17
- package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.css +0 -182
- package/dist/esm/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.js +0 -315
- package/dist/esm/sdk/appearance-token-vars-DkF3EBbF.js +0 -1
- package/dist/esm/sdk/host-BeE2dIU4.js +0 -1
- package/dist/esm/sdk/ownerNearOperation-DjNDxW3_.js +0 -1
- package/dist/esm/sdk/registration-CTtTocyo.js +0 -1
- package/dist/esm/sdk/resealedEnvelopeResult-DXDo-72P.js +0 -1
- package/dist/esm/sdk/routerAbNormalSigning-DVFFkNhJ.js +0 -1
- package/dist/esm/sdk/runtime-auth-Dsmw_dUA.js +0 -1
- package/dist/esm/sdk/runtime-preferences-DlKHDIjb.js +0 -1
- package/dist/esm/sdk/runtime-recovery-C6lS71Jp.js +0 -1
- package/dist/public/sdk/appearance-token-vars-DkF3EBbF.js +0 -1
- package/dist/public/sdk/host-BeE2dIU4.js +0 -1
- package/dist/public/sdk/ownerNearOperation-DjNDxW3_.js +0 -1
- package/dist/public/sdk/registration-CTtTocyo.js +0 -1
- package/dist/public/sdk/resealedEnvelopeResult-DXDo-72P.js +0 -1
- package/dist/public/sdk/routerAbNormalSigning-DVFFkNhJ.js +0 -1
- package/dist/public/sdk/runtime-auth-Dsmw_dUA.js +0 -1
- package/dist/public/sdk/runtime-preferences-DlKHDIjb.js +0 -1
- package/dist/public/sdk/runtime-recovery-C6lS71Jp.js +0 -1
- package/dist/types/wallet/src/react/components/HostedSeamsAuthMenu/WalletConnectorMenu.d.ts +0 -31
- /package/dist/esm/sdk/{canonicalPrimitives-Jd3i_Ngz.js → canonicalPrimitives-DKeS3M40.js} +0 -0
- /package/dist/esm/sdk/{capabilityKinds-DVlGMspk.js → capabilityKinds-Cafn86Y1.js} +0 -0
- /package/dist/esm/sdk/{walletIframeIdentity-CpgyEnKg.js → walletIframeIdentity-Cz82I_Uh.js} +0 -0
- /package/dist/public/sdk/{canonicalPrimitives-Jd3i_Ngz.js → canonicalPrimitives-DKeS3M40.js} +0 -0
- /package/dist/public/sdk/{capabilityKinds-DVlGMspk.js → capabilityKinds-Cafn86Y1.js} +0 -0
- /package/dist/public/sdk/{walletIframeIdentity-CpgyEnKg.js → walletIframeIdentity-Cz82I_Uh.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,O as t,g as n,k as r}from"./domainIds-t1lp25yU.js";import{i,t as a}from"./activeWalletSession-BJ4B-nJo.js";import{d as o,h as s,m as c}from"./capabilityKinds-DVlGMspk.js";import{r as l}from"./canonicalPrimitives-Jd3i_Ngz.js";import{a as u,i as d,n as f}from"./presignatures-CkhuZ0YQ.js";import{t as p}from"./walletOwnershipGeneration-BZc6UKqX.js";var m=class extends Error{kind=`upgrade_required`;code=`upgrade_required`;constructor(e){super(e),this.name=`WalletSessionAuthorizationUpgradeRequiredError`}};const h=u.walletSessionAuthorizations;function g(e,t){if(typeof e!=`object`||!e||Array.isArray(e))return null;let n=Object.keys(e);if(n.length!==t.length||n.some(e=>!t.includes(e)))return null;let r=new Map;for(let t of n)r.set(t,Reflect.get(e,t));return r}function _(e,t){if(!(typeof e!=`object`||!e||Array.isArray(e)))return Reflect.get(e,t)}function v(e){switch(e){case`expired`:case`exhausted`:case`replaced`:case`wallet_locked`:case`invalidated`:return e;default:return null}}const y=[`kind`,`walletId`,`authorityId`,`authMethodId`,`authorizationId`,`quotaId`,`authorityDigestB64u`,`authorityRevocationEpoch`,`capabilitySubjects`,`issuedAtMs`,`expiresAtMs`],b=[...y,`retiredAtMs`,`retirementReason`],x=[`record_version`,`wallet_session_id`,`authorization_id`,`wallet_id`,`wallet_authority_id`,`wallet_auth_method_id`,`authority_digest_b64u`,`authority_revocation_epoch`,`status`,`issued_at_ms`,`expires_at_ms`,`record`,`operation_credential`],S=/^wallet_session_authorization_v([0-9]+)$/;function C(e){if(typeof e!=`string`)return null;let t=S.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)?n:null}function w(e){let t=typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,`record_version`),n=C(_(e,`record_version`)),r=t?null:C(_(_(e,`record`),`recordVersion`)),i=n??r;return i===null?{kind:`unknown`}:i>=3&&i<6?{kind:`legacy`,version:i}:t&&i===6?{kind:`current`,version:i}:t&&i>6?{kind:`future`,version:i}:{kind:`unknown`}}function T(e,t){if(w(e).kind!==`future`||_(e,`wallet_id`)!==t.walletId)return!1;let n=_(e,`wallet_authority_id`),r=_(e,`wallet_auth_method_id`);return typeof n!=`string`||typeof r!=`string`?!0:n===t.authorityId&&r===t.authMethodId}function E(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function D(e){let t=_(e,`wallet_session_id`);if(typeof t!=`string`)throw Error(`Stored Wallet Session authorization key is invalid`);return t}function O(e){switch(e.kind){case`sign`:case`export_keys`:return`${e.kind}:${e.keyFamily}:${e.materialActivation.activationId}`;case`link_devices`:case`revoke_devices`:return e.kind;default:return k(e)}}function k(e){throw Error(`Unknown Wallet Capability subject: ${String(e)}`)}function A(e){let t=_(e,`kind`);if(t===`sign`||t===`export_keys`){let r=g(e,[`kind`,`keyFamily`,`materialActivation`]);if(!r)return null;let i=r.get(`keyFamily`);if(i!==`ed25519`&&i!==`ecdsa_secp256k1`)return null;let a=n(r.get(`materialActivation`));return a.ok?{kind:t,keyFamily:i,materialActivation:a.value}:null}return(t===`link_devices`||t===`revoke_devices`)&&g(e,[`kind`])?{kind:t}:null}function j(e){if(!Array.isArray(e)||e.length===0)return null;let t=[];for(let n of e){let e=A(n);if(!e)return null;t.push(e)}let n=new Set;for(let e of t){let t=O(e);if(n.has(t))return null;n.add(t)}let[r,...i]=t;return r?[r,...i]:null}function M(n){let i=_(n,`kind`),a=i===`active_wallet_session_v1`?g(n,y):i===`retired_wallet_session_v1`?g(n,b):null;if(!a)return null;let s=r(a.get(`walletId`)),u=t(a.get(`authorityId`)),d=e(a.get(`authMethodId`)),f=c(a.get(`authorizationId`)),p=o(a.get(`quotaId`));if(!s.ok||!u.ok||!d.ok||!f.ok||!p.ok)return null;let m;try{m=l(a.get(`authorityDigestB64u`))}catch{return null}let h=j(a.get(`capabilitySubjects`)),x=a.get(`authorityRevocationEpoch`),S=a.get(`issuedAtMs`),C=a.get(`expiresAtMs`);if(!h||!E(x)||!E(S)||!E(C)||C<=S)return null;let w={walletId:s.value,authorityId:u.value,authMethodId:d.value,authorizationId:f.value,quotaId:p.value,authorityDigestB64u:m,authorityRevocationEpoch:x,capabilitySubjects:h,issuedAtMs:S,expiresAtMs:C};if(i===`active_wallet_session_v1`)return{kind:`active_wallet_session_v1`,walletId:w.walletId,authorityId:w.authorityId,authMethodId:w.authMethodId,authorizationId:w.authorizationId,quotaId:w.quotaId,authorityDigestB64u:w.authorityDigestB64u,authorityRevocationEpoch:w.authorityRevocationEpoch,capabilitySubjects:w.capabilitySubjects,issuedAtMs:w.issuedAtMs,expiresAtMs:w.expiresAtMs};if(i===`retired_wallet_session_v1`){let e=a.get(`retiredAtMs`);if(!E(e)||e<w.issuedAtMs)return null;let t=v(a.get(`retirementReason`));return!t||t===`expired`&&e<w.expiresAtMs?null:{kind:`retired_wallet_session_v1`,walletId:w.walletId,authorityId:w.authorityId,authMethodId:w.authMethodId,authorizationId:w.authorizationId,quotaId:w.quotaId,authorityDigestB64u:w.authorityDigestB64u,authorityRevocationEpoch:w.authorityRevocationEpoch,capabilitySubjects:w.capabilitySubjects,issuedAtMs:w.issuedAtMs,expiresAtMs:w.expiresAtMs,retiredAtMs:e,retirementReason:t}}return null}function N(e){if(!E(e.retiredAtMs))throw Error(`Retired Wallet Session v1 time is invalid`);let t=M({kind:`retired_wallet_session_v1`,walletId:e.active.walletId,authorityId:e.active.authorityId,authMethodId:e.active.authMethodId,authorizationId:e.active.authorizationId,quotaId:e.active.quotaId,authorityDigestB64u:e.active.authorityDigestB64u,authorityRevocationEpoch:e.active.authorityRevocationEpoch,capabilitySubjects:e.active.capabilitySubjects,issuedAtMs:e.active.issuedAtMs,expiresAtMs:e.active.expiresAtMs,retiredAtMs:e.retiredAtMs,retirementReason:e.reason});if(!t||t.kind!==`retired_wallet_session_v1`)throw Error(`Retired Wallet Session v1 is invalid`);return t}function P(e,t){let n=M(e);if(!n||n.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let r;try{r=i(t)}catch{throw Error(`Wallet Session operation credential is invalid`)}let a={record_version:`wallet_session_authorization_v6`,wallet_session_id:r.walletSessionId,authorization_id:n.authorizationId,wallet_id:n.walletId,wallet_authority_id:n.authorityId,wallet_auth_method_id:n.authMethodId,authority_digest_b64u:n.authorityDigestB64u,authority_revocation_epoch:n.authorityRevocationEpoch,status:`active`,issued_at_ms:n.issuedAtMs,expires_at_ms:n.expiresAtMs,record:{kind:n.kind,walletId:n.walletId,authorityId:n.authorityId,authMethodId:n.authMethodId,authorizationId:n.authorizationId,walletSessionId:r.walletSessionId,quotaId:n.quotaId,authorityDigestB64u:n.authorityDigestB64u,authorityRevocationEpoch:n.authorityRevocationEpoch,capabilitySubjects:n.capabilitySubjects,issuedAtMs:n.issuedAtMs,expiresAtMs:n.expiresAtMs},operation_credential:r};if(!F(a))throw Error(`Wallet Session authorization v6 is invalid`);return a}function F(e){let t=g(e,x);if(!t||t.get(`record_version`)!==`wallet_session_authorization_v6`||t.get(`status`)!==`active`)return null;let n=s(t.get(`wallet_session_id`)),r=c(t.get(`authorization_id`));if(!n.ok||!r.ok)return null;let a;try{a=i(t.get(`operation_credential`))}catch{return null}if(n.value!==a.walletSessionId)return null;let o=g(t.get(`record`),[...y,`walletSessionId`]);if(!o)return null;let l=s(o.get(`walletSessionId`));if(!l.ok||l.value!==n.value)return null;let u=M({kind:o.get(`kind`),walletId:o.get(`walletId`),authorityId:o.get(`authorityId`),authMethodId:o.get(`authMethodId`),authorizationId:o.get(`authorizationId`),quotaId:o.get(`quotaId`),authorityDigestB64u:o.get(`authorityDigestB64u`),authorityRevocationEpoch:o.get(`authorityRevocationEpoch`),capabilitySubjects:o.get(`capabilitySubjects`),issuedAtMs:o.get(`issuedAtMs`),expiresAtMs:o.get(`expiresAtMs`)});return!u||u.kind!==`active_wallet_session_v1`||t.get(`wallet_id`)!==u.walletId||t.get(`wallet_authority_id`)!==u.authorityId||t.get(`wallet_auth_method_id`)!==u.authMethodId||t.get(`authority_digest_b64u`)!==u.authorityDigestB64u||t.get(`authority_revocation_epoch`)!==u.authorityRevocationEpoch||t.get(`issued_at_ms`)!==u.issuedAtMs||t.get(`expires_at_ms`)!==u.expiresAtMs||r.value!==u.authorizationId?null:{record:u,operationCredential:a,physicalKey:n.value}}async function I(e){let t=M(e.active);if(!t||t.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let n=i(e.operationCredential);await p(e.ctx,t.walletId,n.ownershipGeneration);let r=P(t,n),o=!0,s=e.ctx.store(h),c=await s.index(d.walletId).getAll(t.walletId);for(let e of c){let r=w(e);if(r.kind===`future`)continue;if(r.kind===`legacy`){await s.delete(D(e));continue}if(r.kind!==`current`)throw Error(`Stored Wallet Session authorization row is corrupt`);let i=F(e);if(!i)throw Error(`Stored Wallet Session authorization v6 is corrupt`);let c=i.record;if(i.operationCredential.walletSessionId===n.walletSessionId&&(i.operationCredential.token!==n.token||i.operationCredential.ownershipGeneration!==n.ownershipGeneration))throw Error(`Stored Wallet Session conflicts with the issued operation credential`);if(i.operationCredential.ownershipGeneration<n.ownershipGeneration){await s.delete(i.physicalKey);continue}if(!(c.kind!==`active_wallet_session_v1`||c.authorityId!==t.authorityId||c.authMethodId!==t.authMethodId)){if(c.authorizationId===t.authorizationId&&i.operationCredential.walletSessionId===n.walletSessionId){o=!a(c,t);continue}await s.delete(i.physicalKey)}}return o&&await s.put(r),t}async function L(e){let t=e.ctx.store(h),n=await t.index(d.walletId).getAll(e.walletId),r=null,i=!1;for(let a of n){if(T(a,e)){i=!0;continue}let n=w(a);if(n.kind===`legacy`){await t.delete(D(a));continue}if(n.kind!==`current`)return{kind:`corrupt`};let o=F(a);if(!o)return{kind:`corrupt`};if(!(o.record.walletId!==e.walletId||o.record.authorityId!==e.authorityId||o.record.authMethodId!==e.authMethodId)){if(r)return{kind:`corrupt`};r=o}}return i?{kind:`upgrade_required`}:r?{kind:`found`,...r}:{kind:`missing`}}var R=class{constructor(e=f){this.manager=e}async writeExactWithOperationCredential(e){let t=M(e.record);if(!t||t.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let n=i(e.operationCredential);return await this.replaceExactActive({active:t,operationCredential:n}),t}async refreshExactWithOperationCredential(e){let t=M(e.expected),n=M(e.record);if(!t||t.kind!==`active_wallet_session_v1`||!n||n.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session refresh is invalid`);for(let e of y)if(!(e===`kind`||e===`capabilitySubjects`)&&t[e]!==n[e])throw Error(`Wallet Session refresh changed its exact identity`);let r=P(n,i(e.operationCredential));return this.manager.runTransaction([h],`readwrite`,B.bind(null,t,r))}async readExact(e){return this.manager.runTransaction([h],`readwrite`,V.bind(null,e))}async readExactWithOperationCredential(e){let t=await this.readExactActiveForWallet(e);switch(t.kind){case`found`:case`missing`:case`upgrade_required`:return t;case`corrupt`:throw Error(`Stored Wallet Session authorization v6 is corrupt`);case`persistence_unavailable`:throw Error(`Wallet Session authorization persistence is unavailable`)}}async readExactActiveForWallet(e){try{return await this.manager.runTransaction([h],`readwrite`,H.bind(null,e))}catch(e){return e instanceof z?{kind:`corrupt`}:{kind:`persistence_unavailable`}}}async retireExactActiveForWallet(e){if(!E(e.retiredAtMs))throw Error(`Wallet Session v1 retirement time is invalid`);return this.manager.runTransaction([h],`readwrite`,U.bind(null,e))}async replaceExactActive(e){return this.manager.runTransaction([h,u.appState,u.ecdsaClientPresignatures],`readwrite`,W.bind(null,e))}async clearWallet(e){await this.manager.runTransaction([h],`readwrite`,G.bind(null,e))}async clearAll(){await this.manager.runTransaction([h],`readwrite`,K)}},z=class extends Error{};async function B(e,t,n){let r=n.store(h),i=t.operation_credential,o=await r.get(i.walletSessionId);if(o===void 0)return`superseded`;let s=F(o);if(!s)throw Error(`Stored Wallet Session authorization v6 is corrupt`);return!a(s.record,e)||s.operationCredential.token!==i.token?`superseded`:(await r.put(t),`updated`)}async function V(e,t){let n=t.store(h),r=await n.get(e);if(r===void 0)return null;switch(w(r).kind){case`future`:throw new m(`Wallet Session authorization requires a newer client`);case`legacy`:return await n.delete(D(r)),null;case`current`:break;case`unknown`:throw Error(`Stored Wallet Session authorization v6 is corrupt`)}let i=F(r);if(!i)throw Error(`Stored Wallet Session authorization v6 is corrupt`);return i.record}async function H(e,t){let n=await L({ctx:t,walletId:e.walletId,authorityId:e.authorityId,authMethodId:e.authMethodId});if(n.kind===`corrupt`)throw new z(`Stored Wallet Session authorization v6 is corrupt`);return n}async function U(e,t){let n=t.store(h),r=[],i=await n.index(d.walletId).getAll(e.walletId);for(let t of i){let i=w(t);if(i.kind===`future`)continue;if(i.kind===`legacy`){await n.delete(D(t));continue}if(i.kind!==`current`)continue;let a=F(t);if(!a)throw Error(`Stored Wallet Session authorization v6 is corrupt`);let o=a.record;if(o.kind!==`active_wallet_session_v1`)continue;let s=N({active:o,reason:e.reason,retiredAtMs:e.retiredAtMs});await n.delete(a.physicalKey),r.push(s)}return r}function W(e,t){return I({ctx:t,active:e.active,operationCredential:e.operationCredential})}async function G(e,t){let n=t.store(h),r=await n.index(d.walletId).getAllKeys(e);for(let e of r)await n.delete(e)}function K(e){return e.store(h).clear()}const q=new R;export{P as a,I as i,F as n,q as o,L as r,m as t};
|
|
1
|
+
import{E as e,O as t,g as n,k as r}from"./domainIds-t1lp25yU.js";import{i,t as a}from"./activeWalletSession-HAOgRKzn.js";import{d as o,h as s,m as c}from"./capabilityKinds-Cafn86Y1.js";import{r as l}from"./canonicalPrimitives-DKeS3M40.js";import{a as u,i as d,n as f}from"./presignatures-B9KnQyfE.js";import{t as p}from"./walletOwnershipGeneration-B3uE9GRG.js";var m=class extends Error{kind=`upgrade_required`;code=`upgrade_required`;constructor(e){super(e),this.name=`WalletSessionAuthorizationUpgradeRequiredError`}};const h=u.walletSessionAuthorizations;function g(e,t){if(typeof e!=`object`||!e||Array.isArray(e))return null;let n=Object.keys(e);if(n.length!==t.length||n.some(e=>!t.includes(e)))return null;let r=new Map;for(let t of n)r.set(t,Reflect.get(e,t));return r}function _(e,t){if(!(typeof e!=`object`||!e||Array.isArray(e)))return Reflect.get(e,t)}function v(e){switch(e){case`expired`:case`exhausted`:case`replaced`:case`wallet_locked`:case`invalidated`:return e;default:return null}}const y=[`kind`,`walletId`,`authorityId`,`authMethodId`,`authorizationId`,`quotaId`,`authorityDigestB64u`,`authorityRevocationEpoch`,`capabilitySubjects`,`issuedAtMs`,`expiresAtMs`],b=[...y,`retiredAtMs`,`retirementReason`],x=[`record_version`,`wallet_session_id`,`authorization_id`,`wallet_id`,`wallet_authority_id`,`wallet_auth_method_id`,`authority_digest_b64u`,`authority_revocation_epoch`,`status`,`issued_at_ms`,`expires_at_ms`,`record`,`operation_credential`],S=/^wallet_session_authorization_v([0-9]+)$/;function C(e){if(typeof e!=`string`)return null;let t=S.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isSafeInteger(n)?n:null}function w(e){let t=typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.hasOwnProperty.call(e,`record_version`),n=C(_(e,`record_version`)),r=t?null:C(_(_(e,`record`),`recordVersion`)),i=n??r;return i===null?{kind:`unknown`}:i>=3&&i<6?{kind:`legacy`,version:i}:t&&i===6?{kind:`current`,version:i}:t&&i>6?{kind:`future`,version:i}:{kind:`unknown`}}function T(e,t){if(w(e).kind!==`future`||_(e,`wallet_id`)!==t.walletId)return!1;let n=_(e,`wallet_authority_id`),r=_(e,`wallet_auth_method_id`);return typeof n!=`string`||typeof r!=`string`?!0:n===t.authorityId&&r===t.authMethodId}function E(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function D(e){let t=_(e,`wallet_session_id`);if(typeof t!=`string`)throw Error(`Stored Wallet Session authorization key is invalid`);return t}function O(e){switch(e.kind){case`sign`:case`export_keys`:return`${e.kind}:${e.keyFamily}:${e.materialActivation.activationId}`;case`link_devices`:case`revoke_devices`:return e.kind;default:return k(e)}}function k(e){throw Error(`Unknown Wallet Capability subject: ${String(e)}`)}function A(e){let t=_(e,`kind`);if(t===`sign`||t===`export_keys`){let r=g(e,[`kind`,`keyFamily`,`materialActivation`]);if(!r)return null;let i=r.get(`keyFamily`);if(i!==`ed25519`&&i!==`ecdsa_secp256k1`)return null;let a=n(r.get(`materialActivation`));return a.ok?{kind:t,keyFamily:i,materialActivation:a.value}:null}return(t===`link_devices`||t===`revoke_devices`)&&g(e,[`kind`])?{kind:t}:null}function j(e){if(!Array.isArray(e)||e.length===0)return null;let t=[];for(let n of e){let e=A(n);if(!e)return null;t.push(e)}let n=new Set;for(let e of t){let t=O(e);if(n.has(t))return null;n.add(t)}let[r,...i]=t;return r?[r,...i]:null}function M(n){let i=_(n,`kind`),a=i===`active_wallet_session_v1`?g(n,y):i===`retired_wallet_session_v1`?g(n,b):null;if(!a)return null;let s=r(a.get(`walletId`)),u=t(a.get(`authorityId`)),d=e(a.get(`authMethodId`)),f=c(a.get(`authorizationId`)),p=o(a.get(`quotaId`));if(!s.ok||!u.ok||!d.ok||!f.ok||!p.ok)return null;let m;try{m=l(a.get(`authorityDigestB64u`))}catch{return null}let h=j(a.get(`capabilitySubjects`)),x=a.get(`authorityRevocationEpoch`),S=a.get(`issuedAtMs`),C=a.get(`expiresAtMs`);if(!h||!E(x)||!E(S)||!E(C)||C<=S)return null;let w={walletId:s.value,authorityId:u.value,authMethodId:d.value,authorizationId:f.value,quotaId:p.value,authorityDigestB64u:m,authorityRevocationEpoch:x,capabilitySubjects:h,issuedAtMs:S,expiresAtMs:C};if(i===`active_wallet_session_v1`)return{kind:`active_wallet_session_v1`,walletId:w.walletId,authorityId:w.authorityId,authMethodId:w.authMethodId,authorizationId:w.authorizationId,quotaId:w.quotaId,authorityDigestB64u:w.authorityDigestB64u,authorityRevocationEpoch:w.authorityRevocationEpoch,capabilitySubjects:w.capabilitySubjects,issuedAtMs:w.issuedAtMs,expiresAtMs:w.expiresAtMs};if(i===`retired_wallet_session_v1`){let e=a.get(`retiredAtMs`);if(!E(e)||e<w.issuedAtMs)return null;let t=v(a.get(`retirementReason`));return!t||t===`expired`&&e<w.expiresAtMs?null:{kind:`retired_wallet_session_v1`,walletId:w.walletId,authorityId:w.authorityId,authMethodId:w.authMethodId,authorizationId:w.authorizationId,quotaId:w.quotaId,authorityDigestB64u:w.authorityDigestB64u,authorityRevocationEpoch:w.authorityRevocationEpoch,capabilitySubjects:w.capabilitySubjects,issuedAtMs:w.issuedAtMs,expiresAtMs:w.expiresAtMs,retiredAtMs:e,retirementReason:t}}return null}function N(e){if(!E(e.retiredAtMs))throw Error(`Retired Wallet Session v1 time is invalid`);let t=M({kind:`retired_wallet_session_v1`,walletId:e.active.walletId,authorityId:e.active.authorityId,authMethodId:e.active.authMethodId,authorizationId:e.active.authorizationId,quotaId:e.active.quotaId,authorityDigestB64u:e.active.authorityDigestB64u,authorityRevocationEpoch:e.active.authorityRevocationEpoch,capabilitySubjects:e.active.capabilitySubjects,issuedAtMs:e.active.issuedAtMs,expiresAtMs:e.active.expiresAtMs,retiredAtMs:e.retiredAtMs,retirementReason:e.reason});if(!t||t.kind!==`retired_wallet_session_v1`)throw Error(`Retired Wallet Session v1 is invalid`);return t}function P(e,t){let n=M(e);if(!n||n.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let r;try{r=i(t)}catch{throw Error(`Wallet Session operation credential is invalid`)}let a={record_version:`wallet_session_authorization_v6`,wallet_session_id:r.walletSessionId,authorization_id:n.authorizationId,wallet_id:n.walletId,wallet_authority_id:n.authorityId,wallet_auth_method_id:n.authMethodId,authority_digest_b64u:n.authorityDigestB64u,authority_revocation_epoch:n.authorityRevocationEpoch,status:`active`,issued_at_ms:n.issuedAtMs,expires_at_ms:n.expiresAtMs,record:{kind:n.kind,walletId:n.walletId,authorityId:n.authorityId,authMethodId:n.authMethodId,authorizationId:n.authorizationId,walletSessionId:r.walletSessionId,quotaId:n.quotaId,authorityDigestB64u:n.authorityDigestB64u,authorityRevocationEpoch:n.authorityRevocationEpoch,capabilitySubjects:n.capabilitySubjects,issuedAtMs:n.issuedAtMs,expiresAtMs:n.expiresAtMs},operation_credential:r};if(!F(a))throw Error(`Wallet Session authorization v6 is invalid`);return a}function F(e){let t=g(e,x);if(!t||t.get(`record_version`)!==`wallet_session_authorization_v6`||t.get(`status`)!==`active`)return null;let n=s(t.get(`wallet_session_id`)),r=c(t.get(`authorization_id`));if(!n.ok||!r.ok)return null;let a;try{a=i(t.get(`operation_credential`))}catch{return null}if(n.value!==a.walletSessionId)return null;let o=g(t.get(`record`),[...y,`walletSessionId`]);if(!o)return null;let l=s(o.get(`walletSessionId`));if(!l.ok||l.value!==n.value)return null;let u=M({kind:o.get(`kind`),walletId:o.get(`walletId`),authorityId:o.get(`authorityId`),authMethodId:o.get(`authMethodId`),authorizationId:o.get(`authorizationId`),quotaId:o.get(`quotaId`),authorityDigestB64u:o.get(`authorityDigestB64u`),authorityRevocationEpoch:o.get(`authorityRevocationEpoch`),capabilitySubjects:o.get(`capabilitySubjects`),issuedAtMs:o.get(`issuedAtMs`),expiresAtMs:o.get(`expiresAtMs`)});return!u||u.kind!==`active_wallet_session_v1`||t.get(`wallet_id`)!==u.walletId||t.get(`wallet_authority_id`)!==u.authorityId||t.get(`wallet_auth_method_id`)!==u.authMethodId||t.get(`authority_digest_b64u`)!==u.authorityDigestB64u||t.get(`authority_revocation_epoch`)!==u.authorityRevocationEpoch||t.get(`issued_at_ms`)!==u.issuedAtMs||t.get(`expires_at_ms`)!==u.expiresAtMs||r.value!==u.authorizationId?null:{record:u,operationCredential:a,physicalKey:n.value}}async function I(e){let t=M(e.active);if(!t||t.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let n=i(e.operationCredential);await p(e.ctx,t.walletId,n.ownershipGeneration);let r=P(t,n),o=!0,s=e.ctx.store(h),c=await s.index(d.walletId).getAll(t.walletId);for(let e of c){let r=w(e);if(r.kind===`future`)continue;if(r.kind===`legacy`){await s.delete(D(e));continue}if(r.kind!==`current`)throw Error(`Stored Wallet Session authorization row is corrupt`);let i=F(e);if(!i)throw Error(`Stored Wallet Session authorization v6 is corrupt`);let c=i.record;if(i.operationCredential.walletSessionId===n.walletSessionId&&(i.operationCredential.token!==n.token||i.operationCredential.ownershipGeneration!==n.ownershipGeneration))throw Error(`Stored Wallet Session conflicts with the issued operation credential`);if(i.operationCredential.ownershipGeneration<n.ownershipGeneration){await s.delete(i.physicalKey);continue}if(!(c.kind!==`active_wallet_session_v1`||c.authorityId!==t.authorityId||c.authMethodId!==t.authMethodId)){if(c.authorizationId===t.authorizationId&&i.operationCredential.walletSessionId===n.walletSessionId){o=!a(c,t);continue}await s.delete(i.physicalKey)}}return o&&await s.put(r),t}async function L(e){let t=e.ctx.store(h),n=await t.index(d.walletId).getAll(e.walletId),r=null,i=!1;for(let a of n){if(T(a,e)){i=!0;continue}let n=w(a);if(n.kind===`legacy`){await t.delete(D(a));continue}if(n.kind!==`current`)return{kind:`corrupt`};let o=F(a);if(!o)return{kind:`corrupt`};if(!(o.record.walletId!==e.walletId||o.record.authorityId!==e.authorityId||o.record.authMethodId!==e.authMethodId)){if(r)return{kind:`corrupt`};r=o}}return i?{kind:`upgrade_required`}:r?{kind:`found`,...r}:{kind:`missing`}}var R=class{constructor(e=f){this.manager=e}async writeExactWithOperationCredential(e){let t=M(e.record);if(!t||t.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session v1 is invalid`);let n=i(e.operationCredential);return await this.replaceExactActive({active:t,operationCredential:n}),t}async refreshExactWithOperationCredential(e){let t=M(e.expected),n=M(e.record);if(!t||t.kind!==`active_wallet_session_v1`||!n||n.kind!==`active_wallet_session_v1`)throw Error(`Active Wallet Session refresh is invalid`);for(let e of y)if(!(e===`kind`||e===`capabilitySubjects`)&&t[e]!==n[e])throw Error(`Wallet Session refresh changed its exact identity`);let r=P(n,i(e.operationCredential));return this.manager.runTransaction([h],`readwrite`,B.bind(null,t,r))}async readExact(e){return this.manager.runTransaction([h],`readwrite`,V.bind(null,e))}async readExactWithOperationCredential(e){let t=await this.readExactActiveForWallet(e);switch(t.kind){case`found`:case`missing`:case`upgrade_required`:return t;case`corrupt`:throw Error(`Stored Wallet Session authorization v6 is corrupt`);case`persistence_unavailable`:throw Error(`Wallet Session authorization persistence is unavailable`)}}async readExactActiveForWallet(e){try{return await this.manager.runTransaction([h],`readwrite`,H.bind(null,e))}catch(e){return e instanceof z?{kind:`corrupt`}:{kind:`persistence_unavailable`}}}async retireExactActiveForWallet(e){if(!E(e.retiredAtMs))throw Error(`Wallet Session v1 retirement time is invalid`);return this.manager.runTransaction([h],`readwrite`,U.bind(null,e))}async replaceExactActive(e){return this.manager.runTransaction([h,u.appState,u.ecdsaClientPresignatures],`readwrite`,W.bind(null,e))}async clearWallet(e){await this.manager.runTransaction([h],`readwrite`,G.bind(null,e))}async clearAll(){await this.manager.runTransaction([h],`readwrite`,K)}},z=class extends Error{};async function B(e,t,n){let r=n.store(h),i=t.operation_credential,o=await r.get(i.walletSessionId);if(o===void 0)return`superseded`;let s=F(o);if(!s)throw Error(`Stored Wallet Session authorization v6 is corrupt`);return!a(s.record,e)||s.operationCredential.token!==i.token?`superseded`:(await r.put(t),`updated`)}async function V(e,t){let n=t.store(h),r=await n.get(e);if(r===void 0)return null;switch(w(r).kind){case`future`:throw new m(`Wallet Session authorization requires a newer client`);case`legacy`:return await n.delete(D(r)),null;case`current`:break;case`unknown`:throw Error(`Stored Wallet Session authorization v6 is corrupt`)}let i=F(r);if(!i)throw Error(`Stored Wallet Session authorization v6 is corrupt`);return i.record}async function H(e,t){let n=await L({ctx:t,walletId:e.walletId,authorityId:e.authorityId,authMethodId:e.authMethodId});if(n.kind===`corrupt`)throw new z(`Stored Wallet Session authorization v6 is corrupt`);return n}async function U(e,t){let n=t.store(h),r=[],i=await n.index(d.walletId).getAll(e.walletId);for(let t of i){let i=w(t);if(i.kind===`future`)continue;if(i.kind===`legacy`){await n.delete(D(t));continue}if(i.kind!==`current`)continue;let a=F(t);if(!a)throw Error(`Stored Wallet Session authorization v6 is corrupt`);let o=a.record;if(o.kind!==`active_wallet_session_v1`)continue;let s=N({active:o,reason:e.reason,retiredAtMs:e.retiredAtMs});await n.delete(a.physicalKey),r.push(s)}return r}function W(e,t){return I({ctx:t,active:e.active,operationCredential:e.operationCredential})}async function G(e,t){let n=t.store(h),r=await n.index(d.walletId).getAllKeys(e);for(let e of r)await n.delete(e)}function K(e){return e.store(h).clear()}const q=new R;export{P as a,I as i,F as n,q as o,L as r,m as t};
|
|
@@ -8,8 +8,8 @@ import "./errors.js";
|
|
|
8
8
|
import "./nearRpcResults.js";
|
|
9
9
|
import "./authenticatorOptions.js";
|
|
10
10
|
import "./secureRandomId.js";
|
|
11
|
-
import "./theme.js";
|
|
12
11
|
import "./signingSessionSeal.js";
|
|
12
|
+
import "./theme.js";
|
|
13
13
|
import "./jsonRpc.js";
|
|
14
14
|
import "./routerAbPublicKeyset.js";
|
|
15
15
|
import "./routerAbEd25519YaoDigests.js";
|
|
Binary file
|
|
Binary file
|
|
@@ -1,61 +1,85 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Opens the wallet's Ed25519 continuity cache with any enrolled factor.
|
|
5
|
+
*
|
|
6
|
+
* **The unlock read side, and deliberately one call.** The custody seed
|
|
7
|
+
* exists only between opening the envelope and deriving the cache key.
|
|
8
|
+
* Splitting this into "open the envelope" and "open the cache" would put the
|
|
9
|
+
* seed in a caller's hands, and every caller here is JavaScript.
|
|
10
|
+
*
|
|
11
|
+
* Exported from *this* module rather than the ceremony's because the handle
|
|
12
|
+
* it returns has to be the one the signing path already uses: two wasm
|
|
13
|
+
* modules each define their own `WasmActivatedClientV1`, and a handle from
|
|
14
|
+
* the wrong module cannot sign.
|
|
15
|
+
*
|
|
16
|
+
* The caller never assembles the cache seal binding. It is rebuilt here from
|
|
17
|
+
* the record's own fields, because it is both HKDF input and AEAD associated
|
|
18
|
+
* data — a caller that assembled it even slightly differently would hold a
|
|
19
|
+
* record that never opens, and the failure would read as a bad factor.
|
|
20
|
+
*
|
|
21
|
+
* Any factor works, which is the point of sealing under the seed: a passkey
|
|
22
|
+
* enrolled long after registration opens the cache the Email OTP enrollment
|
|
23
|
+
* wrote, and the reverse.
|
|
24
|
+
*/
|
|
25
|
+
export function openWalletCustodyEd25519MaterialV1(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, application_binding_digest: Uint8Array, registered_public_key: Uint8Array, state_epoch: bigint, client_participant_id: number, signing_worker_participant_id: number, signing_worker_verifying_share: Uint8Array, cache_nonce: Uint8Array, cache_ciphertext: Uint8Array): WasmActivatedClientV1;
|
|
26
|
+
/**
|
|
27
|
+
* Opens a verified owner custody-seed envelope and derives the exact Client
|
|
28
|
+
* root for an approved lane job. This is the owner-capability branch; ordinary
|
|
29
|
+
* factor opens continue to require a dedicated Client-root envelope.
|
|
30
|
+
*/
|
|
31
|
+
export function ed25519_yao_lane_source_from_wallet_seed_v1(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, application_binding_digest: Uint8Array, wallet_key_id: string, enrollment_id: string, revocation_epoch: bigint, registered_public_key: Uint8Array): WasmEd25519YaoLaneSourceV1;
|
|
4
32
|
/**
|
|
5
33
|
* Verified Client activation material retained inside the browser WASM boundary.
|
|
6
34
|
*/
|
|
7
35
|
export class WasmActivatedClientV1 {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
state_epoch(): bigint;
|
|
36
|
+
private constructor();
|
|
37
|
+
free(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Returns the activated SigningWorker state epoch.
|
|
40
|
+
*/
|
|
41
|
+
state_epoch(): bigint;
|
|
42
|
+
/**
|
|
43
|
+
* Authenticates and encrypts the active Client material for same-device rehydration.
|
|
44
|
+
*/
|
|
45
|
+
seal_local_material(passkey_prf_first: Uint8Array, binding: Uint8Array, nonce: Uint8Array): Uint8Array;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a signature share while retaining the Client scalar inside WASM.
|
|
48
|
+
*/
|
|
49
|
+
create_signing_share(client_participant_id: number, signing_worker_participant_id: number, admitted_digest: Uint8Array, signing_worker_commitments_json: string, signing_worker_verifying_share: Uint8Array): WasmClientSigningShareV1;
|
|
50
|
+
/**
|
|
51
|
+
* Opens a same-device envelope and re-verifies its public threshold relation.
|
|
52
|
+
*/
|
|
53
|
+
static import_local_material(passkey_prf_first: Uint8Array, binding: Uint8Array, nonce: Uint8Array, ciphertext: Uint8Array, expected_registered_public_key: Uint8Array, expected_state_epoch: bigint, client_participant_id: number, signing_worker_participant_id: number, signing_worker_verifying_share: Uint8Array): WasmActivatedClientV1;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the verified 32-byte Ed25519 public key.
|
|
56
|
+
*/
|
|
57
|
+
registered_public_key(): Uint8Array;
|
|
58
|
+
/**
|
|
59
|
+
* Imports one linked-device Client share after verifying the complete
|
|
60
|
+
* public threshold relation carried by its activation receipt.
|
|
61
|
+
*/
|
|
62
|
+
static import_linked_material(client_scalar_share: Uint8Array, client_participant_id: number, signing_worker_participant_id: number, public_receipt_json: string): WasmActivatedClientV1;
|
|
36
63
|
}
|
|
37
|
-
|
|
38
64
|
/**
|
|
39
65
|
* One Client FROST share created from activated Yao material.
|
|
40
66
|
*/
|
|
41
67
|
export class WasmClientSigningShareV1 {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
client_verifying_share(): Uint8Array;
|
|
68
|
+
private constructor();
|
|
69
|
+
free(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the public Client verifying share.
|
|
72
|
+
*/
|
|
73
|
+
client_verifying_share(): Uint8Array;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the Client FROST commitments as canonical JSON.
|
|
76
|
+
*/
|
|
77
|
+
client_commitments_json(): string;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the canonical Client signature share.
|
|
80
|
+
*/
|
|
81
|
+
client_signature_share_b64u(): string;
|
|
57
82
|
}
|
|
58
|
-
|
|
59
83
|
/**
|
|
60
84
|
* One-use explicit export session opened from a factor-sealed Ed25519 Yao
|
|
61
85
|
* Client root.
|
|
@@ -64,22 +88,20 @@ export class WasmClientSigningShareV1 {
|
|
|
64
88
|
* is accepted or reconstructed on this ordinary export path.
|
|
65
89
|
*/
|
|
66
90
|
export class WasmEd25519YaoClientRootExportSessionV1 {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
constructor(admission_json: string, application_json: string, client_participant_id: number, signing_worker_participant_id: number, factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, recipient_key_material: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array);
|
|
91
|
+
free(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Returns the serialized request to execute through the Router A/B export protocol.
|
|
94
|
+
*/
|
|
95
|
+
execute_request_json(): string;
|
|
96
|
+
/**
|
|
97
|
+
* Opens the factor-sealed Client root and prepares a one-use export request.
|
|
98
|
+
*/
|
|
99
|
+
constructor(admission_json: string, application_json: string, client_participant_id: number, signing_worker_participant_id: number, factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, recipient_key_material: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array);
|
|
100
|
+
/**
|
|
101
|
+
* Consumes the session and returns the verified exported seed.
|
|
102
|
+
*/
|
|
103
|
+
complete(result_json: string): WasmExportedEd25519SeedV1;
|
|
81
104
|
}
|
|
82
|
-
|
|
83
105
|
/**
|
|
84
106
|
* One-use WASM typestate client for Ed25519 Yao lane provisioning/refresh.
|
|
85
107
|
*
|
|
@@ -87,29 +109,27 @@ export class WasmEd25519YaoClientRootExportSessionV1 {
|
|
|
87
109
|
* returned request contains only recipient-encrypted Deriver inputs.
|
|
88
110
|
*/
|
|
89
111
|
export class WasmEd25519YaoLaneClientV1 {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
prepare(job_input: any, binding_input: any, application_input: any, client_participant_id: number, signing_worker_participant_id: number, source: WasmEd25519YaoLaneSourceV1, deriver_a_input_public_key: Uint8Array, deriver_b_input_public_key: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array): any;
|
|
112
|
+
free(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Returns the prepared request JSON for callers that use the Rust-style
|
|
115
|
+
* getter convention.
|
|
116
|
+
*/
|
|
117
|
+
execute_request_json(): string;
|
|
118
|
+
/**
|
|
119
|
+
* Creates an empty one-use lane client.
|
|
120
|
+
*/
|
|
121
|
+
constructor();
|
|
122
|
+
/**
|
|
123
|
+
* Prepares the exact authenticated internal dispatch artifact and returns
|
|
124
|
+
* `{ requestJson }` for Router execution.
|
|
125
|
+
*/
|
|
126
|
+
prepare(job_input: any, binding_input: any, application_input: any, client_participant_id: number, signing_worker_participant_id: number, source: WasmEd25519YaoLaneSourceV1, deriver_a_input_public_key: Uint8Array, deriver_b_input_public_key: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array): any;
|
|
127
|
+
/**
|
|
128
|
+
* Consumes the one-use state and returns the immutable receipt plus the
|
|
129
|
+
* opaque holder package set required for later delivery.
|
|
130
|
+
*/
|
|
131
|
+
complete(result_input: any): any;
|
|
111
132
|
}
|
|
112
|
-
|
|
113
133
|
/**
|
|
114
134
|
* Opaque wallet-custody source for Ed25519 Yao lane preparation.
|
|
115
135
|
*
|
|
@@ -117,45 +137,39 @@ export class WasmEd25519YaoLaneClientV1 {
|
|
|
117
137
|
* worker. Neither the custody seed nor stable Client root crosses into JS.
|
|
118
138
|
*/
|
|
119
139
|
export class WasmEd25519YaoLaneSourceV1 {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
constructor(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array);
|
|
140
|
+
free(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Opens the custody envelope and retains only the derived Client root.
|
|
143
|
+
*/
|
|
144
|
+
constructor(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array);
|
|
126
145
|
}
|
|
127
|
-
|
|
128
146
|
/**
|
|
129
147
|
* One-use source-preserving registration request prepared from an opaque
|
|
130
148
|
* owner source. The root is borrowed only while the request is sealed and is
|
|
131
149
|
* never retained by this session or returned to JavaScript.
|
|
132
150
|
*/
|
|
133
151
|
export class WasmEd25519YaoSourcePreservingRegistrationSessionV1 {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
take_execute_request_json(): string;
|
|
152
|
+
free(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Consumes the one-use session and returns the opaque Router request JSON.
|
|
155
|
+
*/
|
|
156
|
+
take_execute_request_json(): string;
|
|
157
|
+
/**
|
|
158
|
+
* Seals one target registration request to Device 2's recipient key.
|
|
159
|
+
*/
|
|
160
|
+
constructor(admission_input: any, application_input: any, client_participant_id: number, signing_worker_participant_id: number, source: WasmEd25519YaoLaneSourceV1, expected_registered_public_key: Uint8Array, target_client_recipient_public_key: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array);
|
|
144
161
|
}
|
|
145
|
-
|
|
146
162
|
/**
|
|
147
163
|
* One-use verified Ed25519 seed returned to the secure export viewer boundary.
|
|
148
164
|
*/
|
|
149
165
|
export class WasmExportedEd25519SeedV1 {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
take_export_artifact_json(): string;
|
|
166
|
+
private constructor();
|
|
167
|
+
free(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Builds the standard verified NEAR export artifact exactly once.
|
|
170
|
+
*/
|
|
171
|
+
take_export_artifact_json(): string;
|
|
157
172
|
}
|
|
158
|
-
|
|
159
173
|
/**
|
|
160
174
|
* Worker-owned Client material completed from one exact ordinary activation.
|
|
161
175
|
*
|
|
@@ -163,146 +177,111 @@ export class WasmExportedEd25519SeedV1 {
|
|
|
163
177
|
* for its local factor-sealing operation.
|
|
164
178
|
*/
|
|
165
179
|
export class WasmOrdinaryEd25519ActivationClientMaterialV1 {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
take_client_material(): Uint8Array;
|
|
180
|
+
free(): void;
|
|
181
|
+
/**
|
|
182
|
+
* Consumes the local scalar for the worker's factor-sealing primitive.
|
|
183
|
+
*/
|
|
184
|
+
take_client_material(): Uint8Array;
|
|
185
|
+
/**
|
|
186
|
+
* Opens and combines the two Client packages for one admitted activation.
|
|
187
|
+
* The binding, receipt, and participant IDs provide the public relation
|
|
188
|
+
* needed before local factor sealing. The recipient private key is
|
|
189
|
+
* consumed only in Rust/WASM.
|
|
190
|
+
*/
|
|
191
|
+
constructor(binding_json: string, deriver_a_client_package_json: string, deriver_b_client_package_json: string, recipient_private_key: Uint8Array, participant_ids_json: string, public_receipt_json: string);
|
|
192
|
+
/**
|
|
193
|
+
* Zeroizes the retained Client share before normal object collection.
|
|
194
|
+
*/
|
|
195
|
+
destroy(): void;
|
|
183
196
|
}
|
|
184
|
-
|
|
185
197
|
/**
|
|
186
198
|
* One-use owner export session opened from a factor-sealed wallet custody
|
|
187
199
|
* seed. Linked-device export uses the dedicated Client-root session below.
|
|
188
200
|
*/
|
|
189
201
|
export class WasmWalletCustodySeedExportSessionV1 {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
constructor(admission_json: string, application_json: string, client_participant_id: number, signing_worker_participant_id: number, factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, recipient_key_material: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array);
|
|
202
|
+
free(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Returns the serialized request to execute through the Router A/B export protocol.
|
|
205
|
+
*/
|
|
206
|
+
execute_request_json(): string;
|
|
207
|
+
/**
|
|
208
|
+
* Opens the wallet custody seed and prepares a one-use export request.
|
|
209
|
+
*/
|
|
210
|
+
constructor(admission_json: string, application_json: string, client_participant_id: number, signing_worker_participant_id: number, factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, recipient_key_material: Uint8Array, deriver_a_seal_seed: Uint8Array, deriver_b_seal_seed: Uint8Array);
|
|
211
|
+
/**
|
|
212
|
+
* Consumes the session and returns the verified exported seed.
|
|
213
|
+
*/
|
|
214
|
+
complete(result_json: string): WasmExportedEd25519SeedV1;
|
|
204
215
|
}
|
|
205
216
|
|
|
206
|
-
/**
|
|
207
|
-
* Opens a verified owner custody-seed envelope and derives the exact Client
|
|
208
|
-
* root for an approved lane job. This is the owner-capability branch; ordinary
|
|
209
|
-
* factor opens continue to require a dedicated Client-root envelope.
|
|
210
|
-
*/
|
|
211
|
-
export function ed25519_yao_lane_source_from_wallet_seed_v1(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, application_binding_digest: Uint8Array, wallet_key_id: string, enrollment_id: string, revocation_epoch: bigint, registered_public_key: Uint8Array): WasmEd25519YaoLaneSourceV1;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Opens the wallet's Ed25519 continuity cache with any enrolled factor.
|
|
215
|
-
*
|
|
216
|
-
* **The unlock read side, and deliberately one call.** The custody seed
|
|
217
|
-
* exists only between opening the envelope and deriving the cache key.
|
|
218
|
-
* Splitting this into "open the envelope" and "open the cache" would put the
|
|
219
|
-
* seed in a caller's hands, and every caller here is JavaScript.
|
|
220
|
-
*
|
|
221
|
-
* Exported from *this* module rather than the ceremony's because the handle
|
|
222
|
-
* it returns has to be the one the signing path already uses: two wasm
|
|
223
|
-
* modules each define their own `WasmActivatedClientV1`, and a handle from
|
|
224
|
-
* the wrong module cannot sign.
|
|
225
|
-
*
|
|
226
|
-
* The caller never assembles the cache seal binding. It is rebuilt here from
|
|
227
|
-
* the record's own fields, because it is both HKDF input and AEAD associated
|
|
228
|
-
* data — a caller that assembled it even slightly differently would hold a
|
|
229
|
-
* record that never opens, and the failure would read as a bad factor.
|
|
230
|
-
*
|
|
231
|
-
* Any factor works, which is the point of sealing under the seed: a passkey
|
|
232
|
-
* enrolled long after registration opens the cache the Email OTP enrollment
|
|
233
|
-
* wrote, and the reverse.
|
|
234
|
-
*/
|
|
235
|
-
export function openWalletCustodyEd25519MaterialV1(factor_secret: Uint8Array, envelope_binding_json: string, envelope_nonce: Uint8Array, envelope_ciphertext: Uint8Array, envelope_aad_hash: Uint8Array, envelope_ciphertext_digest: Uint8Array, application_binding_digest: Uint8Array, registered_public_key: Uint8Array, state_epoch: bigint, client_participant_id: number, signing_worker_participant_id: number, signing_worker_verifying_share: Uint8Array, cache_nonce: Uint8Array, cache_ciphertext: Uint8Array): WasmActivatedClientV1;
|
|
236
|
-
|
|
237
217
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
238
218
|
|
|
239
219
|
export interface InitOutput {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
220
|
+
readonly memory: WebAssembly.Memory;
|
|
221
|
+
readonly __wbg_wasmactivatedclientv1_free: (a: number, b: number) => void;
|
|
222
|
+
readonly __wbg_wasmclientsigningsharev1_free: (a: number, b: number) => void;
|
|
223
|
+
readonly __wbg_wasmed25519yaoclientrootexportsessionv1_free: (a: number, b: number) => void;
|
|
224
|
+
readonly __wbg_wasmed25519yaolaneclientv1_free: (a: number, b: number) => void;
|
|
225
|
+
readonly __wbg_wasmed25519yaolanesourcev1_free: (a: number, b: number) => void;
|
|
226
|
+
readonly __wbg_wasmed25519yaosourcepreservingregistrationsessionv1_free: (a: number, b: number) => void;
|
|
227
|
+
readonly __wbg_wasmexporteded25519seedv1_free: (a: number, b: number) => void;
|
|
228
|
+
readonly ed25519_yao_lane_source_from_wallet_seed_v1: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: bigint, t: number, u: number) => [number, number, number];
|
|
229
|
+
readonly openWalletCustodyEd25519MaterialV1: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: bigint, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number) => [number, number, number];
|
|
230
|
+
readonly wasmactivatedclientv1_create_signing_share: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
231
|
+
readonly wasmactivatedclientv1_import_linked_material: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
232
|
+
readonly wasmactivatedclientv1_import_local_material: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: bigint, l: number, m: number, n: number, o: number) => [number, number, number];
|
|
233
|
+
readonly wasmactivatedclientv1_registered_public_key: (a: number) => [number, number];
|
|
234
|
+
readonly wasmactivatedclientv1_seal_local_material: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
235
|
+
readonly wasmactivatedclientv1_state_epoch: (a: number) => bigint;
|
|
236
|
+
readonly wasmclientsigningsharev1_client_commitments_json: (a: number) => [number, number];
|
|
237
|
+
readonly wasmclientsigningsharev1_client_signature_share_b64u: (a: number) => [number, number];
|
|
238
|
+
readonly wasmclientsigningsharev1_client_verifying_share: (a: number) => [number, number];
|
|
239
|
+
readonly wasmed25519yaoclientrootexportsessionv1_complete: (a: number, b: number, c: number) => [number, number, number];
|
|
240
|
+
readonly wasmed25519yaoclientrootexportsessionv1_execute_request_json: (a: number) => [number, number];
|
|
241
|
+
readonly wasmed25519yaoclientrootexportsessionv1_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number) => [number, number, number];
|
|
242
|
+
readonly wasmed25519yaolaneclientv1_complete: (a: number, b: any) => [number, number, number];
|
|
243
|
+
readonly wasmed25519yaolaneclientv1_execute_request_json: (a: number) => [number, number, number, number];
|
|
244
|
+
readonly wasmed25519yaolaneclientv1_new: () => number;
|
|
245
|
+
readonly wasmed25519yaolaneclientv1_prepare: (a: number, b: any, c: any, d: any, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => [number, number, number];
|
|
246
|
+
readonly wasmed25519yaolanesourcev1_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number, number];
|
|
247
|
+
readonly wasmed25519yaosourcepreservingregistrationsessionv1_new: (a: any, b: any, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => [number, number, number];
|
|
248
|
+
readonly wasmed25519yaosourcepreservingregistrationsessionv1_take_execute_request_json: (a: number) => [number, number, number, number];
|
|
249
|
+
readonly wasmexporteded25519seedv1_take_export_artifact_json: (a: number) => [number, number, number, number];
|
|
250
|
+
readonly wasmordinaryed25519activationclientmaterialv1_destroy: (a: number) => void;
|
|
251
|
+
readonly wasmordinaryed25519activationclientmaterialv1_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number, number];
|
|
252
|
+
readonly wasmordinaryed25519activationclientmaterialv1_take_client_material: (a: number) => [number, number, number, number];
|
|
253
|
+
readonly wasmwalletcustodyseedexportsessionv1_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number) => [number, number, number];
|
|
254
|
+
readonly __wbg_wasmwalletcustodyseedexportsessionv1_free: (a: number, b: number) => void;
|
|
255
|
+
readonly wasmwalletcustodyseedexportsessionv1_complete: (a: number, b: number, c: number) => [number, number, number];
|
|
256
|
+
readonly __wbg_wasmordinaryed25519activationclientmaterialv1_free: (a: number, b: number) => void;
|
|
257
|
+
readonly wasmwalletcustodyseedexportsessionv1_execute_request_json: (a: number) => [number, number];
|
|
258
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
259
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
260
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
261
|
+
readonly __externref_table_alloc: () => number;
|
|
262
|
+
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
263
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
264
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
265
|
+
readonly __wbindgen_start: () => void;
|
|
286
266
|
}
|
|
287
267
|
|
|
288
268
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
289
|
-
|
|
290
269
|
/**
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
270
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
271
|
+
* a precompiled `WebAssembly.Module`.
|
|
272
|
+
*
|
|
273
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
274
|
+
*
|
|
275
|
+
* @returns {InitOutput}
|
|
276
|
+
*/
|
|
298
277
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
299
278
|
|
|
300
279
|
/**
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
280
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
281
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
282
|
+
*
|
|
283
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
284
|
+
*
|
|
285
|
+
* @returns {Promise<InitOutput>}
|
|
286
|
+
*/
|
|
308
287
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|