@tempoxyz/id 0.0.0-stage → 0.0.1
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 +121 -2
- package/dist/App.d.ts +121 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +132 -0
- package/dist/App.js.map +1 -0
- package/dist/app/client/.assetsignore +2 -0
- package/dist/app/client/_headers +4 -0
- package/dist/app/client/assets/Account-BYLpNFf3.css +1 -0
- package/dist/app/client/assets/Account-BllJah07.js +1 -0
- package/dist/app/client/assets/Amount-E_7snI0-.js +1 -0
- package/dist/app/client/assets/Amount-ZdtluGf-.css +1 -0
- package/dist/app/client/assets/Approval-CgV5JHlb.css +1 -0
- package/dist/app/client/assets/Approval-yKflypU2.js +1 -0
- package/dist/app/client/assets/ArrowUp-CRvqfMNU.js +1 -0
- package/dist/app/client/assets/Authentication-BAXhOh_4.js +2 -0
- package/dist/app/client/assets/BRLA-CZvVDNYr.png +0 -0
- package/dist/app/client/assets/BRZ-Cn3jEi9t.svg +1 -0
- package/dist/app/client/assets/CHFAU-DCedc4aH.png +0 -0
- package/dist/app/client/assets/Callout-B736759d.js +1 -0
- package/dist/app/client/assets/Callout-DBfEmP7q.css +1 -0
- package/dist/app/client/assets/Check-DVgD8tDG.js +1 -0
- package/dist/app/client/assets/ChevronRight-CsXtIZCB.js +1 -0
- package/dist/app/client/assets/ChooseAccount-BjxfQjPK.js +1 -0
- package/dist/app/client/assets/ChooseAccount-DL3wgJhE.css +1 -0
- package/dist/app/client/assets/Client-JrABNovb.js +1 -0
- package/dist/app/client/assets/Close-CRvWlhqc.js +1 -0
- package/dist/app/client/assets/Cloud-DgJsrqpQ.js +1 -0
- package/dist/app/client/assets/CodeInput-79Ctx8ZA.js +1 -0
- package/dist/app/client/assets/CodeInput-BqRteSwD.css +1 -0
- package/dist/app/client/assets/DLUSD-BnRXm3EI.png +0 -0
- package/dist/app/client/assets/Deposit-CclrAoXL.css +1 -0
- package/dist/app/client/assets/Deposit-c7uYn2Eb.js +1 -0
- package/dist/app/client/assets/DevTools-BYkmtuV5.css +1 -0
- package/dist/app/client/assets/DevTools-BgnzDGo2.js +1 -0
- package/dist/app/client/assets/DeviceApproval-BBUVv58e.js +1 -0
- package/dist/app/client/assets/DeviceApproval-BffFLD8F.css +1 -0
- package/dist/app/client/assets/EURAU-sjieTTB9.svg +1 -0
- package/dist/app/client/assets/EURC.e-CxYiiwkz.svg +1 -0
- package/dist/app/client/assets/Fingerprint-BNCA6qOJ.js +1 -0
- package/dist/app/client/assets/GBPA-DI_25xSG.svg +4 -0
- package/dist/app/client/assets/GUSD-BDEP2Qb-.svg +1 -0
- package/dist/app/client/assets/GeistMono-Variable-BRXCGrxA.woff2 +0 -0
- package/dist/app/client/assets/Globe-f0eWzcEI.js +1 -0
- package/dist/app/client/assets/Grant-5a-n1gJH.css +1 -0
- package/dist/app/client/assets/Grant-Dp7mpcEi.js +1 -0
- package/dist/app/client/assets/Hex-C9KeV7_9.css +1 -0
- package/dist/app/client/assets/Hex-CSp2U46W.js +10 -0
- package/dist/app/client/assets/IconChip-DpZHa1JW.js +1 -0
- package/dist/app/client/assets/IconChip-yqaQ2y_d.css +1 -0
- package/dist/app/client/assets/InputGroup-BlZvt9In.css +1 -0
- package/dist/app/client/assets/InputGroup-CsOeBnpB.js +1 -0
- package/dist/app/client/assets/Inter-cyrillic-e3OmmzmJ.woff2 +0 -0
- package/dist/app/client/assets/Inter-cyrillic-ext-DOWZeO4Q.woff2 +0 -0
- package/dist/app/client/assets/Inter-greek-BD3ujQlX.woff2 +0 -0
- package/dist/app/client/assets/Inter-greek-ext-CXEwbus4.woff2 +0 -0
- package/dist/app/client/assets/Inter-latin-BDFm4vTb.woff2 +0 -0
- package/dist/app/client/assets/Inter-latin-ext-E7a9JEPe.woff2 +0 -0
- package/dist/app/client/assets/Inter-symbols-DEch7Rxr.woff2 +0 -0
- package/dist/app/client/assets/Inter-vietnamese-Bg9723vR.woff2 +0 -0
- package/dist/app/client/assets/Loader-Cm9YJNNJ.js +1 -0
- package/dist/app/client/assets/MACH-sK0r79kQ.svg +4 -0
- package/dist/app/client/assets/OUSD-BFXgVo-Z.svg +5 -0
- package/dist/app/client/assets/OUSD.dark-BbbjMvA1.svg +17 -0
- package/dist/app/client/assets/OUSD.light-B_zpSz_c.svg +17 -0
- package/dist/app/client/assets/PRIME-CiFp2-3e.svg +14 -0
- package/dist/app/client/assets/PopoverPopup-DprRXRQe.js +1 -0
- package/dist/app/client/assets/Rows-DPGTUdA8.css +1 -0
- package/dist/app/client/assets/Rows-Qqo3evtk.js +1 -0
- package/dist/app/client/assets/SBC-BTYkbkiD.svg +1 -0
- package/dist/app/client/assets/SEKAU-CB5Fc6o8.svg +5 -0
- package/dist/app/client/assets/Separator-CZUjVQOL.js +1 -0
- package/dist/app/client/assets/SignIn-HdaDzFmq.js +1 -0
- package/dist/app/client/assets/SignIn-mlBTwUq4.css +1 -0
- package/dist/app/client/assets/Stack-CkkvkOzj.js +1 -0
- package/dist/app/client/assets/Stack-D7Yt22Ed.css +1 -0
- package/dist/app/client/assets/Tag-BMh6ajrW.css +1 -0
- package/dist/app/client/assets/Tag-CLOVANTX.js +1 -0
- package/dist/app/client/assets/ToolbarRootContext-Zty_Dh3J.js +1 -0
- package/dist/app/client/assets/Tooltip-CLATV6YU.js +1 -0
- package/dist/app/client/assets/Tooltip-d3y9ESUJ.css +1 -0
- package/dist/app/client/assets/USD1-COVcO_PB.svg +30 -0
- package/dist/app/client/assets/USDB-Ckwb6UQw.svg +11 -0
- package/dist/app/client/assets/USDC.e-3nMsKAMC.svg +1 -0
- package/dist/app/client/assets/USDT0-ia60Dw0e.svg +1 -0
- package/dist/app/client/assets/USDY-CB4iet2q.svg +16 -0
- package/dist/app/client/assets/USDe-BXHQCd92.svg +1 -0
- package/dist/app/client/assets/Upgrade-D0_aO5AP.js +1 -0
- package/dist/app/client/assets/WalletUpgrade-BPsPNQsd.js +1 -0
- package/dist/app/client/assets/WalletUpgrade-C04kW0Jl.css +1 -0
- package/dist/app/client/assets/YLDS-CRh8Zw0g.svg +3 -0
- package/dist/app/client/assets/___-I98bns4o.css +1 -0
- package/dist/app/client/assets/___.flows-XOlLwMIy.js +5 -0
- package/dist/app/client/assets/alphaUSD-CpCFoVuh.svg +1 -0
- package/dist/app/client/assets/authorize-C-MlCyaM.js +1 -0
- package/dist/app/client/assets/betaUSD-9A8AjgYg.svg +1 -0
- package/dist/app/client/assets/cUSD-WsQfa-iC.svg +1 -0
- package/dist/app/client/assets/cbBTC-DvUDqrDi.svg +1 -0
- package/dist/app/client/assets/choose-account-nXR-SKa2.js +1 -0
- package/dist/app/client/assets/deposit-G8tiLPN4.js +1 -0
- package/dist/app/client/assets/device-BojBF7hZ.js +1 -0
- package/dist/app/client/assets/error-KiOpX7GD.js +1 -0
- package/dist/app/client/assets/frxUSD-n9pTpinR.svg +1 -0
- package/dist/app/client/assets/getPseudoElementBounds-BsLy4zf_.js +1 -0
- package/dist/app/client/assets/goUSD-D9kUvHsF.svg +5 -0
- package/dist/app/client/assets/iUSD-CWCJAq9X.svg +1 -0
- package/dist/app/client/assets/index-BZH0M7Nf.js +13 -0
- package/dist/app/client/assets/index-CIYxHmYA.css +1 -0
- package/dist/app/client/assets/login-DUjpk60p.js +1 -0
- package/dist/app/client/assets/pathUSD-BvaO6ooS.svg +25 -0
- package/dist/app/client/assets/preload-helper-Bs9KvdYl.js +1 -0
- package/dist/app/client/assets/rUSD-B-xuFS7T.svg +1 -0
- package/dist/app/client/assets/reUSD-CkIUs0Lx.svg +1 -0
- package/dist/app/client/assets/removable-DMiA3t_o.js +1 -0
- package/dist/app/client/assets/reset-co-CHrff.css +1 -0
- package/dist/app/client/assets/rolldown-runtime-WkwZ5CU-.js +1 -0
- package/dist/app/client/assets/routes-CK8cthzA.js +1 -0
- package/dist/app/client/assets/sUSDe-j9GOnH7I.svg +1 -0
- package/dist/app/client/assets/siUSD-C10QUNYS.svg +1 -0
- package/dist/app/client/assets/stcUSD-DIntDJeh.svg +1 -0
- package/dist/app/client/assets/syrupUSDC-DhYwZqdM.svg +5 -0
- package/dist/app/client/assets/thetaUSD-Dgmksf6G.svg +1 -0
- package/dist/app/client/assets/useNavigate-CB6S2u4J.js +1 -0
- package/dist/app/client/assets/useQuery-BpHfPhTT.js +1 -0
- package/dist/app/client/assets/useRegisterFieldControl-DsslqY-V.js +1 -0
- package/dist/app/client/assets/wYLDS-CaCKDrO-.svg +10 -0
- package/dist/app/client/assets/wsrUSD-B2Ey0bDQ.svg +1 -0
- package/dist/app/client/assets/zyzz-DYC-X0_B.css +1 -0
- package/dist/app/client/assets/zyzz.config-DX_D_7j3.js +2 -0
- package/dist/app/db/auth.d.ts +3412 -0
- package/dist/app/db/auth.d.ts.map +1 -0
- package/dist/app/db/auth.js +349 -0
- package/dist/app/db/auth.js.map +1 -0
- package/dist/app/db/schema.d.ts +1091 -0
- package/dist/app/db/schema.d.ts.map +1 -0
- package/dist/app/db/schema.js +183 -0
- package/dist/app/db/schema.js.map +1 -0
- package/dist/app/db/table.d.ts +8 -0
- package/dist/app/db/table.d.ts.map +1 -0
- package/dist/app/db/table.js +28 -0
- package/dist/app/db/table.js.map +1 -0
- package/dist/app/server/.vite/manifest.json +2093 -0
- package/dist/app/server/assets/Account-BYLpNFf3.css +1 -0
- package/dist/app/server/assets/Account-G_SUeRU3.js +2 -0
- package/dist/app/server/assets/Account-G_SUeRU3.js.map +1 -0
- package/dist/app/server/assets/Amount-Cgwdr3Xt.js +2 -0
- package/dist/app/server/assets/Amount-Cgwdr3Xt.js.map +1 -0
- package/dist/app/server/assets/Amount-ZdtluGf-.css +1 -0
- package/dist/app/server/assets/Approval-CgV5JHlb.css +1 -0
- package/dist/app/server/assets/Approval-DvkB9tWA.js +2 -0
- package/dist/app/server/assets/Approval-DvkB9tWA.js.map +1 -0
- package/dist/app/server/assets/ArrowUp-DpK_zNgZ.js +2 -0
- package/dist/app/server/assets/ArrowUp-DpK_zNgZ.js.map +1 -0
- package/dist/app/server/assets/Authentication-BOkhlNQu.js +2 -0
- package/dist/app/server/assets/Authentication-BOkhlNQu.js.map +1 -0
- package/dist/app/server/assets/Authentication-C3oNZAVX.js +2 -0
- package/dist/app/server/assets/Authentication-C3oNZAVX.js.map +1 -0
- package/dist/app/server/assets/BRLA-CZvVDNYr.png +0 -0
- package/dist/app/server/assets/BRZ-Cn3jEi9t.svg +1 -0
- package/dist/app/server/assets/Bytes-C7CRVS3J.js +4 -0
- package/dist/app/server/assets/Bytes-C7CRVS3J.js.map +1 -0
- package/dist/app/server/assets/CHFAU-DCedc4aH.png +0 -0
- package/dist/app/server/assets/Callout-DBfEmP7q.css +1 -0
- package/dist/app/server/assets/Callout-tQoAitWq.js +2 -0
- package/dist/app/server/assets/Callout-tQoAitWq.js.map +1 -0
- package/dist/app/server/assets/ChainList-C4A_7e-9.js +6 -0
- package/dist/app/server/assets/ChainList-C4A_7e-9.js.map +1 -0
- package/dist/app/server/assets/ChainName-BMnJyJrd.js +2 -0
- package/dist/app/server/assets/ChainName-BMnJyJrd.js.map +1 -0
- package/dist/app/server/assets/Check-DU_oR3Ev.js +2 -0
- package/dist/app/server/assets/Check-DU_oR3Ev.js.map +1 -0
- package/dist/app/server/assets/ChevronRight-DTBnw-W6.js +2 -0
- package/dist/app/server/assets/ChevronRight-DTBnw-W6.js.map +1 -0
- package/dist/app/server/assets/ChooseAccount-BizJvMrY.js +2 -0
- package/dist/app/server/assets/ChooseAccount-BizJvMrY.js.map +1 -0
- package/dist/app/server/assets/ChooseAccount-DL3wgJhE.css +1 -0
- package/dist/app/server/assets/Client-Dx3KrpJZ.js +2 -0
- package/dist/app/server/assets/Client-Dx3KrpJZ.js.map +1 -0
- package/dist/app/server/assets/ClientOnly-CKLiu67O.js +2 -0
- package/dist/app/server/assets/ClientOnly-CKLiu67O.js.map +1 -0
- package/dist/app/server/assets/Close-DUeE37ev.js +2 -0
- package/dist/app/server/assets/Close-DUeE37ev.js.map +1 -0
- package/dist/app/server/assets/Cloud-CLB3rTTy.js +2 -0
- package/dist/app/server/assets/Cloud-CLB3rTTy.js.map +1 -0
- package/dist/app/server/assets/CodeInput-BqRteSwD.css +1 -0
- package/dist/app/server/assets/CodeInput-FsPzVuLU.js +2 -0
- package/dist/app/server/assets/CodeInput-FsPzVuLU.js.map +1 -0
- package/dist/app/server/assets/Credential-DFjcrdyI.js +2 -0
- package/dist/app/server/assets/Credential-DFjcrdyI.js.map +1 -0
- package/dist/app/server/assets/DLUSD-BnRXm3EI.png +0 -0
- package/dist/app/server/assets/Deposit-CclrAoXL.css +1 -0
- package/dist/app/server/assets/Deposit-ChYGRfW2.js +2 -0
- package/dist/app/server/assets/Deposit-ChYGRfW2.js.map +1 -0
- package/dist/app/server/assets/DevTools-BYkmtuV5.css +1 -0
- package/dist/app/server/assets/DevTools-ZJVXqrIK.js +2 -0
- package/dist/app/server/assets/DevTools-ZJVXqrIK.js.map +1 -0
- package/dist/app/server/assets/DeviceApproval-BffFLD8F.css +1 -0
- package/dist/app/server/assets/DeviceApproval-Bqe3Mi78.js +2 -0
- package/dist/app/server/assets/DeviceApproval-Bqe3Mi78.js.map +1 -0
- package/dist/app/server/assets/EURAU-sjieTTB9.svg +1 -0
- package/dist/app/server/assets/EURC.e-CxYiiwkz.svg +1 -0
- package/dist/app/server/assets/ExecutionError-CDszGSF1.js +9 -0
- package/dist/app/server/assets/ExecutionError-CDszGSF1.js.map +1 -0
- package/dist/app/server/assets/Fingerprint-DhOPOdRr.js +2 -0
- package/dist/app/server/assets/Fingerprint-DhOPOdRr.js.map +1 -0
- package/dist/app/server/assets/GBPA-DI_25xSG.svg +4 -0
- package/dist/app/server/assets/GUSD-BDEP2Qb-.svg +1 -0
- package/dist/app/server/assets/GeistMono-Variable-BRXCGrxA.woff2 +0 -0
- package/dist/app/server/assets/Globe-2CxqxU-7.js +2 -0
- package/dist/app/server/assets/Globe-2CxqxU-7.js.map +1 -0
- package/dist/app/server/assets/Grant-5a-n1gJH.css +1 -0
- package/dist/app/server/assets/Grant-D_tun0mF.js +2 -0
- package/dist/app/server/assets/Grant-D_tun0mF.js.map +1 -0
- package/dist/app/server/assets/Hex-C9KeV7_9.css +1 -0
- package/dist/app/server/assets/Hex-Z6m_0Y0m.js +11 -0
- package/dist/app/server/assets/Hex-Z6m_0Y0m.js.map +1 -0
- package/dist/app/server/assets/IconChip-C9ZrmGB5.js +2 -0
- package/dist/app/server/assets/IconChip-C9ZrmGB5.js.map +1 -0
- package/dist/app/server/assets/IconChip-yqaQ2y_d.css +1 -0
- package/dist/app/server/assets/InputGroup-BlZvt9In.css +1 -0
- package/dist/app/server/assets/InputGroup-hpjuLuR7.js +2 -0
- package/dist/app/server/assets/InputGroup-hpjuLuR7.js.map +1 -0
- package/dist/app/server/assets/Inter-cyrillic-e3OmmzmJ.woff2 +0 -0
- package/dist/app/server/assets/Inter-cyrillic-ext-DOWZeO4Q.woff2 +0 -0
- package/dist/app/server/assets/Inter-greek-BD3ujQlX.woff2 +0 -0
- package/dist/app/server/assets/Inter-greek-ext-CXEwbus4.woff2 +0 -0
- package/dist/app/server/assets/Inter-latin-BDFm4vTb.woff2 +0 -0
- package/dist/app/server/assets/Inter-latin-ext-E7a9JEPe.woff2 +0 -0
- package/dist/app/server/assets/Inter-symbols-DEch7Rxr.woff2 +0 -0
- package/dist/app/server/assets/Inter-vietnamese-Bg9723vR.woff2 +0 -0
- package/dist/app/server/assets/Loader-DnKC9P5p.js +2 -0
- package/dist/app/server/assets/Loader-DnKC9P5p.js.map +1 -0
- package/dist/app/server/assets/MACH-sK0r79kQ.svg +4 -0
- package/dist/app/server/assets/Match-CyVdYcSf.js +2 -0
- package/dist/app/server/assets/Match-CyVdYcSf.js.map +1 -0
- package/dist/app/server/assets/OUSD-BFXgVo-Z.svg +5 -0
- package/dist/app/server/assets/OUSD.dark-BbbjMvA1.svg +17 -0
- package/dist/app/server/assets/OUSD.light-B_zpSz_c.svg +17 -0
- package/dist/app/server/assets/PRIME-CiFp2-3e.svg +14 -0
- package/dist/app/server/assets/PopoverPopup-CwqeQelI.js +2 -0
- package/dist/app/server/assets/PopoverPopup-CwqeQelI.js.map +1 -0
- package/dist/app/server/assets/Rows-CQKQwTI1.js +2 -0
- package/dist/app/server/assets/Rows-CQKQwTI1.js.map +1 -0
- package/dist/app/server/assets/Rows-DPGTUdA8.css +1 -0
- package/dist/app/server/assets/SBC-BTYkbkiD.svg +1 -0
- package/dist/app/server/assets/SEKAU-CB5Fc6o8.svg +5 -0
- package/dist/app/server/assets/Separator-DrI7KRAs.js +2 -0
- package/dist/app/server/assets/Separator-DrI7KRAs.js.map +1 -0
- package/dist/app/server/assets/SignIn-DfeeLEmN.js +2 -0
- package/dist/app/server/assets/SignIn-DfeeLEmN.js.map +1 -0
- package/dist/app/server/assets/SignIn-mlBTwUq4.css +1 -0
- package/dist/app/server/assets/Stack-D7Yt22Ed.css +1 -0
- package/dist/app/server/assets/Stack-DGktaLZc.js +2 -0
- package/dist/app/server/assets/Stack-DGktaLZc.js.map +1 -0
- package/dist/app/server/assets/Tag-9vSRBpph.js +2 -0
- package/dist/app/server/assets/Tag-9vSRBpph.js.map +1 -0
- package/dist/app/server/assets/Tag-BMh6ajrW.css +1 -0
- package/dist/app/server/assets/ToolbarRootContext-BH_CFSWd.js +2 -0
- package/dist/app/server/assets/ToolbarRootContext-BH_CFSWd.js.map +1 -0
- package/dist/app/server/assets/Tooltip-DLX41peb.js +2 -0
- package/dist/app/server/assets/Tooltip-DLX41peb.js.map +1 -0
- package/dist/app/server/assets/Tooltip-d3y9ESUJ.css +1 -0
- package/dist/app/server/assets/USD1-COVcO_PB.svg +30 -0
- package/dist/app/server/assets/USDB-Ckwb6UQw.svg +11 -0
- package/dist/app/server/assets/USDC.e-3nMsKAMC.svg +1 -0
- package/dist/app/server/assets/USDT0-ia60Dw0e.svg +1 -0
- package/dist/app/server/assets/USDY-CB4iet2q.svg +16 -0
- package/dist/app/server/assets/USDe-BXHQCd92.svg +1 -0
- package/dist/app/server/assets/Upgrade-Dbfm2nm0.js +2 -0
- package/dist/app/server/assets/Upgrade-Dbfm2nm0.js.map +1 -0
- package/dist/app/server/assets/WalletUpgrade-C04kW0Jl.css +1 -0
- package/dist/app/server/assets/WalletUpgrade-CWKc5fYt.js +2 -0
- package/dist/app/server/assets/WalletUpgrade-CWKc5fYt.js.map +1 -0
- package/dist/app/server/assets/YLDS-CRh8Zw0g.svg +3 -0
- package/dist/app/server/assets/___-I98bns4o.css +1 -0
- package/dist/app/server/assets/___.flows-Cc-awUoC.js +6 -0
- package/dist/app/server/assets/___.flows-Cc-awUoC.js.map +1 -0
- package/dist/app/server/assets/_tanstack-start-manifest_v-U7TrtUSA.js +1 -0
- package/dist/app/server/assets/_zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows-B1pPOqsM.css +1 -0
- package/dist/app/server/assets/_zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-CKALi9oD.js +2 -0
- package/dist/app/server/assets/_zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-CKALi9oD.js.map +1 -0
- package/dist/app/server/assets/_zyzz_shared-BbDIEd_j.css +1 -0
- package/dist/app/server/assets/alphaUSD-CpCFoVuh.svg +1 -0
- package/dist/app/server/assets/arktype-aI7TBD0R-D1R3Byo5.js +2 -0
- package/dist/app/server/assets/arktype-aI7TBD0R-D1R3Byo5.js.map +1 -0
- package/dist/app/server/assets/async-local-storage-DlOvwxXd.js +2 -0
- package/dist/app/server/assets/async-local-storage-DlOvwxXd.js.map +1 -0
- package/dist/app/server/assets/authorize-BXzTo2Pb.js +2 -0
- package/dist/app/server/assets/authorize-BXzTo2Pb.js.map +1 -0
- package/dist/app/server/assets/authorize-BzoUqOdA.js +2 -0
- package/dist/app/server/assets/authorize-BzoUqOdA.js.map +1 -0
- package/dist/app/server/assets/authorize-DXYo-K2n-rmQQ42x1.js +56 -0
- package/dist/app/server/assets/authorize-DXYo-K2n-rmQQ42x1.js.map +1 -0
- package/dist/app/server/assets/authorize-DfjPYJqS.css +1 -0
- package/dist/app/server/assets/betaUSD-9A8AjgYg.svg +1 -0
- package/dist/app/server/assets/bun-sqlite-dialect-DoOVo4ja-CtyBkVMb.js +2 -0
- package/dist/app/server/assets/bun-sqlite-dialect-DoOVo4ja-CtyBkVMb.js.map +1 -0
- package/dist/app/server/assets/cUSD-WsQfa-iC.svg +1 -0
- package/dist/app/server/assets/call-dzi0xjZd.js +31 -0
- package/dist/app/server/assets/call-dzi0xjZd.js.map +1 -0
- package/dist/app/server/assets/cbBTC-DvUDqrDi.svg +1 -0
- package/dist/app/server/assets/ccip-DjD8z_3B.js +2 -0
- package/dist/app/server/assets/ccip-DjD8z_3B.js.map +1 -0
- package/dist/app/server/assets/choose-account-_X7xq5am.js +2 -0
- package/dist/app/server/assets/choose-account-_X7xq5am.js.map +1 -0
- package/dist/app/server/assets/choose-account-lqA5SLx9.css +1 -0
- package/dist/app/server/assets/choose-account-zm-5Qs3e.js +2 -0
- package/dist/app/server/assets/choose-account-zm-5Qs3e.js.map +1 -0
- package/dist/app/server/assets/compiled-query-Ds2NVcFT.js +2 -0
- package/dist/app/server/assets/compiled-query-Ds2NVcFT.js.map +1 -0
- package/dist/app/server/assets/convert-BIC8n32x.js +2 -0
- package/dist/app/server/assets/convert-BIC8n32x.js.map +1 -0
- package/dist/app/server/assets/cookie-DxViaO10.js +2 -0
- package/dist/app/server/assets/cookie-DxViaO10.js.map +1 -0
- package/dist/app/server/assets/core-BBrZXfrB.js +56 -0
- package/dist/app/server/assets/core-BBrZXfrB.js.map +1 -0
- package/dist/app/server/assets/d1-sqlite-dialect-m0f01-4z-Cv-csE1u.js +2 -0
- package/dist/app/server/assets/d1-sqlite-dialect-m0f01-4z-Cv-csE1u.js.map +1 -0
- package/dist/app/server/assets/decodeFunctionData-bP6V2ai4.js +2 -0
- package/dist/app/server/assets/decodeFunctionData-bP6V2ai4.js.map +1 -0
- package/dist/app/server/assets/default-u_dwuiYb-DOrMMcg9.js +2 -0
- package/dist/app/server/assets/default-u_dwuiYb-DOrMMcg9.js.map +1 -0
- package/dist/app/server/assets/deposit-BBaNI01u.js +2 -0
- package/dist/app/server/assets/deposit-BBaNI01u.js.map +1 -0
- package/dist/app/server/assets/deposit-LWS6ZTuf.js +2 -0
- package/dist/app/server/assets/deposit-LWS6ZTuf.js.map +1 -0
- package/dist/app/server/assets/deposit-oFx15XCA.css +1 -0
- package/dist/app/server/assets/device-CrXlusjr.js +2 -0
- package/dist/app/server/assets/device-CrXlusjr.js.map +1 -0
- package/dist/app/server/assets/device-DdFMgYe2.js +2 -0
- package/dist/app/server/assets/device-DdFMgYe2.js.map +1 -0
- package/dist/app/server/assets/device-tMCpu5zk.css +1 -0
- package/dist/app/server/assets/dist-CR6FW-yS.js +1 -0
- package/dist/app/server/assets/dist-CoH0hD1s.js +15 -0
- package/dist/app/server/assets/dist-CoH0hD1s.js.map +1 -0
- package/dist/app/server/assets/dist-DcICI3fd.js +2 -0
- package/dist/app/server/assets/dist-DcICI3fd.js.map +1 -0
- package/dist/app/server/assets/effect-QlVUlMFu-mXPkuQTb.js +2 -0
- package/dist/app/server/assets/effect-QlVUlMFu-mXPkuQTb.js.map +1 -0
- package/dist/app/server/assets/empty-plugin-adapters-BaGcmrjC.js +2 -0
- package/dist/app/server/assets/empty-plugin-adapters-BaGcmrjC.js.map +1 -0
- package/dist/app/server/assets/error-CXy8gqdE.css +1 -0
- package/dist/app/server/assets/error-DXDT2AHy.js +2 -0
- package/dist/app/server/assets/error-DXDT2AHy.js.map +1 -0
- package/dist/app/server/assets/error-bnVzy9tx.js +2 -0
- package/dist/app/server/assets/error-bnVzy9tx.js.map +1 -0
- package/dist/app/server/assets/esm-C6SW--yt.js +4 -0
- package/dist/app/server/assets/esm-C6SW--yt.js.map +1 -0
- package/dist/app/server/assets/factory-dvoOlKer.js +5 -0
- package/dist/app/server/assets/factory-dvoOlKer.js.map +1 -0
- package/dist/app/server/assets/frxUSD-n9pTpinR.svg +1 -0
- package/dist/app/server/assets/get-id-field-OwLpfjj2.js +6 -0
- package/dist/app/server/assets/get-id-field-OwLpfjj2.js.map +1 -0
- package/dist/app/server/assets/getPseudoElementBounds-PkWU72kn.js +2 -0
- package/dist/app/server/assets/getPseudoElementBounds-PkWU72kn.js.map +1 -0
- package/dist/app/server/assets/goUSD-D9kUvHsF.svg +5 -0
- package/dist/app/server/assets/iUSD-CWCJAq9X.svg +1 -0
- package/dist/app/server/assets/index-CLddUTqr-CC33CMvS.js +2 -0
- package/dist/app/server/assets/index-CLddUTqr-CC33CMvS.js.map +1 -0
- package/dist/app/server/assets/index-DZEfthgZ-Ec2MMQ_e.js +2 -0
- package/dist/app/server/assets/index-DZEfthgZ-Ec2MMQ_e.js.map +1 -0
- package/dist/app/server/assets/kysely-adapter-B8tQwTcu.js +1 -0
- package/dist/app/server/assets/lazyRouteComponent-DPOOPZw_.js +2 -0
- package/dist/app/server/assets/lazyRouteComponent-DPOOPZw_.js.map +1 -0
- package/dist/app/server/assets/load-server-Dr0IlySo.js +3 -0
- package/dist/app/server/assets/load-server-Dr0IlySo.js.map +1 -0
- package/dist/app/server/assets/login-BLq3tEEr.js +2 -0
- package/dist/app/server/assets/login-BLq3tEEr.js.map +1 -0
- package/dist/app/server/assets/login-DCIrAbED.js +2 -0
- package/dist/app/server/assets/login-DCIrAbED.js.map +1 -0
- package/dist/app/server/assets/login-msDnt3yT.css +1 -0
- package/dist/app/server/assets/matchContext-ByrIUj4L.js +2 -0
- package/dist/app/server/assets/matchContext-ByrIUj4L.js.map +1 -0
- package/dist/app/server/assets/node-sqlite-dialect-BowWLXvK.js +2 -0
- package/dist/app/server/assets/node-sqlite-dialect-BowWLXvK.js.map +1 -0
- package/dist/app/server/assets/pathUSD-BvaO6ooS.svg +25 -0
- package/dist/app/server/assets/rUSD-B-xuFS7T.svg +1 -0
- package/dist/app/server/assets/reUSD-CkIUs0Lx.svg +1 -0
- package/dist/app/server/assets/react-dom-DYzj0HXX.js +2 -0
- package/dist/app/server/assets/react-dom-DYzj0HXX.js.map +1 -0
- package/dist/app/server/assets/removable-BCLTvPOx.js +2 -0
- package/dist/app/server/assets/removable-BCLTvPOx.js.map +1 -0
- package/dist/app/server/assets/reset-DZWeTZeQ.js +2 -0
- package/dist/app/server/assets/reset-DZWeTZeQ.js.map +1 -0
- package/dist/app/server/assets/reset-co-CHrff.css +1 -0
- package/dist/app/server/assets/resolveError-CZXXvCJR.js +2 -0
- package/dist/app/server/assets/resolveError-CZXXvCJR.js.map +1 -0
- package/dist/app/server/assets/rolldown-runtime-BWaJ3C7D.js +1 -0
- package/dist/app/server/assets/router-Bqz5X4Qw.js +2 -0
- package/dist/app/server/assets/router-Bqz5X4Qw.js.map +1 -0
- package/dist/app/server/assets/router-CclzitkY.css +1 -0
- package/dist/app/server/assets/routes-BLQdKqcZ.js +2 -0
- package/dist/app/server/assets/routes-BLQdKqcZ.js.map +1 -0
- package/dist/app/server/assets/routes-BgiIzrOt.css +1 -0
- package/dist/app/server/assets/routes-Bv6WzsSR.js +2 -0
- package/dist/app/server/assets/routes-Bv6WzsSR.js.map +1 -0
- package/dist/app/server/assets/sUSDe-j9GOnH7I.svg +1 -0
- package/dist/app/server/assets/schema-check-oLqvHR8y.js +9 -0
- package/dist/app/server/assets/schema-check-oLqvHR8y.js.map +1 -0
- package/dist/app/server/assets/secp256k1-yg8eeIYU.js +2 -0
- package/dist/app/server/assets/secp256k1-yg8eeIYU.js.map +1 -0
- package/dist/app/server/assets/server-RRUiOef2.js +76 -0
- package/dist/app/server/assets/server-RRUiOef2.js.map +1 -0
- package/dist/app/server/assets/siUSD-C10QUNYS.svg +1 -0
- package/dist/app/server/assets/sqlite-adapter-C_LAV4e3.js +2 -0
- package/dist/app/server/assets/sqlite-adapter-C_LAV4e3.js.map +1 -0
- package/dist/app/server/assets/sqlite-introspector-DSCAP82F-Crx7Ny14.js +6 -0
- package/dist/app/server/assets/sqlite-introspector-DSCAP82F-Crx7Ny14.js.map +1 -0
- package/dist/app/server/assets/standard-json-DY77efq0.js +2 -0
- package/dist/app/server/assets/standard-json-DY77efq0.js.map +1 -0
- package/dist/app/server/assets/standard-json-ig2t0wRt.js +2 -0
- package/dist/app/server/assets/standard-json-ig2t0wRt.js.map +1 -0
- package/dist/app/server/assets/standard-json-t-LNckA6.js +2 -0
- package/dist/app/server/assets/standard-json-t-LNckA6.js.map +1 -0
- package/dist/app/server/assets/standard-openapi-CONmVRl8.js +2 -0
- package/dist/app/server/assets/standard-openapi-CONmVRl8.js.map +1 -0
- package/dist/app/server/assets/start-C63VetBp.js +2 -0
- package/dist/app/server/assets/start-C63VetBp.js.map +1 -0
- package/dist/app/server/assets/stcUSD-DIntDJeh.svg +1 -0
- package/dist/app/server/assets/sury-CWZTCd75-CDaOS2oM.js +2 -0
- package/dist/app/server/assets/sury-CWZTCd75-CDaOS2oM.js.map +1 -0
- package/dist/app/server/assets/syrupUSDC-DhYwZqdM.svg +5 -0
- package/dist/app/server/assets/thetaUSD-Dgmksf6G.svg +1 -0
- package/dist/app/server/assets/typebox-Dei93FPO-D_lCVdAz.js +2 -0
- package/dist/app/server/assets/typebox-Dei93FPO-D_lCVdAz.js.map +1 -0
- package/dist/app/server/assets/useNavigate-D6d1w7KE.js +2 -0
- package/dist/app/server/assets/useNavigate-D6d1w7KE.js.map +1 -0
- package/dist/app/server/assets/useQuery-BRpCr5vj.js +2 -0
- package/dist/app/server/assets/useQuery-BRpCr5vj.js.map +1 -0
- package/dist/app/server/assets/useRegisterFieldControl-cJesrOWK.js +2 -0
- package/dist/app/server/assets/useRegisterFieldControl-cJesrOWK.js.map +1 -0
- package/dist/app/server/assets/utils-C4ZXZIZW.js +2 -0
- package/dist/app/server/assets/utils-C4ZXZIZW.js.map +1 -0
- package/dist/app/server/assets/utils-D57zfcg-.js +2 -0
- package/dist/app/server/assets/utils-D57zfcg-.js.map +1 -0
- package/dist/app/server/assets/valibot--1zFm7rT-CIKoH3MS.js +2 -0
- package/dist/app/server/assets/valibot--1zFm7rT-CIKoH3MS.js.map +1 -0
- package/dist/app/server/assets/valibot-D_HTw1Gn-BdPyLkXt.js +2 -0
- package/dist/app/server/assets/valibot-D_HTw1Gn-BdPyLkXt.js.map +1 -0
- package/dist/app/server/assets/wYLDS-CaCKDrO-.svg +10 -0
- package/dist/app/server/assets/wsrUSD-B2Ey0bDQ.svg +1 -0
- package/dist/app/server/assets/zod-Bwrt9trS-BezI5Gi1.js +2 -0
- package/dist/app/server/assets/zod-Bwrt9trS-BezI5Gi1.js.map +1 -0
- package/dist/app/server/assets/zod-DSgpEGAE-DZ7M_Q33.js +2 -0
- package/dist/app/server/assets/zod-DSgpEGAE-DZ7M_Q33.js.map +1 -0
- package/dist/app/server/assets/zyzz-6R2K52xP.css +1 -0
- package/dist/app/server/assets/zyzz.config-CJRpjn0E.js +3 -0
- package/dist/app/server/assets/zyzz.config-CJRpjn0E.js.map +1 -0
- package/dist/app/server/index.js +532 -0
- package/dist/app/server/index.js.map +1 -0
- package/dist/app/server/wrangler.json +1 -0
- package/dist/cli/Admin.d.ts +34 -0
- package/dist/cli/Admin.d.ts.map +1 -0
- package/dist/cli/Admin.js +61 -0
- package/dist/cli/Admin.js.map +1 -0
- package/dist/cli/Apps.d.ts +9 -0
- package/dist/cli/Apps.d.ts.map +1 -0
- package/dist/cli/Apps.js +34 -0
- package/dist/cli/Apps.js.map +1 -0
- package/dist/cli/Cli.d.ts +13 -0
- package/dist/cli/Cli.d.ts.map +1 -0
- package/dist/cli/Cli.js +26 -0
- package/dist/cli/Cli.js.map +1 -0
- package/dist/cli/Project.d.ts +17 -0
- package/dist/cli/Project.d.ts.map +1 -0
- package/dist/cli/Project.js +90 -0
- package/dist/cli/Project.js.map +1 -0
- package/dist/cli/Realms.d.ts +24 -0
- package/dist/cli/Realms.d.ts.map +1 -0
- package/dist/cli/Realms.js +48 -0
- package/dist/cli/Realms.js.map +1 -0
- package/dist/cli/Session.d.ts +79 -0
- package/dist/cli/Session.d.ts.map +1 -0
- package/dist/cli/Session.js +229 -0
- package/dist/cli/Session.js.map +1 -0
- package/dist/cli/User.d.ts +24 -0
- package/dist/cli/User.d.ts.map +1 -0
- package/dist/cli/User.js +34 -0
- package/dist/cli/User.js.map +1 -0
- package/dist/cli/V1.d.ts +32 -0
- package/dist/cli/V1.d.ts.map +1 -0
- package/dist/cli/V1.js +38 -0
- package/dist/cli/V1.js.map +1 -0
- package/dist/cli/bin.d.ts +3 -0
- package/dist/cli/bin.d.ts.map +1 -0
- package/dist/cli/bin.js +46 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/commands/admin/apps/create.d.ts +23 -0
- package/dist/cli/commands/admin/apps/create.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/create.js +84 -0
- package/dist/cli/commands/admin/apps/create.js.map +1 -0
- package/dist/cli/commands/admin/apps/delete.d.ts +15 -0
- package/dist/cli/commands/admin/apps/delete.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/delete.js +41 -0
- package/dist/cli/commands/admin/apps/delete.js.map +1 -0
- package/dist/cli/commands/admin/apps/index.d.ts +5 -0
- package/dist/cli/commands/admin/apps/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/index.js +14 -0
- package/dist/cli/commands/admin/apps/index.js.map +1 -0
- package/dist/cli/commands/admin/apps/list.d.ts +10 -0
- package/dist/cli/commands/admin/apps/list.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/list.js +26 -0
- package/dist/cli/commands/admin/apps/list.js.map +1 -0
- package/dist/cli/commands/admin/apps/rotate-secret.d.ts +17 -0
- package/dist/cli/commands/admin/apps/rotate-secret.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/rotate-secret.js +47 -0
- package/dist/cli/commands/admin/apps/rotate-secret.js.map +1 -0
- package/dist/cli/commands/admin/apps/update.d.ts +20 -0
- package/dist/cli/commands/admin/apps/update.d.ts.map +1 -0
- package/dist/cli/commands/admin/apps/update.js +71 -0
- package/dist/cli/commands/admin/apps/update.js.map +1 -0
- package/dist/cli/commands/admin/index.d.ts +5 -0
- package/dist/cli/commands/admin/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/index.js +13 -0
- package/dist/cli/commands/admin/index.js.map +1 -0
- package/dist/cli/commands/admin/migrate.d.ts +10 -0
- package/dist/cli/commands/admin/migrate.d.ts.map +1 -0
- package/dist/cli/commands/admin/migrate.js +20 -0
- package/dist/cli/commands/admin/migrate.js.map +1 -0
- package/dist/cli/commands/admin/realms/add.d.ts +13 -0
- package/dist/cli/commands/admin/realms/add.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/add.js +42 -0
- package/dist/cli/commands/admin/realms/add.js.map +1 -0
- package/dist/cli/commands/admin/realms/index.d.ts +5 -0
- package/dist/cli/commands/admin/realms/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/index.js +13 -0
- package/dist/cli/commands/admin/realms/index.js.map +1 -0
- package/dist/cli/commands/admin/realms/list.d.ts +14 -0
- package/dist/cli/commands/admin/realms/list.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/list.js +36 -0
- package/dist/cli/commands/admin/realms/list.js.map +1 -0
- package/dist/cli/commands/admin/realms/passkeys/index.d.ts +5 -0
- package/dist/cli/commands/admin/realms/passkeys/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/passkeys/index.js +13 -0
- package/dist/cli/commands/admin/realms/passkeys/index.js.map +1 -0
- package/dist/cli/commands/admin/realms/passkeys/set.d.ts +17 -0
- package/dist/cli/commands/admin/realms/passkeys/set.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/passkeys/set.js +46 -0
- package/dist/cli/commands/admin/realms/passkeys/set.js.map +1 -0
- package/dist/cli/commands/admin/realms/privy/index.d.ts +5 -0
- package/dist/cli/commands/admin/realms/privy/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/privy/index.js +13 -0
- package/dist/cli/commands/admin/realms/privy/index.js.map +1 -0
- package/dist/cli/commands/admin/realms/privy/set.d.ts +19 -0
- package/dist/cli/commands/admin/realms/privy/set.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/privy/set.js +66 -0
- package/dist/cli/commands/admin/realms/privy/set.js.map +1 -0
- package/dist/cli/commands/admin/realms/remove.d.ts +12 -0
- package/dist/cli/commands/admin/realms/remove.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/remove.js +35 -0
- package/dist/cli/commands/admin/realms/remove.js.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/disable.d.ts +16 -0
- package/dist/cli/commands/admin/realms/secp256k1/disable.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/disable.js +42 -0
- package/dist/cli/commands/admin/realms/secp256k1/disable.js.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/enable.d.ts +16 -0
- package/dist/cli/commands/admin/realms/secp256k1/enable.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/enable.js +42 -0
- package/dist/cli/commands/admin/realms/secp256k1/enable.js.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/index.d.ts +9 -0
- package/dist/cli/commands/admin/realms/secp256k1/index.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/secp256k1/index.js +17 -0
- package/dist/cli/commands/admin/realms/secp256k1/index.js.map +1 -0
- package/dist/cli/commands/admin/realms/set.d.ts +17 -0
- package/dist/cli/commands/admin/realms/set.d.ts.map +1 -0
- package/dist/cli/commands/admin/realms/set.js +46 -0
- package/dist/cli/commands/admin/realms/set.js.map +1 -0
- package/dist/cli/commands/admin/rotate-key.d.ts +16 -0
- package/dist/cli/commands/admin/rotate-key.d.ts.map +1 -0
- package/dist/cli/commands/admin/rotate-key.js +46 -0
- package/dist/cli/commands/admin/rotate-key.js.map +1 -0
- package/dist/cli/commands/init.d.ts +11 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +34 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/login.d.ts +12 -0
- package/dist/cli/commands/login.d.ts.map +1 -0
- package/dist/cli/commands/login.js +29 -0
- package/dist/cli/commands/login.js.map +1 -0
- package/dist/cli/commands/logout.d.ts +8 -0
- package/dist/cli/commands/logout.d.ts.map +1 -0
- package/dist/cli/commands/logout.js +19 -0
- package/dist/cli/commands/logout.js.map +1 -0
- package/dist/cli/commands/whoami.d.ts +12 -0
- package/dist/cli/commands/whoami.d.ts.map +1 -0
- package/dist/cli/commands/whoami.js +24 -0
- package/dist/cli/commands/whoami.js.map +1 -0
- package/dist/client/Actions.d.ts +108 -0
- package/dist/client/Actions.d.ts.map +1 -0
- package/dist/client/Actions.js +94 -0
- package/dist/client/Actions.js.map +1 -0
- package/dist/client/Auth.d.ts +143 -0
- package/dist/client/Auth.d.ts.map +1 -0
- package/dist/client/Auth.js +106 -0
- package/dist/client/Auth.js.map +1 -0
- package/dist/client/Authorization.d.ts +29 -0
- package/dist/client/Authorization.d.ts.map +1 -0
- package/dist/client/Authorization.js +12 -0
- package/dist/client/Authorization.js.map +1 -0
- package/dist/client/Decorator.d.ts +172 -0
- package/dist/client/Decorator.d.ts.map +1 -0
- package/dist/client/Decorator.js +241 -0
- package/dist/client/Decorator.js.map +1 -0
- package/dist/client/Key.d.ts +82 -0
- package/dist/client/Key.d.ts.map +1 -0
- package/dist/client/Key.js +81 -0
- package/dist/client/Key.js.map +1 -0
- package/dist/client/Pending.d.ts +38 -0
- package/dist/client/Pending.d.ts.map +1 -0
- package/dist/client/Pending.js +12 -0
- package/dist/client/Pending.js.map +1 -0
- package/dist/client/Permissions.d.ts +36 -0
- package/dist/client/Permissions.d.ts.map +1 -0
- package/dist/client/Permissions.js +16 -0
- package/dist/client/Permissions.js.map +1 -0
- package/dist/client/Storage.d.ts +27 -0
- package/dist/client/Storage.d.ts.map +1 -0
- package/dist/client/Storage.js +16 -0
- package/dist/client/Storage.js.map +1 -0
- package/dist/client/TempoAccount.d.ts +52 -0
- package/dist/client/TempoAccount.d.ts.map +1 -0
- package/dist/client/TempoAccount.js +17 -0
- package/dist/client/TempoAccount.js.map +1 -0
- package/dist/client/Tokens.d.ts +25 -0
- package/dist/client/Tokens.d.ts.map +1 -0
- package/dist/client/Tokens.js +12 -0
- package/dist/client/Tokens.js.map +1 -0
- package/dist/client/User.d.ts +21 -0
- package/dist/client/User.d.ts.map +1 -0
- package/dist/client/User.js +12 -0
- package/dist/client/User.js.map +1 -0
- package/dist/client/actions/account.d.ts +75 -0
- package/dist/client/actions/account.d.ts.map +1 -0
- package/dist/client/actions/account.js +102 -0
- package/dist/client/actions/account.js.map +1 -0
- package/dist/client/actions/device.d.ts +52 -0
- package/dist/client/actions/device.d.ts.map +1 -0
- package/dist/client/actions/device.js +103 -0
- package/dist/client/actions/device.js.map +1 -0
- package/dist/client/actions/email.d.ts +89 -0
- package/dist/client/actions/email.d.ts.map +1 -0
- package/dist/client/actions/email.js +86 -0
- package/dist/client/actions/email.js.map +1 -0
- package/dist/client/actions/oauth.d.ts +112 -0
- package/dist/client/actions/oauth.d.ts.map +1 -0
- package/dist/client/actions/oauth.js +103 -0
- package/dist/client/actions/oauth.js.map +1 -0
- package/dist/client/actions/passkey.d.ts +140 -0
- package/dist/client/actions/passkey.d.ts.map +1 -0
- package/dist/client/actions/passkey.js +170 -0
- package/dist/client/actions/passkey.js.map +1 -0
- package/dist/client/actions/realm.d.ts +25 -0
- package/dist/client/actions/realm.d.ts.map +1 -0
- package/dist/client/actions/realm.js +16 -0
- package/dist/client/actions/realm.js.map +1 -0
- package/dist/client/actions/redirect.d.ts +152 -0
- package/dist/client/actions/redirect.d.ts.map +1 -0
- package/dist/client/actions/redirect.js +311 -0
- package/dist/client/actions/redirect.js.map +1 -0
- package/dist/client/internal/accessKey.d.ts +21 -0
- package/dist/client/internal/accessKey.d.ts.map +1 -0
- package/dist/client/internal/accessKey.js +38 -0
- package/dist/client/internal/accessKey.js.map +1 -0
- package/dist/client/internal/account.d.ts +17 -0
- package/dist/client/internal/account.d.ts.map +1 -0
- package/dist/client/internal/account.js +3 -0
- package/dist/client/internal/account.js.map +1 -0
- package/dist/client/internal/api.d.ts +110 -0
- package/dist/client/internal/api.d.ts.map +1 -0
- package/dist/client/internal/api.js +136 -0
- package/dist/client/internal/api.js.map +1 -0
- package/dist/client/internal/headless.d.ts +159 -0
- package/dist/client/internal/headless.d.ts.map +1 -0
- package/dist/client/internal/headless.js +196 -0
- package/dist/client/internal/headless.js.map +1 -0
- package/dist/client/internal/indexedDb.d.ts +8 -0
- package/dist/client/internal/indexedDb.d.ts.map +1 -0
- package/dist/client/internal/indexedDb.js +32 -0
- package/dist/client/internal/indexedDb.js.map +1 -0
- package/dist/client/internal/request.d.ts +56 -0
- package/dist/client/internal/request.d.ts.map +1 -0
- package/dist/client/internal/request.js +44 -0
- package/dist/client/internal/request.js.map +1 -0
- package/dist/client/internal/store.d.ts +12 -0
- package/dist/client/internal/store.d.ts.map +1 -0
- package/dist/client/internal/store.js +15 -0
- package/dist/client/internal/store.js.map +1 -0
- package/dist/client/internal/verifier.d.ts +25 -0
- package/dist/client/internal/verifier.d.ts.map +1 -0
- package/dist/client/internal/verifier.js +52 -0
- package/dist/client/internal/verifier.js.map +1 -0
- package/dist/client.d.ts +18 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +18 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/Apps.d.ts +3169 -0
- package/dist/internal/Apps.d.ts.map +1 -0
- package/dist/internal/Apps.js +948 -0
- package/dist/internal/Apps.js.map +1 -0
- package/dist/internal/Auth.d.ts +4287 -0
- package/dist/internal/Auth.d.ts.map +1 -0
- package/dist/internal/Auth.js +185 -0
- package/dist/internal/Auth.js.map +1 -0
- package/dist/internal/Authorize.d.ts +526 -0
- package/dist/internal/Authorize.d.ts.map +1 -0
- package/dist/internal/Authorize.js +330 -0
- package/dist/internal/Authorize.js.map +1 -0
- package/dist/internal/Cache.d.ts +56 -0
- package/dist/internal/Cache.d.ts.map +1 -0
- package/dist/internal/Cache.js +65 -0
- package/dist/internal/Cache.js.map +1 -0
- package/dist/internal/Chain.d.ts +738 -0
- package/dist/internal/Chain.d.ts.map +1 -0
- package/dist/internal/Chain.js +65 -0
- package/dist/internal/Chain.js.map +1 -0
- package/dist/internal/ChainList.d.ts +117 -0
- package/dist/internal/ChainList.d.ts.map +1 -0
- package/dist/internal/ChainList.js +148 -0
- package/dist/internal/ChainList.js.map +1 -0
- package/dist/internal/ChainName.d.ts +11 -0
- package/dist/internal/ChainName.d.ts.map +1 -0
- package/dist/internal/ChainName.js +13 -0
- package/dist/internal/ChainName.js.map +1 -0
- package/dist/internal/CodeEmail.d.ts +38 -0
- package/dist/internal/CodeEmail.d.ts.map +1 -0
- package/dist/internal/CodeEmail.js +85 -0
- package/dist/internal/CodeEmail.js.map +1 -0
- package/dist/internal/ConfigurableAccount.d.ts +600 -0
- package/dist/internal/ConfigurableAccount.d.ts.map +1 -0
- package/dist/internal/ConfigurableAccount.js +795 -0
- package/dist/internal/ConfigurableAccount.js.map +1 -0
- package/dist/internal/Device.d.ts +246 -0
- package/dist/internal/Device.d.ts.map +1 -0
- package/dist/internal/Device.js +257 -0
- package/dist/internal/Device.js.map +1 -0
- package/dist/internal/Env.d.ts +97 -0
- package/dist/internal/Env.d.ts.map +1 -0
- package/dist/internal/Env.js +2 -0
- package/dist/internal/Env.js.map +1 -0
- package/dist/internal/ErrorResponse.d.ts +608 -0
- package/dist/internal/ErrorResponse.d.ts.map +1 -0
- package/dist/internal/ErrorResponse.js +701 -0
- package/dist/internal/ErrorResponse.js.map +1 -0
- package/dist/internal/Id.d.ts +10 -0
- package/dist/internal/Id.d.ts.map +1 -0
- package/dist/internal/Id.js +34 -0
- package/dist/internal/Id.js.map +1 -0
- package/dist/internal/KeyAuthorization.d.ts +1650 -0
- package/dist/internal/KeyAuthorization.d.ts.map +1 -0
- package/dist/internal/KeyAuthorization.js +1187 -0
- package/dist/internal/KeyAuthorization.js.map +1 -0
- package/dist/internal/Limits.d.ts +70 -0
- package/dist/internal/Limits.d.ts.map +1 -0
- package/dist/internal/Limits.js +36 -0
- package/dist/internal/Limits.js.map +1 -0
- package/dist/internal/Log.d.ts +34 -0
- package/dist/internal/Log.d.ts.map +1 -0
- package/dist/internal/Log.js +99 -0
- package/dist/internal/Log.js.map +1 -0
- package/dist/internal/LogLine.d.ts +29 -0
- package/dist/internal/LogLine.d.ts.map +1 -0
- package/dist/internal/LogLine.js +50 -0
- package/dist/internal/LogLine.js.map +1 -0
- package/dist/internal/Migrations.d.ts +28 -0
- package/dist/internal/Migrations.d.ts.map +1 -0
- package/dist/internal/Migrations.js +82 -0
- package/dist/internal/Migrations.js.map +1 -0
- package/dist/internal/Owner.d.ts +230 -0
- package/dist/internal/Owner.d.ts.map +1 -0
- package/dist/internal/Owner.js +101 -0
- package/dist/internal/Owner.js.map +1 -0
- package/dist/internal/Passkey.d.ts +901 -0
- package/dist/internal/Passkey.d.ts.map +1 -0
- package/dist/internal/Passkey.js +1185 -0
- package/dist/internal/Passkey.js.map +1 -0
- package/dist/internal/PendingKey.d.ts +49 -0
- package/dist/internal/PendingKey.d.ts.map +1 -0
- package/dist/internal/PendingKey.js +58 -0
- package/dist/internal/PendingKey.js.map +1 -0
- package/dist/internal/Privy.d.ts +138 -0
- package/dist/internal/Privy.d.ts.map +1 -0
- package/dist/internal/Privy.js +285 -0
- package/dist/internal/Privy.js.map +1 -0
- package/dist/internal/RateLimit.d.ts +218 -0
- package/dist/internal/RateLimit.d.ts.map +1 -0
- package/dist/internal/RateLimit.js +209 -0
- package/dist/internal/RateLimit.js.map +1 -0
- package/dist/internal/Realm.d.ts +290 -0
- package/dist/internal/Realm.d.ts.map +1 -0
- package/dist/internal/Realm.js +502 -0
- package/dist/internal/Realm.js.map +1 -0
- package/dist/internal/RequestId.d.ts +16 -0
- package/dist/internal/RequestId.d.ts.map +1 -0
- package/dist/internal/RequestId.js +78 -0
- package/dist/internal/RequestId.js.map +1 -0
- package/dist/internal/SigningKey.d.ts +126 -0
- package/dist/internal/SigningKey.d.ts.map +1 -0
- package/dist/internal/SigningKey.js +221 -0
- package/dist/internal/SigningKey.js.map +1 -0
- package/dist/internal/TempoAccount.d.ts +181 -0
- package/dist/internal/TempoAccount.d.ts.map +1 -0
- package/dist/internal/TempoAccount.js +369 -0
- package/dist/internal/TempoAccount.js.map +1 -0
- package/dist/internal/TestInbox.d.ts +42 -0
- package/dist/internal/TestInbox.d.ts.map +1 -0
- package/dist/internal/TestInbox.js +20 -0
- package/dist/internal/TestInbox.js.map +1 -0
- package/dist/internal/Timing.d.ts +52 -0
- package/dist/internal/Timing.d.ts.map +1 -0
- package/dist/internal/Timing.js +116 -0
- package/dist/internal/Timing.js.map +1 -0
- package/dist/internal/Validation.d.ts +52 -0
- package/dist/internal/Validation.d.ts.map +1 -0
- package/dist/internal/Validation.js +22 -0
- package/dist/internal/Validation.js.map +1 -0
- package/dist/internal/Verification.d.ts +24 -0
- package/dist/internal/Verification.d.ts.map +1 -0
- package/dist/internal/Verification.js +37 -0
- package/dist/internal/Verification.js.map +1 -0
- package/dist/internal/Wallet.d.ts +66 -0
- package/dist/internal/Wallet.d.ts.map +1 -0
- package/dist/internal/Wallet.js +59 -0
- package/dist/internal/Wallet.js.map +1 -0
- package/dist/internal/owners/Passkey.d.ts +9 -0
- package/dist/internal/owners/Passkey.d.ts.map +1 -0
- package/dist/internal/owners/Passkey.js +58 -0
- package/dist/internal/owners/Passkey.js.map +1 -0
- package/dist/internal/owners/Privy.d.ts +13 -0
- package/dist/internal/owners/Privy.d.ts.map +1 -0
- package/dist/internal/owners/Privy.js +59 -0
- package/dist/internal/owners/Privy.js.map +1 -0
- package/dist/internal/owners/Secp256k1.d.ts +12 -0
- package/dist/internal/owners/Secp256k1.d.ts.map +1 -0
- package/dist/internal/owners/Secp256k1.js +99 -0
- package/dist/internal/owners/Secp256k1.js.map +1 -0
- package/dist/worker.d.ts +18 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +18 -0
- package/dist/worker.js.map +1 -0
- package/package.json +83 -3
- package/src/Api.ts +157 -0
- package/src/App.ts +316 -0
- package/src/api/account.ts +2266 -0
- package/src/api/authenticate.ts +1662 -0
- package/src/api/authorize.ts +1086 -0
- package/src/api/device.ts +516 -0
- package/src/api/health.ts +72 -0
- package/src/api/lib/AccountStep.ts +485 -0
- package/src/api/lib/Auth.ts +164 -0
- package/src/api/lib/Configure.ts +921 -0
- package/src/api/lib/Consent.ts +388 -0
- package/src/api/lib/Cors.ts +160 -0
- package/src/api/lib/Database.ts +10 -0
- package/src/api/lib/DeviceRequest.ts +244 -0
- package/src/api/lib/FirstAccount.ts +136 -0
- package/src/api/lib/Headless.ts +616 -0
- package/src/api/lib/IsolateCache.ts +28 -0
- package/src/api/lib/KeySigner.ts +690 -0
- package/src/api/lib/PasskeyLink.ts +162 -0
- package/src/api/lib/Session.ts +64 -0
- package/src/api/lib/SignInConsent.ts +393 -0
- package/src/api/oauth.ts +1796 -0
- package/src/app/components/CodeInput.tsx +153 -0
- package/src/app/components/DevTools.tsx +1071 -0
- package/src/app/components/Grant.tsx +476 -0
- package/src/app/components/icons/BRLA.png +0 -0
- package/src/app/components/icons/BRZ.svg +1 -0
- package/src/app/components/icons/CHFAU.png +0 -0
- package/src/app/components/icons/DLUSD.png +0 -0
- package/src/app/components/icons/EURAU.svg +1 -0
- package/src/app/components/icons/EURC.e.svg +1 -0
- package/src/app/components/icons/GBPA.svg +4 -0
- package/src/app/components/icons/GUSD.svg +1 -0
- package/src/app/components/icons/MACH.svg +4 -0
- package/src/app/components/icons/OUSD.svg +5 -0
- package/src/app/components/icons/PRIME.svg +14 -0
- package/src/app/components/icons/SBC.svg +1 -0
- package/src/app/components/icons/SEKAU.svg +5 -0
- package/src/app/components/icons/USD1.svg +30 -0
- package/src/app/components/icons/USDB.svg +11 -0
- package/src/app/components/icons/USDC.e.svg +1 -0
- package/src/app/components/icons/USDT0.svg +1 -0
- package/src/app/components/icons/USDY.svg +16 -0
- package/src/app/components/icons/USDe.svg +1 -0
- package/src/app/components/icons/YLDS.svg +3 -0
- package/src/app/components/icons/alphaUSD.svg +1 -0
- package/src/app/components/icons/betaUSD.svg +1 -0
- package/src/app/components/icons/cUSD.svg +1 -0
- package/src/app/components/icons/cbBTC.svg +1 -0
- package/src/app/components/icons/frxUSD.svg +1 -0
- package/src/app/components/icons/goUSD.svg +5 -0
- package/src/app/components/icons/iUSD.svg +1 -0
- package/src/app/components/icons/pathUSD.svg +25 -0
- package/src/app/components/icons/rUSD.svg +1 -0
- package/src/app/components/icons/reUSD.svg +1 -0
- package/src/app/components/icons/sUSDe.svg +1 -0
- package/src/app/components/icons/siUSD.svg +1 -0
- package/src/app/components/icons/stcUSD.svg +1 -0
- package/src/app/components/icons/syrupUSDC.svg +5 -0
- package/src/app/components/icons/thetaUSD.svg +1 -0
- package/src/app/components/icons/wYLDS.svg +10 -0
- package/src/app/components/icons/wsrUSD.svg +1 -0
- package/src/app/components/logos/OUSD.dark.svg +17 -0
- package/src/app/components/logos/OUSD.light.svg +17 -0
- package/src/app/coverage.server.ts +73 -0
- package/src/app/coverage.ts +69 -0
- package/src/app/crons/cleanup.ts +104 -0
- package/src/app/db/auth.ts +440 -0
- package/src/app/db/migrations/0000_better_auth.sql +53 -0
- package/src/app/db/migrations/0001_oauth_provider.sql +162 -0
- package/src/app/db/migrations/0002_device_code.sql +17 -0
- package/src/app/db/migrations/0003_realms.sql +27 -0
- package/src/app/db/migrations/0004_default_realm.sql +2 -0
- package/src/app/db/migrations/0005_passkeys.sql +30 -0
- package/src/app/db/migrations/0006_first_accounts.sql +9 -0
- package/src/app/db/migrations/0007_pending_keys.sql +13 -0
- package/src/app/db/migrations/0008_secp256k1_owners.sql +18 -0
- package/src/app/db/migrations/0009_device_requests.sql +8 -0
- package/src/app/db/migrations/0010_device_keys.sql +4 -0
- package/src/app/db/migrations/0011_registered_passkeys.sql +2 -0
- package/src/app/db/migrations/0012_passkey_accounts.sql +7 -0
- package/src/app/db/migrations/0013_first_party_apps.sql +4 -0
- package/src/app/db/migrations/0014_logout_revokes_tokens.sql +17 -0
- package/src/app/db/migrations/0015_expiry_indexes.sql +9 -0
- package/src/app/db/migrations/0016_configurable_accounts.sql +15 -0
- package/src/app/db/migrations/0017_account_config_keys.sql +3 -0
- package/src/app/db/migrations/0018_better_auth_1_8.sql +9 -0
- package/src/app/db/migrations/0019_drop_provider_account_index.sql +1 -0
- package/src/app/db/migrations/meta/0000_snapshot.json +362 -0
- package/src/app/db/migrations/meta/0001_snapshot.json +1487 -0
- package/src/app/db/migrations/meta/0002_snapshot.json +1603 -0
- package/src/app/db/migrations/meta/0003_snapshot.json +1760 -0
- package/src/app/db/migrations/meta/0004_snapshot.json +1760 -0
- package/src/app/db/migrations/meta/0005_snapshot.json +1911 -0
- package/src/app/db/migrations/meta/0006_snapshot.json +1967 -0
- package/src/app/db/migrations/meta/0007_snapshot.json +2047 -0
- package/src/app/db/migrations/meta/0008_snapshot.json +2157 -0
- package/src/app/db/migrations/meta/0009_snapshot.json +2207 -0
- package/src/app/db/migrations/meta/0010_snapshot.json +2231 -0
- package/src/app/db/migrations/meta/0011_snapshot.json +2231 -0
- package/src/app/db/migrations/meta/0012_snapshot.json +2231 -0
- package/src/app/db/migrations/meta/0013_snapshot.json +2231 -0
- package/src/app/db/migrations/meta/0014_snapshot.json +2231 -0
- package/src/app/db/migrations/meta/0015_snapshot.json +2375 -0
- package/src/app/db/migrations/meta/0016_snapshot.json +2475 -0
- package/src/app/db/migrations/meta/0017_snapshot.json +2481 -0
- package/src/app/db/migrations/meta/0018_snapshot.json +2535 -0
- package/src/app/db/migrations/meta/0019_snapshot.json +2514 -0
- package/src/app/db/migrations/meta/_journal.json +146 -0
- package/src/app/db/schema.ts +241 -0
- package/src/app/db/table.ts +31 -0
- package/src/app/env.ts +57 -0
- package/src/app/inbox.ts +190 -0
- package/src/app/lib/Client.ts +82 -0
- package/src/app/lib/Inbox.ts +11 -0
- package/src/app/lib/Loader.ts +21 -0
- package/src/app/lib/Upgrade.ts +221 -0
- package/src/app/package.json +8 -0
- package/src/app/public/_headers +4 -0
- package/src/app/routeTree.gen.ts +219 -0
- package/src/app/router.tsx +47 -0
- package/src/app/routes/[_].flows.tsx +4254 -0
- package/src/app/routes/__root.tsx +172 -0
- package/src/app/routes/authorize.tsx +379 -0
- package/src/app/routes/choose-account.tsx +144 -0
- package/src/app/routes/deposit.tsx +107 -0
- package/src/app/routes/device.tsx +273 -0
- package/src/app/routes/error.tsx +62 -0
- package/src/app/routes/index.tsx +511 -0
- package/src/app/routes/login.tsx +577 -0
- package/src/app/screens/Account.tsx +559 -0
- package/src/app/screens/Approval.tsx +444 -0
- package/src/app/screens/ChooseAccount.tsx +206 -0
- package/src/app/screens/Deposit.tsx +523 -0
- package/src/app/screens/DeviceApproval.tsx +500 -0
- package/src/app/screens/NotFound.tsx +62 -0
- package/src/app/screens/SignIn.tsx +372 -0
- package/src/app/screens/WalletUpgrade.tsx +121 -0
- package/src/app/screens/chains/base.svg +3 -0
- package/src/app/screens/chains/ethereum.svg +11 -0
- package/src/app/screens/chains/solana.svg +4 -0
- package/src/app/screens/chains/tempo.svg +4 -0
- package/src/app/server.ts +342 -0
- package/src/app/vite.config.ts +128 -0
- package/src/app/void.config.ts +36 -0
- package/src/app/wallet.ts +69 -0
- package/src/app/zyzz.config.ts +52 -0
- package/src/cli/Admin.ts +74 -0
- package/src/cli/Apps.ts +27 -0
- package/src/cli/Cli.ts +41 -0
- package/src/cli/Project.ts +119 -0
- package/src/cli/Realms.ts +49 -0
- package/src/cli/Session.ts +290 -0
- package/src/cli/User.ts +40 -0
- package/src/cli/V1.ts +54 -0
- package/src/cli/bin.ts +44 -0
- package/src/cli/commands/admin/apps/create.ts +96 -0
- package/src/cli/commands/admin/apps/delete.ts +38 -0
- package/src/cli/commands/admin/apps/index.ts +15 -0
- package/src/cli/commands/admin/apps/list.ts +25 -0
- package/src/cli/commands/admin/apps/rotate-secret.ts +47 -0
- package/src/cli/commands/admin/apps/update.ts +79 -0
- package/src/cli/commands/admin/index.ts +14 -0
- package/src/cli/commands/admin/migrate.ts +19 -0
- package/src/cli/commands/admin/realms/add.ts +40 -0
- package/src/cli/commands/admin/realms/index.ts +14 -0
- package/src/cli/commands/admin/realms/list.ts +38 -0
- package/src/cli/commands/admin/realms/passkeys/index.ts +15 -0
- package/src/cli/commands/admin/realms/passkeys/set.ts +44 -0
- package/src/cli/commands/admin/realms/privy/index.ts +14 -0
- package/src/cli/commands/admin/realms/privy/set.ts +69 -0
- package/src/cli/commands/admin/realms/remove.ts +33 -0
- package/src/cli/commands/admin/realms/secp256k1/disable.ts +40 -0
- package/src/cli/commands/admin/realms/secp256k1/enable.ts +40 -0
- package/src/cli/commands/admin/realms/secp256k1/index.ts +19 -0
- package/src/cli/commands/admin/realms/set.ts +46 -0
- package/src/cli/commands/admin/rotate-key.ts +47 -0
- package/src/cli/commands/init.ts +42 -0
- package/src/cli/commands/login.ts +32 -0
- package/src/cli/commands/logout.ts +19 -0
- package/src/cli/commands/whoami.ts +23 -0
- package/src/client/Actions.ts +180 -0
- package/src/client/Auth.ts +267 -0
- package/src/client/Authorization.ts +34 -0
- package/src/client/Decorator.ts +444 -0
- package/src/client/Key.ts +137 -0
- package/src/client/Pending.ts +45 -0
- package/src/client/Permissions.ts +41 -0
- package/src/client/Storage.ts +29 -0
- package/src/client/TempoAccount.ts +55 -0
- package/src/client/Tokens.ts +27 -0
- package/src/client/User.ts +23 -0
- package/src/client/actions/account.ts +171 -0
- package/src/client/actions/device.ts +166 -0
- package/src/client/actions/email.ts +164 -0
- package/src/client/actions/oauth.ts +179 -0
- package/src/client/actions/passkey.ts +333 -0
- package/src/client/actions/realm.ts +37 -0
- package/src/client/actions/redirect.ts +502 -0
- package/src/client/internal/accessKey.ts +54 -0
- package/src/client/internal/account.ts +18 -0
- package/src/client/internal/api.ts +242 -0
- package/src/client/internal/headless.ts +308 -0
- package/src/client/internal/indexedDb.ts +44 -0
- package/src/client/internal/request.ts +70 -0
- package/src/client/internal/store.ts +20 -0
- package/src/client/internal/verifier.ts +75 -0
- package/src/client.ts +17 -0
- package/src/index.ts +5 -0
- package/src/internal/Apps.ts +1283 -0
- package/src/internal/Auth.ts +273 -0
- package/src/internal/Authorize.ts +433 -0
- package/src/internal/Balance.ts +144 -0
- package/src/internal/BodyLimit.ts +31 -0
- package/src/internal/Cache.ts +119 -0
- package/src/internal/Chain.ts +99 -0
- package/src/internal/ChainList.ts +270 -0
- package/src/internal/ChainName.ts +14 -0
- package/src/internal/ChainStatus.ts +65 -0
- package/src/internal/CodeEmail.ts +138 -0
- package/src/internal/ConfigurableAccount.ts +1315 -0
- package/src/internal/Device.ts +471 -0
- package/src/internal/Env.ts +92 -0
- package/src/internal/ErrorResponse.ts +896 -0
- package/src/internal/Faucet.ts +43 -0
- package/src/internal/Id.ts +41 -0
- package/src/internal/KeyAuthorization.ts +1536 -0
- package/src/internal/Limits.ts +40 -0
- package/src/internal/Log.ts +166 -0
- package/src/internal/LogLine.ts +81 -0
- package/src/internal/Logout.ts +356 -0
- package/src/internal/Migrations.ts +120 -0
- package/src/internal/OpenApi.ts +300 -0
- package/src/internal/Owner.ts +310 -0
- package/src/internal/Passkey.ts +1904 -0
- package/src/internal/PendingKey.ts +104 -0
- package/src/internal/Privy.ts +536 -0
- package/src/internal/RateLimit.ts +346 -0
- package/src/internal/Realm.ts +814 -0
- package/src/internal/RequestId.ts +118 -0
- package/src/internal/SignInGrant.ts +175 -0
- package/src/internal/SigningKey.ts +319 -0
- package/src/internal/TempoAccount.ts +545 -0
- package/src/internal/TestInbox.ts +51 -0
- package/src/internal/Timing.ts +172 -0
- package/src/internal/Validation.ts +52 -0
- package/src/internal/Verification.ts +58 -0
- package/src/internal/Wallet.ts +101 -0
- package/src/internal/owners/Passkey.ts +76 -0
- package/src/internal/owners/Privy.ts +82 -0
- package/src/internal/owners/Secp256k1.ts +139 -0
- package/src/types/app.d.ts +39 -0
- package/src/worker.ts +17 -0
|
@@ -0,0 +1,1185 @@
|
|
|
1
|
+
import { createAuthEndpoint } from 'better-auth/api';
|
|
2
|
+
import { setSessionCookie } from 'better-auth/cookies';
|
|
3
|
+
import { symmetricDecrypt, symmetricEncrypt } from 'better-auth/crypto';
|
|
4
|
+
import { and, asc, eq, gt, inArray, isNotNull, sql } from 'drizzle-orm';
|
|
5
|
+
import { Address, Base64, Hash, Hex, P256, PublicKey } from 'ox';
|
|
6
|
+
import { Authentication, Registration } from 'webauthx/server';
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import * as Schema from '../app/db/schema.js';
|
|
9
|
+
import * as Authorize from './Authorize.js';
|
|
10
|
+
import * as ErrorResponse from './ErrorResponse.js';
|
|
11
|
+
import * as KeyAuthorization from './KeyAuthorization.js';
|
|
12
|
+
import * as Owner from './Owner.js';
|
|
13
|
+
import * as Verification from './Verification.js';
|
|
14
|
+
/** The user holds {@link registrationLimit} registered passkeys, so Tempo ID registers no other. */
|
|
15
|
+
export class LimitError extends ErrorResponse.define('passkey_limit') {
|
|
16
|
+
name = 'Passkey.LimitError';
|
|
17
|
+
constructor() {
|
|
18
|
+
super({
|
|
19
|
+
error_description: `Passkey limit reached: the user holds ${registrationLimit} registered passkeys, the most that Tempo ID registers. Sign in with one of them.`,
|
|
20
|
+
meta: { limit: registrationLimit },
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The email step's link to a wallet.tempo passkey expired, or the browser holds no link cookie for it.
|
|
26
|
+
* The refusal comes before the code is checked, so the code stays valid for a sign-in without the
|
|
27
|
+
* passkey.
|
|
28
|
+
*/
|
|
29
|
+
export class LinkExpiredError extends ErrorResponse.define('passkey_link_expired') {
|
|
30
|
+
name = 'Passkey.LinkExpiredError';
|
|
31
|
+
constructor() {
|
|
32
|
+
super({
|
|
33
|
+
error_description: 'Expired passkey sign-in: the link from the passkey step is no longer valid. Enter the code again to sign in with email only, or sign in with the passkey again.',
|
|
34
|
+
field: 'link',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A passkey sign-in names an app, or reaches a realm, that holds no passkeys for Tempo ID, or no
|
|
40
|
+
* passkeys whose relying party covers the app's page.
|
|
41
|
+
*/
|
|
42
|
+
export class NotPermittedError extends ErrorResponse.define('passkey_not_permitted') {
|
|
43
|
+
name = 'Passkey.NotPermittedError';
|
|
44
|
+
constructor(options = {}) {
|
|
45
|
+
const { clientId, origin } = options;
|
|
46
|
+
super((() => {
|
|
47
|
+
if (clientId && origin)
|
|
48
|
+
return {
|
|
49
|
+
error_description: `Passkey not permitted: no realm of the app ${clientId} holds passkeys for ${origin}. Sign in with an emailed code.`,
|
|
50
|
+
meta: { client_id: clientId, origin },
|
|
51
|
+
};
|
|
52
|
+
if (clientId)
|
|
53
|
+
return {
|
|
54
|
+
error_description: `Passkey not permitted: the app ${clientId} holds no passkeys. Sign in with an emailed code.`,
|
|
55
|
+
meta: { client_id: clientId },
|
|
56
|
+
};
|
|
57
|
+
return {
|
|
58
|
+
error_description: 'Passkey not permitted: no realm holds passkeys for this sign-in. Sign in with an emailed code.',
|
|
59
|
+
};
|
|
60
|
+
})());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* A passkey registration comes from a session that signed in more than {@link registrationFreshness}
|
|
65
|
+
* seconds before. A session alone, such as one left open in a shared browser, thus adds no passkey.
|
|
66
|
+
*/
|
|
67
|
+
export class ReauthenticationRequiredError extends ErrorResponse.define('reauthentication_required') {
|
|
68
|
+
name = 'Passkey.ReauthenticationRequiredError';
|
|
69
|
+
constructor() {
|
|
70
|
+
super({
|
|
71
|
+
error_description: `Sign in again: adding a passkey needs a sign-in within the last ${registrationFreshness / 60} minutes.`,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A passkey ceremony failed: its challenge is unknown, spent, or expired, or the response does not
|
|
77
|
+
* verify. One refusal covers every case, so it reveals neither which check failed nor whether a
|
|
78
|
+
* credential exists.
|
|
79
|
+
*/
|
|
80
|
+
export class WebAuthnRejectedError extends ErrorResponse.define('webauthn_rejected') {
|
|
81
|
+
name = 'Passkey.WebAuthnRejectedError';
|
|
82
|
+
constructor() {
|
|
83
|
+
super({
|
|
84
|
+
error_description: 'Passkey rejected. Request new options, then try again with the same passkey or another one.',
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** Seconds a challenge lasts. */
|
|
89
|
+
export const lifetime = 5 * 60;
|
|
90
|
+
/** Seconds a deferred link lasts. */
|
|
91
|
+
export const linkLifetime = 5 * 60;
|
|
92
|
+
/** The prefix of a challenge's `verification` identifier, which its hex value follows. */
|
|
93
|
+
const prefix = 'passkey-challenge:';
|
|
94
|
+
/**
|
|
95
|
+
* The prefix of a proof challenge's `verification` identifier, which the user's ID and the
|
|
96
|
+
* challenge follow.
|
|
97
|
+
*/
|
|
98
|
+
const proofPrefix = 'passkey-registration-proof:';
|
|
99
|
+
/**
|
|
100
|
+
* Seconds after its sign-in that a session can register a passkey. A later registration requires a
|
|
101
|
+
* new sign-in.
|
|
102
|
+
*/
|
|
103
|
+
export const registrationFreshness = 10 * 60;
|
|
104
|
+
/**
|
|
105
|
+
* The most passkeys that a user registers. Each owns an account that every account read lists, so
|
|
106
|
+
* the limit bounds the reads.
|
|
107
|
+
*/
|
|
108
|
+
export const registrationLimit = 10;
|
|
109
|
+
/**
|
|
110
|
+
* The prefix of a registration challenge's `verification` identifier, which the user's ID and the
|
|
111
|
+
* challenge follow. It differs from {@link prefix} and {@link proofPrefix}, so a sign-in or a proof
|
|
112
|
+
* never spends a registration challenge.
|
|
113
|
+
*/
|
|
114
|
+
const registrationPrefix = 'passkey-registration:';
|
|
115
|
+
/**
|
|
116
|
+
* The prefix of a signature challenge's `verification` identifier, which {@link signatureIdentifier}
|
|
117
|
+
* completes. It differs from {@link prefix}, so a sign-in never spends a signature challenge.
|
|
118
|
+
*/
|
|
119
|
+
const signaturePrefix = 'passkey-signature:';
|
|
120
|
+
/**
|
|
121
|
+
* The longest a spent signature's record lasts, in seconds: a year, the longest a headless key
|
|
122
|
+
* lasts. A redirect's key can name a much later expiry, so the record does not follow it, and each
|
|
123
|
+
* user's approvals add rows that the cleanup cron removes within the year.
|
|
124
|
+
*/
|
|
125
|
+
const spentLifetime = KeyAuthorization.lifetime;
|
|
126
|
+
/**
|
|
127
|
+
* The prefix of a spent signature's `verification` identifier, which the SHA-256 digest of the
|
|
128
|
+
* assertion's authenticator data and signature follows.
|
|
129
|
+
*/
|
|
130
|
+
const spentPrefix = 'passkey-signature-spent:';
|
|
131
|
+
/**
|
|
132
|
+
* The prefix of the `verification` identifier of an assertion that a sign-in with key signature
|
|
133
|
+
* spent, which the same digest as {@link spentPrefix} follows.
|
|
134
|
+
*/
|
|
135
|
+
const spentSignInPrefix = 'passkey-sign-in-spent:';
|
|
136
|
+
/** Whether the isolate built the curve's table of base point multiples, which {@link table} builds. */
|
|
137
|
+
let tabled = false;
|
|
138
|
+
/** Zod schemas for passkey ceremonies. */
|
|
139
|
+
export var schema;
|
|
140
|
+
(function (schema) {
|
|
141
|
+
const base64url = z.string().regex(/^[A-Za-z0-9_-]+$/);
|
|
142
|
+
const hex = z.templateLiteral(['0x', z.string().regex(/^[0-9a-fA-F]*$/)]);
|
|
143
|
+
/**
|
|
144
|
+
* A credential ID in canonical unpadded base64url, of at most 1,023 bytes, as WebAuthn bounds it:
|
|
145
|
+
* 1,364 characters.
|
|
146
|
+
*/
|
|
147
|
+
schema.credentialId = base64url.min(1).max(1364);
|
|
148
|
+
/** A passkey assertion, as `webauthx/client`'s `Authentication.sign` serializes it. */
|
|
149
|
+
schema.assertion = z
|
|
150
|
+
.object({
|
|
151
|
+
id: schema.credentialId.meta({
|
|
152
|
+
description: 'The credential ID of the passkey that signed, base64url.',
|
|
153
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
154
|
+
}),
|
|
155
|
+
metadata: z
|
|
156
|
+
.object({
|
|
157
|
+
authenticatorData: hex.meta({
|
|
158
|
+
description: 'The authenticator data the passkey signed, as hex: the relying party ID hash, flags, and signature counter.',
|
|
159
|
+
examples: [
|
|
160
|
+
'0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000',
|
|
161
|
+
],
|
|
162
|
+
}),
|
|
163
|
+
challengeIndex: z
|
|
164
|
+
.number()
|
|
165
|
+
.int()
|
|
166
|
+
.nonnegative()
|
|
167
|
+
.optional()
|
|
168
|
+
.meta({
|
|
169
|
+
description: 'The character offset of `"challenge"` in `clientDataJSON`. Absent, verification searches for it.',
|
|
170
|
+
examples: [23],
|
|
171
|
+
}),
|
|
172
|
+
clientDataJSON: z
|
|
173
|
+
.string()
|
|
174
|
+
.max(4096)
|
|
175
|
+
.meta({
|
|
176
|
+
description: 'The client data the browser collected, as a JSON string, which holds the type, challenge, and origin.',
|
|
177
|
+
examples: [
|
|
178
|
+
'{"type":"webauthn.get","challenge":"9jEFijuhEWrM4SOW-tChJbUEHEP44VcjcJ-Bqo1fTM8","origin":"https://id.tempo.xyz","crossOrigin":false}',
|
|
179
|
+
],
|
|
180
|
+
}),
|
|
181
|
+
typeIndex: z
|
|
182
|
+
.number()
|
|
183
|
+
.int()
|
|
184
|
+
.nonnegative()
|
|
185
|
+
.optional()
|
|
186
|
+
.meta({
|
|
187
|
+
description: 'The character offset of `"type"` in `clientDataJSON`. Absent, verification searches for it.',
|
|
188
|
+
examples: [1],
|
|
189
|
+
}),
|
|
190
|
+
userVerificationRequired: z
|
|
191
|
+
.boolean()
|
|
192
|
+
.optional()
|
|
193
|
+
.meta({
|
|
194
|
+
description: 'Whether the client required user verification. Verification ignores it and always requires user verification.',
|
|
195
|
+
examples: [true],
|
|
196
|
+
}),
|
|
197
|
+
})
|
|
198
|
+
.meta({
|
|
199
|
+
description: 'The signed data that verification reads with `signature`, decoded from the browser response.',
|
|
200
|
+
}),
|
|
201
|
+
raw: z
|
|
202
|
+
.object({
|
|
203
|
+
authenticatorAttachment: z
|
|
204
|
+
.string()
|
|
205
|
+
.nullable()
|
|
206
|
+
.default(null)
|
|
207
|
+
.meta({
|
|
208
|
+
description: 'How the authenticator attaches to the client, such as `platform` or `cross-platform`. Defaults to `null` when the browser reports none.',
|
|
209
|
+
examples: ['platform'],
|
|
210
|
+
}),
|
|
211
|
+
id: base64url.meta({
|
|
212
|
+
description: 'The credential ID, base64url, as the browser returns it.',
|
|
213
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
214
|
+
}),
|
|
215
|
+
rawId: base64url.meta({
|
|
216
|
+
description: 'The bytes of the credential ID, base64url.',
|
|
217
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
218
|
+
}),
|
|
219
|
+
// Verification reads the top-level `metadata` and `signature`, so other fields are dropped.
|
|
220
|
+
response: z
|
|
221
|
+
.object({
|
|
222
|
+
clientDataJSON: base64url.meta({
|
|
223
|
+
description: 'The client data JSON, base64url.',
|
|
224
|
+
examples: [
|
|
225
|
+
'eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiOWpFRmlqdWhFV3JNNFNPVy10Q2hKYlVFSEVQNDRWY2pjSi1CcW8xZlRNOCIsIm9yaWdpbiI6Imh0dHBzOi8vaWQudGVtcG8ueHl6IiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ',
|
|
226
|
+
],
|
|
227
|
+
}),
|
|
228
|
+
})
|
|
229
|
+
.meta({
|
|
230
|
+
description: "The authenticator's response. Verification keeps only `clientDataJSON` and drops other fields.",
|
|
231
|
+
}),
|
|
232
|
+
type: z.string().meta({
|
|
233
|
+
description: 'The credential type.',
|
|
234
|
+
examples: ['public-key'],
|
|
235
|
+
}),
|
|
236
|
+
})
|
|
237
|
+
.meta({
|
|
238
|
+
description: 'The `PublicKeyCredential` that `navigator.credentials.get()` returns, serialized as JSON.',
|
|
239
|
+
}),
|
|
240
|
+
signature: hex.meta({
|
|
241
|
+
description: 'The P-256 signature over the authenticator data and the client data hash, as 64-byte hex: `r` then `s`.',
|
|
242
|
+
examples: [
|
|
243
|
+
'0x6c3f1e0a9b7d24f58e1c3a6b9d0f2e4a7c5b8d1e3f6a9c2b4d7e0f1a3c5b8d9e1f2a7c4b6d8e0f3a5c7b9d1e4f6a8c0b2d5e7f9a1c3b6d8e0f2a4c7b9d1e3f5a',
|
|
244
|
+
],
|
|
245
|
+
}),
|
|
246
|
+
})
|
|
247
|
+
.meta({
|
|
248
|
+
description: 'The assertion, serialized as `webauthx/client` returns it.',
|
|
249
|
+
id: 'PasskeyAssertion',
|
|
250
|
+
});
|
|
251
|
+
/** The client data fields that `take` and `verify` read. */
|
|
252
|
+
schema.clientData = z.object({
|
|
253
|
+
challenge: base64url,
|
|
254
|
+
crossOrigin: z.boolean().optional(),
|
|
255
|
+
});
|
|
256
|
+
/** A registration credential, as `webauthx/client`'s `Registration.create` serializes it. */
|
|
257
|
+
schema.credential = z
|
|
258
|
+
.object({
|
|
259
|
+
attestationObject: base64url.max(16384).meta({
|
|
260
|
+
description: "The authenticator's attestation object, base64url, which holds the new public key.",
|
|
261
|
+
examples: ['o2NmbXRkbm9uZWdhdHRTdG10oGhhdXRoRGF0YVjF'],
|
|
262
|
+
}),
|
|
263
|
+
clientDataJSON: base64url.max(4096).meta({
|
|
264
|
+
description: 'The client data the browser collected, base64url, which holds the type, challenge, and origin.',
|
|
265
|
+
examples: [
|
|
266
|
+
'eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiOWpFRmlqdWhFV3JNNFNPVy10Q2hKYlVFSEVQNDRWY2pjSi1CcW8xZlRNOCIsIm9yaWdpbiI6Imh0dHBzOi8vaWQudGVtcG8ueHl6IiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ',
|
|
267
|
+
],
|
|
268
|
+
}),
|
|
269
|
+
id: schema.credentialId.meta({
|
|
270
|
+
description: 'The credential ID of the new passkey, base64url.',
|
|
271
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
272
|
+
}),
|
|
273
|
+
// Verification reads the public key from the attestation object, never this copy.
|
|
274
|
+
publicKey: z
|
|
275
|
+
.templateLiteral(['0x', z.string().regex(/^04[0-9a-fA-F]{128}$/)])
|
|
276
|
+
.meta({
|
|
277
|
+
description: "The new passkey's uncompressed P256 public key, as hex. Verification reads the key from `attestationObject` and ignores this copy.",
|
|
278
|
+
examples: [
|
|
279
|
+
'0x04f6310589abb21116acc6e123967ed0a125b5041c43f8e157237093e07eaa354c6c3f1e0a9b7d24f58e1c3a6b9d0f2e4a7c5b8d1e3f6a9c2b4d7e0f1a3c5b8d',
|
|
280
|
+
],
|
|
281
|
+
}),
|
|
282
|
+
raw: z
|
|
283
|
+
.object({
|
|
284
|
+
authenticatorAttachment: z
|
|
285
|
+
.string()
|
|
286
|
+
.nullable()
|
|
287
|
+
.default(null)
|
|
288
|
+
.meta({
|
|
289
|
+
description: 'How the authenticator attaches to the client, such as `platform` or `cross-platform`. Defaults to `null` when the browser reports none.',
|
|
290
|
+
examples: ['platform'],
|
|
291
|
+
}),
|
|
292
|
+
id: base64url.max(1364).meta({
|
|
293
|
+
description: 'The credential ID, base64url, as the browser returns it.',
|
|
294
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
295
|
+
}),
|
|
296
|
+
rawId: base64url.max(1364).meta({
|
|
297
|
+
description: 'The bytes of the credential ID, base64url.',
|
|
298
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
299
|
+
}),
|
|
300
|
+
// Verification reads the top-level `attestationObject` and `clientDataJSON`, so the
|
|
301
|
+
// response's other fields are dropped.
|
|
302
|
+
response: z
|
|
303
|
+
.object({
|
|
304
|
+
clientDataJSON: base64url.max(4096).meta({
|
|
305
|
+
description: 'The client data JSON, base64url.',
|
|
306
|
+
examples: [
|
|
307
|
+
'eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiOWpFRmlqdWhFV3JNNFNPVy10Q2hKYlVFSEVQNDRWY2pjSi1CcW8xZlRNOCIsIm9yaWdpbiI6Imh0dHBzOi8vaWQudGVtcG8ueHl6IiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ',
|
|
308
|
+
],
|
|
309
|
+
}),
|
|
310
|
+
})
|
|
311
|
+
.meta({
|
|
312
|
+
description: "The authenticator's response. Verification keeps only `clientDataJSON`, and reads the top-level `attestationObject`.",
|
|
313
|
+
}),
|
|
314
|
+
type: z
|
|
315
|
+
.string()
|
|
316
|
+
.max(32)
|
|
317
|
+
.meta({
|
|
318
|
+
description: 'The credential type.',
|
|
319
|
+
examples: ['public-key'],
|
|
320
|
+
}),
|
|
321
|
+
})
|
|
322
|
+
.meta({
|
|
323
|
+
description: 'The `PublicKeyCredential` that `navigator.credentials.create()` returns, serialized as JSON.',
|
|
324
|
+
}),
|
|
325
|
+
})
|
|
326
|
+
.meta({
|
|
327
|
+
description: 'The new passkey, serialized as `webauthx/client` returns it.',
|
|
328
|
+
id: 'PasskeyCredential',
|
|
329
|
+
});
|
|
330
|
+
/** A deferred link, as `seal` encrypts it. */
|
|
331
|
+
schema.link = z.object({
|
|
332
|
+
address: z.string(),
|
|
333
|
+
createdAt: z.number().nullable(),
|
|
334
|
+
/** When the link expires, in seconds. */
|
|
335
|
+
expiresAt: z.number(),
|
|
336
|
+
/** The host that sealed it. Another host that shares the secret does not accept it. */
|
|
337
|
+
host: z.string(),
|
|
338
|
+
id: z.string(),
|
|
339
|
+
/** The value that the email step carries, which the emailed-code sign-in sends back. */
|
|
340
|
+
nonce: z.string(),
|
|
341
|
+
publicKey: z.templateLiteral(['0x', z.string()]),
|
|
342
|
+
rpId: z.string(),
|
|
343
|
+
});
|
|
344
|
+
/** A proof challenge's `verification` value. */
|
|
345
|
+
schema.proof = z.object({
|
|
346
|
+
id: z.string(),
|
|
347
|
+
publicKey: hex,
|
|
348
|
+
rpId: z.string(),
|
|
349
|
+
});
|
|
350
|
+
/** A registration challenge's `verification` value. */
|
|
351
|
+
schema.registration = z.object({
|
|
352
|
+
rpId: z.string(),
|
|
353
|
+
});
|
|
354
|
+
/** A signature challenge's `verification` value. */
|
|
355
|
+
schema.signature = z.object({
|
|
356
|
+
account: z.string(),
|
|
357
|
+
clientId: z.string(),
|
|
358
|
+
credential: z.object({
|
|
359
|
+
id: z.string(),
|
|
360
|
+
publicKey: hex,
|
|
361
|
+
rpId: z.string(),
|
|
362
|
+
}),
|
|
363
|
+
});
|
|
364
|
+
/** The passkey step, which an approval of a key for a passkey-owned account returns. */
|
|
365
|
+
schema.step = z
|
|
366
|
+
.object({
|
|
367
|
+
step: z
|
|
368
|
+
.object({
|
|
369
|
+
options: z
|
|
370
|
+
.object({
|
|
371
|
+
publicKey: z
|
|
372
|
+
.object({
|
|
373
|
+
allowCredentials: z
|
|
374
|
+
.array(z
|
|
375
|
+
.object({
|
|
376
|
+
id: schema.credentialId.meta({
|
|
377
|
+
description: "The credential ID of the account's passkey, base64url.",
|
|
378
|
+
examples: ['KEbWNCc7NgaYnUyrNeFGX9_3Y-8'],
|
|
379
|
+
}),
|
|
380
|
+
type: z.literal('public-key').meta({
|
|
381
|
+
description: 'The credential type.',
|
|
382
|
+
}),
|
|
383
|
+
})
|
|
384
|
+
.meta({
|
|
385
|
+
description: 'The passkey that must sign.',
|
|
386
|
+
}))
|
|
387
|
+
.meta({
|
|
388
|
+
description: "The account's passkey, the only one the browser offers.",
|
|
389
|
+
}),
|
|
390
|
+
challenge: z.templateLiteral(['0x', z.string()]).meta({
|
|
391
|
+
description: "The key authorization's digest, as hex. It is single-use, and expires after 5 minutes.",
|
|
392
|
+
examples: [
|
|
393
|
+
'0xf6310589abb21116acc6e123967ed0a125b5041c43f8e157237093e07eaa354c',
|
|
394
|
+
],
|
|
395
|
+
}),
|
|
396
|
+
rpId: z.string().meta({
|
|
397
|
+
description: "The relying party ID of the account's passkey.",
|
|
398
|
+
examples: ['tempo.xyz'],
|
|
399
|
+
}),
|
|
400
|
+
userVerification: z.literal('required').meta({
|
|
401
|
+
description: 'Every passkey signature requires user verification.',
|
|
402
|
+
}),
|
|
403
|
+
})
|
|
404
|
+
.meta({
|
|
405
|
+
description: 'The `PublicKeyCredentialRequestOptions`, serialized with the challenge as hex.',
|
|
406
|
+
}),
|
|
407
|
+
})
|
|
408
|
+
.meta({
|
|
409
|
+
description: 'The options for `navigator.credentials.get()`.',
|
|
410
|
+
}),
|
|
411
|
+
type: z.literal('passkey').meta({
|
|
412
|
+
description: 'Sign the options with the passkey, then repeat the approval with `passkey: { assertion }`.',
|
|
413
|
+
}),
|
|
414
|
+
})
|
|
415
|
+
.meta({
|
|
416
|
+
description: "The next step: the passkey's signature over the key authorization's digest.",
|
|
417
|
+
}),
|
|
418
|
+
})
|
|
419
|
+
.meta({
|
|
420
|
+
description: 'An approval that continues when the passkey signs the key authorization.',
|
|
421
|
+
id: 'PasskeyStep',
|
|
422
|
+
});
|
|
423
|
+
/** The passkey step of a headless authorization, which the app's page signs on its own origin. */
|
|
424
|
+
schema.headlessStep = z
|
|
425
|
+
.object({
|
|
426
|
+
expiry: z
|
|
427
|
+
.number()
|
|
428
|
+
.int()
|
|
429
|
+
.meta({
|
|
430
|
+
description: "The key's expiry in Unix seconds. The repeated request sends it as `key_authorization.expiry`, so the digest stays the same.",
|
|
431
|
+
examples: [1791869364],
|
|
432
|
+
}),
|
|
433
|
+
step: schema.step.shape.step
|
|
434
|
+
.extend({
|
|
435
|
+
type: z.literal('passkey').meta({
|
|
436
|
+
description: 'Sign the options with the passkey on the page, then repeat `POST /v1/authorize` with `passkey: { assertion }`.',
|
|
437
|
+
}),
|
|
438
|
+
})
|
|
439
|
+
.meta({
|
|
440
|
+
description: "The next step: the passkey's signature over the key authorization's digest.",
|
|
441
|
+
}),
|
|
442
|
+
})
|
|
443
|
+
.meta({
|
|
444
|
+
description: "A headless authorization that continues when the passkey that owns the account signs the key authorization on the app's page.",
|
|
445
|
+
id: 'HeadlessPasskeyStep',
|
|
446
|
+
});
|
|
447
|
+
/** A `user` row that the plugin's endpoint signs in, as `takeWithKey` reads it. */
|
|
448
|
+
schema.user = z.object({
|
|
449
|
+
createdAt: z.date(),
|
|
450
|
+
email: z.string(),
|
|
451
|
+
emailVerified: z.boolean(),
|
|
452
|
+
id: z.string(),
|
|
453
|
+
image: z.string().nullable(),
|
|
454
|
+
name: z.string(),
|
|
455
|
+
updatedAt: z.date(),
|
|
456
|
+
});
|
|
457
|
+
/** A challenge's `verification` value. */
|
|
458
|
+
schema.value = z.object({
|
|
459
|
+
// A key challenge of an app's page stores the request that its sign-in runs.
|
|
460
|
+
authorize: z.unknown().optional(),
|
|
461
|
+
clientId: z.string().nullable(),
|
|
462
|
+
link: z.string().optional(),
|
|
463
|
+
// A challenge without an origin runs at Tempo ID's own page.
|
|
464
|
+
origin: z.string().optional(),
|
|
465
|
+
// A stored challenge can name no realm. It verifies against stored passkeys only.
|
|
466
|
+
realmId: z.string().optional(),
|
|
467
|
+
rpId: z.string(),
|
|
468
|
+
// A key challenge is the digest of a key authorization with this witness.
|
|
469
|
+
witness: z.templateLiteral(['0x', z.string()]).optional(),
|
|
470
|
+
});
|
|
471
|
+
})(schema || (schema = {}));
|
|
472
|
+
/**
|
|
473
|
+
* Issues a challenge for a sign-in at `rpId`, stores it until it expires, and returns it as hex.
|
|
474
|
+
* The challenge is random, or the digest of a key authorization for a sign-in with key signature,
|
|
475
|
+
* which stores its witness beside it. Returns `undefined` for a key challenge that a pending
|
|
476
|
+
* challenge already holds, since an app's challenge can repeat a digest, and one assertion must
|
|
477
|
+
* select exactly one request.
|
|
478
|
+
*/
|
|
479
|
+
export async function challenge(db, options) {
|
|
480
|
+
const value = (options.keyChallenge?.digest ??
|
|
481
|
+
Hex.fromBytes(crypto.getRandomValues(new Uint8Array(32)))).toLowerCase();
|
|
482
|
+
const identifier = prefix + value;
|
|
483
|
+
const row = {
|
|
484
|
+
expiresAt: new Date(Date.now() + lifetime * 1000),
|
|
485
|
+
id: crypto.randomUUID(),
|
|
486
|
+
identifier,
|
|
487
|
+
value: JSON.stringify(schema.value.parse({
|
|
488
|
+
authorize: options.authorize,
|
|
489
|
+
clientId: options.clientId,
|
|
490
|
+
link: options.link,
|
|
491
|
+
origin: options.origin,
|
|
492
|
+
realmId: options.realmId,
|
|
493
|
+
rpId: options.rpId,
|
|
494
|
+
witness: options.keyChallenge?.witness,
|
|
495
|
+
})),
|
|
496
|
+
};
|
|
497
|
+
// A random challenge never repeats, so only a key challenge needs the claim.
|
|
498
|
+
if (!options.keyChallenge) {
|
|
499
|
+
await db.insert(Schema.verification).values(row);
|
|
500
|
+
return value;
|
|
501
|
+
}
|
|
502
|
+
// Concurrent requests for one digest claim one identifier, so only the first stores it.
|
|
503
|
+
const stored = await Verification.claim(db, row);
|
|
504
|
+
return stored ? value : undefined;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Returns why Tempo ID refuses a passkey ceremony on an app's page, or `undefined` when the page may
|
|
508
|
+
* run one. Tempo ID verifies the assertion for the page's origin, so only a first-party web app's
|
|
509
|
+
* page, at the origin of one of its redirect URIs, runs a ceremony:
|
|
510
|
+
*
|
|
511
|
+
* - A page sends the app's `client_id`, and the app must exist, be enabled, and be first-party.
|
|
512
|
+
* - A native app's request proves no app, so it signs in through an authentication sheet.
|
|
513
|
+
* - The request's `Origin` must be the origin of one of the app's redirect URIs.
|
|
514
|
+
*/
|
|
515
|
+
export function checkPage(options) {
|
|
516
|
+
const { app, clientId, origin } = options;
|
|
517
|
+
if (!clientId)
|
|
518
|
+
return new Authorize.InvalidOriginError({
|
|
519
|
+
error_description: `Invalid \`Origin\`: ${origin ?? 'none'}. A passkey sign-in from an app's page sends the app's \`client_id\`.`,
|
|
520
|
+
field: 'Origin',
|
|
521
|
+
...(origin ? { meta: { origin } } : {}),
|
|
522
|
+
});
|
|
523
|
+
if (!app || !app.firstParty)
|
|
524
|
+
return new Authorize.RejectedError({
|
|
525
|
+
description: `Passkey sign-in refused: ${clientId} is not a first-party app. Send the user to \`/oauth2/authorize\`, which offers passkey sign-in.`,
|
|
526
|
+
});
|
|
527
|
+
if (app.type === 'native')
|
|
528
|
+
return new Authorize.RejectedError({
|
|
529
|
+
description: "Passkey sign-in refused: a native app's request does not prove which app sends it. Open `/oauth2/authorize` in an authentication sheet.",
|
|
530
|
+
});
|
|
531
|
+
const origins = app.redirectUris.flatMap((uri) => {
|
|
532
|
+
const url = URL.parse(uri);
|
|
533
|
+
return url?.protocol === 'https:' || url?.protocol === 'http:'
|
|
534
|
+
? [url.origin]
|
|
535
|
+
: [];
|
|
536
|
+
});
|
|
537
|
+
if (!origin || !origins.includes(origin))
|
|
538
|
+
return new Authorize.InvalidOriginError({
|
|
539
|
+
error_description: `Invalid \`Origin\`: ${origin ?? 'none'}. Passkey sign-in for ${clientId} must come from the origin of one of its redirect URIs.`,
|
|
540
|
+
field: 'Origin',
|
|
541
|
+
...(origin ? { meta: { origin } } : {}),
|
|
542
|
+
});
|
|
543
|
+
return undefined;
|
|
544
|
+
}
|
|
545
|
+
(function (checkPage) {
|
|
546
|
+
/** The refusals `checkPage` returns. Its return type admits no other. */
|
|
547
|
+
checkPage.errors = [
|
|
548
|
+
Authorize.InvalidOriginError,
|
|
549
|
+
Authorize.RejectedError,
|
|
550
|
+
];
|
|
551
|
+
})(checkPage || (checkPage = {}));
|
|
552
|
+
/** Returns the challenge of `clientDataJSON`, as hex, or `undefined` when it does not parse. */
|
|
553
|
+
function clientChallenge(options) {
|
|
554
|
+
try {
|
|
555
|
+
const data = schema.clientData.parse(JSON.parse(options.clientDataJSON));
|
|
556
|
+
return Base64.toHex(data.challenge);
|
|
557
|
+
}
|
|
558
|
+
catch {
|
|
559
|
+
return undefined;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Returns the passkey with the credential `id` that belongs to `rpId`, or `undefined` when Tempo ID
|
|
564
|
+
* stores none.
|
|
565
|
+
*/
|
|
566
|
+
export async function get(db, options) {
|
|
567
|
+
const [key] = await db
|
|
568
|
+
.select()
|
|
569
|
+
.from(Schema.keys)
|
|
570
|
+
.where(and(eq(Schema.keys.id, options.id), eq(Schema.keys.rpId, options.rpId)));
|
|
571
|
+
return key;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Stores a verified wallet.tempo passkey for `userId`, and returns the user the passkey's row names.
|
|
575
|
+
* A concurrent first sign-in of the same passkey can store the row first, so the row decides.
|
|
576
|
+
* Returns `undefined` when another passkey holds the address.
|
|
577
|
+
*/
|
|
578
|
+
export async function link(db, options) {
|
|
579
|
+
const { credential, id, rpId, userId } = options;
|
|
580
|
+
// `TempoAccount.create` takes the same lock to claim the realm of a first account, so a link
|
|
581
|
+
// either commits before the claim, and the claim gives way to it, or after it. A link after the
|
|
582
|
+
// claim adds the passkey's account beside the created one, as a link after its creation does.
|
|
583
|
+
return await db.transaction(async (tx) => {
|
|
584
|
+
await Owner.lock(tx, { userId });
|
|
585
|
+
// The `default` realm without a row signs in with a relying party that `Realm.withDefaults`
|
|
586
|
+
// derives. The first linked passkey stores it, so the unique `rp_id` keeps another realm from
|
|
587
|
+
// taking it, and a later change to `URL` keeps the passkeys that exist. A row already stored
|
|
588
|
+
// for `default`, or for this relying party, leaves the insert without effect.
|
|
589
|
+
await tx
|
|
590
|
+
.insert(Schema.realmPasskeys)
|
|
591
|
+
.values({ realmId: 'default', rpId })
|
|
592
|
+
.onConflictDoNothing();
|
|
593
|
+
const [inserted] = await tx
|
|
594
|
+
.insert(Schema.keys)
|
|
595
|
+
.values({
|
|
596
|
+
address: credential.address.toLowerCase(),
|
|
597
|
+
...(credential.createdAt === null
|
|
598
|
+
? {}
|
|
599
|
+
: { createdAt: new Date(credential.createdAt) }),
|
|
600
|
+
id,
|
|
601
|
+
publicKey: credential.publicKey,
|
|
602
|
+
rpId,
|
|
603
|
+
source: 'tempo-wallet',
|
|
604
|
+
type: 'passkey',
|
|
605
|
+
userId,
|
|
606
|
+
})
|
|
607
|
+
.onConflictDoNothing()
|
|
608
|
+
.returning({ userId: Schema.keys.userId });
|
|
609
|
+
if (inserted)
|
|
610
|
+
return inserted.userId;
|
|
611
|
+
const existing = await get(tx, { id, rpId });
|
|
612
|
+
return existing?.userId;
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Derives the link cookie's own key from `secret` with HKDF-SHA256, as hex. The cookie thus shares
|
|
617
|
+
* no key with anything else that `SECRET` encrypts, such as the signing keys.
|
|
618
|
+
*/
|
|
619
|
+
async function linkKey(secret) {
|
|
620
|
+
const encoder = new TextEncoder();
|
|
621
|
+
const material = await crypto.subtle.importKey('raw', encoder.encode(secret), 'HKDF', false, ['deriveBits']);
|
|
622
|
+
const bits = await crypto.subtle.deriveBits({
|
|
623
|
+
hash: 'SHA-256',
|
|
624
|
+
info: encoder.encode('tempo-id:passkey-link:v1'),
|
|
625
|
+
name: 'HKDF',
|
|
626
|
+
salt: new Uint8Array(),
|
|
627
|
+
}, material, 256);
|
|
628
|
+
return Hex.fromBytes(new Uint8Array(bits));
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Returns the passkeys that the user with `userId` holds, of every relying party, oldest first. Each
|
|
632
|
+
* entry marks whether it counts toward {@link registrationLimit}, as {@link registered} counts it, so
|
|
633
|
+
* one read serves both the limit and the passkeys that a new registration excludes.
|
|
634
|
+
*/
|
|
635
|
+
export async function list(db, options) {
|
|
636
|
+
return await db
|
|
637
|
+
.select({
|
|
638
|
+
id: Schema.keys.id,
|
|
639
|
+
registered: sql `(${registeredKeys(options)})`,
|
|
640
|
+
rpId: Schema.keys.rpId,
|
|
641
|
+
})
|
|
642
|
+
.from(Schema.keys)
|
|
643
|
+
.where(eq(Schema.keys.userId, options.userId))
|
|
644
|
+
.orderBy(asc(Schema.keys.createdAt), asc(Schema.keys.id));
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Instantiates a passkey sign-in plugin for Better Auth. Its server-only `signInPasskey` endpoint
|
|
648
|
+
* creates a session for a user whose assertion a route verified, and sets the session cookie. Like
|
|
649
|
+
* every sign-in, it continues an app's authorization that `oauth_query` names.
|
|
650
|
+
*/
|
|
651
|
+
export function plugin() {
|
|
652
|
+
return {
|
|
653
|
+
endpoints: {
|
|
654
|
+
signInPasskey: createAuthEndpoint.serverOnly({
|
|
655
|
+
body: z.object({
|
|
656
|
+
oauth_query: z.string().optional(),
|
|
657
|
+
// The user row that the route already read with the passkey, which spares the read.
|
|
658
|
+
user: schema.user.optional(),
|
|
659
|
+
userId: z.string(),
|
|
660
|
+
}),
|
|
661
|
+
method: 'POST',
|
|
662
|
+
}, async (ctx) => {
|
|
663
|
+
const { user: read, userId } = ctx.body;
|
|
664
|
+
const user = read?.id === userId
|
|
665
|
+
? read
|
|
666
|
+
: await ctx.context.internalAdapter.findUserById(userId);
|
|
667
|
+
if (!user)
|
|
668
|
+
throw new Error('The passkey user is missing.');
|
|
669
|
+
const session = await ctx.context.internalAdapter.createSession(user.id);
|
|
670
|
+
await setSessionCookie(ctx, { session, user });
|
|
671
|
+
return ctx.json({ user: { email: user.email, id: user.id } });
|
|
672
|
+
}),
|
|
673
|
+
},
|
|
674
|
+
id: 'tempo-id-passkey',
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Returns how many passkeys the user with `userId` registered, of {@link registrationLimit} at most.
|
|
679
|
+
*/
|
|
680
|
+
export async function registered(db, options) {
|
|
681
|
+
const [row] = await db
|
|
682
|
+
.select({ count: sql `count(*)::int` })
|
|
683
|
+
.from(Schema.keys)
|
|
684
|
+
.where(registeredKeys(options));
|
|
685
|
+
return row?.count ?? 0;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Stores a passkey that the user with `userId` registered, once `verifyRegistration` accepted its
|
|
689
|
+
* credential and `verify` its proof. Like a linked wallet.tempo passkey, it signs in, and owns the
|
|
690
|
+
* Tempo Account at the address that its public key derives. It never replaces a stored row. Returns:
|
|
691
|
+
*
|
|
692
|
+
* - `stored` once it stores the passkey.
|
|
693
|
+
* - `held` when Tempo ID already stores the credential ID or the address.
|
|
694
|
+
* - `limit` when the user holds {@link registrationLimit} registered passkeys.
|
|
695
|
+
* - `stale` when the `default` realm's relying party is no longer the challenge's.
|
|
696
|
+
*/
|
|
697
|
+
export async function register(db, options) {
|
|
698
|
+
const { id, publicKey, rpId, userId } = options;
|
|
699
|
+
return await db.transaction(async (tx) => {
|
|
700
|
+
// The same lock as `link`, so a registration before the claim of a first account prevents the
|
|
701
|
+
// Privy account, and one after it adds the passkey's account beside it. It also serializes the
|
|
702
|
+
// count with the insert, so concurrent registrations stay within the limit.
|
|
703
|
+
await Owner.lock(tx, { userId });
|
|
704
|
+
// As in `link`, the first stored passkey stores the relying party that `Realm.withDefaults`
|
|
705
|
+
// derives for the `default` realm, so another realm cannot take it. A row that names another
|
|
706
|
+
// relying party, set after the options, leaves the passkey outside the realm. One statement
|
|
707
|
+
// counts the user's passkeys, and below the limit stores the relying party and locks its row.
|
|
708
|
+
// The row lock holds until the insert commits, so a change of the relying party, such as
|
|
709
|
+
// `Realm.setPasskeys`, waits for it and cannot land between the check and the insert.
|
|
710
|
+
const counted = tx.$with('counted').as(tx
|
|
711
|
+
.select({ count: sql `count(*)::int`.as('count') })
|
|
712
|
+
.from(Schema.keys)
|
|
713
|
+
.where(registeredKeys({ userId })));
|
|
714
|
+
const stored = tx.$with('stored').as(tx
|
|
715
|
+
.insert(Schema.realmPasskeys)
|
|
716
|
+
// An insert from a query lists every column in the table's order.
|
|
717
|
+
.select(sql `select now(), 'default', ${rpId} from ${counted} where ${counted.count} < ${registrationLimit}`)
|
|
718
|
+
.onConflictDoNothing()
|
|
719
|
+
.returning({ rpId: Schema.realmPasskeys.rpId }));
|
|
720
|
+
const locked = tx
|
|
721
|
+
.select({ rpId: Schema.realmPasskeys.rpId })
|
|
722
|
+
.from(Schema.realmPasskeys)
|
|
723
|
+
.where(eq(Schema.realmPasskeys.realmId, 'default'))
|
|
724
|
+
.for('update');
|
|
725
|
+
const [checked] = await tx
|
|
726
|
+
.with(counted, stored)
|
|
727
|
+
.select({
|
|
728
|
+
count: counted.count,
|
|
729
|
+
rpId: sql `coalesce((select ${stored.rpId} from ${stored}), (${locked}))`,
|
|
730
|
+
})
|
|
731
|
+
.from(counted);
|
|
732
|
+
if ((checked?.count ?? 0) >= registrationLimit)
|
|
733
|
+
return 'limit';
|
|
734
|
+
// The statement reads only the rows that committed before it started, so it misses a `default`
|
|
735
|
+
// row that another transaction stored during it. A second read returns that row.
|
|
736
|
+
const realm = checked?.rpId ? { rpId: checked.rpId } : (await locked)[0];
|
|
737
|
+
if (realm?.rpId !== rpId)
|
|
738
|
+
return 'stale';
|
|
739
|
+
const [inserted] = await tx
|
|
740
|
+
.insert(Schema.keys)
|
|
741
|
+
.values({
|
|
742
|
+
address: Address.fromPublicKey(PublicKey.fromHex(publicKey)).toLowerCase(),
|
|
743
|
+
id,
|
|
744
|
+
publicKey,
|
|
745
|
+
rpId,
|
|
746
|
+
source: 'tempo-id',
|
|
747
|
+
type: 'passkey',
|
|
748
|
+
userId,
|
|
749
|
+
})
|
|
750
|
+
.onConflictDoNothing()
|
|
751
|
+
.returning({ id: Schema.keys.id });
|
|
752
|
+
return inserted ? 'stored' : 'held';
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Returns the condition of the keys that count as passkeys that the user with `userId` registered.
|
|
757
|
+
*/
|
|
758
|
+
function registeredKeys(options) {
|
|
759
|
+
return and(
|
|
760
|
+
// A registered passkey is Tempo ID's own and owns an account, so it holds an address.
|
|
761
|
+
// `registered` is the earlier name of the same source, until a migration renames it.
|
|
762
|
+
inArray(Schema.keys.source, ['registered', 'tempo-id']), isNotNull(Schema.keys.address), eq(Schema.keys.userId, options.userId));
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Returns the first of `realms` that holds passkeys which can sign in at `origin`, and at `page`
|
|
766
|
+
* when given, with its relying party ID, or `undefined` when none can. A WebAuthn ceremony runs
|
|
767
|
+
* only at an origin whose host is the relying party ID or one of its subdomains.
|
|
768
|
+
*/
|
|
769
|
+
export function relyingParty(realms, options) {
|
|
770
|
+
const hosts = [options.origin, options.page].flatMap((origin) => origin ? [new URL(origin).hostname] : []);
|
|
771
|
+
for (const realm of realms) {
|
|
772
|
+
const rpId = realm.passkeys?.rpId;
|
|
773
|
+
if (rpId !== undefined &&
|
|
774
|
+
hosts.every((host) => host === rpId || host.endsWith(`.${rpId}`)))
|
|
775
|
+
return { realmId: realm.id, rpId };
|
|
776
|
+
}
|
|
777
|
+
return undefined;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Issues a random challenge for the new passkey `credential` to sign, stores it with the passkey
|
|
781
|
+
* until it expires, and returns it as hex. Only the user with `userId` spends it. The attestation
|
|
782
|
+
* of format `none` carries no signature, so only this assertion proves that the user holds the
|
|
783
|
+
* passkey's private key.
|
|
784
|
+
*/
|
|
785
|
+
export async function requestProof(db, options) {
|
|
786
|
+
const { credential, rpId, userId } = options;
|
|
787
|
+
const challenge = Hex.fromBytes(crypto.getRandomValues(new Uint8Array(32)));
|
|
788
|
+
await db.insert(Schema.verification).values({
|
|
789
|
+
expiresAt: new Date(Date.now() + lifetime * 1000),
|
|
790
|
+
id: crypto.randomUUID(),
|
|
791
|
+
identifier: registrationIdentifier({
|
|
792
|
+
challenge,
|
|
793
|
+
prefix: proofPrefix,
|
|
794
|
+
userId,
|
|
795
|
+
}),
|
|
796
|
+
value: JSON.stringify(schema.proof.parse({ ...credential, rpId })),
|
|
797
|
+
});
|
|
798
|
+
return challenge;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Issues a random challenge for the registration of a passkey of `rpId` by the user with `userId`,
|
|
802
|
+
* stores it until it expires, and returns it as hex. Only that user spends it.
|
|
803
|
+
*/
|
|
804
|
+
export async function requestRegistration(db, options) {
|
|
805
|
+
const challenge = Hex.fromBytes(crypto.getRandomValues(new Uint8Array(32)));
|
|
806
|
+
await db.insert(Schema.verification).values({
|
|
807
|
+
expiresAt: new Date(Date.now() + lifetime * 1000),
|
|
808
|
+
id: crypto.randomUUID(),
|
|
809
|
+
identifier: registrationIdentifier({
|
|
810
|
+
challenge,
|
|
811
|
+
prefix: registrationPrefix,
|
|
812
|
+
userId: options.userId,
|
|
813
|
+
}),
|
|
814
|
+
value: JSON.stringify(schema.registration.parse({ rpId: options.rpId })),
|
|
815
|
+
});
|
|
816
|
+
return challenge;
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Returns the `verification` identifier of a registration or proof challenge, which names its step,
|
|
820
|
+
* its user, and the challenge. JSON keeps each value apart, whatever characters it holds.
|
|
821
|
+
*/
|
|
822
|
+
function registrationIdentifier(options) {
|
|
823
|
+
return (options.prefix +
|
|
824
|
+
JSON.stringify([options.userId, options.challenge.toLowerCase()]));
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Stores the digest of a key authorization as the challenge of a signature by `credential`, until it
|
|
828
|
+
* expires. Only the user with `userId` spends it, for the same account, app, and passkey.
|
|
829
|
+
*/
|
|
830
|
+
export async function requestSignature(db, options) {
|
|
831
|
+
const { account, clientId, credential, digest, userId } = options;
|
|
832
|
+
await db.insert(Schema.verification).values({
|
|
833
|
+
expiresAt: new Date(Date.now() + lifetime * 1000),
|
|
834
|
+
id: crypto.randomUUID(),
|
|
835
|
+
identifier: signatureIdentifier({
|
|
836
|
+
account,
|
|
837
|
+
clientId,
|
|
838
|
+
credentialId: credential.id,
|
|
839
|
+
digest,
|
|
840
|
+
userId,
|
|
841
|
+
}),
|
|
842
|
+
value: JSON.stringify(schema.signature.parse({
|
|
843
|
+
account: account.toLowerCase(),
|
|
844
|
+
clientId,
|
|
845
|
+
credential,
|
|
846
|
+
})),
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Encrypts a deferred link with a key derived from `secret`, for the link cookie. The cookie cannot
|
|
851
|
+
* be read, changed, or forged without the secret.
|
|
852
|
+
*/
|
|
853
|
+
export async function seal(value, options) {
|
|
854
|
+
return await symmetricEncrypt({
|
|
855
|
+
data: JSON.stringify(schema.link.parse(value)),
|
|
856
|
+
key: await linkKey(options.secret),
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
/**
|
|
860
|
+
* Spends the challenge that `clientDataJSON` names, and returns it, or `undefined` when it is
|
|
861
|
+
* unknown, spent, or expired. One statement deletes and returns the row, so two concurrent
|
|
862
|
+
* assertions over one challenge cannot both spend it.
|
|
863
|
+
*/
|
|
864
|
+
export async function take(db, options) {
|
|
865
|
+
const challenge = clientChallenge(options);
|
|
866
|
+
if (!challenge)
|
|
867
|
+
return undefined;
|
|
868
|
+
const [row] = await db
|
|
869
|
+
.delete(Schema.verification)
|
|
870
|
+
.where(and(eq(Schema.verification.identifier, prefix + challenge.toLowerCase()), gt(Schema.verification.expiresAt, new Date())))
|
|
871
|
+
.returning({ value: Schema.verification.value });
|
|
872
|
+
if (!row)
|
|
873
|
+
return undefined;
|
|
874
|
+
return toChallenge(row.value, { challenge });
|
|
875
|
+
}
|
|
876
|
+
/** Returns the challenge that a stored `value` describes, once spent. */
|
|
877
|
+
function toChallenge(value, options) {
|
|
878
|
+
const parsed = schema.value.parse(JSON.parse(value));
|
|
879
|
+
return {
|
|
880
|
+
authorize: parsed.authorize,
|
|
881
|
+
challenge: options.challenge,
|
|
882
|
+
clientId: parsed.clientId,
|
|
883
|
+
link: parsed.link,
|
|
884
|
+
origin: parsed.origin,
|
|
885
|
+
realmId: parsed.realmId,
|
|
886
|
+
rpId: parsed.rpId,
|
|
887
|
+
witness: parsed.witness,
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Spends the challenge that `clientDataJSON` names, as {@link take} does, and returns it with the
|
|
892
|
+
* passkey with the credential `id` at the challenge's relying party and that passkey's user, in one
|
|
893
|
+
* statement. The challenge is spent whether or not the passkey exists. Returns `undefined` when the
|
|
894
|
+
* challenge is unknown, spent, or expired, and no `key` when Tempo ID stores no such passkey.
|
|
895
|
+
*/
|
|
896
|
+
export async function takeWithKey(db, options) {
|
|
897
|
+
const challenge = clientChallenge(options);
|
|
898
|
+
if (!challenge)
|
|
899
|
+
return undefined;
|
|
900
|
+
// A data-modifying CTE runs once, to completion, whatever the outer query reads, so the delete
|
|
901
|
+
// spends the challenge even when no passkey matches.
|
|
902
|
+
const spent = db.$with('spent').as(db
|
|
903
|
+
.delete(Schema.verification)
|
|
904
|
+
.where(and(eq(Schema.verification.identifier, prefix + challenge.toLowerCase()), gt(Schema.verification.expiresAt, new Date())))
|
|
905
|
+
.returning({ value: Schema.verification.value }));
|
|
906
|
+
const [row] = await db
|
|
907
|
+
.with(spent)
|
|
908
|
+
.select({
|
|
909
|
+
// Drizzle reads a joined object as absent when its first column is null, and `address` is
|
|
910
|
+
// null for a sign-in passkey, so the key selects only columns that are never null.
|
|
911
|
+
key: {
|
|
912
|
+
id: Schema.keys.id,
|
|
913
|
+
publicKey: Schema.keys.publicKey,
|
|
914
|
+
userId: Schema.keys.userId,
|
|
915
|
+
},
|
|
916
|
+
user: Schema.user,
|
|
917
|
+
value: spent.value,
|
|
918
|
+
})
|
|
919
|
+
.from(spent)
|
|
920
|
+
.leftJoin(Schema.keys, and(eq(Schema.keys.id, options.id), eq(Schema.keys.rpId, sql `(${spent.value})::jsonb ->> 'rpId'`)))
|
|
921
|
+
.leftJoin(Schema.user, eq(Schema.user.id, Schema.keys.userId));
|
|
922
|
+
if (!row)
|
|
923
|
+
return undefined;
|
|
924
|
+
return {
|
|
925
|
+
challenge: toChallenge(row.value, { challenge }),
|
|
926
|
+
key: row.key && row.user ? { ...row.key, user: row.user } : undefined,
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Spends the proof challenge that `clientDataJSON` names for the user with `userId`, and returns it
|
|
931
|
+
* with the new passkey, or `undefined` when it is unknown, spent, expired, or another user's. One
|
|
932
|
+
* statement deletes and returns the row, so two concurrent proofs cannot both spend it.
|
|
933
|
+
*/
|
|
934
|
+
export async function takeProof(db, options) {
|
|
935
|
+
const challenge = (() => {
|
|
936
|
+
try {
|
|
937
|
+
const data = schema.clientData.parse(JSON.parse(options.clientDataJSON));
|
|
938
|
+
return Base64.toHex(data.challenge);
|
|
939
|
+
}
|
|
940
|
+
catch {
|
|
941
|
+
return undefined;
|
|
942
|
+
}
|
|
943
|
+
})();
|
|
944
|
+
if (!challenge)
|
|
945
|
+
return undefined;
|
|
946
|
+
const [row] = await db
|
|
947
|
+
.delete(Schema.verification)
|
|
948
|
+
.where(and(eq(Schema.verification.identifier, registrationIdentifier({
|
|
949
|
+
challenge,
|
|
950
|
+
prefix: proofPrefix,
|
|
951
|
+
userId: options.userId,
|
|
952
|
+
})), gt(Schema.verification.expiresAt, new Date())))
|
|
953
|
+
.returning({ value: Schema.verification.value });
|
|
954
|
+
if (!row)
|
|
955
|
+
return undefined;
|
|
956
|
+
return { ...schema.proof.parse(JSON.parse(row.value)), challenge };
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* Spends the registration challenge that `clientDataJSON` names for the user with `userId`, and
|
|
960
|
+
* returns it, or `undefined` when it is unknown, spent, expired, or another user's. One statement
|
|
961
|
+
* deletes and returns the row, so two concurrent registrations over one challenge cannot both
|
|
962
|
+
* spend it.
|
|
963
|
+
*/
|
|
964
|
+
export async function takeRegistration(db, options) {
|
|
965
|
+
const challenge = (() => {
|
|
966
|
+
try {
|
|
967
|
+
const data = schema.clientData.parse(JSON.parse(Base64.toString(options.clientDataJSON)));
|
|
968
|
+
return Base64.toHex(data.challenge);
|
|
969
|
+
}
|
|
970
|
+
catch {
|
|
971
|
+
return undefined;
|
|
972
|
+
}
|
|
973
|
+
})();
|
|
974
|
+
if (!challenge)
|
|
975
|
+
return undefined;
|
|
976
|
+
const [row] = await db
|
|
977
|
+
.delete(Schema.verification)
|
|
978
|
+
.where(and(eq(Schema.verification.identifier, registrationIdentifier({
|
|
979
|
+
challenge,
|
|
980
|
+
prefix: registrationPrefix,
|
|
981
|
+
userId: options.userId,
|
|
982
|
+
})), gt(Schema.verification.expiresAt, new Date())))
|
|
983
|
+
.returning({ value: Schema.verification.value });
|
|
984
|
+
if (!row)
|
|
985
|
+
return undefined;
|
|
986
|
+
const value = schema.registration.parse(JSON.parse(row.value));
|
|
987
|
+
return { challenge, rpId: value.rpId };
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Records the assertion of a sign-in with key signature on an app's page as spent until `expiry`, once it
|
|
991
|
+
* verified, and returns whether neither a sign-in nor a signature spent it before. The assertion
|
|
992
|
+
* becomes public once its key reaches the chain, and an app's challenge can repeat its digest, so
|
|
993
|
+
* the record holds whatever signs the key, and also when the authorization fails.
|
|
994
|
+
*/
|
|
995
|
+
export async function spendSignIn(db, options) {
|
|
996
|
+
const signed = spentIdentifier(options);
|
|
997
|
+
const signedIn = spentSignInPrefix + signed.slice(spentPrefix.length);
|
|
998
|
+
return await db.transaction(async (tx) => {
|
|
999
|
+
// The same lock as `takeSignature`, so a sign-in and a signature of one assertion serialize, and
|
|
1000
|
+
// the claim reads the record of a signature that committed while it waited.
|
|
1001
|
+
await tx.execute(sql `select pg_advisory_xact_lock(hashtextextended(${signed}, 0))`);
|
|
1002
|
+
return await Verification.claim(tx, {
|
|
1003
|
+
expiresAt: new Date(Math.min(Math.max(options.expiry * 1000, Date.now() + lifetime * 1000), Date.now() + spentLifetime * 1000)),
|
|
1004
|
+
identifier: signedIn,
|
|
1005
|
+
others: [signed],
|
|
1006
|
+
value: '{}',
|
|
1007
|
+
});
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Records the assertion of a sign-in with key signature as a spent signature until `expiry`, for a year at
|
|
1012
|
+
* most, and returns whether no signature spent it before. The sign-in's challenge was the key's
|
|
1013
|
+
* digest, so no signature challenge precedes it, and the caller verifies the assertion over that
|
|
1014
|
+
* digest first. It takes the lock of {@link takeSignature}, so an approval that repeats the
|
|
1015
|
+
* assertion records it once.
|
|
1016
|
+
*/
|
|
1017
|
+
export async function spendSignature(db, options) {
|
|
1018
|
+
const spentId = spentIdentifier(options);
|
|
1019
|
+
return await db.transaction(async (tx) => {
|
|
1020
|
+
await tx.execute(sql `select pg_advisory_xact_lock(hashtextextended(${spentId}, 0))`);
|
|
1021
|
+
return await Verification.claim(tx, {
|
|
1022
|
+
expiresAt: new Date(Math.min(Math.max(options.expiry * 1000, Date.now() + lifetime * 1000), Date.now() + spentLifetime * 1000)),
|
|
1023
|
+
identifier: spentId,
|
|
1024
|
+
value: '{}',
|
|
1025
|
+
});
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Spends the signature challenge that `clientDataJSON` names, for the user, app, account, and
|
|
1030
|
+
* passkey of `options`, and returns it, or `undefined` when it is unknown, spent, or expired. One
|
|
1031
|
+
* statement deletes and returns the rows, so two concurrent assertions over one challenge cannot
|
|
1032
|
+
* both spend it, and an approval for another app, account, or passkey spends none of its rows.
|
|
1033
|
+
*
|
|
1034
|
+
* Returns the challenge only when `verify` accepts it with the assertion. Every step for the same
|
|
1035
|
+
* key issues the same digest, so the transaction then records the assertion as spent until
|
|
1036
|
+
* `expiry`, for a year at most, and returns `undefined` for an assertion that it recorded before. A captured assertion
|
|
1037
|
+
* thus signs no second approval, and an assertion that does not verify leaves no record.
|
|
1038
|
+
*/
|
|
1039
|
+
export async function takeSignature(db, options) {
|
|
1040
|
+
const digest = (() => {
|
|
1041
|
+
try {
|
|
1042
|
+
const data = schema.clientData.parse(JSON.parse(options.clientDataJSON));
|
|
1043
|
+
return Base64.toHex(data.challenge);
|
|
1044
|
+
}
|
|
1045
|
+
catch {
|
|
1046
|
+
return undefined;
|
|
1047
|
+
}
|
|
1048
|
+
})();
|
|
1049
|
+
if (!digest)
|
|
1050
|
+
return undefined;
|
|
1051
|
+
const spentId = spentIdentifier(options);
|
|
1052
|
+
return await db.transaction(async (tx) => {
|
|
1053
|
+
// The lock serializes requests with one assertion, so only the first records it.
|
|
1054
|
+
await tx.execute(sql `select pg_advisory_xact_lock(hashtextextended(${spentId}, 0))`);
|
|
1055
|
+
const [used] = await tx
|
|
1056
|
+
.select({ id: Schema.verification.id })
|
|
1057
|
+
.from(Schema.verification)
|
|
1058
|
+
.where(and(eq(Schema.verification.identifier, spentId), gt(Schema.verification.expiresAt, new Date())));
|
|
1059
|
+
// Each approval of one request issues the same digest, so every row that it names is spent.
|
|
1060
|
+
// A replayed assertion spends the challenge too, so the step must run again.
|
|
1061
|
+
const [row] = await tx
|
|
1062
|
+
.delete(Schema.verification)
|
|
1063
|
+
.where(and(eq(Schema.verification.identifier, signatureIdentifier({ ...options, digest })), gt(Schema.verification.expiresAt, new Date())))
|
|
1064
|
+
.returning({ value: Schema.verification.value });
|
|
1065
|
+
if (!row || used)
|
|
1066
|
+
return undefined;
|
|
1067
|
+
const value = { ...schema.signature.parse(JSON.parse(row.value)), digest };
|
|
1068
|
+
if (!options.verify(value))
|
|
1069
|
+
return undefined;
|
|
1070
|
+
// A signed request with the same key can reach a new step until the key expires.
|
|
1071
|
+
await tx.insert(Schema.verification).values({
|
|
1072
|
+
expiresAt: new Date(Math.min(Math.max(options.expiry * 1000, Date.now() + lifetime * 1000), Date.now() + spentLifetime * 1000)),
|
|
1073
|
+
id: crypto.randomUUID(),
|
|
1074
|
+
identifier: spentId,
|
|
1075
|
+
value: '{}',
|
|
1076
|
+
});
|
|
1077
|
+
return value;
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Returns the `verification` identifier of a signature challenge, which names its user, app,
|
|
1082
|
+
* account, passkey, and digest. JSON keeps each value apart, whatever characters it holds.
|
|
1083
|
+
*/
|
|
1084
|
+
function signatureIdentifier(options) {
|
|
1085
|
+
return (signaturePrefix +
|
|
1086
|
+
JSON.stringify([
|
|
1087
|
+
options.userId,
|
|
1088
|
+
options.clientId,
|
|
1089
|
+
options.account.toLowerCase(),
|
|
1090
|
+
options.credentialId,
|
|
1091
|
+
options.digest.toLowerCase(),
|
|
1092
|
+
]));
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* Returns the `verification` identifier of an assertion that a signature spent. Verification
|
|
1096
|
+
* refuses the high-`s` form of a P-256 signature, so each verified assertion has one identifier.
|
|
1097
|
+
*/
|
|
1098
|
+
function spentIdentifier(options) {
|
|
1099
|
+
return (spentPrefix +
|
|
1100
|
+
Hash.sha256(Hex.concat(options.authenticatorData, options.signature)));
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Decrypts the link cookie's value, and returns the deferred link, or `undefined` when the value
|
|
1104
|
+
* does not decrypt with `secret`, has another shape, came from another host, or expired.
|
|
1105
|
+
*/
|
|
1106
|
+
export async function unseal(sealed, options) {
|
|
1107
|
+
const value = await symmetricDecrypt({
|
|
1108
|
+
data: sealed,
|
|
1109
|
+
key: await linkKey(options.secret),
|
|
1110
|
+
})
|
|
1111
|
+
.then((data) => schema.link.safeParse(JSON.parse(data)))
|
|
1112
|
+
.catch(() => undefined);
|
|
1113
|
+
if (!value?.success)
|
|
1114
|
+
return undefined;
|
|
1115
|
+
if (value.data.host !== options.host)
|
|
1116
|
+
return undefined;
|
|
1117
|
+
if (value.data.expiresAt <= Date.now() / 1000)
|
|
1118
|
+
return undefined;
|
|
1119
|
+
return value.data;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* Builds the curve's table of base point multiples once for each isolate, at window 4. Otherwise
|
|
1123
|
+
* the first verification builds the table at window 8, which takes about six times the CPU, and
|
|
1124
|
+
* verifies at the same speed.
|
|
1125
|
+
*/
|
|
1126
|
+
function table() {
|
|
1127
|
+
if (tabled)
|
|
1128
|
+
return;
|
|
1129
|
+
P256.noble.utils.precompute(4);
|
|
1130
|
+
tabled = true;
|
|
1131
|
+
}
|
|
1132
|
+
/**
|
|
1133
|
+
* Returns whether `assertion` signs `challenge` with `publicKey`, at `origin`, for `rpId`, with the
|
|
1134
|
+
* user present and verified, outside a cross-origin iframe. The client cannot waive user
|
|
1135
|
+
* verification.
|
|
1136
|
+
*/
|
|
1137
|
+
export function verify(assertion, options) {
|
|
1138
|
+
table();
|
|
1139
|
+
try {
|
|
1140
|
+
// WebAuthn verification leaves `crossOrigin` to the relying party. A frame on another site
|
|
1141
|
+
// could otherwise run the ceremony for Tempo ID's origin.
|
|
1142
|
+
const data = schema.clientData.parse(JSON.parse(assertion.metadata.clientDataJSON));
|
|
1143
|
+
if (data.crossOrigin)
|
|
1144
|
+
return false;
|
|
1145
|
+
return Authentication.verify({
|
|
1146
|
+
...assertion,
|
|
1147
|
+
metadata: { ...assertion.metadata, userVerificationRequired: true },
|
|
1148
|
+
}, {
|
|
1149
|
+
challenge: options.challenge,
|
|
1150
|
+
origin: options.origin,
|
|
1151
|
+
publicKey: options.publicKey,
|
|
1152
|
+
rpId: options.rpId,
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1155
|
+
catch {
|
|
1156
|
+
return false;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Returns the credential ID and public key of the passkey that `credential` creates, or `undefined`
|
|
1161
|
+
* when it does not create one over `challenge`, at `origin`, for `rpId`, with the user present and
|
|
1162
|
+
* verified, outside a cross-origin iframe. The public key comes from the attestation object. An
|
|
1163
|
+
* attestation of format `none` passes, as most authenticators return no other. It proves nothing
|
|
1164
|
+
* about the private key, so the passkey must then sign a proof challenge from `requestProof`.
|
|
1165
|
+
*/
|
|
1166
|
+
export function verifyRegistration(credential, options) {
|
|
1167
|
+
try {
|
|
1168
|
+
// As in `verify`, a frame on another site could otherwise run the ceremony for Tempo ID's origin.
|
|
1169
|
+
const data = schema.clientData.parse(JSON.parse(Base64.toString(credential.clientDataJSON)));
|
|
1170
|
+
if (data.crossOrigin)
|
|
1171
|
+
return undefined;
|
|
1172
|
+
const result = Registration.verify(credential, {
|
|
1173
|
+
attestation: 'none',
|
|
1174
|
+
challenge: options.challenge,
|
|
1175
|
+
origin: options.origin,
|
|
1176
|
+
rpId: options.rpId,
|
|
1177
|
+
userVerification: 'required',
|
|
1178
|
+
});
|
|
1179
|
+
return { id: result.credential.id, publicKey: result.credential.publicKey };
|
|
1180
|
+
}
|
|
1181
|
+
catch {
|
|
1182
|
+
return undefined;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
//# sourceMappingURL=Passkey.js.map
|