@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 @@
|
|
|
1
|
+
{"version":3,"file":"ExecutionError-CDszGSF1.js","names":["parseAbiParameter_","checksum","assert","Hash.keccak256","Bytes.fromString","from","PublicKey.toHex","Errors.BaseError","Bytes.fromHex","Cursor.create","Bytes.size","Hex.fromBytes","internal.decodeParameter","encode","internal.prepareParameters","internal.encode","Hex.concat","Hex.padLeft","Hex.fromString","Hex.fromBoolean","Solidity.integerRegex","Hex.fromNumber","Solidity.bytesRegex","Hex.padRight","Solidity.arrayRegex","format","abitype.formatAbiParameters","from","abitype.parseAbiParameters","Errors.BaseError","Hex.size","AbiParameters.InvalidTypeError","checksum","Address.checksum","Hex.fromBytes","Bytes.slice","Bytes.toNumber","Bytes.toBoolean","Bytes.toBigInt","Bytes.toString","Bytes.trimLeft","integerRegex","Hex.size","Hex.fromNumber","Hex.concat","Hex.padLeft","AbiParameters.InvalidArrayError","AbiParameters.ArrayLengthMismatchError","Hex.padRight","AbiParameters.BytesSizeMismatchError","Errors.BaseError","Hex.fromBoolean","Hex.IntegerOutOfRangeError","Hex.fromString","Hex.slice","Errors.BaseError","Address.validate","Hex.validate","Hex.slice","internal.isArgOfType","internal.getAmbiguousTypes","abitype.formatAbiItem","internal.normalizeSignature","Hash.keccak256","Hex.fromString","Errors.BaseError","Hex.size","fromTupleList","Hash.validate","Hex.trimLeft","toTupleList","Hex.size","Errors.BaseError","Hex.from","PublicKey.from","recoverAddress","Address.fromPublicKey","recoverPublicKey","verify","Address.isEqual","Bytes.from","PublicKey.toBytes","Errors.BaseError","Bytes.fromString","Hex.InvalidLengthError","Bytes.fromHex","Cursor.create","Hex.fromBytes","readLength","readList","Errors.BaseError","from","getEncodable","getEncodableList","getEncodableBytes","getSizeOfLength","from","Errors.BaseError","Errors.BaseError","Value.formatGwei","InvalidSerializedError","Authentication.sign","verify","Authentication.verify","assert","Hex.size","Address.validate","Hex.toBigInt","from","Hex.padLeft","fromRpc","fromTuple","Hex.toNumber","Hash.keccak256","Hex.concat","Hex.fromString","Hex.fromNumber","Hex.slice","Address.isEqual","getSignPayload","Hex.from","toRpc","toTuple","Errors.BaseError","assert","getType","configurable","Address.validate","Hex.toBigInt","Address.isEqual","Hex.size","serialize","AccountConfig.maxOwnerSignatureBytes","Address.fromPublicKey","ox_Secp256k1.recoverPublicKey","deserialize","Hex.slice","Signature.fromHex","Hex.toNumber","Hex.toString","Rlp.toHex","AccountConfig.fromTuple","Hex.validate","from","AccountConfig.from","fromRpc","Hex.concat","Signature.fromRpc","Signature.toHex","Hex.fromNumber","Hex.fromString","Rlp.fromHex","AccountConfig.toTuple","AccountConfig.getSignPayload","toRpc","Signature.toRpc","ox_Secp256k1.verify","ox_P256.verify","ox_WebAuthnP256.verify","Hex.from","Errors.BaseError","Json.stringify","parse","core_Address.checksum","Errors.BaseError","from","fromRpc","TempoAddress.resolve","SignatureEnvelope.from","SignatureEnvelope.fromRpc","Hex.toBigInt","fromTuple","SignatureEnvelope.deserialize","getSignPayload","hash","deserialize","Rlp.toHex","toTuple","Rlp.fromHex","Hash.keccak256","serialize","toRpc","Hex.fromNumber","SignatureEnvelope.toRpc","SignatureEnvelope.serialize","Hex.toNumber","Hex.fromBytes","AbiItem.getSelector","Hex.size","from","TempoAddress.resolve","SignatureEnvelope.fromRpc","SignatureEnvelope.deserialize","Hex.fromNumber","SignatureEnvelope.toRpc","SignatureEnvelope.serialize","tip20Prefix","TempoAddress.resolve","Hex.toBigInt","Hex.slice","Hex.fromNumber","Hex.concat","TransactionEnvelope.InvalidChainIdError","TransactionEnvelope.FeeCapTooHighError","TransactionEnvelope.TipAboveFeeCapError","deserialize","Rlp.toHex","Hex.slice","TransactionEnvelope.InvalidSerializedError","Hex.validate","callsArray","AccessList.fromTupleList","AuthorizationTempo.fromTupleList","Address.validate","Signature.fromTuple","KeyAuthorization.fromTuple","SignatureEnvelope.deserialize","SignatureEnvelope.extractAddress","from","TempoAddress.resolve","SignatureEnvelope.from","Signature.from","serialize","AccessList.toTupleList","AuthorizationTempo.toTupleList","Hex.fromNumber","Address.fromPublicKey","Secp256k1.recoverAddress","Signature.toTuple","TokenId.toAddress","KeyAuthorization.toTuple","SignatureEnvelope.serialize","Hex.concat","Rlp.fromHex","Hash.keccak256","Errors.BaseError","AbiParameters.from","Hash.keccak256","Hex.fromString","zeroAddress","from","TokenId.toAddress","AbiParameters.encode","getVoucherSignPayload","Hex.concat","Address.from","serialize","Hash.keccak256","Hex.fromString","Errors.BaseError","BaseError","BaseError","keccak256","toHex","size","hexToNumber","BaseError","keccak256","numberToHex","BaseError","formatGwei","BaseError","formatGwei","BaseError","hexToNumber","numberToHex","hexToNumber","noble_sha256","toBytes","toHex","BaseError","size","hexToNumber","getChainId_","LruMap","getChainId","getChainId_","error","getBlock","getBlock_","BaseError","numberToHex","formatAbiItem","size","toBytes","keccak256","bytesRegex","BaseError","LruMap","BaseError","concat","InvalidAddressError","InvalidChainIdError","size","hexToNumber","slice","FeeCapTooHighError","TipAboveFeeCapError","BaseError","InvalidStorageKeySizeError","InvalidAddressError","numberToHex","toHex","BaseError","size","concat","keccak256","BaseError","stringify","integerRegex","InvalidAddressError","bytesRegex","size","BytesSizeMismatchError","keccak256","concat","toHex","hexToNumber","hexToNumber","InvalidAddressError","Value.format","Value.from","BaseError","stringify","accountKeychain","addressRegistry","configurableAccount","signatureVerifier","stablecoinDex","feeManager","tip20ChannelReserve","tip20Factory","tip403Registry","SignatureEnvelope.from","viem_getTransactionType","Hex.slice","viem_parseTransaction","serialize","viem_serializeTransaction","Hex.fromNumber","TxTempo.deserialize","SignatureEnvelope.from","TxTempo.getSignPayload","TxTempo.from","AccountConfig.from","SignatureEnvelope.sortApprovals","SignatureEnvelope.extractAddress","TxTempo.getFeePayerSignPayload","TxTempo.serialize","Signature.from","from","AccountConfig.fromUpgrade","AccountConfig.from","Address.checksum","AccountConfig.getAddress","Address.isEqual","SignatureEnvelope.serialize","Transaction.serialize","keccak256","AccountConfig.getSignPayload","SignatureEnvelope.extractAddress","SignatureEnvelope.from","SignatureEnvelope.sortApprovals","PublicKey.fromHex","WebAuthnP256.sign","Channel.computeId","Channel.getVoucherSignPayload","KeyAuthorization.getSignPayload","KeyAuthorization.from","Address.fromPublicKey","PublicKey.toHex","Hex.concat","Hex.fromNumber","ZoneId.toChainId","BaseError","TokenId.toAddress","TokenId.toAddress","Abis.tip20","Abis.coreErrors","Abis.accountKeychain","Addresses.accountKeychain","getMetadata","Hardfork.lt","AccountConfig.getSignPayload","Addresses.signatureVerifier","Abis.signatureVerifier","errorResolvers","formatAbiItem","Abis.tip20","Abis.tip20","internal_Token.toBaseUnits","Hex.padLeft","Addresses.pathUsd","Hex.random","Addresses.tip20Factory","Abis.tip20Factory","internal_Token.toAmount","TokenId.fromAddress","TokenRole.serialize","Addresses.tip403Registry","Abis.tip403Registry","Abis.coreErrors","formatAbiItem","toBigInt$1","fromString$1","random","padRight","validate$1","stringify","toNumber$1","toString$1","size$1","trimLeft$1","BaseError$1","fromNumber","padLeft","assert$4","fromBoolean","slice","toNumber","toString","InvalidLengthError","IntegerOutOfRangeError","fromString","slice$1","toBigInt","from$13","trimLeft","fromHex$1","size","toBoolean","concat","fromBytes","from$12","secp256k1","fromRpc$4","assert$5","keccak256","fromHex$3","arrayRegex","sha256$1","bytesRegex$1","toHex$2","toRpc$4","from$15","toTuple$3","integerRegex$1","toBytes","from$14","toHex$1","fromTuple$3","fromHex$2","sign$1","validate$2","verify$3","verify$4","create$1","prettyPrint","BytesSizeMismatchError$1","toBytes$1","RlpDepthLimitExceededError","defineFormatter","TipAboveFeeCapError$1","keccak256$1","FeeCapTooHighError$1","toEventSelector","ContractFunctionRevertedError","hexToBigInt","InvalidSerializedTransactionTypeError","AbiDecodingZeroDataError","InvalidLegacyVError","RlpTrailingBytesError","ContractFunctionZeroDataError","TransactionExecutionError","AbiEventSignatureEmptyTopicsError","InvalidStorageKeySizeError$1","RawContractError","hexToNumber$1","numberToHex$1","stringToHex","UnknownNodeError","hexToBytes","ContractFunctionExecutionError","toHex$3","trim","formatTransactionRequest","checksumAddress","getNodeError","InvalidAddressError$1","InvalidSerializableTransactionError","padHex","FeePayerNonceMismatchError","RlpListBoundaryExceededError","InvalidSerializedTransactionError","AbiDecodingDataSizeTooSmallError","AbiEventSignatureNotFoundError","formatBlockParameter","slice$2","isHex","decodeErrorResult","serializeStateOverride","concatHex","InvalidChainIdError$1","PositionOutOfBoundsError","parseAccount","DecodeLogDataMismatch","formatGwei$1","isAddressEqual","integerRegex$2","decodeFunctionResult","bytesRegex$2","getChainContractAddress","size$2","stringify$1","RpcRequestError","bytesToHex","stringToBytes","multicall3Abi","encodeAbiParameters","createBatchScheduler","format$2","ChainMismatchError","formatAbiItem$1","decodeAbiParameters","toFunctionSelector","InvalidYParityError","BaseError$2","from$16","ChainNotFoundError","createCursor","call","DecodeLogTopicsMismatch","formatEther","multicall3Bytecode","encodeFunctionData","assertRequest","sliceHex","extract","LruMap$1","isAddress","maxUint256","concat$1","InvalidHexValueError","version","BaseError","details","args","docsPath","message","shortMessage","execTyped","regex","string","bytesRegex","integerRegex","isTupleRegex","tupleRegex","formatAbiParameter","type","abiParameter","length","i","component","result","formatAbiParameters","params","abiParameters","formatAbiItem","abiItem","structSignatureRegex","isStructSignature","signature","execStructSignature","modifiers","functionModifiers","UnknownTypeError","UnknownSolidityTypeError","InvalidAbiParametersError","InvalidParameterError","param","SolidityProtectedKeywordError","name","InvalidModifierError","modifier","InvalidFunctionModifierError","InvalidAbiTypeParameterError","InvalidSignatureError","InvalidStructSignatureError","CircularReferenceError","InvalidParenthesisError","current","depth","getParameterCacheKey","structKey","structs","struct","propertyKey","property","parameterCache","abiParameterWithoutTupleRegex","abiParameterWithTupleRegex","dynamicIntegerRegex","parseAbiParameter","parameterCacheKey","options","isTuple","match","isSolidityKeyword","indexed","components","splitParameters","components_","isSolidityType","isValidDataLocation","char","tail","protectedKeywordsRegex","isArray","parseStructs","shallowStructs","signaturesLength","signatures","properties","propertiesLength","k","trimmed","resolvedStructs","entries","entriesLength","parameters","resolveStructs","typeWithoutTupleRegex","ancestors","array","parseAbiParameters","checksum$1","value","key","firstKey","addressRegex","assert$3","InvalidAddressError","InvalidInputError","strict","checksum","InvalidChecksumError","address","hexAddress","hash","characters","from$11","checksumVal","fromPublicKey","publicKey","isEqual","addressA","addressB","validate","decode","bytes","data","cursor","ZeroDataError","DataSizeTooSmallError","consumed","values","as","consumed_","decodeParameter","encode$1","LengthMismatchError","encode","prepareParameters","encodePacked","types","intMatch","_type","baseType","bits","bytesMatch","BytesSizeMismatchError","arrayMatch","childType","InvalidTypeError","format$1","from$10","ArrayLengthMismatchError","expectedLength","givenLength","expectedSize","InvalidArrayError","arrayComponents","getArrayComponents","decodeArray","decodeTuple","decodeAddress","decodeBool","decodeBytes","decodeNumber","decodeString","sizeOfLength","sizeOfOffset","checksum$2","start","staticPosition","startOfData","dynamicChild","hasDynamicChild","_","offset","signed","hasUnnamedChild","preparedParameters","prepareParameter","parameter_","parameter","encodeArray","encodeTuple","encodeAddress","encodeBoolean","encodeNumber","encodeBytes","encodeString","staticSize","dynamic","encoded","staticParameters","dynamicParameters","dynamicSize","preparedParam","parametersize","bytesSize","value_","max","min","hexValue","partsLength","parts","param_","matches","normalizeSignature","active","level","valid","isArgOfType","argType","arg","abiParameterType","getComponentValue","index","x","getAmbiguousTypes","parameterIndex","sourceParameters","sourceParameter","targetParameter","targetParameters","sourceArray","targetArray","fromAbi","isSelector","abiItems","abi","getSelector","getSignatureHash","NotFoundError","prepare","matchedAbiItem","ambiguousTypes","AmbiguityError","overloads","getSignature","y","selector","fromTupleList$1","list","accessList","storageKeys","toTupleList$1","tuple","j","InvalidStorageKeySizeError","storageKey","getPublicKey","point","privateKey","recoverAddress$1","recoverPublicKey$1","s","yParity","payload","verify$2","toHex","to","to_","decodeRlpCursor","prefix","readLength$1","readList$1","position","from$9","encodable","getEncodable$1","fromHex","hex","getEncodableList$1","getEncodableBytes$1","bodyLength","acc","sizeOfBodyLength","getSizeOfLength$1","bytesOrHex","sizeOfBytesLength","exponents","format","display","negative","decimals","integer","fraction","formatGwei","wei","unit","from$8","InvalidDecimalNumberError","left","right","rounded","FeeCapTooHighError","feeCap","InvalidChainIdError","chainId","InvalidSerializedError$1","missing","attributes","serialized","TipAboveFeeCapError","maxPriorityFeePerGas","maxFeePerGas","sign","verify$1","maxOwnerSignatureBytes","maxVersion","zeroSalt","accountDomain","configDomain","signatureDomain","upgradeDomain","assert$2","config","salt","InvalidConfigError","assertVersion","owners","threshold","totalWeight","weights","previous","owner","weight","reachableWeight","b","a","sum","from$7","normalized","fromRpc$3","fromTuple$2","ownerAddress","fromUpgrade","account","getAddress","getCommitment","getSignPayload$2","toRpc$3","toTuple$2","update","reason","serializedP256Type","serializedWebAuthnType","serializedKeychainType","serializedKeychainV2Type","serializedConfigurableType","magicBytes","assert$1","getType$1","envelope","p256","MissingPropertiesError","webauthn","keychain","assertKeychainVersion","assertConfigurable","inner","InvalidApprovalError","serialize$5","extractAddress","root","extractPublicKey","CoercionError","deserialize$3","deserialize_","typeId","dataSize","InvalidSerializedError","webauthnDataSize","webauthnData","authenticatorData","clientDataJSON","split","potentialJson","decoded","from$6","configurable","fromRpc$2","keychainTypeId","sortApprovals","digest","entry","toRpc$2","verify","VerificationError","m","resolve","parse$1","tempoAddress","InvalidPrefixError","from$5","authorization","fromRpc$1","auth","assertWitness","assertSignature","resolved","l","scope","resolveSelector","r","witness","isAdmin","keyType","scopes","allowedCalls","callScope","normalizeSelector","rule","keyId","expiry","limits","limit","hexToNumber","fromTuple$1","signatureSerialized","keyType_hex","trailing","rawExpiry","rawLimits","rawScopes","rawWitness","rawIsAdmin","rawAccount","isAbsent","token","period","limitTuple","hexToBigint","selectorRules","scopeTuple","recipients","ruleTuple","InvalidAdminMarkerError","getSignPayload$1","hash$1","deserialize$2","authorizationTuple","toTuple$1","serialize$4","toRpc$1","grouped","target","numberToHex","limitsValue","bigintToHex","callsValue","optionals","lastPresent","placeholder","InvalidWitnessSizeError","InvalidSignatureTypeError","marker","from$4","fromRpc","nonce","fromRpcList","authorizationList","fromTuple","fromTupleList","tupleList","toRpc","toRpcList","toTuple","toTupleList","tip20Prefix$1","fromAddress","toAddress","tokenId","tokenIdHex","feePayerMagic","serializedType","assert","calls","CallsEmptyError","validBefore","validAfter","InvalidValidityWindowError","deserialize$1","transactionArray","gas","nonceKey","feeToken","feePayerSignatureOrSender","keyAuthorizationOrSignature","maybeSignature","keyAuthorization","transaction","callTuple","signatureEnvelope","getSignPayload","from$3","envelope_","feePayerSignature","serialize$3","accessTupleList","authorizationTupleList","callsTupleList","skipFeeToken","sig","encodeForSigning","sigHash","getFeePayerSignPayload","sender","channelIdParameters","domainSeparatorParameters","voucherHashParameters","eip712DomainTypehash","nameHash","versionHash","zeroAddress$1","voucherTypehash","from$2","resolveAddress","authorizedSigner","operator","payee","payer","computeId","channel_","channel","domainSeparator","getVoucherSignPayload$1","voucherHash","toPreHashed","serialize$2","role","chainIdConfig","defaultSourceId","toChainId","getChainIdConfig","sourceId","base","zoneId","range","UnsupportedSourceIdError","getAction","action_implicit","client","actionFn","action_explicit","unknownErrorCode","RpcError","metaMessages","cause","code","ProviderRpcError","ParseRpcError","InvalidRequestRpcError","MethodNotFoundRpcError","method","InvalidParamsRpcError","InternalRpcError","InvalidInputRpcError","ResourceNotFoundRpcError","ResourceUnavailableRpcError","TransactionRejectedRpcError","MethodNotSupportedRpcError","LimitExceededRpcError","JsonRpcVersionUnsupportedError","UserRejectedRequestError","UnauthorizedProviderError","UnsupportedProviderMethodError","ProviderDisconnectedError","ChainDisconnectedError","SwitchChainError","UnsupportedNonOptionalCapabilityError","UnsupportedChainIdError","DuplicateIdError","UnknownBundleIdError","BundleTooLargeError","AtomicReadyWalletRejectedUpgradeError","AtomicityNotSupportedError","WalletConnectSessionSettlementError","UnknownRpcError","EXECUTION_REVERTED_ERROR_CODE","getContractError","error","err","publicKeyToAddress","recoverPublicKey","hashHex","n","recoveryBit","toRecoveryBit","v","signatureHex","yParityOrV","recoverAddress","toRlp","getEncodable","getEncodableList","getEncodableBytes","getSizeOfLength","hashAuthorization","recoverAuthorizationAddress","EstimateGasExecutionError","prettyArgs","chain","gasPrice","getEstimateGasError","BaseFeeScalarError","Eip1559FeesNotSupportedError","MaxFeePerGasTooLowError","BlockNotFoundError","identifier","blockHash","blockNumber","transactionType","formatTransaction","transaction_","formatAuthorizationList","defineTransaction","formatBlock","transactions","block","getBlock","includeTransactions_","includeTransactions","blockNumberHex","blockTag","getGasPrice","internal_estimateMaxPriorityFeePerGas","block_","maxPriorityFeePerGas_","maxPriorityFeePerGasHex","internal_estimateFeesPerGas","baseFeeMultiplier","denominator","multiply","fees","request","baseFeePerGas","getTransactionCount","count","blobsToCommitments","blobs","commitments","blob","kzg","blobsToProofs","proofs","commitment","sha256","commitmentToVersionedHash","versionedHash","commitmentsToVersionedHashes","hashes","blobsPerTransaction","fieldElementsPerBlob","bytesPerBlob","maxBytesPerTransaction","BlobSizeTooLargeError","maxSize","EmptyBlobError","InvalidVersionedHashSizeError","InvalidVersionedHashVersionError","toBlobs","size_","toBlobSidecars","sidecars","getTransactionType","getTransactionError","getChainId","chainIdHex","fillTransaction","nonce_","rest","nonceManager","account_","chainFormat","response","hasFeePayerSignature","feeMultiplier","multiplyFee","defaultParameters","eip1559NetworkCache","supportsFillTransaction","prepareTransactionRequest","getChainId$1","fillResult","hasFilledFeePayerSignature","shouldUseFilledFeeToken","from","maxFeePerBlobGas","e","getBlock$1","versionedHashes","isEip1559Network","gasPrice_","estimateGas","rpcStateOverride","stateOverride","estimateContractGas","dataSuffix","formatLog","log","eventName","decodeEventLog","strict_","argTopics","topics","isUnnamed","inputs","indexedInputs","missingIndexedInputs","argIndex","topic","decodeTopic","nonIndexedInputs","inputsToDecode","decodedData","dataIndex","parseEventLogs","abiTopics","logs","formattedLog","abiTopic","event","item","includesArgs","matchArgs","topicInputs","input","readContract","calldata","simulateContract","callRequest","AccountNotFoundError","AccountTypeNotSupportedError","assertCurrentChain","currentChainId","sendRawTransaction","serializedTransaction","supportsWalletNamespace","sendTransaction","nonceManagerParameters","assertChainId","isWalletNamespaceSupported","walletNamespaceError","serializer","signedTransaction","transactionEnvelope","writeContract","internal","assertTransactionEIP7702","assertTransactionEIP1559","assertTransactionEIP4844","blobVersionedHashes","assertTransactionEIP2930","assertTransactionLegacy","serializeAccessList","serializedAccessList","serializeTransaction","serializeTransactionEIP1559","serializeTransactionEIP2930","serializeTransactionEIP4844","serializeTransactionEIP7702","serializeTransactionLegacy","serializedAuthorizationList","serializeAuthorizationList","toYParitySignatureArray","proof","signature_","contractAddress","signatureArray","rlpDepthLimit","fromRlp","fromRlpCursor","recursiveDepth","readLength","readList","isHash","presignMessagePrefix","toPrefixedMessage","message_","hashMessage","InvalidDomainError","domain","InvalidPrimaryTypeError","primaryType","InvalidStructTypeError","InvalidTypedDataTypeError","canonicalType","validateTypedData","validateData","integerMatch","validateReference","getTypesForEIP712Domain","hashTypedData","hashDomain","hashStruct","encodeData","encodedTypes","encodedValues","hashType","field","encodeField","encodedHashType","encodeType","unsortedDeps","findTypeDependencies","deps","primaryType_","results","parsedType","typeValuePairs","t","getSerializedTransactionType","parseTransaction","parseTransactionEIP1559","parseTransactionEIP2930","parseTransactionEIP4844","parseTransactionEIP7702","parseTransactionLegacy","toTransactionArray","parseAccessList","parseAuthorizationList","parseEIP155Signature","transactionOrWrapperArray","hasNetworkWrapper","wrapperArray","chainIdOrV_","chainIdOrV","accessList_","formatUnits","parseUnits","multicall","contracts","batch","batchSize","deployless","multicallAddress","chunkedCalls","currentChunk","currentChunkSize","callData","allowFailure","batching","batches","aggregate3Results","scheduleMulticall","aggregate3Result","success","returnData","schedule","zeroAddress","toAmount","amount","toBaseUnits","requireTokenDecimals","accountKeychain$1","addressRegistry$1","configurableAccount$1","currentCommittee","receivePolicyGuard","signatureVerifier$1","stablecoinDex$1","storageCredits","feeManager$1","feeAmm","tip20ChannelReserve$1","tip20Factory$1","tip20","tip403Registry$1","validatorConfigV2","validatorConfig","zoneFactory","zonePortal","zoneVerifier","earnContributionController","earnEngine","earnEngineAsyncRedeem","earnEngineInKindDeposit","earnFactory","earnFees","earnMerkleRewardDistributor","earnRewardsFactory","earnRouter","earnVault","erc4626Engine","erc4626EngineFactory","vedaEngine","zonePortalPreT13Retired","zoneOutbox","zoneMessenger","zoneInbox","directPropAmm","core","earn","zone","propAmm","coreErrors","parseApproval","approval","getType","isTempo","deserialize","deserializeTempo","serialize$1","serializeTempo","tx","signature_provided","_owner","feePayer","hasPrefilledFeePayerSignature","hasSenderSignature","accountSimulation","shouldStripFeeTokenForSponsorship","transaction_ox","transaction_sender_ox","from$1","access","fromAccessKey","fromRoot","fromConfig","configInput","ownerAccounts","isAccessKeyAccount","signConfigurable","ownerRequest","presign","simulation","isConfigurableAccount","providedSignatures","currentConfig","signedOwners","ownerAccount","fromWebAuthnP256","credential","id","getVoucherSignPayload","getKeyAuthorizationSignPayload","resolveAccessKey","boundFields","restrictions","admin","accessKeyAddress","signKeyAuthorization","configurableState","isAccessKey","isConfigurable","fromBase","parentAddress","raw","innerHash","internal_version","typedData","accessKey","accountKeychain","addressRegistry","configurableAccount","feeManager","pathUsd","signatureVerifier","stablecoinDex","tip20ChannelReserve","tip20Factory","tip403Registry","TempoExecutionError","summary","hints","hint","hardforks","lt","withExecutionError","action","toExecutionError","getFeeToken","context","formatAmount","formatTime","seconds","milliseconds","resolveToken","declared","findDeclaredTokenBySymbol","inferDecimals","findDeclaredToken","tokens","token_","resolveTokenForChain","lowerSymbol","symbol","resolveTokenWithDecimals","pickWriteParameters","resolveCallParameters","defineCall","tip20Prefix","isTip20","signatureTypes","spendPolicies","authorize","signLocal","extractEvent","burnWitness","getMetadata$1","resolveAccessKeyAddress","getMetadata","getRemainingLimit","hardfork","remaining","periodEnd","callWithPeriod","isWitnessBurned","revoke","prepareAuthorization","parsed","authorizationSignPayload","signPayload","updateLimit","verifyHash","AccessKeyError","AccessKeySpendingLimitExceededError","fee","AccessKeyExpiredError","AccessKeyCallNotAllowedError","AccessKeyAlreadyExistsError","limited","AccessKeySignatureTypeMismatchError","expected","actual","AccessKeyExpiryInPastError","minimum","getSigner","signer","authorized","getFeePayer","getAuthorization","errorResolvers$1","requested","withPeriod","legacy","approve","spender","simulate","burnBlocked","burn","memo","changeTransferPolicy","policyId","create","admin_","logoURI","currency","quoteToken","getAllowance","getBalance","overrides","readMetadataContracts","totalSupply","unwrapMulticallResult","paused","supplyCap","transferPolicyId","contract","fallback","getTotalSupply","getRoleAdmin","hasRole","grantRoles","roleHash","extractEvents","events","mint","pause","renounceRoles","revokeRoles","setSupplyCap","setRoleAdmin","adminRoleHash","adminRole","transfer","unpause","prepareUpdateQuoteToken","updateQuoteToken","TokenInsufficientBalanceError","available","required","TokenInsufficientAllowanceError","allowance","TokenSupplyCapExceededError","TokenPolicyForbidsError","party","senderAuthorized","recipientAuthorized","TokenPausedError","TokenUnauthorizedError","requiredRoles","errorResolvers","registry","recipient","messages","interpolate","template","source","parse","descriptors","descriptor","serialize","preimage","extractRevertData","seen","debugMatch","nameMatch","templates"],"sources":["../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/version.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/errors.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/regex.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/formatAbiItem.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/runtime/signatures.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/errors/abiItem.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/errors/signature.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/errors/struct.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/runtime/cache.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/runtime/utils.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/runtime/structs.js","../../../../../node_modules/.pnpm/abitype@1.3.0_typescript@7.0.2_zod@4.6.7/node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/internal/lru.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/Caches.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/Address.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/AbiParameters.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/internal/abiParameters.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/internal/abiItem.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/AbiItem.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/AccessList.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/Secp256k1.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/Rlp.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/Value.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/TxEnvelope.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/core/WebAuthnP256.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/AccountConfig.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/SignatureEnvelope.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/TempoAddress.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/KeyAuthorization.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/AuthorizationTempo.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/TokenId.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/TxEnvelopeTempo.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/Channel.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/TokenRole.js","../../../../../node_modules/.pnpm/ox@0.14.59_typescript@7.0.2_zod@4.6.7/node_modules/ox/_esm/tempo/ZoneId.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/getAction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/rpc.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/errors/getContractError.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/accounts/utils/publicKeyToAddress.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/signature/recoverPublicKey.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/signature/recoverAddress.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/encoding/toRlp.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/authorization/hashAuthorization.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/authorization/recoverAuthorizationAddress.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/estimateGas.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/errors/getEstimateGasError.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/fee.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/block.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/formatters/transaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/formatters/block.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/getBlock.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/getGasPrice.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/estimateMaxPriorityFeePerGas.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/estimateFeesPerGas.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/getTransactionCount.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/blobsToCommitments.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/blobsToProofs.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/hash/sha256.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/commitmentToVersionedHash.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/commitmentsToVersionedHashes.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/constants/blob.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/blob.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/toBlobs.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/blob/toBlobSidecars.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/getTransactionType.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/errors/getTransactionError.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/getChainId.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/fillTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/wallet/prepareTransactionRequest.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/estimateGas.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/estimateContractGas.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/formatters/log.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/abi/decodeEventLog.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/abi/parseEventLogs.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/readContract.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/simulateContract.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/account.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/chain/assertCurrentChain.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/wallet/sendRawTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/wallet/sendTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/wallet/writeContract.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/assertTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/serializeAccessList.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/serializeTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/authorization/serializeAuthorizationList.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/encoding/fromRlp.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/hash/isHash.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/constants/strings.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/signature/toPrefixedMessage.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/signature/hashMessage.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/errors/typedData.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/typedData.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/signature/hashTypedData.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/getSerializedTransactionType.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/transaction/parseTransaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/unit/formatUnits.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/utils/unit/parseUnits.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/public/multicall.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/constants/address.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/actions/token/internal.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/Abis.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/accounts/Signature.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/Transaction.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/Account.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/Addresses.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/errors.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/Hardfork.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/internal/errors.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/internal/utils.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/actions/accessKey.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/actions/token.js","../../../../../node_modules/.pnpm/viem@2.57.12_typescript@7.0.2_zod@4.6.7/node_modules/viem/_esm/tempo/ExecutionError.js"],"sourcesContent":["export const version = '1.3.0';\n//# sourceMappingURL=version.js.map","import { version } from './version.js';\nexport class BaseError extends Error {\n constructor(shortMessage, args = {}) {\n const details = args.cause instanceof BaseError\n ? args.cause.details\n : args.cause?.message\n ? args.cause.message\n : args.details;\n const docsPath = args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n const message = [\n shortMessage || 'An error occurred.',\n '',\n ...(args.metaMessages ? [...args.metaMessages, ''] : []),\n ...(docsPath ? [`Docs: https://abitype.dev${docsPath}`] : []),\n ...(details ? [`Details: ${details}`] : []),\n `Version: abitype@${version}`,\n ].join('\\n');\n super(message);\n Object.defineProperty(this, \"details\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"docsPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metaMessages\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shortMessage\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiTypeError'\n });\n if (args.cause)\n this.cause = args.cause;\n this.details = details;\n this.docsPath = docsPath;\n this.metaMessages = args.metaMessages;\n this.shortMessage = shortMessage;\n }\n}\n//# sourceMappingURL=errors.js.map","// TODO: This looks cool. Need to check the performance of `new RegExp` versus defined inline though.\n// https://twitter.com/GabrielVergnaud/status/1622906834343366657\nexport function execTyped(regex, string) {\n const match = regex.exec(string);\n return match?.groups;\n}\n// `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n// https://regexr.com/6va55\nexport const bytesRegex = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/;\n// `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n// https://regexr.com/6v8hp\nexport const integerRegex = /^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;\nexport const isTupleRegex = /^\\(.+?\\).*?$/;\n//# sourceMappingURL=regex.js.map","import { execTyped } from '../regex.js';\n// https://regexr.com/7f7rv\nconst tupleRegex = /^tuple(?<array>(\\[(\\d*)\\])*)$/;\n/**\n * Formats {@link AbiParameter} to human-readable ABI parameter.\n *\n * @param abiParameter - ABI parameter\n * @returns Human-readable ABI parameter\n *\n * @deprecated Human-readable ABI utilities are moving to Ox.\n * Install [`ox`](https://oxlib.sh) and use [`AbiParameter.format`](https://oxlib.sh/api/AbiParameter/format) instead:\n * `import { AbiParameter } from 'ox'`.\n *\n * @example\n * const result = formatAbiParameter({ type: 'address', name: 'from' })\n * // ^? const result: 'address from'\n */\nexport function formatAbiParameter(abiParameter) {\n let type = abiParameter.type;\n if (tupleRegex.test(abiParameter.type) && 'components' in abiParameter) {\n type = '(';\n const length = abiParameter.components.length;\n for (let i = 0; i < length; i++) {\n const component = abiParameter.components[i];\n type += formatAbiParameter(component);\n if (i < length - 1)\n type += ', ';\n }\n const result = execTyped(tupleRegex, abiParameter.type);\n type += `)${result?.array || ''}`;\n return formatAbiParameter({\n ...abiParameter,\n type,\n });\n }\n // Add `indexed` to type if in `abiParameter`\n if ('indexed' in abiParameter && abiParameter.indexed)\n type = `${type} indexed`;\n // Return human-readable ABI parameter\n if (abiParameter.name)\n return `${type} ${abiParameter.name}`;\n return type;\n}\n//# sourceMappingURL=formatAbiParameter.js.map","import { formatAbiParameter, } from './formatAbiParameter.js';\n/**\n * Formats {@link AbiParameter}s to human-readable ABI parameters.\n *\n * @param abiParameters - ABI parameters\n * @returns Human-readable ABI parameters\n *\n * @deprecated Human-readable ABI utilities are moving to Ox.\n * Install [`ox`](https://oxlib.sh) and use [`AbiParameters.format`](https://oxlib.sh/api/AbiParameters/format) instead:\n * `import { AbiParameters } from 'ox'`.\n *\n * @example\n * const result = formatAbiParameters([\n * // ^? const result: 'address from, uint256 tokenId'\n * { type: 'address', name: 'from' },\n * { type: 'uint256', name: 'tokenId' },\n * ])\n */\nexport function formatAbiParameters(abiParameters) {\n let params = '';\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n params += formatAbiParameter(abiParameter);\n if (i !== length - 1)\n params += ', ';\n }\n return params;\n}\n//# sourceMappingURL=formatAbiParameters.js.map","import { formatAbiParameters, } from './formatAbiParameters.js';\n/**\n * Formats ABI item (e.g. error, event, function) into human-readable ABI item\n *\n * @param abiItem - ABI item\n * @returns Human-readable ABI item\n *\n * @deprecated Human-readable ABI utilities are moving to Ox.\n * Install [`ox`](https://oxlib.sh) and use [`AbiItem.format`](https://oxlib.sh/api/AbiItem/format) instead:\n * `import { AbiItem } from 'ox'`.\n */\nexport function formatAbiItem(abiItem) {\n if (abiItem.type === 'function')\n return `function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability && abiItem.stateMutability !== 'nonpayable'\n ? ` ${abiItem.stateMutability}`\n : ''}${abiItem.outputs?.length\n ? ` returns (${formatAbiParameters(abiItem.outputs)})`\n : ''}`;\n if (abiItem.type === 'event')\n return `event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'error')\n return `error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`;\n if (abiItem.type === 'constructor')\n return `constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n if (abiItem.type === 'fallback')\n return `fallback() external${abiItem.stateMutability === 'payable' ? ' payable' : ''}`;\n return 'receive() external payable';\n}\n//# sourceMappingURL=formatAbiItem.js.map","import { execTyped } from '../../regex.js';\n// https://regexr.com/7gmok\nconst errorSignatureRegex = /^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isErrorSignature(signature) {\n return errorSignatureRegex.test(signature);\n}\nexport function execErrorSignature(signature) {\n return execTyped(errorSignatureRegex, signature);\n}\n// https://regexr.com/7gmoq\nconst eventSignatureRegex = /^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)$/;\nexport function isEventSignature(signature) {\n return eventSignatureRegex.test(signature);\n}\nexport function execEventSignature(signature) {\n return execTyped(eventSignatureRegex, signature);\n}\n// https://regexr.com/7gmot\nconst functionSignatureRegex = /^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\\((?<parameters>.*?)\\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\\s?\\((?<returns>.*?)\\))?$/;\nexport function isFunctionSignature(signature) {\n return functionSignatureRegex.test(signature);\n}\nexport function execFunctionSignature(signature) {\n return execTyped(functionSignatureRegex, signature);\n}\n// https://regexr.com/7gmp3\nconst structSignatureRegex = /^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \\{(?<properties>.*?)\\}$/;\nexport function isStructSignature(signature) {\n return structSignatureRegex.test(signature);\n}\nexport function execStructSignature(signature) {\n return execTyped(structSignatureRegex, signature);\n}\n// https://regexr.com/78u01\nconst constructorSignatureRegex = /^constructor\\((?<parameters>.*?)\\)(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isConstructorSignature(signature) {\n return constructorSignatureRegex.test(signature);\n}\nexport function execConstructorSignature(signature) {\n return execTyped(constructorSignatureRegex, signature);\n}\n// https://regexr.com/7srtn\nconst fallbackSignatureRegex = /^fallback\\(\\) external(?:\\s(?<stateMutability>payable{1}))?$/;\nexport function isFallbackSignature(signature) {\n return fallbackSignatureRegex.test(signature);\n}\nexport function execFallbackSignature(signature) {\n return execTyped(fallbackSignatureRegex, signature);\n}\n// https://regexr.com/78u1k\nconst receiveSignatureRegex = /^receive\\(\\) external payable$/;\nexport function isReceiveSignature(signature) {\n return receiveSignatureRegex.test(signature);\n}\nexport const modifiers = new Set([\n 'memory',\n 'indexed',\n 'storage',\n 'calldata',\n]);\nexport const eventModifiers = new Set(['indexed']);\nexport const functionModifiers = new Set([\n 'calldata',\n 'memory',\n 'storage',\n]);\n//# sourceMappingURL=signatures.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiItemError extends BaseError {\n constructor({ signature }) {\n super('Failed to parse ABI item.', {\n details: `parseAbiItem(${JSON.stringify(signature, null, 2)})`,\n docsPath: '/api/human#parseabiitem-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiItemError'\n });\n }\n}\nexport class UnknownTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [\n `Type \"${type}\" is not a valid ABI type. Perhaps you forgot to include a struct signature?`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownTypeError'\n });\n }\n}\nexport class UnknownSolidityTypeError extends BaseError {\n constructor({ type }) {\n super('Unknown type.', {\n metaMessages: [`Type \"${type}\" is not a valid ABI type.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSolidityTypeError'\n });\n }\n}\n//# sourceMappingURL=abiItem.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidAbiParameterError extends BaseError {\n constructor({ param }) {\n super('Failed to parse ABI parameter.', {\n details: `parseAbiParameter(${JSON.stringify(param, null, 2)})`,\n docsPath: '/api/human#parseabiparameter-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParameterError'\n });\n }\n}\nexport class InvalidAbiParametersError extends BaseError {\n constructor({ params }) {\n super('Failed to parse ABI parameters.', {\n details: `parseAbiParameters(${JSON.stringify(params, null, 2)})`,\n docsPath: '/api/human#parseabiparameters-1',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiParametersError'\n });\n }\n}\nexport class InvalidParameterError extends BaseError {\n constructor({ param }) {\n super('Invalid ABI parameter.', {\n details: param,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParameterError'\n });\n }\n}\nexport class SolidityProtectedKeywordError extends BaseError {\n constructor({ param, name }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `\"${name}\" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SolidityProtectedKeywordError'\n });\n }\n}\nexport class InvalidModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidModifierError'\n });\n }\n}\nexport class InvalidFunctionModifierError extends BaseError {\n constructor({ param, type, modifier, }) {\n super('Invalid ABI parameter.', {\n details: param,\n metaMessages: [\n `Modifier \"${modifier}\" not allowed${type ? ` in \"${type}\" type` : ''}.`,\n `Data location can only be specified for array, struct, or mapping types, but \"${modifier}\" was given.`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidFunctionModifierError'\n });\n }\n}\nexport class InvalidAbiTypeParameterError extends BaseError {\n constructor({ abiParameter, }) {\n super('Invalid ABI parameter.', {\n details: JSON.stringify(abiParameter, null, 2),\n metaMessages: ['ABI parameter type is invalid.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidAbiTypeParameterError'\n });\n }\n}\n//# sourceMappingURL=abiParameter.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidSignatureError extends BaseError {\n constructor({ signature, type, }) {\n super(`Invalid ${type} signature.`, {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidSignatureError'\n });\n }\n}\nexport class UnknownSignatureError extends BaseError {\n constructor({ signature }) {\n super('Unknown signature.', {\n details: signature,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'UnknownSignatureError'\n });\n }\n}\nexport class InvalidStructSignatureError extends BaseError {\n constructor({ signature }) {\n super('Invalid struct signature.', {\n details: signature,\n metaMessages: ['No properties exist.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidStructSignatureError'\n });\n }\n}\n//# sourceMappingURL=signature.js.map","import { BaseError } from '../../errors.js';\nexport class CircularReferenceError extends BaseError {\n constructor({ type }) {\n super('Circular reference detected.', {\n metaMessages: [`Struct \"${type}\" is a circular reference.`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'CircularReferenceError'\n });\n }\n}\n//# sourceMappingURL=struct.js.map","import { BaseError } from '../../errors.js';\nexport class InvalidParenthesisError extends BaseError {\n constructor({ current, depth }) {\n super('Unbalanced parentheses.', {\n metaMessages: [\n `\"${current.trim()}\" has too many ${depth > 0 ? 'opening' : 'closing'} parentheses.`,\n ],\n details: `Depth \"${depth}\"`,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'InvalidParenthesisError'\n });\n }\n}\n//# sourceMappingURL=splitParameters.js.map","/**\n * Gets {@link parameterCache} cache key namespaced by {@link type} and {@link structs}. This prevents parameters from being accessible to types that don't allow them (e.g. `string indexed foo` not allowed outside of `type: 'event'`) and ensures different struct definitions with the same name are cached separately.\n * @param param ABI parameter string\n * @param type ABI parameter type\n * @param structs Struct definitions to include in cache key\n * @returns Cache key for {@link parameterCache}\n */\nexport function getParameterCacheKey(param, type, structs) {\n let structKey = '';\n if (structs)\n for (const struct of Object.entries(structs)) {\n if (!struct)\n continue;\n let propertyKey = '';\n for (const property of struct[1]) {\n propertyKey += `[${property.type}${property.name ? `:${property.name}` : ''}]`;\n }\n structKey += `(${struct[0]}{${propertyKey}})`;\n }\n if (type)\n return `${type}:${param}${structKey}`;\n return `${param}${structKey}`;\n}\n/**\n * Basic cache seeded with common ABI parameter strings.\n *\n * **Note: When seeding more parameters, make sure you benchmark performance. The current number is the ideal balance between performance and having an already existing cache.**\n */\nexport const parameterCache = new Map([\n // Unnamed\n ['address', { type: 'address' }],\n ['bool', { type: 'bool' }],\n ['bytes', { type: 'bytes' }],\n ['bytes32', { type: 'bytes32' }],\n ['int', { type: 'int256' }],\n ['int256', { type: 'int256' }],\n ['string', { type: 'string' }],\n ['uint', { type: 'uint256' }],\n ['uint8', { type: 'uint8' }],\n ['uint16', { type: 'uint16' }],\n ['uint24', { type: 'uint24' }],\n ['uint32', { type: 'uint32' }],\n ['uint64', { type: 'uint64' }],\n ['uint96', { type: 'uint96' }],\n ['uint112', { type: 'uint112' }],\n ['uint160', { type: 'uint160' }],\n ['uint192', { type: 'uint192' }],\n ['uint256', { type: 'uint256' }],\n // Named\n ['address owner', { type: 'address', name: 'owner' }],\n ['address to', { type: 'address', name: 'to' }],\n ['bool approved', { type: 'bool', name: 'approved' }],\n ['bytes _data', { type: 'bytes', name: '_data' }],\n ['bytes data', { type: 'bytes', name: 'data' }],\n ['bytes signature', { type: 'bytes', name: 'signature' }],\n ['bytes32 hash', { type: 'bytes32', name: 'hash' }],\n ['bytes32 r', { type: 'bytes32', name: 'r' }],\n ['bytes32 root', { type: 'bytes32', name: 'root' }],\n ['bytes32 s', { type: 'bytes32', name: 's' }],\n ['string name', { type: 'string', name: 'name' }],\n ['string symbol', { type: 'string', name: 'symbol' }],\n ['string tokenURI', { type: 'string', name: 'tokenURI' }],\n ['uint tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint8 v', { type: 'uint8', name: 'v' }],\n ['uint256 balance', { type: 'uint256', name: 'balance' }],\n ['uint256 tokenId', { type: 'uint256', name: 'tokenId' }],\n ['uint256 value', { type: 'uint256', name: 'value' }],\n // Indexed\n [\n 'event:address indexed from',\n { type: 'address', name: 'from', indexed: true },\n ],\n ['event:address indexed to', { type: 'address', name: 'to', indexed: true }],\n [\n 'event:uint indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n [\n 'event:uint256 indexed tokenId',\n { type: 'uint256', name: 'tokenId', indexed: true },\n ],\n]);\n//# sourceMappingURL=cache.js.map","import { bytesRegex, execTyped, integerRegex, isTupleRegex, } from '../../regex.js';\nimport { UnknownSolidityTypeError } from '../errors/abiItem.js';\nimport { InvalidFunctionModifierError, InvalidModifierError, InvalidParameterError, SolidityProtectedKeywordError, } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, UnknownSignatureError, } from '../errors/signature.js';\nimport { InvalidParenthesisError } from '../errors/splitParameters.js';\nimport { getParameterCacheKey, parameterCache } from './cache.js';\nimport { eventModifiers, execConstructorSignature, execErrorSignature, execEventSignature, execFallbackSignature, execFunctionSignature, functionModifiers, isConstructorSignature, isErrorSignature, isEventSignature, isFallbackSignature, isFunctionSignature, isReceiveSignature, } from './signatures.js';\nexport function parseSignature(signature, structs = {}) {\n if (isFunctionSignature(signature))\n return parseFunctionSignature(signature, structs);\n if (isEventSignature(signature))\n return parseEventSignature(signature, structs);\n if (isErrorSignature(signature))\n return parseErrorSignature(signature, structs);\n if (isConstructorSignature(signature))\n return parseConstructorSignature(signature, structs);\n if (isFallbackSignature(signature))\n return parseFallbackSignature(signature);\n if (isReceiveSignature(signature))\n return {\n type: 'receive',\n stateMutability: 'payable',\n };\n throw new UnknownSignatureError({ signature });\n}\nexport function parseFunctionSignature(signature, structs = {}) {\n const match = execFunctionSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'function' });\n const inputParams = splitParameters(match.parameters);\n const inputs = [];\n const inputLength = inputParams.length;\n for (let i = 0; i < inputLength; i++) {\n inputs.push(parseAbiParameter(inputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n const outputs = [];\n if (match.returns) {\n const outputParams = splitParameters(match.returns);\n const outputLength = outputParams.length;\n for (let i = 0; i < outputLength; i++) {\n outputs.push(parseAbiParameter(outputParams[i], {\n modifiers: functionModifiers,\n structs,\n type: 'function',\n }));\n }\n }\n return {\n name: match.name,\n type: 'function',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs,\n outputs,\n };\n}\nexport function parseEventSignature(signature, structs = {}) {\n const match = execEventSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'event' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], {\n modifiers: eventModifiers,\n structs,\n type: 'event',\n }));\n return { name: match.name, type: 'event', inputs: abiParameters };\n}\nexport function parseErrorSignature(signature, structs = {}) {\n const match = execErrorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'error' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'error' }));\n return { name: match.name, type: 'error', inputs: abiParameters };\n}\nexport function parseConstructorSignature(signature, structs = {}) {\n const match = execConstructorSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'constructor' });\n const params = splitParameters(match.parameters);\n const abiParameters = [];\n const length = params.length;\n for (let i = 0; i < length; i++)\n abiParameters.push(parseAbiParameter(params[i], { structs, type: 'constructor' }));\n return {\n type: 'constructor',\n stateMutability: match.stateMutability ?? 'nonpayable',\n inputs: abiParameters,\n };\n}\nexport function parseFallbackSignature(signature) {\n const match = execFallbackSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'fallback' });\n return {\n type: 'fallback',\n stateMutability: match.stateMutability ?? 'nonpayable',\n };\n}\nconst abiParameterWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\\spayable)?)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst abiParameterWithTupleRegex = /^\\((?<type>.+?)\\)(?<array>(?:\\[\\d*?\\])+?)?(?:\\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/;\nconst dynamicIntegerRegex = /^u?int$/;\nexport function parseAbiParameter(param, options) {\n // optional namespace cache by `type`\n const parameterCacheKey = getParameterCacheKey(param, options?.type, options?.structs);\n if (parameterCache.has(parameterCacheKey))\n return parameterCache.get(parameterCacheKey);\n const isTuple = isTupleRegex.test(param);\n const match = execTyped(isTuple ? abiParameterWithTupleRegex : abiParameterWithoutTupleRegex, param);\n if (!match)\n throw new InvalidParameterError({ param });\n if (match.name && isSolidityKeyword(match.name))\n throw new SolidityProtectedKeywordError({ param, name: match.name });\n const name = match.name ? { name: match.name } : {};\n const indexed = match.modifier === 'indexed' ? { indexed: true } : {};\n const structs = options?.structs ?? {};\n let type;\n let components = {};\n if (isTuple) {\n type = 'tuple';\n const params = splitParameters(match.type);\n const components_ = [];\n const length = params.length;\n for (let i = 0; i < length; i++) {\n // remove `modifiers` from `options` to prevent from being added to tuple components\n components_.push(parseAbiParameter(params[i], { structs }));\n }\n components = { components: components_ };\n }\n else if (match.type in structs) {\n type = 'tuple';\n components = { components: structs[match.type] };\n }\n else if (dynamicIntegerRegex.test(match.type)) {\n type = `${match.type}256`;\n }\n else if (match.type === 'address payable') {\n type = 'address';\n }\n else {\n type = match.type;\n if (!(options?.type === 'struct') && !isSolidityType(type))\n throw new UnknownSolidityTypeError({ type });\n }\n if (match.modifier) {\n // Check if modifier exists, but is not allowed (e.g. `indexed` in `functionModifiers`)\n if (!options?.modifiers?.has?.(match.modifier))\n throw new InvalidModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n // Check if resolved `type` is valid if there is a function modifier\n if (functionModifiers.has(match.modifier) &&\n !isValidDataLocation(type, !!match.array))\n throw new InvalidFunctionModifierError({\n param,\n type: options?.type,\n modifier: match.modifier,\n });\n }\n const abiParameter = {\n type: `${type}${match.array ?? ''}`,\n ...name,\n ...indexed,\n ...components,\n };\n parameterCache.set(parameterCacheKey, abiParameter);\n return abiParameter;\n}\n// s/o latika for this\nexport function splitParameters(params, result = [], current = '', depth = 0) {\n const length = params.trim().length;\n for (let i = 0; i < length; i++) {\n const char = params[i];\n const tail = params.slice(i + 1);\n switch (char) {\n case ',':\n return depth === 0\n ? splitParameters(tail, [...result, current.trim()])\n : splitParameters(tail, result, `${current}${char}`, depth);\n case '(':\n return splitParameters(tail, result, `${current}${char}`, depth + 1);\n case ')':\n return splitParameters(tail, result, `${current}${char}`, depth - 1);\n default:\n return splitParameters(tail, result, `${current}${char}`, depth);\n }\n }\n if (current === '')\n return result;\n if (depth !== 0)\n throw new InvalidParenthesisError({ current, depth });\n result.push(current.trim());\n return result;\n}\nexport function isSolidityType(type) {\n return (type === 'address' ||\n type === 'bool' ||\n type === 'function' ||\n type === 'string' ||\n bytesRegex.test(type) ||\n integerRegex.test(type));\n}\nconst protectedKeywordsRegex = /^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;\n/** @internal */\nexport function isSolidityKeyword(name) {\n return (name === 'address' ||\n name === 'bool' ||\n name === 'function' ||\n name === 'string' ||\n name === 'tuple' ||\n bytesRegex.test(name) ||\n integerRegex.test(name) ||\n protectedKeywordsRegex.test(name));\n}\n/** @internal */\nexport function isValidDataLocation(type, isArray) {\n return isArray || type === 'bytes' || type === 'string' || type === 'tuple';\n}\n//# sourceMappingURL=utils.js.map","import { execTyped, isTupleRegex } from '../../regex.js';\nimport { UnknownTypeError } from '../errors/abiItem.js';\nimport { InvalidAbiTypeParameterError } from '../errors/abiParameter.js';\nimport { InvalidSignatureError, InvalidStructSignatureError, } from '../errors/signature.js';\nimport { CircularReferenceError } from '../errors/struct.js';\nimport { execStructSignature, isStructSignature } from './signatures.js';\nimport { isSolidityType, parseAbiParameter } from './utils.js';\nexport function parseStructs(signatures) {\n // Create \"shallow\" version of each struct (and filter out non-structs or invalid structs)\n const shallowStructs = {};\n const signaturesLength = signatures.length;\n for (let i = 0; i < signaturesLength; i++) {\n const signature = signatures[i];\n if (!isStructSignature(signature))\n continue;\n const match = execStructSignature(signature);\n if (!match)\n throw new InvalidSignatureError({ signature, type: 'struct' });\n const properties = match.properties.split(';');\n const components = [];\n const propertiesLength = properties.length;\n for (let k = 0; k < propertiesLength; k++) {\n const property = properties[k];\n const trimmed = property.trim();\n if (!trimmed)\n continue;\n const abiParameter = parseAbiParameter(trimmed, {\n type: 'struct',\n });\n components.push(abiParameter);\n }\n if (!components.length)\n throw new InvalidStructSignatureError({ signature });\n shallowStructs[match.name] = components;\n }\n // Resolve nested structs inside each parameter\n const resolvedStructs = {};\n const entries = Object.entries(shallowStructs);\n const entriesLength = entries.length;\n for (let i = 0; i < entriesLength; i++) {\n const [name, parameters] = entries[i];\n resolvedStructs[name] = resolveStructs(parameters, shallowStructs);\n }\n return resolvedStructs;\n}\nconst typeWithoutTupleRegex = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\\[\\d*?\\])+?)?$/;\nfunction resolveStructs(abiParameters = [], structs = {}, ancestors = new Set()) {\n const components = [];\n const length = abiParameters.length;\n for (let i = 0; i < length; i++) {\n const abiParameter = abiParameters[i];\n const isTuple = isTupleRegex.test(abiParameter.type);\n if (isTuple)\n components.push(abiParameter);\n else {\n const match = execTyped(typeWithoutTupleRegex, abiParameter.type);\n if (!match?.type)\n throw new InvalidAbiTypeParameterError({ abiParameter });\n const { array, type } = match;\n if (type in structs) {\n if (ancestors.has(type))\n throw new CircularReferenceError({ type });\n components.push({\n ...abiParameter,\n type: `tuple${array ?? ''}`,\n components: resolveStructs(structs[type], structs, new Set([...ancestors, type])),\n });\n }\n else {\n if (isSolidityType(type))\n components.push(abiParameter);\n else\n throw new UnknownTypeError({ type });\n }\n }\n }\n return components;\n}\n//# sourceMappingURL=structs.js.map","import { InvalidAbiParametersError } from './errors/abiParameter.js';\nimport { isStructSignature, modifiers } from './runtime/signatures.js';\nimport { parseStructs } from './runtime/structs.js';\nimport { splitParameters } from './runtime/utils.js';\nimport { parseAbiParameter as parseAbiParameter_ } from './runtime/utils.js';\n/**\n * Parses human-readable ABI parameters into {@link AbiParameter}s\n *\n * @param params - Human-readable ABI parameters\n * @returns Parsed {@link AbiParameter}s\n *\n * @deprecated Human-readable ABI utilities are moving to Ox.\n * Install [`ox`](https://oxlib.sh) and use [`AbiParameters.from`](https://oxlib.sh/api/AbiParameters/from) instead:\n * `import { AbiParameters } from 'ox'`.\n *\n * @example\n * const abiParameters = parseAbiParameters('address from, address to, uint256 amount')\n * // ^? const abiParameters: [{ type: \"address\"; name: \"from\"; }, { type: \"address\";...\n *\n * @example\n * const abiParameters = parseAbiParameters([\n * // ^? const abiParameters: [{ type: \"tuple\"; components: [{ type: \"string\"; name:...\n * 'Baz bar',\n * 'struct Baz { string name; }',\n * ])\n */\nexport function parseAbiParameters(params) {\n const abiParameters = [];\n if (typeof params === 'string') {\n const parameters = splitParameters(params);\n const length = parameters.length;\n for (let i = 0; i < length; i++) {\n abiParameters.push(parseAbiParameter_(parameters[i], { modifiers }));\n }\n }\n else {\n const structs = parseStructs(params);\n const length = params.length;\n for (let i = 0; i < length; i++) {\n const signature = params[i];\n if (isStructSignature(signature))\n continue;\n const parameters = splitParameters(signature);\n const length = parameters.length;\n for (let k = 0; k < length; k++) {\n abiParameters.push(parseAbiParameter_(parameters[k], { modifiers, structs }));\n }\n }\n }\n if (abiParameters.length === 0)\n throw new InvalidAbiParametersError({ params });\n return abiParameters;\n}\n//# sourceMappingURL=parseAbiParameters.js.map","/**\n * @internal\n *\n * Map with a LRU (Least recently used) policy.\n * @see https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU\n */\nexport class LruMap extends Map {\n constructor(size) {\n super();\n Object.defineProperty(this, \"maxSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.maxSize = size;\n }\n get(key) {\n const value = super.get(key);\n if (super.has(key) && value !== undefined) {\n this.delete(key);\n super.set(key, value);\n }\n return value;\n }\n set(key, value) {\n super.set(key, value);\n if (this.maxSize && this.size > this.maxSize) {\n const firstKey = this.keys().next().value;\n if (firstKey)\n this.delete(firstKey);\n }\n return this;\n }\n}\n//# sourceMappingURL=lru.js.map","import { LruMap } from './internal/lru.js';\nconst caches = {\n checksum: /*#__PURE__*/ new LruMap(8192),\n};\nexport const checksum = caches.checksum;\n/**\n * Clears all global caches.\n *\n * @example\n * ```ts\n * import { Caches } from 'ox'\n * Caches.clear()\n * ```\n */\nexport function clear() {\n for (const cache of Object.values(caches))\n cache.clear();\n}\n//# sourceMappingURL=Caches.js.map","import * as Bytes from './Bytes.js';\nimport * as Caches from './Caches.js';\nimport * as Errors from './Errors.js';\nimport * as Hash from './Hash.js';\nimport * as PublicKey from './PublicKey.js';\nconst addressRegex = /^0x[a-fA-F0-9]{40}$/;\n/**\n * Asserts that the given value is a valid {@link ox#Address.Address}.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.assert('0xA0Cf798816D4b9b9866b5330EEa46a18382f251e')\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.assert('0xdeadbeef')\n * // @error: InvalidAddressError: Address \"0xdeadbeef\" is invalid.\n * ```\n *\n * @param value - Value to assert if it is a valid address.\n * @param options - Assertion options.\n */\nexport function assert(value, options = {}) {\n const { strict = true } = options;\n if (!addressRegex.test(value))\n throw new InvalidAddressError({\n address: value,\n cause: new InvalidInputError(),\n });\n if (strict) {\n if (value.toLowerCase() === value)\n return;\n if (checksum(value) !== value)\n throw new InvalidAddressError({\n address: value,\n cause: new InvalidChecksumError(),\n });\n }\n}\n/**\n * Computes the checksum address for the given {@link ox#Address.Address}.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.checksum('0xa0cf798816d4b9b9866b5330eea46a18382f251e')\n * // @log: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'\n * ```\n *\n * @param address - The address to compute the checksum for.\n * @returns The checksummed address.\n */\nexport function checksum(address) {\n if (Caches.checksum.has(address))\n return Caches.checksum.get(address);\n assert(address, { strict: false });\n const hexAddress = address.substring(2).toLowerCase();\n const hash = Hash.keccak256(Bytes.fromString(hexAddress), { as: 'Bytes' });\n const characters = hexAddress.split('');\n for (let i = 0; i < 40; i += 2) {\n if (hash[i >> 1] >> 4 >= 8 && characters[i]) {\n characters[i] = characters[i].toUpperCase();\n }\n if ((hash[i >> 1] & 0x0f) >= 8 && characters[i + 1]) {\n characters[i + 1] = characters[i + 1].toUpperCase();\n }\n }\n const result = `0x${characters.join('')}`;\n Caches.checksum.set(address, result);\n return result;\n}\n/**\n * Converts a stringified address to a typed (optionally checksummed) {@link ox#Address.Address}.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.from('0xa0cf798816d4b9b9866b5330eea46a18382f251e')\n * // @log: '0xa0cf798816d4b9b9866b5330eea46a18382f251e'\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.from('0xa0cf798816d4b9b9866b5330eea46a18382f251e', {\n * checksum: true\n * })\n * // @log: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.from('hello')\n * // @error: InvalidAddressError: Address \"0xa\" is invalid.\n * ```\n *\n * @param address - An address string to convert to a typed Address.\n * @param options - Conversion options.\n * @returns The typed Address.\n */\nexport function from(address, options = {}) {\n const { checksum: checksumVal = false } = options;\n assert(address);\n if (checksumVal)\n return checksum(address);\n return address;\n}\n/**\n * Converts an ECDSA public key to an {@link ox#Address.Address}.\n *\n * @example\n * ```ts twoslash\n * import { Address, PublicKey } from 'ox'\n *\n * const publicKey = PublicKey.from(\n * '0x048318535b54105d4a7aae60c08fc45f9687181b4fdfc625bd1a753fa7397fed753547f11ca8696646f2f3acb08e31016afac23e630c5d11f59f61fef57b0d2aa5',\n * )\n * const address = Address.fromPublicKey(publicKey)\n * // @log: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266'\n * ```\n *\n * @param publicKey - The ECDSA public key to convert to an {@link ox#Address.Address}.\n * @param options - Conversion options.\n * @returns The {@link ox#Address.Address} corresponding to the public key.\n */\nexport function fromPublicKey(publicKey, options = {}) {\n const address = Hash.keccak256(`0x${PublicKey.toHex(publicKey).slice(4)}`).substring(26);\n return from(`0x${address}`, options);\n}\n/**\n * Checks if two {@link ox#Address.Address} are equal.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.isEqual(\n * '0xa0cf798816d4b9b9866b5330eea46a18382f251e',\n * '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'\n * )\n * // @log: true\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.isEqual(\n * '0xa0cf798816d4b9b9866b5330eea46a18382f251e',\n * '0xA0Cf798816D4b9b9866b5330EEa46a18382f251f'\n * )\n * // @log: false\n * ```\n *\n * @param addressA - The first address to compare.\n * @param addressB - The second address to compare.\n * @returns Whether the addresses are equal.\n */\nexport function isEqual(addressA, addressB) {\n assert(addressA, { strict: false });\n assert(addressB, { strict: false });\n return addressA.toLowerCase() === addressB.toLowerCase();\n}\n/**\n * Checks if the given address is a valid {@link ox#Address.Address}.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.validate('0xA0Cf798816D4b9b9866b5330EEa46a18382f251e')\n * // @log: true\n * ```\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.validate('0xdeadbeef')\n * // @log: false\n * ```\n *\n * @param address - Value to check if it is a valid address.\n * @param options - Check options.\n * @returns Whether the address is a valid address.\n */\nexport function validate(address, options = {}) {\n const { strict = true } = options ?? {};\n try {\n assert(address, { strict });\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Thrown when an address is invalid.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n *\n * Address.from('0x123')\n * // @error: Address.InvalidAddressError: Address `0x123` is invalid.\n * ```\n */\nexport class InvalidAddressError extends Errors.BaseError {\n constructor({ address, cause }) {\n super(`Address \"${address}\" is invalid.`, {\n cause,\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Address.InvalidAddressError'\n });\n }\n}\n/** Thrown when an address is not a 20 byte (40 hexadecimal character) value. */\nexport class InvalidInputError extends Errors.BaseError {\n constructor() {\n super('Address is not a 20 byte (40 hexadecimal character) value.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Address.InvalidInputError'\n });\n }\n}\n/** Thrown when an address does not match its checksum counterpart. */\nexport class InvalidChecksumError extends Errors.BaseError {\n constructor() {\n super('Address does not match its checksum counterpart.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Address.InvalidChecksumError'\n });\n }\n}\n//# sourceMappingURL=Address.js.map","import * as abitype from 'abitype';\nimport * as Address from './Address.js';\nimport * as Bytes from './Bytes.js';\nimport * as Errors from './Errors.js';\nimport * as Hex from './Hex.js';\nimport * as internal from './internal/abiParameters.js';\nimport * as Cursor from './internal/cursor.js';\nimport * as Solidity from './Solidity.js';\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function decode(parameters, data, options = {}) {\n const { as = 'Array', checksumAddress = false } = options;\n const bytes = typeof data === 'string' ? Bytes.fromHex(data) : data;\n const cursor = Cursor.create(bytes);\n if (Bytes.size(bytes) === 0 && parameters.length > 0)\n throw new ZeroDataError();\n if (Bytes.size(bytes) && Bytes.size(bytes) < 32)\n throw new DataSizeTooSmallError({\n data: typeof data === 'string' ? data : Hex.fromBytes(data),\n parameters: parameters,\n size: Bytes.size(bytes),\n });\n let consumed = 0;\n const values = as === 'Array' ? [] : {};\n for (let i = 0; i < parameters.length; ++i) {\n const param = parameters[i];\n // Zero-width types (e.g. `uint256[0]`, empty tuples) at the end of the\n // data consume no bytes, so the cursor may already be exhausted.\n if (consumed < bytes.length)\n cursor.setPosition(consumed);\n const [data, consumed_] = internal.decodeParameter(cursor, param, {\n checksumAddress,\n staticPosition: 0,\n });\n consumed += consumed_;\n if (as === 'Array')\n values.push(data);\n else\n values[param.name ?? i] = data;\n }\n return values;\n}\n/**\n * Encodes primitive values into ABI encoded data as per the [Application Binary Interface (ABI) Specification](https://docs.soliditylang.org/en/latest/abi-spec).\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const data = AbiParameters.encode(\n * AbiParameters.from(['string', 'uint', 'bool']),\n * ['wagmi', 420n, true],\n * )\n * ```\n *\n * @example\n * ### JSON Parameters\n *\n * Specify **JSON ABI** Parameters as schema:\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const data = AbiParameters.encode(\n * [\n * { type: 'string', name: 'name' },\n * { type: 'uint', name: 'age' },\n * { type: 'bool', name: 'isOwner' },\n * ],\n * ['wagmi', 420n, true],\n * )\n * ```\n *\n * @param parameters - The set of ABI parameters to encode, in the shape of the `inputs` or `outputs` attribute of an ABI Item. These parameters must include valid [ABI types](https://docs.soliditylang.org/en/latest/types.html).\n * @param values - The set of primitive values that correspond to the ABI types defined in `parameters`.\n * @returns ABI encoded data.\n */\nexport function encode(parameters, values, options) {\n const { checksumAddress = false } = options ?? {};\n if (parameters.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: parameters.length,\n givenLength: values.length,\n });\n // Prepare the parameters to determine dynamic types to encode.\n const preparedParameters = internal.prepareParameters({\n checksumAddress,\n parameters: parameters,\n values: values,\n });\n const data = internal.encode(preparedParameters);\n if (data.length === 0)\n return '0x';\n return data;\n}\n/**\n * Encodes an array of primitive values to a [packed ABI encoding](https://docs.soliditylang.org/en/latest/abi-spec.html#non-standard-packed-mode).\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const encoded = AbiParameters.encodePacked(\n * ['address', 'string'],\n * ['0xd8da6bf26964af9d7eed9e03e53415d37aa96045', 'hello world'],\n * )\n * // @log: '0xd8da6bf26964af9d7eed9e03e53415d37aa9604568656c6c6f20776f726c64'\n * ```\n *\n * @param types - Set of ABI types to pack encode.\n * @param values - The set of primitive values that correspond to the ABI types defined in `types`.\n * @returns The encoded packed data.\n */\nexport function encodePacked(types, values) {\n if (types.length !== values.length)\n throw new LengthMismatchError({\n expectedLength: types.length,\n givenLength: values.length,\n });\n const data = [];\n for (let i = 0; i < types.length; i++) {\n const type = types[i];\n const value = values[i];\n data.push(encodePacked.encode(type, value));\n }\n return Hex.concat(...data);\n}\n(function (encodePacked) {\n // eslint-disable-next-line jsdoc/require-jsdoc\n function encode(type, value, isArray = false) {\n if (type === 'address') {\n const address = value;\n Address.assert(address);\n return Hex.padLeft(address.toLowerCase(), isArray ? 32 : 0);\n }\n if (type === 'string')\n return Hex.fromString(value);\n if (type === 'bytes')\n return value;\n if (type === 'bool')\n return Hex.padLeft(Hex.fromBoolean(value), isArray ? 32 : 1);\n const intMatch = type.match(Solidity.integerRegex);\n if (intMatch) {\n const [_type, baseType, bits = '256'] = intMatch;\n const size = Number.parseInt(bits, 10) / 8;\n return Hex.fromNumber(value, {\n size: isArray ? 32 : size,\n signed: baseType === 'int',\n });\n }\n const bytesMatch = type.match(Solidity.bytesRegex);\n if (bytesMatch) {\n const [_type, size] = bytesMatch;\n if (Number.parseInt(size, 10) !== (value.length - 2) / 2)\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size, 10),\n value: value,\n });\n return Hex.padRight(value, isArray ? 32 : 0);\n }\n const arrayMatch = type.match(Solidity.arrayRegex);\n if (arrayMatch && Array.isArray(value)) {\n const [_type, childType] = arrayMatch;\n const data = [];\n for (let i = 0; i < value.length; i++) {\n data.push(encode(childType, value[i], true));\n }\n if (data.length === 0)\n return '0x';\n return Hex.concat(...data);\n }\n throw new InvalidTypeError(type);\n }\n encodePacked.encode = encode;\n})(encodePacked || (encodePacked = {}));\n/**\n * Formats {@link ox#AbiParameters.AbiParameters} into **Human Readable ABI Parameters**.\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const formatted = AbiParameters.format([\n * {\n * name: 'spender',\n * type: 'address',\n * },\n * {\n * name: 'amount',\n * type: 'uint256',\n * },\n * ])\n *\n * formatted\n * // ^?\n *\n *\n * ```\n *\n * @param parameters - The ABI Parameters to format.\n * @returns The formatted ABI Parameters .\n */\nexport function format(parameters) {\n return abitype.formatAbiParameters(parameters);\n}\n/**\n * Parses arbitrary **JSON ABI Parameters** or **Human Readable ABI Parameters** into typed {@link ox#AbiParameters.AbiParameters}.\n *\n * @example\n * ### JSON Parameters\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const parameters = AbiParameters.from([\n * {\n * name: 'spender',\n * type: 'address',\n * },\n * {\n * name: 'amount',\n * type: 'uint256',\n * },\n * ])\n *\n * parameters\n * //^?\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * ### Human Readable Parameters\n *\n * Human Readable ABI Parameters can be parsed into a typed {@link ox#AbiParameters.AbiParameters}:\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const parameters = AbiParameters.from('address spender, uint256 amount')\n *\n * parameters\n * //^?\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * It is possible to specify `struct`s along with your definitions:\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * const parameters = AbiParameters.from([\n * 'struct Foo { address spender; uint256 amount; }', // [!code hl]\n * 'Foo foo, address bar',\n * ])\n *\n * parameters\n * //^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n *\n *\n * @param parameters - The ABI Parameters to parse.\n * @returns The typed ABI Parameters.\n */\nexport function from(parameters) {\n if (Array.isArray(parameters) && typeof parameters[0] === 'string')\n return abitype.parseAbiParameters(parameters);\n if (typeof parameters === 'string')\n return abitype.parseAbiParameters(parameters);\n return parameters;\n}\n/**\n * Throws when the data size is too small for the given parameters.\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * AbiParameters.decode([{ type: 'uint256' }], '0x010f')\n * // ↑ ❌ 2 bytes\n * // @error: AbiParameters.DataSizeTooSmallError: Data size of 2 bytes is too small for given parameters.\n * // @error: Params: (uint256)\n * // @error: Data: 0x010f (2 bytes)\n * ```\n *\n * ### Solution\n *\n * Pass a valid data size.\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * AbiParameters.decode([{ type: 'uint256' }], '0x00000000000000000000000000000000000000000000000000000000000010f')\n * // ↑ ✅ 32 bytes\n * ```\n */\nexport class DataSizeTooSmallError extends Errors.BaseError {\n constructor({ data, parameters, size, }) {\n super(`Data size of ${size} bytes is too small for given parameters.`, {\n metaMessages: [\n `Params: (${abitype.formatAbiParameters(parameters)})`,\n `Data: ${data} (${size} bytes)`,\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.DataSizeTooSmallError'\n });\n }\n}\n/**\n * Throws when zero data is provided, but data is expected.\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * AbiParameters.decode([{ type: 'uint256' }], '0x')\n * // ↑ ❌ zero data\n * // @error: AbiParameters.DataSizeTooSmallError: Data size of 2 bytes is too small for given parameters.\n * // @error: Params: (uint256)\n * // @error: Data: 0x010f (2 bytes)\n * ```\n *\n * ### Solution\n *\n * Pass valid data.\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * AbiParameters.decode([{ type: 'uint256' }], '0x00000000000000000000000000000000000000000000000000000000000010f')\n * // ↑ ✅ 32 bytes\n * ```\n */\nexport class ZeroDataError extends Errors.BaseError {\n constructor() {\n super('Cannot decode zero data (\"0x\") with ABI parameters.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.ZeroDataError'\n });\n }\n}\n/**\n * The length of the array value does not match the length specified in the corresponding ABI parameter.\n *\n * ### Example\n *\n * ```ts twoslash\n * // @noErrors\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from('uint256[3]'), [[69n, 420n]])\n * // ↑ expected: 3 ↑ ❌ length: 2\n * // @error: AbiParameters.ArrayLengthMismatchError: ABI encoding array length mismatch\n * // @error: for type `uint256[3]`. Expected: `3`. Given: `2`.\n * ```\n *\n * ### Solution\n *\n * Pass an array of the correct length.\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from(['uint256[3]']), [[69n, 420n, 69n]])\n * // ↑ ✅ length: 3\n * ```\n */\nexport class ArrayLengthMismatchError extends Errors.BaseError {\n constructor({ expectedLength, givenLength, type, }) {\n super(`Array length mismatch for type \\`${type}\\`. Expected: \\`${expectedLength}\\`. Given: \\`${givenLength}\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.ArrayLengthMismatchError'\n });\n }\n}\n/**\n * The size of the bytes value does not match the size specified in the corresponding ABI parameter.\n *\n * ### Example\n *\n * ```ts twoslash\n * // @noErrors\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from('bytes8'), [['0xdeadbeefdeadbeefdeadbeef']])\n * // ↑ expected: 8 bytes ↑ ❌ size: 12 bytes\n * // @error: BytesSizeMismatchError: Size of bytes \"0xdeadbeefdeadbeefdeadbeef\"\n * // @error: (bytes12) does not match expected size (bytes8).\n * ```\n *\n * ### Solution\n *\n * Pass a bytes value of the correct size.\n *\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from(['bytes8']), ['0xdeadbeefdeadbeef'])\n * // ↑ ✅ size: 8 bytes\n * ```\n */\nexport class BytesSizeMismatchError extends Errors.BaseError {\n constructor({ expectedSize, value, }) {\n super(`Size of bytes \"${value}\" (bytes${Hex.size(value)}) does not match expected size (bytes${expectedSize}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.BytesSizeMismatchError'\n });\n }\n}\n/**\n * The length of the values to encode does not match the length of the ABI parameters.\n *\n * ### Example\n *\n * ```ts twoslash\n * // @noErrors\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from(['string', 'uint256']), ['hello'])\n * // @error: LengthMismatchError: ABI encoding params/values length mismatch.\n * // @error: Expected length (params): 2\n * // @error: Given length (values): 1\n * ```\n *\n * ### Solution\n *\n * Pass the correct number of values to encode.\n *\n * ### Solution\n *\n * Pass a [valid ABI type](https://docs.soliditylang.org/en/develop/abi-spec.html#types).\n */\nexport class LengthMismatchError extends Errors.BaseError {\n constructor({ expectedLength, givenLength, }) {\n super([\n 'ABI encoding parameters/values length mismatch.',\n `Expected length (parameters): ${expectedLength}`,\n `Given length (values): ${givenLength}`,\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.LengthMismatchError'\n });\n }\n}\n/**\n * The value provided is not a valid array as specified in the corresponding ABI parameter.\n *\n * ### Example\n *\n * ```ts twoslash\n * // @noErrors\n * import { AbiParameters } from 'ox'\n * // ---cut---\n * AbiParameters.encode(AbiParameters.from(['uint256[3]']), [69])\n * ```\n *\n * ### Solution\n *\n * Pass an array value.\n */\nexport class InvalidArrayError extends Errors.BaseError {\n constructor(value) {\n super(`Value \\`${value}\\` is not a valid array.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.InvalidArrayError'\n });\n }\n}\n/**\n * Throws when the ABI parameter type is invalid.\n *\n * @example\n * ```ts twoslash\n * import { AbiParameters } from 'ox'\n *\n * AbiParameters.decode([{ type: 'lol' }], '0x00000000000000000000000000000000000000000000000000000000000010f')\n * // ↑ ❌ invalid type\n * // @error: AbiParameters.InvalidTypeError: Type `lol` is not a valid ABI Type.\n * ```\n */\nexport class InvalidTypeError extends Errors.BaseError {\n constructor(type) {\n super(`Type \\`${type}\\` is not a valid ABI Type.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiParameters.InvalidTypeError'\n });\n }\n}\n//# sourceMappingURL=AbiParameters.js.map","import * as AbiParameters from '../AbiParameters.js';\nimport * as Address from '../Address.js';\nimport * as Bytes from '../Bytes.js';\nimport * as Errors from '../Errors.js';\nimport * as Hex from '../Hex.js';\nimport { integerRegex } from '../Solidity.js';\n/** @internal */\nexport function decodeParameter(cursor, param, options) {\n const { checksumAddress, staticPosition } = options;\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return decodeArray(cursor, { ...param, type }, { checksumAddress, length, staticPosition });\n }\n if (param.type === 'tuple')\n return decodeTuple(cursor, param, {\n checksumAddress,\n staticPosition,\n });\n if (param.type === 'address')\n return decodeAddress(cursor, { checksum: checksumAddress });\n if (param.type === 'bool')\n return decodeBool(cursor);\n if (param.type.startsWith('bytes'))\n return decodeBytes(cursor, param, { staticPosition });\n if (param.type.startsWith('uint') || param.type.startsWith('int'))\n return decodeNumber(cursor, param);\n if (param.type === 'string')\n return decodeString(cursor, { staticPosition });\n throw new AbiParameters.InvalidTypeError(param.type);\n}\nconst sizeOfLength = 32;\nconst sizeOfOffset = 32;\n/** @internal */\nexport function decodeAddress(cursor, options = {}) {\n const { checksum = false } = options;\n const value = cursor.readBytes(32);\n const wrap = (address) => checksum ? Address.checksum(address) : address;\n return [wrap(Hex.fromBytes(Bytes.slice(value, -20))), 32];\n}\n/** @internal */\nexport function decodeArray(cursor, param, options) {\n const { checksumAddress, length, staticPosition } = options;\n // If the length of the array is not known in advance (dynamic array),\n // this means we will need to wonder off to the pointer and decode.\n // Note: zero-length fixed arrays (`T[0]`) are not dynamic.\n if (length === null) {\n // Dealing with a dynamic type, so get the offset of the array data.\n const offset = Bytes.toNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const startOfData = start + sizeOfLength;\n // Get the length of the array from the offset.\n cursor.setPosition(start);\n const length = Bytes.toNumber(cursor.readBytes(sizeOfLength));\n // Check if the array has any dynamic children.\n const dynamicChild = hasDynamicChild(param);\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // If any of the children is dynamic, then all elements will be offset pointer, thus size of one slot (32 bytes).\n // Otherwise, elements will be the size of their encoding (consumed bytes).\n cursor.setPosition(startOfData + (dynamicChild ? i * 32 : consumed));\n const [data, consumed_] = decodeParameter(cursor, param, {\n checksumAddress,\n staticPosition: startOfData,\n });\n consumed += consumed_;\n value.push(data);\n // Charge zero-width elements against the read limit to bound work\n // on huge lengths of zero-width types (e.g. `uint256[0][]`).\n if (consumed_ === 0) {\n cursor.assertReadLimit();\n cursor._touch();\n }\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance,\n // and the length of an element deeply nested in the array is not known,\n // we need to decode the offset of the array data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the array data.\n const offset = Bytes.toNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n const value = [];\n for (let i = 0; i < length; ++i) {\n // Move cursor along to the next slot (next offset pointer).\n cursor.setPosition(start + i * 32);\n const [data] = decodeParameter(cursor, param, {\n checksumAddress,\n staticPosition: start,\n });\n value.push(data);\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the length of the array is known in advance and the array is deeply static,\n // then we can just decode each element in sequence.\n let consumed = 0;\n const value = [];\n for (let i = 0; i < length; ++i) {\n const [data, consumed_] = decodeParameter(cursor, param, {\n checksumAddress,\n staticPosition: staticPosition + consumed,\n });\n consumed += consumed_;\n value.push(data);\n // Charge zero-width elements against the read limit to bound work\n // on huge lengths of zero-width types (e.g. `uint256[0][4294967295]`).\n if (consumed_ === 0) {\n cursor.assertReadLimit();\n cursor._touch();\n }\n }\n return [value, consumed];\n}\n/** @internal */\nexport function decodeBool(cursor) {\n return [Bytes.toBoolean(cursor.readBytes(32), { size: 32 }), 32];\n}\n/** @internal */\nexport function decodeBytes(cursor, param, { staticPosition }) {\n const [_, size] = param.type.split('bytes');\n if (!size) {\n // Dealing with dynamic types, so get the offset of the bytes data.\n const offset = Bytes.toNumber(cursor.readBytes(32));\n // Set position of the cursor to start of bytes data.\n cursor.setPosition(staticPosition + offset);\n const length = Bytes.toNumber(cursor.readBytes(32));\n // If there is no length, we have zero data.\n if (length === 0) {\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return ['0x', 32];\n }\n const data = cursor.readBytes(length);\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [Hex.fromBytes(data), 32];\n }\n const value = Hex.fromBytes(cursor.readBytes(Number.parseInt(size, 10), 32));\n return [value, 32];\n}\n/** @internal */\nexport function decodeNumber(cursor, param) {\n const signed = param.type.startsWith('int');\n const size = Number.parseInt(param.type.split('int')[1] || '256', 10);\n const value = cursor.readBytes(32);\n return [\n size > 48\n ? Bytes.toBigInt(value, { signed })\n : Bytes.toNumber(value, { signed }),\n 32,\n ];\n}\n/** @internal */\nexport function decodeTuple(cursor, param, options) {\n const { checksumAddress, staticPosition } = options;\n // Tuples can have unnamed components (i.e. they are arrays), so we must\n // determine whether the tuple is named or unnamed. In the case of a named\n // tuple, the value will be an object where each property is the name of the\n // component. In the case of an unnamed tuple, the value will be an array.\n const hasUnnamedChild = param.components.length === 0 || param.components.some(({ name }) => !name);\n // Initialize the value to an object or an array, depending on whether the\n // tuple is named or unnamed.\n const value = hasUnnamedChild ? [] : {};\n let consumed = 0;\n // If the tuple has a dynamic child, we must first decode the offset to the\n // tuple data.\n if (hasDynamicChild(param)) {\n // Dealing with dynamic types, so get the offset of the tuple data.\n const offset = Bytes.toNumber(cursor.readBytes(sizeOfOffset));\n // Start is the static position of referencing slot + offset.\n const start = staticPosition + offset;\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n cursor.setPosition(start + consumed);\n const [data, consumed_] = decodeParameter(cursor, component, {\n checksumAddress,\n staticPosition: start,\n });\n consumed += consumed_;\n value[hasUnnamedChild ? i : component?.name] = data;\n }\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n }\n // If the tuple has static children, we can just decode each component\n // in sequence.\n for (let i = 0; i < param.components.length; ++i) {\n const component = param.components[i];\n const [data, consumed_] = decodeParameter(cursor, component, {\n checksumAddress,\n staticPosition,\n });\n value[hasUnnamedChild ? i : component?.name] = data;\n consumed += consumed_;\n }\n return [value, consumed];\n}\n/** @internal */\nexport function decodeString(cursor, { staticPosition }) {\n // Get offset to start of string data.\n const offset = Bytes.toNumber(cursor.readBytes(32));\n // Start is the static position of current slot + offset.\n const start = staticPosition + offset;\n cursor.setPosition(start);\n const length = Bytes.toNumber(cursor.readBytes(32));\n // If there is no length, we have zero data (empty string).\n if (length === 0) {\n cursor.setPosition(staticPosition + 32);\n return ['', 32];\n }\n const data = cursor.readBytes(length, 32);\n const value = Bytes.toString(Bytes.trimLeft(data));\n // As we have gone wondering, restore to the original position + next slot.\n cursor.setPosition(staticPosition + 32);\n return [value, 32];\n}\n/** @internal */\nexport function prepareParameters({ checksumAddress, parameters, values, }) {\n const preparedParameters = [];\n for (let i = 0; i < parameters.length; i++) {\n preparedParameters.push(prepareParameter({\n checksumAddress,\n parameter: parameters[i],\n value: values[i],\n }));\n }\n return preparedParameters;\n}\n/** @internal */\nexport function prepareParameter({ checksumAddress = false, parameter: parameter_, value, }) {\n const parameter = parameter_;\n const arrayComponents = getArrayComponents(parameter.type);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return encodeArray(value, {\n checksumAddress,\n length,\n parameter: {\n ...parameter,\n type,\n },\n });\n }\n if (parameter.type === 'tuple') {\n return encodeTuple(value, {\n checksumAddress,\n parameter: parameter,\n });\n }\n if (parameter.type === 'address') {\n return encodeAddress(value, {\n checksum: checksumAddress,\n });\n }\n if (parameter.type === 'bool') {\n return encodeBoolean(value);\n }\n if (parameter.type.startsWith('uint') || parameter.type.startsWith('int')) {\n const signed = parameter.type.startsWith('int');\n const [, , size = '256'] = integerRegex.exec(parameter.type) ?? [];\n return encodeNumber(value, {\n signed,\n size: Number(size),\n });\n }\n if (parameter.type.startsWith('bytes')) {\n return encodeBytes(value, { type: parameter.type });\n }\n if (parameter.type === 'string') {\n return encodeString(value);\n }\n throw new AbiParameters.InvalidTypeError(parameter.type);\n}\n/** @internal */\nexport function encode(preparedParameters) {\n // 1. Compute the size of the static part of the parameters.\n let staticSize = 0;\n for (let i = 0; i < preparedParameters.length; i++) {\n const { dynamic, encoded } = preparedParameters[i];\n if (dynamic)\n staticSize += 32;\n else\n staticSize += Hex.size(encoded);\n }\n // 2. Split the parameters into static and dynamic parts.\n const staticParameters = [];\n const dynamicParameters = [];\n let dynamicSize = 0;\n for (let i = 0; i < preparedParameters.length; i++) {\n const { dynamic, encoded } = preparedParameters[i];\n if (dynamic) {\n staticParameters.push(Hex.fromNumber(staticSize + dynamicSize, { size: 32 }));\n dynamicParameters.push(encoded);\n dynamicSize += Hex.size(encoded);\n }\n else {\n staticParameters.push(encoded);\n }\n }\n // 3. Concatenate static and dynamic parts.\n return Hex.concat(...staticParameters, ...dynamicParameters);\n}\n/** @internal */\nexport function encodeAddress(value, options) {\n const { checksum = false } = options;\n Address.assert(value, { strict: checksum });\n return {\n dynamic: false,\n encoded: Hex.padLeft(value.toLowerCase()),\n };\n}\n/** @internal */\nexport function encodeArray(value, options) {\n const { checksumAddress, length, parameter } = options;\n const dynamic = length === null;\n if (!Array.isArray(value))\n throw new AbiParameters.InvalidArrayError(value);\n if (!dynamic && value.length !== length)\n throw new AbiParameters.ArrayLengthMismatchError({\n expectedLength: length,\n givenLength: value.length,\n type: `${parameter.type}[${length}]`,\n });\n // Zero-length fixed arrays of dynamic types (e.g. `string[0]`) are dynamic\n // per the ABI spec, even though they have no elements to inspect.\n let dynamicChild = value.length === 0 && hasDynamicChild(parameter);\n const preparedParameters = [];\n for (let i = 0; i < value.length; i++) {\n const preparedParam = prepareParameter({\n checksumAddress,\n parameter,\n value: value[i],\n });\n if (preparedParam.dynamic)\n dynamicChild = true;\n preparedParameters.push(preparedParam);\n }\n if (dynamic || dynamicChild) {\n const data = encode(preparedParameters);\n if (dynamic) {\n const length = Hex.fromNumber(preparedParameters.length, { size: 32 });\n return {\n dynamic: true,\n encoded: preparedParameters.length > 0 ? Hex.concat(length, data) : length,\n };\n }\n if (dynamicChild)\n return { dynamic: true, encoded: data };\n }\n return {\n dynamic: false,\n encoded: Hex.concat(...preparedParameters.map(({ encoded }) => encoded)),\n };\n}\n/** @internal */\nexport function encodeBytes(value, { type }) {\n const [, parametersize] = type.split('bytes');\n const bytesSize = Hex.size(value);\n if (!parametersize) {\n let value_ = value;\n // If the size is not divisible by 32 bytes, pad the end\n // with empty bytes to the ceiling 32 bytes.\n if (bytesSize % 32 !== 0)\n value_ = Hex.padRight(value_, Math.ceil((value.length - 2) / 2 / 32) * 32);\n return {\n dynamic: true,\n encoded: Hex.concat(Hex.padLeft(Hex.fromNumber(bytesSize, { size: 32 })), value_),\n };\n }\n if (bytesSize !== Number.parseInt(parametersize, 10))\n throw new AbiParameters.BytesSizeMismatchError({\n expectedSize: Number.parseInt(parametersize, 10),\n value,\n });\n return { dynamic: false, encoded: Hex.padRight(value) };\n}\n/** @internal */\nexport function encodeBoolean(value) {\n if (typeof value !== 'boolean')\n throw new Errors.BaseError(`Invalid boolean value: \"${value}\" (type: ${typeof value}). Expected: \\`true\\` or \\`false\\`.`);\n return { dynamic: false, encoded: Hex.padLeft(Hex.fromBoolean(value)) };\n}\n/** @internal */\nexport function encodeNumber(value, { signed, size }) {\n if (typeof size === 'number') {\n const max = 2n ** (BigInt(size) - (signed ? 1n : 0n)) - 1n;\n const min = signed ? -max - 1n : 0n;\n if (value > max || value < min)\n throw new Hex.IntegerOutOfRangeError({\n max: max.toString(),\n min: min.toString(),\n signed,\n size: size / 8,\n value: value.toString(),\n });\n }\n return {\n dynamic: false,\n encoded: Hex.fromNumber(value, {\n size: 32,\n signed,\n }),\n };\n}\n/** @internal */\nexport function encodeString(value) {\n const hexValue = Hex.fromString(value);\n const partsLength = Math.ceil(Hex.size(hexValue) / 32);\n const parts = [];\n for (let i = 0; i < partsLength; i++) {\n parts.push(Hex.padRight(Hex.slice(hexValue, i * 32, (i + 1) * 32)));\n }\n return {\n dynamic: true,\n encoded: Hex.concat(Hex.padRight(Hex.fromNumber(Hex.size(hexValue), { size: 32 })), ...parts),\n };\n}\n/** @internal */\nexport function encodeTuple(value, options) {\n const { checksumAddress, parameter } = options;\n let dynamic = false;\n const preparedParameters = [];\n for (let i = 0; i < parameter.components.length; i++) {\n const param_ = parameter.components[i];\n const index = Array.isArray(value) ? i : param_.name;\n const preparedParam = prepareParameter({\n checksumAddress,\n parameter: param_,\n value: value[index],\n });\n preparedParameters.push(preparedParam);\n if (preparedParam.dynamic)\n dynamic = true;\n }\n return {\n dynamic,\n encoded: dynamic\n ? encode(preparedParameters)\n : Hex.concat(...preparedParameters.map(({ encoded }) => encoded)),\n };\n}\n/** @internal */\nexport function getArrayComponents(type) {\n const matches = type.match(/^(.*)\\[(\\d+)?\\]$/);\n return matches\n ? // Return `null` if the array is dynamic.\n [matches[2] ? Number(matches[2]) : null, matches[1]]\n : undefined;\n}\n/** @internal */\nexport function hasDynamicChild(param) {\n const { type } = param;\n if (type === 'string')\n return true;\n if (type === 'bytes')\n return true;\n if (type.endsWith('[]'))\n return true;\n if (type === 'tuple')\n return param.components?.some(hasDynamicChild);\n const arrayComponents = getArrayComponents(param.type);\n if (arrayComponents &&\n hasDynamicChild({\n ...param,\n type: arrayComponents[1],\n }))\n return true;\n return false;\n}\n//# sourceMappingURL=abiParameters.js.map","import * as Address from '../Address.js';\nimport * as Errors from '../Errors.js';\nimport { getArrayComponents } from './abiParameters.js';\n/** @internal */\nexport function normalizeSignature(signature) {\n let active = true;\n let current = '';\n let level = 0;\n let result = '';\n let valid = false;\n for (let i = 0; i < signature.length; i++) {\n const char = signature[i];\n // If the character is a separator, we want to reactivate.\n if (['(', ')', ','].includes(char))\n active = true;\n // If the character is a \"level\" token, we want to increment/decrement.\n if (char === '(')\n level++;\n if (char === ')')\n level--;\n // If we aren't active, we don't want to mutate the result.\n if (!active)\n continue;\n // If level === 0, we are at the definition level.\n if (level === 0) {\n if (char === ' ' && ['event', 'function', 'error', ''].includes(result))\n result = '';\n else {\n result += char;\n // If we are at the end of the definition, we must be finished.\n if (char === ')') {\n valid = true;\n break;\n }\n }\n continue;\n }\n // Ignore spaces\n if (char === ' ') {\n // A space directly after a `(` or `,` separator is leading whitespace.\n // Otherwise, it ends the type, so we want to deactivate.\n if (!current.endsWith(',') && !current.endsWith('(')) {\n current = '';\n active = false;\n }\n continue;\n }\n result += char;\n current += char;\n }\n if (!valid)\n throw new Errors.BaseError('Unable to normalize signature.');\n return result;\n}\n/** @internal */\nexport function isArgOfType(arg, abiParameter) {\n const argType = typeof arg;\n const abiParameterType = abiParameter.type;\n switch (abiParameterType) {\n case 'address':\n return Address.validate(arg, { strict: false });\n case 'bool':\n return argType === 'boolean';\n case 'function':\n return argType === 'string';\n case 'string':\n return argType === 'string';\n default: {\n if (abiParameterType === 'tuple' && 'components' in abiParameter)\n return Object.values(abiParameter.components).every((component, index) => {\n return (argType === 'object' &&\n isArgOfType(getComponentValue(arg, component, index), component));\n });\n // `(u)int<M>`: (un)signed integer type of `M` bits, `0 < M <= 256`, `M % 8 == 0`\n // https://regexr.com/6v8hp\n if (/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(abiParameterType))\n return argType === 'number' || argType === 'bigint';\n // `bytes<M>`: binary type of `M` bytes, `0 < M <= 32`\n // https://regexr.com/6va55\n if (/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(abiParameterType))\n return argType === 'string' || arg instanceof Uint8Array;\n // fixed-length (`<type>[M]`) and dynamic (`<type>[]`) arrays\n const arrayComponents = getArrayComponents(abiParameterType);\n if (arrayComponents) {\n const [length, type] = arrayComponents;\n return (Array.isArray(arg) &&\n (length === null || arg.length === length) &&\n arg.every((x) => isArgOfType(x, {\n ...abiParameter,\n type,\n })));\n }\n return false;\n }\n }\n}\n/** @internal */\nexport function getAmbiguousTypes(sourceParameters, targetParameters, args) {\n for (const parameterIndex in sourceParameters) {\n const sourceParameter = sourceParameters[parameterIndex];\n const targetParameter = targetParameters[parameterIndex];\n if (!targetParameter)\n continue;\n if (sourceParameter.type === 'tuple' &&\n targetParameter.type === 'tuple' &&\n 'components' in sourceParameter &&\n 'components' in targetParameter) {\n const value = args[parameterIndex];\n const types = getAmbiguousTypes(sourceParameter.components, targetParameter.components, sourceParameter.components.map((component, index) => getComponentValue(value, component, index)));\n if (types)\n return types;\n continue;\n }\n const sourceArray = getArrayComponents(sourceParameter.type);\n const targetArray = getArrayComponents(targetParameter.type);\n if (sourceArray && targetArray) {\n // Every item matches both element types, so the first item (or `undefined` for an empty array) decides.\n const types = getAmbiguousTypes([\n {\n ...sourceParameter,\n type: sourceArray[1],\n },\n ], [\n {\n ...targetParameter,\n type: targetArray[1],\n },\n ], [args[parameterIndex]?.[0]]);\n if (types)\n return types;\n continue;\n }\n const types = [sourceParameter.type, targetParameter.type];\n const value = args[parameterIndex];\n const ambiguous = (() => {\n if (types.includes('address') && types.includes('bytes20'))\n return true;\n // An `undefined` value comes from an empty array, which matches both types.\n if (types.includes('address') &&\n (types.includes('string') || types.includes('bytes')))\n return (value === undefined ||\n Address.validate(value, { strict: false }));\n return false;\n })();\n if (ambiguous)\n return types;\n }\n return;\n}\n// Reads a tuple component's value by index from arrays and by name from objects, like `AbiParameters.encode`.\nfunction getComponentValue(arg, component, index) {\n if (Array.isArray(arg))\n return arg[index];\n return arg?.[component.name];\n}\n//# sourceMappingURL=abiItem.js.map","import * as abitype from 'abitype';\nimport * as Errors from './Errors.js';\nimport * as Hash from './Hash.js';\nimport * as Hex from './Hex.js';\nimport * as internal from './internal/abiItem.js';\n/**\n * Formats an {@link ox#AbiItem.AbiItem} into a **Human Readable ABI Item**.\n *\n * @example\n * ```ts twoslash\n * import { AbiItem } from 'ox'\n *\n * const formatted = AbiItem.format({\n * type: 'function',\n * name: 'approve',\n * stateMutability: 'nonpayable',\n * inputs: [\n * {\n * name: 'spender',\n * type: 'address',\n * },\n * {\n * name: 'amount',\n * type: 'uint256',\n * },\n * ],\n * outputs: [{ type: 'bool' }],\n * })\n *\n * formatted\n * // ^?\n *\n *\n * ```\n *\n * @param abiItem - The ABI Item to format.\n * @returns The formatted ABI Item .\n */\nexport function format(abiItem) {\n return abitype.formatAbiItem(abiItem);\n}\n/**\n * Parses an arbitrary **JSON ABI Item** or **Human Readable ABI Item** into a typed {@link ox#AbiItem.AbiItem}.\n *\n * @example\n * ### JSON ABIs\n *\n * ```ts twoslash\n * import { AbiItem } from 'ox'\n *\n * const abiItem = AbiItem.from({\n * type: 'function',\n * name: 'approve',\n * stateMutability: 'nonpayable',\n * inputs: [\n * {\n * name: 'spender',\n * type: 'address',\n * },\n * {\n * name: 'amount',\n * type: 'uint256',\n * },\n * ],\n * outputs: [{ type: 'bool' }],\n * })\n *\n * abiItem\n * //^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * ### Human Readable ABIs\n *\n * A Human Readable ABI can be parsed into a typed ABI object:\n *\n * ```ts twoslash\n * import { AbiItem } from 'ox'\n *\n * const abiItem = AbiItem.from(\n * 'function approve(address spender, uint256 amount) returns (bool)' // [!code hl]\n * )\n *\n * abiItem\n * //^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * It is possible to specify `struct`s along with your definitions:\n *\n * ```ts twoslash\n * import { AbiItem } from 'ox'\n *\n * const abiItem = AbiItem.from([\n * 'struct Foo { address spender; uint256 amount; }', // [!code hl]\n * 'function approve(Foo foo) returns (bool)',\n * ])\n *\n * abiItem\n * //^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n *\n *\n * @param abiItem - The ABI Item to parse.\n * @returns The typed ABI Item.\n */\nexport function from(abiItem, options = {}) {\n const { prepare = true } = options;\n const item = (() => {\n if (Array.isArray(abiItem))\n return abitype.parseAbiItem(abiItem);\n if (typeof abiItem === 'string')\n return abitype.parseAbiItem(abiItem);\n return abiItem;\n })();\n return {\n ...item,\n ...(prepare ? { hash: getSignatureHash(item) } : {}),\n };\n}\n/**\n * Extracts an {@link ox#AbiItem.AbiItem} from an {@link ox#Abi.Abi} given a name and optional arguments.\n *\n * @example\n * ABI Items can be extracted by their name using the `name` option:\n *\n * ```ts twoslash\n * import { Abi, AbiItem } from 'ox'\n *\n * const abi = Abi.from([\n * 'function foo()',\n * 'event Transfer(address owner, address to, uint256 tokenId)',\n * 'function bar(string a) returns (uint256 x)',\n * ])\n *\n * const item = AbiItem.fromAbi(abi, 'Transfer') // [!code focus]\n * // ^?\n *\n *\n *\n *\n *\n *\n * ```\n *\n * @example\n * ### Extracting by Selector\n *\n * ABI Items can be extract by their selector when {@link ox#Hex.Hex} is provided to `name`.\n *\n * ```ts twoslash\n * import { Abi, AbiItem } from 'ox'\n *\n * const abi = Abi.from([\n * 'function foo()',\n * 'event Transfer(address owner, address to, uint256 tokenId)',\n * 'function bar(string a) returns (uint256 x)',\n * ])\n * const item = AbiItem.fromAbi(abi, '0x095ea7b3') // [!code focus]\n * // ^?\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * ```\n *\n * :::note\n *\n * Extracting via a hex selector is useful when extracting an ABI Item from an `eth_call` RPC response,\n * a Transaction `input`, or from Event Log `topics`.\n *\n * :::\n *\n * @param abi - The ABI to extract from.\n * @param name - The name (or selector) of the ABI item to extract.\n * @param options - Extraction options.\n * @returns The ABI item.\n */\nexport function fromAbi(abi, name, options) {\n const { args = [], prepare = true } = (options ??\n {});\n const isSelector = Hex.validate(name, { strict: false });\n const abiItems = abi.filter((abiItem) => {\n if (isSelector) {\n if (abiItem.type === 'function' || abiItem.type === 'error')\n return getSelector(abiItem) === Hex.slice(name, 0, 4);\n if (abiItem.type === 'event')\n return getSignatureHash(abiItem) === name;\n return false;\n }\n return 'name' in abiItem && abiItem.name === name;\n });\n if (abiItems.length === 0)\n throw new NotFoundError({ name: name });\n if (abiItems.length === 1)\n return {\n ...abiItems[0],\n ...(prepare ? { hash: getSignatureHash(abiItems[0]) } : {}),\n };\n let matchedAbiItem;\n for (const abiItem of abiItems) {\n if (!('inputs' in abiItem))\n continue;\n if (!args || args.length === 0) {\n if (!abiItem.inputs || abiItem.inputs.length === 0)\n return {\n ...abiItem,\n ...(prepare ? { hash: getSignatureHash(abiItem) } : {}),\n };\n continue;\n }\n if (!abiItem.inputs)\n continue;\n if (abiItem.inputs.length === 0)\n continue;\n if (abiItem.inputs.length !== args.length)\n continue;\n const matched = args.every((arg, index) => {\n const abiParameter = 'inputs' in abiItem && abiItem.inputs[index];\n if (!abiParameter)\n return false;\n return internal.isArgOfType(arg, abiParameter);\n });\n if (matched) {\n // Check for ambiguity against already matched parameters (e.g. `address` vs `bytes20`).\n if (matchedAbiItem &&\n 'inputs' in matchedAbiItem &&\n matchedAbiItem.inputs) {\n const ambiguousTypes = internal.getAmbiguousTypes(abiItem.inputs, matchedAbiItem.inputs, args);\n if (ambiguousTypes)\n throw new AmbiguityError({\n abiItem,\n type: ambiguousTypes[0],\n }, {\n abiItem: matchedAbiItem,\n type: ambiguousTypes[1],\n });\n }\n matchedAbiItem = abiItem;\n }\n }\n const abiItem = (() => {\n if (matchedAbiItem)\n return matchedAbiItem;\n const [abiItem, ...overloads] = abiItems;\n return { ...abiItem, overloads };\n })();\n if (!abiItem)\n throw new NotFoundError({ name: name });\n return {\n ...abiItem,\n ...(prepare ? { hash: getSignatureHash(abiItem) } : {}),\n };\n}\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function getSelector(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi, name] = parameters;\n return fromAbi(abi, name);\n }\n return parameters[0];\n })();\n return Hex.slice(getSignatureHash(abiItem), 0, 4);\n}\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function getSignature(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi, name] = parameters;\n return fromAbi(abi, name);\n }\n return parameters[0];\n })();\n const signature = (() => {\n if (typeof abiItem === 'string')\n return abiItem;\n return abitype.formatAbiItem(abiItem);\n })();\n return internal.normalizeSignature(signature);\n}\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function getSignatureHash(...parameters) {\n const abiItem = (() => {\n if (Array.isArray(parameters[0])) {\n const [abi, name] = parameters;\n return fromAbi(abi, name);\n }\n return parameters[0];\n })();\n if (typeof abiItem !== 'string' && 'hash' in abiItem && abiItem.hash)\n return abiItem.hash;\n return Hash.keccak256(Hex.fromString(getSignature(abiItem)));\n}\n/**\n * Throws when ambiguous types are found on overloaded ABI items.\n *\n * @example\n * ```ts twoslash\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from(['function foo(address)', 'function foo(bytes20)'])\n * AbiFunction.fromAbi(foo, 'foo', {\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // @error: AbiItem.AmbiguityError: Found ambiguous types in overloaded ABI Items.\n * // @error: `bytes20` in `foo(bytes20)`, and\n * // @error: `address` in `foo(address)`\n * // @error: These types encode differently and cannot be distinguished at runtime.\n * // @error: Remove one of the ambiguous items in the ABI.\n * ```\n *\n * ### Solution\n *\n * Remove one of the ambiguous types from the ABI.\n *\n * ```ts twoslash\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from([\n * 'function foo(address)',\n * 'function foo(bytes20)' // [!code --]\n * ])\n * AbiFunction.fromAbi(foo, 'foo', {\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // @error: AbiItem.AmbiguityError: Found ambiguous types in overloaded ABI Items.\n * // @error: `bytes20` in `foo(bytes20)`, and\n * // @error: `address` in `foo(address)`\n * // @error: These types encode differently and cannot be distinguished at runtime.\n * // @error: Remove one of the ambiguous items in the ABI.\n * ```\n */\nexport class AmbiguityError extends Errors.BaseError {\n constructor(x, y) {\n super('Found ambiguous types in overloaded ABI Items.', {\n metaMessages: [\n // TODO: abitype to add support for signature-formatted ABI items.\n `\\`${x.type}\\` in \\`${internal.normalizeSignature(abitype.formatAbiItem(x.abiItem))}\\`, and`,\n `\\`${y.type}\\` in \\`${internal.normalizeSignature(abitype.formatAbiItem(y.abiItem))}\\``,\n '',\n 'These types encode differently and cannot be distinguished at runtime.',\n 'Remove one of the ambiguous items in the ABI.',\n ],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiItem.AmbiguityError'\n });\n }\n}\n/**\n * Throws when an ABI item is not found in the ABI.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from([\n * 'function foo(address)',\n * 'function bar(uint)'\n * ])\n * AbiFunction.fromAbi(foo, 'baz')\n * // @error: AbiItem.NotFoundError: ABI function with name \"baz\" not found.\n * ```\n *\n * ### Solution\n *\n * Ensure the ABI item exists on the ABI.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from([\n * 'function foo(address)',\n * 'function bar(uint)',\n * 'function baz(bool)' // [!code ++]\n * ])\n * AbiFunction.fromAbi(foo, 'baz')\n * ```\n */\nexport class NotFoundError extends Errors.BaseError {\n constructor({ name, data, type = 'item', }) {\n const selector = (() => {\n if (name)\n return ` with name \"${name}\"`;\n if (data)\n return ` with data \"${data}\"`;\n return '';\n })();\n super(`ABI ${type}${selector} not found.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiItem.NotFoundError'\n });\n }\n}\n/**\n * Throws when the selector size is invalid.\n *\n * @example\n * ```ts twoslash\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from([\n * 'function foo(address)',\n * 'function bar(uint)'\n * ])\n * AbiFunction.fromAbi(foo, '0xaaa')\n * // @error: AbiItem.InvalidSelectorSizeError: Selector size is invalid. Expected 4 bytes. Received 2 bytes (\"0xaaa\").\n * ```\n *\n * ### Solution\n *\n * Ensure the selector size is 4 bytes.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Abi, AbiFunction } from 'ox'\n *\n * const foo = Abi.from([\n * 'function foo(address)',\n * 'function bar(uint)'\n * ])\n * AbiFunction.fromAbi(foo, '0x7af82b1a')\n * ```\n */\nexport class InvalidSelectorSizeError extends Errors.BaseError {\n constructor({ data }) {\n super(`Selector size is invalid. Expected 4 bytes. Received ${Hex.size(data)} bytes (\"${data}\").`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AbiItem.InvalidSelectorSizeError'\n });\n }\n}\n//# sourceMappingURL=AbiItem.js.map","import * as Address from './Address.js';\nimport * as Errors from './Errors.js';\nimport * as Hash from './Hash.js';\nimport * as Hex from './Hex.js';\n/**\n * Converts a list of Access List tuples into a object-formatted list.\n *\n * @example\n * ```ts twoslash\n * import { AccessList } from 'ox'\n *\n * const accessList = AccessList.fromTupleList([\n * [\n * '0x0000000000000000000000000000000000000000',\n * [\n * '0x0000000000000000000000000000000000000000000000000000000000000001',\n * '0x60fdd29ff912ce880cd3edaf9f932dc61d3dae823ea77e0323f94adb9f6a72fe',\n * ],\n * ],\n * ])\n * // @log: [\n * // @log: {\n * // @log: address: '0x0000000000000000000000000000000000000000',\n * // @log: storageKeys: [\n * // @log: '0x0000000000000000000000000000000000000000000000000000000000000001',\n * // @log: '0x60fdd29ff912ce880cd3edaf9f932dc61d3dae823ea77e0323f94adb9f6a72fe',\n * // @log: ],\n * // @log: },\n * // @log: ]\n * ```\n *\n * @param accessList - List of tuples.\n * @returns Access list.\n */\nexport function fromTupleList(accessList) {\n const list = [];\n for (let i = 0; i < accessList.length; i++) {\n const [address, storageKeys] = accessList[i];\n if (address)\n Address.assert(address, { strict: false });\n list.push({\n address: address,\n storageKeys: storageKeys.map((key) => Hash.validate(key) ? key : Hex.trimLeft(key)),\n });\n }\n return list;\n}\n/**\n * Converts a structured Access List into a list of tuples.\n *\n * @example\n * ```ts twoslash\n * import { AccessList } from 'ox'\n *\n * const accessList = AccessList.toTupleList([\n * {\n * address: '0x0000000000000000000000000000000000000000',\n * storageKeys: [\n * '0x0000000000000000000000000000000000000000000000000000000000000001',\n * '0x60fdd29ff912ce880cd3edaf9f932dc61d3dae823ea77e0323f94adb9f6a72fe'],\n * },\n * ])\n * // @log: [\n * // @log: [\n * // @log: '0x0000000000000000000000000000000000000000',\n * // @log: [\n * // @log: '0x0000000000000000000000000000000000000000000000000000000000000001',\n * // @log: '0x60fdd29ff912ce880cd3edaf9f932dc61d3dae823ea77e0323f94adb9f6a72fe',\n * // @log: ],\n * // @log: ],\n * // @log: ]\n * ```\n *\n * @param accessList - Access list.\n * @returns List of tuples.\n */\nexport function toTupleList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const tuple = [];\n for (const { address, storageKeys } of accessList) {\n for (let j = 0; j < storageKeys.length; j++)\n if (Hex.size(storageKeys[j]) !== 32)\n throw new InvalidStorageKeySizeError({\n storageKey: storageKeys[j],\n });\n if (address)\n Address.assert(address, { strict: false });\n tuple.push([address, storageKeys]);\n }\n return tuple;\n}\n/** Thrown when the size of a storage key is invalid. */\nexport class InvalidStorageKeySizeError extends Errors.BaseError {\n constructor({ storageKey }) {\n super(`Size for storage key \"${storageKey}\" is invalid. Expected 32 bytes. Got ${Hex.size(storageKey)} bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AccessList.InvalidStorageKeySizeError'\n });\n }\n}\n//# sourceMappingURL=AccessList.js.map","import { secp256k1 } from '@noble/curves/secp256k1';\nimport * as Address from './Address.js';\nimport * as Bytes from './Bytes.js';\nimport * as Errors from './Errors.js';\nimport * as Hex from './Hex.js';\nimport * as Entropy from './internal/entropy.js';\nimport * as keyDerivation from './internal/keyDerivation.js';\nimport * as internal from './internal/mnemonic.js';\nimport * as PublicKey from './PublicKey.js';\n/** Re-export of noble/curves secp256k1 utilities. */\nexport const noble = secp256k1;\n/**\n * Creates a new secp256k1 ECDSA key pair consisting of a private key and its corresponding public key.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const { privateKey, publicKey } = Secp256k1.createKeyPair()\n * ```\n *\n * @param options - The options to generate the key pair.\n * @returns The generated key pair containing both private and public keys.\n */\nexport function createKeyPair(options = {}) {\n const { as = 'Hex' } = options;\n const privateKey = randomPrivateKey({ as });\n const publicKey = getPublicKey({ privateKey });\n return {\n privateKey: privateKey,\n publicKey,\n };\n}\n/**\n * Derives a valid secp256k1 private key from a BIP-39 mnemonic.\n *\n * This is equivalent to `Mnemonic.toPrivateKey`, and derives the\n * private key at `m/44'/60'/0'/0/0` by default.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const privateKey = Secp256k1.fromMnemonic(\n * 'test test test test test test test test test test test junk'\n * )\n * ```\n *\n * @param mnemonic - BIP-39 mnemonic phrase.\n * @param options - Options.\n * @returns A valid secp256k1 private key.\n */\nexport function fromMnemonic(mnemonic, options = {}) {\n const { as = 'Hex', passphrase, path } = options;\n return internal.toPrivateKey(mnemonic, { as, passphrase, path });\n}\n/**\n * Derives a valid secp256k1 private key from a seed.\n *\n * The seed must contain at least 32 bytes of cryptographically strong key\n * material. Do not pass a password directly; use a password KDF first.\n *\n * The permanent derivation contract uses the seed as the HMAC-SHA256\n * key. The HMAC message uses the `ox.secp256k1.fromSeed.v1` domain followed by\n * a 32-bit big-endian counter starting at zero. Invalid scalars are skipped.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const privateKey = Secp256k1.fromSeed(\n * '0x000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'\n * )\n * ```\n *\n * @param seed - Seed containing at least 32 bytes of cryptographically strong key material.\n * @param options - Options.\n * @returns A valid secp256k1 private key.\n */\nexport function fromSeed(seed, options = {}) {\n const { as = 'Hex' } = options;\n const bytes = Bytes.from(seed);\n if (bytes.length < 32)\n throw new InvalidSeedSizeError({ size: bytes.length });\n const privateKey = keyDerivation.derive(bytes, fromSeedDomain, {\n validate: noble.utils.isValidPrivateKey,\n });\n if (as === 'Hex') {\n const value = Hex.fromBytes(privateKey);\n privateKey.fill(0);\n return value;\n }\n return privateKey;\n}\n/**\n * Computes the secp256k1 ECDSA public key from a provided private key.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const publicKey = Secp256k1.getPublicKey({ privateKey: '0x...' })\n * ```\n *\n * @param options - The options to compute the public key.\n * @returns The computed public key.\n */\nexport function getPublicKey(options) {\n const { privateKey } = options;\n const point = secp256k1.ProjectivePoint.fromPrivateKey(Hex.from(privateKey).slice(2));\n return PublicKey.from(point);\n}\n/**\n * Computes a shared secret using ECDH (Elliptic Curve Diffie-Hellman) between a private key and a public key.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const { privateKey: privateKeyA } = Secp256k1.createKeyPair()\n * const { publicKey: publicKeyB } = Secp256k1.createKeyPair()\n *\n * const sharedSecret = Secp256k1.getSharedSecret({\n * privateKey: privateKeyA,\n * publicKey: publicKeyB\n * })\n * ```\n *\n * @param options - The options to compute the shared secret.\n * @returns The computed shared secret.\n */\nexport function getSharedSecret(options) {\n const { as = 'Hex', privateKey, publicKey } = options;\n const point = secp256k1.ProjectivePoint.fromHex(PublicKey.toHex(publicKey).slice(2));\n const sharedPoint = point.multiply(secp256k1.utils.normPrivateKeyToScalar(Hex.from(privateKey).slice(2)));\n const sharedSecret = sharedPoint.toRawBytes(true); // compressed format\n if (as === 'Hex')\n return Hex.fromBytes(sharedSecret);\n return sharedSecret;\n}\n/**\n * Generates a random ECDSA private key on the secp256k1 curve.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n * ```\n *\n * @param options - The options to generate the private key.\n * @returns The generated private key.\n */\nexport function randomPrivateKey(options = {}) {\n const { as = 'Hex' } = options;\n const bytes = secp256k1.utils.randomPrivateKey();\n if (as === 'Hex')\n return Hex.fromBytes(bytes);\n return bytes;\n}\n/**\n * Recovers the signing address from the signed payload and signature.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey: '0x...' })\n *\n * const address = Secp256k1.recoverAddress({ // [!code focus]\n * payload: '0xdeadbeef', // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The recovery options.\n * @returns The recovered address.\n */\nexport function recoverAddress(options) {\n return Address.fromPublicKey(recoverPublicKey(options));\n}\n/**\n * Recovers the signing public key from the signed payload and signature.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey: '0x...' })\n *\n * const publicKey = Secp256k1.recoverPublicKey({ // [!code focus]\n * payload: '0xdeadbeef', // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The recovery options.\n * @returns The recovered public key.\n */\nexport function recoverPublicKey(options) {\n const { payload, signature } = options;\n const { r, s, yParity } = signature;\n const signature_ = new secp256k1.Signature(BigInt(r), BigInt(s)).addRecoveryBit(yParity);\n const point = signature_.recoverPublicKey(Hex.from(payload).substring(2));\n return PublicKey.from(point);\n}\n/**\n * Signs the payload with the provided private key.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const signature = Secp256k1.sign({ // [!code focus]\n * payload: '0xdeadbeef', // [!code focus]\n * privateKey: '0x...' // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The signing options.\n * @returns The ECDSA {@link ox#Signature.Signature}.\n */\nexport function sign(options) {\n const { extraEntropy = Entropy.extraEntropy, hash, payload, privateKey, } = options;\n const { r, s, recovery } = secp256k1.sign(Bytes.from(payload), Bytes.from(privateKey), {\n extraEntropy: typeof extraEntropy === 'boolean'\n ? extraEntropy\n : Hex.from(extraEntropy).slice(2),\n lowS: true,\n ...(hash ? { prehash: true } : {}),\n });\n return {\n r,\n s,\n yParity: recovery,\n };\n}\n/**\n * Verifies a payload was signed by the provided address.\n *\n * @example\n * ### Verify with Ethereum Address\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey: '0x...' })\n *\n * const verified = Secp256k1.verify({ // [!code focus]\n * address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', // [!code focus]\n * payload: '0xdeadbeef', // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @example\n * ### Verify with Public Key\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n *\n * const privateKey = '0x...'\n * const publicKey = Secp256k1.getPublicKey({ privateKey })\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey })\n *\n * const verified = Secp256k1.verify({ // [!code focus]\n * publicKey, // [!code focus]\n * payload: '0xdeadbeef', // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The verification options.\n * @returns Whether the payload was signed by the provided address.\n */\nexport function verify(options) {\n const { hash, payload } = options;\n if (options.address)\n return Address.isEqual(options.address, recoverAddress({ payload, signature: options.signature }));\n return secp256k1.verify(options.signature, Bytes.from(payload), PublicKey.toBytes(options.publicKey), ...(hash ? [{ prehash: true, lowS: true }] : []));\n}\n/** Thrown when a seed contains fewer than 32 bytes. */\nexport class InvalidSeedSizeError extends Errors.BaseError {\n constructor(options) {\n super(`Seed must contain at least 32 bytes. Received ${options.size} bytes.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Secp256k1.InvalidSeedSizeError'\n });\n }\n}\nconst fromSeedDomain = Bytes.fromString('ox.secp256k1.fromSeed.v1');\n//# sourceMappingURL=Secp256k1.js.map","import * as Bytes from './Bytes.js';\nimport * as Errors from './Errors.js';\nimport * as Hex from './Hex.js';\nimport * as Cursor from './internal/cursor.js';\n/**\n * Decodes a Recursive-Length Prefix (RLP) value into a {@link ox#Bytes.Bytes} value.\n *\n * @example\n * ```ts twoslash\n * import { Rlp } from 'ox'\n * Rlp.toBytes('0x8b68656c6c6f20776f726c64')\n * // Uint8Array([139, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])\n * ```\n *\n * @param value - The value to decode.\n * @returns The decoded {@link ox#Bytes.Bytes} value.\n */\nexport function toBytes(value) {\n return to(value, 'Bytes');\n}\n/**\n * Decodes a Recursive-Length Prefix (RLP) value into a {@link ox#Hex.Hex} value.\n *\n * @example\n * ```ts twoslash\n * import { Rlp } from 'ox'\n * Rlp.toHex('0x8b68656c6c6f20776f726c64')\n * // 0x68656c6c6f20776f726c64\n * ```\n *\n * @param value - The value to decode.\n * @returns The decoded {@link ox#Hex.Hex} value.\n */\nexport function toHex(value) {\n return to(value, 'Hex');\n}\n/////////////////////////////////////////////////////////////////////////////////\n// Internal\n/////////////////////////////////////////////////////////////////////////////////\n/** @internal */\nexport function to(value, to) {\n const to_ = to ?? (typeof value === 'string' ? 'Hex' : 'Bytes');\n const bytes = (() => {\n if (typeof value === 'string') {\n if (value.length > 3 && value.length % 2 !== 0)\n throw new Hex.InvalidLengthError(value);\n return Bytes.fromHex(value);\n }\n return value;\n })();\n const cursor = Cursor.create(bytes, {\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n });\n const result = decodeRlpCursor(cursor, to_);\n return result;\n}\n/** @internal */\n/** @internal */\nexport function decodeRlpCursor(cursor, to = 'Hex') {\n if (cursor.bytes.length === 0)\n return (to === 'Hex' ? Hex.fromBytes(cursor.bytes) : cursor.bytes);\n const prefix = cursor.readByte();\n if (prefix < 0x80)\n cursor.decrementPosition(1);\n // bytes\n if (prefix < 0xc0) {\n const length = readLength(cursor, prefix, 0x80);\n const bytes = cursor.readBytes(length);\n return (to === 'Hex' ? Hex.fromBytes(bytes) : bytes);\n }\n // list\n const length = readLength(cursor, prefix, 0xc0);\n return readList(cursor, length, to);\n}\n/** @internal */\nexport function readLength(cursor, prefix, offset) {\n if (offset === 0x80 && prefix < 0x80)\n return 1;\n if (prefix <= offset + 55)\n return prefix - offset;\n if (prefix === offset + 55 + 1)\n return cursor.readUint8();\n if (prefix === offset + 55 + 2)\n return cursor.readUint16();\n if (prefix === offset + 55 + 3)\n return cursor.readUint24();\n if (prefix === offset + 55 + 4)\n return cursor.readUint32();\n throw new Errors.BaseError('Invalid RLP prefix');\n}\n/** @internal */\nexport function readList(cursor, length, to) {\n const position = cursor.position;\n const value = [];\n while (cursor.position - position < length)\n value.push(decodeRlpCursor(cursor, to));\n return value;\n}\n/**\n * Encodes a {@link ox#Bytes.Bytes} or {@link ox#Hex.Hex} value into a Recursive-Length Prefix (RLP) value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Rlp } from 'ox'\n *\n * Rlp.from('0x68656c6c6f20776f726c64', { as: 'Hex' })\n * // @log: 0x8b68656c6c6f20776f726c64\n *\n * Rlp.from(Bytes.from([139, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]), { as: 'Bytes' })\n * // @log: Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])\n * ```\n *\n * @param value - The {@link ox#Bytes.Bytes} or {@link ox#Hex.Hex} value to encode.\n * @param options - Options.\n * @returns The RLP value.\n */\nexport function from(value, options) {\n const { as } = options;\n const encodable = getEncodable(value);\n const cursor = Cursor.create(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (as === 'Hex')\n return Hex.fromBytes(cursor.bytes);\n return cursor.bytes;\n}\n/**\n * Encodes a {@link ox#Bytes.Bytes} value into a Recursive-Length Prefix (RLP) value.\n *\n * @example\n * ```ts twoslash\n * import { Bytes, Rlp } from 'ox'\n *\n * Rlp.fromBytes(Bytes.from([139, 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100]))\n * // @log: Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])\n * ```\n *\n * @param bytes - The {@link ox#Bytes.Bytes} value to encode.\n * @param options - Options.\n * @returns The RLP value.\n */\nexport function fromBytes(bytes, options = {}) {\n const { as = 'Bytes' } = options;\n return from(bytes, { as });\n}\n/**\n * Encodes a {@link ox#Hex.Hex} value into a Recursive-Length Prefix (RLP) value.\n *\n * @example\n * ```ts twoslash\n * import { Rlp } from 'ox'\n *\n * Rlp.fromHex('0x68656c6c6f20776f726c64')\n * // @log: 0x8b68656c6c6f20776f726c64\n * ```\n *\n * @param hex - The {@link ox#Hex.Hex} value to encode.\n * @param options - Options.\n * @returns The RLP value.\n */\nexport function fromHex(hex, options = {}) {\n const { as = 'Hex' } = options;\n return from(hex, { as });\n}\n/////////////////////////////////////////////////////////////////////////////////\n// Internal\n/////////////////////////////////////////////////////////////////////////////////\nfunction getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)));\n return getEncodableBytes(bytes);\n}\nfunction getEncodableList(list) {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength);\n }\n else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode } of list) {\n encode(cursor);\n }\n },\n };\n}\nfunction getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === 'string' ? Bytes.fromHex(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes);\n }\n else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length);\n cursor.pushBytes(bytes);\n }\n else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n },\n };\n}\nfunction getSizeOfLength(length) {\n if (length <= 0xff)\n return 1;\n if (length <= 0xff_ff)\n return 2;\n if (length <= 0xff_ff_ff)\n return 3;\n if (length <= 0xff_ff_ff_ff)\n return 4;\n throw new Errors.BaseError('Length is too large.');\n}\n//# sourceMappingURL=Rlp.js.map","import * as Errors from './Errors.js';\n/** @see https://ethereum.github.io/yellowpaper/paper.pdf */\nexport const exponents = {\n wei: 0,\n gwei: 9,\n szabo: 12,\n finney: 15,\n ether: 18,\n};\n/**\n * Formats a `bigint` Value to its string representation (divided by the given exponent).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.format(420_000_000_000n, 9)\n * // @log: '420'\n * ```\n *\n * @param value - The `bigint` Value to format.\n * @param decimals - The exponent to divide the `bigint` Value by.\n * @returns The string representation of the Value.\n */\nexport function format(value, decimals = 0) {\n let display = value.toString();\n const negative = display.startsWith('-');\n if (negative)\n display = display.slice(1);\n display = display.padStart(decimals, '0');\n let [integer, fraction] = [\n display.slice(0, display.length - decimals),\n display.slice(display.length - decimals),\n ];\n fraction = fraction.replace(/(0+)$/, '');\n return `${negative ? '-' : ''}${integer || '0'}${fraction ? `.${fraction}` : ''}`;\n}\n/**\n * Formats a `bigint` Value (default: wei) to a string representation of Ether.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.formatEther(1_000_000_000_000_000_000n)\n * // @log: '1'\n * ```\n *\n * @param wei - The Value to format.\n * @param unit - The unit to format the Value in. @default 'wei'.\n * @returns The Ether string representation of the Value.\n */\nexport function formatEther(wei, unit = 'wei') {\n return format(wei, exponents.ether - exponents[unit]);\n}\n/**\n * Formats a `bigint` Value (default: wei) to a string representation of Gwei.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.formatGwei(1_000_000_000n)\n * // @log: '1'\n * ```\n *\n * @param wei - The Value to format.\n * @param unit - The unit to format the Value in. @default 'wei'.\n * @returns The Gwei string representation of the Value.\n */\nexport function formatGwei(wei, unit = 'wei') {\n return format(wei, exponents.gwei - exponents[unit]);\n}\n/**\n * Parses a `string` representation of a Value to `bigint` (multiplied by the given exponent).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.from('420', 9)\n * // @log: 420000000000n\n * ```\n *\n * @param value - The string representation of the Value.\n * @param decimals - The exponent to multiply the Value by.\n * @returns The `bigint` representation of the Value.\n */\nexport function from(value, decimals = 0) {\n if (!/^(-?)([0-9]*)\\.?([0-9]*)$/.test(value))\n throw new InvalidDecimalNumberError({ value });\n let [integer = '', fraction = '0'] = value.split('.');\n const negative = integer.startsWith('-');\n if (negative)\n integer = integer.slice(1);\n // trim trailing zeros.\n fraction = fraction.replace(/(0+)$/, '');\n // round off if the fraction is larger than the number of decimals.\n if (decimals === 0) {\n if (Math.round(Number(`.${fraction}`)) === 1)\n integer = `${BigInt(integer) + 1n}`;\n fraction = '';\n }\n else if (fraction.length > decimals) {\n const [left, unit, right] = [\n fraction.slice(0, decimals - 1),\n fraction.slice(decimals - 1, decimals),\n fraction.slice(decimals),\n ];\n const rounded = Math.round(Number(`${unit}.${right}`));\n if (rounded > 9)\n fraction = `${BigInt(left) + BigInt(1)}0`.padStart(left.length + 1, '0');\n else\n fraction = `${left}${rounded}`;\n if (fraction.length > decimals) {\n fraction = fraction.slice(1);\n integer = `${BigInt(integer) + 1n}`;\n }\n fraction = fraction.slice(0, decimals);\n }\n else {\n fraction = fraction.padEnd(decimals, '0');\n }\n return BigInt(`${negative ? '-' : ''}${integer}${fraction}`);\n}\n/**\n * Parses a string representation of Ether to a `bigint` Value (default: wei).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromEther('420')\n * // @log: 420000000000000000000n\n * ```\n *\n * @param ether - String representation of Ether.\n * @param unit - The unit to parse to. @default 'wei'.\n * @returns A `bigint` Value.\n */\nexport function fromEther(ether, unit = 'wei') {\n return from(ether, exponents.ether - exponents[unit]);\n}\n/**\n * Parses a string representation of Gwei to a `bigint` Value (default: wei).\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromGwei('420')\n * // @log: 420000000000n\n * ```\n *\n * @param gwei - String representation of Gwei.\n * @param unit - The unit to parse to. @default 'wei'.\n * @returns A `bigint` Value.\n */\nexport function fromGwei(gwei, unit = 'wei') {\n return from(gwei, exponents.gwei - exponents[unit]);\n}\n/**\n * Thrown when a value is not a valid decimal number.\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n *\n * Value.fromEther('123.456.789')\n * // @error: Value.InvalidDecimalNumberError: Value `123.456.789` is not a valid decimal number.\n * ```\n */\nexport class InvalidDecimalNumberError extends Errors.BaseError {\n constructor({ value }) {\n super(`Value \\`${value}\\` is not a valid decimal number.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'Value.InvalidDecimalNumberError'\n });\n }\n}\n//# sourceMappingURL=Value.js.map","import * as Errors from './Errors.js';\nimport * as Value from './Value.js';\n/**\n * Thrown when a fee cap is too high.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeEip1559 } from 'ox'\n *\n * TxEnvelopeEip1559.assert({\n * maxFeePerGas: 2n ** 256n - 1n + 1n,\n * chainId: 1,\n * })\n * // @error: TransactionEnvelope.FeeCapTooHighError: The fee cap (`maxFeePerGas`/`maxPriorityFeePerGas` = 115792089237316195423570985008687907853269984665640564039457584007913.129639936 gwei) cannot be higher than the maximum allowed value (2^256-1).\n * ```\n */\nexport class FeeCapTooHighError extends Errors.BaseError {\n constructor({ feeCap, } = {}) {\n super(`The fee cap (\\`maxFeePerGas\\`/\\`maxPriorityFeePerGas\\`${feeCap ? ` = ${Value.formatGwei(feeCap)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionEnvelope.FeeCapTooHighError'\n });\n }\n}\n/**\n * Thrown when a gas price is too high.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeLegacy } from 'ox'\n *\n * TxEnvelopeLegacy.assert({\n * gasPrice: 2n ** 256n - 1n + 1n,\n * chainId: 1,\n * })\n * // @error: TransactionEnvelope.GasPriceTooHighError: The gas price (`gasPrice` = 115792089237316195423570985008687907853269984665640564039457584007913.129639936 gwei) cannot be higher than the maximum allowed value (2^256-1).\n * ```\n */\nexport class GasPriceTooHighError extends Errors.BaseError {\n constructor({ gasPrice, } = {}) {\n super(`The gas price (\\`gasPrice\\`${gasPrice ? ` = ${Value.formatGwei(gasPrice)} gwei` : ''}) cannot be higher than the maximum allowed value (2^256-1).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionEnvelope.GasPriceTooHighError'\n });\n }\n}\n/**\n * Thrown when a chain ID is invalid.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeEip1559 } from 'ox'\n *\n * TxEnvelopeEip1559.assert({ chainId: 0 })\n * // @error: TransactionEnvelope.InvalidChainIdError: Chain ID \"0\" is invalid.\n * ```\n */\nexport class InvalidChainIdError extends Errors.BaseError {\n constructor({ chainId }) {\n super(typeof chainId !== 'undefined'\n ? `Chain ID \"${chainId}\" is invalid.`\n : 'Chain ID is invalid.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionEnvelope.InvalidChainIdError'\n });\n }\n}\n/**\n * Thrown when a serialized transaction is invalid.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeEip1559 } from 'ox'\n *\n * TxEnvelopeEip1559.deserialize('0x02c0')\n * // @error: TransactionEnvelope.InvalidSerializedError: Invalid serialized transaction of type \"eip1559\" was provided.\n * // @error: Serialized Transaction: \"0x02c0\"\n * // @error: Missing Attributes: chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gas, to, value, data, accessList\n * ```\n */\nexport class InvalidSerializedError extends Errors.BaseError {\n constructor({ attributes, serialized, type, }) {\n const missing = Object.entries(attributes)\n .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))\n .filter(Boolean);\n super(`Invalid serialized transaction of type \"${type}\" was provided.`, {\n metaMessages: [\n `Serialized Transaction: \"${serialized}\"`,\n missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',\n ].filter(Boolean),\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionEnvelope.InvalidSerializedError'\n });\n }\n}\n/**\n * Thrown when a tip is higher than a fee cap.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeEip1559 } from 'ox'\n *\n * TxEnvelopeEip1559.assert({\n * chainId: 1,\n * maxFeePerGas: 10n,\n * maxPriorityFeePerGas: 11n,\n * })\n * // @error: TransactionEnvelope.TipAboveFeeCapError: The provided tip (`maxPriorityFeePerGas` = 11 gwei) cannot be higher than the fee cap (`maxFeePerGas` = 10 gwei).\n * ```\n */\nexport class TipAboveFeeCapError extends Errors.BaseError {\n constructor({ maxPriorityFeePerGas, maxFeePerGas, } = {}) {\n super([\n `The provided tip (\\`maxPriorityFeePerGas\\`${maxPriorityFeePerGas\n ? ` = ${Value.formatGwei(maxPriorityFeePerGas)} gwei`\n : ''}) cannot be higher than the fee cap (\\`maxFeePerGas\\`${maxFeePerGas ? ` = ${Value.formatGwei(maxFeePerGas)} gwei` : ''}).`,\n ].join('\\n'));\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TransactionEnvelope.TipAboveFeeCapError'\n });\n }\n}\n//# sourceMappingURL=TxEnvelope.js.map","import * as Authentication from '../webauthn/Authentication.js';\nimport * as Authenticator from '../webauthn/Authenticator.js';\nimport * as Registration from '../webauthn/Registration.js';\nexport const createChallenge = Registration.createChallenge;\n/**\n * Creates a new WebAuthn P256 Credential, which can be stored and later used for signing.\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' }) // [!code focus]\n * // @log: {\n * // @log: id: 'oZ48...',\n * // @log: publicKey: { x: 51421...5123n, y: 12345...6789n },\n * // @log: raw: PublicKeyCredential {},\n * // @log: }\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * credentialId: credential.id,\n * challenge: '0xdeadbeef',\n * })\n * ```\n *\n * @param options - Credential creation options.\n * @returns A WebAuthn P256 credential.\n */\nexport async function createCredential(options) {\n return Registration.create(options);\n}\n/**\n * Gets the authenticator data which contains information about the\n * processing of an authenticator request (ie. from `WebAuthnP256.sign`).\n *\n * :::warning\n *\n * This function is mainly for testing purposes or for manually constructing\n * autenticator data. In most cases you will not need this function.\n * `authenticatorData` is typically returned as part of the\n * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const authenticatorData = WebAuthnP256.getAuthenticatorData({\n * rpId: 'example.com',\n * signCount: 420,\n * })\n * // @log: \"0xa379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce194705000001a4\"\n * ```\n *\n * @example\n * ### With Attested Credential Data\n *\n * Include a credential ID and public key in the authenticator data (for registration responses):\n *\n * ```ts twoslash\n * import { P256, WebAuthnP256 } from 'ox'\n *\n * const { publicKey } = P256.createKeyPair()\n *\n * const authenticatorData = WebAuthnP256.getAuthenticatorData({\n * rpId: 'example.com',\n * flag: 0x41, // UP + AT\n * credential: {\n * id: new Uint8Array(32),\n * publicKey,\n * },\n * })\n * ```\n *\n * @param options - Options to construct the authenticator data.\n * @returns The authenticator data.\n */\nexport const getAuthenticatorData = Authenticator.getAuthenticatorData;\n/**\n * Constructs the Client Data in stringified JSON format which represents client data that\n * was passed to `credentials.get()` in {@link ox#WebAuthnP256.(sign:function)}.\n *\n * :::warning\n *\n * This function is mainly for testing purposes or for manually constructing\n * client data. In most cases you will not need this function.\n * `clientDataJSON` is typically returned as part of the\n * {@link ox#WebAuthnP256.(sign:function)} response (ie. an authenticator response).\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const clientDataJSON = WebAuthnP256.getClientDataJSON({\n * challenge: '0xdeadbeef',\n * origin: 'https://example.com',\n * })\n * // @log: \"{\"type\":\"webauthn.get\",\"challenge\":\"3q2-7w\",\"origin\":\"https://example.com\",\"crossOrigin\":false}\"\n * ```\n *\n * @param options - Options to construct the client data.\n * @returns The client data.\n */\nexport const getClientDataJSON = Authenticator.getClientDataJSON;\n/**\n * Constructs a CBOR-encoded attestation object for testing WebAuthn registration\n * verification. Combines the authenticator data with an attestation statement.\n *\n * :::warning\n *\n * This function is mainly for testing purposes. In production, the attestation\n * object is returned by the authenticator during `navigator.credentials.create()`.\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { P256, WebAuthnP256 } from 'ox'\n *\n * const { publicKey } = P256.createKeyPair()\n *\n * const attestationObject = WebAuthnP256.getAttestationObject({\n * authData: WebAuthnP256.getAuthenticatorData({\n * rpId: 'example.com',\n * flag: 0x41,\n * credential: { id: new Uint8Array(32), publicKey },\n * }),\n * })\n * ```\n *\n * @param options - Options to construct the attestation object.\n * @returns The CBOR-encoded attestation object as a Hex string.\n */\nexport const getAttestationObject = Authenticator.getAttestationObject;\n/**\n * Returns the creation options for a P256 WebAuthn Credential to be used with\n * the Web Authentication API.\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const options = WebAuthnP256.getCredentialCreationOptions({ name: 'Example' })\n *\n * const credential = await window.navigator.credentials.create(options)\n * ```\n *\n * @param options - Options.\n * @returns The credential creation options.\n */\nexport const getCredentialCreationOptions = Registration.getOptions;\n/**\n * Returns the request options to sign a challenge with the Web Authentication API.\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const options = WebAuthnP256.getCredentialRequestOptions({\n * challenge: '0xdeadbeef',\n * })\n *\n * const credential = await window.navigator.credentials.get(options)\n * ```\n *\n * @param options - Options.\n * @returns The credential request options.\n */\nexport const getCredentialRequestOptions = Authentication.getOptions;\n/**\n * Constructs the final digest that was signed and computed by the authenticator. This payload includes\n * the cryptographic `challenge`, as well as authenticator metadata (`authenticatorData` + `clientDataJSON`).\n * This value can be also used with raw P256 verification (such as {@link ox#P256.(verify:function)} or\n * {@link ox#WebCryptoP256.(verify:function)}).\n *\n * :::warning\n *\n * This function is mainly for testing purposes or for manually constructing\n * signing payloads. In most cases you will not need this function and\n * instead use {@link ox#WebAuthnP256.(sign:function)}.\n *\n * :::\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256, WebCryptoP256 } from 'ox'\n *\n * const { metadata, payload } = WebAuthnP256.getSignPayload({ // [!code focus]\n * challenge: '0xdeadbeef', // [!code focus]\n * }) // [!code focus]\n * // @log: {\n * // @log: metadata: {\n * // @log: authenticatorData: \"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000\",\n * // @log: challengeIndex: 23,\n * // @log: clientDataJSON: \"{\"type\":\"webauthn.get\",\"challenge\":\"9jEFijuhEWrM4SOW-tChJbUEHEP44VcjcJ-Bqo1fTM8\",\"origin\":\"http://localhost:5173\",\"crossOrigin\":false}\",\n * // @log: typeIndex: 1,\n * // @log: userVerificationRequired: true,\n * // @log: },\n * // @log: payload: \"0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d9763050000000045086dcb06a5f234db625bcdc94e657f86b76b6fd3eb9c30543eabc1e577a4b0\",\n * // @log: }\n *\n * const { publicKey, privateKey } = await WebCryptoP256.createKeyPair()\n *\n * const signature = await WebCryptoP256.sign({\n * payload,\n * privateKey,\n * })\n * ```\n *\n * @param options - Options to construct the signing payload.\n * @returns The signing payload.\n */\nexport const getSignPayload = Authentication.getSignPayload;\n/**\n * Signs a challenge using a stored WebAuthn P256 Credential. If no Credential is provided,\n * a prompt will be displayed for the user to select an existing Credential\n * that was previously registered.\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const credential = await WebAuthnP256.createCredential({\n * name: 'Example',\n * })\n *\n * const { metadata, signature } = await WebAuthnP256.sign({ // [!code focus]\n * credentialId: credential.id, // [!code focus]\n * challenge: '0xdeadbeef', // [!code focus]\n * }) // [!code focus]\n * // @log: {\n * // @log: metadata: {\n * // @log: authenticatorData: '0x49960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000',\n * // @log: clientDataJSON: '{\"type\":\"webauthn.get\",\"challenge\":\"9jEFijuhEWrM4SOW-tChJbUEHEP44VcjcJ-Bqo1fTM8\",\"origin\":\"http://localhost:5173\",\"crossOrigin\":false}',\n * // @log: challengeIndex: 23,\n * // @log: typeIndex: 1,\n * // @log: userVerificationRequired: true,\n * // @log: },\n * // @log: signature: { r: 51231...4215n, s: 12345...6789n },\n * // @log: }\n * ```\n *\n * @param options - Options.\n * @returns The signature.\n */\nexport async function sign(options) {\n return Authentication.sign(options);\n}\n/**\n * Verifies a signature using the Credential's public key and the challenge which was signed.\n *\n * @example\n * ```ts twoslash\n * import { WebAuthnP256 } from 'ox'\n *\n * const credential = await WebAuthnP256.createCredential({\n * name: 'Example',\n * })\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * credentialId: credential.id,\n * challenge: '0xdeadbeef',\n * })\n *\n * const result = await WebAuthnP256.verify({ // [!code focus]\n * metadata, // [!code focus]\n * challenge: '0xdeadbeef', // [!code focus]\n * publicKey: credential.publicKey, // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * // @log: true\n * ```\n *\n * @param options - Options.\n * @returns Whether the signature is valid.\n */\nexport function verify(options) {\n return Authentication.verify(options);\n}\n//# sourceMappingURL=WebAuthnP256.js.map","import * as Address from '../core/Address.js';\nimport * as Errors from '../core/Errors.js';\nimport * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\n/** Maximum encoded byte length for one primitive owner approval. */\nexport const maxOwnerSignatureBytes = 2049;\n/** Maximum number of owners allowed in an account config. */\nexport const maxOwners = 48;\n/** Maximum number of owner approvals in a configurable account signature. */\nexport const maxSignatures = 8;\n/**\n * Maximum threshold accepted by an account config.\n *\n * The threshold must also be reachable by at most {@link ox#AccountConfig.maxSignatures}\n * owner approvals.\n */\nexport const maxThreshold = 0xff;\n/** Maximum version accepted by an account config. */\nexport const maxVersion = 2n ** 64n - 1n;\n/** Tempo signature type byte for configurable account signatures. */\nexport const signatureTypeByte = '0x05';\n/** Zero 32-byte salt (the default when no salt is provided). */\nexport const zeroSalt = `0x${'00'.repeat(32)}`;\n/** Domain prefix for the configurable account address derivation. */\nconst accountDomain = 'tempo:configurable-account:account';\n/** Domain prefix for account configuration commitments. */\nconst configDomain = 'tempo:configurable-account:config';\n/** Domain prefix for configurable account owner approvals. */\nconst signatureDomain = 'tempo:configurable-account:signature';\n/** Domain prefix for the salt of an account migrated in place. */\nconst upgradeDomain = 'tempo:configurable-account:upgrade';\n/**\n * Asserts that an {@link ox#AccountConfig.Config} is valid.\n *\n * Mirrors the Tempo configuration rules: owners non-empty and\n * `<= maxOwners`, strictly ascending unique nonzero owner addresses, nonzero\n * integer owner weights, integer `threshold` between `1` and `maxThreshold`,\n * total weight `<= 255` (u8 max), and a threshold reachable by at most\n * `maxSignatures` owners.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * AccountConfig.assert({\n * threshold: 1,\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * })\n * ```\n *\n * @param config - The account config.\n */\nexport function assert(config) {\n const { owners, salt, threshold, version = 0n } = config;\n if (typeof salt !== 'undefined' && Hex.size(salt) !== 32)\n throw new InvalidConfigError({ reason: 'salt must be 32 bytes' });\n assertVersion(version);\n if (owners.length === 0)\n throw new InvalidConfigError({ reason: 'owners cannot be empty' });\n if (owners.length > maxOwners)\n throw new InvalidConfigError({ reason: 'too many owners' });\n if (!Number.isInteger(Number(threshold)))\n throw new InvalidConfigError({ reason: 'threshold must be an integer' });\n if (Number(threshold) < 1)\n throw new InvalidConfigError({ reason: 'threshold cannot be zero' });\n if (Number(threshold) > maxThreshold)\n throw new InvalidConfigError({ reason: 'threshold exceeds max threshold' });\n let totalWeight = 0;\n const weights = [];\n let previous;\n for (const owner of owners) {\n if (!Address.validate(owner.owner) || Hex.toBigInt(owner.owner) === 0n)\n throw new InvalidConfigError({ reason: 'owner cannot be zero' });\n if (!Number.isInteger(Number(owner.weight)))\n throw new InvalidConfigError({\n reason: 'owner weight must be an integer',\n });\n if (Number(owner.weight) < 1)\n throw new InvalidConfigError({ reason: 'owner weight cannot be zero' });\n const current = Hex.toBigInt(owner.owner);\n if (typeof previous !== 'undefined' && previous >= current)\n throw new InvalidConfigError({\n reason: 'owners must be strictly ascending',\n });\n previous = current;\n const weight = Number(owner.weight);\n totalWeight += weight;\n weights.push(weight);\n }\n if (totalWeight > 0xff)\n throw new InvalidConfigError({\n reason: 'total owner weight exceeds u8 max',\n });\n if (Number(threshold) > totalWeight)\n throw new InvalidConfigError({\n reason: 'threshold exceeds total owner weight',\n });\n const reachableWeight = weights\n .sort((a, b) => b - a)\n .slice(0, maxSignatures)\n .reduce((sum, weight) => sum + weight, 0);\n if (Number(threshold) > reachableWeight)\n throw new InvalidConfigError({\n reason: `threshold exceeds weight reachable by ${maxSignatures} owner signatures`,\n });\n}\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport function from(config) {\n const version = config.version ?? 0n;\n assertVersion(version);\n const owners = [...config.owners].sort((a, b) => Hex.toBigInt(a.owner) < Hex.toBigInt(b.owner) ? -1 : 1);\n const normalized = {\n owners,\n salt: config.salt ? Hex.padLeft(config.salt, 32) : zeroSalt,\n threshold: config.threshold,\n version: BigInt(version),\n };\n assert(normalized);\n return normalized;\n}\n/**\n * Converts a JSON-RPC account configuration to its domain representation.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const config = AccountConfig.fromRpc({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * salt: `0x${'00'.repeat(32)}`,\n * threshold: 1,\n * version: '0x0',\n * })\n * ```\n *\n * @param config - The JSON-RPC account configuration.\n * @returns The normalized account configuration.\n */\nexport function fromRpc(config) {\n return from({\n ...config,\n version: Hex.toBigInt(config.version),\n });\n}\n/**\n * Converts an RLP {@link ox#AccountConfig.Tuple} back to a\n * {@link ox#AccountConfig.Config}.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const config = AccountConfig.fromTuple([\n * `0x${'00'.repeat(32)}`,\n * '0x',\n * '0x01',\n * [['0x1111111111111111111111111111111111111111', '0x01']],\n * ])\n * ```\n *\n * @param tuple - The RLP tuple.\n * @returns The account config.\n */\nexport function fromTuple(tuple) {\n const [salt, version, threshold, owners] = tuple;\n if (tuple.length !== 4 ||\n typeof salt !== 'string' ||\n Hex.size(salt) !== 32 ||\n typeof version !== 'string' ||\n Hex.size(version) > 8 ||\n version.startsWith('0x00') ||\n typeof threshold !== 'string' ||\n Hex.size(threshold) > 1 ||\n threshold.startsWith('0x00') ||\n !Array.isArray(owners) ||\n owners.some((owner) => !Array.isArray(owner) ||\n owner.length !== 2 ||\n typeof owner[0] !== 'string' ||\n !Address.validate(owner[0]) ||\n typeof owner[1] !== 'string' ||\n Hex.size(owner[1]) > 1 ||\n owner[1].startsWith('0x00')))\n throw new InvalidConfigError({ reason: 'invalid config RLP tuple' });\n const config = {\n salt: salt && salt !== '0x' ? Hex.padLeft(salt, 32) : zeroSalt,\n version: version === '0x' ? 0n : Hex.toBigInt(version),\n threshold: threshold === '0x' ? 0 : Hex.toNumber(threshold),\n owners: owners.map((owner) => {\n const [ownerAddress, weight] = owner;\n return {\n owner: ownerAddress,\n weight: !weight || weight === '0x' ? 0 : Hex.toNumber(weight),\n };\n }),\n };\n assert(config);\n return config;\n}\n/**\n * Derives the configuration an existing account installs when it migrates in\n * place with the `upgradeAccount` precompile call\n * ([TIP-1113](https://tips.sh/1113)).\n *\n * The account keeps its address. Its salt is\n * `keccak256(\"tempo:configurable-account:upgrade\" || account)` and its version\n * is `1n`. Owners are sorted into canonical order and the config is validated.\n * The account itself may be listed as an owner.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const config = AccountConfig.fromUpgrade(\n * '0x3333333333333333333333333333333333333333',\n * {\n * owners: [\n * {\n * owner: '0x1111111111111111111111111111111111111111',\n * weight: 1\n * }\n * ],\n * threshold: 1\n * }\n * )\n * // config.version === 1n\n * ```\n *\n * @param account - The account migrating in place.\n * @param options - The owners and threshold to install.\n * @returns The installed account config.\n */\nexport function fromUpgrade(account, options) {\n Address.assert(account);\n return from({\n owners: options.owners,\n salt: Hash.keccak256(Hex.concat(Hex.fromString(upgradeDomain), account)),\n threshold: options.threshold,\n version: 1n,\n });\n}\n/**\n * Derives the stable configurable account address.\n *\n * The address is the last 20 bytes of the keccak256 hash of the initial\n * config, encoded with fixed-width big-endian fields, not RLP:\n * `keccak256(\"tempo:configurable-account:account\" || salt || uint8(threshold) || uint8(owners.length) || owners)`.\n *\n * The address is derived once from the initial version-0 config. Config\n * updates do not change it.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const initialConfig = AccountConfig.from({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n *\n * const address = AccountConfig.getAddress(initialConfig)\n * ```\n *\n * @param config - The initial account config.\n * @returns The configurable account address.\n */\nexport function getAddress(config) {\n assert(config);\n if (BigInt(config.version ?? 0) !== 0n)\n throw new InvalidConfigError({\n reason: 'account address requires version zero',\n });\n const hash = Hash.keccak256(Hex.concat(Hex.fromString(accountDomain), Hex.padLeft(config.salt ?? zeroSalt, 32), Hex.fromNumber(config.threshold, { size: 1 }), Hex.fromNumber(config.owners.length, { size: 1 }), ...config.owners.flatMap((owner) => [\n owner.owner,\n Hex.fromNumber(owner.weight, { size: 1 }),\n ])));\n const account = Hex.slice(hash, 12);\n if (Hex.toBigInt(account) === 0n)\n throw new InvalidConfigError({ reason: 'derived account cannot be zero' });\n if (config.owners.some((owner) => Address.isEqual(owner.owner, account)))\n throw new InvalidConfigError({\n reason: 'derived account cannot be an owner',\n });\n return account;\n}\n/**\n * Computes the commitment for an account configuration.\n *\n * The commitment uses raw fixed-width fields, not RLP or ABI encoding:\n * `keccak256(\"tempo:configurable-account:config\" || salt || uint64be(version) || uint8(threshold) || uint8(owners.length) || owners)`.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const commitment = AccountConfig.getCommitment({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * version: 1n,\n * })\n * ```\n *\n * @param config - The complete account configuration.\n * @returns The configuration commitment.\n */\nexport function getCommitment(config) {\n assert(config);\n return Hash.keccak256(Hex.concat(Hex.fromString(configDomain), Hex.padLeft(config.salt ?? zeroSalt, 32), Hex.fromNumber(config.version ?? 0n, { size: 8 }), Hex.fromNumber(config.threshold, { size: 1 }), Hex.fromNumber(config.owners.length, { size: 1 }), ...config.owners.flatMap((owner) => [\n owner.owner,\n Hex.fromNumber(owner.weight, { size: 1 }),\n ])));\n}\n/**\n * Computes the digest a configurable account owner approves (signs).\n *\n * `keccak256(\"tempo:configurable-account:signature\" || inner_digest || account || uint64be(version))`,\n * where `inner_digest` is the transaction sign payload\n * ({@link ox#TxEnvelopeTempo.(getSignPayload:function)}).\n *\n * The digest is keyed on the permanent `account` and the supplied config\n * version. Initial approvals use version `0n`; each config update increments\n * it.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig, TxEnvelopeTempo } from 'ox/tempo'\n *\n * const config = AccountConfig.from({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [],\n * })\n *\n * const digest = AccountConfig.getSignPayload({\n * account: AccountConfig.getAddress(config),\n * config,\n * payload: TxEnvelopeTempo.getSignPayload(envelope),\n * })\n * ```\n *\n * @param value - The digest derivation parameters.\n * @returns The owner approval digest.\n */\nexport function getSignPayload(value) {\n const { account, config, payload } = value;\n assertVersion(config.version);\n Address.assert(account);\n if (Hex.size(Hex.from(payload)) !== 32)\n throw new InvalidConfigError({ reason: 'payload must be 32 bytes' });\n return Hash.keccak256(Hex.concat(Hex.fromString(signatureDomain), Hex.from(payload), account, Hex.fromNumber(config.version ?? 0n, { size: 8 })));\n}\n/**\n * Converts an account configuration to its JSON-RPC representation.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const config = AccountConfig.toRpc({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n * ```\n *\n * @param config - The account configuration.\n * @returns The JSON-RPC account configuration.\n */\nexport function toRpc(config) {\n const value = from(config);\n return {\n owners: value.owners.map((owner) => ({\n owner: owner.owner,\n weight: Number(owner.weight),\n })),\n salt: value.salt,\n threshold: Number(value.threshold),\n version: Hex.fromNumber(value.version),\n };\n}\n/**\n * Converts a {@link ox#AccountConfig.Config} to its RLP tuple form.\n *\n * Tuple shape: `[salt, version, threshold, [[owner, weight], ...]]`. The\n * 32-byte `salt` encodes as a full fixed-width string; other integers use\n * canonical RLP encoding (zero values encode as `0x`).\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const tuple = AccountConfig.toTuple({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n * ```\n *\n * @param config - The account config.\n * @returns The RLP tuple.\n */\nexport function toTuple(config) {\n assert(config);\n const owners = config.owners.map((owner) => [owner.owner, Hex.fromNumber(owner.weight)]);\n // `salt` is a fixed 32-byte value: it RLP-encodes as a full 32-byte string\n // (including the zero salt), never trimmed like an integer.\n const salt = config.salt ? Hex.padLeft(config.salt, 32) : zeroSalt;\n const version = BigInt(config.version ?? 0);\n return [\n salt,\n version === 0n ? '0x' : Hex.fromNumber(version),\n Hex.fromNumber(config.threshold),\n owners,\n ];\n}\n/**\n * Derives the configuration that replaces the current one in an owner update.\n *\n * Mirrors the `updateConfig` precompile ([TIP-1109](https://tips.sh/1109)):\n * keeps the current salt, increments the version by one, and replaces the\n * owners and threshold. Owners are sorted into canonical order and the next\n * configuration is validated. The account address does not change.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const initialConfig = AccountConfig.from({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n *\n * const config = AccountConfig.update(initialConfig, {\n * owners: [\n * { owner: '0x2222222222222222222222222222222222222222', weight: 1 },\n * ],\n * threshold: 1,\n * })\n * // config.version === 1n, with the initial salt\n * ```\n *\n * @param config - The current account config.\n * @param options - The replacement owners and threshold.\n * @returns The next account config.\n */\nexport function update(config, options) {\n const current = from(config);\n if (current.version === maxVersion)\n throw new InvalidConfigError({ reason: 'version overflow' });\n return from({\n owners: options.owners,\n salt: current.salt,\n threshold: options.threshold,\n version: current.version + 1n,\n });\n}\n/**\n * Validates an {@link ox#AccountConfig.Config}. Returns `true`\n * if valid, `false` otherwise.\n *\n * @example\n * ```ts twoslash\n * import { AccountConfig } from 'ox/tempo'\n *\n * const valid = AccountConfig.validate({\n * owners: [\n * { owner: '0x1111111111111111111111111111111111111111', weight: 1 },\n * ],\n * threshold: 1,\n * })\n * // @log: true\n * ```\n *\n * @param config - The account config.\n * @returns Whether the config is valid.\n */\nexport function validate(config) {\n try {\n assert(config);\n return true;\n }\n catch {\n return false;\n }\n}\n/** Thrown when an account config is invalid. */\nexport class InvalidConfigError extends Errors.BaseError {\n constructor({ reason }) {\n super(`Invalid account config: ${reason}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'AccountConfig.InvalidConfigError'\n });\n }\n}\n/** @internal */\nfunction assertVersion(version) {\n if ((typeof version !== 'bigint' && typeof version !== 'number') ||\n (typeof version === 'number' && !Number.isSafeInteger(version)) ||\n BigInt(version) < 0n ||\n BigInt(version) > maxVersion)\n throw new InvalidConfigError({\n reason: 'version must be an unsigned 64-bit integer',\n });\n}\n//# sourceMappingURL=AccountConfig.js.map","import * as Address from '../core/Address.js';\nimport * as Errors from '../core/Errors.js';\nimport * as Hex from '../core/Hex.js';\nimport * as Json from '../core/Json.js';\nimport * as ox_P256 from '../core/P256.js';\nimport * as Rlp from '../core/Rlp.js';\nimport * as ox_Secp256k1 from '../core/Secp256k1.js';\nimport * as Signature from '../core/Signature.js';\nimport * as ox_WebAuthnP256 from '../core/WebAuthnP256.js';\nimport * as AccountConfig from './AccountConfig.js';\n/** Signature type identifiers for encoding/decoding */\nconst serializedP256Type = '0x01';\nconst serializedWebAuthnType = '0x02';\nconst serializedKeychainType = '0x03';\nconst serializedKeychainV2Type = '0x04';\nconst serializedConfigurableType = '0x05';\n/** Serialized magic identifier for Tempo signature envelopes. */\nexport const magicBytes = '0x7777777777777777777777777777777777777777777777777777777777777777'; // 32 \"T\"s\n/** List of supported signature types. */\nexport const types = ['secp256k1', 'p256', 'webAuthn'];\n/**\n * Asserts that a {@link ox#SignatureEnvelope.SignatureEnvelope} is valid.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * SignatureEnvelope.assert({\n * type: 'secp256k1',\n * signature: {\n * r: 0n,\n * s: 0n,\n * yParity: 0,\n * },\n * })\n * ```\n *\n * @param envelope - The signature envelope to assert.\n * @throws `CoercionError` if the envelope type cannot be determined.\n */\nexport function assert(envelope) {\n const type = getType(envelope);\n if (type === 'secp256k1') {\n const secp256k1 = envelope;\n Signature.assert(secp256k1.signature);\n return;\n }\n if (type === 'p256') {\n const p256 = envelope;\n const missing = [];\n if (typeof p256.signature?.r !== 'bigint')\n missing.push('signature.r');\n if (typeof p256.signature?.s !== 'bigint')\n missing.push('signature.s');\n if (typeof p256.prehash !== 'boolean')\n missing.push('prehash');\n if (!p256.publicKey)\n missing.push('publicKey');\n else {\n if (typeof p256.publicKey.x !== 'bigint')\n missing.push('publicKey.x');\n if (typeof p256.publicKey.y !== 'bigint')\n missing.push('publicKey.y');\n }\n if (missing.length > 0)\n throw new MissingPropertiesError({ envelope, missing, type: 'p256' });\n return;\n }\n if (type === 'webAuthn') {\n const webauthn = envelope;\n const missing = [];\n if (typeof webauthn.signature?.r !== 'bigint')\n missing.push('signature.r');\n if (typeof webauthn.signature?.s !== 'bigint')\n missing.push('signature.s');\n if (!webauthn.metadata)\n missing.push('metadata');\n else {\n if (!webauthn.metadata.authenticatorData)\n missing.push('metadata.authenticatorData');\n if (!webauthn.metadata.clientDataJSON)\n missing.push('metadata.clientDataJSON');\n }\n if (!webauthn.publicKey)\n missing.push('publicKey');\n else {\n if (typeof webauthn.publicKey.x !== 'bigint')\n missing.push('publicKey.x');\n if (typeof webauthn.publicKey.y !== 'bigint')\n missing.push('publicKey.y');\n }\n if (missing.length > 0)\n throw new MissingPropertiesError({ envelope, missing, type: 'webAuthn' });\n return;\n }\n if (type === 'keychain') {\n const keychain = envelope;\n assertKeychainVersion(keychain);\n assert(keychain.inner);\n return;\n }\n if (type === 'configurable') {\n const configurable = envelope;\n assertConfigurable(configurable);\n return;\n }\n}\nfunction assertKeychainVersion(keychain) {\n if (keychain.version !== 'v1')\n return;\n let inner = keychain.inner;\n while (getType(inner) === 'keychain')\n inner = inner.inner;\n if (getType(inner) === 'configurable')\n throw new InvalidApprovalError({\n reason: 'configurable access keys require keychain V2',\n });\n}\nfunction assertConfigurable(envelope) {\n const missing = [];\n if (!envelope.account)\n missing.push('account');\n if (!envelope.config)\n missing.push('config');\n if (!Array.isArray(envelope.signatures))\n missing.push('signatures');\n if (missing.length > 0)\n throw new MissingPropertiesError({\n envelope,\n missing,\n type: 'configurable',\n });\n if (!Address.validate(envelope.account))\n throw new InvalidApprovalError({\n reason: 'configurable account is invalid',\n });\n if (Hex.toBigInt(envelope.account) === 0n)\n throw new InvalidApprovalError({\n reason: 'configurable account cannot be zero',\n });\n if (envelope.signatures.length === 0)\n throw new InvalidApprovalError({\n reason: 'configurable signatures cannot be empty',\n });\n if (envelope.signatures.length > AccountConfig.maxSignatures)\n throw new InvalidApprovalError({\n reason: `configurable signatures exceed ${AccountConfig.maxSignatures}`,\n });\n AccountConfig.assert(envelope.config);\n if ((envelope.config.version ?? 0n) === 0n &&\n envelope.config.owners.some((owner) => Address.isEqual(owner.owner, envelope.account)))\n throw new InvalidApprovalError({\n reason: 'initial account cannot be an owner',\n });\n for (const inner of envelope.signatures) {\n const type = getType(inner);\n if (type === 'keychain' || type === 'configurable')\n throw new InvalidApprovalError({\n reason: 'owner approvals must be primitive signatures',\n });\n assert(inner);\n if (Hex.size(serialize(inner)) > AccountConfig.maxOwnerSignatureBytes)\n throw new InvalidApprovalError({\n reason: `configurable owner signature exceeds ${AccountConfig.maxOwnerSignatureBytes} bytes`,\n });\n }\n}\n/**\n * Extracts the address of the signer from a {@link ox#SignatureEnvelope.SignatureEnvelope}.\n *\n * - **secp256k1**: Recovers the address from the payload via `ecrecover`.\n * - **p256** / **webAuthn**: Derives the address from the embedded public key.\n * - **keychain**: Extracts from the inner signature (or returns `userAddress` if `user` is `true`).\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const payload = '0xdeadbeef'\n * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })\n * const envelope = SignatureEnvelope.from(signature)\n *\n * const address = SignatureEnvelope.extractAddress({ // [!code focus]\n * payload, // [!code focus]\n * signature: envelope, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The extraction options.\n * @returns The signer address.\n */\nexport function extractAddress(options) {\n const { signature, root } = options;\n if (signature.type === 'keychain') {\n if (root)\n return signature.userAddress;\n return extractAddress({ ...options, signature: signature.inner });\n }\n // Configurable signatures have no single signer; the recovered sender is the\n // derived configurable account address.\n if (signature.type === 'configurable')\n return signature.account;\n return Address.fromPublicKey(extractPublicKey(options));\n}\n/**\n * Extracts the public key of the signer from a {@link ox#SignatureEnvelope.SignatureEnvelope}.\n *\n * - **secp256k1**: Recovers the public key from the payload via `ecrecover`.\n * - **p256** / **webAuthn**: Returns the embedded public key.\n * - **keychain**: Extracts from the inner signature.\n *\n * @example\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const payload = '0xdeadbeef'\n * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })\n * const envelope = SignatureEnvelope.from(signature)\n *\n * const publicKey = SignatureEnvelope.extractPublicKey({ // [!code focus]\n * payload, // [!code focus]\n * signature: envelope, // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @param options - The extraction options.\n * @returns The signer's public key.\n */\nexport function extractPublicKey(options) {\n const { payload, signature } = options;\n switch (signature.type) {\n case 'secp256k1':\n return ox_Secp256k1.recoverPublicKey({\n payload,\n signature: signature.signature,\n });\n case 'p256':\n case 'webAuthn':\n return signature.publicKey;\n case 'keychain':\n return extractPublicKey({ payload, signature: signature.inner });\n case 'configurable':\n // A configurable signature aggregates multiple owner approvals and has no\n // single public key; recover the configurable account via `extractAddress`.\n throw new CoercionError({ envelope: signature });\n }\n}\n/**\n * Deserializes a hex-encoded signature envelope into a typed signature object.\n *\n * Wire format detection:\n * - 65 bytes (no prefix): secp256k1 signature\n * - Type `0x01` + 129 bytes: P256 signature (r, s, pubKeyX, pubKeyY, prehash)\n * - Type `0x02` + variable: WebAuthn signature (webauthnData, r, s, pubKeyX, pubKeyY)\n * - Type `0x03` + 20 bytes + inner: Keychain V1 signature (userAddress + inner signature)\n * - Type `0x04` + 20 bytes + inner: Keychain V2 signature (userAddress + inner signature)\n *\n * [Signature Types](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#signature-types)\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const envelope = SignatureEnvelope.deserialize('0x...')\n * ```\n *\n * @param serialized - The hex-encoded signature envelope to deserialize.\n * @returns The deserialized signature envelope.\n * @throws `CoercionError` if the serialized value cannot be coerced to a valid signature envelope.\n */\nexport function deserialize(value) {\n return deserialize_(value);\n}\nfunction deserialize_(value) {\n const serialized = value.endsWith(magicBytes.slice(2))\n ? Hex.slice(value, 0, -Hex.size(magicBytes))\n : value;\n const size = Hex.size(serialized);\n // Backward compatibility: 65 bytes means secp256k1 without type identifier\n if (size === 65) {\n const signature = Signature.fromHex(serialized);\n Signature.assert(signature);\n return { signature, type: 'secp256k1' };\n }\n // For all other lengths, first byte is the type identifier\n const typeId = Hex.slice(serialized, 0, 1);\n const data = Hex.slice(serialized, 1);\n const dataSize = Hex.size(data);\n if (typeId === serializedP256Type) {\n // P256: 32 (r) + 32 (s) + 32 (pubKeyX) + 32 (pubKeyY) + 1 (prehash) = 129 bytes\n if (dataSize !== 129)\n throw new InvalidSerializedError({\n reason: `Invalid P256 signature envelope size: expected 129 bytes, got ${dataSize} bytes`,\n serialized,\n });\n return {\n publicKey: {\n prefix: 4,\n x: Hex.toBigInt(Hex.slice(data, 64, 96)),\n y: Hex.toBigInt(Hex.slice(data, 96, 128)),\n },\n prehash: Hex.toNumber(Hex.slice(data, 128, 129)) !== 0,\n signature: {\n r: Hex.toBigInt(Hex.slice(data, 0, 32)),\n s: Hex.toBigInt(Hex.slice(data, 32, 64)),\n },\n type: 'p256',\n };\n }\n if (typeId === serializedWebAuthnType) {\n // WebAuthn: variable (webauthnData) + 32 (r) + 32 (s) + 32 (pubKeyX) + 32 (pubKeyY)\n // Minimum: 128 bytes (at least some authenticator data + signature components)\n if (dataSize < 128)\n throw new InvalidSerializedError({\n reason: `Invalid WebAuthn signature envelope size: expected at least 128 bytes, got ${dataSize} bytes`,\n serialized,\n });\n const webauthnDataSize = dataSize - 128;\n const webauthnData = Hex.slice(data, 0, webauthnDataSize);\n // Parse webauthnData into authenticatorData and clientDataJSON\n // According to the Rust code, it's authenticatorData || clientDataJSON\n // We need to find the split point (minimum authenticatorData is 37 bytes)\n let authenticatorData;\n let clientDataJSON;\n // Try to find the JSON start (clientDataJSON should start with '{')\n for (let split = 37; split < webauthnDataSize; split++) {\n const potentialJson = Hex.toString(Hex.slice(webauthnData, split));\n if (potentialJson.startsWith('{') && potentialJson.endsWith('}')) {\n try {\n JSON.parse(potentialJson);\n authenticatorData = Hex.slice(webauthnData, 0, split);\n clientDataJSON = potentialJson;\n break;\n }\n catch { }\n }\n }\n if (!authenticatorData || !clientDataJSON)\n throw new InvalidSerializedError({\n reason: 'Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON',\n serialized,\n });\n return {\n publicKey: {\n prefix: 4,\n x: Hex.toBigInt(Hex.slice(data, webauthnDataSize + 64, webauthnDataSize + 96)),\n y: Hex.toBigInt(Hex.slice(data, webauthnDataSize + 96, webauthnDataSize + 128)),\n },\n metadata: {\n authenticatorData,\n clientDataJSON,\n },\n signature: {\n r: Hex.toBigInt(Hex.slice(data, webauthnDataSize, webauthnDataSize + 32)),\n s: Hex.toBigInt(Hex.slice(data, webauthnDataSize + 32, webauthnDataSize + 64)),\n },\n type: 'webAuthn',\n };\n }\n if (typeId === serializedKeychainType ||\n typeId === serializedKeychainV2Type) {\n const userAddress = Hex.slice(data, 0, 20);\n const inner = deserialize_(Hex.slice(data, 20));\n const envelope = {\n userAddress,\n inner,\n type: 'keychain',\n version: typeId === serializedKeychainV2Type ? 'v2' : 'v1',\n };\n assert(envelope);\n return envelope;\n }\n if (typeId === serializedConfigurableType) {\n const decoded = Rlp.toHex(data);\n if (!Array.isArray(decoded) || decoded.length !== 3)\n throw new InvalidSerializedError({\n reason: 'invalid configurable wire shape: expected exactly three fields',\n serialized,\n });\n const [account, config, signatures] = decoded;\n if (typeof account !== 'string' || !Address.validate(account))\n throw new InvalidSerializedError({\n reason: 'invalid configurable account',\n serialized,\n });\n if (!Array.isArray(config))\n throw new InvalidSerializedError({\n reason: 'invalid account config',\n serialized,\n });\n if (!Array.isArray(signatures) ||\n signatures.length === 0 ||\n signatures.length > AccountConfig.maxSignatures)\n throw new InvalidSerializedError({\n reason: 'invalid configurable signatures list',\n serialized,\n });\n const envelope = {\n type: 'configurable',\n account,\n config: AccountConfig.fromTuple(config),\n signatures: signatures.map((signature) => {\n if (!Hex.validate(signature) ||\n Hex.size(signature) > AccountConfig.maxOwnerSignatureBytes)\n throw new InvalidSerializedError({\n reason: 'invalid configurable owner signature',\n serialized,\n });\n // Reject recursive envelopes before decoding their contents.\n if (Hex.size(signature) !== 65 &&\n !['0x01', '0x02'].includes(Hex.slice(signature, 0, 1)))\n throw new InvalidSerializedError({\n reason: 'owner approvals must be primitive signatures',\n serialized,\n });\n return deserialize(signature);\n }),\n };\n assertConfigurable(envelope);\n return envelope;\n }\n throw new InvalidSerializedError({\n reason: `Unknown signature type identifier: ${typeId}. Expected ${serializedP256Type} (P256), ${serializedWebAuthnType} (WebAuthn), ${serializedKeychainType} (Keychain V1), ${serializedKeychainV2Type} (Keychain V2), or ${serializedConfigurableType} (Configurable)`,\n serialized,\n });\n}\n/**\n * Coerces a value to a signature envelope.\n *\n * Accepts either a serialized hex string or an existing signature envelope object.\n * Use this to wrap raw signatures from {@link ox#Secp256k1.(sign:function)}, {@link ox#P256.(sign:function)},\n * {@link ox#WebCryptoP256.(sign:function)}, or {@link ox#WebAuthnP256.(sign:function)} into the envelope format\n * required by Tempo transactions.\n *\n * [Signature Types](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#signature-types)\n *\n * @example\n * ### Secp256k1\n *\n * Standard Ethereum ECDSA signature using the secp256k1 curve.\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey })\n *\n * const envelope = SignatureEnvelope.from(signature)\n * ```\n *\n * @example\n * ### P256\n *\n * ECDSA signature using the P-256 (secp256r1) curve. Requires embedding the\n * public key.\n *\n * ```ts twoslash\n * import { P256 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = P256.createKeyPair()\n * const signature = P256.sign({ payload: '0xdeadbeef', privateKey })\n *\n * const envelope = SignatureEnvelope.from({\n * signature,\n * publicKey,\n * })\n * ```\n *\n * @example\n * ### P256 (WebCrypto)\n *\n * When using WebCrypto keys, `prehash` must be `true` since WebCrypto always\n * SHA256 hashes the digest before signing.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebCryptoP256 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()\n * const signature = await WebCryptoP256.sign({ payload: '0xdeadbeef', privateKey })\n *\n * const envelope = SignatureEnvelope.from({\n * signature,\n * publicKey,\n * prehash: true,\n * })\n * ```\n *\n * @example\n * ### WebAuthn\n *\n * Passkey-based signature using WebAuthn. Includes authenticator metadata\n * (authenticatorData and clientDataJSON) along with the P-256 signature and\n * public key.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebAuthnP256 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const credential = await WebAuthnP256.createCredential({\n * name: 'Example',\n * })\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * challenge: '0xdeadbeef',\n * credentialId: credential.id,\n * })\n *\n * const envelope = SignatureEnvelope.from({\n * signature,\n * publicKey: credential.publicKey,\n * metadata,\n * })\n * ```\n *\n * @example\n * ### Keychain\n *\n * Wraps another signature type with a user address, used for delegated signing\n * via access keys on behalf of a root account.\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n * const signature = Secp256k1.sign({ payload: '0xdeadbeef', privateKey })\n *\n * const envelope = SignatureEnvelope.from({\n * userAddress: '0x1234567890123456789012345678901234567890',\n * inner: SignatureEnvelope.from(signature),\n * })\n * ```\n *\n * @example\n * ### Configurable\n *\n * Include the permanent account and current configuration on every transaction.\n *\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const envelope = SignatureEnvelope.from({\n * account: '0x2222222222222222222222222222222222222222',\n * config: {\n * version: 0n,\n * threshold: 1,\n * owners: [\n * {\n * owner: '0x1111111111111111111111111111111111111111',\n * weight: 1\n * }\n * ]\n * },\n * signatures: [\n * SignatureEnvelope.from({\n * r: 1n,\n * s: 2n,\n * yParity: 0\n * })\n * ]\n * })\n * ```\n *\n * @param value - The value to coerce (either a hex string or signature envelope).\n * @returns The signature envelope.\n */\nexport function from(value, options) {\n if (typeof value === 'string')\n return deserialize(value);\n if (typeof value === 'object' &&\n value !== null &&\n 'r' in value &&\n 's' in value &&\n 'yParity' in value)\n return { signature: value, type: 'secp256k1' };\n const type = getType(value);\n if (type === 'configurable') {\n const configurable = value;\n return {\n ...configurable,\n config: AccountConfig.from(configurable.config),\n signatures: configurable.signatures.map((signature) => from(signature)),\n type,\n };\n }\n return {\n ...value,\n ...(type === 'p256' ? { prehash: value.prehash } : {}),\n ...(type === 'keychain'\n ? {\n ...(!(typeof value === 'object' &&\n value !== null &&\n 'version' in value &&\n value.version)\n ? { version: 'v2' }\n : {}),\n ...(!(typeof value === 'object' && 'keyId' in value && value.keyId)\n ? (() => {\n const inner = value.inner;\n if (inner.type === 'p256' || inner.type === 'webAuthn')\n return { keyId: Address.fromPublicKey(inner.publicKey) };\n if (inner.type === 'secp256k1' && options?.payload)\n return {\n keyId: Address.fromPublicKey(ox_Secp256k1.recoverPublicKey({\n payload: options.payload,\n signature: inner.signature,\n })),\n };\n return {};\n })()\n : {}),\n }\n : {}),\n type,\n };\n}\n/**\n * Converts an RPC-formatted signature envelope to a typed signature envelope.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const envelope = SignatureEnvelope.fromRpc({\n * r: '0x0',\n * s: '0x0',\n * yParity: '0x0',\n * type: 'secp256k1',\n * })\n * ```\n *\n * @param envelope - The RPC signature envelope to convert.\n * @returns The signature envelope with bigint values.\n */\nexport function fromRpc(envelope) {\n if (typeof envelope === 'string') {\n const signature = deserialize(Hex.concat(serializedConfigurableType, envelope));\n if (signature.type !== 'configurable')\n throw new CoercionError({ envelope });\n return signature;\n }\n if (envelope.type === 'secp256k1')\n return {\n signature: Signature.fromRpc(envelope),\n type: 'secp256k1',\n };\n if (envelope.type === 'p256') {\n return {\n prehash: envelope.preHash,\n publicKey: {\n prefix: 4,\n x: Hex.toBigInt(envelope.pubKeyX),\n y: Hex.toBigInt(envelope.pubKeyY),\n },\n signature: {\n r: Hex.toBigInt(envelope.r),\n s: Hex.toBigInt(envelope.s),\n },\n type: 'p256',\n };\n }\n if (envelope.type === 'webAuthn') {\n const webauthnData = envelope.webauthnData;\n const webauthnDataSize = Hex.size(webauthnData);\n // Parse webauthnData into authenticatorData and clientDataJSON\n let authenticatorData;\n let clientDataJSON;\n // Try to find the JSON start (clientDataJSON should start with '{')\n for (let split = 37; split < webauthnDataSize; split++) {\n const potentialJson = Hex.toString(Hex.slice(webauthnData, split));\n if (potentialJson.startsWith('{') && potentialJson.endsWith('}')) {\n try {\n JSON.parse(potentialJson);\n authenticatorData = Hex.slice(webauthnData, 0, split);\n clientDataJSON = potentialJson;\n break;\n }\n catch { }\n }\n }\n if (!authenticatorData || !clientDataJSON)\n throw new InvalidSerializedError({\n reason: 'Unable to parse WebAuthn metadata: could not extract valid authenticatorData and clientDataJSON',\n serialized: webauthnData,\n });\n return {\n metadata: {\n authenticatorData,\n clientDataJSON,\n },\n publicKey: {\n prefix: 4,\n x: Hex.toBigInt(envelope.pubKeyX),\n y: Hex.toBigInt(envelope.pubKeyY),\n },\n signature: {\n r: Hex.toBigInt(envelope.r),\n s: Hex.toBigInt(envelope.s),\n },\n type: 'webAuthn',\n };\n }\n if (envelope.type === 'keychain' ||\n ('userAddress' in envelope && 'signature' in envelope)) {\n const keychain = envelope;\n const result = {\n type: 'keychain',\n userAddress: keychain.userAddress,\n inner: fromRpc(keychain.signature),\n ...(keychain.keyId ? { keyId: keychain.keyId } : {}),\n ...(keychain.version ? { version: keychain.version } : {}),\n };\n assert(result);\n return result;\n }\n throw new CoercionError({ envelope });\n}\n/**\n * Determines the signature type of an envelope.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const type = SignatureEnvelope.getType({\n * signature: { r: 0n, s: 0n, yParity: 0 },\n * })\n * // @log: 'secp256k1'\n * ```\n *\n * @param envelope - The signature envelope to inspect.\n * @returns The signature type ('secp256k1', 'p256', or 'webAuthn').\n * @throws `CoercionError` if the envelope type cannot be determined.\n */\nexport function getType(envelope) {\n if (typeof envelope !== 'object' || envelope === null)\n throw new CoercionError({ envelope });\n if ('type' in envelope && envelope.type)\n return envelope.type;\n // Detect secp256k1 signature (backwards compatibility: also support flat structure)\n if ('signature' in envelope &&\n !('publicKey' in envelope) &&\n typeof envelope.signature === 'object' &&\n envelope.signature !== null &&\n 'r' in envelope.signature &&\n 's' in envelope.signature &&\n 'yParity' in envelope.signature)\n return 'secp256k1';\n // Detect secp256k1 signature (flat structure)\n if ('r' in envelope && 's' in envelope && 'yParity' in envelope)\n return 'secp256k1';\n // Detect P256 signature\n if ('signature' in envelope &&\n 'prehash' in envelope &&\n 'publicKey' in envelope &&\n typeof envelope.prehash === 'boolean')\n return 'p256';\n // Detect WebAuthn signature\n if ('signature' in envelope &&\n 'metadata' in envelope &&\n 'publicKey' in envelope)\n return 'webAuthn';\n // Detect Keychain signature\n if ('userAddress' in envelope && 'inner' in envelope)\n return 'keychain';\n // Detect Configurable signature\n if ('account' in envelope && 'config' in envelope && 'signatures' in envelope)\n return 'configurable';\n throw new CoercionError({\n envelope,\n });\n}\n/**\n * Serializes a signature envelope to a hex-encoded string.\n *\n * Wire format:\n * - secp256k1: 65 bytes (no type prefix, for backward compatibility)\n * - P256: `0x01` + r (32) + s (32) + pubKeyX (32) + pubKeyY (32) + prehash (1) = 130 bytes\n * - WebAuthn: `0x02` + webauthnData (variable) + r (32) + s (32) + pubKeyX (32) + pubKeyY (32)\n * - Keychain V1: `0x03` + userAddress (20) + inner signature (recursive)\n * - Keychain V2: `0x04` + userAddress (20) + inner signature (recursive)\n * - Configurable: `0x05` + RLP `[account, config, signatures]`\n *\n * [Signature Types](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#signature-types)\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const serialized = SignatureEnvelope.serialize({\n * signature: { r: 0n, s: 0n, yParity: 0 },\n * type: 'secp256k1',\n * })\n * ```\n *\n * @param envelope - The signature envelope to serialize.\n * @returns The hex-encoded serialized signature.\n * @throws `CoercionError` if the envelope cannot be serialized.\n */\nexport function serialize(envelope, options = {}) {\n const type = getType(envelope);\n // Backward compatibility: no type identifier for secp256k1\n if (type === 'secp256k1') {\n const secp256k1 = envelope;\n return Hex.concat(Signature.toHex(secp256k1.signature), options.magic ? magicBytes : '0x');\n }\n if (type === 'p256') {\n const p256 = envelope;\n // Format: 1 byte (type) + 32 (r) + 32 (s) + 32 (pubKeyX) + 32 (pubKeyY) + 1 (prehash)\n return Hex.concat(serializedP256Type, Hex.fromNumber(p256.signature.r, { size: 32 }), Hex.fromNumber(p256.signature.s, { size: 32 }), Hex.fromNumber(p256.publicKey.x, { size: 32 }), Hex.fromNumber(p256.publicKey.y, { size: 32 }), Hex.fromNumber(p256.prehash ? 1 : 0, { size: 1 }), options.magic ? magicBytes : '0x');\n }\n if (type === 'webAuthn') {\n const webauthn = envelope;\n // Format: 1 byte (type) + variable (authenticatorData || clientDataJSON) + 32 (r) + 32 (s) + 32 (pubKeyX) + 32 (pubKeyY)\n const webauthnData = Hex.concat(webauthn.metadata.authenticatorData, Hex.fromString(webauthn.metadata.clientDataJSON));\n return Hex.concat(serializedWebAuthnType, webauthnData, Hex.fromNumber(webauthn.signature.r, { size: 32 }), Hex.fromNumber(webauthn.signature.s, { size: 32 }), Hex.fromNumber(webauthn.publicKey.x, { size: 32 }), Hex.fromNumber(webauthn.publicKey.y, { size: 32 }), options.magic ? magicBytes : '0x');\n }\n if (type === 'keychain') {\n const keychain = envelope;\n assert(keychain);\n const keychainTypeId = keychain.version === 'v1'\n ? serializedKeychainType\n : serializedKeychainV2Type;\n return Hex.concat(keychainTypeId, keychain.userAddress, serialize(keychain.inner), options.magic ? magicBytes : '0x');\n }\n if (type === 'configurable') {\n const configurable = envelope;\n assert(configurable);\n return Hex.concat(serializedConfigurableType, Rlp.fromHex([\n configurable.account,\n AccountConfig.toTuple(configurable.config),\n configurable.signatures.map((signature) => serialize(signature)),\n ]), options.magic ? magicBytes : '0x');\n }\n throw new CoercionError({ envelope });\n}\n/**\n * Sorts primitive owner approvals by recovered address.\n *\n * Recovery uses the account and current config version's owner approval digest.\n * Duplicate or non-owner approvals must still be rejected by the node.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const ordered = SignatureEnvelope.sortApprovals({\n * account: '0x2222222222222222222222222222222222222222',\n * config: { version: 0n },\n * payload: `0x${'ab'.repeat(32)}`,\n * signatures: []\n * })\n * ```\n *\n * @param value - Account, version, payload, and primitive approvals.\n * @returns The approvals in ascending recovered-address order.\n */\nexport function sortApprovals(value) {\n const { signatures } = value;\n const digest = AccountConfig.getSignPayload(value);\n // Recover each signer once (decorate–sort–undecorate) rather than inside the\n // comparator.\n return signatures\n .map((signature) => ({\n key: Hex.toBigInt(extractAddress({ payload: digest, signature })),\n signature,\n }))\n .sort((a, b) => (a.key < b.key ? -1 : a.key > b.key ? 1 : 0))\n .map((entry) => entry.signature);\n}\n/**\n * Converts a signature envelope to RPC format.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const rpc = SignatureEnvelope.toRpc({\n * signature: { r: 0n, s: 0n, yParity: 0 },\n * type: 'secp256k1',\n * })\n * ```\n *\n * @param envelope - The signature envelope to convert.\n * @returns The RPC signature envelope with hex values.\n */\nexport function toRpc(envelope) {\n const type = getType(envelope);\n if (type === 'secp256k1') {\n const secp256k1 = envelope;\n return {\n ...Signature.toRpc(secp256k1.signature),\n type: 'secp256k1',\n };\n }\n if (type === 'p256') {\n const p256 = envelope;\n return {\n preHash: p256.prehash,\n pubKeyX: Hex.fromNumber(p256.publicKey.x, { size: 32 }),\n pubKeyY: Hex.fromNumber(p256.publicKey.y, { size: 32 }),\n r: Hex.fromNumber(p256.signature.r, { size: 32 }),\n s: Hex.fromNumber(p256.signature.s, { size: 32 }),\n type: 'p256',\n };\n }\n if (type === 'webAuthn') {\n const webauthn = envelope;\n const webauthnData = Hex.concat(webauthn.metadata.authenticatorData, Hex.fromString(webauthn.metadata.clientDataJSON));\n return {\n pubKeyX: Hex.fromNumber(webauthn.publicKey.x, { size: 32 }),\n pubKeyY: Hex.fromNumber(webauthn.publicKey.y, { size: 32 }),\n r: Hex.fromNumber(webauthn.signature.r, { size: 32 }),\n s: Hex.fromNumber(webauthn.signature.s, { size: 32 }),\n type: 'webAuthn',\n webauthnData,\n };\n }\n if (type === 'keychain') {\n const keychain = envelope;\n assertKeychainVersion(keychain);\n return {\n type: 'keychain',\n userAddress: keychain.userAddress,\n signature: toRpc(keychain.inner),\n ...(keychain.keyId ? { keyId: keychain.keyId } : {}),\n ...(keychain.version ? { version: keychain.version } : {}),\n };\n }\n if (type === 'configurable')\n return Hex.slice(serialize(envelope), 1);\n throw new CoercionError({ envelope });\n}\n/**\n * Validates a signature envelope. Returns `true` if the envelope is valid, `false` otherwise.\n *\n * @example\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n *\n * const valid = SignatureEnvelope.validate({\n * signature: { r: 0n, s: 0n, yParity: 0 },\n * type: 'secp256k1',\n * })\n * // @log: true\n * ```\n *\n * @param envelope - The signature envelope to validate.\n * @returns `true` if valid, `false` otherwise.\n */\nexport function validate(envelope) {\n try {\n assert(envelope);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Verifies a signature envelope against a digest/payload.\n *\n * Supports `secp256k1`, `p256`, and `webAuthn` signature types.\n *\n * :::warning\n * `keychain` signatures are not supported and will throw an error.\n * :::\n *\n * @example\n * ### Secp256k1\n *\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n * import { Secp256k1 } from 'ox'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n * const publicKey = Secp256k1.getPublicKey({ privateKey })\n * const payload = '0xdeadbeef'\n *\n * const signature = Secp256k1.sign({ payload, privateKey })\n * const envelope = SignatureEnvelope.from(signature)\n *\n * const valid = SignatureEnvelope.verify(envelope, {\n * payload,\n * publicKey,\n * })\n * // @log: true\n * ```\n *\n * @example\n * ### P256\n *\n * For P256 signatures, the `address` or `publicKey` must match the embedded\n * public key in the signature envelope.\n *\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n * import { P256 } from 'ox'\n *\n * const privateKey = P256.randomPrivateKey()\n * const publicKey = P256.getPublicKey({ privateKey })\n * const payload = '0xdeadbeef'\n *\n * const signature = P256.sign({ payload, privateKey })\n * const envelope = SignatureEnvelope.from({ prehash: false, publicKey, signature })\n *\n * const valid = SignatureEnvelope.verify(envelope, {\n * payload,\n * publicKey,\n * })\n * // @log: true\n * ```\n *\n * @example\n * ### WebCryptoP256\n *\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n * import { WebCryptoP256 } from 'ox'\n *\n * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()\n * const payload = '0xdeadbeef'\n *\n * const signature = await WebCryptoP256.sign({ payload, privateKey })\n * const envelope = SignatureEnvelope.from({ prehash: true, publicKey, signature })\n *\n * const valid = SignatureEnvelope.verify(envelope, {\n * payload,\n * publicKey,\n * })\n * // @log: true\n * ```\n *\n * @example\n * ### WebAuthnP256\n *\n * ```ts twoslash\n * import { SignatureEnvelope } from 'ox/tempo'\n * import { WebAuthnP256 } from 'ox'\n *\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' })\n * const payload = '0xdeadbeef'\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * challenge: payload,\n * credentialId: credential.id,\n * })\n * const envelope = SignatureEnvelope.from({\n * metadata,\n * signature,\n * publicKey: credential.publicKey,\n * })\n *\n * const valid = SignatureEnvelope.verify(envelope, {\n * payload,\n * publicKey: credential.publicKey,\n * })\n * // @log: true\n * ```\n *\n * @param parameters - Verification parameters.\n * @returns `true` if the signature is valid, `false` otherwise.\n */\nexport function verify(signature, parameters) {\n const { payload } = parameters;\n const address = (() => {\n if (parameters.address)\n return parameters.address;\n if (parameters.publicKey)\n return Address.fromPublicKey(parameters.publicKey);\n return undefined;\n })();\n if (!address)\n return false;\n const envelope = from(signature);\n if (envelope.type === 'secp256k1') {\n if (!address)\n return false;\n return ox_Secp256k1.verify({\n address,\n payload,\n signature: envelope.signature,\n });\n }\n if (envelope.type === 'p256') {\n const envelopeAddress = Address.fromPublicKey(envelope.publicKey);\n if (!Address.isEqual(envelopeAddress, address))\n return false;\n return ox_P256.verify({\n hash: envelope.prehash,\n publicKey: envelope.publicKey,\n payload,\n signature: envelope.signature,\n });\n }\n if (envelope.type === 'webAuthn') {\n const envelopeAddress = Address.fromPublicKey(envelope.publicKey);\n if (!Address.isEqual(envelopeAddress, address))\n return false;\n return ox_WebAuthnP256.verify({\n challenge: Hex.from(payload),\n metadata: envelope.metadata,\n publicKey: envelope.publicKey,\n signature: envelope.signature,\n });\n }\n throw new VerificationError(`Unable to verify signature envelope of type \"${envelope.type}\".`);\n}\n/**\n * Error thrown when a signature envelope cannot be coerced to a valid type.\n */\nexport class CoercionError extends Errors.BaseError {\n constructor({ envelope }) {\n super(`Unable to coerce value (\\`${Json.stringify(envelope)}\\`) to a valid signature envelope.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SignatureEnvelope.CoercionError'\n });\n }\n}\n/**\n * Error thrown when a signature envelope is missing required properties.\n */\nexport class MissingPropertiesError extends Errors.BaseError {\n constructor({ envelope, missing, type, }) {\n super(`Signature envelope of type \"${type}\" is missing required properties: ${missing.map((m) => `\\`${m}\\``).join(', ')}.\\n\\nProvided: ${Json.stringify(envelope)}`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SignatureEnvelope.MissingPropertiesError'\n });\n }\n}\n/**\n * Error thrown when a serialized signature envelope cannot be deserialized.\n */\nexport class InvalidSerializedError extends Errors.BaseError {\n constructor({ reason, serialized, }) {\n super(`Unable to deserialize signature envelope: ${reason}`, {\n metaMessages: [`Serialized: ${serialized}`],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SignatureEnvelope.InvalidSerializedError'\n });\n }\n}\n/**\n * Error thrown when a configurable account owner approval is invalid.\n */\nexport class InvalidApprovalError extends Errors.BaseError {\n constructor({ reason }) {\n super(`Invalid owner approval: ${reason}.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SignatureEnvelope.InvalidApprovalError'\n });\n }\n}\n/**\n * Error thrown when a signature envelope fails to verify.\n */\nexport class VerificationError extends Errors.BaseError {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'SignatureEnvelope.VerificationError'\n });\n }\n}\n//# sourceMappingURL=SignatureEnvelope.js.map","import * as core_Address from '../core/Address.js';\nimport * as Errors from '../core/Errors.js';\nimport * as Hex from '../core/Hex.js';\n/**\n * Resolves an address input (either an Ethereum hex address or a Tempo address)\n * to an Ethereum hex address.\n *\n * @example\n * ```ts twoslash\n * import { TempoAddress } from 'ox/tempo'\n *\n * const address = TempoAddress.resolve('tempox0x742d35cc6634c0532925a3b844bc9e7595f2bd28')\n * // @log: '0x742d35CC6634c0532925a3B844bc9e7595F2Bd28'\n * ```\n *\n * @example\n * ### Hex Address Passthrough\n * ```ts twoslash\n * import { TempoAddress } from 'ox/tempo'\n *\n * const address = TempoAddress.resolve('0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28')\n * // @log: '0x742d35CC6634c0532925a3B844bc9e7595F2Bd28'\n * ```\n *\n * @param address - An Ethereum hex address or Tempo address.\n * @returns The resolved Ethereum hex address.\n */\nexport function resolve(address) {\n if (address.startsWith('tempo'))\n return parse(address).address;\n return address;\n}\n/**\n * Formats a raw Ethereum address into a Tempo address string.\n *\n * @example\n * ```ts twoslash\n * import { TempoAddress } from 'ox/tempo'\n *\n * const address = TempoAddress.format('0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28')\n * // @log: 'tempox0x742d35cc6634c0532925a3b844bc9e7595f2bd28'\n * ```\n *\n * @param address - The raw 20-byte Ethereum address.\n * @returns The encoded Tempo address string.\n */\nexport function format(address) {\n const resolved = resolve(address);\n return `tempox${resolved.toLowerCase()}`;\n}\n/**\n * Parses a Tempo address string into a raw Ethereum address.\n *\n * @example\n * ```ts twoslash\n * import { TempoAddress } from 'ox/tempo'\n *\n * const result = TempoAddress.parse(\n * 'tempox0x742d35cc6634c0532925a3b844bc9e7595f2bd28',\n * )\n * // @log: { address: '0x742d35CC6634c0532925a3B844bc9e7595F2Bd28' }\n * ```\n *\n * @param tempoAddress - The Tempo address string to parse.\n * @returns The parsed raw address.\n */\nexport function parse(tempoAddress) {\n if (!tempoAddress.startsWith('tempox'))\n throw new InvalidPrefixError({ address: tempoAddress });\n const hex = tempoAddress.slice('tempox'.length);\n Hex.assert(hex, { strict: true });\n const address = core_Address.checksum(hex);\n return { address };\n}\n/**\n * Validates a Tempo address string.\n *\n * @example\n * ```ts twoslash\n * import { TempoAddress } from 'ox/tempo'\n *\n * const valid = TempoAddress.validate(\n * 'tempox0x742d35cc6634c0532925a3b844bc9e7595f2bd28',\n * )\n * // @log: true\n * ```\n *\n * @param tempoAddress - The Tempo address string to validate.\n * @returns Whether the address is valid.\n */\nexport function validate(tempoAddress) {\n try {\n parse(tempoAddress);\n return true;\n }\n catch {\n return false;\n }\n}\n/** Thrown when a Tempo address has an invalid prefix. */\nexport class InvalidPrefixError extends Errors.BaseError {\n constructor({ address }) {\n super(`Tempo address \"${address}\" has an invalid prefix. Expected \"tempox\".`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TempoAddress.InvalidPrefixError'\n });\n }\n}\n//# sourceMappingURL=TempoAddress.js.map","import * as AbiItem from '../core/AbiItem.js';\nimport * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nimport * as Rlp from '../core/Rlp.js';\nimport * as SignatureEnvelope from './SignatureEnvelope.js';\nimport * as TempoAddress from './TempoAddress.js';\n/**\n * Converts a Key Authorization object into a typed {@link ox#KeyAuthorization.KeyAuthorization}.\n *\n * Use this to create an unsigned key authorization, then sign it with the root key using\n * {@link ox#KeyAuthorization.(getSignPayload:function)} and attach the signature. The signed authorization\n * can be included in a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} via the\n * `keyAuthorization` field to provision the access key on-chain.\n *\n * [Access Keys Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#access-keys)\n *\n * @example\n * ### Secp256k1 Key\n *\n * Standard Ethereum ECDSA key using the secp256k1 curve.\n *\n * ```ts twoslash\n * import { Address, Secp256k1, Value } from 'ox'\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n * const address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey }))\n *\n * const authorization = KeyAuthorization.from({\n * address,\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6),\n * }],\n * })\n * ```\n *\n * @example\n * ### WebCryptoP256 Key\n *\n * ```ts twoslash\n * import { Address, WebCryptoP256, Value } from 'ox'\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const keyPair = await WebCryptoP256.createKeyPair()\n * const address = Address.fromPublicKey(keyPair.publicKey)\n *\n * const authorization = KeyAuthorization.from({\n * address,\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'p256',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6),\n * }],\n * })\n * ```\n *\n * @example\n * ### Attaching Signatures (Secp256k1)\n *\n * Attach a signature to a Key Authorization using a Secp256k1 private key to\n * authorize another Secp256k1 key on the account.\n *\n * ```ts twoslash\n * import { Address, Secp256k1, Value } from 'ox'\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const privateKey = '0x...'\n * const address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey }))\n *\n * const authorization = KeyAuthorization.from({\n * address,\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6),\n * }],\n * })\n *\n * const rootPrivateKey = '0x...'\n * const signature = Secp256k1.sign({\n * payload: KeyAuthorization.getSignPayload(authorization),\n * privateKey: rootPrivateKey,\n * })\n *\n * const authorization_signed = KeyAuthorization.from(authorization, { signature })\n * ```\n *\n * @example\n * ### Attaching Signatures (WebAuthn)\n *\n * Attach a signature to a Key Authorization using a WebAuthn credential to\n * authorize a new WebCryptoP256 key on the account.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Address, Value, WebCryptoP256, WebAuthnP256 } from 'ox'\n * import { KeyAuthorization, SignatureEnvelope } from 'ox/tempo'\n *\n * const keyPair = await WebCryptoP256.createKeyPair()\n * const address = Address.fromPublicKey(keyPair.publicKey)\n *\n * const authorization = KeyAuthorization.from({\n * address,\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'p256',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6),\n * }],\n * })\n *\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' })\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * challenge: KeyAuthorization.getSignPayload(authorization),\n * credentialId: credential.id,\n * })\n *\n * const signatureEnvelope = SignatureEnvelope.from({ // [!code focus]\n * signature, // [!code focus]\n * publicKey: credential.publicKey, // [!code focus]\n * metadata, // [!code focus]\n * })\n * const authorization_signed = KeyAuthorization.from(\n * authorization,\n * { signature: signatureEnvelope }, // [!code focus]\n * )\n * ```\n *\n * @param authorization - A Key Authorization tuple in object format.\n * @param options - Key Authorization options.\n * @returns The {@link ox#KeyAuthorization.KeyAuthorization}.\n */\nexport function from(authorization, options = {}) {\n if ('keyId' in authorization)\n return fromRpc(authorization);\n const auth = authorization;\n if (auth.witness !== undefined)\n assertWitness(auth.witness);\n if (auth.signature)\n assertSignature(auth.signature);\n const resolved = {\n ...auth,\n ...(auth.account !== undefined\n ? { account: TempoAddress.resolve(auth.account) }\n : {}),\n address: TempoAddress.resolve(auth.address),\n ...(auth.limits\n ? {\n limits: auth.limits.map((l) => ({\n ...l,\n token: TempoAddress.resolve(l.token),\n })),\n }\n : {}),\n ...(auth.scopes\n ? {\n scopes: auth.scopes.map((scope) => ({\n ...scope,\n address: TempoAddress.resolve(scope.address),\n selector: resolveSelector(scope.selector),\n ...(scope.recipients\n ? {\n recipients: scope.recipients.map((r) => TempoAddress.resolve(r)),\n }\n : {}),\n })),\n }\n : {}),\n };\n if (options.signature) {\n const signature = SignatureEnvelope.from(options.signature);\n assertSignature(signature);\n return {\n ...resolved,\n signature,\n };\n }\n return resolved;\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.Rpc} to an {@link ox#AuthorizationTempo.AuthorizationTempo}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const keyAuthorization = KeyAuthorization.fromRpc({\n * chainId: '0x1079',\n * expiry: '0x174876e800',\n * keyId: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * keyType: 'secp256k1',\n * limits: [{ token: '0x20c0000000000000000000000000000000000001', limit: '0xf4240' }],\n * signature: {\n * type: 'secp256k1',\n * r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',\n * s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',\n * yParity: '0x0'\n * },\n * })\n * ```\n *\n * @param authorization - The RPC-formatted Key Authorization.\n * @returns A signed {@link ox#AuthorizationTempo.AuthorizationTempo}.\n */\nexport function fromRpc(authorization) {\n const { allowedCalls, chainId, keyId, expiry, limits, keyType } = authorization;\n const witness = authorization.witness ?? undefined;\n const isAdmin = authorization.isAdmin ?? undefined;\n const account = authorization.account ?? undefined;\n const type = keyType === 'configurableAccount' ? 'configurable' : keyType;\n const signature = SignatureEnvelope.fromRpc(authorization.signature);\n assertSignature(signature);\n if (witness !== undefined)\n assertWitness(witness);\n // Unflatten nested allowedCalls into flat scopes\n const scopes = allowedCalls\n ? allowedCalls.flatMap((callScope) => {\n if (!callScope.selectorRules || callScope.selectorRules.length === 0)\n return [{ address: callScope.target }];\n return callScope.selectorRules.map((rule) => ({\n address: callScope.target,\n selector: normalizeSelector(rule.selector),\n ...(rule.recipients && rule.recipients.length > 0\n ? { recipients: rule.recipients }\n : {}),\n }));\n })\n : undefined;\n return {\n address: keyId,\n chainId: chainId === '0x' ? 0n : Hex.toBigInt(chainId),\n ...(expiry != null ? { expiry: Number(expiry) } : {}),\n limits: limits?.map((limit) => ({\n token: limit.token,\n limit: BigInt(limit.limit),\n ...(limit.period && hexToNumber(limit.period) > 0\n ? { period: hexToNumber(limit.period) }\n : {}),\n })),\n ...(scopes ? { scopes } : {}),\n signature,\n ...(type === 'configurable' ? { account: account, type } : { type }),\n ...(witness !== undefined ? { witness } : {}),\n ...(account !== undefined ? { account } : {}),\n ...(isAdmin ? { isAdmin: true } : {}),\n };\n}\n/**\n * Converts an {@link ox#KeyAuthorization.Tuple} to an {@link ox#KeyAuthorization.KeyAuthorization}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const authorization = KeyAuthorization.fromTuple([\n * [\n * '0x',\n * '0x00',\n * '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * '0x174876e800',\n * [['0x20c0000000000000000000000000000000000001', '0xf4240']],\n * ],\n * '0x01a068a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b907e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n * ])\n * ```\n *\n * @example\n * Unsigned Key Authorization tuple (no signature):\n *\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const authorization = KeyAuthorization.fromTuple([\n * [\n * '0x',\n * '0x00',\n * '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * '0x174876e800',\n * [['0x20c0000000000000000000000000000000000001', '0xf4240']],\n * ],\n * ])\n * ```\n *\n * @param tuple - The Key Authorization tuple.\n * @returns The {@link ox#KeyAuthorization.KeyAuthorization}.\n */\nexport function fromTuple(tuple) {\n const [authorization, signatureSerialized] = tuple;\n const [chainId, keyType_hex, keyId, ...trailing] = authorization;\n const keyType = (() => {\n switch (keyType_hex) {\n case '0x':\n case '0x00':\n return 'secp256k1';\n case '0x01':\n return 'p256';\n case '0x02':\n return 'webAuthn';\n case '0x03':\n return 'configurable';\n default:\n throw new Error(`Invalid key type: ${keyType_hex}`);\n }\n })();\n // Trailing optional fields in wire order. Each entry pulls one slot off the\n // trailing array and decodes it (treating absent or RLP-null placeholders as\n // missing). To add a new optional trailing field, append a single entry.\n const [rawExpiry, rawLimits, rawScopes, rawWitness, rawIsAdmin, rawAccount] = trailing;\n const expiry = isAbsent(rawExpiry)\n ? undefined\n : hexToNumber(rawExpiry) || undefined;\n // An empty list (`0xc0`) is an explicit deny-all, distinct from an absent\n // field (`0x80` or omitted), which leaves spending unlimited.\n const limits = Array.isArray(rawLimits)\n ? rawLimits.map((limitTuple) => {\n const [token, limit, period] = limitTuple;\n return {\n token,\n limit: hexToBigint(limit),\n ...(period !== undefined ? { period: hexToNumber(period) } : {}),\n };\n })\n : undefined;\n const scopes = Array.isArray(rawScopes)\n ? rawScopes.flatMap((scopeTuple) => {\n const [address, selectorRules] = scopeTuple;\n // If no selector rules, this is an address-only scope.\n if (!Array.isArray(selectorRules) || selectorRules.length === 0)\n return [{ address }];\n // Flatten each selector rule into a separate scope entry.\n return selectorRules.map((ruleTuple) => {\n const [selector, recipients] = ruleTuple;\n return {\n address,\n selector,\n ...(Array.isArray(recipients) && recipients.length > 0\n ? { recipients }\n : {}),\n };\n });\n })\n : undefined;\n const witness = isAbsent(rawWitness) ? undefined : rawWitness;\n if (witness !== undefined)\n assertWitness(witness);\n const isAdmin = (() => {\n if (isAbsent(rawIsAdmin))\n return undefined;\n // TIP-1049: the admin marker is strictly `0x01`. Any other value is a\n // protocol-level decode error on the node, so reject it here too.\n if (rawIsAdmin !== '0x01')\n throw new InvalidAdminMarkerError(rawIsAdmin);\n return true;\n })();\n const account = isAbsent(rawAccount)\n ? undefined\n : rawAccount;\n const args = {\n address: keyId,\n chainId: chainId === '0x' ? 0n : Hex.toBigInt(chainId),\n ...(keyType === 'configurable'\n ? { account: account, type: keyType }\n : { type: keyType }),\n ...(expiry !== undefined ? { expiry } : {}),\n ...(limits !== undefined ? { limits } : {}),\n ...(scopes !== undefined ? { scopes } : {}),\n ...(witness !== undefined ? { witness } : {}),\n ...(account !== undefined ? { account } : {}),\n ...(isAdmin ? { isAdmin: true } : {}),\n };\n if (signatureSerialized) {\n const signature = SignatureEnvelope.deserialize(signatureSerialized);\n assertSignature(signature);\n args.signature = signature;\n }\n return from(args);\n}\n/**\n * Computes the sign payload for an {@link ox#KeyAuthorization.KeyAuthorization}.\n *\n * The root key must sign this payload to authorize the access key. The resulting signature\n * is attached to the key authorization via {@link ox#KeyAuthorization.(from:function)} with the\n * `signature` option.\n *\n * [Access Keys Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#access-keys)\n *\n * @example\n * ```ts twoslash\n * import { Address, Secp256k1, Value } from 'ox'\n * import { KeyAuthorization } from 'ox/tempo'\n *\n * const privateKey = '0x...'\n * const address = Address.fromPublicKey(Secp256k1.getPublicKey({ privateKey }))\n *\n * const authorization = KeyAuthorization.from({\n * address,\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6),\n * }],\n * })\n *\n * const payload = KeyAuthorization.getSignPayload(authorization) // [!code focus]\n * ```\n *\n * @param authorization - The {@link ox#KeyAuthorization.KeyAuthorization}.\n * @returns The sign payload.\n */\nexport function getSignPayload(authorization) {\n return hash(authorization);\n}\n/**\n * Deserializes an RLP-encoded {@link ox#KeyAuthorization.KeyAuthorization}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n * import { Value } from 'ox'\n *\n * const authorization = KeyAuthorization.from({\n * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6)\n * }],\n * })\n *\n * const serialized = KeyAuthorization.serialize(authorization)\n * const deserialized = KeyAuthorization.deserialize(serialized) // [!code focus]\n * ```\n *\n * @param serialized - The RLP-encoded Key Authorization.\n * @returns The {@link ox#KeyAuthorization.KeyAuthorization}.\n */\nexport function deserialize(serialized) {\n const tuple = Rlp.toHex(serialized);\n return fromTuple(tuple);\n}\n/**\n * Computes the hash for an {@link ox#KeyAuthorization.KeyAuthorization}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n * import { Value } from 'ox'\n *\n * const authorization = KeyAuthorization.from({\n * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6)\n * }],\n * })\n *\n * const hash = KeyAuthorization.hash(authorization) // [!code focus]\n * ```\n *\n * @param authorization - The {@link ox#KeyAuthorization.KeyAuthorization}.\n * @returns The hash.\n */\nexport function hash(authorization) {\n const [authorizationTuple] = toTuple(authorization);\n const serialized = Rlp.fromHex(authorizationTuple);\n return Hash.keccak256(serialized);\n}\n/**\n * Serializes a {@link ox#KeyAuthorization.KeyAuthorization} to RLP-encoded hex.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n * import { Value } from 'ox'\n *\n * const authorization = KeyAuthorization.from({\n * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6)\n * }],\n * })\n *\n * const serialized = KeyAuthorization.serialize(authorization) // [!code focus]\n * ```\n *\n * @param authorization - The {@link ox#KeyAuthorization.KeyAuthorization}.\n * @returns The RLP-encoded Key Authorization.\n */\nexport function serialize(authorization) {\n const tuple = toTuple(authorization);\n return Rlp.fromHex(tuple);\n}\n/**\n * Converts an {@link ox#KeyAuthorization.KeyAuthorization} to an {@link ox#KeyAuthorization.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n * import { Value } from 'ox'\n *\n * const authorization = KeyAuthorization.toRpc({\n * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6)\n * }],\n * signature: {\n * type: 'secp256k1',\n * signature: {\n * r: 44944627813007772897391531230081695102703289123332187696115181104739239197517n,\n * s: 36528503505192438307355164441104001310566505351980369085208178712678799181120n,\n * yParity: 0,\n * },\n * },\n * })\n * ```\n *\n * @param authorization - A Key Authorization.\n * @returns An RPC-formatted Key Authorization.\n */\nexport function toRpc(authorization) {\n const { address, scopes, chainId, expiry, limits, type, signature, witness, isAdmin, account, } = authorization;\n assertSignature(signature);\n if (witness !== undefined)\n assertWitness(witness);\n // Group flat scopes by address into nested allowedCalls wire format\n const allowedCalls = (() => {\n if (!scopes)\n return undefined;\n const grouped = new Map();\n for (const scope of scopes) {\n const key = scope.address;\n if (!grouped.has(key))\n grouped.set(key, []);\n if (scope.selector) {\n grouped.get(key).push({\n selector: resolveSelector(scope.selector),\n ...(scope.recipients && scope.recipients.length > 0\n ? { recipients: scope.recipients }\n : {}),\n });\n }\n }\n return [...grouped.entries()].map(([target, selectorRules]) => ({\n target: target,\n ...(selectorRules.length > 0 ? { selectorRules } : {}),\n }));\n })();\n return {\n chainId: chainId === 0n ? '0x' : Hex.fromNumber(chainId),\n expiry: typeof expiry === 'number' ? Hex.fromNumber(expiry) : null,\n keyId: TempoAddress.resolve(address),\n ...(type === 'configurable'\n ? { account, keyType: 'configurableAccount' }\n : { keyType: type }),\n limits: limits?.map(({ token, limit, period }) => ({\n token,\n limit: Hex.fromNumber(limit),\n ...(period ? { period: numberToHex(period) } : {}),\n })),\n signature: SignatureEnvelope.toRpc(signature),\n ...(allowedCalls ? { allowedCalls } : {}),\n ...(witness !== undefined ? { witness } : {}),\n ...(isAdmin ? { isAdmin: true } : {}),\n ...(account !== undefined ? { account } : {}),\n };\n}\n/**\n * Converts an {@link ox#KeyAuthorization.KeyAuthorization} to an {@link ox#KeyAuthorization.Tuple}.\n *\n * @example\n * ```ts twoslash\n * import { KeyAuthorization } from 'ox/tempo'\n * import { Value } from 'ox'\n *\n * const authorization = KeyAuthorization.from({\n * address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 4217n,\n * expiry: 1234567890,\n * type: 'secp256k1',\n * limits: [{\n * token: '0x20c0000000000000000000000000000000000001',\n * limit: Value.from('10', 6)\n * }],\n * })\n *\n * const tuple = KeyAuthorization.toTuple(authorization) // [!code focus]\n * // @log: [\n * // @log: '0x174876e800',\n * // @log: [['0x20c0000000000000000000000000000000000001', '0xf4240']],\n * // @log: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: 'secp256k1',\n * // @log: ]\n * ```\n *\n * @param authorization - The {@link ox#KeyAuthorization.KeyAuthorization}.\n * @returns A Tempo Key Authorization tuple.\n */\nexport function toTuple(authorization) {\n const { address, chainId, scopes, expiry, limits, witness, isAdmin, account, } = authorization;\n if (witness !== undefined)\n assertWitness(witness);\n const signature = (() => {\n if (!authorization.signature)\n return undefined;\n assertSignature(authorization.signature);\n return SignatureEnvelope.serialize(authorization.signature);\n })();\n const keyType = authorization.type;\n const type = (() => {\n switch (keyType) {\n case 'secp256k1':\n return '0x';\n case 'p256':\n return '0x01';\n case 'webAuthn':\n return '0x02';\n case 'configurable':\n return '0x03';\n default:\n throw new Error(`Invalid key type: ${keyType}`);\n }\n })();\n const limitsValue = limits?.map((limit) => {\n const tuple = [limit.token, bigintToHex(limit.limit)];\n // Canonical: omit period when 0 (one-time limit)\n if (limit.period && limit.period > 0)\n tuple.push(numberToHex(limit.period));\n return tuple;\n });\n // Group flat scopes by address for wire format\n const callsValue = (() => {\n if (!scopes)\n return undefined;\n const grouped = new Map();\n for (const scope of scopes) {\n const key = scope.address;\n if (!grouped.has(key))\n grouped.set(key, []);\n if (scope.selector) {\n grouped\n .get(key)\n .push([\n resolveSelector(scope.selector),\n (scope.recipients ??\n []),\n ]);\n }\n }\n return [...grouped.entries()].map(([address, selectorRules]) => [\n address,\n selectorRules.map(([selector, recipients]) => [selector, recipients]),\n ]);\n })();\n // Optional trailing fields in wire order. Each entry's `placeholder` is\n // emitted when this field is skipped but a later field is present.\n //\n // `'0x'` (RLP null) is the canonical placeholder: the node decodes it as\n // `None` (unrestricted). An empty list would decode as `Some([])`, so a\n // skipped `limits` must never use `[]` (that reads as deny-all spending).\n //\n // To add a new optional trailing field (e.g. from a future TIP): append a\n // single entry to this list with `placeholder: '0x'`.\n const optionals = [\n {\n value: expiry !== null && expiry !== undefined && expiry !== 0\n ? numberToHex(expiry)\n : undefined,\n placeholder: '0x',\n },\n {\n value: limitsValue,\n placeholder: '0x',\n },\n { value: callsValue, placeholder: '0x' },\n { value: witness, placeholder: '0x' },\n // TIP-1049: admin marker. Present = `0x01` (RLP integer 1); absent\n // skipped or omitted. Any other value is a hard decode error on the node.\n { value: isAdmin ? '0x01' : undefined, placeholder: '0x' },\n // TIP-1049: optional account binding. Last field — never a placeholder.\n { value: account, placeholder: '0x' },\n ];\n let lastPresent = -1;\n for (let i = optionals.length - 1; i >= 0; i--)\n if (optionals[i].value !== undefined) {\n lastPresent = i;\n break;\n }\n const trailing = optionals\n .slice(0, lastPresent + 1)\n .map(({ value, placeholder }) => value ?? placeholder);\n const authorizationTuple = [bigintToHex(chainId), type, address, ...trailing];\n return [authorizationTuple, ...(signature ? [signature] : [])];\n}\nfunction bigintToHex(value) {\n return value === 0n ? '0x' : Hex.fromNumber(value);\n}\nfunction numberToHex(value) {\n return value === 0 ? '0x' : Hex.fromNumber(value);\n}\nfunction hexToBigint(hex) {\n return hex === '0x' ? 0n : BigInt(hex);\n}\nfunction hexToNumber(hex) {\n return hex === '0x' ? 0 : Hex.toNumber(hex);\n}\nfunction normalizeSelector(selector) {\n if (typeof selector === 'string')\n return selector;\n if (Array.isArray(selector))\n return Hex.fromBytes(new Uint8Array(selector));\n return selector;\n}\nfunction resolveSelector(selector) {\n if (!selector)\n return undefined;\n if (selector.startsWith('0x'))\n return selector;\n return AbiItem.getSelector(selector);\n}\nfunction assertWitness(witness) {\n if (Hex.size(witness) !== 32)\n throw new InvalidWitnessSizeError(witness);\n}\nfunction assertSignature(signature) {\n if (signature.type === 'keychain')\n throw new InvalidSignatureTypeError(signature.type);\n}\nfunction isAbsent(value) {\n return value === undefined || value === '0x';\n}\n/** Thrown when a `witness` field is not exactly 32 bytes. */\nexport class InvalidWitnessSizeError extends Error {\n constructor(witness) {\n super(`Witness \\`${witness}\\` must be exactly 32 bytes (got ${Hex.size(witness)} bytes).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'KeyAuthorization.InvalidWitnessSizeError'\n });\n }\n}\n/** Thrown when a TIP-1049 admin marker has any value other than `0x01`. */\nexport class InvalidAdminMarkerError extends Error {\n constructor(marker) {\n super(`Admin marker \\`${marker}\\` is invalid; expected \\`0x01\\` (TIP-1049).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'KeyAuthorization.InvalidAdminMarkerError'\n });\n }\n}\n/** Thrown when a key authorization contains a keychain signature. */\nexport class InvalidSignatureTypeError extends Error {\n constructor(type) {\n super(`Signature type \\`${type}\\` is invalid for key authorizations; expected \\`secp256k1\\`, \\`p256\\`, \\`webAuthn\\`, or \\`configurable\\`.`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'KeyAuthorization.InvalidSignatureTypeError'\n });\n }\n}\n/**\n * Thrown when a configurable account key grant omits its parent account binding.\n *\n * @deprecated No longer thrown. The Tempo node only requires `account` on grants\n * signed by an admin access key, which it checks against the transaction sender.\n */\nexport class MissingAccountError extends Error {\n constructor() {\n super('Configurable account key grants require a parent account binding.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'KeyAuthorization.MissingAccountError'\n });\n }\n}\n//# sourceMappingURL=KeyAuthorization.js.map","import * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nimport * as Rlp from '../core/Rlp.js';\nimport * as SignatureEnvelope from './SignatureEnvelope.js';\nimport * as TempoAddress from './TempoAddress.js';\n/**\n * Converts an EIP-7702 Authorization object into a typed {@link ox#AuthorizationTempo.AuthorizationTempo}.\n *\n * Tempo extends EIP-7702 to support secp256k1, P256, and WebAuthn signature types.\n *\n * [Tempo Authorization Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#tempo-authorization-list)\n *\n * @example\n * An Authorization can be instantiated from an EIP-7702 Authorization tuple in object format.\n *\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n * ```\n *\n * @example\n * ### Attaching Signatures (Secp256k1)\n *\n * Standard Ethereum ECDSA signature using the secp256k1 curve.\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 1,\n * nonce: 40n,\n * })\n *\n * const signature = Secp256k1.sign({\n * payload: AuthorizationTempo.getSignPayload(authorization),\n * privateKey,\n * })\n *\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature }, // [!code focus]\n * )\n * ```\n *\n * @example\n * ### Attaching Signatures (P256)\n *\n * ECDSA signature using the P-256 (secp256r1) curve. Requires embedding the\n * public key and a `prehash` flag indicating whether the payload was hashed\n * before signing.\n *\n * ```ts twoslash\n * import { P256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = P256.createKeyPair()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 1,\n * nonce: 40n,\n * })\n *\n * const signature = P256.sign({\n * payload: AuthorizationTempo.getSignPayload(authorization),\n * privateKey,\n * })\n * const signatureEnvelope = SignatureEnvelope.from({\n * signature,\n * publicKey,\n * prehash: false,\n * })\n *\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }, // [!code focus]\n * )\n * ```\n *\n * @example\n * ### Attaching Signatures (P256 WebCrypto)\n *\n * When using WebCrypto keys, `prehash` must be `true` since WebCrypto always\n * hashes the payload internally before signing.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebCryptoP256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 1,\n * nonce: 40n,\n * })\n *\n * const signature = await WebCryptoP256.sign({\n * payload: AuthorizationTempo.getSignPayload(authorization),\n * privateKey,\n * })\n * const signatureEnvelope = SignatureEnvelope.from({\n * signature,\n * publicKey,\n * prehash: true,\n * })\n *\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }, // [!code focus]\n * )\n * ```\n *\n * @example\n * ### Attaching Signatures (WebAuthn)\n *\n * Passkey-based signature using WebAuthn. Includes authenticator metadata\n * (authenticatorData and clientDataJSON) along with the P-256 signature and\n * public key.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebAuthnP256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' })\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * chainId: 1,\n * nonce: 40n,\n * })\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * challenge: AuthorizationTempo.getSignPayload(authorization),\n * credentialId: credential.id,\n * })\n * const signatureEnvelope = SignatureEnvelope.from({\n * signature,\n * publicKey: credential.publicKey,\n * metadata,\n * })\n *\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }, // [!code focus]\n * )\n * ```\n *\n * @param authorization - An [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) AA Authorization tuple in object format.\n * @param options - AA Authorization options.\n * @returns The {@link ox#AuthorizationTempo.AuthorizationTempo}.\n */\nexport function from(authorization, options = {}) {\n if (typeof authorization.chainId === 'string')\n return fromRpc(authorization);\n const resolved = {\n ...authorization,\n address: TempoAddress.resolve(authorization.address),\n };\n if (options.signature) {\n return { ...resolved, signature: options.signature };\n }\n return resolved;\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.Rpc} to an {@link ox#AuthorizationTempo.AuthorizationTempo}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.fromRpc({\n * address: 'tempox0x0000000000000000000000000000000000000000',\n * chainId: '0x1',\n * nonce: '0x1',\n * signature: {\n * type: 'secp256k1',\n * r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',\n * s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',\n * yParity: '0x0',\n * },\n * })\n * ```\n *\n * @param authorization - The RPC-formatted AA Authorization.\n * @returns A signed {@link ox#AuthorizationTempo.AuthorizationTempo}.\n */\nexport function fromRpc(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = SignatureEnvelope.fromRpc(authorization.signature);\n return {\n address,\n chainId: Number(chainId),\n nonce: BigInt(nonce),\n signature,\n };\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.ListRpc} to an {@link ox#AuthorizationTempo.List}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorizationList = AuthorizationTempo.fromRpcList([{\n * address: 'tempox0x0000000000000000000000000000000000000000',\n * chainId: '0x1',\n * nonce: '0x1',\n * signature: {\n * type: 'secp256k1',\n * r: '0x635dc2033e60185bb36709c29c75d64ea51dfbd91c32ef4be198e4ceb169fb4d',\n * s: '0x50c2667ac4c771072746acfdcf1f1483336dcca8bd2df47cd83175dbe60f0540',\n * yParity: '0x0',\n * },\n * }])\n * ```\n *\n * @param authorizationList - The RPC-formatted AA Authorization list.\n * @returns A signed {@link ox#AuthorizationTempo.List}.\n */\nexport function fromRpcList(authorizationList) {\n return authorizationList.map((x) => fromRpc(x));\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.Tuple} to an {@link ox#AuthorizationTempo.AuthorizationTempo}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.fromTuple([\n * '0x1',\n * '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * '0x3'\n * ])\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 1,\n * // @log: nonce: 3n\n * // @log: }\n * ```\n *\n * @example\n * It is also possible to append a serialized SignatureEnvelope to the end of an AA Authorization tuple.\n *\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.fromTuple([\n * '0x1',\n * '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * '0x3',\n * '0x01a068a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b907e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064',\n * ])\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 1,\n * // @log: nonce: 3n\n * // @log: signature: {\n * // @log: r: BigInt('0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90'),\n * // @log: s: BigInt('0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'),\n * // @log: yParity: 0,\n * // @log: },\n * // @log: }\n * ```\n *\n * @param tuple - The [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) AA Authorization tuple.\n * @returns The {@link ox#AuthorizationTempo.AuthorizationTempo}.\n */\nexport function fromTuple(tuple) {\n const [chainId, address, nonce, signatureSerialized] = tuple;\n const args = {\n address,\n chainId: chainId === '0x' ? 0 : Number(chainId),\n nonce: nonce === '0x' ? 0n : BigInt(nonce),\n };\n if (signatureSerialized)\n args.signature = SignatureEnvelope.deserialize(signatureSerialized);\n return from(args);\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.TupleList} to an {@link ox#AuthorizationTempo.List}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorizationList = AuthorizationTempo.fromTupleList([\n * ['0x1', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x3'],\n * ['0x3', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x14'],\n * ])\n * // @log: [\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 1,\n * // @log: nonce: 3n,\n * // @log: },\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 3,\n * // @log: nonce: 20n,\n * // @log: },\n * // @log: ]\n * ```\n *\n * @example\n * It is also possible to append a serialized SignatureEnvelope to the end of an AA Authorization tuple.\n *\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorizationList = AuthorizationTempo.fromTupleList([\n * ['0x1', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x3', '0x01a068a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b907e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'],\n * ['0x3', '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c', '0x14', '0x01a068a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b907e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'],\n * ])\n * // @log: [\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 1,\n * // @log: nonce: 3n,\n * // @log: signature: {\n * // @log: r: BigInt('0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90'),\n * // @log: s: BigInt('0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'),\n * // @log: yParity: 0,\n * // @log: },\n * // @log: },\n * // @log: {\n * // @log: address: '0xbe95c3f554e9fc85ec51be69a3d807a0d55bcf2c',\n * // @log: chainId: 3,\n * // @log: nonce: 20n,\n * // @log: signature: {\n * // @log: r: BigInt('0x68a020a209d3d56c46f38cc50a33f704f4a9a10a59377f8dd762ac66910e9b90'),\n * // @log: s: BigInt('0x7e865ad05c4035ab5792787d4a0297a43617ae897930a6fe4d822b8faea52064'),\n * // @log: yParity: 0,\n * // @log: },\n * // @log: },\n * // @log: ]\n * ```\n *\n * @param tupleList - The [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) AA Authorization tuple list.\n * @returns An {@link ox#AuthorizationTempo.List}.\n */\nexport function fromTupleList(tupleList) {\n const list = [];\n for (const tuple of tupleList)\n list.push(fromTuple(tuple));\n return list;\n}\n/**\n * Computes the sign payload for an {@link ox#AuthorizationTempo.AuthorizationTempo} in [EIP-7702 format](https://eips.ethereum.org/EIPS/eip-7702): `keccak256('0x05' || rlp([chain_id, address, nonce]))`.\n *\n * @example\n * ### Secp256k1\n *\n * Standard Ethereum ECDSA signature using the secp256k1 curve.\n *\n * ```ts twoslash\n * import { Secp256k1 } from 'ox'\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const privateKey = Secp256k1.randomPrivateKey()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const payload = AuthorizationTempo.getSignPayload(authorization) // [!code focus]\n *\n * const signature = Secp256k1.sign({ payload, privateKey })\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature }\n * )\n * ```\n *\n * @example\n * ### P256\n *\n * ECDSA signature using the P-256 (secp256r1) curve. Requires embedding the\n * public key and a `prehash` flag indicating whether the payload was hashed\n * before signing.\n *\n * ```ts twoslash\n * import { P256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = P256.createKeyPair()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const payload = AuthorizationTempo.getSignPayload(authorization) // [!code focus]\n *\n * const signature = P256.sign({ payload, privateKey })\n * const signatureEnvelope = SignatureEnvelope.from({\n * prehash: false,\n * publicKey,\n * signature,\n * })\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }\n * )\n * ```\n *\n * @example\n * ### P256 (WebCrypto)\n *\n * When using WebCrypto keys, `prehash` must be `true` since WebCrypto always\n * hashes the payload internally before signing.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebCryptoP256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const { privateKey, publicKey } = await WebCryptoP256.createKeyPair()\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const payload = AuthorizationTempo.getSignPayload(authorization) // [!code focus]\n *\n * const signature = await WebCryptoP256.sign({ payload, privateKey })\n * const signatureEnvelope = SignatureEnvelope.from({\n * prehash: true,\n * publicKey,\n * signature,\n * })\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }\n * )\n * ```\n *\n * @example\n * ### WebAuthn\n *\n * Passkey-based signature using WebAuthn. Includes authenticator metadata\n * (authenticatorData and clientDataJSON) along with the P-256 signature and\n * public key.\n *\n * ```ts twoslash\n * // @noErrors\n * import { WebAuthnP256 } from 'ox'\n * import { AuthorizationTempo, SignatureEnvelope } from 'ox/tempo'\n *\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' })\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const challenge = AuthorizationTempo.getSignPayload(authorization) // [!code focus]\n *\n * const { metadata, signature } = await WebAuthnP256.sign({\n * challenge,\n * credentialId: credential.id,\n * })\n * const signatureEnvelope = SignatureEnvelope.from({\n * signature,\n * publicKey: credential.publicKey,\n * metadata,\n * })\n * const authorization_signed = AuthorizationTempo.from(\n * authorization,\n * { signature: signatureEnvelope }\n * )\n * ```\n *\n * @param authorization - The {@link ox#AuthorizationTempo.AuthorizationTempo}.\n * @returns The sign payload.\n */\nexport function getSignPayload(authorization) {\n return hash(authorization, { presign: true });\n}\n/**\n * Computes the hash for an {@link ox#AuthorizationTempo.AuthorizationTempo} in [EIP-7702 format](https://eips.ethereum.org/EIPS/eip-7702): `keccak256('0x05' || rlp([chain_id, address, nonce]))`.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const hash = AuthorizationTempo.hash(authorization) // [!code focus]\n * ```\n *\n * @param authorization - The {@link ox#AuthorizationTempo.AuthorizationTempo}.\n * @returns The hash.\n */\nexport function hash(authorization, options = {}) {\n const { presign } = options;\n return Hash.keccak256(Hex.concat('0x05', Rlp.fromHex(toTuple(presign\n ? {\n address: authorization.address,\n chainId: authorization.chainId,\n nonce: authorization.nonce,\n }\n : authorization))));\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.AuthorizationTempo} to an {@link ox#AuthorizationTempo.Rpc}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.toRpc({\n * address: 'tempox0x0000000000000000000000000000000000000000',\n * chainId: 1,\n * nonce: 1n,\n * signature: {\n * type: 'secp256k1',\n * signature: {\n * r: 44944627813007772897391531230081695102703289123332187696115181104739239197517n,\n * s: 36528503505192438307355164441104001310566505351980369085208178712678799181120n,\n * yParity: 0,\n * },\n * },\n * })\n * ```\n *\n * @param authorization - An AA Authorization.\n * @returns An RPC-formatted AA Authorization.\n */\nexport function toRpc(authorization) {\n const { address, chainId, nonce, signature } = authorization;\n return {\n address,\n chainId: Hex.fromNumber(chainId),\n nonce: Hex.fromNumber(nonce),\n signature: SignatureEnvelope.toRpc(signature),\n };\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.List} to an {@link ox#AuthorizationTempo.ListRpc}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.toRpcList([{\n * address: 'tempox0x0000000000000000000000000000000000000000',\n * chainId: 1,\n * nonce: 1n,\n * signature: {\n * type: 'secp256k1',\n * signature: {\n * r: 44944627813007772897391531230081695102703289123332187696115181104739239197517n,\n * s: 36528503505192438307355164441104001310566505351980369085208178712678799181120n,\n * yParity: 0,\n * },\n * },\n * }])\n * ```\n *\n * @param authorizationList - An AA Authorization List.\n * @returns An RPC-formatted AA Authorization List.\n */\nexport function toRpcList(authorizationList) {\n return authorizationList.map((x) => toRpc(x));\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.AuthorizationTempo} to an {@link ox#AuthorizationTempo.Tuple}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n *\n * const tuple = AuthorizationTempo.toTuple(authorization) // [!code focus]\n * // @log: [\n * // @log: address: '0x1234567890abcdef1234567890abcdef12345678',\n * // @log: chainId: 1,\n * // @log: nonce: 69n,\n * // @log: ]\n * ```\n *\n * @param authorization - The {@link ox#AuthorizationTempo.AuthorizationTempo}.\n * @returns An [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) AA Authorization tuple.\n */\nexport function toTuple(authorization) {\n const { address, chainId, nonce } = authorization;\n const signature = authorization.signature\n ? SignatureEnvelope.serialize(authorization.signature)\n : undefined;\n return [\n chainId ? Hex.fromNumber(chainId) : '0x',\n address,\n nonce ? Hex.fromNumber(nonce) : '0x',\n ...(signature ? [signature] : []),\n ];\n}\n/**\n * Converts an {@link ox#AuthorizationTempo.List} to an {@link ox#AuthorizationTempo.TupleList}.\n *\n * @example\n * ```ts twoslash\n * import { AuthorizationTempo } from 'ox/tempo'\n *\n * const authorization_1 = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 1,\n * nonce: 69n,\n * })\n * const authorization_2 = AuthorizationTempo.from({\n * address: 'tempox0x1234567890abcdef1234567890abcdef12345678',\n * chainId: 3,\n * nonce: 20n,\n * })\n *\n * const tuple = AuthorizationTempo.toTupleList([authorization_1, authorization_2]) // [!code focus]\n * // @log: [\n * // @log: [\n * // @log: address: '0x1234567890abcdef1234567890abcdef12345678',\n * // @log: chainId: 1,\n * // @log: nonce: 69n,\n * // @log: ],\n * // @log: [\n * // @log: address: '0x1234567890abcdef1234567890abcdef12345678',\n * // @log: chainId: 3,\n * // @log: nonce: 20n,\n * // @log: ],\n * // @log: ]\n * ```\n *\n * @param list - An {@link ox#AuthorizationTempo.List}.\n * @returns An [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) AA Authorization tuple list.\n */\nexport function toTupleList(list) {\n if (!list || list.length === 0)\n return [];\n const tupleList = [];\n for (const authorization of list)\n tupleList.push(toTuple(authorization));\n return tupleList;\n}\n//# sourceMappingURL=AuthorizationTempo.js.map","import * as AbiParameters from '../core/AbiParameters.js';\nimport * as Address from '../core/Address.js';\nimport * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nimport * as TempoAddress from './TempoAddress.js';\nconst tip20Prefix = '0x20c0';\n/**\n * Converts a token ID or address to a token ID.\n *\n * TIP-20 is Tempo's native token standard for stablecoins with deterministic addresses\n * derived from sequential token IDs (prefix `0x20c0`).\n *\n * [TIP-20 Token Standard](https://docs.tempo.xyz/protocol/tip20/overview)\n *\n * @example\n * ```ts twoslash\n * import { TokenId } from 'ox/tempo'\n *\n * const tokenId = TokenId.from(1n)\n * ```\n *\n * @param tokenIdOrAddress - The token ID or address.\n * @returns The token ID.\n */\nexport function from(tokenIdOrAddress) {\n if (typeof tokenIdOrAddress === 'bigint' ||\n typeof tokenIdOrAddress === 'number')\n return BigInt(tokenIdOrAddress);\n return fromAddress(tokenIdOrAddress);\n}\n/**\n * Converts a TIP-20 token address to a token ID.\n *\n * [TIP-20 Token Standard](https://docs.tempo.xyz/protocol/tip20/overview)\n *\n * @example\n * ```ts twoslash\n * import { TokenId } from 'ox/tempo'\n *\n * const tokenId = TokenId.fromAddress('0x20c0000000000000000000000000000000000001')\n * ```\n *\n * @param address - The token address.\n * @returns The token ID.\n */\nexport function fromAddress(address) {\n const resolved = TempoAddress.resolve(address);\n if (!resolved.toLowerCase().startsWith(tip20Prefix))\n throw new Error('invalid tip20 address.');\n return Hex.toBigInt(Hex.slice(resolved, tip20Prefix.length));\n}\n/**\n * Converts a TIP-20 token ID to an address.\n *\n * [TIP-20 Token Standard](https://docs.tempo.xyz/protocol/tip20/overview)\n *\n * @example\n * ```ts twoslash\n * import { TokenId } from 'ox/tempo'\n *\n * const address = TokenId.toAddress(1n)\n * ```\n *\n * @param tokenId - The token ID.\n * @returns The address.\n */\nexport function toAddress(tokenId) {\n if (typeof tokenId === 'string') {\n const resolved = TempoAddress.resolve(tokenId);\n Address.assert(resolved);\n return resolved;\n }\n const tokenIdHex = Hex.fromNumber(tokenId, { size: 18 });\n return Hex.concat(tip20Prefix, tokenIdHex);\n}\n/**\n * Computes a deterministic TIP-20 token address from a sender address and salt.\n *\n * The address is computed as: `TIP20_PREFIX (12 bytes) || keccak256(abi.encode(sender, salt))[:8]`\n *\n * [TIP-20 Token Standard](https://docs.tempo.xyz/protocol/tip20/overview)\n *\n * @example\n * ```ts twoslash\n * import { TokenId } from 'ox/tempo'\n *\n * const id = TokenId.compute({\n * sender: '0x1234567890123456789012345678901234567890',\n * salt: '0x0000000000000000000000000000000000000000000000000000000000000001',\n * })\n * ```\n *\n * @param value - The sender address and salt.\n * @returns The computed TIP-20 token id.\n */\nexport function compute(value) {\n const hash = Hash.keccak256(AbiParameters.encode(AbiParameters.from('address, bytes32'), [\n TempoAddress.resolve(value.sender),\n value.salt,\n ]));\n return Hex.toBigInt(Hex.slice(hash, 0, 8));\n}\n//# sourceMappingURL=TokenId.js.map","import * as AccessList from '../core/AccessList.js';\nimport * as Address from '../core/Address.js';\nimport * as Errors from '../core/Errors.js';\nimport * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nimport * as Rlp from '../core/Rlp.js';\nimport * as Secp256k1 from '../core/Secp256k1.js';\nimport * as Signature from '../core/Signature.js';\nimport * as TransactionEnvelope from '../core/TxEnvelope.js';\nimport * as AuthorizationTempo from './AuthorizationTempo.js';\nimport * as KeyAuthorization from './KeyAuthorization.js';\nimport * as SignatureEnvelope from './SignatureEnvelope.js';\nimport * as TempoAddress from './TempoAddress.js';\nimport * as TokenId from './TokenId.js';\nexport const feePayerMagic = '0x78';\nexport const serializedType = '0x76';\nexport const type = 'tempo';\n/**\n * Asserts a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} is valid.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * TxEnvelopeTempo.assert({\n * calls: [{ to: Address.from('0x0000000000000000000000000000000000000000'), value: 0n }],\n * chainId: 1,\n * maxFeePerGas: 1000000000n,\n * })\n * ```\n *\n * @param envelope - The transaction envelope to assert.\n */\nexport function assert(envelope) {\n const { calls, chainId, maxFeePerGas, maxPriorityFeePerGas, validBefore, validAfter, } = envelope;\n // Calls must not be empty\n if (!calls || calls.length === 0)\n throw new CallsEmptyError();\n // validBefore must be greater than validAfter if both are set\n if (typeof validBefore === 'number' &&\n typeof validAfter === 'number' &&\n validBefore <= validAfter) {\n throw new InvalidValidityWindowError({\n validBefore: validBefore,\n validAfter: validAfter,\n });\n }\n // Validate each call\n if (calls)\n for (const call of calls)\n if (call.to)\n Address.assert(call.to, { strict: false });\n // Validate chain ID\n if (chainId <= 0)\n throw new TransactionEnvelope.InvalidChainIdError({ chainId });\n // Validate max fee per gas\n if (maxFeePerGas && BigInt(maxFeePerGas) > 2n ** 256n - 1n)\n throw new TransactionEnvelope.FeeCapTooHighError({\n feeCap: maxFeePerGas,\n });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TransactionEnvelope.TipAboveFeeCapError({\n maxFeePerGas,\n maxPriorityFeePerGas,\n });\n}\n/**\n * Deserializes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} from its serialized form.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.deserialize('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')\n * // @log: {\n * // @log: type: 'tempo',\n * // @log: nonce: 785n,\n * // @log: maxFeePerGas: 2000000000n,\n * // @log: gas: 1000000n,\n * // @log: calls: [{ to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', value: 1000000000000000000n }],\n * // @log: }\n * ```\n *\n * @param serialized - The serialized transaction.\n * @returns Deserialized Transaction Envelope.\n */\nexport function deserialize(serialized) {\n const transactionArray = Rlp.toHex(Hex.slice(serialized, 1));\n const [chainId, maxPriorityFeePerGas, maxFeePerGas, gas, calls, accessList, nonceKey, nonce, validBefore, validAfter, feeToken, feePayerSignatureOrSender, authorizationList, keyAuthorizationOrSignature, maybeSignature,] = transactionArray;\n const keyAuthorization = Array.isArray(keyAuthorizationOrSignature)\n ? keyAuthorizationOrSignature\n : undefined;\n const signature = keyAuthorization\n ? maybeSignature\n : keyAuthorizationOrSignature;\n if (!(transactionArray.length === 13 ||\n transactionArray.length === 14 ||\n transactionArray.length === 15))\n throw new TransactionEnvelope.InvalidSerializedError({\n attributes: {\n authorizationList,\n chainId,\n maxPriorityFeePerGas,\n maxFeePerGas,\n gas,\n calls,\n accessList,\n keyAuthorization,\n nonceKey,\n nonce,\n validBefore,\n validAfter,\n feeToken,\n feePayerSignatureOrSender,\n ...(transactionArray.length > 12\n ? {\n signature,\n }\n : {}),\n },\n serialized,\n type,\n });\n let transaction = {\n chainId: Number(chainId),\n type,\n };\n if (Hex.validate(gas) && gas !== '0x')\n transaction.gas = BigInt(gas);\n if (Hex.validate(nonce))\n transaction.nonce = nonce === '0x' ? 0n : BigInt(nonce);\n if (Hex.validate(maxFeePerGas) && maxFeePerGas !== '0x')\n transaction.maxFeePerGas = BigInt(maxFeePerGas);\n if (Hex.validate(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')\n transaction.maxPriorityFeePerGas = BigInt(maxPriorityFeePerGas);\n if (Hex.validate(nonceKey))\n transaction.nonceKey = nonceKey === '0x' ? 0n : BigInt(nonceKey);\n if (Hex.validate(validBefore) && validBefore !== '0x')\n transaction.validBefore = Number(validBefore);\n if (Hex.validate(validAfter) && validAfter !== '0x')\n transaction.validAfter = Number(validAfter);\n if (Hex.validate(feeToken) && feeToken !== '0x')\n transaction.feeToken = feeToken;\n // Parse calls array\n if (calls && calls !== '0x') {\n const callsArray = calls;\n transaction.calls = callsArray.map((callTuple) => {\n const [to, value, data] = callTuple;\n const call = {};\n if (to && to !== '0x')\n call.to = to;\n if (value && value !== '0x')\n call.value = BigInt(value);\n if (data && data !== '0x')\n call.data = data;\n return call;\n });\n }\n if (accessList?.length !== 0 && accessList !== '0x')\n transaction.accessList = AccessList.fromTupleList(accessList);\n if (authorizationList?.length !== 0 && authorizationList !== '0x')\n transaction.authorizationList = AuthorizationTempo.fromTupleList(authorizationList);\n if (feePayerSignatureOrSender !== '0x' &&\n feePayerSignatureOrSender !== undefined) {\n if (feePayerSignatureOrSender === '0x00' ||\n Address.validate(feePayerSignatureOrSender)) {\n transaction.feePayerSignature = null;\n if (Address.validate(feePayerSignatureOrSender))\n transaction.from = feePayerSignatureOrSender;\n }\n else\n transaction.feePayerSignature = Signature.fromTuple(feePayerSignatureOrSender);\n }\n if (keyAuthorization)\n transaction.keyAuthorization = KeyAuthorization.fromTuple(keyAuthorization);\n const signatureEnvelope = signature\n ? SignatureEnvelope.deserialize(signature)\n : undefined;\n if (signatureEnvelope)\n transaction = {\n ...transaction,\n signature: signatureEnvelope,\n };\n // Recover sender address from the signature if not already set.\n if (!transaction.from && signatureEnvelope) {\n try {\n transaction.from = SignatureEnvelope.extractAddress({\n payload: getSignPayload(from(transaction)),\n signature: signatureEnvelope,\n root: true,\n });\n }\n catch { }\n }\n assert(transaction);\n return transaction;\n}\n/**\n * Converts an arbitrary transaction object into a Tempo Transaction Envelope.\n *\n * Use this to create transaction envelopes with Tempo-specific features like batched calls,\n * fee tokens, access keys, and scheduled execution. Attach a signature using the `signature`\n * option after signing with {@link ox#TxEnvelopeTempo.(getSignPayload:function)}.\n *\n * [Tempo Transaction Specification](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction)\n *\n * @example\n * ```ts twoslash\n * import { Value } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({ // [!code focus]\n * chainId: 1, // [!code focus]\n * calls: [{ // [!code focus]\n * data: '0xdeadbeef', // [!code focus]\n * to: 'tempox0x0000000000000000000000000000000000000000', // [!code focus]\n * }], // [!code focus]\n * maxFeePerGas: Value.fromGwei('10'), // [!code focus]\n * maxPriorityFeePerGas: Value.fromGwei('1'), // [!code focus]\n * }) // [!code focus]\n * ```\n *\n * @example\n * ### Attaching Signatures\n *\n * It is possible to attach a `signature` to the transaction envelope.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Secp256k1, Value } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * data: '0xdeadbeef',\n * to: 'tempox0x0000000000000000000000000000000000000000',\n * }],\n * maxFeePerGas: Value.fromGwei('10'),\n * maxPriorityFeePerGas: Value.fromGwei('1'),\n * })\n *\n * const signature = Secp256k1.sign({\n * payload: TxEnvelopeTempo.getSignPayload(envelope),\n * privateKey: '0x...',\n * })\n *\n * const envelope_signed = TxEnvelopeTempo.from(envelope, { // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n * // @log: {\n * // @log: chainId: 1,\n * // @log: calls: [{ to: '0x0000000000000000000000000000000000000000', value: 1000000000000000000n }],\n * // @log: maxFeePerGas: 10000000000n,\n * // @log: maxPriorityFeePerGas: 1000000000n,\n * // @log: type: 'tempo',\n * // @log: r: 125...n,\n * // @log: s: 642...n,\n * // @log: yParity: 0,\n * // @log: }\n * ```\n *\n * @example\n * ### From Serialized\n *\n * It is possible to instantiate a Tempo Transaction Envelope from a {@link ox#TxEnvelopeTempo.Serialized} value.\n *\n * ```ts twoslash\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from('0x76f84a0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0808080')\n * // @log: {\n * // @log: chainId: 1,\n * // @log: calls: [{\n * // @log: data: '0xdeadbeef',\n * // @log: to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * // @log: }],\n * // @log: maxFeePerGas: 10000000000n,\n * // @log: type: 'tempo',\n * // @log: }\n * ```\n *\n * @param envelope - The transaction object to convert.\n * @param options - Options.\n * @returns A Tempo Transaction Envelope.\n */\nexport function from(envelope, options = {}) {\n const { feePayerSignature, signature } = options;\n const envelope_ = (typeof envelope === 'string' ? deserialize(envelope) : envelope);\n // Resolve TempoAddress inputs to hex addresses.\n if (envelope_.from)\n envelope_.from = TempoAddress.resolve(envelope_.from);\n if (envelope_.calls)\n envelope_.calls = envelope_.calls.map((call) => ({\n ...call,\n ...(call.to\n ? { to: TempoAddress.resolve(call.to) }\n : {}),\n }));\n assert(envelope_);\n return {\n ...envelope_,\n ...(signature ? { signature: SignatureEnvelope.from(signature) } : {}),\n ...(feePayerSignature\n ? { feePayerSignature: Signature.from(feePayerSignature) }\n : {}),\n type: 'tempo',\n };\n}\n/**\n * Serializes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.\n *\n * RLP-encodes the transaction with type prefix `0x76`. For fee sponsorship, use `format: 'feePayer'`\n * to serialize with the fee payer magic `0x78` and the sender address.\n *\n * [RLP Encoding](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#rlp-encoding)\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Value } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * data: '0xdeadbeef',\n * to: 'tempox0x0000000000000000000000000000000000000000',\n * }],\n * maxFeePerGas: Value.fromGwei('10'),\n * })\n *\n * const serialized = TxEnvelopeTempo.serialize(envelope) // [!code focus]\n * ```\n *\n * @example\n * ### Attaching Signatures\n *\n * It is possible to attach a `signature` to the serialized Transaction Envelope.\n *\n * ```ts twoslash\n * // @noErrors\n * import { Secp256k1, Value } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * data: '0xdeadbeef',\n * to: 'tempox0x0000000000000000000000000000000000000000',\n * }],\n * maxFeePerGas: Value.fromGwei('10'),\n * })\n *\n * const signature = Secp256k1.sign({\n * payload: TxEnvelopeTempo.getSignPayload(envelope),\n * privateKey: '0x...',\n * })\n *\n * const serialized = TxEnvelopeTempo.serialize(envelope, { // [!code focus]\n * signature, // [!code focus]\n * }) // [!code focus]\n *\n * // ... send `serialized` transaction to JSON-RPC `eth_sendRawTransaction`\n * ```\n *\n * @param envelope - The Transaction Envelope to serialize.\n * @param options - Options.\n * @returns The serialized Transaction Envelope.\n */\nexport function serialize(envelope, options = {}) {\n const { accessList, authorizationList, calls, chainId, feeToken, gas, keyAuthorization, nonce, nonceKey, maxFeePerGas, maxPriorityFeePerGas, validBefore, validAfter, } = envelope;\n assert(envelope);\n const accessTupleList = AccessList.toTupleList(accessList);\n const signature = options.signature || envelope.signature;\n const authorizationTupleList = AuthorizationTempo.toTupleList(authorizationList);\n // Encode calls as RLP list of [to, value, data] tuples\n const callsTupleList = calls.map((call) => [\n call.to ? TempoAddress.resolve(call.to) : '0x',\n call.value ? Hex.fromNumber(call.value) : '0x',\n call.data ?? '0x',\n ]);\n let skipFeeToken = false;\n const feePayerSignatureOrSender = (() => {\n // Explicit sender address provided — use as-is.\n if (options.sender)\n return options.sender;\n // When serializing in fee payer format and a signature is present,\n // derive the sender address from the signature so the fee payer proxy\n // knows which account to cover fees for.\n //\n // - secp256k1: recover address via ecrecover from the sign payload.\n // - p256/webAuthn: derive address from the embedded public key.\n // - keychain: use the explicit `userAddress` on the signature.\n if (options.format === 'feePayer' && signature) {\n const sig = SignatureEnvelope.from(signature);\n if (sig.type === 'keychain')\n return sig.userAddress;\n if (sig.type === 'p256' || sig.type === 'webAuthn')\n return Address.fromPublicKey(sig.publicKey);\n if (sig.type === 'secp256k1')\n return Secp256k1.recoverAddress({\n payload: getSignPayload(from(envelope)),\n signature: sig.signature,\n });\n }\n const feePayerSignature = typeof options.feePayerSignature !== 'undefined'\n ? options.feePayerSignature\n : envelope.feePayerSignature;\n // `null` indicates the envelope is intended to be signed by a fee payer\n // but hasn't been signed yet — encode as a single zero byte marker.\n // The sender does not commit to feeToken, so skip it.\n if (feePayerSignature === null) {\n skipFeeToken = true;\n return '0x00';\n }\n // No fee payer involvement — omit from the envelope.\n if (!feePayerSignature)\n return '0x';\n // Fee payer has signed — encode the signature as an RLP tuple.\n return Signature.toTuple(feePayerSignature);\n })();\n const serialized = [\n Hex.fromNumber(chainId),\n maxPriorityFeePerGas ? Hex.fromNumber(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? Hex.fromNumber(maxFeePerGas) : '0x',\n gas ? Hex.fromNumber(gas) : '0x',\n callsTupleList,\n accessTupleList,\n nonceKey ? Hex.fromNumber(nonceKey) : '0x',\n nonce ? Hex.fromNumber(nonce) : '0x',\n typeof validBefore === 'number' ? Hex.fromNumber(validBefore) : '0x',\n typeof validAfter === 'number' ? Hex.fromNumber(validAfter) : '0x',\n !skipFeeToken &&\n (typeof feeToken === 'bigint' || typeof feeToken === 'string')\n ? TokenId.toAddress(feeToken)\n : '0x',\n feePayerSignatureOrSender,\n authorizationTupleList,\n ...(keyAuthorization ? [KeyAuthorization.toTuple(keyAuthorization)] : []),\n ...(signature\n ? [SignatureEnvelope.serialize(SignatureEnvelope.from(signature))]\n : []),\n ];\n return Hex.concat(options.format === 'feePayer' ? feePayerMagic : serializedType, Rlp.fromHex(serialized));\n}\n/**\n * Encodes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo} for sender signing.\n *\n * Returns the raw serialized transaction bytes that are hashed by\n * {@link ox#TxEnvelopeTempo.(getSignPayload:function)}. Sender signatures are\n * stripped, and fee payer signatures are normalized to the sender pre-sign\n * marker.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Hash } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * to: 'tempox0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * }],\n * nonce: 0n,\n * })\n *\n * const encoded = TxEnvelopeTempo.encodeForSigning(envelope) // [!code focus]\n * const payload = Hash.keccak256(encoded)\n * ```\n *\n * @param envelope - The transaction envelope to encode for signing.\n * @returns The serialized transaction bytes used as the sender signing preimage.\n */\nexport function encodeForSigning(envelope) {\n return serialize({\n ...envelope,\n signature: undefined,\n // When a fee payer signature is present, normalize to `null`\n // (the presign marker).\n ...(envelope.feePayerSignature !== undefined\n ? { feePayerSignature: null }\n : {}),\n });\n}\n/**\n * Returns the payload to sign for a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.\n *\n * Computes the keccak256 hash of {@link ox#TxEnvelopeTempo.(encodeForSigning:function)}.\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Secp256k1 } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * to: 'tempox0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * }],\n * nonce: 0n,\n * })\n *\n * const payload = TxEnvelopeTempo.getSignPayload(envelope) // [!code focus]\n * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })\n * ```\n *\n * @param envelope - The transaction envelope to get the sign payload for.\n * @param options - Options.\n * @returns The sign payload.\n */\nexport function getSignPayload(envelope, options = {}) {\n const sigHash = hash(envelope, { presign: true });\n if (options.from)\n return Hash.keccak256(Hex.concat('0x04', sigHash, TempoAddress.resolve(options.from)));\n return sigHash;\n}\n/**\n * Hashes a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}. This is the \"transaction hash\".\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Secp256k1 } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * data: '0xdeadbeef',\n * to: 'tempox0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * }],\n * nonce: 0n,\n * maxFeePerGas: 1000000000n,\n * gas: 21000n,\n * })\n *\n * const signature = Secp256k1.sign({\n * payload: TxEnvelopeTempo.getSignPayload(envelope),\n * privateKey: '0x...'\n * })\n *\n * const envelope_signed = TxEnvelopeTempo.from(envelope, { signature })\n *\n * const hash = TxEnvelopeTempo.hash(envelope_signed) // [!code focus]\n * ```\n *\n * @param envelope - The Tempo Transaction Envelope to hash.\n * @param options - Options.\n * @returns The hash of the transaction envelope.\n */\nexport function hash(envelope, options = {}) {\n const serialized = options.presign\n ? encodeForSigning(envelope)\n : serialize(envelope);\n return Hash.keccak256(serialized);\n}\n/**\n * Returns the fee payer payload to sign for a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}.\n *\n * Fee sponsorship uses a dual-signature scheme: the sender signs the transaction, then a fee payer\n * signs over the transaction with the sender's address to commit to paying fees. The fee payer's\n * signature includes the `feeToken` and `sender_address`, using magic byte `0x78` for domain separation.\n *\n * [Fee Payer Signature](https://docs.tempo.xyz/protocol/transactions/spec-tempo-transaction#fee-payer-signature)\n * [Fee Sponsorship Guide](https://docs.tempo.xyz/protocol/transactions#fee-sponsorship)\n *\n * @example\n * ```ts twoslash\n * // @noErrors\n * import { Secp256k1 } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const envelope = TxEnvelopeTempo.from({\n * chainId: 1,\n * calls: [{\n * data: '0xdeadbeef',\n * to: 'tempox0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * }],\n * nonce: 0n,\n * maxFeePerGas: 1000000000n,\n * gas: 21000n,\n * })\n *\n * const payload = TxEnvelopeTempo.getFeePayerSignPayload(envelope, {\n * sender: 'tempox0xd8da6bf26964af9d7eed9e03e53415d37aa96045'\n * }) // [!code focus]\n * // @log: '0x...'\n *\n * const signature = Secp256k1.sign({ payload, privateKey: '0x...' })\n * ```\n *\n * @param envelope - The transaction envelope to get the fee payer sign payload for.\n * @param options - Options.\n * @returns The fee payer sign payload.\n */\nexport function getFeePayerSignPayload(envelope, options) {\n const sender = TempoAddress.resolve(options.sender);\n const serialized = serialize({ ...envelope, signature: undefined }, {\n sender,\n format: 'feePayer',\n });\n return Hash.keccak256(serialized);\n}\n/**\n * Validates a {@link ox#TxEnvelopeTempo.TxEnvelopeTempo}. Returns `true` if the envelope is valid, `false` otherwise.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * const valid = TxEnvelopeTempo.validate({\n * calls: [{\n * data: '0xdeadbeef',\n * to: Address.from('0x0000000000000000000000000000000000000000'),\n * }],\n * chainId: 1,\n * maxFeePerGas: 1000000000n,\n * })\n * // @log: true\n * ```\n *\n * @param envelope - The transaction envelope to validate.\n */\nexport function validate(envelope) {\n try {\n assert(envelope);\n return true;\n }\n catch {\n return false;\n }\n}\n/**\n * Thrown when a transaction's calls list is empty.\n *\n * @example\n * ```ts twoslash\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * TxEnvelopeTempo.assert({\n * calls: [],\n * chainId: 1,\n * })\n * // @error: TxEnvelopeTempo.CallsEmptyError: Calls list cannot be empty.\n * ```\n */\nexport class CallsEmptyError extends Errors.BaseError {\n constructor() {\n super('Calls list cannot be empty.');\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TxEnvelopeTempo.CallsEmptyError'\n });\n }\n}\n/**\n * Thrown when validBefore is not greater than validAfter.\n *\n * @example\n * ```ts twoslash\n * import { Address } from 'ox'\n * import { TxEnvelopeTempo } from 'ox/tempo'\n *\n * TxEnvelopeTempo.assert({\n * calls: [{ to: Address.from('0x0000000000000000000000000000000000000000') }],\n * chainId: 1,\n * validBefore: 100,\n * validAfter: 200,\n * })\n * // @error: TxEnvelopeTempo.InvalidValidityWindowError: validBefore (100) must be greater than validAfter (200).\n * ```\n */\nexport class InvalidValidityWindowError extends Errors.BaseError {\n constructor({ validBefore, validAfter, }) {\n super(`validBefore (${validBefore}) must be greater than validAfter (${validAfter}).`);\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'TxEnvelopeTempo.InvalidValidityWindowError'\n });\n }\n}\n//# sourceMappingURL=TxEnvelopeTempo.js.map","import * as AbiParameters from '../core/AbiParameters.js';\nimport * as Address from '../core/Address.js';\nimport * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nimport * as TokenId from './TokenId.js';\nconst channelIdParameters = AbiParameters.from('address, address, address, address, bytes32, address, bytes32, address, uint256');\nconst domainSeparatorParameters = AbiParameters.from('bytes32, bytes32, bytes32, uint256, address');\nconst voucherHashParameters = AbiParameters.from('bytes32, bytes32, uint96');\nconst eip712DomainTypehash = Hash.keccak256(Hex.fromString('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'));\nconst nameHash = Hash.keccak256(Hex.fromString('TIP20 Channel Reserve'));\nconst versionHash = Hash.keccak256(Hex.fromString('1'));\nconst zeroAddress = '0x0000000000000000000000000000000000000000';\n/**\n * TIP-20 channel reserve precompile address.\n */\nexport const address = '0x4d50500000000000000000000000000000000000';\n/**\n * Delay between payer `requestClose` and `withdraw`, in seconds.\n */\nexport const closeGracePeriod = 900n;\n/**\n * EIP-712 type hash for `Voucher(bytes32 channelId,uint96 cumulativeAmount)`.\n */\nexport const voucherTypehash = Hash.keccak256(Hex.fromString('Voucher(bytes32 channelId,uint96 cumulativeAmount)'));\n/**\n * Instantiates a TIP-20 channel reserve descriptor.\n *\n * Accepts a TIP-20 token ID or address, and defaults `operator` and\n * `authorizedSigner` to the zero address.\n *\n * @example\n * ```ts twoslash\n * import { Channel } from 'ox/tempo'\n *\n * const channel = Channel.from({\n * expiringNonceHash: '0x0000000000000000000000000000000000000000000000000000000000000002',\n * payee: '0x2222222222222222222222222222222222222222',\n * payer: '0x1111111111111111111111111111111111111111',\n * salt: '0x0000000000000000000000000000000000000000000000000000000000000001',\n * token: 1n,\n * })\n * ```\n *\n * @param value - The channel descriptor input.\n * @returns The normalized channel descriptor.\n */\nexport function from(value) {\n const { authorizedSigner = zeroAddress, expiringNonceHash, operator = zeroAddress, payee, payer, salt, token, } = value;\n return {\n authorizedSigner: resolveAddress(authorizedSigner),\n expiringNonceHash,\n operator: resolveAddress(operator),\n payee: resolveAddress(payee),\n payer: resolveAddress(payer),\n salt,\n token: typeof token === 'string'\n ? resolveAddress(token)\n : TokenId.toAddress(token),\n };\n}\n/**\n * Computes the canonical TIP-20 channel id for a descriptor.\n *\n * Mirrors `computeChannelId` on the TIP-20 channel reserve precompile without\n * performing an RPC call.\n *\n * @example\n * ```ts twoslash\n * import { Channel } from 'ox/tempo'\n *\n * const channelId = Channel.computeId({\n * authorizedSigner: '0x0000000000000000000000000000000000000000',\n * expiringNonceHash: '0x0000000000000000000000000000000000000000000000000000000000000000',\n * operator: '0x0000000000000000000000000000000000000000',\n * payee: '0x2222222222222222222222222222222222222222',\n * payer: '0x1111111111111111111111111111111111111111',\n * salt: '0x0000000000000000000000000000000000000000000000000000000000000001',\n * token: 1n,\n * }, {\n * chainId: 4217,\n * })\n * ```\n *\n * @param channel - Channel descriptor.\n * @param options - Options.\n * @returns The channel id.\n */\nexport function computeId(channel, options) {\n const channel_ = from(channel);\n return Hash.keccak256(AbiParameters.encode(channelIdParameters, [\n channel_.payer,\n channel_.payee,\n channel_.operator,\n channel_.token,\n channel_.salt,\n channel_.authorizedSigner,\n channel_.expiringNonceHash,\n address,\n BigInt(options.chainId),\n ]));\n}\n/**\n * Computes the EIP-712 domain separator for the TIP-20 channel reserve.\n *\n * Mirrors `domainSeparator` on the TIP-20 channel reserve precompile without\n * performing an RPC call.\n *\n * @example\n * ```ts twoslash\n * import { Channel } from 'ox/tempo'\n *\n * const separator = Channel.domainSeparator({ chainId: 4217 })\n * ```\n *\n * @param value - Chain id.\n * @returns The EIP-712 domain separator.\n */\nexport function domainSeparator(value) {\n return Hash.keccak256(AbiParameters.encode(domainSeparatorParameters, [\n eip712DomainTypehash,\n nameHash,\n versionHash,\n BigInt(value.chainId),\n address,\n ]));\n}\n/**\n * Computes the EIP-712 sign payload for a TIP-20 channel voucher.\n *\n * Mirrors `getVoucherDigest` on the TIP-20 channel reserve precompile without\n * performing an RPC call.\n *\n * @example\n * ```ts twoslash\n * import { Channel } from 'ox/tempo'\n *\n * const payload = Channel.getVoucherSignPayload({\n * chainId: 4217,\n * channelId: '0x0000000000000000000000000000000000000000000000000000000000000000',\n * cumulativeAmount: 1n,\n * })\n * ```\n *\n * @param value - Voucher fields and chain id.\n * @returns The voucher sign payload.\n */\nexport function getVoucherSignPayload(value) {\n const voucherHash = Hash.keccak256(AbiParameters.encode(voucherHashParameters, [\n voucherTypehash,\n value.channelId,\n value.cumulativeAmount,\n ]));\n return Hash.keccak256(Hex.concat('0x1901', domainSeparator({ chainId: value.chainId }), voucherHash));\n}\nfunction resolveAddress(address) {\n return Address.from(address);\n}\n//# sourceMappingURL=Channel.js.map","import * as Hash from '../core/Hash.js';\nimport * as Hex from '../core/Hex.js';\nexport const roles = [\n 'defaultAdmin',\n 'pause',\n 'unpause',\n 'issuer',\n 'burnBlocked',\n 'burnAt',\n];\nexport const toPreHashed = {\n defaultAdmin: 'DEFAULT_ADMIN_ROLE',\n pause: 'PAUSE_ROLE',\n unpause: 'UNPAUSE_ROLE',\n issuer: 'ISSUER_ROLE',\n burnBlocked: 'BURN_BLOCKED_ROLE',\n burnAt: 'BURN_AT_ROLE',\n};\n/**\n * Serializes a token role to its keccak256 hash representation.\n *\n * TIP-20 includes a built-in RBAC system with roles like `ISSUER_ROLE` (mint/burn),\n * `PAUSE_ROLE`/`UNPAUSE_ROLE` (emergency controls), `BURN_BLOCKED_ROLE` (compliance), and\n * `BURN_AT_ROLE` (burn from any unprotected account, T12+).\n *\n * [TIP-20 RBAC](https://docs.tempo.xyz/protocol/tip20/overview#role-based-access-control-rbac)\n *\n * @example\n * ```ts twoslash\n * import { TokenRole } from 'ox/tempo'\n *\n * const hash = TokenRole.serialize('issuer')\n * ```\n *\n * @param role - The token role to serialize.\n * @returns The keccak256 hash of the role.\n */\nexport function serialize(role) {\n if (role === 'defaultAdmin')\n return '0x0000000000000000000000000000000000000000000000000000000000000000';\n return Hash.keccak256(Hex.fromString(toPreHashed[role] ?? role));\n}\n//# sourceMappingURL=TokenRole.js.map","import * as Errors from '../core/Errors.js';\nconst chainIdConfig = {\n 4217: {\n base: 421_700_000,\n range: 1_002_610_000,\n },\n 42431: {\n base: 1_424_310_000,\n range: 723_173_648,\n },\n};\nconst defaultSourceId = 4_217;\n/**\n * Base offset for deriving Presto zone chain IDs.\n */\nexport const chainIdBase = chainIdConfig[defaultSourceId].base;\n/**\n * Derives a zone ID from a zone chain ID.\n *\n * Zone chain IDs use the base assigned to their Tempo source chain.\n *\n * @example\n * ```ts twoslash\n * import { ZoneId } from 'ox/tempo'\n *\n * const zoneId = ZoneId.fromChainId(421_700_001)\n * // @log: 1\n * ```\n *\n * @param chainId - The zone chain ID.\n * @param sourceId - The Tempo source chain ID. Defaults to `4217` (Presto).\n * @returns The zone ID.\n */\nexport function fromChainId(chainId, sourceId = defaultSourceId) {\n return chainId - getChainIdConfig(sourceId).base;\n}\n/**\n * Derives a zone chain ID from a zone ID.\n *\n * Zone chain IDs use the base and range assigned to their Tempo source chain.\n *\n * @example\n * ```ts twoslash\n * import { ZoneId } from 'ox/tempo'\n *\n * const chainId = ZoneId.toChainId(1)\n * // @log: 421700001\n * ```\n *\n * @param zoneId - The zone ID.\n * @param sourceId - The Tempo source chain ID. Defaults to `4217` (Presto).\n * @returns The zone chain ID.\n */\nexport function toChainId(zoneId, sourceId = defaultSourceId) {\n const { base, range } = getChainIdConfig(sourceId);\n return base + (zoneId % range);\n}\n/** Thrown when a Tempo source chain ID is unsupported. */\nexport class UnsupportedSourceIdError extends Errors.BaseError {\n constructor({ sourceId }) {\n super(`Source chain ID \"${sourceId}\" is not supported.`, {\n metaMessages: ['Supported source chain IDs: 4217, 42431.'],\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ZoneId.UnsupportedSourceIdError'\n });\n }\n}\nfunction getChainIdConfig(sourceId) {\n if (sourceId === 4_217 || sourceId === 42_431)\n return chainIdConfig[sourceId];\n throw new UnsupportedSourceIdError({ sourceId });\n}\n//# sourceMappingURL=ZoneId.js.map","/**\n * Retrieves and returns an action from the client (if exists), and falls\n * back to the tree-shakable action.\n *\n * Useful for extracting overridden actions from a client (ie. if a consumer\n * wants to override the `sendTransaction` implementation).\n */\nexport function getAction(client, actionFn, \n// Some minifiers drop `Function.prototype.name`, or replace it with short letters,\n// meaning that `actionFn.name` will not always work. For that case, the consumer\n// needs to pass the name explicitly.\nname) {\n const action_implicit = client[actionFn.name];\n if (typeof action_implicit === 'function')\n return action_implicit;\n const action_explicit = client[name];\n if (typeof action_explicit === 'function')\n return action_explicit;\n return (params) => actionFn(client, params);\n}\n//# sourceMappingURL=getAction.js.map","import { BaseError } from './base.js';\nimport { RpcRequestError } from './request.js';\nconst unknownErrorCode = -1;\nexport class RpcError extends BaseError {\n constructor(cause, { code, docsPath, metaMessages, name, shortMessage, }) {\n super(shortMessage, {\n cause,\n docsPath,\n metaMessages: metaMessages || cause?.metaMessages,\n name: name || 'RpcError',\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name || cause.name;\n this.code = (cause instanceof RpcRequestError ? cause.code : (code ?? unknownErrorCode));\n }\n}\nexport class ProviderRpcError extends RpcError {\n constructor(cause, options) {\n super(cause, options);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.data = options.data;\n }\n}\nexport class ParseRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ParseRpcError.code,\n name: 'ParseRpcError',\n shortMessage: 'Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.',\n });\n }\n}\nObject.defineProperty(ParseRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32700\n});\nexport class InvalidRequestRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidRequestRpcError.code,\n name: 'InvalidRequestRpcError',\n shortMessage: 'JSON is not a valid request object.',\n });\n }\n}\nObject.defineProperty(InvalidRequestRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32600\n});\nexport class MethodNotFoundRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: MethodNotFoundRpcError.code,\n name: 'MethodNotFoundRpcError',\n shortMessage: `The method${method ? ` \"${method}\"` : ''} does not exist / is not available.`,\n });\n }\n}\nObject.defineProperty(MethodNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32601\n});\nexport class InvalidParamsRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidParamsRpcError.code,\n name: 'InvalidParamsRpcError',\n shortMessage: [\n 'Invalid parameters were provided to the RPC method.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n }\n}\nObject.defineProperty(InvalidParamsRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32602\n});\nexport class InternalRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InternalRpcError.code,\n name: 'InternalRpcError',\n shortMessage: 'An internal error was received.',\n });\n }\n}\nObject.defineProperty(InternalRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32603\n});\nexport class InvalidInputRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: InvalidInputRpcError.code,\n name: 'InvalidInputRpcError',\n shortMessage: [\n 'Missing or invalid parameters.',\n 'Double check you have provided the correct parameters.',\n ].join('\\n'),\n });\n }\n}\nObject.defineProperty(InvalidInputRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32000\n});\nexport class ResourceNotFoundRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceNotFoundRpcError.code,\n name: 'ResourceNotFoundRpcError',\n shortMessage: 'Requested resource not found.',\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 'ResourceNotFoundRpcError'\n });\n }\n}\nObject.defineProperty(ResourceNotFoundRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32001\n});\nexport class ResourceUnavailableRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: ResourceUnavailableRpcError.code,\n name: 'ResourceUnavailableRpcError',\n shortMessage: 'Requested resource not available.',\n });\n }\n}\nObject.defineProperty(ResourceUnavailableRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32002\n});\nexport class TransactionRejectedRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: TransactionRejectedRpcError.code,\n name: 'TransactionRejectedRpcError',\n shortMessage: 'Transaction creation failed.',\n });\n }\n}\nObject.defineProperty(TransactionRejectedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32003\n});\nexport class MethodNotSupportedRpcError extends RpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: MethodNotSupportedRpcError.code,\n name: 'MethodNotSupportedRpcError',\n shortMessage: `Method${method ? ` \"${method}\"` : ''} is not supported.`,\n });\n }\n}\nObject.defineProperty(MethodNotSupportedRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32004\n});\nexport class LimitExceededRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: LimitExceededRpcError.code,\n name: 'LimitExceededRpcError',\n shortMessage: 'Request exceeds defined limit.',\n });\n }\n}\nObject.defineProperty(LimitExceededRpcError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32005\n});\nexport class JsonRpcVersionUnsupportedError extends RpcError {\n constructor(cause) {\n super(cause, {\n code: JsonRpcVersionUnsupportedError.code,\n name: 'JsonRpcVersionUnsupportedError',\n shortMessage: 'Version of JSON-RPC protocol is not supported.',\n });\n }\n}\nObject.defineProperty(JsonRpcVersionUnsupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: -32006\n});\nexport class UserRejectedRequestError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UserRejectedRequestError.code,\n name: 'UserRejectedRequestError',\n shortMessage: 'User rejected the request.',\n });\n }\n}\nObject.defineProperty(UserRejectedRequestError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4001\n});\nexport class UnauthorizedProviderError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnauthorizedProviderError.code,\n name: 'UnauthorizedProviderError',\n shortMessage: 'The requested method and/or account has not been authorized by the user.',\n });\n }\n}\nObject.defineProperty(UnauthorizedProviderError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4100\n});\nexport class UnsupportedProviderMethodError extends ProviderRpcError {\n constructor(cause, { method } = {}) {\n super(cause, {\n code: UnsupportedProviderMethodError.code,\n name: 'UnsupportedProviderMethodError',\n shortMessage: `The Provider does not support the requested method${method ? ` \" ${method}\"` : ''}.`,\n });\n }\n}\nObject.defineProperty(UnsupportedProviderMethodError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4200\n});\nexport class ProviderDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ProviderDisconnectedError.code,\n name: 'ProviderDisconnectedError',\n shortMessage: 'The Provider is disconnected from all chains.',\n });\n }\n}\nObject.defineProperty(ProviderDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4900\n});\nexport class ChainDisconnectedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: ChainDisconnectedError.code,\n name: 'ChainDisconnectedError',\n shortMessage: 'The Provider is not connected to the requested chain.',\n });\n }\n}\nObject.defineProperty(ChainDisconnectedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4901\n});\nexport class SwitchChainError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: SwitchChainError.code,\n name: 'SwitchChainError',\n shortMessage: 'An error occurred when attempting to switch chain.',\n });\n }\n}\nObject.defineProperty(SwitchChainError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 4902\n});\nexport class UnsupportedNonOptionalCapabilityError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnsupportedNonOptionalCapabilityError.code,\n name: 'UnsupportedNonOptionalCapabilityError',\n shortMessage: 'This Wallet does not support a capability that was not marked as optional.',\n });\n }\n}\nObject.defineProperty(UnsupportedNonOptionalCapabilityError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5700\n});\nexport class UnsupportedChainIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnsupportedChainIdError.code,\n name: 'UnsupportedChainIdError',\n shortMessage: 'This Wallet does not support the requested chain ID.',\n });\n }\n}\nObject.defineProperty(UnsupportedChainIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5710\n});\nexport class DuplicateIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: DuplicateIdError.code,\n name: 'DuplicateIdError',\n shortMessage: 'There is already a bundle submitted with this ID.',\n });\n }\n}\nObject.defineProperty(DuplicateIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5720\n});\nexport class UnknownBundleIdError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: UnknownBundleIdError.code,\n name: 'UnknownBundleIdError',\n shortMessage: 'This bundle id is unknown / has not been submitted',\n });\n }\n}\nObject.defineProperty(UnknownBundleIdError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5730\n});\nexport class BundleTooLargeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: BundleTooLargeError.code,\n name: 'BundleTooLargeError',\n shortMessage: 'The call bundle is too large for the Wallet to process.',\n });\n }\n}\nObject.defineProperty(BundleTooLargeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5740\n});\nexport class AtomicReadyWalletRejectedUpgradeError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: AtomicReadyWalletRejectedUpgradeError.code,\n name: 'AtomicReadyWalletRejectedUpgradeError',\n shortMessage: 'The Wallet can support atomicity after an upgrade, but the user rejected the upgrade.',\n });\n }\n}\nObject.defineProperty(AtomicReadyWalletRejectedUpgradeError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5750\n});\nexport class AtomicityNotSupportedError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: AtomicityNotSupportedError.code,\n name: 'AtomicityNotSupportedError',\n shortMessage: 'The wallet does not support atomic execution but the request requires it.',\n });\n }\n}\nObject.defineProperty(AtomicityNotSupportedError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 5760\n});\nexport class WalletConnectSessionSettlementError extends ProviderRpcError {\n constructor(cause) {\n super(cause, {\n code: WalletConnectSessionSettlementError.code,\n name: 'WalletConnectSessionSettlementError',\n shortMessage: 'WalletConnect session settlement failed.',\n });\n }\n}\nObject.defineProperty(WalletConnectSessionSettlementError, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 7000\n});\nexport class UnknownRpcError extends RpcError {\n constructor(cause) {\n super(cause, {\n name: 'UnknownRpcError',\n shortMessage: 'An unknown RPC error occurred.',\n });\n }\n}\n//# sourceMappingURL=rpc.js.map","import { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { ContractFunctionExecutionError, ContractFunctionRevertedError, ContractFunctionZeroDataError, RawContractError, } from '../../errors/contract.js';\nimport { RpcRequestError } from '../../errors/request.js';\nimport { InternalRpcError, InvalidInputRpcError } from '../../errors/rpc.js';\nconst EXECUTION_REVERTED_ERROR_CODE = 3;\nexport function getContractError(err, { abi, address, args, docsPath, functionName, sender, }) {\n const error = (err instanceof RawContractError\n ? err\n : err instanceof BaseError\n ? err.walk((err) => typeof err === 'object' && err !== null && 'data' in err) || err.walk()\n : {});\n const { code, data, details, message, shortMessage } = error;\n const cause = (() => {\n if (err instanceof AbiDecodingZeroDataError)\n return new ContractFunctionZeroDataError({ functionName, cause: err });\n if (([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) &&\n (data || details || message || shortMessage)) ||\n (code === InvalidInputRpcError.code &&\n details === 'execution reverted' &&\n data)) {\n return new ContractFunctionRevertedError({\n abi,\n data: typeof data === 'object' ? data.data : data,\n functionName,\n message: error instanceof RpcRequestError\n ? details\n : (shortMessage ?? message),\n cause: err,\n });\n }\n return err;\n })();\n return new ContractFunctionExecutionError(cause, {\n abi,\n args,\n contractAddress: address,\n docsPath,\n functionName,\n sender,\n });\n}\n//# sourceMappingURL=getContractError.js.map","import { checksumAddress, } from '../../utils/address/getAddress.js';\nimport { keccak256, } from '../../utils/hash/keccak256.js';\n/**\n * @description Converts an ECDSA public key to an address.\n *\n * @param publicKey The public key to convert.\n *\n * @returns The address.\n */\nexport function publicKeyToAddress(publicKey) {\n const address = keccak256(`0x${publicKey.substring(4)}`).substring(26);\n return checksumAddress(`0x${address}`);\n}\n//# sourceMappingURL=publicKeyToAddress.js.map","import { isHex } from '../data/isHex.js';\nimport { size } from '../data/size.js';\nimport { hexToBigInt, hexToNumber, } from '../encoding/fromHex.js';\nimport { toHex } from '../encoding/toHex.js';\nexport async function recoverPublicKey({ hash, signature, }) {\n const hashHex = isHex(hash) ? hash : toHex(hash);\n const { secp256k1 } = await import('@noble/curves/secp256k1');\n const signature_ = (() => {\n // typeof signature: `Signature`\n if (typeof signature === 'object' && 'r' in signature && 's' in signature) {\n const { r, s, v, yParity } = signature;\n const yParityOrV = Number(yParity ?? v);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return new secp256k1.Signature(hexToBigInt(r), hexToBigInt(s)).addRecoveryBit(recoveryBit);\n }\n // typeof signature: `Hex | ByteArray`\n const signatureHex = isHex(signature) ? signature : toHex(signature);\n if (size(signatureHex) !== 65)\n throw new Error('invalid signature length');\n const yParityOrV = hexToNumber(`0x${signatureHex.slice(130)}`);\n const recoveryBit = toRecoveryBit(yParityOrV);\n return secp256k1.Signature.fromCompact(signatureHex.substring(2, 130)).addRecoveryBit(recoveryBit);\n })();\n const publicKey = signature_\n .recoverPublicKey(hashHex.substring(2))\n .toHex(false);\n return `0x${publicKey}`;\n}\nfunction toRecoveryBit(yParityOrV) {\n if (yParityOrV === 0 || yParityOrV === 1)\n return yParityOrV;\n if (yParityOrV === 27)\n return 0;\n if (yParityOrV === 28)\n return 1;\n throw new Error('Invalid yParityOrV value');\n}\n//# sourceMappingURL=recoverPublicKey.js.map","import { publicKeyToAddress } from '../../accounts/utils/publicKeyToAddress.js';\nimport { recoverPublicKey } from './recoverPublicKey.js';\nexport async function recoverAddress({ hash, signature, }) {\n return publicKeyToAddress(await recoverPublicKey({ hash, signature }));\n}\n//# sourceMappingURL=recoverAddress.js.map","import { BaseError } from '../../errors/base.js';\nimport { createCursor, } from '../cursor.js';\nimport { hexToBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nexport function toRlp(bytes, to = 'hex') {\n const encodable = getEncodable(bytes);\n const cursor = createCursor(new Uint8Array(encodable.length));\n encodable.encode(cursor);\n if (to === 'hex')\n return bytesToHex(cursor.bytes);\n return cursor.bytes;\n}\nexport function bytesToRlp(bytes, to = 'bytes') {\n return toRlp(bytes, to);\n}\nexport function hexToRlp(hex, to = 'hex') {\n return toRlp(hex, to);\n}\nfunction getEncodable(bytes) {\n if (Array.isArray(bytes))\n return getEncodableList(bytes.map((x) => getEncodable(x)));\n return getEncodableBytes(bytes);\n}\nfunction getEncodableList(list) {\n const bodyLength = list.reduce((acc, x) => acc + x.length, 0);\n const sizeOfBodyLength = getSizeOfLength(bodyLength);\n const length = (() => {\n if (bodyLength <= 55)\n return 1 + bodyLength;\n return 1 + sizeOfBodyLength + bodyLength;\n })();\n return {\n length,\n encode(cursor) {\n if (bodyLength <= 55) {\n cursor.pushByte(0xc0 + bodyLength);\n }\n else {\n cursor.pushByte(0xc0 + 55 + sizeOfBodyLength);\n if (sizeOfBodyLength === 1)\n cursor.pushUint8(bodyLength);\n else if (sizeOfBodyLength === 2)\n cursor.pushUint16(bodyLength);\n else if (sizeOfBodyLength === 3)\n cursor.pushUint24(bodyLength);\n else\n cursor.pushUint32(bodyLength);\n }\n for (const { encode } of list) {\n encode(cursor);\n }\n },\n };\n}\nfunction getEncodableBytes(bytesOrHex) {\n const bytes = typeof bytesOrHex === 'string' ? hexToBytes(bytesOrHex) : bytesOrHex;\n const sizeOfBytesLength = getSizeOfLength(bytes.length);\n const length = (() => {\n if (bytes.length === 1 && bytes[0] < 0x80)\n return 1;\n if (bytes.length <= 55)\n return 1 + bytes.length;\n return 1 + sizeOfBytesLength + bytes.length;\n })();\n return {\n length,\n encode(cursor) {\n if (bytes.length === 1 && bytes[0] < 0x80) {\n cursor.pushBytes(bytes);\n }\n else if (bytes.length <= 55) {\n cursor.pushByte(0x80 + bytes.length);\n cursor.pushBytes(bytes);\n }\n else {\n cursor.pushByte(0x80 + 55 + sizeOfBytesLength);\n if (sizeOfBytesLength === 1)\n cursor.pushUint8(bytes.length);\n else if (sizeOfBytesLength === 2)\n cursor.pushUint16(bytes.length);\n else if (sizeOfBytesLength === 3)\n cursor.pushUint24(bytes.length);\n else\n cursor.pushUint32(bytes.length);\n cursor.pushBytes(bytes);\n }\n },\n };\n}\nfunction getSizeOfLength(length) {\n if (length < 2 ** 8)\n return 1;\n if (length < 2 ** 16)\n return 2;\n if (length < 2 ** 24)\n return 3;\n if (length < 2 ** 32)\n return 4;\n throw new BaseError('Length is too large.');\n}\n//# sourceMappingURL=toRlp.js.map","import { concatHex } from '../data/concat.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { numberToHex } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { keccak256 } from '../hash/keccak256.js';\n/**\n * Computes an Authorization hash in [EIP-7702 format](https://eips.ethereum.org/EIPS/eip-7702): `keccak256('0x05' || rlp([chain_id, address, nonce]))`.\n */\nexport function hashAuthorization(parameters) {\n const { chainId, nonce, to } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const hash = keccak256(concatHex([\n '0x05',\n toRlp([\n chainId ? numberToHex(chainId) : '0x',\n address,\n nonce ? numberToHex(nonce) : '0x',\n ]),\n ]));\n if (to === 'bytes')\n return hexToBytes(hash);\n return hash;\n}\n//# sourceMappingURL=hashAuthorization.js.map","import { recoverAddress, } from '../signature/recoverAddress.js';\nimport { hashAuthorization, } from './hashAuthorization.js';\nexport async function recoverAuthorizationAddress(parameters) {\n const { authorization, signature } = parameters;\n return recoverAddress({\n hash: hashAuthorization(authorization),\n signature: (signature ?? authorization),\n });\n}\n//# sourceMappingURL=recoverAuthorizationAddress.js.map","import { formatEther } from '../utils/unit/formatEther.js';\nimport { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nimport { prettyPrint } from './transaction.js';\nexport class EstimateGasExecutionError extends BaseError {\n constructor(cause, { account, docsPath, chain, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, }) {\n const prettyArgs = prettyPrint({\n from: account?.address,\n to,\n value: typeof value !== 'undefined' &&\n `${formatEther(value)} ${chain?.nativeCurrency?.symbol || 'ETH'}`,\n data,\n gas,\n gasPrice: typeof gasPrice !== 'undefined' && `${formatGwei(gasPrice)} gwei`,\n maxFeePerGas: typeof maxFeePerGas !== 'undefined' &&\n `${formatGwei(maxFeePerGas)} gwei`,\n maxPriorityFeePerGas: typeof maxPriorityFeePerGas !== 'undefined' &&\n `${formatGwei(maxPriorityFeePerGas)} gwei`,\n nonce,\n });\n super(cause.shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(cause.metaMessages ? [...cause.metaMessages, ' '] : []),\n 'Estimate Gas Arguments:',\n prettyArgs,\n ].filter(Boolean),\n name: 'EstimateGasExecutionError',\n });\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.cause = cause;\n }\n}\n//# sourceMappingURL=estimateGas.js.map","import { EstimateGasExecutionError, } from '../../errors/estimateGas.js';\nimport { UnknownNodeError } from '../../errors/node.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getEstimateGasError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new EstimateGasExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getEstimateGasError.js.map","import { formatGwei } from '../utils/unit/formatGwei.js';\nimport { BaseError } from './base.js';\nexport class BaseFeeScalarError extends BaseError {\n constructor() {\n super('`baseFeeMultiplier` must be greater than 1.', {\n name: 'BaseFeeScalarError',\n });\n }\n}\nexport class Eip1559FeesNotSupportedError extends BaseError {\n constructor() {\n super('Chain does not support EIP-1559 fees.', {\n name: 'Eip1559FeesNotSupportedError',\n });\n }\n}\nexport class MaxFeePerGasTooLowError extends BaseError {\n constructor({ maxPriorityFeePerGas }) {\n super(`\\`maxFeePerGas\\` cannot be less than the \\`maxPriorityFeePerGas\\` (${formatGwei(maxPriorityFeePerGas)} gwei).`, { name: 'MaxFeePerGasTooLowError' });\n }\n}\n//# sourceMappingURL=fee.js.map","import { BaseError } from './base.js';\nexport class BlockNotFoundError extends BaseError {\n constructor({ blockHash, blockNumber, }) {\n let identifier = 'Block';\n if (blockHash)\n identifier = `Block at hash \"${blockHash}\"`;\n if (blockNumber)\n identifier = `Block at number \"${blockNumber}\"`;\n super(`${identifier} could not be found.`, { name: 'BlockNotFoundError' });\n }\n}\n//# sourceMappingURL=block.js.map","import { hexToNumber } from '../encoding/fromHex.js';\nimport { defineFormatter } from './formatter.js';\nexport const transactionType = {\n '0x0': 'legacy',\n '0x1': 'eip2930',\n '0x2': 'eip1559',\n '0x3': 'eip4844',\n '0x4': 'eip7702',\n};\nexport function formatTransaction(transaction, _) {\n const transaction_ = {\n ...transaction,\n blockHash: transaction.blockHash ? transaction.blockHash : null,\n blockNumber: transaction.blockNumber\n ? BigInt(transaction.blockNumber)\n : null,\n ...(transaction.blockTimestamp != null && {\n blockTimestamp: BigInt(transaction.blockTimestamp),\n }),\n chainId: transaction.chainId ? hexToNumber(transaction.chainId) : undefined,\n gas: transaction.gas ? BigInt(transaction.gas) : undefined,\n gasPrice: transaction.gasPrice ? BigInt(transaction.gasPrice) : undefined,\n maxFeePerBlobGas: transaction.maxFeePerBlobGas\n ? BigInt(transaction.maxFeePerBlobGas)\n : undefined,\n maxFeePerGas: transaction.maxFeePerGas\n ? BigInt(transaction.maxFeePerGas)\n : undefined,\n maxPriorityFeePerGas: transaction.maxPriorityFeePerGas\n ? BigInt(transaction.maxPriorityFeePerGas)\n : undefined,\n nonce: transaction.nonce ? hexToNumber(transaction.nonce) : undefined,\n to: transaction.to ? transaction.to : null,\n transactionIndex: transaction.transactionIndex\n ? Number(transaction.transactionIndex)\n : null,\n type: transaction.type\n ? transactionType[transaction.type]\n : undefined,\n typeHex: transaction.type ? transaction.type : undefined,\n value: transaction.value ? BigInt(transaction.value) : undefined,\n v: transaction.v ? BigInt(transaction.v) : undefined,\n };\n if (transaction.authorizationList)\n transaction_.authorizationList = formatAuthorizationList(transaction.authorizationList);\n transaction_.yParity = (() => {\n // If `yParity` is provided, we will use it.\n if (transaction.yParity)\n return Number(transaction.yParity);\n // If no `yParity` provided, try derive from `v`.\n if (typeof transaction_.v === 'bigint') {\n if (transaction_.v === 0n || transaction_.v === 27n)\n return 0;\n if (transaction_.v === 1n || transaction_.v === 28n)\n return 1;\n if (transaction_.v >= 35n)\n return transaction_.v % 2n === 0n ? 1 : 0;\n }\n return undefined;\n })();\n if (transaction_.type === 'legacy') {\n delete transaction_.accessList;\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n delete transaction_.yParity;\n }\n if (transaction_.type === 'eip2930') {\n delete transaction_.maxFeePerBlobGas;\n delete transaction_.maxFeePerGas;\n delete transaction_.maxPriorityFeePerGas;\n }\n if (transaction_.type === 'eip1559')\n delete transaction_.maxFeePerBlobGas;\n return transaction_;\n}\nexport const defineTransaction = /*#__PURE__*/ defineFormatter('transaction', formatTransaction);\n//////////////////////////////////////////////////////////////////////////////\nfunction formatAuthorizationList(authorizationList) {\n return authorizationList.map((authorization) => ({\n address: authorization.address,\n chainId: Number(authorization.chainId),\n nonce: Number(authorization.nonce),\n r: authorization.r,\n s: authorization.s,\n yParity: Number(authorization.yParity),\n }));\n}\n//# sourceMappingURL=transaction.js.map","import { defineFormatter } from './formatter.js';\nimport { formatTransaction } from './transaction.js';\nexport function formatBlock(block, _) {\n const transactions = (block.transactions ?? []).map((transaction) => {\n if (typeof transaction === 'string')\n return transaction;\n return formatTransaction(transaction);\n });\n return {\n ...block,\n baseFeePerGas: block.baseFeePerGas ? BigInt(block.baseFeePerGas) : null,\n blobGasUsed: block.blobGasUsed ? BigInt(block.blobGasUsed) : undefined,\n difficulty: block.difficulty ? BigInt(block.difficulty) : undefined,\n excessBlobGas: block.excessBlobGas\n ? BigInt(block.excessBlobGas)\n : undefined,\n gasLimit: block.gasLimit ? BigInt(block.gasLimit) : undefined,\n gasUsed: block.gasUsed ? BigInt(block.gasUsed) : undefined,\n hash: block.hash ? block.hash : null,\n logsBloom: block.logsBloom ? block.logsBloom : null,\n nonce: block.nonce ? block.nonce : null,\n number: block.number ? BigInt(block.number) : null,\n size: block.size ? BigInt(block.size) : undefined,\n timestamp: block.timestamp ? BigInt(block.timestamp) : undefined,\n transactions,\n totalDifficulty: block.totalDifficulty\n ? BigInt(block.totalDifficulty)\n : null,\n };\n}\nexport const defineBlock = /*#__PURE__*/ defineFormatter('block', formatBlock);\n//# sourceMappingURL=block.js.map","import { BlockNotFoundError, } from '../../errors/block.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { formatBlock, } from '../../utils/formatters/block.js';\n/**\n * Returns information about a block at a block number, hash, or tag.\n *\n * - Docs: https://viem.sh/docs/actions/public/getBlock\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks_fetching-blocks\n * - JSON-RPC Methods:\n * - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`.\n * - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`.\n *\n * @param client - Client to use\n * @param parameters - {@link GetBlockParameters}\n * @returns Information about the block. {@link GetBlockReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getBlock } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const block = await getBlock(client)\n */\nexport async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? 'latest', includeTransactions: includeTransactions_, } = {}) {\n const includeTransactions = includeTransactions_ ?? false;\n const blockNumberHex = blockNumber !== undefined ? numberToHex(blockNumber) : undefined;\n let block = null;\n if (blockHash) {\n block = await client.request({\n method: 'eth_getBlockByHash',\n params: [blockHash, includeTransactions],\n }, { dedupe: true });\n }\n else {\n block = await client.request({\n method: 'eth_getBlockByNumber',\n params: [blockNumberHex || blockTag, includeTransactions],\n }, { dedupe: Boolean(blockNumberHex) });\n }\n if (!block)\n throw new BlockNotFoundError({ blockHash, blockNumber });\n const format = client.chain?.formatters?.block?.format || formatBlock;\n return format(block, 'getBlock');\n}\n//# sourceMappingURL=getBlock.js.map","/**\n * Returns the current price of gas (in wei).\n *\n * - Docs: https://viem.sh/docs/actions/public/getGasPrice\n * - JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice)\n *\n * @param client - Client to use\n * @returns The gas price (in wei). {@link GetGasPriceReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getGasPrice } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gasPrice = await getGasPrice(client)\n */\nexport async function getGasPrice(client) {\n const gasPrice = await client.request({\n method: 'eth_gasPrice',\n });\n return BigInt(gasPrice);\n}\n//# sourceMappingURL=getGasPrice.js.map","import { Eip1559FeesNotSupportedError, } from '../../errors/fee.js';\nimport { hexToBigInt, } from '../../utils/encoding/fromHex.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { getBlock } from './getBlock.js';\nimport { getGasPrice } from './getGasPrice.js';\n/**\n * Returns an estimate for the max priority fee per gas (in wei) for a\n * transaction to be likely included in the next block.\n * Defaults to [`chain.fees.defaultPriorityFee`](/docs/clients/chains#fees-defaultpriorityfee) if set.\n *\n * - Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas\n *\n * @param client - Client to use\n * @returns An estimate (in wei) for the max priority fee per gas. {@link EstimateMaxPriorityFeePerGasReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateMaxPriorityFeePerGas } from 'viem/actions'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const maxPriorityFeePerGas = await estimateMaxPriorityFeePerGas(client)\n * // 10000000n\n */\nexport async function estimateMaxPriorityFeePerGas(client, args) {\n return internal_estimateMaxPriorityFeePerGas(client, args);\n}\nexport async function internal_estimateMaxPriorityFeePerGas(client, args) {\n const { block: block_, chain = client.chain, request } = args || {};\n try {\n const maxPriorityFeePerGas = chain?.fees?.maxPriorityFeePerGas ?? chain?.fees?.defaultPriorityFee;\n if (typeof maxPriorityFeePerGas === 'function') {\n const block = block_ || (await getAction(client, getBlock, 'getBlock')({}));\n const maxPriorityFeePerGas_ = await maxPriorityFeePerGas({\n block,\n client,\n request,\n });\n if (maxPriorityFeePerGas_ === null)\n throw new Error();\n return maxPriorityFeePerGas_;\n }\n if (typeof maxPriorityFeePerGas !== 'undefined')\n return maxPriorityFeePerGas;\n const maxPriorityFeePerGasHex = await client.request({\n method: 'eth_maxPriorityFeePerGas',\n });\n return hexToBigInt(maxPriorityFeePerGasHex);\n }\n catch {\n // If the RPC Provider does not support `eth_maxPriorityFeePerGas`\n // fall back to calculating it manually via `gasPrice - baseFeePerGas`.\n // See: https://github.com/ethereum/pm/issues/328#:~:text=eth_maxPriorityFeePerGas%20after%20London%20will%20effectively%20return%20eth_gasPrice%20%2D%20baseFee\n const [block, gasPrice] = await Promise.all([\n block_\n ? Promise.resolve(block_)\n : getAction(client, getBlock, 'getBlock')({}),\n getAction(client, getGasPrice, 'getGasPrice')({}),\n ]);\n if (typeof block.baseFeePerGas !== 'bigint')\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = gasPrice - block.baseFeePerGas;\n if (maxPriorityFeePerGas < 0n)\n return 0n;\n return maxPriorityFeePerGas;\n }\n}\n//# sourceMappingURL=estimateMaxPriorityFeePerGas.js.map","import { BaseFeeScalarError, Eip1559FeesNotSupportedError, } from '../../errors/fee.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { internal_estimateMaxPriorityFeePerGas, } from './estimateMaxPriorityFeePerGas.js';\nimport { getBlock } from './getBlock.js';\nimport { getGasPrice } from './getGasPrice.js';\n/**\n * Returns an estimate for the fees per gas (in wei) for a\n * transaction to be likely included in the next block.\n * Defaults to [`chain.fees.estimateFeesPerGas`](/docs/clients/chains#fees-estimatefeespergas) if set.\n *\n * - Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateFeesPerGasParameters}\n * @returns An estimate (in wei) for the fees per gas. {@link EstimateFeesPerGasReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateFeesPerGas } from 'viem/actions'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const maxPriorityFeePerGas = await estimateFeesPerGas(client)\n * // { maxFeePerGas: ..., maxPriorityFeePerGas: ... }\n */\nexport async function estimateFeesPerGas(client, args) {\n return internal_estimateFeesPerGas(client, args);\n}\nexport async function internal_estimateFeesPerGas(client, args) {\n const { block: block_, chain = client.chain, request, type = 'eip1559', } = args || {};\n const baseFeeMultiplier = await (async () => {\n if (typeof chain?.fees?.baseFeeMultiplier === 'function')\n return chain.fees.baseFeeMultiplier({\n block: block_,\n client,\n request,\n });\n return chain?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (baseFeeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = baseFeeMultiplier.toString().split('.')[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiply = (base) => (base * BigInt(Math.round(baseFeeMultiplier * denominator))) /\n BigInt(denominator);\n const block = block_\n ? block_\n : await getAction(client, getBlock, 'getBlock')({});\n if (typeof chain?.fees?.estimateFeesPerGas === 'function') {\n const fees = (await chain.fees.estimateFeesPerGas({\n block: block_,\n client,\n multiply,\n request,\n type,\n }));\n if (fees !== null)\n return fees;\n }\n if (type === 'eip1559') {\n if (typeof block.baseFeePerGas !== 'bigint')\n throw new Eip1559FeesNotSupportedError();\n const maxPriorityFeePerGas = typeof request?.maxPriorityFeePerGas === 'bigint'\n ? request.maxPriorityFeePerGas\n : await internal_estimateMaxPriorityFeePerGas(client, {\n block: block,\n chain,\n request,\n });\n const baseFeePerGas = multiply(block.baseFeePerGas);\n const maxFeePerGas = request?.maxFeePerGas ?? baseFeePerGas + maxPriorityFeePerGas;\n return {\n maxFeePerGas,\n maxPriorityFeePerGas,\n };\n }\n const gasPrice = request?.gasPrice ??\n multiply(await getAction(client, getGasPrice, 'getGasPrice')({}));\n return {\n gasPrice,\n };\n}\n//# sourceMappingURL=estimateFeesPerGas.js.map","import { formatBlockParameter, } from '../../utils/block/formatBlockParameter.js';\nimport { hexToNumber, } from '../../utils/encoding/fromHex.js';\n/**\n * Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has sent.\n *\n * - Docs: https://viem.sh/docs/actions/public/getTransactionCount\n * - JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount)\n *\n * @param client - Client to use\n * @param parameters - {@link GetTransactionCountParameters}\n * @returns The number of transactions an account has sent. {@link GetTransactionCountReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getTransactionCount } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const transactionCount = await getTransactionCount(client, {\n * address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * })\n */\nexport async function getTransactionCount(client, { address, blockHash, blockNumber, blockTag = 'latest', requireCanonical, }) {\n const block = formatBlockParameter({\n blockHash,\n blockNumber,\n blockTag,\n requireCanonical,\n });\n const count = await client.request({\n method: 'eth_getTransactionCount',\n params: [address, block],\n }, {\n dedupe: typeof blockNumber === 'bigint' || blockHash !== undefined,\n });\n return hexToNumber(count);\n}\n//# sourceMappingURL=getTransactionCount.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute commitments from a list of blobs.\n *\n * @example\n * ```ts\n * import { blobsToCommitments, toBlobs } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * ```\n */\nexport function blobsToCommitments(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n const blobs = (typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x))\n : parameters.blobs);\n const commitments = [];\n for (const blob of blobs)\n commitments.push(Uint8Array.from(kzg.blobToKzgCommitment(blob)));\n return (to === 'bytes'\n ? commitments\n : commitments.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToCommitments.js.map","import { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Compute the proofs for a list of blobs and their commitments.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n * ```\n */\nexport function blobsToProofs(parameters) {\n const { kzg } = parameters;\n const to = parameters.to ?? (typeof parameters.blobs[0] === 'string' ? 'hex' : 'bytes');\n const blobs = (typeof parameters.blobs[0] === 'string'\n ? parameters.blobs.map((x) => hexToBytes(x))\n : parameters.blobs);\n const commitments = (typeof parameters.commitments[0] === 'string'\n ? parameters.commitments.map((x) => hexToBytes(x))\n : parameters.commitments);\n const proofs = [];\n for (let i = 0; i < blobs.length; i++) {\n const blob = blobs[i];\n const commitment = commitments[i];\n proofs.push(Uint8Array.from(kzg.computeBlobKzgProof(blob, commitment)));\n }\n return (to === 'bytes'\n ? proofs\n : proofs.map((x) => bytesToHex(x)));\n}\n//# sourceMappingURL=blobsToProofs.js.map","import { sha256 as noble_sha256 } from '@noble/hashes/sha256';\nimport { isHex } from '../data/isHex.js';\nimport { toBytes } from '../encoding/toBytes.js';\nimport { toHex } from '../encoding/toHex.js';\nexport function sha256(value, to_) {\n const to = to_ || 'hex';\n const bytes = noble_sha256(isHex(value, { strict: false }) ? toBytes(value) : value);\n if (to === 'bytes')\n return bytes;\n return toHex(bytes);\n}\n//# sourceMappingURL=sha256.js.map","import { bytesToHex } from '../encoding/toHex.js';\nimport { sha256 } from '../hash/sha256.js';\n/**\n * Transform a commitment to it's versioned hash.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * commitmentToVersionedHash,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const [commitment] = blobsToCommitments({ blobs, kzg })\n * const versionedHash = commitmentToVersionedHash({ commitment })\n * ```\n */\nexport function commitmentToVersionedHash(parameters) {\n const { commitment, version = 1 } = parameters;\n const to = parameters.to ?? (typeof commitment === 'string' ? 'hex' : 'bytes');\n const versionedHash = sha256(commitment, 'bytes');\n versionedHash.set([version], 0);\n return (to === 'bytes' ? versionedHash : bytesToHex(versionedHash));\n}\n//# sourceMappingURL=commitmentToVersionedHash.js.map","import { commitmentToVersionedHash, } from './commitmentToVersionedHash.js';\n/**\n * Transform a list of commitments to their versioned hashes.\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * commitmentsToVersionedHashes,\n * toBlobs\n * } from 'viem'\n * import { kzg } from './kzg'\n *\n * const blobs = toBlobs({ data: '0x1234' })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const versionedHashes = commitmentsToVersionedHashes({ commitments })\n * ```\n */\nexport function commitmentsToVersionedHashes(parameters) {\n const { commitments, version } = parameters;\n const to = parameters.to ?? (typeof commitments[0] === 'string' ? 'hex' : 'bytes');\n const hashes = [];\n for (const commitment of commitments) {\n hashes.push(commitmentToVersionedHash({\n commitment,\n to,\n version,\n }));\n }\n return hashes;\n}\n//# sourceMappingURL=commitmentsToVersionedHashes.js.map","// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4844.md#parameters\n/** Blob limit per transaction. */\nconst blobsPerTransaction = 6;\n/** The number of bytes in a BLS scalar field element. */\nexport const bytesPerFieldElement = 32;\n/** The number of field elements in a blob. */\nexport const fieldElementsPerBlob = 4096;\n/** The number of bytes in a blob. */\nexport const bytesPerBlob = bytesPerFieldElement * fieldElementsPerBlob;\n/** Blob bytes limit per transaction. */\nexport const maxBytesPerTransaction = bytesPerBlob * blobsPerTransaction -\n // terminator byte (0x80).\n 1 -\n // zero byte (0x00) appended to each field element.\n 1 * fieldElementsPerBlob * blobsPerTransaction;\n//# sourceMappingURL=blob.js.map","import { versionedHashVersionKzg } from '../constants/kzg.js';\nimport { BaseError } from './base.js';\nexport class BlobSizeTooLargeError extends BaseError {\n constructor({ maxSize, size }) {\n super('Blob size is too large.', {\n metaMessages: [`Max: ${maxSize} bytes`, `Given: ${size} bytes`],\n name: 'BlobSizeTooLargeError',\n });\n }\n}\nexport class EmptyBlobError extends BaseError {\n constructor() {\n super('Blob data must not be empty.', { name: 'EmptyBlobError' });\n }\n}\nexport class InvalidVersionedHashSizeError extends BaseError {\n constructor({ hash, size, }) {\n super(`Versioned hash \"${hash}\" size is invalid.`, {\n metaMessages: ['Expected: 32', `Received: ${size}`],\n name: 'InvalidVersionedHashSizeError',\n });\n }\n}\nexport class InvalidVersionedHashVersionError extends BaseError {\n constructor({ hash, version, }) {\n super(`Versioned hash \"${hash}\" version is invalid.`, {\n metaMessages: [\n `Expected: ${versionedHashVersionKzg}`,\n `Received: ${version}`,\n ],\n name: 'InvalidVersionedHashVersionError',\n });\n }\n}\n//# sourceMappingURL=blob.js.map","import { bytesPerBlob, bytesPerFieldElement, fieldElementsPerBlob, maxBytesPerTransaction, } from '../../constants/blob.js';\nimport { BlobSizeTooLargeError, EmptyBlobError, } from '../../errors/blob.js';\nimport { createCursor } from '../cursor.js';\nimport { size } from '../data/size.js';\nimport { hexToBytes } from '../encoding/toBytes.js';\nimport { bytesToHex } from '../encoding/toHex.js';\n/**\n * Transforms arbitrary data to blobs.\n *\n * @example\n * ```ts\n * import { toBlobs, stringToHex } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * ```\n */\nexport function toBlobs(parameters) {\n const to = parameters.to ?? (typeof parameters.data === 'string' ? 'hex' : 'bytes');\n const data = (typeof parameters.data === 'string'\n ? hexToBytes(parameters.data)\n : parameters.data);\n const size_ = size(data);\n if (!size_)\n throw new EmptyBlobError();\n if (size_ > maxBytesPerTransaction)\n throw new BlobSizeTooLargeError({\n maxSize: maxBytesPerTransaction,\n size: size_,\n });\n const blobs = [];\n let active = true;\n let position = 0;\n while (active) {\n const blob = createCursor(new Uint8Array(bytesPerBlob));\n let size = 0;\n while (size < fieldElementsPerBlob) {\n const bytes = data.slice(position, position + (bytesPerFieldElement - 1));\n // Push a zero byte so the field element doesn't overflow the BLS modulus.\n blob.pushByte(0x00);\n // Push the current segment of data bytes.\n blob.pushBytes(bytes);\n // If we detect that the current segment of data bytes is less than 31 bytes,\n // we can stop processing and push a terminator byte to indicate the end of the blob.\n if (bytes.length < 31) {\n blob.pushByte(0x80);\n active = false;\n break;\n }\n size++;\n position += 31;\n }\n blobs.push(blob);\n }\n return (to === 'bytes'\n ? blobs.map((x) => x.bytes)\n : blobs.map((x) => bytesToHex(x.bytes)));\n}\n//# sourceMappingURL=toBlobs.js.map","import { blobsToCommitments, } from './blobsToCommitments.js';\nimport { blobsToProofs } from './blobsToProofs.js';\nimport { toBlobs } from './toBlobs.js';\n/**\n * Transforms arbitrary data (or blobs, commitments, & proofs) into a sidecar array.\n *\n * @example\n * ```ts\n * import { toBlobSidecars, stringToHex } from 'viem'\n *\n * const sidecars = toBlobSidecars({ data: stringToHex('hello world') })\n * ```\n *\n * @example\n * ```ts\n * import {\n * blobsToCommitments,\n * toBlobs,\n * blobsToProofs,\n * toBlobSidecars,\n * stringToHex\n * } from 'viem'\n *\n * const blobs = toBlobs({ data: stringToHex('hello world') })\n * const commitments = blobsToCommitments({ blobs, kzg })\n * const proofs = blobsToProofs({ blobs, commitments, kzg })\n *\n * const sidecars = toBlobSidecars({ blobs, commitments, proofs })\n * ```\n */\nexport function toBlobSidecars(parameters) {\n const { data, kzg, to } = parameters;\n const blobs = parameters.blobs ?? toBlobs({ data: data, to });\n const commitments = parameters.commitments ?? blobsToCommitments({ blobs, kzg: kzg, to });\n const proofs = parameters.proofs ?? blobsToProofs({ blobs, commitments, kzg: kzg, to });\n const sidecars = [];\n for (let i = 0; i < blobs.length; i++)\n sidecars.push({\n blob: blobs[i],\n commitment: commitments[i],\n proof: proofs[i],\n });\n return sidecars;\n}\n//# sourceMappingURL=toBlobSidecars.js.map","import { InvalidSerializableTransactionError, } from '../../errors/transaction.js';\nexport function getTransactionType(transaction) {\n if (transaction.type)\n return transaction.type;\n if (typeof transaction.authorizationList !== 'undefined')\n return 'eip7702';\n if (typeof transaction.blobs !== 'undefined' ||\n typeof transaction.blobVersionedHashes !== 'undefined' ||\n typeof transaction.maxFeePerBlobGas !== 'undefined' ||\n typeof transaction.sidecars !== 'undefined')\n return 'eip4844';\n if (typeof transaction.maxFeePerGas !== 'undefined' ||\n typeof transaction.maxPriorityFeePerGas !== 'undefined') {\n return 'eip1559';\n }\n if (typeof transaction.gasPrice !== 'undefined') {\n if (typeof transaction.accessList !== 'undefined')\n return 'eip2930';\n return 'legacy';\n }\n throw new InvalidSerializableTransactionError({ transaction });\n}\n//# sourceMappingURL=getTransactionType.js.map","import { UnknownNodeError } from '../../errors/node.js';\nimport { TransactionExecutionError, } from '../../errors/transaction.js';\nimport { getNodeError, } from './getNodeError.js';\nexport function getTransactionError(err, { docsPath, ...args }) {\n const cause = (() => {\n const cause = getNodeError(err, args);\n if (cause instanceof UnknownNodeError)\n return err;\n return cause;\n })();\n return new TransactionExecutionError(cause, {\n docsPath,\n ...args,\n });\n}\n//# sourceMappingURL=getTransactionError.js.map","import { hexToNumber, } from '../../utils/encoding/fromHex.js';\n/**\n * Returns the chain ID associated with the current network.\n *\n * - Docs: https://viem.sh/docs/actions/public/getChainId\n * - JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid)\n *\n * @param client - Client to use\n * @returns The current chain ID. {@link GetChainIdReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { getChainId } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const chainId = await getChainId(client)\n * // 1\n */\nexport async function getChainId(client) {\n const chainIdHex = await client.request({\n method: 'eth_chainId',\n }, { dedupe: true });\n return hexToNumber(chainIdHex);\n}\n//# sourceMappingURL=getChainId.js.map","import { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { BaseFeeScalarError } from '../../errors/fee.js';\nimport { FeePayerNonceMismatchError } from '../../errors/transaction.js';\nimport { getTransactionError, } from '../../utils/errors/getTransactionError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransaction, } from '../../utils/formatters/transaction.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { assertRequest } from '../../utils/transaction/assertRequest.js';\nimport { getBlock } from './getBlock.js';\nimport { getChainId as getChainId_ } from './getChainId.js';\n/**\n * Fills a transaction request with the necessary fields to be signed over.\n *\n * - Docs: https://viem.sh/docs/actions/public/fillTransaction\n *\n * @param client - Client to use\n * @param parameters - {@link FillTransactionParameters}\n * @returns The filled transaction. {@link FillTransactionReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { fillTransaction } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await fillTransaction(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: parseEther('1'),\n * })\n */\nexport async function fillTransaction(client, parameters) {\n const { account = client.account, accessList, authorizationList, chain = client.chain, blobVersionedHashes, blobs, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce: nonce_, nonceManager, to, type, value, ...rest } = parameters;\n const nonce = await (async () => {\n if (!account)\n return nonce_;\n if (!nonceManager)\n return nonce_;\n if (typeof nonce_ !== 'undefined')\n return nonce_;\n const account_ = parseAccount(account);\n const chainId = chain\n ? chain.id\n : await getAction(client, getChainId_, 'getChainId')({});\n return await nonceManager.consume({\n address: account_.address,\n chainId,\n client,\n });\n })();\n assertRequest(parameters);\n const chainFormat = chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account: account ? parseAccount(account) : undefined,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value,\n }, 'fillTransaction');\n try {\n const response = await client.request({\n method: 'eth_fillTransaction',\n params: [request],\n });\n const format = chain?.formatters?.transaction?.format || formatTransaction;\n const transaction = format(response.tx);\n // Remove unnecessary fields.\n delete transaction.blockHash;\n delete transaction.blockNumber;\n delete transaction.r;\n delete transaction.s;\n delete transaction.transactionIndex;\n delete transaction.v;\n delete transaction.yParity;\n // Rewrite fields.\n transaction.data = transaction.input;\n const hasFeePayerSignature = typeof transaction.feePayerSignature !== 'undefined' &&\n transaction.feePayerSignature !== null;\n if (hasFeePayerSignature &&\n typeof nonce !== 'undefined' &&\n transaction.nonce !== nonce)\n throw new FeePayerNonceMismatchError({\n filledNonce: transaction.nonce,\n requestedNonce: nonce,\n });\n // A fee payer signature commits to the filled transaction, so preserve\n // its signed fields regardless of who produced the signature.\n // https://tips.sh/0001#fee-payer-signature\n if (!hasFeePayerSignature) {\n // Preference supplied fees (some nodes do not take these preferences).\n if (transaction.gas)\n transaction.gas = parameters.gas ?? transaction.gas;\n if (transaction.gasPrice)\n transaction.gasPrice = parameters.gasPrice ?? transaction.gasPrice;\n if (transaction.maxFeePerBlobGas)\n transaction.maxFeePerBlobGas =\n parameters.maxFeePerBlobGas ?? transaction.maxFeePerBlobGas;\n if (transaction.maxFeePerGas)\n transaction.maxFeePerGas =\n parameters.maxFeePerGas ?? transaction.maxFeePerGas;\n if (transaction.maxPriorityFeePerGas)\n transaction.maxPriorityFeePerGas =\n parameters.maxPriorityFeePerGas ?? transaction.maxPriorityFeePerGas;\n if (typeof transaction.nonce !== 'undefined')\n transaction.nonce = parameters.nonce ?? transaction.nonce;\n // Build fee multiplier function.\n const feeMultiplier = await (async () => {\n if (typeof chain?.fees?.baseFeeMultiplier === 'function') {\n const block = await getAction(client, getBlock, 'getBlock')({});\n return chain.fees.baseFeeMultiplier({\n block,\n client,\n request: parameters,\n });\n }\n return chain?.fees?.baseFeeMultiplier ?? 1.2;\n })();\n if (feeMultiplier < 1)\n throw new BaseFeeScalarError();\n const decimals = feeMultiplier.toString().split('.')[1]?.length ?? 0;\n const denominator = 10 ** decimals;\n const multiplyFee = (base) => (base * BigInt(Math.round(feeMultiplier * denominator))) /\n BigInt(denominator);\n // Apply fee multiplier.\n if (transaction.maxFeePerGas && !parameters.maxFeePerGas)\n transaction.maxFeePerGas = multiplyFee(transaction.maxFeePerGas);\n if (transaction.gasPrice && !parameters.gasPrice)\n transaction.gasPrice = multiplyFee(transaction.gasPrice);\n }\n return {\n raw: response.raw,\n transaction: {\n from: request.from,\n ...transaction,\n },\n ...(response.capabilities ? { capabilities: response.capabilities } : {}),\n };\n }\n catch (err) {\n throw getTransactionError(err, {\n ...parameters,\n chain: client.chain,\n });\n }\n}\n//# sourceMappingURL=fillTransaction.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { internal_estimateFeesPerGas, } from '../../actions/public/estimateFeesPerGas.js';\nimport { estimateGas, } from '../../actions/public/estimateGas.js';\nimport { getBlock as getBlock_, } from '../../actions/public/getBlock.js';\nimport { getTransactionCount, } from '../../actions/public/getTransactionCount.js';\nimport { Eip1559FeesNotSupportedError, MaxFeePerGasTooLowError, } from '../../errors/fee.js';\nimport { FeePayerNonceMismatchError } from '../../errors/transaction.js';\nimport { blobsToCommitments } from '../../utils/blob/blobsToCommitments.js';\nimport { blobsToProofs } from '../../utils/blob/blobsToProofs.js';\nimport { commitmentsToVersionedHashes } from '../../utils/blob/commitmentsToVersionedHashes.js';\nimport { toBlobSidecars } from '../../utils/blob/toBlobSidecars.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { LruMap } from '../../utils/lru.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\nimport { getTransactionType, } from '../../utils/transaction/getTransactionType.js';\nimport { fillTransaction, } from '../public/fillTransaction.js';\nimport { getChainId as getChainId_ } from '../public/getChainId.js';\nexport const defaultParameters = [\n 'blobVersionedHashes',\n 'chainId',\n 'fees',\n 'gas',\n 'nonce',\n 'type',\n];\n/** @internal */\nexport const eip1559NetworkCache = /*#__PURE__*/ new Map();\n/** @internal */\nexport const supportsFillTransaction = /*#__PURE__*/ new LruMap(128);\n/**\n * Prepares a transaction request for signing.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest\n *\n * @param args - {@link PrepareTransactionRequestParameters}\n * @returns The transaction request. {@link PrepareTransactionRequestReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { prepareTransactionRequest } from 'viem/actions'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const request = await prepareTransactionRequest(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x0000000000000000000000000000000000000000',\n * value: 1n,\n * })\n *\n * @example\n * // Account Hoisting\n * import { createWalletClient, http } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { prepareTransactionRequest } from 'viem/actions'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const request = await prepareTransactionRequest(client, {\n * to: '0x0000000000000000000000000000000000000000',\n * value: 1n,\n * })\n */\nexport async function prepareTransactionRequest(client, args) {\n let request = args;\n request.account ??= client.account;\n request.parameters ??= defaultParameters;\n const { account: account_, chain = client.chain, nonceManager, parameters, } = request;\n const prepareTransactionRequest = (() => {\n if (typeof chain?.prepareTransactionRequest === 'function')\n return {\n fn: chain.prepareTransactionRequest,\n runAt: ['beforeFillTransaction'],\n };\n if (Array.isArray(chain?.prepareTransactionRequest))\n return {\n fn: chain.prepareTransactionRequest[0],\n runAt: chain.prepareTransactionRequest[1].runAt,\n };\n return undefined;\n })();\n let chainId;\n async function getChainId() {\n if (chainId)\n return chainId;\n if (typeof request.chainId !== 'undefined')\n return request.chainId;\n if (chain)\n return chain.id;\n const chainId_ = await getAction(client, getChainId_, 'getChainId')({});\n chainId = chainId_;\n return chainId;\n }\n let account = account_ ? parseAccount(account_) : account_;\n let nonce = request.nonce;\n if (prepareTransactionRequest?.fn &&\n prepareTransactionRequest.runAt?.includes('beforeFillTransaction')) {\n request = await prepareTransactionRequest.fn({ ...request, chain }, {\n client,\n phase: 'beforeFillTransaction',\n });\n nonce ??= request.nonce;\n const sender = request.account ?? request.from;\n account = sender ? parseAccount(sender) : undefined;\n }\n if (parameters.includes('nonce') &&\n typeof nonce === 'undefined' &&\n account &&\n nonceManager) {\n const chainId = await getChainId();\n nonce = await nonceManager.consume({\n address: account.address,\n chainId,\n client,\n });\n }\n const attemptFill = (() => {\n // Do not attempt if blobs are provided.\n if ((parameters.includes('blobVersionedHashes') ||\n parameters.includes('sidecars')) &&\n request.kzg &&\n request.blobs)\n return false;\n // Always attempt if the caller explicitly requested a non-empty set of\n // `parameters` and a fee payer signature is being requested (e.g. Tempo\n // sponsorship via `feePayer: true`/`Account`) and has not already been\n // filled. The fee payer signature can only be obtained as a side effect\n // of `eth_fillTransaction` (the relay co-signs the returned transaction),\n // so it must be called even when nonce/gas/fees are already fully\n // populated, or when the caller's `parameters` option omits `'fees'`/\n // `'gas'` entirely — otherwise the transaction silently ends up without\n // a fee payer signature. This check intentionally runs before the\n // `shouldAttempt` gate below, since fee-payer sponsorship is independent\n // of which parameters the caller opted into filling.\n //\n // The `parameters.length > 0` guard excludes internal micro-prepare calls\n // that explicitly pass an empty `parameters` array (e.g. `estimateGas`'s\n // internal `prepareTransactionRequest` call for local accounts) — those\n // are deliberately scoped to fill nothing, and should not independently\n // re-attempt `eth_fillTransaction` for fee-payer sponsorship.\n if (parameters.length > 0 &&\n 'feePayer' in request &&\n request.feePayer &&\n !('feePayerSignature' in request && request.feePayerSignature))\n return true;\n // Sponsorship can route fill requests to a different endpoint, so it must\n // bypass support state cached from a non-sponsored request.\n if (supportsFillTransaction.get(client.uid) === false)\n return false;\n // Should attempt `eth_fillTransaction` if \"fees\" or \"gas\" are required to be populated,\n // otherwise, can just use the other individual calls.\n const shouldAttempt = ['fees', 'gas'].some((parameter) => parameters.includes(parameter));\n if (!shouldAttempt)\n return false;\n // Check if `eth_fillTransaction` needs to be called.\n if (parameters.includes('chainId') && typeof request.chainId !== 'number')\n return true;\n if (parameters.includes('nonce') && typeof nonce !== 'number')\n return true;\n if (parameters.includes('fees') &&\n typeof request.gasPrice !== 'bigint' &&\n (typeof request.maxFeePerGas !== 'bigint' ||\n typeof request.maxPriorityFeePerGas !== 'bigint'))\n return true;\n if (parameters.includes('gas') && typeof request.gas !== 'bigint')\n return true;\n return false;\n })();\n const fillResult = attemptFill\n ? await getAction(client, fillTransaction, 'fillTransaction')({ ...request, nonce })\n .then((result) => {\n const { chainId, from, gas, gasPrice, nonce, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, type, ...rest } = result.transaction;\n const feeToken = 'feeToken' in rest ? rest.feeToken : undefined;\n const hasFilledFeePayerSignature = 'feePayerSignature' in rest &&\n rest.feePayerSignature !== null &&\n typeof rest.feePayerSignature !== 'undefined';\n const shouldUseFilledFeeToken = typeof feeToken !== 'undefined' &&\n feeToken !== null &&\n (!('feeToken' in request) || hasFilledFeePayerSignature);\n supportsFillTransaction.set(client.uid, true);\n return {\n ...request,\n ...(from ? { from } : {}),\n ...(type && !request.type ? { type } : {}),\n ...(typeof chainId !== 'undefined' ? { chainId } : {}),\n ...(typeof gas !== 'undefined' ? { gas } : {}),\n ...(typeof gasPrice !== 'undefined' ? { gasPrice } : {}),\n ...(typeof nonce !== 'undefined' ? { nonce } : {}),\n ...(typeof maxFeePerBlobGas !== 'undefined' &&\n request.type !== 'legacy' &&\n request.type !== 'eip2930'\n ? { maxFeePerBlobGas }\n : {}),\n ...(typeof maxFeePerGas !== 'undefined' &&\n request.type !== 'legacy' &&\n request.type !== 'eip2930'\n ? { maxFeePerGas }\n : {}),\n ...(typeof maxPriorityFeePerGas !== 'undefined' &&\n request.type !== 'legacy' &&\n request.type !== 'eip2930'\n ? { maxPriorityFeePerGas }\n : {}),\n ...('nonceKey' in rest && typeof rest.nonceKey !== 'undefined'\n ? { nonceKey: rest.nonceKey }\n : {}),\n // Validity bounds are part of the fee-payer signing payload.\n ...('validBefore' in rest &&\n rest.validBefore !== null &&\n typeof rest.validBefore !== 'undefined'\n ? { validBefore: rest.validBefore }\n : {}),\n ...('validAfter' in rest &&\n rest.validAfter !== null &&\n typeof rest.validAfter !== 'undefined'\n ? { validAfter: rest.validAfter }\n : {}),\n ...('keyAuthorization' in rest &&\n typeof rest.keyAuthorization !== 'undefined' &&\n rest.keyAuthorization !== null &&\n !('keyAuthorization' in request)\n ? { keyAuthorization: rest.keyAuthorization }\n : {}),\n ...('feePayerSignature' in rest &&\n typeof rest.feePayerSignature !== 'undefined' &&\n rest.feePayerSignature !== null\n ? { feePayerSignature: rest.feePayerSignature }\n : {}),\n ...(shouldUseFilledFeeToken ? { feeToken } : {}),\n ...(result.capabilities\n ? { _capabilities: result.capabilities }\n : {}),\n };\n })\n .catch((e) => {\n const error = e;\n if (error.name !== 'TransactionExecutionError')\n return request;\n const nonceMismatch = error.walk?.((error) => error instanceof FeePayerNonceMismatchError);\n if (nonceMismatch)\n throw e;\n const executionReverted = error.walk?.((e) => {\n const error = e;\n return error.name === 'ExecutionRevertedError';\n });\n if (executionReverted)\n throw e;\n const unsupported = error.walk?.((e) => {\n const error = e;\n return (error.name === 'MethodNotFoundRpcError' ||\n error.name === 'MethodNotSupportedRpcError' ||\n error.message?.includes('eth_fillTransaction is not available'));\n });\n if (unsupported)\n supportsFillTransaction.set(client.uid, false);\n return request;\n })\n : request;\n nonce ??= fillResult.nonce;\n request = {\n ...fillResult,\n ...(account ? { from: account?.address } : {}),\n ...(typeof nonce !== 'undefined' ? { nonce } : {}),\n };\n const { blobs, gas, kzg, type } = request;\n if (prepareTransactionRequest?.fn &&\n prepareTransactionRequest.runAt?.includes('beforeFillParameters')) {\n request = await prepareTransactionRequest.fn({ ...request, chain }, {\n client,\n phase: 'beforeFillParameters',\n });\n }\n let block;\n async function getBlock() {\n if (block)\n return block;\n block = await getAction(client, getBlock_, 'getBlock')({ blockTag: 'latest' });\n return block;\n }\n if (parameters.includes('nonce') &&\n typeof nonce === 'undefined' &&\n account &&\n !nonceManager)\n request.nonce = await getAction(client, getTransactionCount, 'getTransactionCount')({\n address: account.address,\n blockTag: 'pending',\n });\n if ((parameters.includes('blobVersionedHashes') ||\n parameters.includes('sidecars')) &&\n blobs &&\n kzg) {\n const commitments = blobsToCommitments({ blobs, kzg });\n if (parameters.includes('blobVersionedHashes')) {\n const versionedHashes = commitmentsToVersionedHashes({\n commitments,\n to: 'hex',\n });\n request.blobVersionedHashes = versionedHashes;\n }\n if (parameters.includes('sidecars')) {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n const sidecars = toBlobSidecars({\n blobs,\n commitments,\n proofs,\n to: 'hex',\n });\n request.sidecars = sidecars;\n }\n }\n if (parameters.includes('chainId'))\n request.chainId = await getChainId();\n if ((parameters.includes('fees') || parameters.includes('type')) &&\n typeof type === 'undefined') {\n try {\n request.type = getTransactionType(request);\n }\n catch {\n let isEip1559Network = eip1559NetworkCache.get(client.uid);\n if (typeof isEip1559Network === 'undefined') {\n const block = await getBlock();\n isEip1559Network = typeof block?.baseFeePerGas === 'bigint';\n eip1559NetworkCache.set(client.uid, isEip1559Network);\n }\n request.type = isEip1559Network ? 'eip1559' : 'legacy';\n }\n }\n if (parameters.includes('fees')) {\n // TODO(4844): derive blob base fees once https://github.com/ethereum/execution-apis/pull/486 is merged.\n if (request.type !== 'legacy' && request.type !== 'eip2930') {\n // EIP-1559 fees\n if (typeof request.maxFeePerGas === 'undefined' ||\n typeof request.maxPriorityFeePerGas === 'undefined') {\n const block = await getBlock();\n const { maxFeePerGas, maxPriorityFeePerGas } = await internal_estimateFeesPerGas(client, {\n block: block,\n chain,\n request: request,\n });\n if (typeof request.maxPriorityFeePerGas === 'undefined' &&\n request.maxFeePerGas &&\n request.maxFeePerGas < maxPriorityFeePerGas)\n throw new MaxFeePerGasTooLowError({\n maxPriorityFeePerGas,\n });\n request.maxPriorityFeePerGas = maxPriorityFeePerGas;\n request.maxFeePerGas = maxFeePerGas;\n }\n }\n else {\n // Legacy fees\n if (typeof request.maxFeePerGas !== 'undefined' ||\n typeof request.maxPriorityFeePerGas !== 'undefined')\n throw new Eip1559FeesNotSupportedError();\n if (typeof request.gasPrice === 'undefined') {\n const block = await getBlock();\n const { gasPrice: gasPrice_ } = await internal_estimateFeesPerGas(client, {\n block: block,\n chain,\n request: request,\n type: 'legacy',\n });\n request.gasPrice = gasPrice_;\n }\n }\n }\n if (parameters.includes('gas') && typeof gas === 'undefined')\n request.gas = await getAction(client, estimateGas, 'estimateGas')({\n ...request,\n account,\n prepare: account?.type === 'local' ? [] : ['blobVersionedHashes'],\n });\n if (prepareTransactionRequest?.fn &&\n prepareTransactionRequest.runAt?.includes('afterFillParameters'))\n request = await prepareTransactionRequest.fn({ ...request, chain }, {\n client,\n phase: 'afterFillParameters',\n });\n assertRequest(request);\n delete request.parameters;\n return request;\n}\n//# sourceMappingURL=prepareTransactionRequest.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { BaseError } from '../../errors/base.js';\nimport { recoverAuthorizationAddress, } from '../../utils/authorization/recoverAuthorizationAddress.js';\nimport { numberToHex, } from '../../utils/encoding/toHex.js';\nimport { getEstimateGasError, } from '../../utils/errors/getEstimateGasError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { serializeStateOverride } from '../../utils/stateOverride.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\nimport { prepareTransactionRequest, } from '../wallet/prepareTransactionRequest.js';\n/**\n * Estimates the gas necessary to complete a transaction without submitting it to the network.\n *\n * - Docs: https://viem.sh/docs/actions/public/estimateGas\n * - JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas)\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateGasParameters}\n * @returns The gas estimate (in gas units). {@link EstimateGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseEther } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateGas } from 'viem/public'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gasEstimate = await estimateGas(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: parseEther('1'),\n * })\n */\nexport async function estimateGas(client, args) {\n const { account: account_ = client.account, prepare = true } = args;\n const account = account_ ? parseAccount(account_) : undefined;\n const parameters = (() => {\n if (Array.isArray(prepare))\n return prepare;\n // Some RPC Providers do not compute versioned hashes from blobs. We will need\n // to compute them.\n if (account?.type !== 'local')\n return ['blobVersionedHashes'];\n return undefined;\n })();\n try {\n const to = await (async () => {\n // If `to` exists on the parameters, use that.\n if (args.to)\n return args.to;\n // If no `to` exists, and we are sending a EIP-7702 transaction, use the\n // address of the first authorization in the list.\n if (args.authorizationList && args.authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: args.authorizationList[0],\n }).catch(() => {\n throw new BaseError('`to` is required. Could not infer from `authorizationList`');\n });\n // Otherwise, we are sending a deployment transaction.\n return undefined;\n })();\n const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = prepare\n ? (await prepareTransactionRequest(client, {\n ...args,\n parameters,\n to,\n }))\n : args;\n // If we get `gas` back from the prepared transaction request, which is\n // different from the `gas` we provided, it was likely filled by other means\n // during request preparation (e.g. `eth_fillTransaction` or `chain.transactionRequest.prepare`).\n // (e.g. `eth_fillTransaction` or `chain.transactionRequest.prepare`).\n if (gas && args.gas !== gas)\n return gas;\n const blockNumberHex = typeof blockNumber === 'bigint' ? numberToHex(blockNumber) : undefined;\n const block = blockNumberHex || blockTag;\n const rpcStateOverride = serializeStateOverride(stateOverride);\n assertRequest(args);\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n account,\n accessList,\n authorizationList,\n blobs,\n blobVersionedHashes,\n data,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n value,\n }, 'estimateGas');\n return BigInt(await client.request({\n method: 'eth_estimateGas',\n params: rpcStateOverride\n ? [\n request,\n block ?? client.experimental_blockTag ?? 'latest',\n rpcStateOverride,\n ]\n : block\n ? [request, block]\n : [request],\n }));\n }\n catch (err) {\n throw getEstimateGasError(err, {\n ...args,\n account,\n chain: client.chain,\n });\n }\n}\n//# sourceMappingURL=estimateGas.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { estimateGas, } from './estimateGas.js';\n/**\n * Estimates the gas required to successfully execute a contract write function call.\n *\n * - Docs: https://viem.sh/docs/contract/estimateContractGas\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * @param client - Client to use\n * @param parameters - {@link EstimateContractGasParameters}\n * @returns The gas estimate (in wei). {@link EstimateContractGasReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { estimateContractGas } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const gas = await estimateContractGas(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint() public']),\n * functionName: 'mint',\n * account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',\n * })\n */\nexport async function estimateContractGas(client, parameters) {\n const { abi, address, args, functionName, dataSuffix = typeof client.dataSuffix === 'string'\n ? client.dataSuffix\n : client.dataSuffix?.value, ...request } = parameters;\n const data = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const gas = await getAction(client, estimateGas, 'estimateGas')({\n data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,\n to: address,\n ...request,\n });\n return gas;\n }\n catch (error) {\n const account = request.account ? parseAccount(request.account) : undefined;\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/estimateContractGas',\n functionName,\n sender: account?.address,\n });\n }\n}\n//# sourceMappingURL=estimateContractGas.js.map","export function formatLog(log, { args, eventName, } = {}) {\n return {\n ...log,\n blockHash: log.blockHash ? log.blockHash : null,\n blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null,\n blockTimestamp: log.blockTimestamp\n ? BigInt(log.blockTimestamp)\n : log.blockTimestamp === null\n ? null\n : undefined,\n logIndex: log.logIndex ? Number(log.logIndex) : null,\n transactionHash: log.transactionHash ? log.transactionHash : null,\n transactionIndex: log.transactionIndex\n ? Number(log.transactionIndex)\n : null,\n ...(eventName ? { args, eventName } : {}),\n };\n}\n//# sourceMappingURL=log.js.map","import { AbiDecodingDataSizeTooSmallError, AbiEventSignatureEmptyTopicsError, AbiEventSignatureNotFoundError, DecodeLogDataMismatch, DecodeLogTopicsMismatch, } from '../../errors/abi.js';\nimport { PositionOutOfBoundsError } from '../../errors/cursor.js';\nimport { size } from '../data/size.js';\nimport { toEventSelector, } from '../hash/toEventSelector.js';\nimport { decodeAbiParameters, } from './decodeAbiParameters.js';\nimport { formatAbiItem } from './formatAbiItem.js';\nconst docsPath = '/docs/contract/decodeEventLog';\nexport function decodeEventLog(parameters) {\n const { abi, data, strict: strict_, topics, } = parameters;\n const strict = strict_ ?? true;\n const [signature, ...argTopics] = topics;\n if (!signature)\n throw new AbiEventSignatureEmptyTopicsError({ docsPath });\n const abiItem = abi.find((x) => x.type === 'event' &&\n signature === toEventSelector(formatAbiItem(x)));\n if (!(abiItem && 'name' in abiItem) || abiItem.type !== 'event')\n throw new AbiEventSignatureNotFoundError(signature, { docsPath });\n const { name, inputs } = abiItem;\n const isUnnamed = inputs?.some((x) => !('name' in x && x.name));\n const args = isUnnamed ? [] : {};\n // Decode topics (indexed args).\n const indexedInputs = inputs\n .map((x, i) => [x, i])\n .filter(([x]) => 'indexed' in x && x.indexed);\n const missingIndexedInputs = [];\n for (let i = 0; i < indexedInputs.length; i++) {\n const [param, argIndex] = indexedInputs[i];\n const topic = argTopics[i];\n if (!topic) {\n if (strict)\n throw new DecodeLogTopicsMismatch({\n abiItem,\n param: param,\n });\n // Track missing indexed inputs to decode from data when strict is false\n missingIndexedInputs.push([param, argIndex]);\n continue;\n }\n args[isUnnamed ? argIndex : param.name || argIndex] = decodeTopic({\n param,\n value: topic,\n });\n }\n // Decode data (non-indexed args + missing indexed args when strict is false).\n const nonIndexedInputs = inputs.filter((x) => !('indexed' in x && x.indexed));\n // When strict is false, missing indexed inputs should be decoded from data\n const inputsToDecode = strict\n ? nonIndexedInputs\n : [...missingIndexedInputs.map(([param]) => param), ...nonIndexedInputs];\n if (inputsToDecode.length > 0) {\n if (data && data !== '0x') {\n try {\n const decodedData = decodeAbiParameters(inputsToDecode, data);\n if (decodedData) {\n let dataIndex = 0;\n // First, assign missing indexed parameters (when strict is false)\n if (!strict) {\n for (const [param, argIndex] of missingIndexedInputs) {\n args[isUnnamed ? argIndex : param.name || argIndex] =\n decodedData[dataIndex++];\n }\n }\n // Then, assign non-indexed parameters\n if (isUnnamed) {\n for (let i = 0; i < inputs.length; i++)\n if (args[i] === undefined && dataIndex < decodedData.length)\n args[i] = decodedData[dataIndex++];\n }\n else\n for (let i = 0; i < nonIndexedInputs.length; i++)\n args[nonIndexedInputs[i].name] = decodedData[dataIndex++];\n }\n }\n catch (err) {\n if (strict) {\n if (err instanceof AbiDecodingDataSizeTooSmallError ||\n err instanceof PositionOutOfBoundsError)\n throw new DecodeLogDataMismatch({\n abiItem,\n data: data,\n params: inputsToDecode,\n size: size(data),\n });\n throw err;\n }\n }\n }\n else if (strict) {\n throw new DecodeLogDataMismatch({\n abiItem,\n data: '0x',\n params: inputsToDecode,\n size: 0,\n });\n }\n }\n return {\n eventName: name,\n args: Object.values(args).length > 0 ? args : undefined,\n };\n}\nfunction decodeTopic({ param, value }) {\n if (param.type === 'string' ||\n param.type === 'bytes' ||\n param.type === 'tuple' ||\n param.type.match(/^(.*)\\[(\\d+)?\\]$/))\n return value;\n const decodedArg = decodeAbiParameters([param], value) || [];\n return decodedArg[0];\n}\n//# sourceMappingURL=decodeEventLog.js.map","// TODO(v3): checksum address.\nimport { isAddressEqual } from '../address/isAddressEqual.js';\nimport { stringToBytes, toBytes } from '../encoding/toBytes.js';\nimport { formatLog } from '../formatters/log.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { toEventSelector } from '../hash/toEventSelector.js';\nimport { bytesRegex } from '../regex.js';\nimport { decodeEventLog, } from './decodeEventLog.js';\n/**\n * Extracts & decodes logs matching the provided signature(s) (`abi` + optional `eventName`)\n * from a set of opaque logs.\n *\n * @param parameters - {@link ParseEventLogsParameters}\n * @returns The logs. {@link ParseEventLogsReturnType}\n *\n * @example\n * import { createClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { parseEventLogs } from 'viem/op-stack'\n *\n * const client = createClient({\n * chain: mainnet,\n * transport: http(),\n * })\n *\n * const receipt = await getTransactionReceipt(client, {\n * hash: '0xec23b2ba4bc59ba61554507c1b1bc91649e6586eb2dd00c728e8ed0db8bb37ea',\n * })\n *\n * const logs = parseEventLogs({ logs: receipt.logs })\n * // [{ args: { ... }, eventName: 'TransactionDeposited', ... }, ...]\n */\nexport function parseEventLogs(parameters) {\n const { abi, args, logs, strict = true } = parameters;\n const eventName = (() => {\n if (!parameters.eventName)\n return undefined;\n if (Array.isArray(parameters.eventName))\n return parameters.eventName;\n return [parameters.eventName];\n })();\n const abiTopics = abi\n .filter((abiItem) => abiItem.type === 'event')\n .map((abiItem) => ({\n abi: abiItem,\n selector: toEventSelector(abiItem),\n }));\n return logs\n .map((log) => {\n // Normalize RpcLog (hex-encoded quantities) to Log (bigint/number).\n // When logs come directly from an RPC response (e.g. eth_getLogs),\n // fields like blockNumber are hex strings instead of bigints.\n const formattedLog = typeof log.blockNumber === 'string' ? formatLog(log) : log;\n // Find all matching ABI items with the same selector.\n // Multiple events can share the same selector but differ in indexed parameters\n // (e.g., ERC20 vs ERC721 Transfer events).\n const abiItems = abiTopics.filter((abiTopic) => formattedLog.topics[0] === abiTopic.selector);\n if (abiItems.length === 0)\n return null;\n // Try each matching ABI item until one successfully decodes.\n let event;\n let abiItem;\n for (const item of abiItems) {\n try {\n event = decodeEventLog({\n ...formattedLog,\n abi: [item.abi],\n strict: true,\n });\n abiItem = item;\n break;\n }\n catch {\n // Try next ABI item\n }\n }\n // If strict decoding failed for all, and we're in non-strict mode,\n // fall back to the first matching ABI item.\n if (!event && !strict) {\n abiItem = abiItems[0];\n try {\n event = decodeEventLog({\n data: formattedLog.data,\n topics: formattedLog.topics,\n abi: [abiItem.abi],\n strict: false,\n });\n }\n catch {\n // If decoding still fails, use a partial log in non-strict mode.\n const isUnnamed = abiItem.abi.inputs?.some((x) => !('name' in x && x.name));\n event = { eventName: abiItem.abi.name, args: isUnnamed ? [] : {} };\n }\n }\n // If no event was found, return null.\n if (!event || !abiItem)\n return null;\n // Check that the decoded event name matches the provided event name.\n if (eventName && !eventName.includes(event.eventName))\n return null;\n // Check that the decoded event args match the provided args.\n if (!includesArgs({\n args: event.args,\n inputs: abiItem.abi.inputs,\n matchArgs: args,\n topics: formattedLog.topics,\n }))\n return null;\n return { ...event, ...formattedLog };\n })\n .filter(Boolean);\n}\nfunction includesArgs(parameters) {\n const { args, inputs, matchArgs, topics } = parameters;\n if (!matchArgs)\n return true;\n if (!args)\n return false;\n // Topics hold the signature, then indexed inputs in order. Non-strict\n // decoding reads indexed inputs without a topic from data.\n const topicInputs = inputs\n .filter((input) => input.indexed)\n .slice(0, topics.length - 1);\n function isEqual(input, value, arg) {\n try {\n if (input.type === 'address')\n return isAddressEqual(value, arg);\n // `string` and `bytes` topics hold the keccak256 of their contents.\n // Other values are ABI-decoded.\n if (topicInputs.includes(input) &&\n (input.type === 'string' || input.type === 'bytes')) {\n const bytes = input.type === 'string'\n ? stringToBytes(value)\n : toBytes(value);\n return keccak256(bytes) === arg;\n }\n // Decoded `bytes` and `bytesN` are lowercase hex. Match either case,\n // same as the indexed `bytes` hash path.\n if (typeof value === 'string' &&\n typeof arg === 'string' &&\n bytesRegex.test(input.type))\n return value.toLowerCase() === arg.toLowerCase();\n return value === arg;\n }\n catch {\n return false;\n }\n }\n if (Array.isArray(args) && Array.isArray(matchArgs)) {\n return matchArgs.every((value, index) => {\n if (value === null || value === undefined)\n return true;\n const input = inputs[index];\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value) => isEqual(input, value, args[index]));\n });\n }\n if (typeof args === 'object' &&\n !Array.isArray(args) &&\n typeof matchArgs === 'object' &&\n !Array.isArray(matchArgs))\n return Object.entries(matchArgs).every(([key, value]) => {\n if (value === null || value === undefined)\n return true;\n const input = inputs.find((input) => input.name === key);\n if (!input)\n return false;\n const value_ = Array.isArray(value) ? value : [value];\n return value_.some((value) => isEqual(input, value, args[key]));\n });\n return false;\n}\n//# sourceMappingURL=parseEventLogs.js.map","import { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { call } from './call.js';\n/**\n * Calls a read-only function on a contract, and returns the response.\n *\n * - Docs: https://viem.sh/docs/contract/readContract\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_reading-contracts\n *\n * A \"read-only\" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * @param client - Client to use\n * @param parameters - {@link ReadContractParameters}\n * @returns The response from the contract. Type is inferred. {@link ReadContractReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { readContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await readContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function balanceOf(address) view returns (uint256)']),\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * })\n * // 424122n\n */\nexport async function readContract(client, parameters) {\n const { abi, address, args, functionName, ...rest } = parameters;\n const calldata = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n const { data } = await getAction(client, call, 'call')({\n ...rest,\n data: calldata,\n to: address,\n });\n return decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n }\n catch (error) {\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/readContract',\n functionName,\n });\n }\n}\n//# sourceMappingURL=readContract.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { call } from './call.js';\n/**\n * Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions.\n *\n * - Docs: https://viem.sh/docs/contract/simulateContract\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts\n *\n * This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract), but also supports contract write functions.\n *\n * Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * @param client - Client to use\n * @param parameters - {@link SimulateContractParameters}\n * @returns The simulation result and write request. {@link SimulateContractReturnType}\n *\n * @example\n * import { createPublicClient, http } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { simulateContract } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const result = await simulateContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32) view returns (uint32)']),\n * functionName: 'mint',\n * args: ['69420'],\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * })\n */\nexport async function simulateContract(client, parameters) {\n const { abi, address, args, functionName, dataSuffix = typeof client.dataSuffix === 'string'\n ? client.dataSuffix\n : client.dataSuffix?.value, ...callRequest } = parameters;\n const account = callRequest.account\n ? parseAccount(callRequest.account)\n : client.account;\n const calldata = encodeFunctionData({ abi, args, functionName });\n try {\n const { data } = await getAction(client, call, 'call')({\n batch: false,\n data: `${calldata}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,\n to: address,\n ...callRequest,\n account,\n });\n const result = decodeFunctionResult({\n abi,\n args,\n functionName,\n data: data || '0x',\n });\n const minimizedAbi = abi.filter((abiItem) => 'name' in abiItem && abiItem.name === parameters.functionName);\n return {\n result,\n request: {\n abi: minimizedAbi,\n address,\n args,\n dataSuffix,\n functionName,\n ...callRequest,\n account,\n },\n };\n }\n catch (error) {\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/simulateContract',\n functionName,\n sender: account?.address,\n });\n }\n}\n//# sourceMappingURL=simulateContract.js.map","import { BaseError } from './base.js';\nexport class AccountNotFoundError extends BaseError {\n constructor({ docsPath } = {}) {\n super([\n 'Could not find an Account to execute with this Action.',\n 'Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.',\n ].join('\\n'), {\n docsPath,\n docsSlug: 'account',\n name: 'AccountNotFoundError',\n });\n }\n}\nexport class AccountTypeNotSupportedError extends BaseError {\n constructor({ docsPath, metaMessages, type, }) {\n super(`Account type \"${type}\" is not supported.`, {\n docsPath,\n metaMessages,\n name: 'AccountTypeNotSupportedError',\n });\n }\n}\n//# sourceMappingURL=account.js.map","import { ChainMismatchError, ChainNotFoundError, } from '../../errors/chain.js';\nexport function assertCurrentChain({ chain, currentChainId, }) {\n if (!chain)\n throw new ChainNotFoundError();\n if (currentChainId !== chain.id)\n throw new ChainMismatchError({ chain, currentChainId });\n}\n//# sourceMappingURL=assertCurrentChain.js.map","/**\n * Sends a **signed** transaction to the network\n *\n * - Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction\n * - JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/)\n *\n * @param client - Client to use\n * @param parameters - {@link SendRawTransactionParameters}\n * @returns The transaction hash. {@link SendRawTransactionReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { sendRawTransaction } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n *\n * const hash = await sendRawTransaction(client, {\n * serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33'\n * })\n */\nexport async function sendRawTransaction(client, { serializedTransaction }) {\n return client.request({\n method: 'eth_sendRawTransaction',\n params: [serializedTransaction],\n }, { retryCount: 0 });\n}\n//# sourceMappingURL=sendRawTransaction.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError, AccountTypeNotSupportedError, } from '../../errors/account.js';\nimport { BaseError } from '../../errors/base.js';\nimport { recoverAuthorizationAddress, } from '../../utils/authorization/recoverAuthorizationAddress.js';\nimport { assertCurrentChain, } from '../../utils/chain/assertCurrentChain.js';\nimport { concat } from '../../utils/data/concat.js';\nimport { getTransactionError, } from '../../utils/errors/getTransactionError.js';\nimport { extract } from '../../utils/formatters/extract.js';\nimport { formatTransactionRequest, } from '../../utils/formatters/transactionRequest.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { LruMap } from '../../utils/lru.js';\nimport { assertRequest, } from '../../utils/transaction/assertRequest.js';\nimport { getChainId } from '../public/getChainId.js';\nimport { defaultParameters, prepareTransactionRequest, } from './prepareTransactionRequest.js';\nimport { sendRawTransaction, } from './sendRawTransaction.js';\nconst supportsWalletNamespace = new LruMap(128);\n/**\n * Creates, signs, and sends a new transaction to the network.\n *\n * - Docs: https://viem.sh/docs/actions/wallet/sendTransaction\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions_sending-transactions\n * - JSON-RPC Methods:\n * - JSON-RPC Accounts: [`eth_sendTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendtransaction)\n * - Local Accounts: [`eth_sendRawTransaction`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sendrawtransaction)\n *\n * @param client - Client to use\n * @param parameters - {@link SendTransactionParameters}\n * @returns The [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. {@link SendTransactionReturnType}\n *\n * @example\n * import { createWalletClient, custom } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { sendTransaction } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const hash = await sendTransaction(client, {\n * account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 1000000000000000000n,\n * })\n *\n * @example\n * // Account Hoisting\n * import { createWalletClient, http } from 'viem'\n * import { privateKeyToAccount } from 'viem/accounts'\n * import { mainnet } from 'viem/chains'\n * import { sendTransaction } from 'viem/wallet'\n *\n * const client = createWalletClient({\n * account: privateKeyToAccount('0x…'),\n * chain: mainnet,\n * transport: http(),\n * })\n * const hash = await sendTransaction(client, {\n * to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',\n * value: 1000000000000000000n,\n * })\n */\nexport async function sendTransaction(client, parameters) {\n const { account: account_ = client.account, assertChainId = true, chain = client.chain, accessList, authorizationList, blobs, data, dataSuffix = typeof client.dataSuffix === 'string'\n ? client.dataSuffix\n : client.dataSuffix?.value, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, type, value, ...rest } = parameters;\n if (typeof account_ === 'undefined')\n throw new AccountNotFoundError({\n docsPath: '/docs/actions/wallet/sendTransaction',\n });\n const account = account_ ? parseAccount(account_) : null;\n let nonceManagerParameters;\n try {\n assertRequest(parameters);\n const to = await (async () => {\n // If `to` exists on the parameters, use that.\n if (parameters.to)\n return parameters.to;\n // If `to` is null, we are sending a deployment transaction.\n if (parameters.to === null)\n return undefined;\n // If no `to` exists, and we are sending a EIP-7702 transaction, use the\n // address of the first authorization in the list.\n if (authorizationList && authorizationList.length > 0)\n return await recoverAuthorizationAddress({\n authorization: authorizationList[0],\n }).catch(() => {\n throw new BaseError('`to` is required. Could not infer from `authorizationList`.');\n });\n // Otherwise, we are sending a deployment transaction.\n return undefined;\n })();\n if (account?.type === 'json-rpc' || account === null) {\n let chainId;\n if (chain !== null) {\n chainId = await getAction(client, getChainId, 'getChainId')({});\n if (assertChainId)\n assertCurrentChain({\n currentChainId: chainId,\n chain,\n });\n }\n const chainFormat = client.chain?.formatters?.transactionRequest?.format;\n const format = chainFormat || formatTransactionRequest;\n const request = format({\n // Pick out extra data that might exist on the chain's transaction request type.\n ...extract(rest, { format: chainFormat }),\n accessList,\n account,\n authorizationList,\n blobs,\n chainId,\n data: dataSuffix ? concat([data ?? '0x', dataSuffix]) : data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n to,\n type,\n value,\n }, 'sendTransaction');\n const isWalletNamespaceSupported = supportsWalletNamespace.get(client.uid);\n const method = isWalletNamespaceSupported\n ? 'wallet_sendTransaction'\n : 'eth_sendTransaction';\n try {\n return await client.request({\n method,\n params: [request],\n }, { retryCount: 0 });\n }\n catch (e) {\n if (isWalletNamespaceSupported === false)\n throw e;\n const error = e;\n // If the transport does not support the method or input, attempt to use the\n // `wallet_sendTransaction` method.\n if (error.name === 'InvalidInputRpcError' ||\n error.name === 'InvalidParamsRpcError' ||\n error.name === 'MethodNotFoundRpcError' ||\n error.name === 'MethodNotSupportedRpcError') {\n return await client\n .request({\n method: 'wallet_sendTransaction',\n params: [request],\n }, { retryCount: 0 })\n .then((hash) => {\n supportsWalletNamespace.set(client.uid, true);\n return hash;\n })\n .catch((e) => {\n const walletNamespaceError = e;\n if (walletNamespaceError.name === 'MethodNotFoundRpcError' ||\n walletNamespaceError.name === 'MethodNotSupportedRpcError') {\n supportsWalletNamespace.set(client.uid, false);\n throw error;\n }\n throw walletNamespaceError;\n });\n }\n throw error;\n }\n }\n if (account?.type === 'local') {\n const nonceManager = (() => {\n if (!account.nonceManager || typeof nonce !== 'undefined')\n return account.nonceManager;\n const nonceManager = account.nonceManager;\n return {\n consume(parameters) {\n nonceManagerParameters = {\n address: parameters.address,\n chainId: parameters.chainId,\n };\n return nonceManager.consume(parameters);\n },\n get(parameters) {\n return nonceManager.get(parameters);\n },\n increment(parameters) {\n return nonceManager.increment(parameters);\n },\n reset(parameters) {\n return nonceManager.reset(parameters);\n },\n };\n })();\n // Prepare the request for signing (assign appropriate fees, etc.)\n const request = await getAction(client, prepareTransactionRequest, 'prepareTransactionRequest')({\n account,\n accessList,\n authorizationList,\n blobs,\n chain,\n data: dataSuffix ? concat([data ?? '0x', dataSuffix]) : data,\n gas,\n gasPrice,\n maxFeePerBlobGas,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceManager,\n parameters: [...defaultParameters, 'sidecars'],\n type,\n value,\n ...rest,\n to,\n });\n const serializer = chain?.serializers?.transaction;\n const signedTransaction = (await account.signTransaction(request, {\n serializer,\n }));\n const transactionEnvelope = (chain ?? client.chain)?.serializers\n ?.transactionEnvelope;\n const serializedTransaction = transactionEnvelope\n ? await transactionEnvelope({\n serializedTransaction: signedTransaction,\n transaction: request,\n })\n : signedTransaction;\n return await getAction(client, sendRawTransaction, 'sendRawTransaction')({\n serializedTransaction,\n });\n }\n if (account?.type === 'smart')\n throw new AccountTypeNotSupportedError({\n metaMessages: [\n 'Consider using the `sendUserOperation` Action instead.',\n ],\n docsPath: '/docs/actions/bundler/sendUserOperation',\n type: 'smart',\n });\n throw new AccountTypeNotSupportedError({\n docsPath: '/docs/actions/wallet/sendTransaction',\n type: account?.type,\n });\n }\n catch (err) {\n if (err instanceof AccountTypeNotSupportedError)\n throw err;\n if (nonceManagerParameters)\n account?.nonceManager?.reset(nonceManagerParameters);\n throw getTransactionError(err, {\n ...parameters,\n account,\n chain: parameters.chain || undefined,\n });\n }\n}\n//# sourceMappingURL=sendTransaction.js.map","import { parseAccount, } from '../../accounts/utils/parseAccount.js';\nimport { AccountNotFoundError, } from '../../errors/account.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { sendTransaction, } from './sendTransaction.js';\n/**\n * Executes a write function on a contract.\n *\n * - Docs: https://viem.sh/docs/contract/writeContract\n * - Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts_writing-to-contracts\n *\n * A \"write\" function on a Solidity contract modifies the state of the blockchain. These types of functions require gas to be executed, and hence a [Transaction](https://viem.sh/docs/glossary/terms) is needed to be broadcast in order to change the state.\n *\n * Internally, uses a [Wallet Client](https://viem.sh/docs/clients/wallet) to call the [`sendTransaction` action](https://viem.sh/docs/actions/wallet/sendTransaction) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData).\n *\n * __Warning: The `write` internally sends a transaction – it does not validate if the contract write will succeed (the contract may throw an error). It is highly recommended to [simulate the contract write with `contract.simulate`](https://viem.sh/docs/contract/writeContract#usage) before you execute it.__\n *\n * @param client - Client to use\n * @param parameters - {@link WriteContractParameters}\n * @returns A [Transaction Hash](https://viem.sh/docs/glossary/terms#hash). {@link WriteContractReturnType}\n *\n * @example\n * import { createWalletClient, custom, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { writeContract } from 'viem/contract'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: custom(window.ethereum),\n * })\n * const hash = await writeContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),\n * functionName: 'mint',\n * args: [69420],\n * })\n *\n * @example\n * // With Validation\n * import { createWalletClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { simulateContract, writeContract } from 'viem/contract'\n *\n * const client = createWalletClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const { request } = await simulateContract(client, {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi: parseAbi(['function mint(uint32 tokenId) nonpayable']),\n * functionName: 'mint',\n * args: [69420],\n * }\n * const hash = await writeContract(client, request)\n */\nexport async function writeContract(client, parameters) {\n return writeContract.internal(client, sendTransaction, 'sendTransaction', parameters);\n}\n(function (writeContract) {\n async function internal(client, actionFn, name, parameters) {\n const { abi, account: account_ = client.account, address, args, functionName, ...request } = parameters;\n if (typeof account_ === 'undefined')\n throw new AccountNotFoundError({\n docsPath: '/docs/contract/writeContract',\n });\n const account = account_ ? parseAccount(account_) : null;\n const data = encodeFunctionData({\n abi,\n args,\n functionName,\n });\n try {\n return await getAction(client, actionFn, name)({\n data,\n to: address,\n account,\n ...request,\n });\n }\n catch (error) {\n throw getContractError(error, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/writeContract',\n functionName,\n sender: account?.address,\n });\n }\n }\n writeContract.internal = internal;\n})(writeContract || (writeContract = {}));\n//# sourceMappingURL=writeContract.js.map","import { versionedHashVersionKzg } from '../../constants/kzg.js';\nimport { maxUint256 } from '../../constants/number.js';\nimport { InvalidAddressError, } from '../../errors/address.js';\nimport { BaseError } from '../../errors/base.js';\nimport { EmptyBlobError, InvalidVersionedHashSizeError, InvalidVersionedHashVersionError, } from '../../errors/blob.js';\nimport { InvalidChainIdError, } from '../../errors/chain.js';\nimport { FeeCapTooHighError, TipAboveFeeCapError, } from '../../errors/node.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { size } from '../data/size.js';\nimport { slice } from '../data/slice.js';\nimport { hexToNumber } from '../encoding/fromHex.js';\nexport function assertTransactionEIP7702(transaction) {\n const { authorizationList } = transaction;\n if (authorizationList) {\n for (const authorization of authorizationList) {\n const { chainId } = authorization;\n const address = authorization.address;\n if (!isAddress(address))\n throw new InvalidAddressError({ address });\n if (chainId < 0)\n throw new InvalidChainIdError({ chainId });\n }\n }\n assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP4844(transaction) {\n const { blobVersionedHashes } = transaction;\n if (blobVersionedHashes) {\n if (blobVersionedHashes.length === 0)\n throw new EmptyBlobError();\n for (const hash of blobVersionedHashes) {\n const size_ = size(hash);\n const version = hexToNumber(slice(hash, 0, 1));\n if (size_ !== 32)\n throw new InvalidVersionedHashSizeError({ hash, size: size_ });\n if (version !== versionedHashVersionKzg)\n throw new InvalidVersionedHashVersionError({\n hash,\n version,\n });\n }\n }\n assertTransactionEIP1559(transaction);\n}\nexport function assertTransactionEIP1559(transaction) {\n const { chainId, maxPriorityFeePerGas, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxFeePerGas && maxFeePerGas > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas });\n if (maxPriorityFeePerGas &&\n maxFeePerGas &&\n maxPriorityFeePerGas > maxFeePerGas)\n throw new TipAboveFeeCapError({ maxFeePerGas, maxPriorityFeePerGas });\n}\nexport function assertTransactionEIP2930(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.');\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\nexport function assertTransactionLegacy(transaction) {\n const { chainId, maxPriorityFeePerGas, gasPrice, maxFeePerGas, to } = transaction;\n if (to && !isAddress(to))\n throw new InvalidAddressError({ address: to });\n if (typeof chainId !== 'undefined' && chainId <= 0)\n throw new InvalidChainIdError({ chainId });\n if (maxPriorityFeePerGas || maxFeePerGas)\n throw new BaseError('`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.');\n if (gasPrice && gasPrice > maxUint256)\n throw new FeeCapTooHighError({ maxFeePerGas: gasPrice });\n}\n//# sourceMappingURL=assertTransaction.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { InvalidStorageKeySizeError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\n/*\n * Serialize an EIP-2930 access list\n * @remarks\n * Use to create a transaction serializer with support for EIP-2930 access lists\n *\n * @param accessList - Array of objects of address and arrays of Storage Keys\n * @throws InvalidAddressError, InvalidStorageKeySizeError\n * @returns Array of hex strings\n */\nexport function serializeAccessList(accessList) {\n if (!accessList || accessList.length === 0)\n return [];\n const serializedAccessList = [];\n for (let i = 0; i < accessList.length; i++) {\n const { address, storageKeys } = accessList[i];\n for (let j = 0; j < storageKeys.length; j++) {\n if (storageKeys[j].length - 2 !== 64) {\n throw new InvalidStorageKeySizeError({ storageKey: storageKeys[j] });\n }\n }\n if (!isAddress(address, { strict: false })) {\n throw new InvalidAddressError({ address });\n }\n serializedAccessList.push([address, storageKeys]);\n }\n return serializedAccessList;\n}\n//# sourceMappingURL=serializeAccessList.js.map","import { InvalidLegacyVError, } from '../../errors/transaction.js';\nimport { serializeAuthorizationList, } from '../authorization/serializeAuthorizationList.js';\nimport { blobsToCommitments, } from '../blob/blobsToCommitments.js';\nimport { blobsToProofs, } from '../blob/blobsToProofs.js';\nimport { commitmentsToVersionedHashes, } from '../blob/commitmentsToVersionedHashes.js';\nimport { toBlobSidecars, } from '../blob/toBlobSidecars.js';\nimport { concatHex } from '../data/concat.js';\nimport { trim } from '../data/trim.js';\nimport { bytesToHex, numberToHex, } from '../encoding/toHex.js';\nimport { toRlp } from '../encoding/toRlp.js';\nimport { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionEIP4844, assertTransactionEIP7702, assertTransactionLegacy, } from './assertTransaction.js';\nimport { getTransactionType, } from './getTransactionType.js';\nimport { serializeAccessList, } from './serializeAccessList.js';\nexport function serializeTransaction(transaction, signature) {\n const type = getTransactionType(transaction);\n if (type === 'eip1559')\n return serializeTransactionEIP1559(transaction, signature);\n if (type === 'eip2930')\n return serializeTransactionEIP2930(transaction, signature);\n if (type === 'eip4844')\n return serializeTransactionEIP4844(transaction, signature);\n if (type === 'eip7702')\n return serializeTransactionEIP7702(transaction, signature);\n return serializeTransactionLegacy(transaction, signature);\n}\nfunction serializeTransactionEIP7702(transaction, signature) {\n const { authorizationList, chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP7702(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedAuthorizationList = serializeAuthorizationList(authorizationList);\n return concatHex([\n '0x04',\n toRlp([\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n serializedAuthorizationList,\n ...toYParitySignatureArray(transaction, signature),\n ]),\n ]);\n}\nfunction serializeTransactionEIP4844(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP4844(transaction);\n let blobVersionedHashes = transaction.blobVersionedHashes;\n let sidecars = transaction.sidecars;\n // If `blobs` are passed, we will need to compute the KZG commitments & proofs.\n if (transaction.blobs &&\n (typeof blobVersionedHashes === 'undefined' ||\n typeof sidecars === 'undefined')) {\n const blobs = (typeof transaction.blobs[0] === 'string'\n ? transaction.blobs\n : transaction.blobs.map((x) => bytesToHex(x)));\n const kzg = transaction.kzg;\n const commitments = blobsToCommitments({\n blobs,\n kzg,\n });\n if (typeof blobVersionedHashes === 'undefined')\n blobVersionedHashes = commitmentsToVersionedHashes({\n commitments,\n });\n if (typeof sidecars === 'undefined') {\n const proofs = blobsToProofs({ blobs, commitments, kzg });\n sidecars = toBlobSidecars({ blobs, commitments, proofs });\n }\n }\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n maxFeePerBlobGas ? numberToHex(maxFeePerBlobGas) : '0x',\n blobVersionedHashes ?? [],\n ...toYParitySignatureArray(transaction, signature),\n ];\n const blobs = [];\n const commitments = [];\n const proofs = [];\n if (sidecars)\n for (let i = 0; i < sidecars.length; i++) {\n const { blob, commitment, proof } = sidecars[i];\n blobs.push(blob);\n commitments.push(commitment);\n proofs.push(proof);\n }\n return concatHex([\n '0x03',\n sidecars\n ? // If sidecars are enabled, envelope turns into a \"wrapper\":\n toRlp([serializedTransaction, blobs, commitments, proofs])\n : // If sidecars are disabled, standard envelope is used:\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionEIP1559(transaction, signature) {\n const { chainId, gas, nonce, to, value, maxFeePerGas, maxPriorityFeePerGas, accessList, data, } = transaction;\n assertTransactionEIP1559(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n maxPriorityFeePerGas ? numberToHex(maxPriorityFeePerGas) : '0x',\n maxFeePerGas ? numberToHex(maxFeePerGas) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ];\n return concatHex([\n '0x02',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionEIP2930(transaction, signature) {\n const { chainId, gas, data, nonce, to, value, accessList, gasPrice } = transaction;\n assertTransactionEIP2930(transaction);\n const serializedAccessList = serializeAccessList(accessList);\n const serializedTransaction = [\n numberToHex(chainId),\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n serializedAccessList,\n ...toYParitySignatureArray(transaction, signature),\n ];\n return concatHex([\n '0x01',\n toRlp(serializedTransaction),\n ]);\n}\nfunction serializeTransactionLegacy(transaction, signature) {\n const { chainId = 0, gas, data, nonce, to, value, gasPrice } = transaction;\n assertTransactionLegacy(transaction);\n let serializedTransaction = [\n nonce ? numberToHex(nonce) : '0x',\n gasPrice ? numberToHex(gasPrice) : '0x',\n gas ? numberToHex(gas) : '0x',\n to ?? '0x',\n value ? numberToHex(value) : '0x',\n data ?? '0x',\n ];\n if (signature) {\n const v = (() => {\n // EIP-155 (inferred chainId)\n if (signature.v >= 35n) {\n const inferredChainId = (signature.v - 35n) / 2n;\n if (inferredChainId > 0)\n return signature.v;\n return 27n + (signature.v === 35n ? 0n : 1n);\n }\n // EIP-155 (explicit chainId)\n if (chainId > 0)\n return BigInt(chainId * 2) + BigInt(35n + signature.v - 27n);\n // Pre-EIP-155 (no chainId)\n const v = 27n + (signature.v === 27n ? 0n : 1n);\n if (signature.v !== v)\n throw new InvalidLegacyVError({ v: signature.v });\n return v;\n })();\n const r = trim(signature.r);\n const s = trim(signature.s);\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(v),\n r === '0x00' ? '0x' : r,\n s === '0x00' ? '0x' : s,\n ];\n }\n else if (chainId > 0) {\n serializedTransaction = [\n ...serializedTransaction,\n numberToHex(chainId),\n '0x',\n '0x',\n ];\n }\n return toRlp(serializedTransaction);\n}\nexport function toYParitySignatureArray(transaction, signature_) {\n const signature = signature_ ?? transaction;\n const { v, yParity } = signature;\n if (typeof signature.r === 'undefined')\n return [];\n if (typeof signature.s === 'undefined')\n return [];\n if (typeof v === 'undefined' && typeof yParity === 'undefined')\n return [];\n const r = trim(signature.r);\n const s = trim(signature.s);\n const yParity_ = (() => {\n if (typeof yParity === 'number')\n return yParity ? numberToHex(1) : '0x';\n if (v === 0n)\n return '0x';\n if (v === 1n)\n return numberToHex(1);\n return v === 27n ? '0x' : numberToHex(1);\n })();\n return [yParity_, r === '0x00' ? '0x' : r, s === '0x00' ? '0x' : s];\n}\n//# sourceMappingURL=serializeTransaction.js.map","import { toHex } from '../encoding/toHex.js';\nimport { toYParitySignatureArray } from '../transaction/serializeTransaction.js';\n/*\n * Serializes an EIP-7702 authorization list.\n */\nexport function serializeAuthorizationList(authorizationList) {\n if (!authorizationList || authorizationList.length === 0)\n return [];\n const serializedAuthorizationList = [];\n for (const authorization of authorizationList) {\n const { chainId, nonce, ...signature } = authorization;\n const contractAddress = authorization.address;\n const signatureArray = toYParitySignatureArray({}, signature);\n // EIP-7702 permits any `y_parity` below 2**8 in an authorization tuple, and a\n // tuple that fails recovery does not invalidate the transaction. Encode a\n // numeric `yParity` as is, so that serialization preserves the transaction hash.\n if (signatureArray.length > 0 && signature.yParity)\n signatureArray[0] = toHex(signature.yParity);\n serializedAuthorizationList.push([\n chainId ? toHex(chainId) : '0x',\n contractAddress,\n nonce ? toHex(nonce) : '0x',\n ...signatureArray,\n ]);\n }\n return serializedAuthorizationList;\n}\n//# sourceMappingURL=serializeAuthorizationList.js.map","import { BaseError } from '../../errors/base.js';\nimport { InvalidHexValueError, RlpDepthLimitExceededError, RlpListBoundaryExceededError, RlpTrailingBytesError, } from '../../errors/encoding.js';\nimport { createCursor, } from '../cursor.js';\nimport { hexToBytes } from './toBytes.js';\nimport { bytesToHex } from './toHex.js';\nconst rlpDepthLimit = 1_024;\nexport function fromRlp(value, to = 'hex') {\n const bytes = (() => {\n if (typeof value === 'string') {\n if (value.length > 3 && value.length % 2 !== 0)\n throw new InvalidHexValueError(value);\n return hexToBytes(value);\n }\n return value;\n })();\n const cursor = createCursor(bytes, {\n recursiveReadLimit: Number.POSITIVE_INFINITY,\n });\n const result = fromRlpCursor(cursor, to);\n // RLP payloads encode exactly one item (Yellow Paper, Appendix B).\n if (cursor.position < cursor.bytes.length)\n throw new RlpTrailingBytesError({\n count: cursor.bytes.length - cursor.position,\n });\n return result;\n}\nfunction fromRlpCursor(cursor, to = 'hex', recursiveDepth = 0) {\n if (recursiveDepth >= rlpDepthLimit)\n throw new RlpDepthLimitExceededError({ limit: rlpDepthLimit });\n if (cursor.bytes.length === 0)\n return (to === 'hex' ? bytesToHex(cursor.bytes) : cursor.bytes);\n const prefix = cursor.readByte();\n if (prefix < 0x80)\n cursor.decrementPosition(1);\n // bytes\n if (prefix < 0xc0) {\n const length = readLength(cursor, prefix, 0x80);\n const bytes = cursor.readBytes(length);\n return (to === 'hex' ? bytesToHex(bytes) : bytes);\n }\n // list\n const length = readLength(cursor, prefix, 0xc0);\n return readList(cursor, length, to, recursiveDepth + 1);\n}\nfunction readLength(cursor, prefix, offset) {\n if (offset === 0x80 && prefix < 0x80)\n return 1;\n if (prefix <= offset + 55)\n return prefix - offset;\n if (prefix === offset + 55 + 1)\n return cursor.readUint8();\n if (prefix === offset + 55 + 2)\n return cursor.readUint16();\n if (prefix === offset + 55 + 3)\n return cursor.readUint24();\n if (prefix === offset + 55 + 4)\n return cursor.readUint32();\n throw new BaseError('Invalid RLP prefix');\n}\nfunction readList(cursor, length, to, recursiveDepth) {\n const position = cursor.position;\n const value = [];\n while (cursor.position - position < length)\n value.push(fromRlpCursor(cursor, to, recursiveDepth));\n // Items must consume exactly the declared list length.\n if (cursor.position - position !== length)\n throw new RlpListBoundaryExceededError({\n consumed: cursor.position - position,\n declared: length,\n });\n return value;\n}\n//# sourceMappingURL=fromRlp.js.map","import { isHex } from '../data/isHex.js';\nexport function isHash(hash) {\n return isHex(hash) && hash.length === 66;\n}\n//# sourceMappingURL=isHash.js.map","export const presignMessagePrefix = '\\x19Ethereum Signed Message:\\n';\n//# sourceMappingURL=strings.js.map","import { presignMessagePrefix } from '../../constants/strings.js';\nimport { concat } from '../data/concat.js';\nimport { size } from '../data/size.js';\nimport { bytesToHex, stringToHex, } from '../encoding/toHex.js';\nexport function toPrefixedMessage(message_) {\n const message = (() => {\n if (typeof message_ === 'string')\n return stringToHex(message_);\n if (typeof message_.raw === 'string')\n return message_.raw;\n return bytesToHex(message_.raw);\n })();\n const prefix = stringToHex(`${presignMessagePrefix}${size(message)}`);\n return concat([prefix, message]);\n}\n//# sourceMappingURL=toPrefixedMessage.js.map","import { keccak256 } from '../hash/keccak256.js';\nimport { toPrefixedMessage } from './toPrefixedMessage.js';\nexport function hashMessage(message, to_) {\n return keccak256(toPrefixedMessage(message), to_);\n}\n//# sourceMappingURL=hashMessage.js.map","import { stringify } from '../utils/stringify.js';\nimport { BaseError } from './base.js';\nexport class InvalidDomainError extends BaseError {\n constructor({ domain }) {\n super(`Invalid domain \"${stringify(domain)}\".`, {\n metaMessages: ['Must be a valid EIP-712 domain.'],\n });\n }\n}\nexport class InvalidPrimaryTypeError extends BaseError {\n constructor({ primaryType, types, }) {\n super(`Invalid primary type \\`${primaryType}\\` must be one of \\`${JSON.stringify(Object.keys(types))}\\`.`, {\n docsPath: '/api/glossary/Errors#typeddatainvalidprimarytypeerror',\n metaMessages: ['Check that the primary type is a key in `types`.'],\n });\n }\n}\nexport class InvalidStructTypeError extends BaseError {\n constructor({ type }) {\n super(`Struct type \"${type}\" is invalid.`, {\n metaMessages: [\n 'Struct type must contain only letters, digits, \"_\" and \"$\", and must not be a Solidity type.',\n ],\n name: 'InvalidStructTypeError',\n });\n }\n}\nexport class InvalidTypedDataTypeError extends BaseError {\n constructor({ type }) {\n const canonicalType = type.replace(/^(u?int)/, '$&256');\n super(`Type \"${type}\" is not a valid EIP-712 type.`, {\n metaMessages: [`Use \"${canonicalType}\" instead.`],\n name: 'InvalidTypedDataTypeError',\n });\n }\n}\n//# sourceMappingURL=typedData.js.map","import { BytesSizeMismatchError } from '../errors/abi.js';\nimport { InvalidAddressError } from '../errors/address.js';\nimport { InvalidDomainError, InvalidPrimaryTypeError, InvalidStructTypeError, InvalidTypedDataTypeError, } from '../errors/typedData.js';\nimport { isAddress } from './address/isAddress.js';\nimport { size } from './data/size.js';\nimport { numberToHex } from './encoding/toHex.js';\nimport { bytesRegex, integerRegex } from './regex.js';\nimport { hashDomain, } from './signature/hashTypedData.js';\nimport { stringify } from './stringify.js';\nexport function serializeTypedData(parameters) {\n const { domain: domain_, message: message_, primaryType, types, } = parameters;\n const normalizeData = (struct, data_) => {\n const data = { ...data_ };\n for (const param of struct) {\n const { name, type } = param;\n if (type === 'address')\n data[name] = data[name].toLowerCase();\n }\n return data;\n };\n const domain = (() => {\n if (!types.EIP712Domain)\n return {};\n if (!domain_)\n return {};\n return normalizeData(types.EIP712Domain, domain_);\n })();\n const message = (() => {\n if (primaryType === 'EIP712Domain')\n return undefined;\n return normalizeData(types[primaryType], message_);\n })();\n return stringify({ domain, message, primaryType, types });\n}\nexport function validateTypedData(parameters) {\n const { domain, message, primaryType, types } = parameters;\n const validateData = (struct, data) => {\n for (const param of struct) {\n const { name, type } = param;\n const value = data[name];\n const baseType = type.replace(/(\\[[0-9]*\\])+$/, '');\n if (baseType === 'int' || baseType === 'uint')\n throw new InvalidTypedDataTypeError({ type });\n const integerMatch = type.match(integerRegex);\n if (integerMatch &&\n (typeof value === 'number' || typeof value === 'bigint')) {\n const [_type, base, size_] = integerMatch;\n // If number cannot be cast to a sized hex value, it is out of range\n // and will throw.\n numberToHex(value, {\n signed: base === 'int',\n size: Number.parseInt(size_, 10) / 8,\n });\n }\n if (type === 'address' && typeof value === 'string' && !isAddress(value))\n throw new InvalidAddressError({ address: value });\n const bytesMatch = type.match(bytesRegex);\n if (bytesMatch) {\n const [_type, size_] = bytesMatch;\n if (size_ && size(value) !== Number.parseInt(size_, 10))\n throw new BytesSizeMismatchError({\n expectedSize: Number.parseInt(size_, 10),\n givenSize: size(value),\n });\n }\n const struct = types[type];\n if (struct)\n validateData(struct, value);\n }\n };\n // Validate struct types, including ones that are only referenced as array\n // elements.\n for (const type of Object.keys(types))\n validateReference(type);\n // Validate domain types.\n if (types.EIP712Domain && domain) {\n if (typeof domain !== 'object')\n throw new InvalidDomainError({ domain });\n validateData(types.EIP712Domain, domain);\n }\n // Validate message types.\n if (primaryType !== 'EIP712Domain') {\n if (types[primaryType])\n validateData(types[primaryType], message);\n else\n throw new InvalidPrimaryTypeError({ primaryType, types });\n }\n}\nexport function getTypesForEIP712Domain({ domain, }) {\n return [\n typeof domain?.name === 'string' && { name: 'name', type: 'string' },\n typeof domain?.version === 'string' && { name: 'version', type: 'string' },\n (typeof domain?.chainId === 'number' ||\n typeof domain?.chainId === 'bigint') && {\n name: 'chainId',\n type: 'uint256',\n },\n domain?.verifyingContract && {\n name: 'verifyingContract',\n type: 'address',\n },\n domain?.salt && { name: 'salt', type: 'bytes32' },\n ].filter(Boolean);\n}\nexport function domainSeparator({ domain }) {\n return hashDomain({\n domain: domain,\n types: {\n EIP712Domain: getTypesForEIP712Domain({ domain }),\n },\n });\n}\n/** @internal */\nfunction validateReference(type) {\n // Struct type must contain only letters, digits, `_` and `$`, and must not be\n // a Solidity type, so it cannot shadow a Solidity type or an array of one. A\n // struct such as `intent` or `bytesInfo` is valid, while `uint7` or `bytes33`\n // is rejected, since other implementations parse it as a Solidity type.\n if (!/^[A-Za-z0-9_$]+$/.test(type) ||\n type === 'address' ||\n type === 'bool' ||\n type === 'string' ||\n /^(u?int|bytes)[0-9]*$/.test(type))\n throw new InvalidStructTypeError({ type });\n}\n//# sourceMappingURL=typedData.js.map","// Implementation forked and adapted from https://github.com/MetaMask/eth-sig-util/blob/main/src/sign-typed-data.ts\nimport { encodeAbiParameters, } from '../abi/encodeAbiParameters.js';\nimport { concat } from '../data/concat.js';\nimport { toHex } from '../encoding/toHex.js';\nimport { keccak256 } from '../hash/keccak256.js';\nimport { getTypesForEIP712Domain, validateTypedData, } from '../typedData.js';\nexport function hashTypedData(parameters) {\n const { domain = {}, message, primaryType, } = parameters;\n const types = {\n EIP712Domain: getTypesForEIP712Domain({ domain }),\n ...parameters.types,\n };\n // Need to do a runtime validation check on addresses, byte ranges, integer ranges, etc\n // as we can't statically check this with TypeScript.\n validateTypedData({\n domain,\n message,\n primaryType,\n types,\n });\n const parts = ['0x1901'];\n if (domain)\n parts.push(hashDomain({\n domain,\n types: types,\n }));\n if (primaryType !== 'EIP712Domain')\n parts.push(hashStruct({\n data: message,\n primaryType,\n types: types,\n }));\n return keccak256(concat(parts));\n}\nexport function hashDomain({ domain, types, }) {\n return hashStruct({\n data: domain,\n primaryType: 'EIP712Domain',\n types: types,\n });\n}\nexport function hashStruct({ data, primaryType, types, }) {\n const encoded = encodeData({\n data: data,\n primaryType,\n types: types,\n });\n return keccak256(encoded);\n}\nfunction encodeData({ data, primaryType, types, }) {\n const encodedTypes = [{ type: 'bytes32' }];\n const encodedValues = [hashType({ primaryType, types })];\n for (const field of types[primaryType]) {\n const [type, value] = encodeField({\n types,\n name: field.name,\n type: field.type,\n value: data[field.name],\n });\n encodedTypes.push(type);\n encodedValues.push(value);\n }\n return encodeAbiParameters(encodedTypes, encodedValues);\n}\nfunction hashType({ primaryType, types, }) {\n const encodedHashType = toHex(encodeType({ primaryType, types }));\n return keccak256(encodedHashType);\n}\nexport function encodeType({ primaryType, types, }) {\n let result = '';\n const unsortedDeps = findTypeDependencies({ primaryType, types });\n unsortedDeps.delete(primaryType);\n const deps = [primaryType, ...Array.from(unsortedDeps).sort()];\n for (const type of deps) {\n result += `${type}(${types[type]\n .map(({ name, type: t }) => `${t} ${name}`)\n .join(',')})`;\n }\n return result;\n}\nfunction findTypeDependencies({ primaryType: primaryType_, types, }, results = new Set()) {\n const primaryType = primaryType_.replace(/(\\[[0-9]*\\])+$/, '');\n if (results.has(primaryType) || types[primaryType] === undefined) {\n return results;\n }\n results.add(primaryType);\n for (const field of types[primaryType]) {\n findTypeDependencies({ primaryType: field.type, types }, results);\n }\n return results;\n}\nfunction encodeField({ types, name, type, value, }) {\n if (types[type] !== undefined) {\n return [\n { type: 'bytes32' },\n keccak256(encodeData({ data: value, primaryType: type, types })),\n ];\n }\n if (type === 'bytes')\n return [{ type: 'bytes32' }, keccak256(value)];\n if (type === 'string')\n return [{ type: 'bytes32' }, keccak256(toHex(value))];\n if (type.lastIndexOf(']') === type.length - 1) {\n const parsedType = type.slice(0, type.lastIndexOf('['));\n const typeValuePairs = value.map((item) => encodeField({\n name,\n type: parsedType,\n types,\n value: item,\n }));\n return [\n { type: 'bytes32' },\n keccak256(encodeAbiParameters(typeValuePairs.map(([t]) => t), typeValuePairs.map(([, v]) => v))),\n ];\n }\n return [{ type }, value];\n}\n//# sourceMappingURL=hashTypedData.js.map","import { InvalidSerializedTransactionTypeError, } from '../../errors/transaction.js';\nimport { sliceHex } from '../data/slice.js';\nimport { hexToNumber } from '../encoding/fromHex.js';\nexport function getSerializedTransactionType(serializedTransaction) {\n const serializedType = sliceHex(serializedTransaction, 0, 1);\n if (serializedType === '0x04')\n return 'eip7702';\n if (serializedType === '0x03')\n return 'eip4844';\n if (serializedType === '0x02')\n return 'eip1559';\n if (serializedType === '0x01')\n return 'eip2930';\n if (serializedType !== '0x' && hexToNumber(serializedType) >= 0xc0)\n return 'legacy';\n throw new InvalidSerializedTransactionTypeError({ serializedType });\n}\n//# sourceMappingURL=getSerializedTransactionType.js.map","import { InvalidAddressError, } from '../../errors/address.js';\nimport { InvalidLegacyVError, InvalidSerializedTransactionError, InvalidYParityError, } from '../../errors/transaction.js';\nimport { isAddress } from '../address/isAddress.js';\nimport { toBlobSidecars } from '../blob/toBlobSidecars.js';\nimport { isHex } from '../data/isHex.js';\nimport { padHex } from '../data/pad.js';\nimport { trim } from '../data/trim.js';\nimport { hexToBigInt, hexToNumber, } from '../encoding/fromHex.js';\nimport { fromRlp } from '../encoding/fromRlp.js';\nimport { isHash } from '../hash/isHash.js';\nimport { assertTransactionEIP1559, assertTransactionEIP2930, assertTransactionEIP4844, assertTransactionEIP7702, assertTransactionLegacy, } from './assertTransaction.js';\nimport { getSerializedTransactionType, } from './getSerializedTransactionType.js';\nexport function parseTransaction(serializedTransaction) {\n const type = getSerializedTransactionType(serializedTransaction);\n if (type === 'eip1559')\n return parseTransactionEIP1559(serializedTransaction);\n if (type === 'eip2930')\n return parseTransactionEIP2930(serializedTransaction);\n if (type === 'eip4844')\n return parseTransactionEIP4844(serializedTransaction);\n if (type === 'eip7702')\n return parseTransactionEIP7702(serializedTransaction);\n return parseTransactionLegacy(serializedTransaction);\n}\nfunction parseTransactionEIP7702(serializedTransaction) {\n const transactionArray = toTransactionArray(serializedTransaction);\n const [chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gas, to, value, data, accessList, authorizationList, v, r, s,] = transactionArray;\n if (transactionArray.length !== 10 && transactionArray.length !== 13)\n throw new InvalidSerializedTransactionError({\n attributes: {\n chainId,\n nonce,\n maxPriorityFeePerGas,\n maxFeePerGas,\n gas,\n to,\n value,\n data,\n accessList,\n authorizationList,\n ...(transactionArray.length > 9\n ? {\n v,\n r,\n s,\n }\n : {}),\n },\n serializedTransaction,\n type: 'eip7702',\n });\n const transaction = {\n chainId: hexToNumber(chainId),\n type: 'eip7702',\n };\n if (isHex(to) && to !== '0x')\n transaction.to = to;\n if (isHex(gas) && gas !== '0x')\n transaction.gas = hexToBigInt(gas);\n if (isHex(data) && data !== '0x')\n transaction.data = data;\n if (isHex(nonce))\n transaction.nonce = nonce === '0x' ? 0 : hexToNumber(nonce);\n if (isHex(value) && value !== '0x')\n transaction.value = hexToBigInt(value);\n if (isHex(maxFeePerGas) && maxFeePerGas !== '0x')\n transaction.maxFeePerGas = hexToBigInt(maxFeePerGas);\n if (isHex(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')\n transaction.maxPriorityFeePerGas = hexToBigInt(maxPriorityFeePerGas);\n if (accessList.length !== 0 && accessList !== '0x')\n transaction.accessList = parseAccessList(accessList);\n if (authorizationList.length !== 0 && authorizationList !== '0x')\n transaction.authorizationList = parseAuthorizationList(authorizationList);\n assertTransactionEIP7702(transaction);\n const signature = transactionArray.length === 13\n ? parseEIP155Signature(transactionArray)\n : undefined;\n return { ...signature, ...transaction };\n}\nfunction parseTransactionEIP4844(serializedTransaction) {\n const transactionOrWrapperArray = toTransactionArray(serializedTransaction);\n const hasNetworkWrapper = transactionOrWrapperArray.length === 4;\n const transactionArray = hasNetworkWrapper\n ? transactionOrWrapperArray[0]\n : transactionOrWrapperArray;\n const wrapperArray = hasNetworkWrapper\n ? transactionOrWrapperArray.slice(1)\n : [];\n const [chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gas, to, value, data, accessList, maxFeePerBlobGas, blobVersionedHashes, v, r, s,] = transactionArray;\n const [blobs, commitments, proofs] = wrapperArray;\n if (!(transactionArray.length === 11 || transactionArray.length === 14))\n throw new InvalidSerializedTransactionError({\n attributes: {\n chainId,\n nonce,\n maxPriorityFeePerGas,\n maxFeePerGas,\n gas,\n to,\n value,\n data,\n accessList,\n ...(transactionArray.length > 9\n ? {\n v,\n r,\n s,\n }\n : {}),\n },\n serializedTransaction,\n type: 'eip4844',\n });\n const transaction = {\n blobVersionedHashes: blobVersionedHashes,\n chainId: hexToNumber(chainId),\n to,\n type: 'eip4844',\n };\n if (isHex(gas) && gas !== '0x')\n transaction.gas = hexToBigInt(gas);\n if (isHex(data) && data !== '0x')\n transaction.data = data;\n if (isHex(nonce))\n transaction.nonce = nonce === '0x' ? 0 : hexToNumber(nonce);\n if (isHex(value) && value !== '0x')\n transaction.value = hexToBigInt(value);\n if (isHex(maxFeePerBlobGas) && maxFeePerBlobGas !== '0x')\n transaction.maxFeePerBlobGas = hexToBigInt(maxFeePerBlobGas);\n if (isHex(maxFeePerGas) && maxFeePerGas !== '0x')\n transaction.maxFeePerGas = hexToBigInt(maxFeePerGas);\n if (isHex(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')\n transaction.maxPriorityFeePerGas = hexToBigInt(maxPriorityFeePerGas);\n if (accessList.length !== 0 && accessList !== '0x')\n transaction.accessList = parseAccessList(accessList);\n if (blobs && commitments && proofs)\n transaction.sidecars = toBlobSidecars({\n blobs: blobs,\n commitments: commitments,\n proofs: proofs,\n });\n assertTransactionEIP4844(transaction);\n const signature = transactionArray.length === 14\n ? parseEIP155Signature(transactionArray)\n : undefined;\n return { ...signature, ...transaction };\n}\nfunction parseTransactionEIP1559(serializedTransaction) {\n const transactionArray = toTransactionArray(serializedTransaction);\n const [chainId, nonce, maxPriorityFeePerGas, maxFeePerGas, gas, to, value, data, accessList, v, r, s,] = transactionArray;\n if (!(transactionArray.length === 9 || transactionArray.length === 12))\n throw new InvalidSerializedTransactionError({\n attributes: {\n chainId,\n nonce,\n maxPriorityFeePerGas,\n maxFeePerGas,\n gas,\n to,\n value,\n data,\n accessList,\n ...(transactionArray.length > 9\n ? {\n v,\n r,\n s,\n }\n : {}),\n },\n serializedTransaction,\n type: 'eip1559',\n });\n const transaction = {\n chainId: hexToNumber(chainId),\n type: 'eip1559',\n };\n if (isHex(to) && to !== '0x')\n transaction.to = to;\n if (isHex(gas) && gas !== '0x')\n transaction.gas = hexToBigInt(gas);\n if (isHex(data) && data !== '0x')\n transaction.data = data;\n if (isHex(nonce))\n transaction.nonce = nonce === '0x' ? 0 : hexToNumber(nonce);\n if (isHex(value) && value !== '0x')\n transaction.value = hexToBigInt(value);\n if (isHex(maxFeePerGas) && maxFeePerGas !== '0x')\n transaction.maxFeePerGas = hexToBigInt(maxFeePerGas);\n if (isHex(maxPriorityFeePerGas) && maxPriorityFeePerGas !== '0x')\n transaction.maxPriorityFeePerGas = hexToBigInt(maxPriorityFeePerGas);\n if (accessList.length !== 0 && accessList !== '0x')\n transaction.accessList = parseAccessList(accessList);\n assertTransactionEIP1559(transaction);\n const signature = transactionArray.length === 12\n ? parseEIP155Signature(transactionArray)\n : undefined;\n return { ...signature, ...transaction };\n}\nfunction parseTransactionEIP2930(serializedTransaction) {\n const transactionArray = toTransactionArray(serializedTransaction);\n const [chainId, nonce, gasPrice, gas, to, value, data, accessList, v, r, s] = transactionArray;\n if (!(transactionArray.length === 8 || transactionArray.length === 11))\n throw new InvalidSerializedTransactionError({\n attributes: {\n chainId,\n nonce,\n gasPrice,\n gas,\n to,\n value,\n data,\n accessList,\n ...(transactionArray.length > 8\n ? {\n v,\n r,\n s,\n }\n : {}),\n },\n serializedTransaction,\n type: 'eip2930',\n });\n const transaction = {\n chainId: hexToNumber(chainId),\n type: 'eip2930',\n };\n if (isHex(to) && to !== '0x')\n transaction.to = to;\n if (isHex(gas) && gas !== '0x')\n transaction.gas = hexToBigInt(gas);\n if (isHex(data) && data !== '0x')\n transaction.data = data;\n if (isHex(nonce))\n transaction.nonce = nonce === '0x' ? 0 : hexToNumber(nonce);\n if (isHex(value) && value !== '0x')\n transaction.value = hexToBigInt(value);\n if (isHex(gasPrice) && gasPrice !== '0x')\n transaction.gasPrice = hexToBigInt(gasPrice);\n if (accessList.length !== 0 && accessList !== '0x')\n transaction.accessList = parseAccessList(accessList);\n assertTransactionEIP2930(transaction);\n const signature = transactionArray.length === 11\n ? parseEIP155Signature(transactionArray)\n : undefined;\n return { ...signature, ...transaction };\n}\nfunction parseTransactionLegacy(serializedTransaction) {\n const transactionArray = fromRlp(serializedTransaction, 'hex');\n const [nonce, gasPrice, gas, to, value, data, chainIdOrV_, r, s] = transactionArray;\n if (!(transactionArray.length === 6 || transactionArray.length === 9))\n throw new InvalidSerializedTransactionError({\n attributes: {\n nonce,\n gasPrice,\n gas,\n to,\n value,\n data,\n ...(transactionArray.length > 6\n ? {\n v: chainIdOrV_,\n r,\n s,\n }\n : {}),\n },\n serializedTransaction,\n type: 'legacy',\n });\n const transaction = {\n type: 'legacy',\n };\n if (isHex(to) && to !== '0x')\n transaction.to = to;\n if (isHex(gas) && gas !== '0x')\n transaction.gas = hexToBigInt(gas);\n if (isHex(data) && data !== '0x')\n transaction.data = data;\n if (isHex(nonce))\n transaction.nonce = nonce === '0x' ? 0 : hexToNumber(nonce);\n if (isHex(value) && value !== '0x')\n transaction.value = hexToBigInt(value);\n if (isHex(gasPrice) && gasPrice !== '0x')\n transaction.gasPrice = hexToBigInt(gasPrice);\n assertTransactionLegacy(transaction);\n if (transactionArray.length === 6)\n return transaction;\n const chainIdOrV = isHex(chainIdOrV_) && chainIdOrV_ !== '0x'\n ? hexToBigInt(chainIdOrV_)\n : 0n;\n if (s === '0x' && r === '0x') {\n if (chainIdOrV > 0)\n transaction.chainId = Number(chainIdOrV);\n return transaction;\n }\n const v = chainIdOrV;\n const chainId = Number((v - 35n) / 2n);\n if (chainId > 0)\n transaction.chainId = chainId;\n else if (v !== 27n && v !== 28n)\n throw new InvalidLegacyVError({ v });\n transaction.v = v;\n transaction.s = s;\n transaction.r = r;\n transaction.yParity = v % 2n === 0n ? 1 : 0;\n return transaction;\n}\nexport function toTransactionArray(serializedTransaction) {\n return fromRlp(`0x${serializedTransaction.slice(4)}`, 'hex');\n}\nexport function parseAccessList(accessList_) {\n const accessList = [];\n for (let i = 0; i < accessList_.length; i++) {\n const [address, storageKeys] = accessList_[i];\n if (!isAddress(address, { strict: false }))\n throw new InvalidAddressError({ address });\n accessList.push({\n address: address,\n storageKeys: storageKeys.map((key) => (isHash(key) ? key : trim(key))),\n });\n }\n return accessList;\n}\nfunction parseAuthorizationList(serializedAuthorizationList) {\n const authorizationList = [];\n for (let i = 0; i < serializedAuthorizationList.length; i++) {\n const [chainId, address, nonce, yParity, r, s] = serializedAuthorizationList[i];\n authorizationList.push({\n address,\n chainId: chainId === '0x' ? 0 : hexToNumber(chainId),\n nonce: nonce === '0x' ? 0 : hexToNumber(nonce),\n ...parseEIP155Signature([yParity, r, s]),\n });\n }\n return authorizationList;\n}\nfunction parseEIP155Signature(transactionArray) {\n const signature = transactionArray.slice(-3);\n const yParity = signature[0] === '0x' ? 0n : hexToBigInt(signature[0]);\n if (yParity !== 0n && yParity !== 1n)\n throw new InvalidYParityError({ yParity });\n const v = yParity === 0n ? 27n : 28n;\n return {\n r: padHex(signature[1], { size: 32 }),\n s: padHex(signature[2], { size: 32 }),\n v,\n yParity: v === 27n ? 0 : 1,\n };\n}\n//# sourceMappingURL=parseTransaction.js.map","import * as Value from './Value.js';\n/**\n * Divides a number by a given exponent of base 10 (10exponent), and formats it into a string representation of the number..\n *\n * - Docs: https://viem.sh/docs/utilities/formatUnits\n *\n * @example\n * import { formatUnits } from 'viem'\n *\n * formatUnits(420000000000n, 9)\n * // '420'\n */\nexport function formatUnits(value, decimals) {\n return Value.format(value, decimals);\n}\n//# sourceMappingURL=formatUnits.js.map","import * as Value from './Value.js';\n/**\n * Multiplies a string representation of a number by a given exponent of base 10 (10exponent).\n *\n * - Docs: https://viem.sh/docs/utilities/parseUnits\n *\n * @example\n * import { parseUnits } from 'viem'\n *\n * parseUnits('420', 9)\n * // 420000000000n\n */\nexport function parseUnits(value, decimals) {\n return Value.from(value, decimals);\n}\n//# sourceMappingURL=parseUnits.js.map","import { multicall3Abi } from '../../constants/abis.js';\nimport { multicall3Bytecode } from '../../constants/contracts.js';\nimport { AbiDecodingZeroDataError } from '../../errors/abi.js';\nimport { BaseError } from '../../errors/base.js';\nimport { RawContractError } from '../../errors/contract.js';\nimport { decodeFunctionResult, } from '../../utils/abi/decodeFunctionResult.js';\nimport { encodeFunctionData, } from '../../utils/abi/encodeFunctionData.js';\nimport { getChainContractAddress, } from '../../utils/chain/getChainContractAddress.js';\nimport { getContractError, } from '../../utils/errors/getContractError.js';\nimport { getAction } from '../../utils/getAction.js';\nimport { createBatchScheduler, } from '../../utils/promise/createBatchScheduler.js';\nimport { stringify } from '../../utils/stringify.js';\nimport { readContract } from './readContract.js';\n/**\n * Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall).\n *\n * - Docs: https://viem.sh/docs/contract/multicall\n *\n * @param client - Client to use\n * @param parameters - {@link MulticallParameters}\n * @returns An array of results with accompanying status. {@link MulticallReturnType}\n *\n * @example\n * import { createPublicClient, http, parseAbi } from 'viem'\n * import { mainnet } from 'viem/chains'\n * import { multicall } from 'viem/contract'\n *\n * const client = createPublicClient({\n * chain: mainnet,\n * transport: http(),\n * })\n * const abi = parseAbi([\n * 'function balanceOf(address) view returns (uint256)',\n * 'function totalSupply() view returns (uint256)',\n * ])\n * const results = await multicall(client, {\n * contracts: [\n * {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi,\n * functionName: 'balanceOf',\n * args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],\n * },\n * {\n * address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2',\n * abi,\n * functionName: 'totalSupply',\n * },\n * ],\n * })\n * // [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }]\n */\nexport async function multicall(client, parameters) {\n const { account, authorizationList, allowFailure = true, blockHash, blockNumber, blockOverrides, blockTag, requireCanonical, stateOverride, } = parameters;\n const contracts = parameters.contracts;\n const batch = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n const batchSize = parameters.batchSize ?? batch.batchSize ?? 1024;\n const deployless = parameters.deployless ?? batch.deployless ?? false;\n const multicallAddress = (() => {\n if (parameters.multicallAddress)\n return parameters.multicallAddress;\n if (deployless)\n return null;\n if (client.chain) {\n return getChainContractAddress({\n blockNumber,\n chain: client.chain,\n contract: 'multicall3',\n });\n }\n throw new Error('client chain not configured. multicallAddress is required.');\n })();\n const chunkedCalls = [[]];\n let currentChunk = 0;\n let currentChunkSize = 0;\n for (let i = 0; i < contracts.length; i++) {\n const { abi, address, args, functionName } = contracts[i];\n try {\n const callData = encodeFunctionData({ abi, args, functionName });\n currentChunkSize += (callData.length - 2) / 2;\n // Check to see if we need to create a new chunk.\n if (\n // Check if batching is enabled.\n batchSize > 0 &&\n // Check if the current size of the batch exceeds the size limit.\n currentChunkSize > batchSize &&\n // Check if the current chunk is not already empty.\n chunkedCalls[currentChunk].length > 0) {\n currentChunk++;\n currentChunkSize = (callData.length - 2) / 2;\n chunkedCalls[currentChunk] = [];\n }\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData,\n target: address,\n },\n ];\n }\n catch (err) {\n const error = getContractError(err, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/multicall',\n functionName,\n sender: account,\n });\n if (!allowFailure)\n throw error;\n chunkedCalls[currentChunk] = [\n ...chunkedCalls[currentChunk],\n {\n allowFailure: true,\n callData: '0x',\n target: address,\n },\n ];\n }\n }\n const batching = Boolean(client.batch?.multicall);\n const batches = batching\n ? chunkedCalls.flatMap((calls) => calls.map((call) => [call]))\n : chunkedCalls;\n const aggregate3Results = await Promise.allSettled(batches.map((calls) => {\n if (batching)\n return scheduleMulticall(client, {\n account,\n authorizationList,\n batchSize,\n blockHash,\n blockNumber,\n blockOverrides,\n blockTag,\n call: calls[0],\n multicallAddress,\n requireCanonical,\n stateOverride,\n }).then((result) => [result]);\n return getAction(client, readContract, 'readContract')({\n ...(multicallAddress === null\n ? { code: multicall3Bytecode }\n : { address: multicallAddress }),\n abi: multicall3Abi,\n account,\n args: [calls],\n authorizationList,\n blockHash,\n blockNumber,\n blockOverrides,\n blockTag,\n functionName: 'aggregate3',\n requireCanonical,\n stateOverride,\n });\n }));\n const results = [];\n for (let i = 0; i < aggregate3Results.length; i++) {\n const result = aggregate3Results[i];\n // If an error occurred in a `readContract` invocation (ie. network error),\n // then append the failure reason to each contract result.\n if (result.status === 'rejected') {\n if (!allowFailure)\n throw result.reason;\n for (let j = 0; j < batches[i].length; j++) {\n results.push({\n status: 'failure',\n error: result.reason,\n result: undefined,\n });\n }\n continue;\n }\n // If the `readContract` call was successful, then decode the results.\n const aggregate3Result = result.value;\n for (let j = 0; j < aggregate3Result.length; j++) {\n // Extract the response from `readContract`\n const { returnData, success } = aggregate3Result[j];\n // Extract the request call data from the original call.\n const { callData } = batches[i][j];\n // Extract the contract config for this call from the `contracts` argument\n // for decoding.\n const { abi, address, functionName, args } = contracts[results.length];\n try {\n if (callData === '0x')\n throw new AbiDecodingZeroDataError();\n if (!success)\n throw new RawContractError({ data: returnData });\n const result = decodeFunctionResult({\n abi,\n args,\n data: returnData,\n functionName,\n });\n results.push(allowFailure ? { result, status: 'success' } : result);\n }\n catch (err) {\n const error = getContractError(err, {\n abi,\n address,\n args,\n docsPath: '/docs/contract/multicall',\n functionName,\n });\n if (!allowFailure)\n throw error;\n results.push({ error, result: undefined, status: 'failure' });\n }\n }\n }\n if (results.length !== contracts.length)\n throw new BaseError('multicall results mismatch');\n return results;\n}\nasync function scheduleMulticall(client, parameters) {\n const { batchSize, call, multicallAddress, ...rest } = parameters;\n const { wait = 0 } = typeof client.batch?.multicall === 'object' ? client.batch.multicall : {};\n const { schedule } = createBatchScheduler({\n id: stringify(['multicall', client.uid, batchSize, multicallAddress, rest]),\n wait,\n shouldSplitBatch(calls) {\n if (batchSize === 0)\n return false;\n const size = calls.reduce((size, { callData }) => size + (callData.length - 2) / 2, 0);\n return size > batchSize;\n },\n fn: (calls) => getAction(client, readContract, 'readContract')({\n ...(multicallAddress === null\n ? { code: multicall3Bytecode }\n : { address: multicallAddress }),\n ...rest,\n abi: multicall3Abi,\n args: [calls],\n functionName: 'aggregate3',\n }),\n });\n const [result] = await schedule(call);\n return result;\n}\n//# sourceMappingURL=multicall.js.map","export const ethAddress = '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee';\nexport const zeroAddress = '0x0000000000000000000000000000000000000000';\n//# sourceMappingURL=address.js.map","import { erc20Abi } from '../../constants/abis.js';\nimport { isAddress } from '../../utils/address/isAddress.js';\nimport { isAddressEqual } from '../../utils/address/isAddressEqual.js';\nimport { encodeFunctionData } from '../../utils/index.js';\nimport { formatUnits } from '../../utils/unit/formatUnits.js';\nimport { parseUnits } from '../../utils/unit/parseUnits.js';\nimport { readContract } from '../public/readContract.js';\n/**\n * Shapes a base-unit value into an {@link Amount} (base units, `decimals`, and\n * human-readable `formatted` string).\n *\n * @param amount - Amount in base units.\n * @param decimals - Token decimals used to format the amount.\n * @returns The {@link Amount}.\n */\nexport function toAmount(amount, decimals) {\n return { amount, decimals, formatted: formatUnits(amount, decimals) };\n}\n/**\n * Resolves a write amount to base units.\n *\n * @param amount - Base-unit amount, or formatted helper.\n * @param decimals - Token decimals used to parse formatted amounts.\n * @returns Amount in base units.\n */\nexport function toBaseUnits(amount, decimals) {\n if (typeof amount === 'bigint')\n return amount;\n const resolved = amount.decimals ?? decimals;\n return parseUnits(amount.formatted, requireTokenDecimals(resolved));\n}\n/**\n * Requires resolved token decimals for parsing or formatting amounts.\n *\n * @param decimals - Token decimals.\n * @returns Token decimals.\n * @internal\n */\nexport function requireTokenDecimals(decimals) {\n if (decimals === undefined)\n throw new Error('Token decimals are required. Pass `amount.decimals` or select a declared token.');\n return decimals;\n}\n/**\n * Resolves the decimals used for formatting a write amount.\n *\n * @param amount - Base-unit amount, or formatted helper.\n * @param decimals - Token decimals.\n * @returns Token decimals, overridden by the formatted helper when present.\n */\nexport function resolveAmountDecimals(amount, decimals) {\n if (typeof amount === 'bigint')\n return decimals;\n return amount.decimals ?? decimals;\n}\n/**\n * Resolves the token contract `address` and `decimals` from a `token`, which is\n * either the symbol of a token declared on the client's `tokens` array or a\n * contract `address`.\n *\n * When `token` is a declared symbol, the `address` and `decimals` are resolved\n * from the Client's `tokens` array for the Client's `chain.id` (`decimals` can\n * be overridden via the explicit `decimals`). When `token` is an address, its\n * `decimals` is inferred from the Client's `tokens` array when the address\n * matches a declared token, otherwise taken from the explicit `decimals`.\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The resolved `address` and `decimals`.\n */\nexport function resolveToken(client, parameters) {\n const { decimals, token } = parameters;\n const declared = findDeclaredToken(client, token);\n if (declared)\n return {\n address: declared.address,\n decimals: decimals ?? declared.decimals,\n };\n if (isAddress(token, { strict: false }))\n return {\n address: token,\n decimals: decimals ?? inferDecimals(client, token),\n };\n throw new Error(`Token \"${token}\" is not a declared ERC-20 token on the client's \\`tokens\\` array (with an address for the client's chain), and is not a valid address.`);\n}\n/**\n * Finds the declared token on the Client's `tokens` array matching `token`\n * (either a token symbol or contract `address`), resolved to a {@link ResolvedToken}\n * for the Client's `chain.id`. Returns `undefined` when no declared token\n * matches, or the matching token has no address for the Client's chain.\n *\n * @param client - Client.\n * @param token - Token symbol (declared on the client's `tokens` array) or contract address.\n * @returns The matching resolved token config, or `undefined`.\n */\nexport function findDeclaredToken(client, token) {\n const tokens = client.tokens;\n const chainId = client.chain?.id;\n if (!tokens || chainId === undefined)\n return undefined;\n const bySymbol = findTokenBySymbol(tokens, token);\n if (bySymbol)\n return resolveTokenForChain(bySymbol, chainId);\n if (isAddress(token, { strict: false }))\n for (const token_ of tokens) {\n const resolved = resolveTokenForChain(token_, chainId);\n if (resolved && isAddressEqual(resolved.address, token))\n return resolved;\n }\n return undefined;\n}\n/**\n * Resolves a {@link Token} to a {@link ResolvedToken} for `chainId`, or\n * `undefined` when the token has no address for `chainId`. @internal\n */\nfunction resolveTokenForChain(token, chainId) {\n const address = token.addresses[chainId];\n if (!address)\n return undefined;\n return {\n address,\n currency: token.currency,\n decimals: token.decimals,\n name: token.name,\n popular: token.popular,\n symbol: token.symbol,\n };\n}\n/** Finds a {@link Token} by symbol (case-insensitively) on a `tokens` array. @internal */\nfunction findTokenBySymbol(tokens, symbol) {\n const lowerSymbol = symbol.toLowerCase();\n for (const token of tokens) {\n if (token.symbol?.toLowerCase() === lowerSymbol)\n return token;\n }\n return undefined;\n}\n/**\n * Infers a token's `decimals` from the Client's `tokens` array by matching\n * `address` against each token's address for the Client's `chain.id`.\n * @internal\n */\nfunction inferDecimals(client, address) {\n const tokens = client.tokens;\n const chainId = client.chain?.id;\n if (tokens && chainId !== undefined)\n for (const token of tokens) {\n const resolved = resolveTokenForChain(token, chainId);\n if (resolved && isAddressEqual(resolved.address, address))\n return resolved.decimals;\n }\n return undefined;\n}\n/**\n * Resolves token decimals, fetching from the token contract when they are not\n * provided explicitly or declared on the client.\n * @internal\n */\nexport async function resolveTokenWithDecimals(client, parameters) {\n const { address, decimals } = resolveToken(client, parameters);\n if (decimals !== undefined)\n return { address, decimals };\n return {\n address,\n decimals: await readContract(client, {\n abi: erc20Abi,\n address,\n functionName: 'decimals',\n }),\n };\n}\n/**\n * Picks the transaction-override fields shared by write actions, so the\n * action-specific args (`token`, `amount`, `to`, etc.) don't leak into\n * `estimateContractGas` / `simulateContract` requests. @internal\n */\nexport function pickWriteParameters(parameters) {\n const { account, chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce } = parameters;\n return { account, chain, gas, maxFeePerGas, maxPriorityFeePerGas, nonce };\n}\nexport function defineCall(call) {\n return {\n ...call,\n data: encodeFunctionData(call),\n to: call.address,\n };\n}\n//# sourceMappingURL=internal.js.map","// Generated with `pnpm gen:tempo-abis`. Do not modify manually.\n// Source: tempoxyz/tempo@e539a1dac2921670585a08215e516d8b98aa527a\nexport const accountKeychain = [\n {\n name: 'authorizeKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint64', name: 'expiry' },\n { type: 'bool', name: 'enforceLimits' },\n {\n type: 'tuple[]',\n name: 'limits',\n components: [\n { type: 'address', name: 'token' },\n { type: 'uint256', name: 'amount' },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'authorizeKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'uint8', name: 'signatureType' },\n {\n type: 'tuple',\n name: 'config',\n components: [\n { type: 'uint64', name: 'expiry' },\n { type: 'bool', name: 'enforceLimits' },\n {\n type: 'tuple[]',\n name: 'limits',\n components: [\n { type: 'address', name: 'token' },\n { type: 'uint256', name: 'amount' },\n { type: 'uint64', name: 'period' },\n ],\n },\n { type: 'bool', name: 'allowAnyCalls' },\n {\n type: 'tuple[]',\n name: 'allowedCalls',\n components: [\n { type: 'address', name: 'target' },\n {\n type: 'tuple[]',\n name: 'selectorRules',\n components: [\n { type: 'bytes4', name: 'selector' },\n { type: 'address[]', name: 'recipients' },\n ],\n },\n ],\n },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'authorizeKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'uint8', name: 'signatureType' },\n {\n type: 'tuple',\n name: 'config',\n components: [\n { type: 'uint64', name: 'expiry' },\n { type: 'bool', name: 'enforceLimits' },\n {\n type: 'tuple[]',\n name: 'limits',\n components: [\n { type: 'address', name: 'token' },\n { type: 'uint256', name: 'amount' },\n { type: 'uint64', name: 'period' },\n ],\n },\n { type: 'bool', name: 'allowAnyCalls' },\n {\n type: 'tuple[]',\n name: 'allowedCalls',\n components: [\n { type: 'address', name: 'target' },\n {\n type: 'tuple[]',\n name: 'selectorRules',\n components: [\n { type: 'bytes4', name: 'selector' },\n { type: 'address[]', name: 'recipients' },\n ],\n },\n ],\n },\n ],\n },\n { type: 'bytes32', name: 'witness' },\n ],\n outputs: [],\n },\n {\n name: 'authorizeAdminKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'uint8', name: 'signatureType' },\n { type: 'bytes32', name: 'witness' },\n ],\n outputs: [],\n },\n {\n name: 'burnKeyAuthorizationWitness',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bytes32', name: 'witness' }],\n outputs: [],\n },\n {\n name: 'revokeKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'keyId' }],\n outputs: [],\n },\n {\n name: 'updateSpendingLimit',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'address', name: 'token' },\n { type: 'uint256', name: 'newLimit' },\n ],\n outputs: [],\n },\n {\n name: 'setAllowedCalls',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n {\n type: 'tuple[]',\n name: 'scopes',\n components: [\n { type: 'address', name: 'target' },\n {\n type: 'tuple[]',\n name: 'selectorRules',\n components: [\n { type: 'bytes4', name: 'selector' },\n { type: 'address[]', name: 'recipients' },\n ],\n },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'removeAllowedCalls',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'keyId' },\n { type: 'address', name: 'target' },\n ],\n outputs: [],\n },\n {\n name: 'getKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'address', name: 'keyId' },\n ],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'uint8', name: 'signatureType' },\n { type: 'address', name: 'keyId' },\n { type: 'uint64', name: 'expiry' },\n { type: 'bool', name: 'enforceLimits' },\n { type: 'bool', name: 'isRevoked' },\n ],\n },\n ],\n },\n {\n name: 'getRemainingLimit',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'address', name: 'keyId' },\n { type: 'address', name: 'token' },\n ],\n outputs: [{ type: 'uint256', name: 'remaining' }],\n },\n {\n name: 'getRemainingLimitWithPeriod',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'address', name: 'keyId' },\n { type: 'address', name: 'token' },\n ],\n outputs: [\n { type: 'uint256', name: 'remaining' },\n { type: 'uint64', name: 'periodEnd' },\n ],\n },\n {\n name: 'getAllowedCalls',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'address', name: 'keyId' },\n ],\n outputs: [\n { type: 'bool', name: 'isScoped' },\n {\n type: 'tuple[]',\n name: 'scopes',\n components: [\n { type: 'address', name: 'target' },\n {\n type: 'tuple[]',\n name: 'selectorRules',\n components: [\n { type: 'bytes4', name: 'selector' },\n { type: 'address[]', name: 'recipients' },\n ],\n },\n ],\n },\n ],\n },\n {\n name: 'isKeyAuthorizationWitnessBurned',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bytes32', name: 'witness' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'isAdminKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'address', name: 'keyId' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'getTransactionKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'KeyAuthorized',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'publicKey', indexed: true },\n { type: 'uint8', name: 'signatureType' },\n { type: 'uint64', name: 'expiry' },\n ],\n },\n {\n name: 'AdminKeyAuthorized',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'publicKey', indexed: true },\n ],\n },\n {\n name: 'KeyRevoked',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'publicKey', indexed: true },\n ],\n },\n {\n name: 'SpendingLimitUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'publicKey', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint256', name: 'newLimit' },\n ],\n },\n {\n name: 'AccessKeySpend',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'publicKey', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint256', name: 'amount' },\n { type: 'uint256', name: 'remainingLimit' },\n ],\n },\n {\n name: 'KeyAuthorizationWitness',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'bytes32', name: 'witness', indexed: true },\n ],\n },\n {\n name: 'KeyAuthorizationWitnessBurned',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'bytes32', name: 'witness', indexed: true },\n ],\n },\n { name: 'UnauthorizedCaller', type: 'error', inputs: [] },\n { name: 'KeyAlreadyExists', type: 'error', inputs: [] },\n { name: 'KeyNotFound', type: 'error', inputs: [] },\n { name: 'KeyExpired', type: 'error', inputs: [] },\n { name: 'SpendingLimitExceeded', type: 'error', inputs: [] },\n { name: 'InvalidSpendingLimit', type: 'error', inputs: [] },\n { name: 'InvalidSignatureType', type: 'error', inputs: [] },\n { name: 'ZeroPublicKey', type: 'error', inputs: [] },\n { name: 'ExpiryInPast', type: 'error', inputs: [] },\n { name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },\n {\n name: 'SignatureTypeMismatch',\n type: 'error',\n inputs: [\n { type: 'uint8', name: 'expected' },\n { type: 'uint8', name: 'actual' },\n ],\n },\n { name: 'CallNotAllowed', type: 'error', inputs: [] },\n { name: 'InvalidCallScope', type: 'error', inputs: [] },\n { name: 'InvalidKeyId', type: 'error', inputs: [] },\n { name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },\n { name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },\n {\n name: 'LegacyAuthorizeKeySelectorChanged',\n type: 'error',\n inputs: [{ type: 'bytes4', name: 'newSelector' }],\n },\n];\nexport const addressRegistry = [\n {\n name: 'registerVirtualMaster',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bytes32', name: 'salt' }],\n outputs: [{ type: 'bytes4', name: 'masterId' }],\n },\n {\n name: 'getMaster',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes4', name: 'masterId' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'resolveRecipient',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'to' }],\n outputs: [{ type: 'address', name: 'effectiveRecipient' }],\n },\n {\n name: 'resolveVirtualAddress',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'virtualAddr' }],\n outputs: [{ type: 'address', name: 'master' }],\n },\n {\n name: 'isVirtualAddress',\n type: 'function',\n stateMutability: 'pure',\n inputs: [{ type: 'address', name: 'addr' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'decodeVirtualAddress',\n type: 'function',\n stateMutability: 'pure',\n inputs: [{ type: 'address', name: 'addr' }],\n outputs: [\n { type: 'bool', name: 'isVirtual' },\n { type: 'bytes4', name: 'masterId' },\n { type: 'bytes6', name: 'userTag' },\n ],\n },\n {\n name: 'isImplicitlyApproved',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'addr' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'MasterRegistered',\n type: 'event',\n inputs: [\n { type: 'bytes4', name: 'masterId', indexed: true },\n { type: 'address', name: 'masterAddress', indexed: true },\n ],\n },\n {\n name: 'MasterIdCollision',\n type: 'error',\n inputs: [{ type: 'address', name: 'master' }],\n },\n { name: 'InvalidMasterAddress', type: 'error', inputs: [] },\n { name: 'ProofOfWorkFailed', type: 'error', inputs: [] },\n { name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },\n];\nexport const configurableAccount = [\n {\n name: 'deriveAccount',\n type: 'function',\n stateMutability: 'pure',\n inputs: [\n { type: 'bytes32', name: 'salt' },\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n outputs: [{ type: 'address', name: 'account' }],\n },\n {\n name: 'getConfigCommitment',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'bytes32', name: 'commitment' }],\n },\n {\n name: 'updateConfig',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'current',\n components: [\n { type: 'bytes32', name: 'salt' },\n { type: 'uint64', name: 'version' },\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n },\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'upgradeAccount',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n outputs: [{ type: 'bytes32', name: 'commitment' }],\n },\n {\n name: 'ConfigurableAccountConfigUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'bytes32', name: 'salt' },\n { type: 'uint64', name: 'version' },\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n },\n {\n name: 'AccountUpgraded',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'bytes32', name: 'commitment', indexed: true },\n { type: 'bytes32', name: 'salt' },\n { type: 'uint8', name: 'threshold' },\n {\n type: 'tuple[]',\n name: 'owners',\n components: [\n { type: 'address', name: 'owner' },\n { type: 'uint8', name: 'weight' },\n ],\n },\n ],\n },\n { name: 'InvalidAccount', type: 'error', inputs: [] },\n { name: 'InvalidConfig', type: 'error', inputs: [] },\n { name: 'InvalidThreshold', type: 'error', inputs: [] },\n { name: 'InvalidConfigurableAccountOwner', type: 'error', inputs: [] },\n { name: 'InvalidWeight', type: 'error', inputs: [] },\n { name: 'TooManyOwners', type: 'error', inputs: [] },\n { name: 'DuplicateOwner', type: 'error', inputs: [] },\n { name: 'InvalidOwnerOrder', type: 'error', inputs: [] },\n { name: 'UnauthorizedConfigurableAccountCaller', type: 'error', inputs: [] },\n { name: 'PrimitiveRootRequired', type: 'error', inputs: [] },\n { name: 'UpgradeMustBeOnlyCall', type: 'error', inputs: [] },\n { name: 'AccountAlreadyConfigurable', type: 'error', inputs: [] },\n { name: 'AccountHasCode', type: 'error', inputs: [] },\n];\nexport const currentCommittee = [\n {\n name: 'getCommitteeMembers',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n { type: 'uint64', name: 'epoch' },\n { type: 'bytes32[]', name: 'publicKeys' },\n ],\n },\n {\n name: 'setCommitteeMembers',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'epoch' },\n { type: 'bytes32[]', name: 'publicKeys' },\n ],\n outputs: [],\n },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n];\nexport const nonce = [\n {\n name: 'getNonce',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'uint256', name: 'nonceKey' },\n ],\n outputs: [{ type: 'uint64', name: 'nonce' }],\n },\n {\n name: 'NonceIncremented',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'uint256', name: 'nonceKey', indexed: true },\n { type: 'uint64', name: 'newNonce' },\n ],\n },\n { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },\n { name: 'InvalidNonceKey', type: 'error', inputs: [] },\n { name: 'NonceOverflow', type: 'error', inputs: [] },\n { name: 'ExpiringNonceReplay', type: 'error', inputs: [] },\n { name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },\n { name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },\n];\nexport const receivePolicyGuard = [\n {\n name: 'balanceOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes', name: 'receipt' }],\n outputs: [{ type: 'uint256', name: 'amount' }],\n },\n {\n name: 'claim',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'bytes', name: 'receipt' },\n ],\n outputs: [],\n },\n {\n name: 'burnBlockedReceipt',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bytes', name: 'receipt' }],\n outputs: [],\n },\n {\n name: 'TransferBlocked',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'address', name: 'receiver', indexed: true },\n { type: 'uint64', name: 'blockedNonce', indexed: true },\n { type: 'uint256', name: 'amount' },\n { type: 'uint8', name: 'receiptVersion' },\n { type: 'bytes', name: 'receipt' },\n ],\n },\n {\n name: 'ReceiptClaimed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'address', name: 'receiver', indexed: true },\n { type: 'uint64', name: 'blockedNonce', indexed: true },\n { type: 'uint64', name: 'blockedAt' },\n { type: 'uint8', name: 'receiptVersion' },\n { type: 'address', name: 'originator' },\n { type: 'address', name: 'recipient' },\n { type: 'address', name: 'recoveryAuthority' },\n { type: 'address', name: 'caller' },\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'ReceiptBurned',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'address', name: 'receiver', indexed: true },\n { type: 'uint64', name: 'blockedNonce', indexed: true },\n { type: 'uint64', name: 'blockedAt' },\n { type: 'uint8', name: 'receiptVersion' },\n { type: 'address', name: 'originator' },\n { type: 'address', name: 'recipient' },\n { type: 'address', name: 'recoveryAuthority' },\n { type: 'address', name: 'caller' },\n { type: 'uint256', name: 'amount' },\n ],\n },\n { name: 'InvalidReceipt', type: 'error', inputs: [] },\n { name: 'InvalidClaimAddress', type: 'error', inputs: [] },\n { name: 'UnauthorizedClaimer', type: 'error', inputs: [] },\n { name: 'AddressReserved', type: 'error', inputs: [] },\n];\nexport const signatureVerifier = [\n {\n name: 'recover',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'bytes32', name: 'hash' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'address', name: 'signer' }],\n },\n {\n name: 'verify',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'signer' },\n { type: 'bytes32', name: 'hash' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'verifyKeychain',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bytes32', name: 'hash' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'verifyKeychainAdmin',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bytes32', name: 'hash' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'verifyConfigurableAccount',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bytes32', name: 'hash' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'bool' }],\n },\n { name: 'InvalidFormat', type: 'error', inputs: [] },\n { name: 'InvalidSignature', type: 'error', inputs: [] },\n];\nexport const stablecoinDex = [\n {\n name: 'createPair',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'base' }],\n outputs: [{ type: 'bytes32', name: 'key' }],\n },\n {\n name: 'place',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'bool', name: 'isBid' },\n { type: 'int16', name: 'tick' },\n ],\n outputs: [{ type: 'uint128', name: 'orderId' }],\n },\n {\n name: 'placeFlip',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'bool', name: 'isBid' },\n { type: 'int16', name: 'tick' },\n { type: 'int16', name: 'flipTick' },\n ],\n outputs: [{ type: 'uint128', name: 'orderId' }],\n },\n {\n name: 'cancel',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint128', name: 'orderId' }],\n outputs: [],\n },\n {\n name: 'cancelStaleOrder',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint128', name: 'orderId' }],\n outputs: [],\n },\n {\n name: 'swapExactAmountIn',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'tokenIn' },\n { type: 'address', name: 'tokenOut' },\n { type: 'uint128', name: 'amountIn' },\n { type: 'uint128', name: 'minAmountOut' },\n ],\n outputs: [{ type: 'uint128', name: 'amountOut' }],\n },\n {\n name: 'swapExactAmountOut',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'tokenIn' },\n { type: 'address', name: 'tokenOut' },\n { type: 'uint128', name: 'amountOut' },\n { type: 'uint128', name: 'maxAmountIn' },\n ],\n outputs: [{ type: 'uint128', name: 'amountIn' }],\n },\n {\n name: 'quoteSwapExactAmountIn',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'tokenIn' },\n { type: 'address', name: 'tokenOut' },\n { type: 'uint128', name: 'amountIn' },\n ],\n outputs: [{ type: 'uint128', name: 'amountOut' }],\n },\n {\n name: 'quoteSwapExactAmountOut',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'tokenIn' },\n { type: 'address', name: 'tokenOut' },\n { type: 'uint128', name: 'amountOut' },\n ],\n outputs: [{ type: 'uint128', name: 'amountIn' }],\n },\n {\n name: 'balanceOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'user' },\n { type: 'address', name: 'token' },\n ],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'withdraw',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n ],\n outputs: [],\n },\n {\n name: 'getOrder',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint128', name: 'orderId' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'uint128', name: 'orderId' },\n { type: 'address', name: 'maker' },\n { type: 'bytes32', name: 'bookKey' },\n { type: 'bool', name: 'isBid' },\n { type: 'int16', name: 'tick' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint128', name: 'remaining' },\n { type: 'uint128', name: 'prev' },\n { type: 'uint128', name: 'next' },\n { type: 'bool', name: 'isFlip' },\n { type: 'int16', name: 'flipTick' },\n ],\n },\n ],\n },\n {\n name: 'getTickLevel',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'base' },\n { type: 'int16', name: 'tick' },\n { type: 'bool', name: 'isBid' },\n ],\n outputs: [\n { type: 'uint128', name: 'head' },\n { type: 'uint128', name: 'tail' },\n { type: 'uint128', name: 'totalLiquidity' },\n ],\n },\n {\n name: 'pairKey',\n type: 'function',\n stateMutability: 'pure',\n inputs: [\n { type: 'address', name: 'tokenA' },\n { type: 'address', name: 'tokenB' },\n ],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'nextOrderId',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'books',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'pairKey' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'address', name: 'base' },\n { type: 'address', name: 'quote' },\n { type: 'int16', name: 'bestBidTick' },\n { type: 'int16', name: 'bestAskTick' },\n ],\n },\n ],\n },\n {\n name: 'bookIndexForKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'bookKey' }],\n outputs: [\n { type: 'bool', name: 'set' },\n { type: 'uint32', name: 'index' },\n ],\n },\n {\n name: 'bookKeyForIndex',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint32', name: 'index' }],\n outputs: [{ type: 'bytes32', name: 'bookKey' }],\n },\n {\n name: 'setBookIndex',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint32', name: 'index' }],\n outputs: [],\n },\n {\n name: 'storageCredits',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user' }],\n outputs: [{ type: 'uint64', name: 'credits' }],\n },\n {\n name: 'MIN_TICK',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'int16' }],\n },\n {\n name: 'MAX_TICK',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'int16' }],\n },\n {\n name: 'TICK_SPACING',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'int16' }],\n },\n {\n name: 'PRICE_SCALE',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'MIN_ORDER_AMOUNT',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'MIN_PRICE',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'MAX_PRICE',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'tickToPrice',\n type: 'function',\n stateMutability: 'pure',\n inputs: [{ type: 'int16', name: 'tick' }],\n outputs: [{ type: 'uint32', name: 'price' }],\n },\n {\n name: 'priceToTick',\n type: 'function',\n stateMutability: 'pure',\n inputs: [{ type: 'uint32', name: 'price' }],\n outputs: [{ type: 'int16', name: 'tick' }],\n },\n {\n name: 'PairCreated',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'key', indexed: true },\n { type: 'address', name: 'base', indexed: true },\n { type: 'address', name: 'quote', indexed: true },\n ],\n },\n {\n name: 'OrderPlaced',\n type: 'event',\n inputs: [\n { type: 'uint128', name: 'orderId', indexed: true },\n { type: 'address', name: 'maker', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint128', name: 'amount' },\n { type: 'bool', name: 'isBid' },\n { type: 'int16', name: 'tick' },\n { type: 'bool', name: 'isFlipOrder' },\n { type: 'int16', name: 'flipTick' },\n ],\n },\n {\n name: 'OrderFilled',\n type: 'event',\n inputs: [\n { type: 'uint128', name: 'orderId', indexed: true },\n { type: 'address', name: 'maker', indexed: true },\n { type: 'address', name: 'taker', indexed: true },\n { type: 'uint128', name: 'amountFilled' },\n { type: 'bool', name: 'partialFill' },\n ],\n },\n {\n name: 'OrderFlipped',\n type: 'event',\n inputs: [\n { type: 'uint128', name: 'orderId', indexed: true },\n { type: 'address', name: 'maker', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint128', name: 'amount' },\n { type: 'bool', name: 'isBid' },\n { type: 'int16', name: 'tick' },\n { type: 'int16', name: 'flipTick' },\n ],\n },\n {\n name: 'FlipFailed',\n type: 'event',\n inputs: [\n { type: 'uint128', name: 'orderId', indexed: true },\n { type: 'address', name: 'maker', indexed: true },\n { type: 'bytes4', name: 'reason' },\n ],\n },\n {\n name: 'OrderCancelled',\n type: 'event',\n inputs: [{ type: 'uint128', name: 'orderId', indexed: true }],\n },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'PairDoesNotExist', type: 'error', inputs: [] },\n { name: 'PairAlreadyExists', type: 'error', inputs: [] },\n { name: 'OrderDoesNotExist', type: 'error', inputs: [] },\n { name: 'IdenticalTokens', type: 'error', inputs: [] },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n {\n name: 'TickOutOfBounds',\n type: 'error',\n inputs: [{ type: 'int16', name: 'tick' }],\n },\n { name: 'InvalidTick', type: 'error', inputs: [] },\n { name: 'InvalidFlipTick', type: 'error', inputs: [] },\n { name: 'InsufficientBalance', type: 'error', inputs: [] },\n { name: 'InsufficientLiquidity', type: 'error', inputs: [] },\n { name: 'InsufficientOutput', type: 'error', inputs: [] },\n { name: 'MaxInputExceeded', type: 'error', inputs: [] },\n {\n name: 'BelowMinimumOrderSize',\n type: 'error',\n inputs: [{ type: 'uint128', name: 'amount' }],\n },\n { name: 'InvalidBaseToken', type: 'error', inputs: [] },\n { name: 'OrderNotStale', type: 'error', inputs: [] },\n { name: 'IndexAlreadySet', type: 'error', inputs: [] },\n];\nexport const storageCredits = [\n {\n name: 'balanceOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'modeOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'uint8' }],\n },\n {\n name: 'budgetOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'setMode',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint8', name: 'newMode' }],\n outputs: [],\n },\n {\n name: 'setBudget',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'credits' }],\n outputs: [],\n },\n { name: 'InvalidMode', type: 'error', inputs: [] },\n { name: 'OnlyDirectCall', type: 'error', inputs: [] },\n];\nexport const feeManager = [\n {\n name: 'userTokens',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'user' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'validatorTokens',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'validator' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'setUserToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [],\n },\n {\n name: 'setValidatorToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [],\n },\n {\n name: 'distributeFees',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'validator' },\n { type: 'address', name: 'token' },\n ],\n outputs: [],\n },\n {\n name: 'collectedFees',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'validator' },\n { type: 'address', name: 'token' },\n ],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'UserTokenSet',\n type: 'event',\n inputs: [\n { type: 'address', name: 'user', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n ],\n },\n {\n name: 'ValidatorTokenSet',\n type: 'event',\n inputs: [\n { type: 'address', name: 'validator', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n ],\n },\n {\n name: 'FeesDistributed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'validator', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },\n { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },\n];\nexport const feeAmm = [\n {\n name: 'M',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'N',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'SCALE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'MIN_LIQUIDITY',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'getPoolId',\n type: 'function',\n stateMutability: 'pure',\n inputs: [\n { type: 'address', name: 'userToken' },\n { type: 'address', name: 'validatorToken' },\n ],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'getPool',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'userToken' },\n { type: 'address', name: 'validatorToken' },\n ],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'uint128', name: 'reserveUserToken' },\n { type: 'uint128', name: 'reserveValidatorToken' },\n ],\n },\n ],\n },\n {\n name: 'pools',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'poolId' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'uint128', name: 'reserveUserToken' },\n { type: 'uint128', name: 'reserveValidatorToken' },\n ],\n },\n ],\n },\n {\n name: 'mint',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'userToken' },\n { type: 'address', name: 'validatorToken' },\n { type: 'uint256', name: 'amountValidatorToken' },\n { type: 'address', name: 'to' },\n ],\n outputs: [{ type: 'uint256', name: 'liquidity' }],\n },\n {\n name: 'burn',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'userToken' },\n { type: 'address', name: 'validatorToken' },\n { type: 'uint256', name: 'liquidity' },\n { type: 'address', name: 'to' },\n ],\n outputs: [\n { type: 'uint256', name: 'amountUserToken' },\n { type: 'uint256', name: 'amountValidatorToken' },\n ],\n },\n {\n name: 'totalSupply',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'poolId' }],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'liquidityBalances',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'bytes32', name: 'poolId' },\n { type: 'address', name: 'user' },\n ],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'rebalanceSwap',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'userToken' },\n { type: 'address', name: 'validatorToken' },\n { type: 'uint256', name: 'amountOut' },\n { type: 'address', name: 'to' },\n ],\n outputs: [{ type: 'uint256', name: 'amountIn' }],\n },\n {\n name: 'Mint',\n type: 'event',\n inputs: [\n { type: 'address', name: 'sender' },\n { type: 'address', name: 'to', indexed: true },\n { type: 'address', name: 'userToken', indexed: true },\n { type: 'address', name: 'validatorToken', indexed: true },\n { type: 'uint256', name: 'amountValidatorToken' },\n { type: 'uint256', name: 'liquidity' },\n ],\n },\n {\n name: 'Burn',\n type: 'event',\n inputs: [\n { type: 'address', name: 'sender', indexed: true },\n { type: 'address', name: 'userToken', indexed: true },\n { type: 'address', name: 'validatorToken', indexed: true },\n { type: 'uint256', name: 'amountUserToken' },\n { type: 'uint256', name: 'amountValidatorToken' },\n { type: 'uint256', name: 'liquidity' },\n { type: 'address', name: 'to' },\n ],\n },\n {\n name: 'RebalanceSwap',\n type: 'event',\n inputs: [\n { type: 'address', name: 'userToken', indexed: true },\n { type: 'address', name: 'validatorToken', indexed: true },\n { type: 'address', name: 'swapper', indexed: true },\n { type: 'uint256', name: 'amountIn' },\n { type: 'uint256', name: 'amountOut' },\n ],\n },\n { name: 'IdenticalAddresses', type: 'error', inputs: [] },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n { name: 'InsufficientLiquidity', type: 'error', inputs: [] },\n { name: 'InsufficientReserves', type: 'error', inputs: [] },\n { name: 'InvalidAmount', type: 'error', inputs: [] },\n { name: 'DivisionByZero', type: 'error', inputs: [] },\n { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },\n];\nexport const tip20ChannelReserve = [\n {\n name: 'CLOSE_GRACE_PERIOD',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'VOUCHER_TYPEHASH',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'open',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'uint96', name: 'deposit' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n ],\n outputs: [{ type: 'bytes32', name: 'channelId' }],\n },\n {\n name: 'settle',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n { type: 'uint96', name: 'cumulativeAmount' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [],\n },\n {\n name: 'topUp',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n { type: 'uint96', name: 'additionalDeposit' },\n ],\n outputs: [],\n },\n {\n name: 'close',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n { type: 'uint96', name: 'cumulativeAmount' },\n { type: 'uint96', name: 'captureAmount' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [],\n },\n {\n name: 'requestClose',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'withdraw',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'getChannel',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n ],\n outputs: [\n {\n type: 'tuple',\n components: [\n {\n type: 'tuple',\n name: 'descriptor',\n components: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n },\n {\n type: 'tuple',\n name: 'state',\n components: [\n { type: 'uint96', name: 'settled' },\n { type: 'uint96', name: 'deposit' },\n { type: 'uint32', name: 'closeRequestedAt' },\n ],\n },\n ],\n },\n ],\n },\n {\n name: 'getChannelState',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'channelId' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'uint96', name: 'settled' },\n { type: 'uint96', name: 'deposit' },\n { type: 'uint32', name: 'closeRequestedAt' },\n ],\n },\n ],\n },\n {\n name: 'getChannelStatesBatch',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32[]', name: 'channelIds' }],\n outputs: [\n {\n type: 'tuple[]',\n components: [\n { type: 'uint96', name: 'settled' },\n { type: 'uint96', name: 'deposit' },\n { type: 'uint32', name: 'closeRequestedAt' },\n ],\n },\n ],\n },\n {\n name: 'computeChannelId',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'payer' },\n { type: 'address', name: 'payee' },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'salt' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n ],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'getVoucherDigest',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'bytes32', name: 'channelId' },\n { type: 'uint96', name: 'cumulativeAmount' },\n ],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'domainSeparator',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'storageCredits',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'payer' }],\n outputs: [{ type: 'uint64', name: 'credits' }],\n },\n {\n name: 'ChannelOpened',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n { type: 'address', name: 'operator' },\n { type: 'address', name: 'token' },\n { type: 'address', name: 'authorizedSigner' },\n { type: 'bytes32', name: 'salt' },\n { type: 'bytes32', name: 'expiringNonceHash' },\n { type: 'uint96', name: 'deposit' },\n ],\n },\n {\n name: 'Settled',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n { type: 'uint96', name: 'cumulativeAmount' },\n { type: 'uint96', name: 'deltaPaid' },\n { type: 'uint96', name: 'newSettled' },\n ],\n },\n {\n name: 'TopUp',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n { type: 'uint96', name: 'additionalDeposit' },\n { type: 'uint96', name: 'newDeposit' },\n ],\n },\n {\n name: 'CloseRequested',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n { type: 'uint256', name: 'closeGraceEnd' },\n ],\n },\n {\n name: 'ChannelClosed',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n { type: 'uint96', name: 'settledToPayee' },\n { type: 'uint96', name: 'refundedToPayer' },\n ],\n },\n {\n name: 'CloseRequestCancelled',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'channelId', indexed: true },\n { type: 'address', name: 'payer', indexed: true },\n { type: 'address', name: 'payee', indexed: true },\n ],\n },\n { name: 'ChannelAlreadyExists', type: 'error', inputs: [] },\n { name: 'ChannelNotFound', type: 'error', inputs: [] },\n { name: 'NotPayer', type: 'error', inputs: [] },\n { name: 'NotPayeeOrOperator', type: 'error', inputs: [] },\n { name: 'InvalidPayee', type: 'error', inputs: [] },\n { name: 'ZeroDeposit', type: 'error', inputs: [] },\n { name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },\n { name: 'InvalidSignature', type: 'error', inputs: [] },\n { name: 'AmountExceedsDeposit', type: 'error', inputs: [] },\n { name: 'AmountNotIncreasing', type: 'error', inputs: [] },\n { name: 'CaptureAmountInvalid', type: 'error', inputs: [] },\n { name: 'CloseNotReady', type: 'error', inputs: [] },\n { name: 'DepositOverflow', type: 'error', inputs: [] },\n {\n name: 'RootKeyRetired',\n type: 'error',\n inputs: [{ type: 'address', name: 'account' }],\n },\n];\nexport const tip20Factory = [\n {\n name: 'createToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n { type: 'address', name: 'quoteToken' },\n { type: 'address', name: 'admin' },\n { type: 'bytes32', name: 'salt' },\n ],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'createToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n { type: 'address', name: 'quoteToken' },\n { type: 'address', name: 'admin' },\n { type: 'bytes32', name: 'salt' },\n { type: 'string', name: 'logoURI' },\n ],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'isTIP20',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'getTokenAddress',\n type: 'function',\n stateMutability: 'pure',\n inputs: [\n { type: 'address', name: 'sender' },\n { type: 'bytes32', name: 'salt' },\n ],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'TokenCreated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n { type: 'address', name: 'quoteToken' },\n { type: 'address', name: 'admin' },\n { type: 'bytes32', name: 'salt' },\n ],\n },\n { name: 'AddressReserved', type: 'error', inputs: [] },\n { name: 'AddressNotReserved', type: 'error', inputs: [] },\n { name: 'InvalidQuoteToken', type: 'error', inputs: [] },\n {\n name: 'TokenAlreadyExists',\n type: 'error',\n inputs: [{ type: 'address', name: 'token' }],\n },\n];\nexport const tip20 = [\n {\n name: 'name',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'string' }],\n },\n {\n name: 'symbol',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'string' }],\n },\n {\n name: 'decimals',\n type: 'function',\n stateMutability: 'pure',\n inputs: [],\n outputs: [{ type: 'uint8' }],\n },\n {\n name: 'totalSupply',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'quoteToken',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'nextQuoteToken',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'balanceOf',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'transfer',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'approve',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'spender' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'allowance',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'owner' },\n { type: 'address', name: 'spender' },\n ],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'transferFrom',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'from' },\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'mint',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [],\n },\n {\n name: 'burn',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount' }],\n outputs: [],\n },\n {\n name: 'currency',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'string' }],\n },\n {\n name: 'supplyCap',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'paused',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'transferPolicyId',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'logoURI',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'string' }],\n },\n {\n name: 'setLogoURI',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'string', name: 'newLogoURI' }],\n outputs: [],\n },\n {\n name: 'burnBlocked',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'from' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [],\n },\n {\n name: 'burnAt',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'from' },\n { type: 'uint256', name: 'amount' },\n ],\n outputs: [],\n },\n {\n name: 'mintWithMemo',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n ],\n outputs: [],\n },\n {\n name: 'burnWithMemo',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint256', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n ],\n outputs: [],\n },\n {\n name: 'transferWithMemo',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n ],\n outputs: [],\n },\n {\n name: 'transferFromWithMemo',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'from' },\n { type: 'address', name: 'to' },\n { type: 'uint256', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'changeTransferPolicyId',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'newPolicyId' }],\n outputs: [],\n },\n {\n name: 'setSupplyCap',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'newSupplyCap' }],\n outputs: [],\n },\n {\n name: 'pause',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'unpause',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'setNextQuoteToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'newQuoteToken' }],\n outputs: [],\n },\n {\n name: 'completeQuoteTokenUpdate',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'PAUSE_ROLE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'UNPAUSE_ROLE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'ISSUER_ROLE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'BURN_BLOCKED_ROLE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'BURN_AT_ROLE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'permit',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'owner' },\n { type: 'address', name: 'spender' },\n { type: 'uint256', name: 'value' },\n { type: 'uint256', name: 'deadline' },\n { type: 'uint8', name: 'v' },\n { type: 'bytes32', name: 'r' },\n { type: 'bytes32', name: 's' },\n ],\n outputs: [],\n },\n {\n name: 'nonces',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'owner' }],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'DOMAIN_SEPARATOR',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'distributeReward',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint256', name: 'amount' }],\n outputs: [],\n },\n {\n name: 'setRewardRecipient',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'recipient' }],\n outputs: [],\n },\n {\n name: 'claimRewards',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'optedInSupply',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'globalRewardPerToken',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'userRewardInfo',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'address', name: 'rewardRecipient' },\n { type: 'uint256', name: 'rewardPerToken' },\n { type: 'uint256', name: 'rewardBalance' },\n ],\n },\n ],\n },\n {\n name: 'getPendingRewards',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'Transfer',\n type: 'event',\n inputs: [\n { type: 'address', name: 'from', indexed: true },\n { type: 'address', name: 'to', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'Approval',\n type: 'event',\n inputs: [\n { type: 'address', name: 'owner', indexed: true },\n { type: 'address', name: 'spender', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'Mint',\n type: 'event',\n inputs: [\n { type: 'address', name: 'to', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'Burn',\n type: 'event',\n inputs: [\n { type: 'address', name: 'from', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'BurnBlocked',\n type: 'event',\n inputs: [\n { type: 'address', name: 'from', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'BurnAt',\n type: 'event',\n inputs: [\n { type: 'address', name: 'burner', indexed: true },\n { type: 'address', name: 'from', indexed: true },\n { type: 'uint256', name: 'amount', indexed: true },\n ],\n },\n {\n name: 'TransferWithMemo',\n type: 'event',\n inputs: [\n { type: 'address', name: 'from', indexed: true },\n { type: 'address', name: 'to', indexed: true },\n { type: 'uint256', name: 'amount' },\n { type: 'bytes32', name: 'memo', indexed: true },\n ],\n },\n {\n name: 'TransferPolicyUpdate',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'uint64', name: 'newPolicyId', indexed: true },\n ],\n },\n {\n name: 'SupplyCapUpdate',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'uint256', name: 'newSupplyCap', indexed: true },\n ],\n },\n {\n name: 'PauseStateUpdate',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'bool', name: 'isPaused' },\n ],\n },\n {\n name: 'NextQuoteTokenSet',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'address', name: 'nextQuoteToken', indexed: true },\n ],\n },\n {\n name: 'QuoteTokenUpdate',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'address', name: 'newQuoteToken', indexed: true },\n ],\n },\n {\n name: 'RewardDistributed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'funder', indexed: true },\n { type: 'uint256', name: 'amount' },\n ],\n },\n {\n name: 'RewardRecipientSet',\n type: 'event',\n inputs: [\n { type: 'address', name: 'holder', indexed: true },\n { type: 'address', name: 'recipient', indexed: true },\n ],\n },\n {\n name: 'LogoURIUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'updater', indexed: true },\n { type: 'string', name: 'newLogoURI' },\n ],\n },\n {\n name: 'InsufficientBalance',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'available' },\n { type: 'uint256', name: 'required' },\n { type: 'address', name: 'token' },\n ],\n },\n { name: 'InsufficientAllowance', type: 'error', inputs: [] },\n { name: 'SupplyCapExceeded', type: 'error', inputs: [] },\n { name: 'InvalidSupplyCap', type: 'error', inputs: [] },\n { name: 'InvalidPayload', type: 'error', inputs: [] },\n { name: 'PolicyForbids', type: 'error', inputs: [] },\n { name: 'InvalidRecipient', type: 'error', inputs: [] },\n { name: 'ContractPaused', type: 'error', inputs: [] },\n { name: 'InvalidCurrency', type: 'error', inputs: [] },\n { name: 'InvalidQuoteToken', type: 'error', inputs: [] },\n { name: 'InvalidAmount', type: 'error', inputs: [] },\n { name: 'NoOptedInSupply', type: 'error', inputs: [] },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'ProtectedAddress', type: 'error', inputs: [] },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n { name: 'Uninitialized', type: 'error', inputs: [] },\n { name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },\n { name: 'PermitExpired', type: 'error', inputs: [] },\n { name: 'InvalidSignature', type: 'error', inputs: [] },\n { name: 'LogoURITooLong', type: 'error', inputs: [] },\n { name: 'InvalidLogoURI', type: 'error', inputs: [] },\n {\n name: 'RootKeyRetired',\n type: 'error',\n inputs: [{ type: 'address', name: 'account' }],\n },\n {\n name: 'hasRole',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bytes32', name: 'role' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'getRoleAdmin',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'role' }],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'grantRole',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'bytes32', name: 'role' },\n { type: 'address', name: 'account' },\n ],\n outputs: [],\n },\n {\n name: 'revokeRole',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'bytes32', name: 'role' },\n { type: 'address', name: 'account' },\n ],\n outputs: [],\n },\n {\n name: 'renounceRole',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bytes32', name: 'role' }],\n outputs: [],\n },\n {\n name: 'setRoleAdmin',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'bytes32', name: 'role' },\n { type: 'bytes32', name: 'adminRole' },\n ],\n outputs: [],\n },\n {\n name: 'RoleMembershipUpdated',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'role', indexed: true },\n { type: 'address', name: 'account', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'bool', name: 'hasRole' },\n ],\n },\n {\n name: 'RoleAdminUpdated',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'role', indexed: true },\n { type: 'bytes32', name: 'newAdminRole', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n ],\n },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n];\nexport const tip403Registry = [\n {\n name: 'policyIdCounter',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'policyExists',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'policyId' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'tokenTransferPolicyId',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [\n { type: 'bool', name: 'isSet' },\n { type: 'uint64', name: 'policyId' },\n ],\n },\n {\n name: 'policyData',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'policyId' }],\n outputs: [\n { type: 'uint8', name: 'policyType' },\n { type: 'address', name: 'admin' },\n ],\n },\n {\n name: 'isAuthorized',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'user' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'isAuthorizedSender',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'user' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'isAuthorizedRecipient',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'user' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'isAuthorizedMintRecipient',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'user' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'compoundPolicyData',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'policyId' }],\n outputs: [\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint64', name: 'recipientPolicyId' },\n { type: 'uint64', name: 'mintRecipientPolicyId' },\n ],\n },\n {\n name: 'receivePolicy',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [\n { type: 'bool', name: 'hasReceivePolicy' },\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint8', name: 'senderPolicyType' },\n { type: 'uint64', name: 'tokenFilterId' },\n { type: 'uint8', name: 'tokenFilterType' },\n { type: 'address', name: 'recoveryAuthority' },\n ],\n },\n {\n name: 'validateReceivePolicy',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'address', name: 'sender' },\n { type: 'address', name: 'receiver' },\n ],\n outputs: [\n { type: 'bool', name: 'authorized' },\n { type: 'uint8', name: 'blockedReason' },\n ],\n },\n {\n name: 'createPolicy',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'admin' },\n { type: 'uint8', name: 'policyType' },\n ],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'createPolicyWithAccounts',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'admin' },\n { type: 'uint8', name: 'policyType' },\n { type: 'address[]', name: 'accounts' },\n ],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'setPolicyAdmin',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'admin' },\n ],\n outputs: [],\n },\n {\n name: 'modifyPolicyWhitelist',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'account' },\n { type: 'bool', name: 'allowed' },\n ],\n outputs: [],\n },\n {\n name: 'modifyPolicyBlacklist',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'policyId' },\n { type: 'address', name: 'account' },\n { type: 'bool', name: 'restricted' },\n ],\n outputs: [],\n },\n {\n name: 'createCompoundPolicy',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint64', name: 'recipientPolicyId' },\n { type: 'uint64', name: 'mintRecipientPolicyId' },\n ],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'setReceivePolicy',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint64', name: 'tokenFilterId' },\n { type: 'address', name: 'recoveryAuthority' },\n ],\n outputs: [],\n },\n {\n name: 'migrateTransferPolicyIds',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address[]', name: 'tokens' }],\n outputs: [{ type: 'uint256', name: 'migrated' }],\n },\n {\n name: 'PolicyAdminUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'policyId', indexed: true },\n { type: 'address', name: 'updater', indexed: true },\n { type: 'address', name: 'admin', indexed: true },\n ],\n },\n {\n name: 'PolicyCreated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'policyId', indexed: true },\n { type: 'address', name: 'updater', indexed: true },\n { type: 'uint8', name: 'policyType' },\n ],\n },\n {\n name: 'WhitelistUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'policyId', indexed: true },\n { type: 'address', name: 'updater', indexed: true },\n { type: 'address', name: 'account', indexed: true },\n { type: 'bool', name: 'allowed' },\n ],\n },\n {\n name: 'BlacklistUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'policyId', indexed: true },\n { type: 'address', name: 'updater', indexed: true },\n { type: 'address', name: 'account', indexed: true },\n { type: 'bool', name: 'restricted' },\n ],\n },\n {\n name: 'CompoundPolicyCreated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'policyId', indexed: true },\n { type: 'address', name: 'creator', indexed: true },\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint64', name: 'recipientPolicyId' },\n { type: 'uint64', name: 'mintRecipientPolicyId' },\n ],\n },\n {\n name: 'ReceivePolicyUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'uint64', name: 'senderPolicyId' },\n { type: 'uint64', name: 'tokenFilterId' },\n { type: 'address', name: 'recoveryAuthority' },\n ],\n },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'PolicyNotFound', type: 'error', inputs: [] },\n { name: 'PolicyNotSimple', type: 'error', inputs: [] },\n { name: 'InvalidPolicyType', type: 'error', inputs: [] },\n { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },\n { name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },\n { name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },\n { name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },\n];\nexport const validatorConfigV2 = [\n {\n name: 'getActiveValidators',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'tuple[]',\n name: 'validators',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n { type: 'uint64', name: 'index' },\n { type: 'uint64', name: 'addedAtHeight' },\n { type: 'uint64', name: 'deactivatedAtHeight' },\n ],\n },\n ],\n },\n {\n name: 'getInitializedAtHeight',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'owner',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'validatorCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'validatorByIndex',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'index' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n { type: 'uint64', name: 'index' },\n { type: 'uint64', name: 'addedAtHeight' },\n { type: 'uint64', name: 'deactivatedAtHeight' },\n ],\n },\n ],\n },\n {\n name: 'validatorByAddress',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'validatorAddress' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n { type: 'uint64', name: 'index' },\n { type: 'uint64', name: 'addedAtHeight' },\n { type: 'uint64', name: 'deactivatedAtHeight' },\n ],\n },\n ],\n },\n {\n name: 'validatorByPublicKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'bytes32', name: 'publicKey' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n { type: 'uint64', name: 'index' },\n { type: 'uint64', name: 'addedAtHeight' },\n { type: 'uint64', name: 'deactivatedAtHeight' },\n ],\n },\n ],\n },\n {\n name: 'getNextNetworkIdentityRotationEpoch',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'isInitialized',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'addValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'validatorAddress' },\n { type: 'bytes32', name: 'publicKey' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [{ type: 'uint64', name: 'index' }],\n },\n {\n name: 'deactivateValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'idx' }],\n outputs: [],\n },\n {\n name: 'rotateValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'idx' },\n { type: 'bytes32', name: 'publicKey' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'bytes', name: 'signature' },\n ],\n outputs: [],\n },\n {\n name: 'setFeeRecipient',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'idx' },\n { type: 'address', name: 'feeRecipient' },\n ],\n outputs: [],\n },\n {\n name: 'setIpAddresses',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'idx' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n ],\n outputs: [],\n },\n {\n name: 'transferValidatorOwnership',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'idx' },\n { type: 'address', name: 'newAddress' },\n ],\n outputs: [],\n },\n {\n name: 'transferOwnership',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'newOwner' }],\n outputs: [],\n },\n {\n name: 'setNetworkIdentityRotationEpoch',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'epoch' }],\n outputs: [],\n },\n {\n name: 'migrateValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'idx' }],\n outputs: [],\n },\n {\n name: 'initializeIfMigrated',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'ValidatorAdded',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'validatorAddress', indexed: true },\n { type: 'bytes32', name: 'publicKey' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'feeRecipient' },\n ],\n },\n {\n name: 'ValidatorDeactivated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'validatorAddress', indexed: true },\n ],\n },\n {\n name: 'ValidatorRotated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'uint64', name: 'deactivatedIndex', indexed: true },\n { type: 'address', name: 'validatorAddress', indexed: true },\n { type: 'bytes32', name: 'oldPublicKey' },\n { type: 'bytes32', name: 'newPublicKey' },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'caller' },\n ],\n },\n {\n name: 'FeeRecipientUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'feeRecipient' },\n { type: 'address', name: 'caller' },\n ],\n },\n {\n name: 'IpAddressesUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'string', name: 'ingress' },\n { type: 'string', name: 'egress' },\n { type: 'address', name: 'caller' },\n ],\n },\n {\n name: 'ValidatorOwnershipTransferred',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'oldAddress', indexed: true },\n { type: 'address', name: 'newAddress', indexed: true },\n { type: 'address', name: 'caller' },\n ],\n },\n {\n name: 'OwnershipTransferred',\n type: 'event',\n inputs: [\n { type: 'address', name: 'oldOwner', indexed: true },\n { type: 'address', name: 'newOwner', indexed: true },\n ],\n },\n {\n name: 'ValidatorMigrated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'validatorAddress', indexed: true },\n { type: 'bytes32', name: 'publicKey' },\n ],\n },\n {\n name: 'NetworkIdentityRotationEpochSet',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'previousEpoch', indexed: true },\n { type: 'uint64', name: 'nextEpoch', indexed: true },\n ],\n },\n {\n name: 'Initialized',\n type: 'event',\n inputs: [{ type: 'uint64', name: 'height' }],\n },\n {\n name: 'SkippedValidatorMigration',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'index', indexed: true },\n { type: 'address', name: 'validatorAddress', indexed: true },\n { type: 'bytes32', name: 'publicKey' },\n ],\n },\n { name: 'AlreadyInitialized', type: 'error', inputs: [] },\n {\n name: 'IngressAlreadyExists',\n type: 'error',\n inputs: [{ type: 'string', name: 'ingress' }],\n },\n { name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },\n { name: 'InvalidMigrationIndex', type: 'error', inputs: [] },\n { name: 'InvalidOwner', type: 'error', inputs: [] },\n { name: 'InvalidPublicKey', type: 'error', inputs: [] },\n { name: 'InvalidSignature', type: 'error', inputs: [] },\n { name: 'InvalidSignatureFormat', type: 'error', inputs: [] },\n { name: 'InvalidValidatorAddress', type: 'error', inputs: [] },\n { name: 'MigrationNotComplete', type: 'error', inputs: [] },\n { name: 'NotInitialized', type: 'error', inputs: [] },\n {\n name: 'NotIp',\n type: 'error',\n inputs: [\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n {\n name: 'NotIpPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n { name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },\n { name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },\n { name: 'ValidatorNotFound', type: 'error', inputs: [] },\n];\nexport const validatorConfig = [\n {\n name: 'getValidators',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'tuple[]',\n name: 'validators',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'bool', name: 'active' },\n { type: 'uint64', name: 'index' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'inboundAddress' },\n { type: 'string', name: 'outboundAddress' },\n ],\n },\n ],\n },\n {\n name: 'addValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'newValidatorAddress' },\n { type: 'bytes32', name: 'publicKey' },\n { type: 'bool', name: 'active' },\n { type: 'string', name: 'inboundAddress' },\n { type: 'string', name: 'outboundAddress' },\n ],\n outputs: [],\n },\n {\n name: 'updateValidator',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'newValidatorAddress' },\n { type: 'bytes32', name: 'publicKey' },\n { type: 'string', name: 'inboundAddress' },\n { type: 'string', name: 'outboundAddress' },\n ],\n outputs: [],\n },\n {\n name: 'changeValidatorStatus',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'validator' },\n { type: 'bool', name: 'active' },\n ],\n outputs: [],\n },\n {\n name: 'changeValidatorStatusByIndex',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'index' },\n { type: 'bool', name: 'active' },\n ],\n outputs: [],\n },\n {\n name: 'owner',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'changeOwner',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'newOwner' }],\n outputs: [],\n },\n {\n name: 'getNextFullDkgCeremony',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'setNextFullDkgCeremony',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'epoch' }],\n outputs: [],\n },\n {\n name: 'validatorsArray',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'index' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'validators',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'validator' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bytes32', name: 'publicKey' },\n { type: 'bool', name: 'active' },\n { type: 'uint64', name: 'index' },\n { type: 'address', name: 'validatorAddress' },\n { type: 'string', name: 'inboundAddress' },\n { type: 'string', name: 'outboundAddress' },\n ],\n },\n ],\n },\n {\n name: 'validatorCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },\n { name: 'ValidatorNotFound', type: 'error', inputs: [] },\n { name: 'InvalidPublicKey', type: 'error', inputs: [] },\n {\n name: 'NotHostPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'field' },\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n {\n name: 'NotIpPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'field' },\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n];\nexport const zoneFactory = [\n {\n name: 'owner',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'transferOwnership',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'newOwner' }],\n outputs: [],\n },\n {\n name: 'createZone',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'params',\n components: [\n { type: 'address', name: 'initialToken' },\n { type: 'bool', name: 'accessMode' },\n { type: 'bool', name: 'gatewayMode' },\n { type: 'address[]', name: 'allowedAccounts' },\n { type: 'address[]', name: 'zoneGateways' },\n { type: 'address', name: 'admin' },\n { type: 'address[]', name: 'sequencers' },\n { type: 'uint8', name: 'threshold' },\n { type: 'string', name: 'rpcUrl' },\n ],\n },\n ],\n outputs: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'address', name: 'portal' },\n ],\n },\n {\n name: 'nextZoneId',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'zones',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint32', name: 'id' }],\n outputs: [\n {\n type: 'tuple',\n name: 'info',\n components: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'address', name: 'portal' },\n { type: 'bool', name: 'accessMode' },\n { type: 'bool', name: 'gatewayMode' },\n { type: 'address', name: 'admin' },\n { type: 'address[]', name: 'sequencers' },\n { type: 'uint8', name: 'threshold' },\n { type: 'address', name: 'verifier' },\n { type: 'string', name: 'rpcUrl' },\n ],\n },\n ],\n },\n {\n name: 'isZonePortal',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'portal' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'OwnershipTransferred',\n type: 'event',\n inputs: [\n { type: 'address', name: 'previousOwner', indexed: true },\n { type: 'address', name: 'newOwner', indexed: true },\n ],\n },\n {\n name: 'ZoneCreated',\n type: 'event',\n inputs: [\n { type: 'uint32', name: 'zoneId', indexed: true },\n { type: 'address', name: 'portal', indexed: true },\n { type: 'address', name: 'initialToken' },\n { type: 'bool', name: 'accessMode' },\n { type: 'bool', name: 'gatewayMode' },\n { type: 'address', name: 'admin' },\n { type: 'address[]', name: 'sequencers' },\n { type: 'uint8', name: 'threshold' },\n { type: 'address', name: 'verifier' },\n ],\n },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n { name: 'TokenTransferPolicyNotSet', type: 'error', inputs: [] },\n { name: 'InvalidClosedLoopConfig', type: 'error', inputs: [] },\n { name: 'NotOwner', type: 'error', inputs: [] },\n { name: 'InvalidAdmin', type: 'error', inputs: [] },\n { name: 'InvalidSequencerSet', type: 'error', inputs: [] },\n { name: 'AlreadyInitialized', type: 'error', inputs: [] },\n { name: 'TokenMetadataTooLong', type: 'error', inputs: [] },\n { name: 'DuplicateAllowedAccount', type: 'error', inputs: [] },\n { name: 'DuplicateZoneGateway', type: 'error', inputs: [] },\n {\n name: 'ZoneCreated',\n type: 'event',\n inputs: [\n { type: 'uint32', name: 'zoneId', indexed: true },\n { type: 'address', name: 'portal', indexed: true },\n { type: 'address', name: 'messenger', indexed: true },\n { type: 'address', name: 'initialToken' },\n { type: 'address', name: 'admin' },\n { type: 'address', name: 'sequencer' },\n { type: 'address', name: 'verifier' },\n { type: 'bytes32', name: 'genesisBlockHash' },\n { type: 'bytes32', name: 'genesisTempoBlockHash' },\n { type: 'uint64', name: 'genesisTempoBlockNumber' },\n ],\n },\n {\n name: 'createZone',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple',\n name: 'params',\n components: [\n { type: 'address', name: 'initialToken' },\n { type: 'address', name: 'admin' },\n { type: 'address', name: 'sequencer' },\n { type: 'address', name: 'verifier' },\n {\n type: 'tuple',\n name: 'zoneParams',\n components: [\n { type: 'bytes32', name: 'genesisBlockHash' },\n { type: 'bytes32', name: 'genesisTempoBlockHash' },\n { type: 'uint64', name: 'genesisTempoBlockNumber' },\n ],\n },\n { type: 'string', name: 'rpcUrl' },\n ],\n },\n ],\n outputs: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'address', name: 'portal' },\n ],\n },\n {\n name: 'verifier',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n];\nexport const zonePortal = [\n {\n name: 'SequencerSetUpdated',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'nonce', indexed: true },\n { type: 'uint8', name: 'threshold' },\n { type: 'address[]', name: 'sequencers' },\n ],\n },\n {\n name: 'TokenEnabled',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n ],\n },\n {\n name: 'RoleUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'account', indexed: true },\n { type: 'uint8', name: 'prev' },\n { type: 'uint8', name: 'next' },\n ],\n },\n {\n name: 'EnforcementModesUpdated',\n type: 'event',\n inputs: [\n { type: 'bool', name: 'accessMode' },\n { type: 'bool', name: 'gatewayMode' },\n ],\n },\n {\n name: 'LeaderUpdated',\n type: 'event',\n inputs: [\n { type: 'address', name: 'previousLeader', indexed: true },\n { type: 'address', name: 'newLeader', indexed: true },\n { type: 'uint64', name: 'leaderEpoch', indexed: true },\n { type: 'uint64', name: 'leaderActivationTempoBlock' },\n ],\n },\n {\n name: 'zoneId',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'admin',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'messenger',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'isAccessEnforced',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'setAccessMode',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bool', name: 'enforced' }],\n outputs: [],\n },\n {\n name: 'isGatewayOpen',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'setGatewayMode',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bool', name: 'enforced' }],\n outputs: [],\n },\n {\n name: 'hasRole',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'uint8', name: 'role' },\n ],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'setAllowedAccount',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bool', name: 'allowed' },\n ],\n outputs: [],\n },\n {\n name: 'setGateway',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bool', name: 'allowed' },\n ],\n outputs: [],\n },\n {\n name: 'setPauseGuardian',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'account' },\n { type: 'bool', name: 'allowed' },\n ],\n outputs: [],\n },\n {\n name: 'setSequencerSet',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address[]', name: 'newSequencers' },\n { type: 'uint8', name: 'newThreshold' },\n ],\n outputs: [],\n },\n {\n name: 'verifier',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'sequencerSetVersion',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'sequencerThreshold',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint8' }],\n },\n {\n name: 'zoneHeight',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'isSequencer',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'account' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'sequencerCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'sequencerAt',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'index' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'leader',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'leaderEpoch',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'leaderActivationTempoBlock',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'setLeader',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'newLeader' },\n { type: 'uint64', name: 'expectedEpoch' },\n ],\n outputs: [],\n },\n {\n name: 'withdrawalBatchIndex',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'blockHash',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'currentDepositQueueHash',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'lastSyncedTempoBlockNumber',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'withdrawalQueueHead',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'withdrawalQueueTail',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'withdrawalQueueSlot',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'queueIndex' }],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'calculateDepositFee',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128', name: 'fee' }],\n },\n {\n name: 'calculateBouncebackFee',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128', name: 'fee' }],\n },\n {\n name: 'depositCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'lastProcessedDepositNumber',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'FIXED_DEPOSIT_GAS',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_GAS_FEE_RATE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'MAX_TOKENS_ENABLED_PER_TEMPO_BLOCK',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_TOKEN_METADATA_BYTES',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'areDepositsActive',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'tokenConfig',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bool', name: 'enabled' },\n { type: 'bool', name: 'depositsActive' },\n ],\n },\n ],\n },\n {\n name: 'initialize',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'address', name: 'initialToken' },\n { type: 'bool', name: 'accessMode' },\n { type: 'bool', name: 'gatewayMode' },\n { type: 'address[]', name: 'allowedAccounts' },\n { type: 'address[]', name: 'zoneGateways' },\n { type: 'address', name: 'admin' },\n { type: 'address', name: 'messenger' },\n { type: 'address[]', name: 'sequencers' },\n { type: 'uint8', name: 'threshold' },\n { type: 'address', name: 'verifier' },\n { type: 'string', name: 'rpcUrl' },\n ],\n outputs: [],\n },\n {\n name: 'deliverWithdrawal',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'to' },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'bytes', name: 'callbackData' },\n ],\n outputs: [],\n },\n {\n name: 'MAX_DEPOSITS_PER_TEMPO_BLOCK',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_UNPROCESSED_DEPOSITS',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_UNPROCESSED_TOKEN_ENABLEMENTS',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_WITHDRAWAL_GAS_LIMIT',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'paused',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'pauseExpiry',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'abdicationEffectiveAt',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint8', name: 'capability' }],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'processWithdrawals',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n {\n type: 'tuple[]',\n name: 'withdrawals',\n components: [\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'senderTag' },\n { type: 'address', name: 'to' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'uint64', name: 'fallbackNonce' },\n { type: 'bytes', name: 'callbackData' },\n { type: 'bytes', name: 'encryptedSender' },\n ],\n },\n { type: 'bytes32', name: 'remainingQueue' },\n ],\n outputs: [],\n },\n {\n name: 'pause',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'resume',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'abdicate',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint8', name: 'capability' }],\n outputs: [],\n },\n {\n name: 'submitBatch',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'tempoBlockNumber' },\n { type: 'uint64', name: 'recentTempoBlockNumber' },\n {\n type: 'tuple',\n name: 'blockTransition',\n components: [\n { type: 'bytes32', name: 'prevBlockHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n ],\n },\n {\n type: 'tuple',\n name: 'depositQueueTransition',\n components: [\n { type: 'bytes32', name: 'prevProcessedHash' },\n { type: 'bytes32', name: 'nextProcessedHash' },\n { type: 'uint64', name: 'prevDepositNumber' },\n { type: 'uint64', name: 'nextDepositNumber' },\n ],\n },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'bytes', name: 'verifierConfig' },\n { type: 'bytes', name: 'proof' },\n { type: 'uint256', name: 'nextZoneHeight' },\n { type: 'bytes[]', name: 'signatures' },\n ],\n outputs: [],\n },\n {\n name: 'submitBatch',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'tempoBlockNumber' },\n { type: 'uint64', name: 'recentTempoBlockNumber' },\n {\n type: 'tuple',\n name: 'blockTransition',\n components: [\n { type: 'bytes32', name: 'prevBlockHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n ],\n },\n {\n type: 'tuple',\n name: 'depositQueueTransition',\n components: [\n { type: 'bytes32', name: 'prevProcessedHash' },\n { type: 'bytes32', name: 'nextProcessedHash' },\n { type: 'uint64', name: 'prevDepositNumber' },\n { type: 'uint64', name: 'nextDepositNumber' },\n ],\n },\n {\n type: 'tuple',\n name: 'tokenEnablementTransition',\n components: [\n { type: 'uint64', name: 'prevProcessedTokenCount' },\n { type: 'uint64', name: 'nextProcessedTokenCount' },\n ],\n },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'bytes', name: 'verifierConfig' },\n { type: 'bytes', name: 'proof' },\n { type: 'uint256', name: 'nextZoneHeight' },\n { type: 'bytes[]', name: 'signatures' },\n ],\n outputs: [],\n },\n {\n name: 'enableToken',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [],\n },\n {\n name: 'pauseDeposits',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [],\n },\n {\n name: 'resumeDeposits',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [],\n },\n {\n name: 'setZoneGasRate',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint128', name: 'newZoneGasRate' }],\n outputs: [],\n },\n {\n name: 'setMaxTempoGasRate',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint128', name: 'newMaxTempoGasRate' }],\n outputs: [],\n },\n {\n name: 'setBouncebackGas',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'newBouncebackGas' }],\n outputs: [],\n },\n {\n name: 'transferAdmin',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'newAdmin' }],\n outputs: [],\n },\n {\n name: 'acceptAdmin',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [],\n outputs: [],\n },\n {\n name: 'rpcUrl',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'string' }],\n },\n {\n name: 'setRpcUrl',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'string', name: 'rpcUrl' }],\n outputs: [],\n },\n {\n name: 'deposit',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint256', name: 'keyIndex' },\n {\n type: 'tuple',\n name: 'encrypted',\n components: [\n { type: 'bytes32', name: 'ephemeralPubkeyX' },\n { type: 'uint8', name: 'ephemeralPubkeyYParity' },\n { type: 'bytes', name: 'ciphertext' },\n { type: 'bytes12', name: 'nonce' },\n { type: 'bytes16', name: 'tag' },\n ],\n },\n { type: 'address', name: 'tempoRefundRecipient' },\n ],\n outputs: [{ type: 'bytes32', name: 'newCurrentDepositQueueHash' }],\n },\n {\n name: 'depositEncrypted',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint256', name: 'keyIndex' },\n {\n type: 'tuple',\n name: 'encrypted',\n components: [\n { type: 'bytes32', name: 'ephemeralPubkeyX' },\n { type: 'uint8', name: 'ephemeralPubkeyYParity' },\n { type: 'bytes', name: 'ciphertext' },\n { type: 'bytes12', name: 'nonce' },\n { type: 'bytes16', name: 'tag' },\n ],\n },\n { type: 'address', name: 'tempoRefundRecipient' },\n ],\n outputs: [{ type: 'bytes32', name: 'newCurrentDepositQueueHash' }],\n },\n {\n name: 'setSequencerEncryptionKey',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'bytes32', name: 'x' },\n { type: 'uint8', name: 'yParity' },\n { type: 'uint8', name: 'popV' },\n { type: 'bytes32', name: 'popR' },\n { type: 'bytes32', name: 'popS' },\n ],\n outputs: [],\n },\n {\n name: 'isTokenEnabled',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'enabledTokenCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'lastProcessedEnabledTokenCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'tokenEnablementCursorInitialized',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bool' }],\n },\n {\n name: 'enabledTokenAt',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'index' }],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'tokenEnablementHash',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'zoneGasRate',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'maxTempoGasRate',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'bouncebackGas',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'pendingAdmin',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'refunds',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'address', name: 'owner' },\n ],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'sequencerEncryptionKey',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n { type: 'bytes32', name: 'x' },\n { type: 'uint8', name: 'yParity' },\n { type: 'address', name: 'pubkey' },\n ],\n },\n {\n name: 'encryptionKeyCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'encryptionKeyAt',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'index' }],\n outputs: [\n {\n type: 'tuple',\n name: 'entry',\n components: [\n { type: 'bytes32', name: 'x' },\n { type: 'uint8', name: 'yParity' },\n { type: 'uint64', name: 'activationBlock' },\n ],\n },\n ],\n },\n {\n name: 'isEncryptionKeyValid',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint256', name: 'keyIndex' }],\n outputs: [\n { type: 'bool', name: 'valid' },\n { type: 'uint64', name: 'expiresAtBlock' },\n ],\n },\n {\n name: 'encryptionKeyAtBlock',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'tempoBlockNumber' }],\n outputs: [\n { type: 'bytes32', name: 'x' },\n { type: 'uint8', name: 'yParity' },\n { type: 'uint256', name: 'keyIndex' },\n ],\n },\n {\n name: 'claimRefund',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [{ type: 'uint128', name: 'amount' }],\n },\n {\n name: 'DepositMade',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'newCurrentDepositQueueHash', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'netAmount' },\n { type: 'uint128', name: 'fee' },\n { type: 'uint256', name: 'keyIndex' },\n { type: 'bytes32', name: 'ephemeralPubkeyX' },\n { type: 'uint8', name: 'ephemeralPubkeyYParity' },\n { type: 'bytes', name: 'ciphertext' },\n { type: 'bytes12', name: 'nonce' },\n { type: 'bytes16', name: 'tag' },\n { type: 'address', name: 'tempoRefundRecipient' },\n { type: 'uint64', name: 'depositNumber' },\n ],\n },\n {\n name: 'DepositsPaused',\n type: 'event',\n inputs: [{ type: 'address', name: 'token', indexed: true }],\n },\n {\n name: 'DepositsResumed',\n type: 'event',\n inputs: [{ type: 'address', name: 'token', indexed: true }],\n },\n {\n name: 'PortalPaused',\n type: 'event',\n inputs: [{ type: 'address', name: 'account', indexed: true }],\n },\n {\n name: 'PortalResumed',\n type: 'event',\n inputs: [{ type: 'address', name: 'account', indexed: true }],\n },\n {\n name: 'AbdicationScheduled',\n type: 'event',\n inputs: [\n { type: 'uint8', name: 'capability', indexed: true },\n { type: 'uint64', name: 'effectiveAt' },\n ],\n },\n {\n name: 'RpcUrlUpdated',\n type: 'event',\n inputs: [{ type: 'string', name: 'rpcUrl' }],\n },\n {\n name: 'SequencerEncryptionKeyUpdated',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'x' },\n { type: 'uint8', name: 'yParity' },\n { type: 'address', name: 'pubkey' },\n { type: 'uint256', name: 'keyIndex' },\n { type: 'uint64', name: 'activationBlock' },\n ],\n },\n {\n name: 'BatchSubmitted',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'withdrawalBatchIndex', indexed: true },\n { type: 'uint256', name: 'withdrawalQueueIndex', indexed: true },\n { type: 'bytes32', name: 'nextProcessedDepositQueueHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'uint64', name: 'lastProcessedDepositNumber' },\n ],\n },\n {\n name: 'BatchSubmitted',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'withdrawalBatchIndex', indexed: true },\n { type: 'uint256', name: 'withdrawalQueueIndex', indexed: true },\n { type: 'bytes32', name: 'nextProcessedDepositQueueHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'uint64', name: 'lastProcessedDepositNumber' },\n { type: 'uint64', name: 'lastProcessedEnabledTokenCount' },\n ],\n },\n {\n name: 'WithdrawalProcessed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'to', indexed: true },\n { type: 'bytes32', name: 'senderTag', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'bool', name: 'callbackSuccess' },\n ],\n },\n {\n name: 'WithdrawalBounceBack',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'newCurrentDepositQueueHash', indexed: true },\n { type: 'uint64', name: 'fallbackNonce', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint64', name: 'depositNumber' },\n ],\n },\n {\n name: 'DepositBounceBack',\n type: 'event',\n inputs: [\n { type: 'address', name: 'tempoRefundRecipient', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint128', name: 'bouncebackFee' },\n ],\n },\n {\n name: 'DepositBounceBackPending',\n type: 'event',\n inputs: [\n { type: 'address', name: 'tempoRefundRecipient', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint128', name: 'bouncebackFee' },\n ],\n },\n {\n name: 'RefundClaimed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'recipient', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint128', name: 'amount' },\n ],\n },\n {\n name: 'ZoneGasRateUpdated',\n type: 'event',\n inputs: [{ type: 'uint128', name: 'zoneGasRate' }],\n },\n {\n name: 'MaxTempoGasRateUpdated',\n type: 'event',\n inputs: [{ type: 'uint128', name: 'maxTempoGasRate' }],\n },\n {\n name: 'BouncebackGasUpdated',\n type: 'event',\n inputs: [{ type: 'uint64', name: 'bouncebackGas' }],\n },\n {\n name: 'AdminTransferStarted',\n type: 'event',\n inputs: [\n { type: 'address', name: 'currentAdmin', indexed: true },\n { type: 'address', name: 'pendingAdmin', indexed: true },\n ],\n },\n {\n name: 'AdminTransferred',\n type: 'event',\n inputs: [\n { type: 'address', name: 'previousAdmin', indexed: true },\n { type: 'address', name: 'newAdmin', indexed: true },\n ],\n },\n { name: 'NotSequencer', type: 'error', inputs: [] },\n { name: 'NotAdmin', type: 'error', inputs: [] },\n { name: 'NotPauseAuthority', type: 'error', inputs: [] },\n {\n name: 'CapabilityAbdicated',\n type: 'error',\n inputs: [{ type: 'uint8', name: 'capability' }],\n },\n {\n name: 'AbdicationAlreadyScheduled',\n type: 'error',\n inputs: [{ type: 'uint8', name: 'capability' }],\n },\n { name: 'PortalIsPaused', type: 'error', inputs: [] },\n { name: 'NotPendingAdmin', type: 'error', inputs: [] },\n { name: 'InvalidProof', type: 'error', inputs: [] },\n { name: 'InvalidTempoBlockNumber', type: 'error', inputs: [] },\n { name: 'NotFactory', type: 'error', inputs: [] },\n { name: 'NotSelf', type: 'error', inputs: [] },\n { name: 'AlreadyInitialized', type: 'error', inputs: [] },\n { name: 'MustDelegateCall', type: 'error', inputs: [] },\n { name: 'CallbackRejected', type: 'error', inputs: [] },\n { name: 'TransferFailed', type: 'error', inputs: [] },\n { name: 'ReentrantWithdrawal', type: 'error', inputs: [] },\n {\n name: 'EncryptionKeyExpired',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'keyIndex' },\n { type: 'uint64', name: 'activationBlock' },\n { type: 'uint64', name: 'supersededAtBlock' },\n ],\n },\n {\n name: 'InvalidEncryptionKeyIndex',\n type: 'error',\n inputs: [{ type: 'uint256', name: 'keyIndex' }],\n },\n { name: 'NoEncryptionKeySet', type: 'error', inputs: [] },\n {\n name: 'NoEncryptionKeyAtBlock',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'blockNumber' }],\n },\n { name: 'InvalidEphemeralPubkey', type: 'error', inputs: [] },\n {\n name: 'InvalidCiphertextLength',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'actual' },\n { type: 'uint256', name: 'expected' },\n ],\n },\n { name: 'InvalidProofOfPossession', type: 'error', inputs: [] },\n { name: 'DepositTooSmall', type: 'error', inputs: [] },\n {\n name: 'TokenEnablementBlockCapacityExceeded',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'maximum' }],\n },\n { name: 'TokenMetadataTooLong', type: 'error', inputs: [] },\n { name: 'GasFeeRateTooHigh', type: 'error', inputs: [] },\n { name: 'DepositsNotActive', type: 'error', inputs: [] },\n { name: 'TokenAlreadyEnabled', type: 'error', inputs: [] },\n { name: 'TokenTransferPolicyNotSet', type: 'error', inputs: [] },\n { name: 'TokenEnablementCursorNotInitialized', type: 'error', inputs: [] },\n { name: 'InvalidDepositTransition', type: 'error', inputs: [] },\n { name: 'InvalidTokenEnablementTransition', type: 'error', inputs: [] },\n { name: 'InvalidSequencerSet', type: 'error', inputs: [] },\n { name: 'SequencerConfigurationUnchanged', type: 'error', inputs: [] },\n { name: 'InvalidQuorumCertificate', type: 'error', inputs: [] },\n { name: 'CallbackDidNotReturnToZone', type: 'error', inputs: [] },\n { name: 'InvalidBouncebackRecipient', type: 'error', inputs: [] },\n { name: 'TokenNotEnabled', type: 'error', inputs: [] },\n {\n name: 'DepositBlockCapacityExceeded',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'maximum' }],\n },\n { name: 'InvalidCallbackTarget', type: 'error', inputs: [] },\n {\n name: 'AccountNotAllowed',\n type: 'error',\n inputs: [{ type: 'address', name: 'account' }],\n },\n { name: 'InvalidLeader', type: 'error', inputs: [] },\n { name: 'ActiveLeaderRemoved', type: 'error', inputs: [] },\n { name: 'LeaderAlreadyUpdatedThisBlock', type: 'error', inputs: [] },\n {\n name: 'StaleLeadershipEpoch',\n type: 'error',\n inputs: [\n { type: 'uint64', name: 'expected' },\n { type: 'uint64', name: 'actual' },\n ],\n },\n {\n name: 'deposit',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: '_token' },\n { type: 'address', name: 'to' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n { type: 'address', name: 'tempoRefundRecipient' },\n ],\n outputs: [{ type: 'bytes32' }],\n },\n];\nexport const zoneVerifier = [\n {\n name: 'verify',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'uint64', name: 'tempoBlockNumber' },\n { type: 'uint64', name: 'anchorBlockNumber' },\n { type: 'bytes32', name: 'anchorBlockHash' },\n { type: 'uint64', name: 'expectedWithdrawalBatchIndex' },\n { type: 'uint256', name: 'nextZoneHeight' },\n {\n type: 'tuple',\n name: 'blockTransition',\n components: [\n { type: 'bytes32', name: 'prevBlockHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n ],\n },\n {\n type: 'tuple',\n name: 'depositQueueTransition',\n components: [\n { type: 'bytes32', name: 'prevProcessedHash' },\n { type: 'bytes32', name: 'nextProcessedHash' },\n { type: 'uint64', name: 'prevDepositNumber' },\n { type: 'uint64', name: 'nextDepositNumber' },\n ],\n },\n {\n type: 'tuple',\n name: 'tokenEnablementTransition',\n components: [\n { type: 'uint64', name: 'prevProcessedTokenCount' },\n { type: 'uint64', name: 'nextProcessedTokenCount' },\n ],\n },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'bytes', name: 'verifierConfig' },\n { type: 'bytes', name: 'proof' },\n ],\n outputs: [{ type: 'bool' }],\n },\n];\n// Source: tempoxyz/earn@d6373e4939ec2bbf5dcccffd5f2519ff4a62d6b1\nexport const earnContributionController = [\n {\n type: 'constructor',\n inputs: [\n { name: 'earnVault_', type: 'address' },\n { name: 'owner_', type: 'address' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'active',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'executeFunding',\n inputs: [\n { name: 'funder', type: 'address' },\n { name: 'requestedAssets', type: 'uint256' },\n { name: 'maxEarnShareSupply', type: 'uint256' },\n ],\n outputs: [{ name: 'fundedAssets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'fund',\n inputs: [\n { name: 'funder', type: 'address' },\n { name: 'requestedAssets', type: 'uint256' },\n { name: 'maxEarnShareSupply', type: 'uint256' },\n ],\n outputs: [{ name: 'fundedAssets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'fundBatchExact',\n inputs: [\n { name: 'funders', type: 'address[]' },\n { name: 'requestedAssets', type: 'uint256[]' },\n { name: 'maxEarnShareSupply', type: 'uint256' },\n ],\n outputs: [{ name: 'totalFundedAssets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOwner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'renounceOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setActive',\n inputs: [{ name: 'active_', type: 'bool' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{ name: 'newOwner', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'event',\n name: 'ActiveSet',\n inputs: [{ name: 'active', type: 'bool', indexed: false }],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Funded',\n inputs: [\n { name: 'funder', type: 'address', indexed: true },\n { name: 'requestedAssets', type: 'uint256', indexed: false },\n { name: 'fundedAssets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferStarted',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferred',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'error',\n name: 'EarnShareSupplyOutOfBounds',\n inputs: [\n { name: 'earnShareSupply', type: 'uint256' },\n { name: 'maxEarnShareSupply', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'Inactive', inputs: [] },\n { type: 'error', name: 'InvalidArrayLengths', inputs: [] },\n { type: 'error', name: 'NotSelf', inputs: [] },\n {\n type: 'error',\n name: 'OwnableInvalidOwner',\n inputs: [{ name: 'owner', type: 'address' }],\n },\n {\n type: 'error',\n name: 'OwnableUnauthorizedAccount',\n inputs: [{ name: 'account', type: 'address' }],\n },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n { type: 'error', name: 'TokenCallFailed', inputs: [] },\n { type: 'error', name: 'TokenCallFalse', inputs: [] },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroAmount', inputs: [] },\n];\nexport const earnEngine = [\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'deposit',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'name',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'shareScale',\n inputs: [],\n outputs: [{ name: 'scale', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'supportsInterface',\n inputs: [{ name: 'interfaceId', type: 'bytes4' }],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'symbol',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalAssets',\n inputs: [],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalShares',\n inputs: [],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'valueOf',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewWithdraw',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'withdraw',\n inputs: [\n { name: 'assets', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n ],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'isFeeValuationFresh',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewRedeem',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'redeem',\n inputs: [\n { name: 'engineShares', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minAssets', type: 'uint256' },\n ],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n];\nexport const earnEngineAsyncRedeem = [\n {\n type: 'function',\n name: 'cancelRedeem',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'requestRedeem',\n inputs: [\n { name: 'engineShares', type: 'uint256' },\n { name: 'requestData', type: 'bytes' },\n ],\n outputs: [{ name: 'requestId', type: 'bytes32' }],\n stateMutability: 'nonpayable',\n },\n];\nexport const earnEngineInKindDeposit = [\n {\n type: 'function',\n name: 'depositInKind',\n inputs: [\n { name: 'venueShares', type: 'uint256' },\n { name: 'from', type: 'address' },\n ],\n outputs: [{ name: 'engineSharesReceived', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n];\nexport const earnFactory = [\n {\n type: 'constructor',\n inputs: [\n { name: 'tip20Factory_', type: 'address' },\n { name: 'earnVaultImplementation_', type: 'address' },\n { name: 'earnFeesImplementation_', type: 'address' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'DEFAULT_ADMIN_ROLE',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'EARN_SHARE_SALT_DOMAIN',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'FEES_SALT_DOMAIN',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'computeEarnShareSalt',\n inputs: [\n {\n name: 'params',\n type: 'tuple',\n components: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'engine', type: 'address' },\n { name: 'owner', type: 'address' },\n {\n name: 'controls',\n type: 'tuple',\n components: [\n { name: 'emergencyGuardian', type: 'address' },\n { name: 'asyncJanitor', type: 'address' },\n { name: 'maxManagedAssets', type: 'uint256' },\n { name: 'migrationMode', type: 'uint8' },\n ],\n },\n {\n name: 'distributorConfig',\n type: 'tuple',\n components: [\n { name: 'distributor', type: 'address' },\n { name: 'updateDelay', type: 'uint40' },\n ],\n },\n {\n name: 'fees',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n { name: 'transferPolicyId', type: 'uint64' },\n ],\n },\n ],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'deploy',\n inputs: [\n {\n name: 'params',\n type: 'tuple',\n components: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'engine', type: 'address' },\n { name: 'owner', type: 'address' },\n {\n name: 'controls',\n type: 'tuple',\n components: [\n { name: 'emergencyGuardian', type: 'address' },\n { name: 'asyncJanitor', type: 'address' },\n { name: 'maxManagedAssets', type: 'uint256' },\n { name: 'migrationMode', type: 'uint8' },\n ],\n },\n {\n name: 'distributorConfig',\n type: 'tuple',\n components: [\n { name: 'distributor', type: 'address' },\n { name: 'updateDelay', type: 'uint40' },\n ],\n },\n {\n name: 'fees',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n { name: 'transferPolicyId', type: 'uint64' },\n ],\n },\n ],\n outputs: [\n { name: 'earnShare', type: 'address' },\n { name: 'earnVault', type: 'address' },\n { name: 'earnFees', type: 'address' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'earnFeesImplementation',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnVaultImplementation',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'predictEarnFees',\n inputs: [\n {\n name: 'params',\n type: 'tuple',\n components: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'engine', type: 'address' },\n { name: 'owner', type: 'address' },\n {\n name: 'controls',\n type: 'tuple',\n components: [\n { name: 'emergencyGuardian', type: 'address' },\n { name: 'asyncJanitor', type: 'address' },\n { name: 'maxManagedAssets', type: 'uint256' },\n { name: 'migrationMode', type: 'uint8' },\n ],\n },\n {\n name: 'distributorConfig',\n type: 'tuple',\n components: [\n { name: 'distributor', type: 'address' },\n { name: 'updateDelay', type: 'uint40' },\n ],\n },\n {\n name: 'fees',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n { name: 'transferPolicyId', type: 'uint64' },\n ],\n },\n ],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'predictEarnShare',\n inputs: [\n {\n name: 'params',\n type: 'tuple',\n components: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'engine', type: 'address' },\n { name: 'owner', type: 'address' },\n {\n name: 'controls',\n type: 'tuple',\n components: [\n { name: 'emergencyGuardian', type: 'address' },\n { name: 'asyncJanitor', type: 'address' },\n { name: 'maxManagedAssets', type: 'uint256' },\n { name: 'migrationMode', type: 'uint8' },\n ],\n },\n {\n name: 'distributorConfig',\n type: 'tuple',\n components: [\n { name: 'distributor', type: 'address' },\n { name: 'updateDelay', type: 'uint40' },\n ],\n },\n {\n name: 'fees',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n { name: 'transferPolicyId', type: 'uint64' },\n ],\n },\n ],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'tip20Factory',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'EarnStackDeployed',\n inputs: [\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'earnShare', type: 'address', indexed: true },\n { name: 'earnFees', type: 'address', indexed: true },\n { name: 'engine', type: 'address', indexed: false },\n { name: 'asset', type: 'address', indexed: false },\n { name: 'owner', type: 'address', indexed: false },\n { name: 'deploymentId', type: 'bytes32', indexed: false },\n { name: 'emergencyGuardian', type: 'address', indexed: false },\n { name: 'asyncJanitor', type: 'address', indexed: false },\n { name: 'maxManagedAssets', type: 'uint256', indexed: false },\n { name: 'migrationMode', type: 'uint8', indexed: false },\n { name: 'transferPolicyId', type: 'uint64', indexed: false },\n { name: 'earnShareSalt', type: 'bytes32', indexed: false },\n { name: 'controlConfigHash', type: 'bytes32', indexed: false },\n { name: 'feeConfigHash', type: 'bytes32', indexed: false },\n { name: 'earnFeesSalt', type: 'bytes32', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'AdminRelinquishmentFailed', inputs: [] },\n {\n type: 'error',\n name: 'EarnShareAlreadyExists',\n inputs: [{ name: 'earnShare', type: 'address' }],\n },\n { type: 'error', name: 'EarnShareSupplyNotZero', inputs: [] },\n { type: 'error', name: 'EmptyDeploymentId', inputs: [] },\n { type: 'error', name: 'EmptyEarnShareMetadata', inputs: [] },\n {\n type: 'error',\n name: 'EngineAlreadyBound',\n inputs: [{ name: 'earnVault', type: 'address' }],\n },\n { type: 'error', name: 'FactoryCannotBeFinalOwner', inputs: [] },\n { type: 'error', name: 'FailedDeployment', inputs: [] },\n {\n type: 'error',\n name: 'InsufficientBalance',\n inputs: [\n { name: 'balance', type: 'uint256' },\n { name: 'needed', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidDistributorConfig', inputs: [] },\n { type: 'error', name: 'InvalidEarnFeesImplementation', inputs: [] },\n { type: 'error', name: 'InvalidEarnVaultImplementation', inputs: [] },\n { type: 'error', name: 'InvalidEngine', inputs: [] },\n {\n type: 'error',\n name: 'InvalidTransferPolicy',\n inputs: [{ name: 'policyId', type: 'uint64' }],\n },\n { type: 'error', name: 'IssuerGrantFailed', inputs: [] },\n {\n type: 'error',\n name: 'TransferPolicyMismatch',\n inputs: [\n { name: 'expected', type: 'uint64' },\n { name: 'actual', type: 'uint64' },\n ],\n },\n {\n type: 'error',\n name: 'UnsupportedTransferPolicy',\n inputs: [\n { name: 'policyId', type: 'uint64' },\n { name: 'policyType', type: 'uint8' },\n ],\n },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n];\nexport const earnFees = [\n { type: 'constructor', inputs: [], stateMutability: 'nonpayable' },\n {\n type: 'function',\n name: 'accrueFees',\n inputs: [],\n outputs: [\n {\n name: 'result',\n type: 'tuple',\n components: [\n { name: 'activeAssets', type: 'uint256' },\n { name: 'positiveAccrualAssets', type: 'uint256' },\n { name: 'fixedFeeAssets', type: 'uint256' },\n { name: 'excessFeeAssets', type: 'uint256' },\n { name: 'totalFeeAssets', type: 'uint256' },\n { name: 'totalFeeEarnShares', type: 'uint256' },\n { name: 'preFeeValuePerEarnShare', type: 'uint256' },\n { name: 'postFeeValuePerEarnShare', type: 'uint256' },\n { name: 'targetValuePerEarnShare', type: 'uint256' },\n { name: 'allocationCount', type: 'uint8' },\n {\n name: 'allocations',\n type: 'tuple[5]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'feeAssets', type: 'uint256' },\n { name: 'feeEarnShares', type: 'uint256' },\n ],\n },\n ],\n },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'claim',\n inputs: [\n { name: 'to', type: 'address' },\n { name: 'earnShares', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'claimableEarnShares',\n inputs: [{ name: 'recipient', type: 'address' }],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'closeRedeemRequest',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'currentFeeConfigId',\n inputs: [],\n outputs: [{ name: '', type: 'uint64' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'disableFees',\n inputs: [{ name: 'operator', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'earnShare',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnShareScale',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feeBaselinesPending',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feeConfig',\n inputs: [{ name: 'configId', type: 'uint64' }],\n outputs: [\n {\n name: '',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feeRemainder',\n inputs: [\n { name: 'configId', type: 'uint64' },\n { name: 'slot', type: 'uint8' },\n ],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feesActive',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'feesDisabled',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'highWaterMark',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'initialize',\n inputs: [\n { name: 'earnVault_', type: 'address' },\n { name: 'earnShare_', type: 'address' },\n {\n name: 'initialConfig',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'initializeBaselines',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'pendingFeeSnapshot',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [\n {\n name: '',\n type: 'tuple',\n components: [\n { name: 'burnedEarnShares', type: 'uint256' },\n { name: 'requestValue', type: 'uint256' },\n { name: 'highWaterValue', type: 'uint256' },\n { name: 'targetValue', type: 'uint256' },\n { name: 'feeConfigId', type: 'uint64' },\n { name: 'requestedAt', type: 'uint40' },\n { name: 'open', type: 'bool' },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewAccruedFees',\n inputs: [],\n outputs: [\n {\n name: 'result',\n type: 'tuple',\n components: [\n { name: 'activeAssets', type: 'uint256' },\n { name: 'positiveAccrualAssets', type: 'uint256' },\n { name: 'fixedFeeAssets', type: 'uint256' },\n { name: 'excessFeeAssets', type: 'uint256' },\n { name: 'totalFeeAssets', type: 'uint256' },\n { name: 'totalFeeEarnShares', type: 'uint256' },\n { name: 'preFeeValuePerEarnShare', type: 'uint256' },\n { name: 'postFeeValuePerEarnShare', type: 'uint256' },\n { name: 'targetValuePerEarnShare', type: 'uint256' },\n { name: 'allocationCount', type: 'uint8' },\n {\n name: 'allocations',\n type: 'tuple[5]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'feeAssets', type: 'uint256' },\n { name: 'feeEarnShares', type: 'uint256' },\n ],\n },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'recordRedeemRequest',\n inputs: [\n { name: 'requestId', type: 'bytes32' },\n { name: 'burnedEarnShares', type: 'uint256' },\n { name: 'requestValue', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setFeeConfig',\n inputs: [\n {\n name: 'config',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n ],\n outputs: [{ name: 'configId', type: 'uint64' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'settleCancelledRedeem',\n inputs: [\n { name: 'requestId', type: 'bytes32' },\n { name: 'returnedValue', type: 'uint256' },\n { name: 'activeSupply', type: 'uint256' },\n { name: 'activeAssets', type: 'uint256' },\n { name: 'totalReentryEarnShares', type: 'uint256' },\n ],\n outputs: [{ name: 'feeEarnShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'shouldChargeRedeem',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'targetBase',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'targetStartedAt',\n inputs: [],\n outputs: [{ name: '', type: 'uint40' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalClaimableEarnShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'validateFeeConfig',\n inputs: [\n {\n name: 'config',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n ],\n outputs: [],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'FeeBaselinesInitialized',\n inputs: [\n { name: 'highWaterMark', type: 'uint256', indexed: false },\n { name: 'targetBase', type: 'uint256', indexed: false },\n { name: 'targetStartedAt', type: 'uint40', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeeConfigurationSet',\n inputs: [\n { name: 'configId', type: 'uint64', indexed: true },\n { name: 'configHash', type: 'bytes32', indexed: true },\n { name: 'reactivated', type: 'bool', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeeDustWaived',\n inputs: [\n { name: 'configId', type: 'uint64', indexed: true },\n { name: 'slot', type: 'uint8', indexed: true },\n { name: 'remainder', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeeEarnSharesAllocated',\n inputs: [\n { name: 'configId', type: 'uint64', indexed: true },\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'feeAssets', type: 'uint256', indexed: false },\n { name: 'feeEarnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeeEarnSharesClaimed',\n inputs: [\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'to', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeesAccrued',\n inputs: [\n { name: 'configId', type: 'uint64', indexed: true },\n { name: 'activeAssets', type: 'uint256', indexed: false },\n { name: 'positiveAccrualAssets', type: 'uint256', indexed: false },\n { name: 'feeAssets', type: 'uint256', indexed: false },\n { name: 'feeEarnShares', type: 'uint256', indexed: false },\n { name: 'highWaterMark', type: 'uint256', indexed: false },\n { name: 'targetValuePerEarnShare', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FeesDisabled',\n inputs: [{ name: 'operator', type: 'address', indexed: true }],\n anonymous: false,\n },\n { type: 'error', name: 'AlreadyInitialized', inputs: [] },\n { type: 'error', name: 'InsufficientClaimableEarnShares', inputs: [] },\n { type: 'error', name: 'InvalidFeeClaimReceiver', inputs: [] },\n { type: 'error', name: 'InvalidFeeConfiguration', inputs: [] },\n { type: 'error', name: 'NotEarnVault', inputs: [] },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroAmount', inputs: [] },\n];\nexport const earnMerkleRewardDistributor = [\n {\n type: 'constructor',\n inputs: [\n { name: 'earnVault_', type: 'address' },\n { name: 'treasury_', type: 'address' },\n { name: 'campaignId_', type: 'bytes32' },\n { name: 'claimDeadline_', type: 'uint40' },\n { name: 'owner_', type: 'address' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'campaignId',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'claim',\n inputs: [\n { name: 'recipient', type: 'address' },\n { name: 'cumulativeAmount', type: 'uint256' },\n { name: 'proof', type: 'bytes32[]' },\n ],\n outputs: [{ name: 'amount', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'claimDeadline',\n inputs: [],\n outputs: [{ name: '', type: 'uint40' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'consumedSettlements',\n inputs: [{ name: 'settlementId', type: 'bytes32' }],\n outputs: [{ name: 'consumed', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'cumulativePaid',\n inputs: [{ name: 'recipient', type: 'address' }],\n outputs: [{ name: 'cumulativeAmount', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnShare',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'fundAndPublishRoot',\n inputs: [\n { name: 'settlementId', type: 'bytes32' },\n { name: 'expectedRootVersion', type: 'uint64' },\n { name: 'funder', type: 'address' },\n { name: 'assets', type: 'uint256' },\n { name: 'minEarnShares', type: 'uint256' },\n { name: 'root', type: 'bytes32' },\n { name: 'totalEntitlement', type: 'uint256' },\n { name: 'statementHash_', type: 'bytes32' },\n ],\n outputs: [\n { name: 'earnShares', type: 'uint256' },\n { name: 'version', type: 'uint64' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'leaf',\n inputs: [\n { name: 'recipient', type: 'address' },\n { name: 'cumulativeAmount', type: 'uint256' },\n ],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'merkleRoot',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'paused',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOwner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'publishRoot',\n inputs: [\n { name: 'expectedRootVersion', type: 'uint64' },\n { name: 'root', type: 'bytes32' },\n { name: 'totalEntitlement', type: 'uint256' },\n { name: 'statementHash_', type: 'bytes32' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'pushBatch',\n inputs: [\n { name: 'expectedRootVersion', type: 'uint64' },\n { name: 'recipients', type: 'address[]' },\n { name: 'cumulativeAmounts', type: 'uint256[]' },\n { name: 'multiproof', type: 'bytes32[]' },\n { name: 'proofFlags', type: 'bool[]' },\n ],\n outputs: [\n { name: 'paidCount', type: 'uint256' },\n { name: 'paidEarnShares', type: 'uint256' },\n { name: 'skippedCount', type: 'uint256' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'renounceOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'returnUnspent',\n inputs: [],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'rootTotalEntitlement',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'rootVersion',\n inputs: [],\n outputs: [{ name: '', type: 'uint64' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'setPaused',\n inputs: [{ name: 'paused_', type: 'bool' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'statementHash',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalPaid',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{ name: 'newOwner', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'treasury',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'AssetsFunded',\n inputs: [\n { name: 'funder', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'BatchPushed',\n inputs: [\n { name: 'version', type: 'uint64', indexed: true },\n { name: 'batchHash', type: 'bytes32', indexed: true },\n { name: 'attemptedCount', type: 'uint256', indexed: false },\n { name: 'paidCount', type: 'uint256', indexed: false },\n { name: 'paidEarnShares', type: 'uint256', indexed: false },\n { name: 'skippedCount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferStarted',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferred',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'PausedSet',\n inputs: [{ name: 'paused', type: 'bool', indexed: false }],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'PayoutSkipped',\n inputs: [\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'cumulativeAmount', type: 'uint256', indexed: false },\n { name: 'reason', type: 'uint8', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RewardClaimed',\n inputs: [\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n { name: 'cumulativeAmount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RootPublished',\n inputs: [\n { name: 'version', type: 'uint64', indexed: true },\n { name: 'root', type: 'bytes32', indexed: true },\n { name: 'statementHash', type: 'bytes32', indexed: true },\n { name: 'totalEntitlement', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'UnspentReturned',\n inputs: [\n { name: 'treasury', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'ClaimsExpired', inputs: [] },\n { type: 'error', name: 'ClaimsNotExpired', inputs: [] },\n { type: 'error', name: 'DepositsPaused', inputs: [] },\n {\n type: 'error',\n name: 'InsufficientFunding',\n inputs: [\n { name: 'requiredBalance', type: 'uint256' },\n { name: 'actualBalance', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidArrayLengths', inputs: [] },\n { type: 'error', name: 'InvalidEarnVault', inputs: [] },\n { type: 'error', name: 'InvalidMultiproof', inputs: [] },\n { type: 'error', name: 'MerkleProofInvalidMultiproof', inputs: [] },\n { type: 'error', name: 'NothingOwed', inputs: [] },\n {\n type: 'error',\n name: 'OwnableInvalidOwner',\n inputs: [{ name: 'owner', type: 'address' }],\n },\n {\n type: 'error',\n name: 'OwnableUnauthorizedAccount',\n inputs: [{ name: 'account', type: 'address' }],\n },\n { type: 'error', name: 'OwnershipRenunciationDisabled', inputs: [] },\n { type: 'error', name: 'Paused', inputs: [] },\n { type: 'error', name: 'PausedLiabilityIncrease', inputs: [] },\n { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },\n {\n type: 'error',\n name: 'RootTotalDecreased',\n inputs: [\n { name: 'previousTotal', type: 'uint256' },\n { name: 'nextTotal', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'RootTotalExceeded',\n inputs: [\n { name: 'requestedAmount', type: 'uint256' },\n { name: 'remainingEntitlement', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'SettlementAlreadyConsumed',\n inputs: [{ name: 'settlementId', type: 'bytes32' }],\n },\n {\n type: 'error',\n name: 'StaleRootVersion',\n inputs: [\n { name: 'expected', type: 'uint64' },\n { name: 'actual', type: 'uint64' },\n ],\n },\n { type: 'error', name: 'TokenCallFailed', inputs: [] },\n { type: 'error', name: 'TokenCallFalse', inputs: [] },\n {\n type: 'error',\n name: 'UnexpectedEarnShares',\n inputs: [\n { name: 'reported', type: 'uint256' },\n { name: 'measured', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'UnexpectedRetainedAssets',\n inputs: [\n { name: 'beforeBalance', type: 'uint256' },\n { name: 'afterBalance', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroAmount', inputs: [] },\n { type: 'error', name: 'ZeroCampaignId', inputs: [] },\n { type: 'error', name: 'ZeroDeadline', inputs: [] },\n { type: 'error', name: 'ZeroMinimumEarnShares', inputs: [] },\n { type: 'error', name: 'ZeroRoot', inputs: [] },\n { type: 'error', name: 'ZeroSettlementId', inputs: [] },\n { type: 'error', name: 'ZeroStatementHash', inputs: [] },\n];\nexport const earnRewardsFactory = [\n {\n type: 'function',\n name: 'campaignId',\n inputs: [{ name: 'earnVault', type: 'address' }],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'install',\n inputs: [\n { name: 'earnVault', type: 'address' },\n { name: 'owner', type: 'address' },\n { name: 'treasury', type: 'address' },\n { name: 'claimDeadline', type: 'uint40' },\n { name: 'targetYield', type: 'bool' },\n { name: 'boostRewards', type: 'bool' },\n ],\n outputs: [\n {\n name: 'result',\n type: 'tuple',\n components: [\n { name: 'contributionController', type: 'address' },\n { name: 'merkleDistributor', type: 'address' },\n ],\n },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'predictContributionController',\n inputs: [\n { name: 'earnVault', type: 'address' },\n { name: 'owner', type: 'address' },\n ],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'predictMerkleDistributor',\n inputs: [\n { name: 'earnVault', type: 'address' },\n { name: 'owner', type: 'address' },\n { name: 'treasury', type: 'address' },\n { name: 'claimDeadline', type: 'uint40' },\n ],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'ContributionControllerInstalled',\n inputs: [\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'owner', type: 'address', indexed: true },\n { name: 'contributionController', type: 'address', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MerkleDistributorInstalled',\n inputs: [\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'owner', type: 'address', indexed: true },\n { name: 'treasury', type: 'address', indexed: true },\n { name: 'merkleDistributor', type: 'address', indexed: false },\n { name: 'campaignId', type: 'bytes32', indexed: false },\n { name: 'claimDeadline', type: 'uint40', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'EmptyInstallation', inputs: [] },\n {\n type: 'error',\n name: 'InvalidExistingDeployment',\n inputs: [{ name: 'component', type: 'address' }],\n },\n { type: 'error', name: 'InvalidRewardConfiguration', inputs: [] },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n];\nexport const earnRouter = [\n {\n type: 'constructor',\n inputs: [\n { name: 'allowedZoneId_', type: 'uint32' },\n { name: 'earnVault_', type: 'address' },\n { name: 'privateAsset_', type: 'address' },\n { name: 'tokenAuthority_', type: 'address' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'allowedZoneId',\n inputs: [],\n outputs: [{ name: '', type: 'uint32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnShare',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'onWithdrawalReceived',\n inputs: [\n { name: 'sourceZoneId', type: 'uint32' },\n { name: 'sourcePortal', type: 'address' },\n { name: '', type: 'bytes32' },\n { name: 'token', type: 'address' },\n { name: 'amount', type: 'uint128' },\n { name: 'callbackData', type: 'bytes' },\n ],\n outputs: [{ name: '', type: 'bytes4' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'privateAsset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'reserveToken',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'supportsFlow',\n inputs: [{ name: 'flow', type: 'uint8' }],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'tokenAuthority',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transactionLimit',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'vaultAsset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'EarnDeposit',\n inputs: [\n { name: 'actionId', type: 'bytes32', indexed: true },\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'inputToken', type: 'address', indexed: true },\n { name: 'inputAmount', type: 'uint256', indexed: false },\n { name: 'vaultAssets', type: 'uint256', indexed: false },\n { name: 'earnShares', type: 'uint256', indexed: false },\n { name: 'zoneDepositHash', type: 'bytes32', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EarnRedeem',\n inputs: [\n { name: 'actionId', type: 'bytes32', indexed: true },\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'outputToken', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n { name: 'vaultAssets', type: 'uint256', indexed: false },\n { name: 'outputAmount', type: 'uint256', indexed: false },\n { name: 'zoneDepositHash', type: 'bytes32', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'AmountExceedsLimit', inputs: [] },\n { type: 'error', name: 'AmountOverflow', inputs: [] },\n { type: 'error', name: 'BadFlow', inputs: [] },\n { type: 'error', name: 'InsufficientOutput', inputs: [] },\n { type: 'error', name: 'InvalidAuthority', inputs: [] },\n { type: 'error', name: 'InvalidEarnVault', inputs: [] },\n { type: 'error', name: 'InvalidPrivateAsset', inputs: [] },\n { type: 'error', name: 'InvalidReturnToken', inputs: [] },\n { type: 'error', name: 'InvalidRoutePair', inputs: [] },\n { type: 'error', name: 'InvalidSourcePortal', inputs: [] },\n { type: 'error', name: 'InvalidTransactionLimit', inputs: [] },\n { type: 'error', name: 'NotZoneMessenger', inputs: [] },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n { type: 'error', name: 'ResidualBalance', inputs: [] },\n { type: 'error', name: 'TokenCallFailed', inputs: [] },\n { type: 'error', name: 'TokenCallFalse', inputs: [] },\n { type: 'error', name: 'WrongInputToken', inputs: [] },\n { type: 'error', name: 'WrongSourceZone', inputs: [] },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroAmount', inputs: [] },\n];\nexport const earnVault = [\n { type: 'constructor', inputs: [], stateMutability: 'nonpayable' },\n {\n type: 'function',\n name: 'MAX_REWARD_RATE_MULTIPLIER',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'absorbEngineShareSurplus',\n inputs: [{ name: 'engineShares_', type: 'uint256' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptDistributor',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptOperator',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'accrueFees',\n inputs: [],\n outputs: [\n { name: 'feeAssets', type: 'uint256' },\n { name: 'feeEarnShares', type: 'uint256' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'anchorEarnShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'anchorEngineShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'asyncJanitor',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'cancelDistributorFeeUpdate',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'cancelDistributorTransfer',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'cancelOperatorTransfer',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'cancelRedeem',\n inputs: [\n { name: 'requestId', type: 'bytes32' },\n { name: 'minReceiverEarnShares', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'contribute',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'receivedEngineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'convertEngineSharesToEarnShares',\n inputs: [{ name: 'engineShares_', type: 'uint256' }],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'convertToEngineShares',\n inputs: [{ name: 'earnShares', type: 'uint256' }],\n outputs: [{ name: 'engineShares_', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'deposit',\n inputs: [\n { name: 'assets', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minEarnShares', type: 'uint256' },\n ],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'depositVenueShares',\n inputs: [\n { name: 'venueShares', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minEarnShares', type: 'uint256' },\n ],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'depositsPaused',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'disableFees',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'distributor',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'distributorFee',\n inputs: [],\n outputs: [\n { name: 'recipient', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'distributorUpdateDelay',\n inputs: [],\n outputs: [{ name: '', type: 'uint40' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnFees',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'earnShare',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'emergencyGuardian',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'engine',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'engineMigrationMode',\n inputs: [],\n outputs: [{ name: '', type: 'uint8' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'engineShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'executeDistributorFeeUpdate',\n inputs: [],\n outputs: [{ name: 'feeConfigId', type: 'uint64' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'finalizeRedeem',\n inputs: [\n { name: 'requestId', type: 'bytes32' },\n { name: 'asset_', type: 'address' },\n { name: 'amount', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'initialize',\n inputs: [\n { name: 'engine_', type: 'address' },\n { name: 'earnShare_', type: 'address' },\n { name: 'earnFees_', type: 'address' },\n { name: 'operator_', type: 'address' },\n {\n name: 'controlInit_',\n type: 'tuple',\n components: [\n { name: 'emergencyGuardian', type: 'address' },\n { name: 'asyncJanitor', type: 'address' },\n { name: 'maxManagedAssets', type: 'uint256' },\n { name: 'migrationMode', type: 'uint8' },\n ],\n },\n {\n name: 'distributorInit_',\n type: 'tuple',\n components: [\n { name: 'distributor', type: 'address' },\n { name: 'updateDelay', type: 'uint40' },\n ],\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'isAccountingAligned',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'isFeeValuationFresh',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxManagedAssets',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'migrateEngine',\n inputs: [\n { name: 'newEngine', type: 'address' },\n { name: 'minNewEngineShares', type: 'uint256' },\n { name: 'minAssetsRetained', type: 'uint256' },\n ],\n outputs: [{ name: 'newEngineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'normalizedRewardRate',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'openRedeemRequestCount',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'operator',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingDistributor',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingDistributorFeeUpdate',\n inputs: [],\n outputs: [\n {\n name: '',\n type: 'tuple',\n components: [\n { name: 'recipient', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n { name: 'executableAt', type: 'uint40' },\n { name: 'pending', type: 'bool' },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOperator',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingRedeem',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [\n {\n name: '',\n type: 'tuple',\n components: [\n { name: 'receiver', type: 'address' },\n { name: 'requester', type: 'address' },\n { name: 'burnedEarnShares', type: 'uint256' },\n { name: 'engineShares', type: 'uint256' },\n { name: 'open', type: 'bool' },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewRedeem',\n inputs: [{ name: 'earnShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewWithdraw',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'earnShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'rawEngineShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'redeem',\n inputs: [\n { name: 'earnShares', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minAssets', type: 'uint256' },\n ],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'remainingDepositCapacity',\n inputs: [],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'requestRedeem',\n inputs: [\n { name: 'earnShares', type: 'uint256' },\n { name: 'engineData', type: 'bytes' },\n { name: 'receiver', type: 'address' },\n ],\n outputs: [{ name: 'requestId', type: 'bytes32' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'rewardRateBaseline',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'scheduleDistributorFeeUpdate',\n inputs: [\n { name: 'recipient', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setDepositsPaused',\n inputs: [{ name: 'paused', type: 'bool' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setEmergencyRoles',\n inputs: [\n { name: 'newGuardian', type: 'address' },\n { name: 'newJanitor', type: 'address' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setFeeConfig',\n inputs: [\n {\n name: 'config',\n type: 'tuple',\n components: [\n { name: 'fixedFeeCount', type: 'uint8' },\n {\n name: 'fixedFees',\n type: 'tuple[4]',\n components: [\n { name: 'account', type: 'address' },\n { name: 'rateBps', type: 'uint16' },\n ],\n },\n {\n name: 'excess',\n type: 'tuple',\n components: [\n { name: 'enabled', type: 'bool' },\n { name: 'account', type: 'address' },\n { name: 'annualTargetRateBps', type: 'uint16' },\n { name: 'excessFeeRateBps', type: 'uint16' },\n ],\n },\n ],\n },\n ],\n outputs: [{ name: 'configId', type: 'uint64' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setMaxManagedAssets',\n inputs: [{ name: 'newMaxManagedAssets', type: 'uint256' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'surplusEngineShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalAssets',\n inputs: [],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalEarnShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferDistributor',\n inputs: [{ name: 'newDistributor', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'transferOperator',\n inputs: [{ name: 'newOperator', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'withdrawExact',\n inputs: [\n { name: 'assets', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'maxEarnShares', type: 'uint256' },\n ],\n outputs: [{ name: 'earnSharesBurned', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'event',\n name: 'Contributed',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'engineShares', type: 'uint256', indexed: false },\n { name: 'anchorEngineShares', type: 'uint256', indexed: false },\n { name: 'anchorEarnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DepositPauseChanged',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'paused', type: 'bool', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Deposited',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorFeeUpdateCancelled',\n inputs: [{ name: 'distributor', type: 'address', indexed: true }],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorFeeUpdateScheduled',\n inputs: [\n { name: 'distributor', type: 'address', indexed: true },\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'rateBps', type: 'uint16', indexed: false },\n { name: 'executableAt', type: 'uint40', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorFeeUpdated',\n inputs: [\n { name: 'recipient', type: 'address', indexed: true },\n { name: 'rateBps', type: 'uint16', indexed: false },\n { name: 'feeConfigId', type: 'uint64', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorTransferCancelled',\n inputs: [\n { name: 'distributor', type: 'address', indexed: true },\n { name: 'pendingDistributor', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorTransferStarted',\n inputs: [\n { name: 'distributor', type: 'address', indexed: true },\n { name: 'pendingDistributor', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DistributorTransferred',\n inputs: [\n { name: 'previousDistributor', type: 'address', indexed: true },\n { name: 'newDistributor', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EarnVaultInitialized',\n inputs: [\n { name: 'engine', type: 'address', indexed: true },\n { name: 'earnShare', type: 'address', indexed: true },\n { name: 'earnFees', type: 'address', indexed: true },\n { name: 'operator', type: 'address', indexed: false },\n { name: 'emergencyGuardian', type: 'address', indexed: false },\n { name: 'asyncJanitor', type: 'address', indexed: false },\n { name: 'maxManagedAssets', type: 'uint256', indexed: false },\n { name: 'migrationMode', type: 'uint8', indexed: false },\n { name: 'distributor', type: 'address', indexed: false },\n { name: 'distributorUpdateDelay', type: 'uint40', indexed: false },\n { name: 'distributorFeeRecipient', type: 'address', indexed: false },\n { name: 'distributorFeeRateBps', type: 'uint16', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EmergencyRolesChanged',\n inputs: [\n { name: 'emergencyGuardian', type: 'address', indexed: true },\n { name: 'asyncJanitor', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EngineMigrated',\n inputs: [\n { name: 'oldEngine', type: 'address', indexed: true },\n { name: 'newEngine', type: 'address', indexed: true },\n { name: 'oldEngineShares', type: 'uint256', indexed: false },\n { name: 'assetsMoved', type: 'uint256', indexed: false },\n { name: 'newEngineShares', type: 'uint256', indexed: false },\n { name: 'totalEarnShares', type: 'uint256', indexed: false },\n { name: 'anchorEngineShares', type: 'uint256', indexed: false },\n { name: 'anchorEarnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EngineShareShortfallReconciled',\n inputs: [\n { name: 'engine', type: 'address', indexed: true },\n { name: 'previousManagedEngineShares', type: 'uint256', indexed: false },\n { name: 'observedRawEngineShares', type: 'uint256', indexed: false },\n { name: 'shortfallEngineShares', type: 'uint256', indexed: false },\n { name: 'totalEarnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EngineShareSurplusAbsorbed',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'engineShares', type: 'uint256', indexed: false },\n { name: 'anchorEngineShares', type: 'uint256', indexed: false },\n { name: 'anchorEarnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MaxManagedAssetsChanged',\n inputs: [\n { name: 'previousMaxManagedAssets', type: 'uint256', indexed: false },\n { name: 'newMaxManagedAssets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OperatorTransferCancelled',\n inputs: [\n { name: 'operator', type: 'address', indexed: true },\n { name: 'pendingOperator', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OperatorTransferStarted',\n inputs: [\n { name: 'operator', type: 'address', indexed: true },\n { name: 'pendingOperator', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OperatorTransferred',\n inputs: [\n { name: 'previousOperator', type: 'address', indexed: true },\n { name: 'newOperator', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemCancelled',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemFinalized',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n { name: 'asset', type: 'address', indexed: false },\n { name: 'assets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemRequested',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'requester', type: 'address', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Redeemed',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'earnShares', type: 'uint256', indexed: false },\n { name: 'assets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'VenueSharesDeposited',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'requestedVenueShares', type: 'uint256', indexed: false },\n { name: 'receivedEngineShares', type: 'uint256', indexed: false },\n { name: 'earnShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'WithdrewExact',\n inputs: [\n { name: 'caller', type: 'address', indexed: true },\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'earnSharesBurned', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'ActiveSupplyWithoutBacking', inputs: [] },\n { type: 'error', name: 'AlreadyInitialized', inputs: [] },\n { type: 'error', name: 'DepositsPaused', inputs: [] },\n { type: 'error', name: 'DistributorFeeUpdateNotPending', inputs: [] },\n {\n type: 'error',\n name: 'DistributorFeeUpdateNotReady',\n inputs: [{ name: 'executableAt', type: 'uint40' }],\n },\n { type: 'error', name: 'DistributorTransferNotPending', inputs: [] },\n {\n type: 'error',\n name: 'DuplicateRequest',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n { type: 'error', name: 'EngineAssetMismatch', inputs: [] },\n {\n type: 'error',\n name: 'EngineCapabilityUnsupported',\n inputs: [{ name: 'interfaceId', type: 'bytes4' }],\n },\n { type: 'error', name: 'EngineEarnVaultMismatch', inputs: [] },\n { type: 'error', name: 'EngineExitUnsupported', inputs: [] },\n { type: 'error', name: 'ExceedsMaxEarnShares', inputs: [] },\n {\n type: 'error',\n name: 'ExcessiveConversionLoss',\n inputs: [\n { name: 'inputShares', type: 'uint256' },\n { name: 'representedShares', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'ExcessiveMigrationClassificationError',\n inputs: [\n { name: 'expectedManagedAssets', type: 'uint256' },\n { name: 'actualManagedAssets', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'FeeValuationStale', inputs: [] },\n {\n type: 'error',\n name: 'FinalizedAssetMismatch',\n inputs: [{ name: 'finalizedAsset', type: 'address' }],\n },\n { type: 'error', name: 'GlobalFeeDisableUnavailable', inputs: [] },\n { type: 'error', name: 'InitialEarnShareSupplyNotZero', inputs: [] },\n {\n type: 'error',\n name: 'InsufficientEngineShareSurplus',\n inputs: [\n { name: 'available', type: 'uint256' },\n { name: 'requested', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'InsufficientOutput', inputs: [] },\n { type: 'error', name: 'InvalidDistributorConfiguration', inputs: [] },\n { type: 'error', name: 'InvalidDistributorFeeConfiguration', inputs: [] },\n { type: 'error', name: 'InvalidEarnDecimals', inputs: [] },\n { type: 'error', name: 'InvalidEngineShareScale', inputs: [] },\n {\n type: 'error',\n name: 'MaxManagedAssetsExceeded',\n inputs: [\n { name: 'maximum', type: 'uint256' },\n { name: 'actual', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'MinimumAssetsNotMet',\n inputs: [\n { name: 'minimumAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'MinimumEarnSharesNotMet',\n inputs: [\n { name: 'minimumEarnShares', type: 'uint256' },\n { name: 'actualEarnShares', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'MinimumEngineSharesNotMet',\n inputs: [\n { name: 'minimumEngineShares', type: 'uint256' },\n { name: 'actualEngineShares', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'NoEarnShares', inputs: [] },\n { type: 'error', name: 'NotDistributor', inputs: [] },\n { type: 'error', name: 'NotEmergencyGuardianOrOperator', inputs: [] },\n { type: 'error', name: 'NotEngine', inputs: [] },\n { type: 'error', name: 'NotOperator', inputs: [] },\n { type: 'error', name: 'NotPendingDistributor', inputs: [] },\n { type: 'error', name: 'NotPendingOperator', inputs: [] },\n { type: 'error', name: 'NotRequesterOrJanitor', inputs: [] },\n { type: 'error', name: 'OperatorMigrationDisabled', inputs: [] },\n { type: 'error', name: 'OperatorTransferNotPending', inputs: [] },\n { type: 'error', name: 'PendingRedeemsOpen', inputs: [] },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n {\n type: 'error',\n name: 'RequestNotOpen',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n { type: 'error', name: 'ResidualBacking', inputs: [] },\n {\n type: 'error',\n name: 'RewardRateLimitExceeded',\n inputs: [\n { name: 'normalizedRate', type: 'uint256' },\n { name: 'baselineRate', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'SameEngine', inputs: [] },\n { type: 'error', name: 'TokenCallFailed', inputs: [] },\n { type: 'error', name: 'TokenCallFalse', inputs: [] },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroAmount', inputs: [] },\n { type: 'error', name: 'ZeroMinimumAssets', inputs: [] },\n { type: 'error', name: 'ZeroMinimumEarnShares', inputs: [] },\n { type: 'error', name: 'ZeroMinimumEngineShares', inputs: [] },\n];\nexport const erc4626Engine = [\n {\n type: 'constructor',\n inputs: [\n { name: 'vault_', type: 'address' },\n { name: 'owner_', type: 'address' },\n { name: 'nameOverride_', type: 'string' },\n { name: 'symbolOverride_', type: 'string' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'baseAsset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'deposit',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'depositInKind',\n inputs: [\n { name: 'venueShares', type: 'uint256' },\n { name: 'from', type: 'address' },\n ],\n outputs: [{ name: 'engineSharesReceived', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'initializeEarnVault',\n inputs: [\n { name: 'earnVault_', type: 'address' },\n { name: 'finalOwner_', type: 'address' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'initializeEarnVault',\n inputs: [{ name: 'earnVault_', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'name',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOwner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewRedeem',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewWithdraw',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'redeem',\n inputs: [\n { name: 'engineShares', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minAssets', type: 'uint256' },\n ],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'renounceOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'shareScale',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'supportsInterface',\n inputs: [{ name: 'interfaceId', type: 'bytes4' }],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'symbol',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalAssets',\n inputs: [],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{ name: 'newOwner', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'valueOf',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'vault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'withdraw',\n inputs: [\n { name: 'assets', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n ],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'event',\n name: 'Deposited',\n inputs: [\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'engineShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EarnVaultInitialized',\n inputs: [{ name: 'earnVault', type: 'address', indexed: true }],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferStarted',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferred',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Redeemed',\n inputs: [\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'engineShares', type: 'uint256', indexed: false },\n { name: 'assets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'VenueSharesDeposited',\n inputs: [\n { name: 'from', type: 'address', indexed: true },\n { name: 'requestedVenueShares', type: 'uint256', indexed: false },\n { name: 'receivedEngineShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'WithdrewExact',\n inputs: [\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'engineSharesBurned', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'AlreadyInitialized', inputs: [] },\n { type: 'error', name: 'EarnVaultNotSet', inputs: [] },\n { type: 'error', name: 'EmptyMetadata', inputs: [] },\n {\n type: 'error',\n name: 'InsufficientAssetsReceived',\n inputs: [\n { name: 'minimumAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidVenueShareDecimals', inputs: [] },\n { type: 'error', name: 'NoVenueSharesReceived', inputs: [] },\n {\n type: 'error',\n name: 'NotEarnVault',\n inputs: [{ name: 'caller', type: 'address' }],\n },\n {\n type: 'error',\n name: 'OwnableInvalidOwner',\n inputs: [{ name: 'owner', type: 'address' }],\n },\n {\n type: 'error',\n name: 'OwnableUnauthorizedAccount',\n inputs: [{ name: 'account', type: 'address' }],\n },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n { type: 'error', name: 'TransferFailed', inputs: [] },\n {\n type: 'error',\n name: 'UnexpectedAssetsReceived',\n inputs: [\n { name: 'expectedAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'UnexpectedVenueSharesBurned',\n inputs: [\n { name: 'expectedShares', type: 'uint256' },\n { name: 'actualShares', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n];\nexport const erc4626EngineFactory = [\n {\n type: 'function',\n name: 'ENGINE_SALT_DOMAIN',\n inputs: [],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'computeEngineSalt',\n inputs: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'vault', type: 'address' },\n { name: 'owner', type: 'address' },\n { name: 'nameOverride', type: 'string' },\n { name: 'symbolOverride', type: 'string' },\n ],\n outputs: [{ name: '', type: 'bytes32' }],\n stateMutability: 'pure',\n },\n {\n type: 'function',\n name: 'deploy',\n inputs: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'vault', type: 'address' },\n { name: 'owner', type: 'address' },\n { name: 'nameOverride', type: 'string' },\n { name: 'symbolOverride', type: 'string' },\n ],\n outputs: [{ name: 'engine', type: 'address' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'predictEngine',\n inputs: [\n { name: 'deploymentId', type: 'bytes32' },\n { name: 'vault', type: 'address' },\n { name: 'owner', type: 'address' },\n { name: 'nameOverride', type: 'string' },\n { name: 'symbolOverride', type: 'string' },\n ],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'event',\n name: 'ERC4626EngineDeployed',\n inputs: [\n { name: 'engine', type: 'address', indexed: true },\n { name: 'vault', type: 'address', indexed: true },\n { name: 'owner', type: 'address', indexed: true },\n { name: 'asset', type: 'address', indexed: false },\n { name: 'deploymentId', type: 'bytes32', indexed: false },\n { name: 'engineSalt', type: 'bytes32', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'EmptyDeploymentId', inputs: [] },\n {\n type: 'error',\n name: 'EngineAlreadyExists',\n inputs: [{ name: 'engine', type: 'address' }],\n },\n { type: 'error', name: 'FactoryCannotBeFinalOwner', inputs: [] },\n];\nexport const vedaEngine = [\n {\n type: 'constructor',\n inputs: [\n { name: 'peripheryRegistry_', type: 'address' },\n { name: 'owner_', type: 'address' },\n { name: 'maxRateAge_', type: 'uint64' },\n { name: 'name_', type: 'string' },\n { name: 'symbol_', type: 'string' },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'acceptOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'accountant',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'accountantRateUpdatedAt',\n inputs: [],\n outputs: [{ name: '', type: 'uint64' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'asset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'authorizedForwarder',\n inputs: [{ name: 'forwarder', type: 'address' }],\n outputs: [{ name: 'authorized', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'baseAsset',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'cancelRedeem',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'claimQueue',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'claimRedeem',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [{ name: 'amount', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'deposit',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'earnVault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'finalizeOneExternal',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'forwardSolved',\n inputs: [\n { name: 'requestIds', type: 'bytes32[]' },\n { name: 'asset_', type: 'address' },\n { name: 'delta', type: 'uint256' },\n ],\n outputs: [{ name: 'claimed', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'getClaim',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n outputs: [\n { name: 'status', type: 'uint8' },\n {\n name: 'request',\n type: 'tuple',\n components: [\n { name: 'nonce', type: 'uint96' },\n { name: 'user', type: 'address' },\n { name: 'assetOut', type: 'address' },\n { name: 'amountOfShares', type: 'uint128' },\n { name: 'amountOfAssets', type: 'uint128' },\n { name: 'creationTime', type: 'uint40' },\n { name: 'secondsToMaturity', type: 'uint24' },\n { name: 'secondsToDeadline', type: 'uint24' },\n ],\n },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'initializeEarnVault',\n inputs: [\n { name: 'earnVault_', type: 'address' },\n { name: 'finalOwner_', type: 'address' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'initializeEarnVault',\n inputs: [{ name: 'earnVault_', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'isFeeValuationFresh',\n inputs: [],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxRateAge',\n inputs: [],\n outputs: [{ name: '', type: 'uint64' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'name',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'openClaimsByQueue',\n inputs: [{ name: 'requestQueue', type: 'address' }],\n outputs: [{ name: 'count', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOwner',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'peripheryRegistry',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'peripheryVersion',\n inputs: [],\n outputs: [{ name: '', type: 'uint64' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewRedeem',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'previewWithdraw',\n inputs: [{ name: 'assets', type: 'uint256' }],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'queue',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'rate',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'recoverExternalSettlement',\n inputs: [{ name: 'requestIds', type: 'bytes32[]' }],\n outputs: [{ name: 'claimed', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'redeem',\n inputs: [\n { name: 'engineShares', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n { name: 'minAssets', type: 'uint256' },\n ],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'renounceOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'requestRedeem',\n inputs: [\n { name: 'engineShares', type: 'uint256' },\n { name: 'requestData', type: 'bytes' },\n ],\n outputs: [{ name: 'requestId', type: 'bytes32' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setAuthorizedForwarder',\n inputs: [\n { name: 'account', type: 'address' },\n { name: 'authorized', type: 'bool' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setMaxRateAge',\n inputs: [{ name: 'newMaxRateAge', type: 'uint64' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'settled',\n inputs: [{ name: 'asset', type: 'address' }],\n outputs: [{ name: 'amount', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'shareScale',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'supportsInterface',\n inputs: [{ name: 'interfaceId', type: 'bytes4' }],\n outputs: [{ name: '', type: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'sweepDust',\n inputs: [\n { name: 'token', type: 'address' },\n { name: 'to', type: 'address' },\n { name: 'amount', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'symbol',\n inputs: [],\n outputs: [{ name: '', type: 'string' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'syncVedaPeriphery',\n inputs: [\n { name: 'minRate', type: 'uint256' },\n { name: 'maxRate', type: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'teller',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalAssets',\n inputs: [],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'totalShares',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{ name: 'newOwner', type: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'unresolvedClaimCount',\n inputs: [],\n outputs: [{ name: '', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'valueOf',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n outputs: [{ name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'vault',\n inputs: [],\n outputs: [{ name: '', type: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'withdraw',\n inputs: [\n { name: 'assets', type: 'uint256' },\n { name: 'receiver', type: 'address' },\n ],\n outputs: [{ name: 'engineShares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'event',\n name: 'AuthorizedForwarderChanged',\n inputs: [\n { name: 'account', type: 'address', indexed: true },\n { name: 'authorized', type: 'bool', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Deposited',\n inputs: [\n { name: 'earnVault', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'engineShares', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'DustSwept',\n inputs: [\n { name: 'token', type: 'address', indexed: true },\n { name: 'to', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'EarnVaultInitialized',\n inputs: [{ name: 'earnVault', type: 'address', indexed: true }],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'ExternalSettlementRecovered',\n inputs: [\n { name: 'requestCount', type: 'uint256', indexed: false },\n { name: 'recoveredAssets', type: 'uint256', indexed: false },\n { name: 'claimed', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'FinalizeFailed',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'asset', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Finalized',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'asset', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MaxRateAgeUpdated',\n inputs: [\n { name: 'oldMaxRateAge', type: 'uint64', indexed: false },\n { name: 'newMaxRateAge', type: 'uint64', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferStarted',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferred',\n inputs: [\n { name: 'previousOwner', type: 'address', indexed: true },\n { name: 'newOwner', type: 'address', indexed: true },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemCancelledOnQueue',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'engineShares', type: 'uint128', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemClaimed',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'asset', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RedeemRequested',\n inputs: [\n { name: 'requestId', type: 'bytes32', indexed: true },\n { name: 'assetOut', type: 'address', indexed: true },\n { name: 'engineShares', type: 'uint128', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Redeemed',\n inputs: [\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'engineShares', type: 'uint256', indexed: false },\n { name: 'assets', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Settled',\n inputs: [\n { name: 'asset', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n { name: 'newTotal', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Unearmarked',\n inputs: [\n { name: 'asset', type: 'address', indexed: true },\n { name: 'amount', type: 'uint256', indexed: false },\n { name: 'newTotal', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'VedaEngineInitialized',\n inputs: [\n { name: 'teller', type: 'address', indexed: true },\n { name: 'queue', type: 'address', indexed: true },\n { name: 'accountant', type: 'address', indexed: true },\n { name: 'peripheryVersion', type: 'uint64', indexed: false },\n { name: 'maxRateAge', type: 'uint64', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'VedaPeripheryUpdated',\n inputs: [\n { name: 'registryVersion', type: 'uint64', indexed: true },\n { name: 'oldTeller', type: 'address', indexed: true },\n { name: 'oldQueue', type: 'address', indexed: true },\n { name: 'oldAccountant', type: 'address', indexed: false },\n { name: 'newTeller', type: 'address', indexed: false },\n { name: 'newQueue', type: 'address', indexed: false },\n { name: 'newAccountant', type: 'address', indexed: false },\n { name: 'validatedRate', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'WithdrewExact',\n inputs: [\n { name: 'receiver', type: 'address', indexed: true },\n { name: 'assets', type: 'uint256', indexed: false },\n { name: 'engineSharesBurned', type: 'uint256', indexed: false },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'AlreadyInitialized', inputs: [] },\n {\n type: 'error',\n name: 'AssetsNotArrived',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n {\n type: 'error',\n name: 'BaseAssetSweepBlocked',\n inputs: [{ name: 'unresolvedClaims', type: 'uint256' }],\n },\n { type: 'error', name: 'CannotSweepEngineBacking', inputs: [] },\n {\n type: 'error',\n name: 'ClaimNotClaimable',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n {\n type: 'error',\n name: 'ClaimNotOpen',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n {\n type: 'error',\n name: 'CreditExceedsBalance',\n inputs: [\n { name: 'asset', type: 'address' },\n { name: 'have', type: 'uint256' },\n { name: 'wantTotal', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'DepositsNotPaused', inputs: [] },\n {\n type: 'error',\n name: 'DuplicateRequest',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n { type: 'error', name: 'EarnVaultNotSet', inputs: [] },\n { type: 'error', name: 'EmptyMetadata', inputs: [] },\n {\n type: 'error',\n name: 'EngineSharesTooLarge',\n inputs: [{ name: 'engineShares', type: 'uint256' }],\n },\n {\n type: 'error',\n name: 'InsufficientAssetsReceived',\n inputs: [\n { name: 'minimumAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'InvalidAsset',\n inputs: [\n { name: 'expected', type: 'address' },\n { name: 'actual', type: 'address' },\n ],\n },\n { type: 'error', name: 'InvalidMaxRateAge', inputs: [] },\n {\n type: 'error',\n name: 'InvalidRateTimestamp',\n inputs: [\n { name: 'updatedAt', type: 'uint256' },\n { name: 'currentTime', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'InvalidTrackedRequest',\n inputs: [{ name: 'requestId', type: 'bytes32' }],\n },\n {\n type: 'error',\n name: 'InvalidVedaPeriphery',\n inputs: [{ name: 'account', type: 'address' }],\n },\n {\n type: 'error',\n name: 'InvalidVedaPeripheryWiring',\n inputs: [\n { name: 'component', type: 'address' },\n { name: 'expected', type: 'address' },\n { name: 'actual', type: 'address' },\n ],\n },\n {\n type: 'error',\n name: 'InvalidVedaRateBounds',\n inputs: [\n { name: 'minRate', type: 'uint256' },\n { name: 'maxRate', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidVenueShareDecimals', inputs: [] },\n { type: 'error', name: 'NoPublishedVedaPeriphery', inputs: [] },\n { type: 'error', name: 'NoRecoverableClaims', inputs: [] },\n { type: 'error', name: 'NoVenueSharesReceived', inputs: [] },\n {\n type: 'error',\n name: 'NotAuthorizedForwarder',\n inputs: [{ name: 'caller', type: 'address' }],\n },\n {\n type: 'error',\n name: 'NotEarnVault',\n inputs: [{ name: 'caller', type: 'address' }],\n },\n { type: 'error', name: 'NotSelf', inputs: [] },\n {\n type: 'error',\n name: 'OwnableInvalidOwner',\n inputs: [{ name: 'owner', type: 'address' }],\n },\n {\n type: 'error',\n name: 'OwnableUnauthorizedAccount',\n inputs: [{ name: 'account', type: 'address' }],\n },\n {\n type: 'error',\n name: 'QueueTrackingDisabled',\n inputs: [{ name: 'queue', type: 'address' }],\n },\n { type: 'error', name: 'QueueUnavailable', inputs: [] },\n {\n type: 'error',\n name: 'QueuedAssetsBelowMinimum',\n inputs: [\n { name: 'minimumAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'RateChangedWithinTransaction',\n inputs: [\n { name: 'expected', type: 'uint256' },\n { name: 'actual', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'ReentrantCall', inputs: [] },\n {\n type: 'error',\n name: 'RegistryEngineMismatch',\n inputs: [\n { name: 'expected', type: 'address' },\n { name: 'actual', type: 'address' },\n ],\n },\n {\n type: 'error',\n name: 'SolveUnderfunded',\n inputs: [\n { name: 'asset', type: 'address' },\n { name: 'delivered', type: 'uint256' },\n { name: 'required', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'StaleAccountantRate',\n inputs: [\n { name: 'updatedAt', type: 'uint256' },\n { name: 'currentTime', type: 'uint256' },\n { name: 'maxAge', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'SweepExceedsAvailableBalance',\n inputs: [\n { name: 'token', type: 'address' },\n { name: 'available', type: 'uint256' },\n { name: 'requested', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'TransferFailed', inputs: [] },\n {\n type: 'error',\n name: 'UnexpectedAssetsReceived',\n inputs: [\n { name: 'expectedAssets', type: 'uint256' },\n { name: 'actualAssets', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'UnexpectedVenueSharesBurned',\n inputs: [\n { name: 'expectedShares', type: 'uint256' },\n { name: 'actualShares', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'UnexpectedVenueSharesQueued',\n inputs: [\n { name: 'expectedShares', type: 'uint256' },\n { name: 'actualShares', type: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'UnsupportedAccountantFreshness',\n inputs: [{ name: 'accountant', type: 'address' }],\n },\n {\n type: 'error',\n name: 'VedaRateOutOfBounds',\n inputs: [\n { name: 'rate', type: 'uint256' },\n { name: 'minRate', type: 'uint256' },\n { name: 'maxRate', type: 'uint256' },\n ],\n },\n { type: 'error', name: 'ZeroAddress', inputs: [] },\n { type: 'error', name: 'ZeroMinimumQueuedAssets', inputs: [] },\n];\n// `SingleZoneEarnRouter.CallbackData` parameter for `encodeAbiParameters`.\nexport const earnRouterCallbackData = [\n {\n components: [\n { name: 'flow', type: 'uint8' },\n { name: 'minVaultAssets', type: 'uint128' },\n { name: 'minEarnShares', type: 'uint128' },\n { name: 'minOutputAmount', type: 'uint128' },\n { name: 'actionId', type: 'bytes32' },\n {\n components: [\n { name: 'keyIndex', type: 'uint256' },\n {\n components: [\n { name: 'ephemeralPubkeyX', type: 'bytes32' },\n { name: 'ephemeralPubkeyYParity', type: 'uint8' },\n { name: 'ciphertext', type: 'bytes' },\n { name: 'nonce', type: 'bytes12' },\n { name: 'tag', type: 'bytes16' },\n ],\n name: 'encrypted',\n type: 'tuple',\n },\n { name: 'refundRecipient', type: 'address' },\n ],\n name: 'zoneReturn',\n type: 'tuple',\n },\n ],\n name: 'callbackData',\n type: 'tuple',\n },\n];\n// Source: tempoxyz/zones@22318d90a098149fecd0c56ae4e20e55fea24bdd\nexport const zonePortalPreT13Retired = [\n {\n name: 'MAX_DEPOSITS_PER_TEMPO_BLOCK',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'MAX_TOKENS_ENABLED_PER_TEMPO_BLOCK',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'submitBatch',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint64', name: 'tempoBlockNumber' },\n { type: 'uint64', name: 'recentTempoBlockNumber' },\n {\n type: 'tuple',\n name: 'blockTransition',\n components: [\n { type: 'bytes32', name: 'prevBlockHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n ],\n },\n {\n type: 'tuple',\n name: 'depositQueueTransition',\n components: [\n { type: 'bytes32', name: 'prevProcessedHash' },\n { type: 'bytes32', name: 'nextProcessedHash' },\n { type: 'uint64', name: 'prevDepositNumber' },\n { type: 'uint64', name: 'nextDepositNumber' },\n ],\n },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'bytes', name: 'verifierConfig' },\n { type: 'bytes', name: 'proof' },\n { type: 'uint256', name: 'nextZoneHeight' },\n { type: 'bytes[]', name: 'signatures' },\n ],\n outputs: [],\n },\n {\n name: 'BatchSubmitted',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'withdrawalBatchIndex', indexed: true },\n { type: 'uint256', name: 'withdrawalQueueIndex', indexed: true },\n { type: 'bytes32', name: 'nextProcessedDepositQueueHash' },\n { type: 'bytes32', name: 'nextBlockHash' },\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'uint64', name: 'lastProcessedDepositNumber' },\n ],\n },\n];\nexport const zoneOutbox = [\n {\n name: 'tempoGasRate',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'maxWithdrawalsPerBlock',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint32' }],\n },\n {\n name: 'lastBatch',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'tuple',\n components: [\n { type: 'bytes32', name: 'withdrawalQueueHash' },\n { type: 'uint64', name: 'withdrawalBatchIndex' },\n ],\n },\n ],\n },\n {\n name: 'lastFinalizedTimestamp',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'nextWithdrawalIndex',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'lastFallbackNonce',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'pendingWithdrawalsCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'getPendingWithdrawals',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [\n {\n type: 'tuple[]',\n components: [\n { type: 'address', name: 'token' },\n { type: 'address', name: 'sender' },\n { type: 'bytes32', name: 'txHash' },\n { type: 'address', name: 'to' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'uint64', name: 'fallbackNonce' },\n { type: 'bytes', name: 'callbackData' },\n { type: 'bytes', name: 'revealTo' },\n ],\n },\n ],\n },\n {\n name: 'consumeFallbackRecipient',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint64', name: 'fallbackNonce' }],\n outputs: [{ type: 'address', name: 'recipient' }],\n },\n {\n name: 'calculateWithdrawalFee',\n type: 'function',\n stateMutability: 'view',\n inputs: [{ type: 'uint64', name: 'gasLimit' }],\n outputs: [{ type: 'uint128', name: 'fee' }],\n },\n {\n name: 'MAX_CALLBACK_DATA_SIZE',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'MAX_WITHDRAWAL_GAS_LIMIT',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'WITHDRAWAL_BASE_GAS',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'REVEAL_TO_KEY_LENGTH',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'AUTHENTICATED_WITHDRAWAL_CIPHERTEXT_LENGTH',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint256' }],\n },\n {\n name: 'setTempoGasRate',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint128', name: '_tempoGasRate' }],\n outputs: [],\n },\n {\n name: 'setMaxWithdrawalsPerBlock',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'uint32', name: '_maxWithdrawalsPerBlock' }],\n outputs: [],\n },\n {\n name: 'requestWithdrawal',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'address', name: 'to' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'address', name: 'zoneFallbackRecipient' },\n { type: 'bytes', name: 'data' },\n { type: 'bytes', name: 'revealTo' },\n ],\n outputs: [],\n },\n {\n name: 'enqueueDepositBounceBack',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'address', name: 'tempoRefundRecipient' },\n ],\n outputs: [],\n },\n {\n name: 'finalizeWithdrawalBatch',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint256', name: 'count' },\n { type: 'uint64', name: 'blockNumber' },\n { type: 'bytes[]', name: 'encryptedSenders' },\n ],\n outputs: [{ type: 'bytes32', name: 'withdrawalQueueHash' }],\n },\n {\n name: 'WithdrawalRequested',\n type: 'event',\n inputs: [\n { type: 'uint64', name: 'withdrawalIndex', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'address', name: 'to' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint128', name: 'fee' },\n { type: 'bytes32', name: 'memo' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'uint64', name: 'fallbackNonce' },\n { type: 'bytes', name: 'data' },\n { type: 'bytes', name: 'revealTo' },\n ],\n },\n {\n name: 'BatchFinalized',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'withdrawalQueueHash', indexed: true },\n { type: 'uint64', name: 'withdrawalBatchIndex' },\n ],\n },\n {\n name: 'TempoGasRateUpdated',\n type: 'event',\n inputs: [{ type: 'uint128', name: 'tempoGasRate' }],\n },\n {\n name: 'MaxWithdrawalsPerBlockUpdated',\n type: 'event',\n inputs: [{ type: 'uint32', name: 'maxWithdrawalsPerBlock' }],\n },\n { name: 'OnlySequencer', type: 'error', inputs: [] },\n { name: 'GasLimitTooHigh', type: 'error', inputs: [] },\n { name: 'OnlyZoneInbox', type: 'error', inputs: [] },\n {\n name: 'InvalidWithdrawalCount',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'actual' },\n { type: 'uint256', name: 'expected' },\n ],\n },\n {\n name: 'InvalidEncryptedSenderCount',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'actual' },\n { type: 'uint256', name: 'expected' },\n ],\n },\n {\n name: 'InvalidEncryptedSenderLength',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'actual' },\n { type: 'uint256', name: 'expected' },\n ],\n },\n { name: 'InvalidFallbackRecipient', type: 'error', inputs: [] },\n { name: 'CallbackDataTooLarge', type: 'error', inputs: [] },\n { name: 'GasFeeRateTooHigh', type: 'error', inputs: [] },\n { name: 'TransferFailed', type: 'error', inputs: [] },\n { name: 'InvalidBlockNumber', type: 'error', inputs: [] },\n { name: 'TooManyWithdrawalsThisBlock', type: 'error', inputs: [] },\n { name: 'InvalidRevealTo', type: 'error', inputs: [] },\n { name: 'InvalidCurrentTxHash', type: 'error', inputs: [] },\n { name: 'ZeroAmountWithdrawal', type: 'error', inputs: [] },\n { name: 'StaticCallNotAllowed', type: 'error', inputs: [] },\n];\nexport const zoneMessenger = [\n {\n name: 'relayMessage',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'uint32', name: 'zoneId' },\n { type: 'address', name: 'token' },\n { type: 'bytes32', name: 'senderTag' },\n { type: 'address', name: 'target' },\n { type: 'uint128', name: 'amount' },\n { type: 'uint64', name: 'gasLimit' },\n { type: 'bytes', name: 'data' },\n ],\n outputs: [],\n },\n];\n// ZoneInbox ABI from tempoxyz/zones.\nexport const zoneInbox = [\n {\n name: 'processedDepositQueueHash',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'processedDepositNumber',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'processedTokenEnablementHash',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'bytes32' }],\n },\n {\n name: 'processedEnabledTokenCount',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'uint64' }],\n },\n {\n name: 'tempoPortal',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'tempoState',\n type: 'function',\n stateMutability: 'view',\n inputs: [],\n outputs: [{ type: 'address' }],\n },\n {\n name: 'refunds',\n type: 'function',\n stateMutability: 'view',\n inputs: [\n { type: 'address', name: 'token' },\n { type: 'address', name: 'owner' },\n ],\n outputs: [{ type: 'uint128' }],\n },\n {\n name: 'claimRefund',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'address', name: 'token' }],\n outputs: [{ type: 'uint128', name: 'amount' }],\n },\n {\n name: 'advanceTempo',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [\n { type: 'bytes', name: 'header' },\n {\n type: 'tuple[]',\n name: 'deposits',\n components: [\n { type: 'uint8', name: 'depositType' },\n { type: 'bytes', name: 'depositData' },\n { type: 'bool', name: 'rejected' },\n ],\n },\n {\n type: 'tuple[]',\n name: 'decryptions',\n components: [\n { type: 'bytes32', name: 'sharedSecret' },\n { type: 'uint8', name: 'sharedSecretYParity' },\n {\n type: 'tuple',\n name: 'cpProof',\n components: [\n { type: 'bytes32', name: 's' },\n { type: 'bytes32', name: 'c' },\n ],\n },\n ],\n },\n {\n type: 'tuple[]',\n name: 'enabledTokens',\n components: [\n { type: 'address', name: 'token' },\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n ],\n },\n ],\n outputs: [],\n },\n {\n name: 'advanceTempoHeaders',\n type: 'function',\n stateMutability: 'nonpayable',\n inputs: [{ type: 'bytes[]', name: 'headers' }],\n outputs: [],\n },\n {\n name: 'TempoAdvanced',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'tempoBlockHash', indexed: true },\n { type: 'uint64', name: 'tempoBlockNumber', indexed: true },\n { type: 'uint256', name: 'depositsProcessed' },\n { type: 'bytes32', name: 'newProcessedDepositQueueHash' },\n { type: 'uint64', name: 'lastProcessedDepositNumber' },\n ],\n },\n {\n name: 'TempoAdvanced',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'tempoBlockHash', indexed: true },\n { type: 'uint64', name: 'tempoBlockNumber', indexed: true },\n { type: 'uint256', name: 'depositsProcessed' },\n { type: 'bytes32', name: 'newProcessedDepositQueueHash' },\n { type: 'uint64', name: 'lastProcessedDepositNumber' },\n { type: 'uint64', name: 'lastProcessedEnabledTokenCount' },\n ],\n },\n {\n name: 'DepositProcessed',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'depositHash', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'address', name: 'to', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'bytes32', name: 'memo' },\n ],\n },\n {\n name: 'DepositFailed',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'depositHash', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n ],\n },\n {\n name: 'DepositRejected',\n type: 'event',\n inputs: [\n { type: 'bytes32', name: 'depositHash', indexed: true },\n { type: 'address', name: 'sender', indexed: true },\n { type: 'uint8', name: 'depositType' },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n { type: 'address', name: 'tempoRefundRecipient' },\n ],\n },\n {\n name: 'WithdrawalBounceBackProcessed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'zoneFallbackRecipient', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n ],\n },\n {\n name: 'WithdrawalBounceBackPending',\n type: 'event',\n inputs: [\n { type: 'address', name: 'zoneFallbackRecipient', indexed: true },\n { type: 'address', name: 'token' },\n { type: 'uint128', name: 'amount' },\n ],\n },\n {\n name: 'RefundClaimed',\n type: 'event',\n inputs: [\n { type: 'address', name: 'recipient', indexed: true },\n { type: 'address', name: 'token', indexed: true },\n { type: 'uint128', name: 'amount' },\n ],\n },\n {\n name: 'TokenEnabled',\n type: 'event',\n inputs: [\n { type: 'address', name: 'token', indexed: true },\n { type: 'string', name: 'name' },\n { type: 'string', name: 'symbol' },\n { type: 'string', name: 'currency' },\n ],\n },\n { name: 'OnlySequencer', type: 'error', inputs: [] },\n { name: 'InvalidDepositQueueHash', type: 'error', inputs: [] },\n { name: 'InvalidWithdrawalBounceBack', type: 'error', inputs: [] },\n { name: 'InvalidTokenEnablementHash', type: 'error', inputs: [] },\n { name: 'MissingDecryptionData', type: 'error', inputs: [] },\n { name: 'ExtraDecryptionData', type: 'error', inputs: [] },\n { name: 'InvalidSharedSecretProof', type: 'error', inputs: [] },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n];\n// Source: tempoxyz/propAMM@bff7c1fa50cf72e2896a078abae4e164c36caa93\nexport const directPropAmm = [\n {\n type: 'constructor',\n inputs: [\n { name: 'baseToken_', type: 'address', internalType: 'contract ITIP20' },\n { name: 'quoteToken_', type: 'address', internalType: 'contract ITIP20' },\n {\n name: 'oracle_',\n type: 'address',\n internalType: 'contract IPriceOracle',\n },\n {\n name: 'addressRegistry_',\n type: 'address',\n internalType: 'contract IAddressRegistry',\n },\n { name: 'owner_', type: 'address', internalType: 'address' },\n { name: 'guardian_', type: 'address', internalType: 'address' },\n { name: 'maxOracleAge_', type: 'uint256', internalType: 'uint256' },\n {\n name: 'maxPriceDeviationBps_',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'BPS',\n inputs: [],\n outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'acceptOwnership',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'addressRegistry',\n inputs: [],\n outputs: [\n { name: '', type: 'address', internalType: 'contract IAddressRegistry' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'baseDecimals',\n inputs: [],\n outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'baseToQuotePriceAnchor',\n inputs: [],\n outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'baseToken',\n inputs: [],\n outputs: [{ name: '', type: 'address', internalType: 'contract ITIP20' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'fund',\n inputs: [\n { name: 'token', type: 'address', internalType: 'address' },\n { name: 'amount', type: 'uint256', internalType: 'uint256' },\n { name: 'memo', type: 'bytes32', internalType: 'bytes32' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'guardian',\n inputs: [],\n outputs: [{ name: '', type: 'address', internalType: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxOracleAge',\n inputs: [],\n outputs: [{ name: '', type: 'uint80', internalType: 'uint80' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'maxPriceDeviationBps',\n inputs: [],\n outputs: [{ name: '', type: 'uint16', internalType: 'uint16' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'oracle',\n inputs: [],\n outputs: [\n { name: '', type: 'address', internalType: 'contract IPriceOracle' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'oracleDecimals',\n inputs: [],\n outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'owner',\n inputs: [],\n outputs: [{ name: '', type: 'address', internalType: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pause',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'paused',\n inputs: [],\n outputs: [{ name: '', type: 'bool', internalType: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'pendingOwner',\n inputs: [],\n outputs: [{ name: '', type: 'address', internalType: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'priceAnchor',\n inputs: [{ name: 'baseToQuote', type: 'bool', internalType: 'bool' }],\n outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'priceScale',\n inputs: [],\n outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteDecimals',\n inputs: [],\n outputs: [{ name: '', type: 'uint8', internalType: 'uint8' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteExactInput',\n inputs: [\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountIn', type: 'uint256', internalType: 'uint256' },\n ],\n outputs: [\n { name: 'amountOut', type: 'uint256', internalType: 'uint256' },\n { name: 'price', type: 'uint256', internalType: 'uint256' },\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteExactInputFor',\n inputs: [\n { name: 'taker', type: 'address', internalType: 'address' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'customerId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountIn', type: 'uint256', internalType: 'uint256' },\n ],\n outputs: [\n { name: 'amountOut', type: 'uint256', internalType: 'uint256' },\n { name: 'price', type: 'uint256', internalType: 'uint256' },\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n { name: 'creditAfter', type: 'uint256', internalType: 'uint256' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteExactOutput',\n inputs: [\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountOut', type: 'uint256', internalType: 'uint256' },\n ],\n outputs: [\n { name: 'amountIn', type: 'uint256', internalType: 'uint256' },\n { name: 'price', type: 'uint256', internalType: 'uint256' },\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteExactOutputFor',\n inputs: [\n { name: 'taker', type: 'address', internalType: 'address' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'customerId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountOut', type: 'uint256', internalType: 'uint256' },\n ],\n outputs: [\n { name: 'amountIn', type: 'uint256', internalType: 'uint256' },\n { name: 'price', type: 'uint256', internalType: 'uint256' },\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n { name: 'creditAfter', type: 'uint256', internalType: 'uint256' },\n ],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteToBasePriceAnchor',\n inputs: [],\n outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'quoteToken',\n inputs: [],\n outputs: [{ name: '', type: 'address', internalType: 'contract ITIP20' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'recipientAllowed',\n inputs: [{ name: 'recipient', type: 'address', internalType: 'address' }],\n outputs: [{ name: 'allowed', type: 'bool', internalType: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'resetPriceAnchor',\n inputs: [{ name: 'baseToQuote', type: 'bool', internalType: 'bool' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'resolveRecipient',\n inputs: [{ name: 'recipient', type: 'address', internalType: 'address' }],\n outputs: [{ name: 'resolved', type: 'address', internalType: 'address' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'roundingCredit',\n inputs: [{ name: 'routeKey', type: 'bytes32', internalType: 'bytes32' }],\n outputs: [{ name: 'credit', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'roundingRouteKey',\n inputs: [\n { name: 'taker', type: 'address', internalType: 'address' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'customerId', type: 'bytes32', internalType: 'bytes32' },\n ],\n outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'setGuardian',\n inputs: [{ name: 'newGuardian', type: 'address', internalType: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setMaxOracleAge',\n inputs: [\n { name: 'newMaxOracleAge', type: 'uint256', internalType: 'uint256' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setMaxPriceDeviationBps',\n inputs: [\n {\n name: 'newMaxPriceDeviationBps',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setOracle',\n inputs: [\n {\n name: 'newOracle',\n type: 'address',\n internalType: 'contract IPriceOracle',\n },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setRecipientAllowed',\n inputs: [\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'allowed', type: 'bool', internalType: 'bool' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'setTakerAllowed',\n inputs: [\n { name: 'taker', type: 'address', internalType: 'address' },\n { name: 'allowed', type: 'bool', internalType: 'bool' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'swapExactInput',\n inputs: [\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountIn', type: 'uint256', internalType: 'uint256' },\n { name: 'minAmountOut', type: 'uint256', internalType: 'uint256' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'customerId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'tradeId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'deadline', type: 'uint256', internalType: 'uint256' },\n { name: 'expectedOraclePrice', type: 'uint256', internalType: 'uint256' },\n {\n name: 'oraclePriceToleranceBps',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'minimumOracleUpdatedAt',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n outputs: [{ name: 'amountOut', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'swapExactOutput',\n inputs: [\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'amountOut', type: 'uint256', internalType: 'uint256' },\n { name: 'maxAmountIn', type: 'uint256', internalType: 'uint256' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'customerId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'tradeId', type: 'bytes32', internalType: 'bytes32' },\n { name: 'deadline', type: 'uint256', internalType: 'uint256' },\n { name: 'expectedOraclePrice', type: 'uint256', internalType: 'uint256' },\n {\n name: 'oraclePriceToleranceBps',\n type: 'uint256',\n internalType: 'uint256',\n },\n {\n name: 'minimumOracleUpdatedAt',\n type: 'uint256',\n internalType: 'uint256',\n },\n ],\n outputs: [{ name: 'amountIn', type: 'uint256', internalType: 'uint256' }],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'takerAllowed',\n inputs: [{ name: 'taker', type: 'address', internalType: 'address' }],\n outputs: [{ name: 'allowed', type: 'bool', internalType: 'bool' }],\n stateMutability: 'view',\n },\n {\n type: 'function',\n name: 'transferOwnership',\n inputs: [{ name: 'newOwner', type: 'address', internalType: 'address' }],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'unpause',\n inputs: [],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'function',\n name: 'withdraw',\n inputs: [\n { name: 'token', type: 'address', internalType: 'address' },\n { name: 'recipient', type: 'address', internalType: 'address' },\n { name: 'amount', type: 'uint256', internalType: 'uint256' },\n { name: 'memo', type: 'bytes32', internalType: 'bytes32' },\n ],\n outputs: [],\n stateMutability: 'nonpayable',\n },\n {\n type: 'event',\n name: 'Funded',\n inputs: [\n {\n name: 'token',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n { name: 'memo', type: 'bytes32', indexed: true, internalType: 'bytes32' },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'GuardianUpdated',\n inputs: [\n {\n name: 'oldGuardian',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'newGuardian',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MaxOracleAgeUpdated',\n inputs: [\n {\n name: 'oldMaxAge',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'newMaxAge',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'MaxPriceDeviationBpsUpdated',\n inputs: [\n {\n name: 'oldMaxPriceDeviationBps',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'newMaxPriceDeviationBps',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OracleUpdated',\n inputs: [\n {\n name: 'oldOracle',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'newOracle',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'decimals',\n type: 'uint8',\n indexed: false,\n internalType: 'uint8',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferStarted',\n inputs: [\n {\n name: 'oldOwner',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'pendingOwner',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'OwnershipTransferred',\n inputs: [\n {\n name: 'oldOwner',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'newOwner',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'PausedStateChanged',\n inputs: [\n { name: 'paused', type: 'bool', indexed: false, internalType: 'bool' },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'PriceAnchorUpdated',\n inputs: [\n {\n name: 'baseToQuote',\n type: 'bool',\n indexed: true,\n internalType: 'bool',\n },\n {\n name: 'oldAnchor',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'newAnchor',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RecipientPermissionUpdated',\n inputs: [\n {\n name: 'recipient',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n { name: 'allowed', type: 'bool', indexed: false, internalType: 'bool' },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'RoundingCreditUpdated',\n inputs: [\n {\n name: 'routeKey',\n type: 'bytes32',\n indexed: true,\n internalType: 'bytes32',\n },\n {\n name: 'previousCredit',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'newCredit',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'TakerPermissionUpdated',\n inputs: [\n {\n name: 'taker',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n { name: 'allowed', type: 'bool', indexed: false, internalType: 'bool' },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'TradeExecuted',\n inputs: [\n {\n name: 'taker',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'customerId',\n type: 'bytes32',\n indexed: true,\n internalType: 'bytes32',\n },\n {\n name: 'tradeId',\n type: 'bytes32',\n indexed: false,\n internalType: 'bytes32',\n },\n {\n name: 'tokenIn',\n type: 'address',\n indexed: false,\n internalType: 'address',\n },\n {\n name: 'tokenOut',\n type: 'address',\n indexed: false,\n internalType: 'address',\n },\n {\n name: 'amountIn',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'amountOut',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'oraclePrice',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'oracleUpdatedAt',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n ],\n anonymous: false,\n },\n {\n type: 'event',\n name: 'Withdrawn',\n inputs: [\n {\n name: 'token',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'recipient',\n type: 'address',\n indexed: true,\n internalType: 'address',\n },\n {\n name: 'amount',\n type: 'uint256',\n indexed: false,\n internalType: 'uint256',\n },\n {\n name: 'memo',\n type: 'bytes32',\n indexed: false,\n internalType: 'bytes32',\n },\n ],\n anonymous: false,\n },\n { type: 'error', name: 'AmountIsZero', inputs: [] },\n { type: 'error', name: 'CustomerIdIsZero', inputs: [] },\n {\n type: 'error',\n name: 'DeadlineExpired',\n inputs: [\n { name: 'deadline', type: 'uint256', internalType: 'uint256' },\n { name: 'currentTimestamp', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'ExactBalanceDeltaFailed',\n inputs: [\n { name: 'token', type: 'address', internalType: 'address' },\n { name: 'expected', type: 'uint256', internalType: 'uint256' },\n { name: 'actual', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'FutureOracleTimestamp',\n inputs: [\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n { name: 'currentTime', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'InsufficientInventory',\n inputs: [\n { name: 'token', type: 'address', internalType: 'address' },\n { name: 'available', type: 'uint256', internalType: 'uint256' },\n { name: 'required', type: 'uint256', internalType: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidAddress', inputs: [] },\n { type: 'error', name: 'InvalidMaxOracleAge', inputs: [] },\n {\n type: 'error',\n name: 'InvalidMaxPriceDeviationBps',\n inputs: [\n { name: 'supplied', type: 'uint256', internalType: 'uint256' },\n { name: 'maximum', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'InvalidOraclePriceToleranceBps',\n inputs: [\n { name: 'supplied', type: 'uint256', internalType: 'uint256' },\n { name: 'maximum', type: 'uint256', internalType: 'uint256' },\n ],\n },\n { type: 'error', name: 'InvalidPrice', inputs: [] },\n { type: 'error', name: 'NotGuardianOrOwner', inputs: [] },\n { type: 'error', name: 'NotOwner', inputs: [] },\n { type: 'error', name: 'NotPaused', inputs: [] },\n { type: 'error', name: 'NotPendingOwner', inputs: [] },\n {\n type: 'error',\n name: 'OracleDecimalsChanged',\n inputs: [\n { name: 'currentDecimals', type: 'uint8', internalType: 'uint8' },\n { name: 'proposedDecimals', type: 'uint8', internalType: 'uint8' },\n ],\n },\n {\n type: 'error',\n name: 'OraclePriceToleranceExceeded',\n inputs: [\n { name: 'expectedPrice', type: 'uint256', internalType: 'uint256' },\n { name: 'actualPrice', type: 'uint256', internalType: 'uint256' },\n { name: 'toleranceBps', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'OracleTimestampTooOld',\n inputs: [\n { name: 'minimumUpdatedAt', type: 'uint256', internalType: 'uint256' },\n { name: 'actualUpdatedAt', type: 'uint256', internalType: 'uint256' },\n ],\n },\n { type: 'error', name: 'Paused', inputs: [] },\n {\n type: 'error',\n name: 'PriceAnchorNotInitialized',\n inputs: [{ name: 'baseToQuote', type: 'bool', internalType: 'bool' }],\n },\n {\n type: 'error',\n name: 'PriceDeviationExceeded',\n inputs: [\n { name: 'baseToQuote', type: 'bool', internalType: 'bool' },\n { name: 'price', type: 'uint256', internalType: 'uint256' },\n { name: 'anchor', type: 'uint256', internalType: 'uint256' },\n { name: 'maxDeviationBps', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'RecipientNotAllowed',\n inputs: [{ name: 'recipient', type: 'address', internalType: 'address' }],\n },\n { type: 'error', name: 'ReentrancyGuardReentrantCall', inputs: [] },\n { type: 'error', name: 'SameToken', inputs: [] },\n {\n type: 'error',\n name: 'SlippageExceeded',\n inputs: [\n { name: 'limit', type: 'uint256', internalType: 'uint256' },\n { name: 'actual', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'StaleOraclePrice',\n inputs: [\n { name: 'updatedAt', type: 'uint256', internalType: 'uint256' },\n { name: 'maxAge', type: 'uint256', internalType: 'uint256' },\n ],\n },\n {\n type: 'error',\n name: 'TakerNotAllowed',\n inputs: [{ name: 'taker', type: 'address', internalType: 'address' }],\n },\n {\n type: 'error',\n name: 'TokenTransferFailed',\n inputs: [{ name: 'token', type: 'address', internalType: 'address' }],\n },\n {\n type: 'error',\n name: 'UnsupportedDecimals',\n inputs: [\n { name: 'baseDecimals', type: 'uint8', internalType: 'uint8' },\n { name: 'quoteDecimals', type: 'uint8', internalType: 'uint8' },\n { name: 'oracleDecimals', type: 'uint8', internalType: 'uint8' },\n ],\n },\n {\n type: 'error',\n name: 'UnsupportedToken',\n inputs: [{ name: 'token', type: 'address', internalType: 'address' }],\n },\n];\nexport const core = [\n ...accountKeychain,\n ...addressRegistry,\n ...configurableAccount,\n ...currentCommittee,\n ...feeAmm,\n ...feeManager,\n ...nonce,\n ...receivePolicyGuard,\n ...signatureVerifier,\n ...stablecoinDex,\n ...storageCredits,\n ...tip20,\n ...tip20ChannelReserve,\n ...tip20Factory,\n ...tip403Registry,\n ...validatorConfig,\n ...validatorConfigV2,\n ...zoneFactory,\n ...zonePortal,\n ...zoneVerifier,\n];\nexport const earn = [\n ...earnContributionController,\n ...earnEngine,\n ...earnEngineAsyncRedeem,\n ...earnEngineInKindDeposit,\n ...earnFactory,\n ...earnFees,\n ...earnMerkleRewardDistributor,\n ...earnRewardsFactory,\n ...earnRouter,\n ...earnVault,\n ...erc4626Engine,\n ...erc4626EngineFactory,\n ...vedaEngine,\n];\nexport const zone = [\n ...zoneInbox,\n ...zoneMessenger,\n ...zoneOutbox,\n ...zonePortalPreT13Retired,\n];\nexport const propAmm = [...directPropAmm];\nexport const all = [...core, ...earn, ...zone, ...propAmm];\n/** Deduplicated errors of `core`, for decoding reverts that bubble up across precompiles. */\nexport const coreErrors = [\n { name: 'UnauthorizedCaller', type: 'error', inputs: [] },\n { name: 'KeyAlreadyExists', type: 'error', inputs: [] },\n { name: 'KeyNotFound', type: 'error', inputs: [] },\n { name: 'KeyExpired', type: 'error', inputs: [] },\n { name: 'SpendingLimitExceeded', type: 'error', inputs: [] },\n { name: 'InvalidSpendingLimit', type: 'error', inputs: [] },\n { name: 'InvalidSignatureType', type: 'error', inputs: [] },\n { name: 'ZeroPublicKey', type: 'error', inputs: [] },\n { name: 'ExpiryInPast', type: 'error', inputs: [] },\n { name: 'KeyAlreadyRevoked', type: 'error', inputs: [] },\n {\n name: 'SignatureTypeMismatch',\n type: 'error',\n inputs: [\n { type: 'uint8', name: 'expected' },\n { type: 'uint8', name: 'actual' },\n ],\n },\n { name: 'CallNotAllowed', type: 'error', inputs: [] },\n { name: 'InvalidCallScope', type: 'error', inputs: [] },\n { name: 'InvalidKeyId', type: 'error', inputs: [] },\n { name: 'InvalidKeyAuthorizationWitness', type: 'error', inputs: [] },\n { name: 'KeyAuthorizationWitnessAlreadyBurned', type: 'error', inputs: [] },\n {\n name: 'LegacyAuthorizeKeySelectorChanged',\n type: 'error',\n inputs: [{ type: 'bytes4', name: 'newSelector' }],\n },\n {\n name: 'MasterIdCollision',\n type: 'error',\n inputs: [{ type: 'address', name: 'master' }],\n },\n { name: 'InvalidMasterAddress', type: 'error', inputs: [] },\n { name: 'ProofOfWorkFailed', type: 'error', inputs: [] },\n { name: 'VirtualAddressUnregistered', type: 'error', inputs: [] },\n { name: 'InvalidAccount', type: 'error', inputs: [] },\n { name: 'InvalidConfig', type: 'error', inputs: [] },\n { name: 'InvalidThreshold', type: 'error', inputs: [] },\n { name: 'InvalidConfigurableAccountOwner', type: 'error', inputs: [] },\n { name: 'InvalidWeight', type: 'error', inputs: [] },\n { name: 'TooManyOwners', type: 'error', inputs: [] },\n { name: 'DuplicateOwner', type: 'error', inputs: [] },\n { name: 'InvalidOwnerOrder', type: 'error', inputs: [] },\n { name: 'UnauthorizedConfigurableAccountCaller', type: 'error', inputs: [] },\n { name: 'PrimitiveRootRequired', type: 'error', inputs: [] },\n { name: 'UpgradeMustBeOnlyCall', type: 'error', inputs: [] },\n { name: 'AccountAlreadyConfigurable', type: 'error', inputs: [] },\n { name: 'AccountHasCode', type: 'error', inputs: [] },\n { name: 'Unauthorized', type: 'error', inputs: [] },\n { name: 'IdenticalAddresses', type: 'error', inputs: [] },\n { name: 'InvalidToken', type: 'error', inputs: [] },\n { name: 'InsufficientLiquidity', type: 'error', inputs: [] },\n { name: 'InsufficientReserves', type: 'error', inputs: [] },\n { name: 'InvalidAmount', type: 'error', inputs: [] },\n { name: 'DivisionByZero', type: 'error', inputs: [] },\n { name: 'InvalidSwapCalculation', type: 'error', inputs: [] },\n { name: 'InsufficientFeeTokenBalance', type: 'error', inputs: [] },\n { name: 'CannotChangeWithinBlock', type: 'error', inputs: [] },\n { name: 'ProtocolNonceNotSupported', type: 'error', inputs: [] },\n { name: 'InvalidNonceKey', type: 'error', inputs: [] },\n { name: 'NonceOverflow', type: 'error', inputs: [] },\n { name: 'ExpiringNonceReplay', type: 'error', inputs: [] },\n { name: 'ExpiringNonceSetFull', type: 'error', inputs: [] },\n { name: 'InvalidExpiringNonceExpiry', type: 'error', inputs: [] },\n { name: 'InvalidReceipt', type: 'error', inputs: [] },\n { name: 'InvalidClaimAddress', type: 'error', inputs: [] },\n { name: 'UnauthorizedClaimer', type: 'error', inputs: [] },\n { name: 'AddressReserved', type: 'error', inputs: [] },\n { name: 'InvalidFormat', type: 'error', inputs: [] },\n { name: 'InvalidSignature', type: 'error', inputs: [] },\n { name: 'PairDoesNotExist', type: 'error', inputs: [] },\n { name: 'PairAlreadyExists', type: 'error', inputs: [] },\n { name: 'OrderDoesNotExist', type: 'error', inputs: [] },\n { name: 'IdenticalTokens', type: 'error', inputs: [] },\n {\n name: 'TickOutOfBounds',\n type: 'error',\n inputs: [{ type: 'int16', name: 'tick' }],\n },\n { name: 'InvalidTick', type: 'error', inputs: [] },\n { name: 'InvalidFlipTick', type: 'error', inputs: [] },\n { name: 'InsufficientBalance', type: 'error', inputs: [] },\n { name: 'InsufficientOutput', type: 'error', inputs: [] },\n { name: 'MaxInputExceeded', type: 'error', inputs: [] },\n {\n name: 'BelowMinimumOrderSize',\n type: 'error',\n inputs: [{ type: 'uint128', name: 'amount' }],\n },\n { name: 'InvalidBaseToken', type: 'error', inputs: [] },\n { name: 'OrderNotStale', type: 'error', inputs: [] },\n { name: 'IndexAlreadySet', type: 'error', inputs: [] },\n { name: 'InvalidMode', type: 'error', inputs: [] },\n { name: 'OnlyDirectCall', type: 'error', inputs: [] },\n {\n name: 'InsufficientBalance',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'available' },\n { type: 'uint256', name: 'required' },\n { type: 'address', name: 'token' },\n ],\n },\n { name: 'InsufficientAllowance', type: 'error', inputs: [] },\n { name: 'SupplyCapExceeded', type: 'error', inputs: [] },\n { name: 'InvalidSupplyCap', type: 'error', inputs: [] },\n { name: 'InvalidPayload', type: 'error', inputs: [] },\n { name: 'PolicyForbids', type: 'error', inputs: [] },\n { name: 'InvalidRecipient', type: 'error', inputs: [] },\n { name: 'ContractPaused', type: 'error', inputs: [] },\n { name: 'InvalidCurrency', type: 'error', inputs: [] },\n { name: 'InvalidQuoteToken', type: 'error', inputs: [] },\n { name: 'NoOptedInSupply', type: 'error', inputs: [] },\n { name: 'ProtectedAddress', type: 'error', inputs: [] },\n { name: 'Uninitialized', type: 'error', inputs: [] },\n { name: 'InvalidTransferPolicyId', type: 'error', inputs: [] },\n { name: 'PermitExpired', type: 'error', inputs: [] },\n { name: 'LogoURITooLong', type: 'error', inputs: [] },\n { name: 'InvalidLogoURI', type: 'error', inputs: [] },\n {\n name: 'RootKeyRetired',\n type: 'error',\n inputs: [{ type: 'address', name: 'account' }],\n },\n { name: 'ChannelAlreadyExists', type: 'error', inputs: [] },\n { name: 'ChannelNotFound', type: 'error', inputs: [] },\n { name: 'NotPayer', type: 'error', inputs: [] },\n { name: 'NotPayeeOrOperator', type: 'error', inputs: [] },\n { name: 'InvalidPayee', type: 'error', inputs: [] },\n { name: 'ZeroDeposit', type: 'error', inputs: [] },\n { name: 'ExpiringNonceHashNotSet', type: 'error', inputs: [] },\n { name: 'AmountExceedsDeposit', type: 'error', inputs: [] },\n { name: 'AmountNotIncreasing', type: 'error', inputs: [] },\n { name: 'CaptureAmountInvalid', type: 'error', inputs: [] },\n { name: 'CloseNotReady', type: 'error', inputs: [] },\n { name: 'DepositOverflow', type: 'error', inputs: [] },\n { name: 'AddressNotReserved', type: 'error', inputs: [] },\n {\n name: 'TokenAlreadyExists',\n type: 'error',\n inputs: [{ type: 'address', name: 'token' }],\n },\n { name: 'PolicyNotFound', type: 'error', inputs: [] },\n { name: 'PolicyNotSimple', type: 'error', inputs: [] },\n { name: 'InvalidPolicyType', type: 'error', inputs: [] },\n { name: 'IncompatiblePolicyType', type: 'error', inputs: [] },\n { name: 'VirtualAddressNotAllowed', type: 'error', inputs: [] },\n { name: 'InvalidReceivePolicyType', type: 'error', inputs: [] },\n { name: 'InvalidRecoveryAuthority', type: 'error', inputs: [] },\n { name: 'ValidatorAlreadyExists', type: 'error', inputs: [] },\n { name: 'ValidatorNotFound', type: 'error', inputs: [] },\n { name: 'InvalidPublicKey', type: 'error', inputs: [] },\n {\n name: 'NotHostPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'field' },\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n {\n name: 'NotIpPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'field' },\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n { name: 'AlreadyInitialized', type: 'error', inputs: [] },\n {\n name: 'IngressAlreadyExists',\n type: 'error',\n inputs: [{ type: 'string', name: 'ingress' }],\n },\n { name: 'EmptyV1ValidatorSet', type: 'error', inputs: [] },\n { name: 'InvalidMigrationIndex', type: 'error', inputs: [] },\n { name: 'InvalidOwner', type: 'error', inputs: [] },\n { name: 'InvalidSignatureFormat', type: 'error', inputs: [] },\n { name: 'InvalidValidatorAddress', type: 'error', inputs: [] },\n { name: 'MigrationNotComplete', type: 'error', inputs: [] },\n { name: 'NotInitialized', type: 'error', inputs: [] },\n {\n name: 'NotIp',\n type: 'error',\n inputs: [\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n {\n name: 'NotIpPort',\n type: 'error',\n inputs: [\n { type: 'string', name: 'input' },\n { type: 'string', name: 'backtrace' },\n ],\n },\n { name: 'PublicKeyAlreadyExists', type: 'error', inputs: [] },\n { name: 'AddressAlreadyHasValidator', type: 'error', inputs: [] },\n { name: 'ValidatorAlreadyDeactivated', type: 'error', inputs: [] },\n { name: 'TokenTransferPolicyNotSet', type: 'error', inputs: [] },\n { name: 'InvalidClosedLoopConfig', type: 'error', inputs: [] },\n { name: 'NotOwner', type: 'error', inputs: [] },\n { name: 'InvalidAdmin', type: 'error', inputs: [] },\n { name: 'InvalidSequencerSet', type: 'error', inputs: [] },\n { name: 'TokenMetadataTooLong', type: 'error', inputs: [] },\n { name: 'DuplicateAllowedAccount', type: 'error', inputs: [] },\n { name: 'DuplicateZoneGateway', type: 'error', inputs: [] },\n { name: 'NotSequencer', type: 'error', inputs: [] },\n { name: 'NotAdmin', type: 'error', inputs: [] },\n { name: 'NotPauseAuthority', type: 'error', inputs: [] },\n {\n name: 'CapabilityAbdicated',\n type: 'error',\n inputs: [{ type: 'uint8', name: 'capability' }],\n },\n {\n name: 'AbdicationAlreadyScheduled',\n type: 'error',\n inputs: [{ type: 'uint8', name: 'capability' }],\n },\n { name: 'PortalIsPaused', type: 'error', inputs: [] },\n { name: 'NotPendingAdmin', type: 'error', inputs: [] },\n { name: 'InvalidProof', type: 'error', inputs: [] },\n { name: 'InvalidTempoBlockNumber', type: 'error', inputs: [] },\n { name: 'NotFactory', type: 'error', inputs: [] },\n { name: 'NotSelf', type: 'error', inputs: [] },\n { name: 'MustDelegateCall', type: 'error', inputs: [] },\n { name: 'CallbackRejected', type: 'error', inputs: [] },\n { name: 'TransferFailed', type: 'error', inputs: [] },\n { name: 'ReentrantWithdrawal', type: 'error', inputs: [] },\n {\n name: 'EncryptionKeyExpired',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'keyIndex' },\n { type: 'uint64', name: 'activationBlock' },\n { type: 'uint64', name: 'supersededAtBlock' },\n ],\n },\n {\n name: 'InvalidEncryptionKeyIndex',\n type: 'error',\n inputs: [{ type: 'uint256', name: 'keyIndex' }],\n },\n { name: 'NoEncryptionKeySet', type: 'error', inputs: [] },\n {\n name: 'NoEncryptionKeyAtBlock',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'blockNumber' }],\n },\n { name: 'InvalidEphemeralPubkey', type: 'error', inputs: [] },\n {\n name: 'InvalidCiphertextLength',\n type: 'error',\n inputs: [\n { type: 'uint256', name: 'actual' },\n { type: 'uint256', name: 'expected' },\n ],\n },\n { name: 'InvalidProofOfPossession', type: 'error', inputs: [] },\n { name: 'DepositTooSmall', type: 'error', inputs: [] },\n {\n name: 'TokenEnablementBlockCapacityExceeded',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'maximum' }],\n },\n { name: 'GasFeeRateTooHigh', type: 'error', inputs: [] },\n { name: 'DepositsNotActive', type: 'error', inputs: [] },\n { name: 'TokenAlreadyEnabled', type: 'error', inputs: [] },\n { name: 'TokenEnablementCursorNotInitialized', type: 'error', inputs: [] },\n { name: 'InvalidDepositTransition', type: 'error', inputs: [] },\n { name: 'InvalidTokenEnablementTransition', type: 'error', inputs: [] },\n { name: 'SequencerConfigurationUnchanged', type: 'error', inputs: [] },\n { name: 'InvalidQuorumCertificate', type: 'error', inputs: [] },\n { name: 'CallbackDidNotReturnToZone', type: 'error', inputs: [] },\n { name: 'InvalidBouncebackRecipient', type: 'error', inputs: [] },\n { name: 'TokenNotEnabled', type: 'error', inputs: [] },\n {\n name: 'DepositBlockCapacityExceeded',\n type: 'error',\n inputs: [{ type: 'uint64', name: 'maximum' }],\n },\n { name: 'InvalidCallbackTarget', type: 'error', inputs: [] },\n {\n name: 'AccountNotAllowed',\n type: 'error',\n inputs: [{ type: 'address', name: 'account' }],\n },\n { name: 'InvalidLeader', type: 'error', inputs: [] },\n { name: 'ActiveLeaderRemoved', type: 'error', inputs: [] },\n { name: 'LeaderAlreadyUpdatedThisBlock', type: 'error', inputs: [] },\n {\n name: 'StaleLeadershipEpoch',\n type: 'error',\n inputs: [\n { type: 'uint64', name: 'expected' },\n { type: 'uint64', name: 'actual' },\n ],\n },\n];\n//# sourceMappingURL=Abis.js.map","import { SignatureEnvelope } from 'ox/tempo';\n/** Parses a primitive owner approval. */\nexport function parseApproval(signature) {\n const approval = SignatureEnvelope.from(signature);\n if (approval.type === 'configurable' || approval.type === 'keychain')\n throw new Error('Configurable account owners must use primitive signatures.');\n return approval;\n}\n//# sourceMappingURL=Signature.js.map","// TODO: Find opportunities to make this file less duplicated + more simplified with Viem v3.\nimport * as Hex from 'ox/Hex';\nimport * as Signature from 'ox/Signature';\nimport { AccountConfig, SignatureEnvelope, TxEnvelopeTempo as TxTempo, } from 'ox/tempo';\nimport { getTransactionType as viem_getTransactionType } from '../utils/transaction/getTransactionType.js';\nimport { parseTransaction as viem_parseTransaction, } from '../utils/transaction/parseTransaction.js';\nimport { serializeTransaction as viem_serializeTransaction } from '../utils/transaction/serializeTransaction.js';\nimport { parseApproval } from './accounts/Signature.js';\nexport function getType(transaction) {\n const account = transaction.account;\n if ((account?.keyType && account.keyType !== 'secp256k1') ||\n account?.source === 'accessKey' ||\n account?.source === 'configurable' ||\n typeof transaction.calls !== 'undefined' ||\n typeof transaction.feePayer !== 'undefined' ||\n typeof transaction.feePayerSignature !== 'undefined' ||\n typeof transaction.feeToken !== 'undefined' ||\n typeof transaction.keyAuthorization !== 'undefined' ||\n typeof transaction.accountSimulation !== 'undefined' ||\n typeof transaction.nonceKey !== 'undefined' ||\n typeof transaction.owner !== 'undefined' ||\n typeof transaction.signature !== 'undefined' ||\n typeof transaction.signatures !== 'undefined' ||\n typeof transaction.validBefore !== 'undefined' ||\n typeof transaction.validAfter !== 'undefined')\n return 'tempo';\n if (transaction.type)\n return transaction.type;\n return viem_getTransactionType(transaction);\n}\nexport function isTempo(transaction) {\n try {\n const type = getType(transaction);\n return type === 'tempo';\n }\n catch {\n return false;\n }\n}\nexport function deserialize(serializedTransaction) {\n const type = Hex.slice(serializedTransaction, 0, 1);\n if (type === '0x76' || type === '0x78')\n return deserializeTempo(serializedTransaction);\n return viem_parseTransaction(serializedTransaction);\n}\nexport async function serialize(transaction, signature) {\n // If the transaction is not a Tempo transaction, route to Viem serializer.\n if (!isTempo(transaction)) {\n if (signature && 'type' in signature && signature.type !== 'secp256k1')\n throw new Error('Unsupported signature type. Expected `secp256k1` but got `' +\n signature.type +\n '`.');\n if (signature && 'type' in signature) {\n const { r, s, yParity } = signature?.signature;\n return viem_serializeTransaction(transaction, {\n r: Hex.fromNumber(r, { size: 32 }),\n s: Hex.fromNumber(s, { size: 32 }),\n yParity,\n });\n }\n return viem_serializeTransaction(transaction, signature);\n }\n const type = getType(transaction);\n if (type === 'tempo')\n return serializeTempo(transaction, signature);\n throw new Error('Unsupported transaction type');\n}\n////////////////////////////////////////////////////////////////////////////////////\n// Internal\n/** @internal */\nfunction deserializeTempo(serializedTransaction) {\n const { feePayerSignature, nonce, ...tx } = TxTempo.deserialize(serializedTransaction);\n return {\n ...tx,\n nonce: Number(nonce ?? 0n),\n feePayerSignature: feePayerSignature\n ? {\n r: Hex.fromNumber(feePayerSignature.r, { size: 32 }),\n s: Hex.fromNumber(feePayerSignature.s, { size: 32 }),\n yParity: feePayerSignature.yParity,\n }\n : feePayerSignature,\n };\n}\n/** @internal */\nasync function serializeTempo(transaction, sig) {\n // Track caller signatures separately from synthesized owner approvals.\n const signature_provided = (() => {\n if (transaction.signature)\n return transaction.signature;\n if (sig && 'type' in sig)\n return sig;\n if (sig)\n return SignatureEnvelope.from({\n r: BigInt(sig.r),\n s: BigInt(sig.s),\n yParity: Number(sig.yParity),\n });\n return undefined;\n })();\n const { chainId, feePayer, accountSimulation, nonce, owner: _owner, ...rest } = transaction;\n const feePayerSignature = (() => {\n const feePayerSignature = transaction.feePayerSignature;\n if (feePayerSignature)\n return {\n r: BigInt(feePayerSignature.r),\n s: BigInt(feePayerSignature.s),\n yParity: Number(feePayerSignature.yParity),\n };\n if (feePayerSignature === null || feePayer)\n return null;\n return undefined;\n })();\n const hasPrefilledFeePayerSignature = typeof transaction.feePayerSignature !== 'undefined' &&\n transaction.feePayerSignature !== null;\n const hasSenderSignature = typeof signature_provided !== 'undefined' ||\n Boolean(accountSimulation && transaction.signatures);\n // Sponsorship sender signatures omit `feeToken`.\n const shouldStripFeeTokenForSponsorship = \n // Relay fills a partial sender envelope first.\n (feePayer === true && (!hasSenderSignature || !feePayerSignature)) ||\n // Local fee-payer accounts sign after sender serialization.\n (typeof feePayer === 'object' && !hasSenderSignature) ||\n // Filled transactions can already include fee-payer approval.\n (!hasSenderSignature && hasPrefilledFeePayerSignature);\n const transaction_ox = {\n ...rest,\n calls: rest.calls?.length\n ? rest.calls\n : [\n {\n to: rest.to ||\n (!rest.data || rest.data === '0x'\n ? '0x0000000000000000000000000000000000000000'\n : undefined),\n value: rest.value,\n data: rest.data,\n },\n ],\n chainId: Number(chainId),\n feePayerSignature,\n type: 'tempo',\n ...(nonce ? { nonce: BigInt(nonce) } : {}),\n };\n // Sender does not commit to `feeToken` under sponsorship. Strip it\n // for the sender sign payload and the partial sponsorship handoff envelope.\n // Keep it only on the final broadcast envelope so the chain can verify\n // the fee payer.\n const transaction_sender_ox = { ...transaction_ox };\n if (shouldStripFeeTokenForSponsorship)\n delete transaction_sender_ox.feeToken;\n // Combine owner approvals before fee-payer handling.\n const signature = (() => {\n if (signature_provided)\n return signature_provided;\n if (!accountSimulation || !transaction.signatures)\n return undefined;\n const payload = TxTempo.getSignPayload(TxTempo.from(transaction_sender_ox));\n const signatures = transaction.signatures.map((approval) => parseApproval(approval));\n const config = AccountConfig.from(accountSimulation.config);\n const account = transaction.from;\n if (!account)\n throw new Error('A configurable account sender is required for signing.');\n const sorted = SignatureEnvelope.sortApprovals({\n account,\n config,\n payload,\n signatures,\n });\n return SignatureEnvelope.from({\n account,\n config,\n signatures: sorted,\n });\n })();\n if (signature && typeof transaction.feePayer === 'object') {\n const tx = TxTempo.from(transaction_ox, {\n signature,\n });\n const sender = transaction.from ??\n SignatureEnvelope.extractAddress({\n payload: TxTempo.getSignPayload(tx),\n root: true,\n signature,\n });\n const hash = TxTempo.getFeePayerSignPayload(tx, {\n sender,\n });\n const feePayerSignature = await transaction.feePayer.sign({\n hash,\n });\n return TxTempo.serialize(tx, {\n feePayerSignature: Signature.from(feePayerSignature),\n });\n }\n if (feePayer === true || (!signature && hasPrefilledFeePayerSignature)) {\n // Fee payer signature was prefilled during `eth_fillTransaction` -- emit\n // a full envelope with both signatures to skip `eth_signRawTransaction`.\n if (signature && feePayerSignature)\n return TxTempo.serialize(transaction_sender_ox, {\n signature,\n });\n if (signature)\n return TxTempo.serialize(transaction_sender_ox, {\n format: 'feePayer',\n sender: transaction.from,\n signature,\n });\n return TxTempo.serialize(transaction_sender_ox, {\n feePayerSignature: null,\n });\n }\n return TxTempo.serialize(\n // If we have specified a fee payer, the user will not be signing over the fee token.\n // Defer the fee token signing to the fee payer. Once the fee payer has signed,\n // keep `feeToken` so the broadcast envelope carries the token the chain must charge.\n transaction_sender_ox, {\n feePayerSignature: undefined,\n signature,\n });\n}\n// Export types required for inference.\n// biome-ignore lint/performance/noBarrelFile: _\nexport { \n/** @deprecated */\nKeyAuthorization as z_KeyAuthorization, \n/** @deprecated */\nSignatureEnvelope as z_SignatureEnvelope, \n/** @deprecated */\nTxEnvelopeTempo as z_TxEnvelopeTempo, } from 'ox/tempo';\n//# sourceMappingURL=Transaction.js.map","import * as Address from 'ox/Address';\nimport * as Hex from 'ox/Hex';\nimport * as P256 from 'ox/P256';\nimport * as PublicKey from 'ox/PublicKey';\nimport * as Secp256k1 from 'ox/Secp256k1';\nimport * as Signature from 'ox/Signature';\nimport { AccountConfig, Channel, KeyAuthorization, SignatureEnvelope, } from 'ox/tempo';\nimport * as WebAuthnP256 from 'ox/WebAuthnP256';\nimport * as WebCryptoP256 from 'ox/WebCryptoP256';\nimport { parseAccount } from '../accounts/utils/parseAccount.js';\nimport { hashAuthorization } from '../utils/authorization/hashAuthorization.js';\nimport { keccak256 } from '../utils/hash/keccak256.js';\nimport { hashMessage } from '../utils/signature/hashMessage.js';\nimport { hashTypedData } from '../utils/signature/hashTypedData.js';\nimport { parseApproval } from './accounts/Signature.js';\nimport * as Transaction from './Transaction.js';\n/** Instantiates an Account. */\nexport function from(parameters) {\n const { access } = parameters;\n if (access)\n return fromAccessKey(parameters);\n return fromRoot(parameters);\n}\n/**\n * Instantiates an Account from a headless WebAuthn credential (P256 private key).\n *\n * @example\n * ```ts\n * import { Account } from 'viem/tempo'\n *\n * const account = Account.fromHeadlessWebAuthn('0x...')\n * ```\n *\n * @param privateKey P256 private key.\n * @returns Account.\n */\nexport function fromHeadlessWebAuthn(privateKey, options) {\n const { access, keyAuthorizationManager, rpId, origin, internal_version } = options;\n const publicKey = P256.getPublicKey({ privateKey });\n return from({\n ...(access ? { access, keyAuthorizationManager } : {}),\n internal_version,\n keyType: 'webAuthn',\n publicKey,\n async sign({ hash }) {\n const { metadata, payload } = WebAuthnP256.getSignPayload({\n ...options,\n challenge: hash,\n rpId,\n origin,\n });\n const signature = P256.sign({\n payload,\n privateKey,\n hash: true,\n });\n return SignatureEnvelope.serialize({\n metadata,\n signature,\n publicKey,\n type: 'webAuthn',\n });\n },\n });\n}\n/**\n * Instantiates an Account from a P256 private key.\n *\n * @example\n * ```ts\n * import { Account } from 'viem/tempo'\n *\n * const account = Account.fromP256('0x...')\n * ```\n *\n * @param privateKey P256 private key.\n * @returns Account.\n */\nexport function fromP256(privateKey, options = {}) {\n const { access, keyAuthorizationManager, internal_version } = options;\n const publicKey = P256.getPublicKey({ privateKey });\n return from({\n ...(access ? { access, keyAuthorizationManager } : {}),\n internal_version,\n keyType: 'p256',\n publicKey,\n async sign({ hash }) {\n const signature = P256.sign({ payload: hash, privateKey });\n return SignatureEnvelope.serialize({\n signature,\n publicKey,\n type: 'p256',\n });\n },\n });\n}\n/**\n * Instantiates an Account from a Secp256k1 private key.\n *\n * @example\n * ```ts\n * import { Account } from 'viem/tempo'\n *\n * const account = Account.fromSecp256k1('0x...')\n * ```\n *\n * @param privateKey Secp256k1 private key.\n * @returns Account.\n */\nexport function fromSecp256k1(privateKey, options = {}) {\n const { access, keyAuthorizationManager, internal_version } = options;\n const publicKey = Secp256k1.getPublicKey({ privateKey });\n return from({\n ...(access ? { access, keyAuthorizationManager } : {}),\n internal_version,\n keyType: 'secp256k1',\n publicKey,\n async sign(parameters) {\n const { hash } = parameters;\n const signature = Secp256k1.sign({ payload: hash, privateKey });\n return Signature.toHex(signature);\n },\n });\n}\nexport function fromConfig(value) {\n const configInput = (() => {\n if (typeof value === 'string')\n return undefined;\n if ('upgrade' in value)\n return value.upgrade;\n const { address: _, ...config } = value;\n return config;\n })();\n const config = (() => {\n if (!configInput)\n return undefined;\n const ownerEntries = configInput.owners.map((value) => typeof value === 'string' || 'address' in value\n ? { owner: value, weight: 1 }\n : value);\n const owners = ownerEntries.map(({ owner, weight }) => ({\n owner: typeof owner === 'string' ? owner : owner.address,\n weight,\n }));\n const threshold = configInput.threshold ?? 1;\n if (typeof value !== 'string' && 'upgrade' in value)\n return AccountConfig.fromUpgrade(value.address, { owners, threshold });\n return AccountConfig.from({ ...configInput, owners, threshold });\n })();\n if (typeof value !== 'string' && !('upgrade' in value)) {\n if ((value.address === undefined || value.address === 'infer') &&\n config.version !== 0n)\n throw new Error('An initial account config must have version zero.');\n if (value.address !== undefined &&\n value.address !== 'infer' &&\n config.version === 0n)\n throw new Error('A current account config must have a version.');\n }\n const address = Address.checksum((() => {\n if (typeof value === 'string')\n return value;\n if (value.address === undefined || value.address === 'infer')\n return AccountConfig.getAddress(config);\n return value.address;\n })());\n const ownerAccounts = (() => {\n if (!configInput)\n return [];\n return configInput.owners.flatMap((value) => {\n const owner = typeof value === 'string' || 'address' in value ? value : value.owner;\n return typeof owner === 'string' ? [] : [parseAccount(owner)];\n });\n })();\n if (ownerAccounts.some((owner) => owner.source === 'configurable' || isAccessKeyAccount(owner)))\n throw new Error('Configurable account owners must use primitive signatures.');\n const owners = config?.owners.flatMap(({ owner }) => {\n const account = ownerAccounts.find((account) => Address.isEqual(account.address, owner));\n return account ? [account] : [];\n }) ?? [];\n const account = {\n address,\n config,\n owners,\n publicKey: '0x',\n source: 'configurable',\n type: 'local',\n async sign({ hash }) {\n return SignatureEnvelope.serialize(await signConfigurable(account, { payload: hash }));\n },\n async signMessage() {\n throw new Error('`signMessage` is not supported for configurable accounts.');\n },\n async signTransaction(transaction, options) {\n const { serializer = Transaction.serialize } = options ?? {};\n const request = transaction;\n if (request.owner) {\n const owner = parseAccount(request.owner);\n if (owner.type !== 'local')\n throw new Error('A local owner account is required to approve a configurable account transaction.');\n if (owner.source !== 'root')\n throw new Error('A Tempo owner account is required to approve a configurable account transaction.');\n const { owner: _, ...ownerRequest } = request;\n return await owner.signTransaction(ownerRequest, options);\n }\n if (owners.length === 0)\n return (await serializer(transaction));\n const presign = {\n ...request,\n signatures: undefined,\n ...(request.feePayerSignature === undefined\n ? {}\n : { feePayerSignature: null }),\n };\n const payload = keccak256(await serializer(presign));\n const simulation = request.accountSimulation;\n if (request.from && !Address.isEqual(request.from, address))\n throw new Error('Configurable account does not match the transaction sender.');\n const signature = await signConfigurable(account, {\n config: simulation?.config,\n payload,\n signatures: request.signatures?.map((signature) => parseApproval(signature)),\n });\n return (await serializer(transaction, signature));\n },\n async signTypedData() {\n throw new Error('`signTypedData` is not supported for configurable accounts.');\n },\n };\n return account;\n}\nfunction isConfigurableAccount(account) {\n return account.source === 'configurable';\n}\nasync function signConfigurable(account, parameters) {\n const { config, payload, signatures: providedSignatures = [] } = parameters;\n const currentConfig = config ?? account.config;\n if (!currentConfig)\n throw new Error('A current account config is required for local signing.');\n const digest = AccountConfig.getSignPayload({\n account: account.address,\n config: currentConfig,\n payload,\n });\n const signatures = [...providedSignatures];\n const signedOwners = new Set();\n let weight = 0;\n for (const signature of providedSignatures) {\n const address = SignatureEnvelope.extractAddress({\n payload: digest,\n signature,\n }).toLowerCase();\n const owner = currentConfig.owners.find((owner) => Address.isEqual(owner.owner, address));\n if (!owner || signedOwners.has(address))\n continue;\n signedOwners.add(address);\n weight += Number(owner.weight);\n }\n const owners = [...currentConfig.owners].sort((a, b) => Number(b.weight) - Number(a.weight) ||\n a.owner.toLowerCase().localeCompare(b.owner.toLowerCase()));\n for (const owner of owners) {\n if (weight >= Number(currentConfig.threshold))\n break;\n const address = owner.owner.toLowerCase();\n if (signedOwners.has(address))\n continue;\n const ownerAccount = account.owners.find((account) => Address.isEqual(account.address, owner.owner));\n if (!ownerAccount)\n continue;\n if (!ownerAccount.sign)\n throw new Error('Configurable account owner account cannot sign.');\n signatures.push(parseApproval(await ownerAccount.sign({ hash: digest })));\n signedOwners.add(address);\n weight += Number(owner.weight);\n if (weight >= Number(currentConfig.threshold))\n break;\n }\n if (weight < Number(currentConfig.threshold))\n throw new Error('Local owners do not meet the threshold.');\n return SignatureEnvelope.from({\n account: account.address,\n config: currentConfig,\n signatures: SignatureEnvelope.sortApprovals({\n account: account.address,\n config: currentConfig,\n payload,\n signatures,\n }),\n });\n}\n/**\n * Instantiates an Account from a WebAuthn credential.\n *\n * @example\n *\n * ### Create Passkey + Instantiate Account\n *\n * Create a credential with `WebAuthnP256.createCredential` and then instantiate\n * a Viem Account with `Account.fromWebAuthnP256`.\n *\n * It is highly recommended to store the credential's public key in an external store\n * for future use (ie. for future calls to `WebAuthnP256.getCredential`).\n *\n * ```ts\n * import { Account, WebAuthnP256 } from 'viem/tempo'\n * import { publicKeyStore } from './store'\n *\n * // 1. Create credential\n * const credential = await WebAuthnP256.createCredential({ name: 'Example' })\n *\n * // 2. Instantiate account\n * const account = Account.fromWebAuthnP256(credential)\n *\n * // 3. Store public key\n * await publicKeyStore.set(credential.id, credential.publicKey)\n *\n * ```\n *\n * @example\n *\n * ### Get Credential + Instantiate Account\n *\n * Gets a credential from `WebAuthnP256.getCredential` and then instantiates\n * an account with `Account.fromWebAuthnP256`.\n *\n * The `getPublicKey` function is required to fetch the public key paired with the credential\n * from an external store. The public key is required to derive the account's address.\n *\n * ```ts\n * import { Account, WebAuthnP256 } from 'viem/tempo'\n * import { publicKeyStore } from './store'\n *\n * // 1. Get credential\n * const credential = await WebAuthnP256.getCredential({\n * async getPublicKey(credential) {\n * // 2. Get public key from external store.\n * return await publicKeyStore.get(credential.id)\n * }\n * })\n *\n * // 3. Instantiate account\n * const account = Account.fromWebAuthnP256(credential)\n * ```\n *\n * @param credential WebAuthnP256 credential.\n * @returns Account.\n */\nexport function fromWebAuthnP256(credential, options = {}) {\n const { id } = credential;\n const publicKey = PublicKey.fromHex(credential.publicKey);\n return from({\n keyType: 'webAuthn',\n publicKey,\n async sign({ hash }) {\n const { metadata, signature } = await WebAuthnP256.sign({\n ...options,\n challenge: hash,\n credentialId: id,\n });\n return SignatureEnvelope.serialize({\n publicKey,\n metadata,\n signature,\n type: 'webAuthn',\n });\n },\n });\n}\n/**\n * Instantiates an Account from a P256 private key.\n *\n * @example\n * ```ts\n * import { Account } from 'viem/tempo'\n * import { WebCryptoP256 } from 'ox'\n *\n * const keyPair = await WebCryptoP256.createKeyPair()\n *\n * const account = Account.fromWebCryptoP256(keyPair)\n * ```\n *\n * @param keyPair WebCryptoP256 key pair.\n * @returns Account.\n */\nexport function fromWebCryptoP256(keyPair, options = {}) {\n const { access, keyAuthorizationManager, internal_version } = options;\n const { publicKey, privateKey } = keyPair;\n return from({\n ...(access ? { access, keyAuthorizationManager } : {}),\n internal_version,\n keyType: 'p256',\n publicKey,\n async sign({ hash }) {\n const signature = await WebCryptoP256.sign({ payload: hash, privateKey });\n return SignatureEnvelope.serialize({\n signature,\n prehash: true,\n publicKey,\n type: 'p256',\n });\n },\n });\n}\nexport async function signVoucher(account, parameters) {\n const hash = getVoucherSignPayload(parameters);\n if (isAccessKeyAccount(account))\n return account.sign({ hash, raw: true });\n return account.sign({ hash });\n}\nfunction getVoucherSignPayload(parameters) {\n const { chainId, channel, cumulativeAmount } = parameters;\n const channelId = typeof channel === 'string'\n ? channel\n : Channel.computeId(channel, {\n chainId,\n });\n return Channel.getVoucherSignPayload({\n chainId,\n channelId,\n cumulativeAmount,\n });\n}\nfunction isAccessKeyAccount(account) {\n return account.source === 'accessKey' && 'accessKeyAddress' in account;\n}\n/** @internal */\nexport function getKeyAuthorizationSignPayload(account, parameters) {\n const { admin, chainId, expiry, key, limits, scopes, witness } = parameters;\n const { accessKeyAddress, keyType: type } = resolveAccessKey(key);\n const boundFields = isAccessKeyAccount(account) || isConfigurableAccount(account)\n ? { account: account.address }\n : {};\n const restrictions = admin ? {} : { expiry, limits, scopes };\n return KeyAuthorization.getSignPayload({\n address: accessKeyAddress,\n chainId,\n type,\n witness,\n ...(admin ? { isAdmin: true } : {}),\n ...boundFields,\n ...restrictions,\n });\n}\nexport async function signKeyAuthorization(account, parameters) {\n const { admin, chainId, expiry, key, limits, configurable: configurableState, scopes, signatures, witness, } = parameters;\n const { accessKeyAddress, keyType: type } = resolveAccessKey(key);\n // When the signer is an admin access key, the authorization must be\n // signed directly by that key and bound to the parent account it acts\n // on behalf of, so the signed payload cannot be replayed against another\n // account. [TIP-1049]\n const isAccessKey = isAccessKeyAccount(account);\n const isConfigurable = isConfigurableAccount(account);\n const boundFields = isAccessKey || isConfigurable ? { account: account.address } : {};\n // Admin key authorizations are unrestricted and must not carry expiry,\n // limits, or call scopes (the protocol rejects them). [TIP-1049]\n const restrictions = admin ? {} : { expiry, limits, scopes };\n const hash = getKeyAuthorizationSignPayload(account, parameters);\n const signature = await (async () => {\n if (isAccessKey)\n return account.sign({ hash, raw: true });\n if (isConfigurable) {\n if (!configurableState)\n throw new Error('Configurable account state is required to sign a key authorization.');\n return SignatureEnvelope.serialize(await signConfigurable(account, {\n config: configurableState.config,\n payload: hash,\n signatures: signatures?.map((signature) => parseApproval(signature)),\n }));\n }\n return account.sign({ hash });\n })();\n return KeyAuthorization.from({\n address: accessKeyAddress,\n chainId,\n signature: SignatureEnvelope.from(signature),\n type,\n ...(witness ? { witness } : {}),\n ...(admin ? { isAdmin: true } : {}),\n ...boundFields,\n ...restrictions,\n });\n}\n/** @internal */\n// biome-ignore lint/correctness/noUnusedVariables: _\nfunction fromBase(parameters) {\n const { keyType = 'secp256k1', parentAddress, source = 'privateKey', internal_version = 'v2', } = parameters;\n const address = parentAddress ?? Address.fromPublicKey(parameters.publicKey);\n const publicKey = PublicKey.toHex(parameters.publicKey, {\n includePrefix: false,\n });\n async function sign({ hash, raw }) {\n if (raw)\n return await parameters.sign({ hash });\n const innerHash = parentAddress && internal_version === 'v2'\n ? keccak256(Hex.concat('0x04', hash, parentAddress))\n : hash;\n const signature = await parameters.sign({ hash: innerHash });\n if (parentAddress)\n return SignatureEnvelope.serialize(SignatureEnvelope.from({\n userAddress: parentAddress,\n inner: SignatureEnvelope.from(signature),\n type: 'keychain',\n version: internal_version,\n }));\n return signature;\n }\n return {\n address: Address.checksum(address),\n keyType,\n sign,\n async signAuthorization(parameters) {\n const { chainId, nonce } = parameters;\n const address = parameters.contractAddress ?? parameters.address;\n const signature = await sign({\n hash: hashAuthorization({ address, chainId, nonce }),\n });\n const envelope = SignatureEnvelope.from(signature);\n if (envelope.type !== 'secp256k1')\n throw new Error('Unsupported signature type. Expected `secp256k1` but got `' +\n envelope.type +\n '`.');\n const { r, s, yParity } = envelope.signature;\n return {\n address,\n chainId,\n nonce,\n r: Hex.fromNumber(r, { size: 32 }),\n s: Hex.fromNumber(s, { size: 32 }),\n yParity,\n };\n },\n async signMessage(parameters) {\n const { message } = parameters;\n return await sign({ hash: hashMessage(message) });\n },\n async signTransaction(transaction, options) {\n const { serializer = Transaction.serialize } = options ?? {};\n const presign = (() => {\n if ('feePayerSignature' in transaction && transaction.feePayerSignature)\n return { ...transaction, feePayerSignature: null };\n return transaction;\n })();\n const payload = keccak256(await serializer(presign));\n // Configurable account (TIP-1107): return this owner's approval, a serialized\n // primitive signature over the owner approval digest, instead of\n // a full serialized transaction. Approvals are combined later in\n // `sendTransaction({ signatures })`.\n const { accountSimulation, from } = transaction;\n if (accountSimulation) {\n if (!from)\n throw new Error('A configurable account sender is required for signing.');\n const config = AccountConfig.from(accountSimulation.config);\n const digest = AccountConfig.getSignPayload({\n account: from,\n config,\n payload,\n });\n return await sign({ hash: digest, raw: true });\n }\n const signature = await sign({ hash: payload });\n const envelope = SignatureEnvelope.from(signature);\n return await serializer(transaction, envelope);\n },\n async signTypedData(typedData) {\n return await sign({ hash: hashTypedData(typedData) });\n },\n async signVoucher(parameters) {\n const hash = getVoucherSignPayload(parameters);\n if (parentAddress)\n return await sign({ hash, raw: true });\n return await sign({ hash });\n },\n publicKey,\n source,\n type: 'local',\n };\n}\n/** @internal */\n// biome-ignore lint/correctness/noUnusedVariables: _\nfunction fromRoot(parameters) {\n const account = fromBase(parameters);\n return {\n ...account,\n source: 'root',\n async signKeyAuthorization(key, parameters) {\n const { chainId, expiry, limits, scopes, witness, admin } = parameters;\n const { accessKeyAddress, keyType: type } = resolveAccessKey(key);\n // Admin key authorizations are unrestricted and must not carry expiry,\n // limits, or call scopes (the protocol rejects them). [TIP-1049]\n const restrictions = admin ? {} : { expiry, limits, scopes };\n const signature = await account.sign({\n hash: KeyAuthorization.getSignPayload({\n address: accessKeyAddress,\n chainId,\n type,\n witness,\n ...(admin ? { isAdmin: true } : {}),\n ...restrictions,\n }),\n });\n const keyAuthorization = KeyAuthorization.from({\n address: accessKeyAddress,\n chainId,\n signature: SignatureEnvelope.from(signature),\n type,\n ...(witness ? { witness } : {}),\n ...(admin ? { isAdmin: true } : {}),\n ...restrictions,\n });\n return keyAuthorization;\n },\n };\n}\n// biome-ignore lint/correctness/noUnusedVariables: _\nfunction fromAccessKey(parameters) {\n const { access, keyAuthorizationManager } = parameters;\n const { address: parentAddress } = parseAccount(access);\n const account = fromBase({ ...parameters, parentAddress });\n return {\n ...account,\n accessKeyAddress: Address.fromPublicKey(parameters.publicKey),\n keyAuthorizationManager,\n source: 'accessKey',\n };\n}\n// TODO: support configurable accounts as access keys (TIP-1111): authorize a\n// configurable account with key type `configurable`, sign as it with a keychain\n// envelope wrapping its configurable signature, and accept those envelopes in the\n// relay fee payer.\n/** @internal */\nexport function resolveAccessKey(accessKey) {\n if ('accessKeyAddress' in accessKey)\n return {\n accessKeyAddress: accessKey.accessKeyAddress,\n keyType: accessKey.keyType,\n };\n if ('publicKey' in accessKey && accessKey.publicKey)\n return {\n accessKeyAddress: Address.fromPublicKey(PublicKey.fromHex(accessKey.publicKey)),\n keyType: accessKey.type,\n };\n return {\n accessKeyAddress: accessKey.address,\n keyType: accessKey.type,\n };\n}\n// Export types required for inference.\n// biome-ignore lint/performance/noBarrelFile: _\nexport { \n/** @deprecated */\nKeyAuthorization as z_KeyAuthorization, \n/** @deprecated */\nSignatureEnvelope as z_SignatureEnvelope, \n/** @deprecated */\nTxEnvelopeTempo as z_TxEnvelopeTempo, } from 'ox/tempo';\n//# sourceMappingURL=Account.js.map","import * as Hex from 'ox/Hex';\nimport { ZoneId } from 'ox/tempo';\nconst legacyZoneChainIdBase = 4_217_000_000;\nconst legacyZoneChainIdLimit = 4_218_000_000;\nconst mainnetZoneChainIdBase = ZoneId.toChainId(0);\nconst testnetZoneChainIdBase = ZoneId.toChainId(0, 42_431);\nconst zoneChainIdLimit = 2 ** 31;\nexport const accountImplementation = '0x7702c00000000000000000000000000000000000';\nexport const accountKeychain = '0xaAAAaaAA00000000000000000000000000000000';\nexport const accountRegistrar = '0x7702ac0000000000000000000000000000000000';\nexport const addressRegistry = '0xfdc0000000000000000000000000000000000000';\nexport const configurableAccount = '0xAACC000000000000000000000000000000000000';\n/** Current consensus committee precompile address, used with `Abis.currentCommittee` to read committee members. */\nexport const currentCommittee = '0xC077e00000000000000000000000000000000000';\nexport const feeManager = '0xfeec000000000000000000000000000000000000';\nexport const nonceManager = '0x4e4F4E4345000000000000000000000000000000';\nexport const ousd = '0x20c0000000000000000000006a37DA5C996874BE';\nexport const pathUsd = '0x20c0000000000000000000000000000000000000';\nexport const receivePolicyGuard = '0xB10C000000000000000000000000000000000000';\nexport const signatureVerifier = '0x5165300000000000000000000000000000000000';\nexport const stablecoinDex = '0xdec0000000000000000000000000000000000000';\nexport const storageCredits = '0x1060000000000000000000000000000000000000';\nexport const tip20ChannelReserve = '0x4d50500000000000000000000000000000000000';\nexport const tip20Factory = '0x20fc000000000000000000000000000000000000';\nexport const tip403Registry = '0x403c000000000000000000000000000000000000';\nexport const validator = '0xcccccccc00000000000000000000000000000000';\nexport const validatorV2 = '0xcccccccc00000000000000000000000000000001';\nexport const zoneFactory = '0x5aF2000000000000000000000000000000000000';\nexport const zoneMessenger = '0x5A4d000000000000000000000000000000000000';\nexport const zoneInbox = '0x1c00000000000000000000000000000000000001';\nexport const zoneOutbox = '0x1c00000000000000000000000000000000000002';\nexport const zonePortalImplementation = '0x5AD1000000000000000000000000000000000000';\nexport const zoneVerifier = '0x5a56000000000000000000000000000000000000';\n/**\n * Returns the Zone portal address for a Zone ID or chain ID.\n *\n * @param id - Zone ID or chain ID.\n * @returns The Zone portal address.\n */\nexport function zonePortal(id) {\n const zoneId = normalizeZoneId(id);\n // TODO: Remove legacy Zone portal address compatibility.\n if (zoneId === 6)\n return '0x7069DeC4E64Fd07334A0933eDe836C17259c9B23';\n if (zoneId === 7)\n return '0x3F5296303400B56271b476F5A0B9cBF74350D6Ac';\n const suffix = Hex.fromNumber(zoneId, { size: 8 }).slice(2);\n return `0x5ad000000000000000000000${suffix}`;\n}\nfunction normalizeZoneId(id) {\n if (id >= legacyZoneChainIdBase && id < legacyZoneChainIdLimit)\n return id - legacyZoneChainIdBase;\n if (id >= testnetZoneChainIdBase && id < zoneChainIdLimit)\n return ZoneId.fromChainId(id, 42_431);\n if (id >= mainnetZoneChainIdBase && id < testnetZoneChainIdBase)\n return ZoneId.fromChainId(id);\n return id;\n}\n//# sourceMappingURL=Addresses.js.map","import { BaseError } from '../errors/base.js';\nimport { prettyPrint } from '../errors/transaction.js';\nexport class GetVaultEngineChangedError extends BaseError {\n constructor({ vault }) {\n super(`Engine of vault \"${vault}\" changed while reading.`, {\n metaMessages: [\n 'An engine migration raced the snapshot; state from two different engines cannot be mixed.',\n 'Retry the read.',\n ],\n name: 'GetVaultEngineChangedError',\n });\n }\n}\n/** Thrown when a Zone gateway deposit event is not found before the timeout. */\nexport class WaitForPrivateDepositTimeoutError extends BaseError {\n constructor({ actionId, gateway }) {\n super(`Timed out while waiting for Zone deposit \"${actionId}\" at gateway \"${gateway}\".`, { name: 'WaitForPrivateDepositTimeoutError' });\n }\n}\nexport class WaitForTempoBlockTimeoutError extends BaseError {\n constructor({ tempoBlockNumber }) {\n super(`Timed out while waiting for Tempo block \"${tempoBlockNumber}\" to be imported by the zone.`, { name: 'WaitForTempoBlockTimeoutError' });\n }\n}\n/** Thrown when a Zone gateway redeem event is not found before the timeout. */\nexport class WaitForPrivateRedeemTimeoutError extends BaseError {\n constructor({ actionId, gateway }) {\n super(`Timed out while waiting for Zone redemption \"${actionId}\" at gateway \"${gateway}\".`, { name: 'WaitForPrivateRedeemTimeoutError' });\n }\n}\nexport class InvalidFeeTokenError extends BaseError {\n constructor({ cause, token, }) {\n super(`Fee token \"${token}\" is invalid.`, {\n cause,\n docsPath: '/tempo/transactions',\n docsSlug: 'pay-fees-with-stablecoins',\n metaMessages: [\n 'Fee tokens must be unpaused USD-denominated TIP-20 tokens.',\n 'Use `client.fee.validateToken({ token })` before sending transactions or setting fee preferences.',\n ],\n name: 'InvalidFeeTokenError',\n });\n }\n}\nexport class FeeTokenNotTip20Error extends BaseError {\n constructor({ token }) {\n super(`Fee token \"${token}\" is not a TIP-20 token.`, {\n docsPath: '/tempo/transactions',\n docsSlug: 'pay-fees-with-stablecoins',\n metaMessages: [\n 'Fee tokens must be TIP-20 token addresses or token IDs.',\n 'TIP-20 token addresses use the `0x20c0...` address prefix.',\n ],\n name: 'FeeTokenNotTip20Error',\n });\n }\n}\nexport class FeeTokenNotUsdError extends BaseError {\n constructor({ currency, token, }) {\n super(`Fee token \"${token}\" is denominated in \"${currency}\", not \"USD\".`, {\n docsPath: '/tempo/transactions',\n docsSlug: 'pay-fees-with-stablecoins',\n metaMessages: [\n 'Only USD-denominated TIP-20 tokens can be used as fee tokens.',\n ],\n name: 'FeeTokenNotUsdError',\n });\n }\n}\nexport class FeeTokenPausedError extends BaseError {\n constructor({ token }) {\n super(`Fee token \"${token}\" is paused.`, {\n docsPath: '/tempo/transactions',\n docsSlug: 'pay-fees-with-stablecoins',\n metaMessages: ['Paused TIP-20 tokens cannot be used as fee tokens.'],\n name: 'FeeTokenPausedError',\n });\n }\n}\n/** Thrown when a Tempo action fails with a decoded Tempo precompile error. */\nexport class TempoExecutionError extends BaseError {\n constructor({ cause, error, hints }, { details, docsPath, name = 'TempoExecutionError', shortMessage = error.message, } = {}) {\n // Keep the call or request summary from the original error.\n const summary = cause.metaMessages?.findIndex((message) => /^(Contract Call|Request Arguments):/.test(message));\n super(shortMessage, {\n cause,\n docsPath,\n metaMessages: [\n ...(details ? [prettyPrint(details), ' '] : []),\n ...(hints.length\n ? ['How to fix:', ...hints.map((hint) => `- ${hint}`), ' ']\n : []),\n ...(summary !== undefined && summary >= 0\n ? cause.metaMessages.slice(summary)\n : []),\n ],\n name,\n });\n /** ABI item of the error. */\n Object.defineProperty(this, \"abiItem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Decoded error arguments, when the revert data carried them. */\n Object.defineProperty(this, \"args\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Revert data, or the error selector when only the name is known. */\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Error name from `Abis.coreErrors`. */\n Object.defineProperty(this, \"errorName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Steps to resolve the error. */\n Object.defineProperty(this, \"hints\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.abiItem = error.abiItem;\n // Subclasses narrow `decoded` to the error they are built for.\n this.args = error.args;\n this.data = error.data;\n this.errorName = error.errorName;\n this.hints = hints;\n }\n}\n//# sourceMappingURL=errors.js.map","export const hardforks = [\n 'genesis',\n 't0',\n 't1',\n 't1a',\n 't1b',\n 't1c',\n 't2',\n 't3',\n 't4',\n 't5',\n 't6',\n 't7',\n 't8',\n 't9',\n 't10',\n 't11',\n 't12',\n 't13',\n 't14',\n];\n/**\n * Returns `true` if `current` is before `target`.\n *\n * Unknown `current` hardforks are treated as newer than every known hardfork.\n */\nexport function lt(current, target) {\n const index = hardforks.indexOf(current);\n if (index === -1)\n return false;\n return index < hardforks.indexOf(target);\n}\n//# sourceMappingURL=Hardfork.js.map","import { TokenId } from 'ox/tempo';\nimport { formatUnits } from '../../utils/unit/formatUnits.js';\n/**\n * Wraps an action so failures with a decoded Tempo error throw a {@link TempoExecutionError}.\n * Other errors are rethrown unchanged.\n *\n * @internal\n */\nexport function withExecutionError(action, options = {}) {\n return (async (client, parameters) => {\n try {\n return await action(client, parameters);\n }\n catch (error) {\n // Loaded on failure only, so resolvers and error tables stay out of the success path.\n const { toExecutionError } = await import('./resolveError.js');\n throw await toExecutionError(error, { ...options, client, parameters });\n }\n });\n}\n/** Fee token from the action parameters or chain, when set. */\nexport function getFeeToken(context) {\n const feeToken = context.parameters.feeToken ??\n context.client.chain?.feeToken;\n return feeToken === undefined || feeToken === null\n ? undefined\n : TokenId.toAddress(feeToken);\n}\n/** Formats an amount as `formatted (raw)` when decimals are known. */\nexport function formatAmount(value, decimals) {\n if (value === undefined)\n return undefined;\n if (decimals === undefined)\n return value.toString();\n return `${formatUnits(value, decimals)} (${value})`;\n}\n/** Formats Unix seconds as an ISO 8601 string. */\nexport function formatTime(seconds) {\n if (!seconds)\n return undefined;\n const milliseconds = Number(seconds) * 1000;\n // `Date` cannot represent times past ±8.64e15 milliseconds.\n if (!(Math.abs(milliseconds) <= 8.64e15))\n return seconds.toString();\n return new Date(milliseconds).toISOString();\n}\n//# sourceMappingURL=errors.js.map","import { TokenId } from 'ox/tempo';\nimport { readContract } from '../../actions/public/readContract.js';\nimport { isAddressEqual } from '../../utils/address/isAddressEqual.js';\nimport { encodeFunctionData } from '../../utils/index.js';\nimport * as Abis from '../Abis.js';\n/**\n * Resolves the token contract `address` and `decimals` from a `token`, which is\n * a token symbol declared on the client's `tokens` array, a TIP20 token id, or\n * a contract `address`.\n *\n * When `token` is a declared symbol, the `address` and `decimals` are read from\n * the client's declared `tokens` (`decimals` can be overridden via the explicit\n * `decimals`). When `token` is a token id or address, its `decimals` is inferred\n * from the client's declared `tokens` when the address matches a declared token,\n * otherwise taken from the explicit `decimals`.\n *\n * When `client` is omitted, `token` must be a token id or address (symbols\n * cannot be resolved), and `decimals` is only taken from the explicit\n * `decimals`.\n *\n * @param client - Client (optional).\n * @param parameters - Parameters.\n * @returns The resolved `address` and `decimals`.\n */\nexport function resolveToken(client, parameters) {\n const { decimals, token } = parameters;\n if (client && typeof token === 'string') {\n const declared = findDeclaredTokenBySymbol(client, token);\n if (declared)\n return {\n address: declared.address,\n decimals: decimals ?? declared.decimals,\n };\n }\n const address = TokenId.toAddress(token);\n return {\n address,\n decimals: decimals ?? (client ? inferDecimals(client, address) : undefined),\n };\n}\n/**\n * Finds the declared {@link ResolvedToken} on the client's `tokens` array matching\n * `token`, which is either a token symbol, a TIP20 token id, or a contract\n * `address`, resolved for the client's `chain.id`. Returns `undefined` when no\n * declared token matches, or the matching token has no address for the client's\n * chain.\n *\n * @param client - Client.\n * @param token - Token symbol (declared on the client's `tokens` array), TIP20 token id, or contract address.\n * @returns The matching declared token config, or `undefined`.\n */\nexport function findDeclaredToken(client, token) {\n const tokens = client.tokens;\n const chainId = client.chain?.id;\n if (!tokens || chainId === undefined)\n return undefined;\n if (typeof token === 'string') {\n const declared = findDeclaredTokenBySymbol(client, token);\n if (declared)\n return declared;\n }\n const address = TokenId.toAddress(token);\n for (const token_ of tokens) {\n const resolved = resolveTokenForChain(token_, chainId);\n if (resolved && isAddressEqual(resolved.address, address))\n return resolved;\n }\n return undefined;\n}\n/**\n * Finds a declared token by `symbol` (case-insensitively) on the client's\n * `tokens` array, resolved for the client's `chain.id`. @internal\n */\nfunction findDeclaredTokenBySymbol(client, symbol) {\n const tokens = client.tokens;\n const chainId = client.chain?.id;\n if (!tokens || chainId === undefined)\n return undefined;\n const lowerSymbol = symbol.toLowerCase();\n for (const token of tokens) {\n if (token.symbol?.toLowerCase() === lowerSymbol)\n return resolveTokenForChain(token, chainId);\n }\n return undefined;\n}\n/**\n * Resolves a {@link Token} to a {@link ResolvedToken} for `chainId`, or\n * `undefined` when the token has no address for `chainId`. @internal\n */\nfunction resolveTokenForChain(token, chainId) {\n const address = token.addresses[chainId];\n if (!address)\n return undefined;\n return {\n address,\n currency: token.currency,\n decimals: token.decimals,\n name: token.name,\n popular: token.popular,\n symbol: token.symbol,\n };\n}\n/**\n * Infers a token's `decimals` from the client's `tokens` array by matching\n * `address` against each token's address for the client's `chain.id`.\n * @internal\n */\nfunction inferDecimals(client, address) {\n const tokens = client.tokens;\n const chainId = client.chain?.id;\n if (tokens && chainId !== undefined)\n for (const token of tokens) {\n const resolved = resolveTokenForChain(token, chainId);\n if (resolved && isAddressEqual(resolved.address, address))\n return resolved.decimals;\n }\n return undefined;\n}\n/**\n * Resolves token decimals, fetching from the token contract when they are not\n * provided explicitly or declared on the chain.\n * @internal\n */\nexport async function resolveTokenWithDecimals(client, parameters) {\n const { address, decimals } = resolveToken(client, parameters);\n if (decimals !== undefined)\n return { address, decimals };\n return {\n address,\n decimals: await readContract(client, {\n abi: Abis.tip20,\n address,\n functionName: 'decimals',\n }),\n };\n}\n/**\n * Picks the transaction-override fields shared by Tempo write actions (including\n * Tempo-specific fields), so the action-specific args (`token`, `amount`, `to`,\n * etc.) don't leak into `estimateContractGas` / `simulateContract` requests.\n * @internal\n */\nexport function pickWriteParameters(parameters) {\n const { account, chain, feePayer, feeToken, gas, keyAuthorization, maxFeePerGas, maxPriorityFeePerGas, nonce, nonceKey, owner, validAfter, validBefore, } = parameters;\n return {\n account,\n chain,\n feePayer,\n feeToken,\n gas,\n keyAuthorization,\n maxFeePerGas,\n maxPriorityFeePerGas,\n nonce,\n nonceKey,\n owner,\n validAfter,\n validBefore,\n };\n}\n/** @internal */\nexport function pickWriteSyncParameters(parameters) {\n const { pollingInterval, timeout } = parameters;\n return { pollingInterval, timeout };\n}\n/**\n * Splits {@link CallParameters} into `[client, args]`, with an `undefined`\n * client when the caller omitted it.\n * @internal\n */\nexport function resolveCallParameters(parameters) {\n if (parameters.length === 2)\n return parameters;\n return [undefined, parameters[0]];\n}\nexport function defineCall(call) {\n return {\n ...call,\n // Precompile errors bubble up across contracts (e.g. `AccountKeychain` errors from a TIP-20 `transfer`).\n abi: [...call.abi, ...Abis.coreErrors],\n data: encodeFunctionData(call),\n to: call.address,\n };\n}\n/**\n * Normalizes a value into a structured-clone compatible format.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/structuredClone\n * @internal\n */\nexport function normalizeValue(value) {\n if (Array.isArray(value))\n return value.map(normalizeValue);\n if (typeof value === 'function')\n return undefined;\n if (typeof value !== 'object' || value === null)\n return value;\n if (Object.getPrototypeOf(value) !== Object.prototype)\n try {\n return structuredClone(value);\n }\n catch {\n return undefined;\n }\n const normalized = {};\n for (const [k, v] of Object.entries(value))\n normalized[k] = normalizeValue(v);\n return normalized;\n}\n/** 12-byte prefix shared by TIP-20 token addresses; shorter prefixes are cheap to grind with CREATE2. */\nconst tip20Prefix = '0x20c000000000000000000000';\n/** Whether `address` carries the TIP-20 token address prefix. */\nexport function isTip20(address) {\n return !!address?.toLowerCase().startsWith(tip20Prefix);\n}\n//# sourceMappingURL=utils.js.map","import { AccountConfig, AccountOperation, KeyAuthorization, SignatureEnvelope, } from 'ox/tempo';\nimport { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { readContract } from '../../actions/public/readContract.js';\nimport { watchContractEvent } from '../../actions/public/watchContractEvent.js';\nimport { sendTransaction } from '../../actions/wallet/sendTransaction.js';\nimport { sendTransactionSync } from '../../actions/wallet/sendTransactionSync.js';\nimport { writeContract } from '../../actions/wallet/writeContract.js';\nimport { writeContractSync } from '../../actions/wallet/writeContractSync.js';\nimport { MethodNotFoundRpcError, MethodNotSupportedRpcError, } from '../../errors/rpc.js';\nimport { formatAbiItem } from '../../utils/abi/formatAbiItem.js';\nimport { parseEventLogs } from '../../utils/abi/parseEventLogs.js';\nimport { isAddressEqual } from '../../utils/address/isAddressEqual.js';\nimport * as Abis from '../Abis.js';\nimport { fromConfig, getKeyAuthorizationSignPayload, resolveAccessKey, signKeyAuthorization, } from '../Account.js';\nimport * as Addresses from '../Addresses.js';\nimport { parseApproval } from '../accounts/Signature.js';\nimport { TempoExecutionError } from '../errors.js';\nimport * as Hardfork from '../Hardfork.js';\nimport { formatAmount, formatTime, getFeeToken, withExecutionError, } from '../internal/errors.js';\nimport { defineCall, isTip20 } from '../internal/utils.js';\nimport { getConfig } from './accounts.js';\n/** @internal */\nconst signatureTypes = {\n 0: 'secp256k1',\n 1: 'p256',\n 2: 'webAuthn',\n 3: 'configurable',\n};\n/** @internal */\nconst spendPolicies = {\n true: 'limited',\n false: 'unlimited',\n};\n/**\n * Authorizes an access key by signing a key authorization and sending a transaction.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions, Account } from 'viem/tempo'\n * import { generatePrivateKey } from 'viem/accounts'\n *\n * const account = Account.from({ privateKey: '0x...' })\n * const client = createClient({\n * account,\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const accessKey = Account.fromP256(generatePrivateKey(), {\n * access: account,\n * })\n *\n * const hash = await Actions.accessKey.authorize(client, {\n * accessKey,\n * expiry: Math.floor((Date.now() + 30_000) / 1000),\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function authorize(client, parameters) {\n return authorize.inner(sendTransaction, client, parameters);\n}\n(function (authorize) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { accessKey, admin, chainId = client.chain?.id, expiry, limits, scopes, witness, ...rest } = parameters;\n const account_ = rest.account ?? client.account;\n if (!account_)\n throw new Error('account is required.');\n if (!chainId)\n throw new Error('chainId is required.');\n const keyAuthorization = await signLocal(client, {\n account: account_,\n accessKey,\n chainId,\n admin,\n expiry,\n limits,\n scopes,\n witness,\n });\n return (await withExecutionError(action, {\n hints: {\n KeyAlreadyExists: [\n 'This access key is already authorized. Update its spending limits instead.',\n ],\n },\n })(client, {\n ...rest,\n keyAuthorization,\n }));\n }\n authorize.inner = inner;\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.accountKeychain,\n logs,\n eventName: 'KeyAuthorized',\n strict: true,\n });\n if (!log)\n throw new Error('`KeyAuthorized` event not found.');\n return log;\n }\n authorize.extractEvent = extractEvent;\n})(authorize || (authorize = {}));\n/**\n * Authorizes an access key and waits for the transaction receipt.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions, Account } from 'viem/tempo'\n * import { generatePrivateKey } from 'viem/accounts'\n *\n * const account = Account.from({ privateKey: '0x...' })\n * const client = createClient({\n * account,\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const accessKey = Account.fromP256(generatePrivateKey(), {\n * access: account,\n * })\n *\n * const { receipt, ...result } = await Actions.accessKey.authorizeSync(client, {\n * accessKey,\n * expiry: Math.floor((Date.now() + 30_000) / 1000),\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function authorizeSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await authorize.inner(sendTransactionSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = authorize.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Burns a key-authorization witness, invalidating any authorization bound to\n * it before it is submitted onchain.\n *\n * Once burned, an `authorizeKey` call carrying the same `witness` will revert.\n * This lets applications issue a signed authorization offchain (see\n * {@link authorize}) while retaining the ability to revoke it.\n *\n * [TIP-1053](https://tips.sh/1053)\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const hash = await Actions.accessKey.burnWitness(client, {\n * witness: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function burnWitness(client, parameters) {\n return burnWitness.inner(writeContract, client, parameters);\n}\n(function (burnWitness) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { witness, ...rest } = parameters;\n const call = burnWitness.call({ witness });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n burnWitness.inner = inner;\n /**\n * Defines a call to the `burnKeyAuthorizationWitness` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * }).extend(walletActions)\n *\n * const hash = await client.sendTransaction({\n * calls: [\n * Actions.accessKey.burnWitness.call({ witness: '0x...' }),\n * ],\n * })\n * ```\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { witness } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'burnKeyAuthorizationWitness',\n args: [witness],\n });\n }\n Object.defineProperty(burnWitness, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.accountKeychain,\n logs,\n eventName: 'KeyAuthorizationWitnessBurned',\n strict: true,\n });\n if (!log)\n throw new Error('`KeyAuthorizationWitnessBurned` event not found.');\n return log;\n }\n burnWitness.extractEvent = extractEvent;\n})(burnWitness || (burnWitness = {}));\n/**\n * Burns a key-authorization witness and waits for the transaction receipt.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const { receipt, ...result } = await Actions.accessKey.burnWitnessSync(client, {\n * witness: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function burnWitnessSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await burnWitness.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = burnWitness.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Gets access key information.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const key = await Actions.accessKey.getMetadata(client, {\n * account: '0x...',\n * accessKey: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The key information.\n */\nexport async function getMetadata(client, parameters) {\n const { account: account_ = client.account, accessKey, ...rest } = parameters;\n if (!account_)\n throw new Error('account is required.');\n const account = parseAccount(account_);\n const result = await withExecutionError(readContract)(client, {\n ...rest,\n account: null,\n ...getMetadata.call({ account: account.address, accessKey }),\n });\n return {\n address: result.keyId,\n keyType: signatureTypes[result.signatureType] ??\n 'secp256k1',\n expiry: result.expiry,\n spendPolicy: spendPolicies[`${result.enforceLimits}`],\n isRevoked: result.isRevoked,\n };\n}\n(function (getMetadata) {\n /**\n * Defines a call to the `getKey` function.\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { account, accessKey } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'getKey',\n args: [account, resolveAccessKeyAddress(accessKey)],\n });\n }\n Object.defineProperty(getMetadata, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(getMetadata || (getMetadata = {}));\n/**\n * Gets the remaining spending limit for a key-token pair.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const { remaining, periodEnd } = await Actions.accessKey.getRemainingLimit(client, {\n * account: '0x...',\n * accessKey: '0x...',\n * token: '0x...',\n * })\n *\n * console.log(remaining, periodEnd)\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The remaining spending amount and period end timestamp.\n */\nexport async function getRemainingLimit(client, parameters) {\n const { account: account_ = client.account, accessKey, token, ...rest } = parameters;\n if (!account_)\n throw new Error('account is required.');\n const account = parseAccount(account_);\n // TODO: remove pre-t3 branch once mainnet is on t3.\n const hardfork = client.chain?.hardfork;\n if (hardfork && Hardfork.lt(hardfork, 't3')) {\n const remaining = await withExecutionError(readContract)(client, {\n ...rest,\n ...getRemainingLimit.call({ account: account.address, accessKey, token }),\n });\n return { remaining, periodEnd: undefined };\n }\n const [remaining, periodEnd] = await withExecutionError(readContract)(client, {\n ...rest,\n ...getRemainingLimit.callWithPeriod({\n account: account.address,\n accessKey,\n token,\n }),\n });\n return { remaining, periodEnd };\n}\n(function (getRemainingLimit) {\n /**\n * Defines a call to the `getRemainingLimit` function (pre-T3).\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { account, accessKey, token } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'getRemainingLimit',\n args: [account, resolveAccessKeyAddress(accessKey), token],\n });\n }\n Object.defineProperty(getRemainingLimit, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Defines a call to the `getRemainingLimitWithPeriod` function (T3+).\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function callWithPeriod(args) {\n const { account, accessKey, token } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'getRemainingLimitWithPeriod',\n args: [account, resolveAccessKeyAddress(accessKey), token],\n });\n }\n getRemainingLimit.callWithPeriod = callWithPeriod;\n})(getRemainingLimit || (getRemainingLimit = {}));\n/**\n * Checks whether an access key is an admin key for an account.\n *\n * Returns `true` for the account's root key or for an active admin access key\n * (see {@link authorize} with `admin: true`).\n *\n * [TIP-1049](https://tips.sh/1049)\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const isAdmin = await Actions.accessKey.isAdmin(client, {\n * account: '0x...',\n * accessKey: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns Whether the access key is an admin key.\n */\nexport async function isAdmin(client, parameters) {\n const { account: account_ = client.account, accessKey, ...rest } = parameters;\n if (!account_)\n throw new Error('account is required.');\n const account = parseAccount(account_);\n return withExecutionError(readContract)(client, {\n ...rest,\n account: null,\n ...isAdmin.call({ account: account.address, accessKey }),\n });\n}\n(function (isAdmin) {\n /**\n * Defines a call to the `isAdminKey` function.\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { account, accessKey } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'isAdminKey',\n args: [account, resolveAccessKeyAddress(accessKey)],\n });\n }\n Object.defineProperty(isAdmin, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(isAdmin || (isAdmin = {}));\n/**\n * Checks whether a key-authorization witness has been burned for an account.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const isBurned = await Actions.accessKey.isWitnessBurned(client, {\n * account: '0x...',\n * witness: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns Whether the witness has been burned.\n */\nexport async function isWitnessBurned(client, parameters) {\n const { account: account_ = client.account, witness, ...rest } = parameters;\n if (!account_)\n throw new Error('account is required.');\n const account = parseAccount(account_);\n return withExecutionError(readContract)(client, {\n ...rest,\n account: null,\n ...isWitnessBurned.call({ account: account.address, witness }),\n });\n}\n(function (isWitnessBurned) {\n /**\n * Defines a call to the `isKeyAuthorizationWitnessBurned` function.\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { account, witness } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'isKeyAuthorizationWitnessBurned',\n args: [account, witness],\n });\n }\n Object.defineProperty(isWitnessBurned, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(isWitnessBurned || (isWitnessBurned = {}));\n/**\n * Revokes an authorized access key.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const hash = await Actions.accessKey.revoke(client, {\n * accessKey: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function revoke(client, parameters) {\n return revoke.inner(writeContract, client, parameters);\n}\n(function (revoke) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { accessKey, ...rest } = parameters;\n const call = revoke.call({ accessKey });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n revoke.inner = inner;\n /**\n * Defines a call to the `revokeKey` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * }).extend(walletActions)\n *\n * const hash = await client.sendTransaction({\n * calls: [\n * Actions.accessKey.revoke.call({ accessKey: '0x...' }),\n * ],\n * })\n * ```\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { accessKey } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'revokeKey',\n args: [resolveAccessKeyAddress(accessKey)],\n });\n }\n Object.defineProperty(revoke, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.accountKeychain,\n logs,\n eventName: 'KeyRevoked',\n strict: true,\n });\n if (!log)\n throw new Error('`KeyRevoked` event not found.');\n return log;\n }\n revoke.extractEvent = extractEvent;\n})(revoke || (revoke = {}));\n/**\n * Revokes an authorized access key and waits for the transaction receipt.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const result = await Actions.accessKey.revokeSync(client, {\n * accessKey: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function revokeSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await revoke.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = revoke.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Prepares a key authorization for signing.\n *\n * @example\n * ```ts\n * const authorization = await Actions.accessKey.prepareAuthorization(client, {\n * account,\n * accessKey,\n * })\n * const keyAuthorization = await Actions.accessKey.signAuthorization(\n * client,\n * authorization,\n * )\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns Prepared key authorization parameters.\n */\nexport async function prepareAuthorization(client, parameters) {\n const { chainId = client.chain?.id } = parameters;\n const account_ = parameters.account ?? client.account;\n if (!account_)\n throw new Error('account is required.');\n if (!chainId)\n throw new Error('chainId is required.');\n const parsed = parseAccount(account_);\n const configurableState = await (async () => {\n if ('configurable' in parameters)\n return parameters.configurable;\n if (parsed.source !== 'configurable')\n return undefined;\n const account = parsed;\n if (!account.config)\n throw new Error('An account config is required to prepare a key authorization.');\n return { config: account.config };\n })();\n const authorizationSignPayload = getKeyAuthorizationSignPayload(parsed, {\n ...parameters,\n chainId: BigInt(chainId),\n key: parameters.accessKey,\n });\n const signPayload = parsed.source === 'configurable' && configurableState\n ? AccountConfig.getSignPayload({\n account: parsed.address,\n config: configurableState.config,\n payload: authorizationSignPayload,\n })\n : authorizationSignPayload;\n return {\n ...parameters,\n account: parsed,\n chainId,\n configurable: configurableState,\n signPayload,\n };\n}\n/**\n * Saves a signed key authorization to a relay with key authorization storage.\n *\n * The relay attaches the authorization to the access key's next transaction until\n * the key is active onchain. Use this for authorizations signed outside\n * {@link signAuthorization}, such as on another device. Requires a relay running the\n * `Relay.keyAuthorization` plugin.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions, withRelay } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo,\n * transport: withRelay(http(), http('https://relay.example.com'), {\n * keyAuthorization: true,\n * }),\n * })\n *\n * await Actions.accessKey.saveAuthorization(client, {\n * keyAuthorization,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n */\nexport async function saveAuthorization(client, parameters) {\n const { keyAuthorization } = parameters;\n await client.request({\n method: 'relay_saveKeyAuthorization',\n params: [KeyAuthorization.toRpc(keyAuthorization)],\n });\n}\nexport async function signAuthorization(client, parameters) {\n const coordinated = ('hash' in parameters && parameters.hash) ||\n ('owner' in parameters && parameters.owner);\n if (coordinated) {\n const parameters_ = parameters;\n const owner_ = parameters_.owner;\n if (!owner_ || typeof owner_ === 'string')\n throw new Error('A local owner account is required to approve a configurable account key authorization.');\n const owner = parseAccount(owner_);\n const sign = owner.sign;\n if (!sign)\n throw new Error('A local owner account is required to approve a configurable account key authorization.');\n const request = await (async () => {\n if ('hash' in parameters_ && parameters_.hash) {\n const signature = SignatureEnvelope.serialize(SignatureEnvelope.from(await sign({ hash: parameters_.hash })));\n return { hash: parameters_.hash, signature };\n }\n const { account: account_, owner: _, ...authorization } = parameters_;\n const address = typeof account_ === 'string' ? account_ : account_.address;\n const config = await (async () => {\n if (typeof account_ !== 'string' && account_.config)\n return account_.config;\n const config = await getConfig(client, { address });\n if (config)\n return config;\n throw new Error(`No current account config is cached for account ${address}. Provide the current config.`);\n })();\n const account = (() => {\n if (config.version !== 0n)\n return fromConfig({ address, ...config });\n const { version: _, ...initialConfig } = config;\n return fromConfig({ address: 'infer', ...initialConfig });\n })();\n if (!isAddressEqual(account.address, address))\n throw new Error('Initial account config does not match the account.');\n const prepared = await prepareAuthorization(client, {\n ...authorization,\n account,\n });\n const signature = SignatureEnvelope.serialize(SignatureEnvelope.from(await sign({ hash: prepared.signPayload })));\n const { accessKey, admin, chainId, expiry, limits, scopes, witness } = prepared;\n const { accessKeyAddress, keyType: type } = resolveAccessKey(accessKey);\n const keyAuthorization = KeyAuthorization.from({\n account: account.address,\n address: accessKeyAddress,\n chainId: BigInt(chainId),\n signature: SignatureEnvelope.from({\n account: account.address,\n config,\n signatures: [parseApproval(signature)],\n }),\n type,\n ...(witness ? { witness } : {}),\n ...(admin ? { isAdmin: true } : { expiry, limits, scopes }),\n });\n return { keyAuthorization: KeyAuthorization.toRpc(keyAuthorization) };\n })();\n const operation = await client.request({\n method: 'account_approveKeyAuthorization',\n params: [request],\n });\n const operation_ = AccountOperation.fromRpc(operation);\n const keyAuthorization = KeyAuthorization.deserialize(await (async () => {\n if (operation_.status === 'success')\n return operation_.keyAuthorization;\n const approvals = await AccountOperation.selectApprovals({\n account: operation_.account,\n approvals: operation_.approvals,\n config: operation_.config,\n hash: operation_.hash,\n });\n return AccountOperation.serializeKeyAuthorization(operation_.keyAuthorization, {\n account: operation_.account,\n approvals: approvals.selectedApprovals.length > 0\n ? approvals.selectedApprovals\n : approvals.approvals.slice(0, 1),\n config: operation_.config,\n });\n })());\n if (!keyAuthorization.signature)\n throw new Error('Expected a signed configurable account key authorization.');\n return {\n ...keyAuthorization,\n hash: operation_.hash,\n operation: operation_,\n status: operation_.status,\n };\n }\n const keyAuthorization = await signLocal(client, parameters);\n const signer = parameters.account ?? client.account;\n // Relays with key authorization storage attach it to the access key's next\n // transaction. Admin-signed authorizations can only be submitted by the admin key.\n if (client.transport.keyAuthorization &&\n signer &&\n parseAccount(signer).source !== 'accessKey')\n await saveAuthorization(client, { keyAuthorization }).catch((error) => {\n // Remote relays without key authorization storage do not expose this method.\n if (error instanceof MethodNotFoundRpcError ||\n error instanceof MethodNotSupportedRpcError)\n return;\n throw error;\n });\n return keyAuthorization;\n}\n/** Signs a key authorization locally without saving it to a relay. */\nasync function signLocal(client, parameters) {\n const prepared = ('signPayload' in parameters\n ? parameters\n : await prepareAuthorization(client, parameters));\n const { accessKey, account: account_, chainId, configurable: configurableState, signPayload: _, ...rest } = prepared;\n return signKeyAuthorization(account_, {\n chainId: BigInt(chainId),\n key: accessKey,\n configurable: configurableState,\n ...rest,\n });\n}\n/**\n * Updates the spending limit for a specific token on an authorized access key.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const hash = await Actions.accessKey.updateLimit(client, {\n * accessKey: '0x...',\n * token: '0x...',\n * limit: 1000000000000000000n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function updateLimit(client, parameters) {\n return updateLimit.inner(writeContract, client, parameters);\n}\n(function (updateLimit) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { accessKey, token, limit, ...rest } = parameters;\n const call = updateLimit.call({ accessKey, token, limit });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n updateLimit.inner = inner;\n /**\n * Defines a call to the `updateSpendingLimit` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * }).extend(walletActions)\n *\n * const hash = await client.sendTransaction({\n * calls: [\n * Actions.accessKey.updateLimit.call({\n * accessKey: '0x...',\n * token: '0x...',\n * limit: 1000000000000000000n,\n * }),\n * ],\n * })\n * ```\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { accessKey, token, limit } = args;\n return defineCall({\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n functionName: 'updateSpendingLimit',\n args: [resolveAccessKeyAddress(accessKey), token, limit],\n });\n }\n Object.defineProperty(updateLimit, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.accountKeychain,\n logs,\n eventName: 'SpendingLimitUpdated',\n strict: true,\n });\n if (!log)\n throw new Error('`SpendingLimitUpdated` event not found.');\n return log;\n }\n updateLimit.extractEvent = extractEvent;\n})(updateLimit || (updateLimit = {}));\n/**\n * Updates the spending limit and waits for the transaction receipt.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const result = await Actions.accessKey.updateLimitSync(client, {\n * accessKey: '0x...',\n * token: '0x...',\n * limit: 1000000000000000000n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function updateLimitSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await updateLimit.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = updateLimit.extractEvent(receipt.logs);\n return {\n account: args.account,\n publicKey: args.publicKey,\n token: args.token,\n limit: args.newLimit,\n receipt,\n };\n}\n/**\n * Watches for admin key authorization events.\n *\n * Emitted when an admin key is authorized (see {@link authorize} with\n * `admin: true`).\n *\n * [TIP-1049](https://tips.sh/1049)\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const unwatch = Actions.accessKey.watchAdminAuthorized(client, {\n * onAuthorized: (args, log) => {\n * console.log('Admin key authorized:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchAdminAuthorized(client, parameters) {\n const { onAuthorized, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n eventName: 'AdminKeyAuthorized',\n onLogs: (logs) => {\n for (const log of logs)\n onAuthorized(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for key-authorization witness events.\n *\n * Emitted when a key is authorized with a `witness` (see {@link authorize}).\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const unwatch = Actions.accessKey.watchWitness(client, {\n * onWitness: (args, log) => {\n * console.log('Witness used:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchWitness(client, parameters) {\n const { onWitness, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n eventName: 'KeyAuthorizationWitness',\n onLogs: (logs) => {\n for (const log of logs)\n onWitness(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for key-authorization witness burned events.\n *\n * Emitted when a witness is burned (see {@link burnWitness}).\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const unwatch = Actions.accessKey.watchWitnessBurned(client, {\n * onBurned: (args, log) => {\n * console.log('Witness burned:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchWitnessBurned(client, parameters) {\n const { onBurned, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n eventName: 'KeyAuthorizationWitnessBurned',\n onLogs: (logs) => {\n for (const log of logs)\n onBurned(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Verifies that a keychain signature was produced by an active access key\n * for the expected account.\n *\n * By default (`admin: true`), returns `true` only if the signature was\n * produced by the account's root key or an active admin access key. Set\n * `admin: false` to accept any active access key.\n *\n * Returns `false` for account mismatches, unknown, revoked, or expired\n * access keys. [TIP-1049](https://tips.sh/1049)\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' }),\n * transport: http(),\n * })\n *\n * const valid = await Actions.accessKey.verifyHash(client, {\n * account: '0x...',\n * hash: '0x...',\n * signature: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns Whether the keychain signature is valid for the account.\n */\nexport async function verifyHash(client, parameters) {\n const { account, admin, hash, signature, ...rest } = parameters;\n return withExecutionError(readContract)(client, {\n ...rest,\n ...verifyHash.call({ account, admin, hash, signature }),\n });\n}\n(function (verifyHash) {\n /**\n * Defines a call to `verifyKeychain` or `verifyKeychainAdmin` on the\n * Signature Verifier precompile (controlled by `admin`).\n *\n * @param args - Arguments.\n * @returns The call.\n */\n function call(args) {\n const { account, admin = true, hash, signature } = args;\n return defineCall({\n address: Addresses.signatureVerifier,\n abi: Abis.signatureVerifier,\n functionName: admin ? 'verifyKeychainAdmin' : 'verifyKeychain',\n args: [account, hash, signature],\n });\n }\n Object.defineProperty(verifyHash, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(verifyHash || (verifyHash = {}));\n/** @internal */\nfunction resolveAccessKeyAddress(accessKey) {\n if (typeof accessKey === 'string')\n return accessKey;\n return accessKey.accessKeyAddress;\n}\n/** Thrown when an access key fails an `AccountKeychain` check. */\nexport class AccessKeyError extends TempoExecutionError {\n constructor(parameters, options = {}) {\n const { account, accessKey } = parameters;\n super(parameters, {\n shortMessage: `Access key \"${accessKey}\" failed: ${parameters.error.message}`,\n ...options,\n details: { account, 'access key': accessKey, ...options.details },\n docsPath: '/tempo/guides/access-keys/manage',\n name: options.name ?? 'AccessKeyError',\n });\n /** Root account that owns the access key. */\n Object.defineProperty(this, \"account\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Access key address. */\n Object.defineProperty(this, \"accessKey\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.account = account;\n this.accessKey = accessKey;\n }\n}\n/** Thrown when a transfer, approval, or fee payment exceeds an access key's spending limit. */\nexport class AccessKeySpendingLimitExceededError extends AccessKeyError {\n constructor(parameters) {\n const { amount, decimals, fee, periodEnd, remaining, token } = parameters;\n super(parameters, {\n details: {\n token,\n amount: formatAmount(amount, decimals),\n remaining: formatAmount(remaining, decimals),\n 'exceeded by': amount !== undefined && remaining !== undefined\n ? formatAmount(amount - remaining, decimals)\n : undefined,\n 'resets at': formatTime(periodEnd),\n },\n name: 'AccessKeySpendingLimitExceededError',\n shortMessage: `Access key \"${parameters.accessKey}\" exceeded its spending limit${token ? ` for token \"${token}\"` : ''}${fee ? ' while paying fees' : ''}.`,\n });\n /** Amount the call tried to spend, when known. */\n Object.defineProperty(this, \"amount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token decimals, when known. */\n Object.defineProperty(this, \"decimals\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Whether the fee payment, rather than the call, exceeded the limit. */\n Object.defineProperty(this, \"fee\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** End of the current period (Unix seconds) for periodic limits, when known. */\n Object.defineProperty(this, \"periodEnd\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Remaining limit for `token`, when known. */\n Object.defineProperty(this, \"remaining\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token the limit applies to, when known. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.amount = amount;\n this.decimals = decimals;\n this.fee = fee;\n this.periodEnd = periodEnd;\n this.remaining = remaining;\n this.token = token;\n }\n}\n/** Thrown when a transaction is signed with an expired access key. */\nexport class AccessKeyExpiredError extends AccessKeyError {\n constructor(parameters) {\n super(parameters, {\n details: { 'expired at': formatTime(parameters.expiry) },\n name: 'AccessKeyExpiredError',\n shortMessage: `Access key \"${parameters.accessKey}\" has expired.`,\n });\n /** Expiry (Unix seconds), when known. */\n Object.defineProperty(this, \"expiry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.expiry = parameters.expiry;\n }\n}\n/** Thrown when an access key's scopes do not allow a call. */\nexport class AccessKeyCallNotAllowedError extends AccessKeyError {\n constructor(parameters) {\n const { selector, target } = parameters;\n super(parameters, {\n details: { target, selector },\n name: 'AccessKeyCallNotAllowedError',\n shortMessage: `Access key \"${parameters.accessKey}\" is not allowed to make this call.`,\n });\n /** Function selector of the rejected call, when known. */\n Object.defineProperty(this, \"selector\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Target of the rejected call, when known. */\n Object.defineProperty(this, \"target\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.selector = selector;\n this.target = target;\n }\n}\n/** Thrown when authorizing an access key that is already authorized. */\nexport class AccessKeyAlreadyExistsError extends AccessKeyError {\n constructor(parameters) {\n const { expiry, limited } = parameters;\n super(parameters, {\n details: {\n expires: formatTime(expiry),\n 'spending limits': limited === undefined ? undefined : limited ? 'enforced' : 'none',\n },\n name: 'AccessKeyAlreadyExistsError',\n shortMessage: `Access key \"${parameters.accessKey}\" is already authorized on account \"${parameters.account}\".`,\n });\n /** Expiry (Unix seconds) of the existing key, when known. */\n Object.defineProperty(this, \"expiry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Whether the existing key enforces spending limits, when known. */\n Object.defineProperty(this, \"limited\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.expiry = expiry;\n this.limited = limited;\n }\n}\n/** Thrown when an access key signs with a different key type than it was authorized with. */\nexport class AccessKeySignatureTypeMismatchError extends AccessKeyError {\n constructor(parameters) {\n const [expected, actual] = (parameters.error.args ?? []).map((type) => signatureTypes[Number(type)]);\n super(parameters, {\n details: { expected, actual },\n name: 'AccessKeySignatureTypeMismatchError',\n shortMessage: `Access key \"${parameters.accessKey}\" signed with a ${actual ?? 'different'} key, but was authorized as a ${expected ?? 'different'} key.`,\n });\n /** Key type the access key was authorized with. */\n Object.defineProperty(this, \"expected\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Key type of the signature. */\n Object.defineProperty(this, \"actual\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.expected = expected;\n this.actual = actual;\n }\n}\n/** Thrown when authorizing an access key with an expiry that has passed or is too soon. */\nexport class AccessKeyExpiryInPastError extends AccessKeyError {\n constructor(parameters) {\n const { expiry, minimum } = parameters;\n super(parameters, {\n details: { expiry: formatTime(expiry), minimum: formatTime(minimum) },\n name: 'AccessKeyExpiryInPastError',\n shortMessage: `Access key \"${parameters.accessKey}\" expiry must be later${minimum ? ` than ${formatTime(minimum)}` : ''}.`,\n });\n /** Requested expiry (Unix seconds), when known. */\n Object.defineProperty(this, \"expiry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Earliest allowed expiry (Unix seconds), when known. */\n Object.defineProperty(this, \"minimum\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.expiry = expiry;\n this.minimum = minimum;\n }\n}\nconst keychain = {\n address: Addresses.accountKeychain,\n abi: Abis.accountKeychain,\n};\n/** Signer and key for errors raised while validating the signing access key. */\nfunction getSigner(context) {\n const { call, parameters, signer } = context;\n if (!signer?.accessKey)\n return undefined;\n // Key management calls and authorizations of another key fail about that key, not the signer.\n if (call && isAddressEqual(call.address, Addresses.accountKeychain))\n return undefined;\n const authorized = parameters.keyAuthorization?.address;\n if (authorized && !isAddressEqual(authorized, signer.accessKey))\n return undefined;\n return {\n ...context.base,\n account: signer.address,\n accessKey: signer.accessKey,\n };\n}\n/** Fee payer and key for fee payment errors. External fee payers cannot be resolved. */\nfunction getFeePayer(context) {\n const { feePayer } = context.parameters;\n if (typeof feePayer !== 'object')\n return undefined;\n const account = parseAccount(feePayer);\n if (account.source !== 'accessKey' || !('accessKeyAddress' in account))\n return undefined;\n return {\n ...context.base,\n account: account.address,\n accessKey: account.accessKeyAddress,\n };\n}\n/** Account and key for errors raised while authorizing a key. */\nfunction getAuthorization(context) {\n const { call, parameters, signer } = context;\n const accessKey = parameters.keyAuthorization?.address ??\n call?.arg('keyId');\n if (!signer || !accessKey)\n return undefined;\n return { ...context.base, account: signer.address, accessKey };\n}\n/** @internal */\nexport const errorResolvers = {\n // Fallback for `AccountKeychain` errors without a specific resolver below.\n ...Object.fromEntries(Abis.accountKeychain.flatMap((item) => item.type === 'error'\n ? [\n [\n formatAbiItem(item),\n (context) => {\n const parameters = getSigner(context);\n return parameters && new AccessKeyError(parameters);\n },\n ],\n ]\n : [])),\n 'CallNotAllowed()': (context) => {\n const parameters = getSigner(context);\n if (!parameters)\n return undefined;\n return new AccessKeyCallNotAllowedError({\n ...parameters,\n selector: context.parameters.data?.slice(0, 10),\n target: context.call?.address ?? context.parameters.to,\n });\n },\n 'ExpiryInPast()': (context) => {\n const parameters = getAuthorization(context);\n if (!parameters)\n return undefined;\n const [, expiry, minimum] = /expiry (\\d+) <= min allowed (\\d+)/.exec(context.details) ?? [];\n const requested = context.parameters.keyAuthorization?.expiry ??\n context.call?.arg('expiry') ??\n context.call?.arg('config')?.expiry;\n return new AccessKeyExpiryInPastError({\n ...parameters,\n expiry: expiry\n ? BigInt(expiry)\n : requested === undefined || requested === null\n ? undefined\n : BigInt(requested),\n minimum: minimum ? BigInt(minimum) : undefined,\n });\n },\n 'KeyAlreadyExists()': async (context) => {\n const parameters = getAuthorization(context);\n if (!parameters)\n return undefined;\n const [key] = await context.read([\n {\n ...keychain,\n functionName: 'getKey',\n args: [parameters.account, parameters.accessKey],\n },\n ]);\n return new AccessKeyAlreadyExistsError({\n ...parameters,\n expiry: key?.result?.expiry,\n limited: key?.result?.enforceLimits,\n });\n },\n 'KeyExpired()': async (context) => {\n const parameters = getSigner(context);\n if (!parameters)\n return undefined;\n const [key] = await context.read([\n {\n ...keychain,\n functionName: 'getKey',\n args: [parameters.account, parameters.accessKey],\n },\n ]);\n return new AccessKeyExpiredError({\n ...parameters,\n expiry: key?.result?.expiry,\n });\n },\n 'SignatureTypeMismatch(uint8,uint8)': (context) => {\n const parameters = getSigner(context) ?? getAuthorization(context);\n return parameters && new AccessKeySignatureTypeMismatchError(parameters);\n },\n 'SpendingLimitExceeded()': async (context) => {\n // Without revert data, the fee payment exceeded the limit.\n const fee = context.validation;\n const parameters = fee && context.parameters.feePayer\n ? getFeePayer(context)\n : getSigner(context);\n if (!parameters)\n return undefined;\n const token = fee\n ? getFeeToken(context)\n : isTip20(context.call?.address)\n ? context.call.address\n : undefined;\n if (!token)\n return new AccessKeySpendingLimitExceededError({\n ...parameters,\n fee,\n hints: fee\n ? [...parameters.hints, 'Pay fees with another token.']\n : parameters.hints,\n });\n const args = [parameters.account, parameters.accessKey, token];\n const [withPeriod, legacy, decimals] = await context.read([\n // `getRemainingLimitWithPeriod` is T3+; `getRemainingLimit` covers earlier hardforks.\n { ...keychain, functionName: 'getRemainingLimitWithPeriod', args },\n { ...keychain, functionName: 'getRemainingLimit', args },\n { address: token, abi: Abis.tip20, functionName: 'decimals' },\n ]);\n return new AccessKeySpendingLimitExceededError({\n ...parameters,\n amount: fee ? undefined : context.call?.arg('amount'),\n decimals: decimals?.result,\n fee,\n periodEnd: withPeriod?.result?.[1] || undefined,\n remaining: withPeriod?.result?.[0] ?? legacy?.result,\n token,\n });\n },\n};\n//# sourceMappingURL=accessKey.js.map","import * as Hex from 'ox/Hex';\nimport { TokenId, TokenRole } from 'ox/tempo';\nimport { parseAccount } from '../../accounts/utils/parseAccount.js';\nimport { estimateContractGas } from '../../actions/public/estimateContractGas.js';\nimport { multicall, } from '../../actions/public/multicall.js';\nimport { readContract, } from '../../actions/public/readContract.js';\nimport { simulateContract, } from '../../actions/public/simulateContract.js';\nimport { watchContractEvent } from '../../actions/public/watchContractEvent.js';\nimport * as internal_Token from '../../actions/token/internal.js';\nimport { sendTransaction } from '../../actions/wallet/sendTransaction.js';\nimport { sendTransactionSync, } from '../../actions/wallet/sendTransactionSync.js';\nimport { writeContract } from '../../actions/wallet/writeContract.js';\nimport { writeContractSync } from '../../actions/wallet/writeContractSync.js';\nimport { zeroAddress } from '../../constants/address.js';\nimport { AccountNotFoundError } from '../../errors/account.js';\nimport { encodeFunctionData } from '../../utils/abi/encodeFunctionData.js';\nimport { parseEventLogs } from '../../utils/abi/parseEventLogs.js';\nimport { formatUnits } from '../../utils/unit/formatUnits.js';\nimport * as Abis from '../Abis.js';\nimport * as Addresses from '../Addresses.js';\nimport { TempoExecutionError } from '../errors.js';\nimport { formatAmount, withExecutionError, } from '../internal/errors.js';\nimport { defineCall, findDeclaredToken, isTip20, pickWriteParameters, resolveCallParameters, resolveToken, resolveTokenWithDecimals, } from '../internal/utils.js';\n/**\n * Approves a spender to transfer TIP20 tokens on behalf of the caller.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.approve(client, {\n * spender: '0x...',\n * amount: 100n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function approve(client, parameters) {\n return approve.inner(writeContract, client, parameters);\n}\n(function (approve) {\n /** @internal */\n async function inner(action, client, parameters) {\n return (await withExecutionError(action)(client, {\n ...parameters,\n ...approve.call(client, parameters),\n }));\n }\n approve.inner = inner;\n /**\n * Defines a call to the `approve` function.\n *\n * Can be passed as a parameter to `estimateContractGas`, `simulateContract`,\n * `sendCalls`, `sendTransaction` (`calls`), or `multicall`. The token is\n * selected by `token`, which is either a TIP20 token id or a contract\n * `address`; `amount.decimals` is inferred from the client's declared\n * `tokens` when omitted.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { amount, spender, token } = args;\n const { address, decimals } = resolveToken(client, { token });\n return defineCall({\n address,\n abi: Abis.tip20,\n functionName: 'approve',\n args: [spender, internal_Token.toBaseUnits(amount, decimals)],\n });\n }\n Object.defineProperty(approve, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Estimates the gas required to approve a spender. `amount.decimals` is\n * inferred from the client's declared `tokens` when omitted.\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The gas estimate.\n */\n async function estimateGas(client, parameters) {\n return estimateContractGas(client, {\n ...pickWriteParameters(parameters),\n ...approve.call(client, parameters),\n });\n }\n approve.estimateGas = estimateGas;\n /**\n * Simulates an approval of a spender. `amount.decimals` is inferred from\n * the client's declared `tokens` when omitted.\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The simulation result and write request.\n */\n async function simulate(client, parameters) {\n return simulateContract(client, {\n ...pickWriteParameters(parameters),\n ...approve.call(client, parameters),\n });\n }\n approve.simulate = simulate;\n /**\n * Extracts the `Approval` event from logs.\n *\n * @param logs - The logs.\n * @returns The `Approval` event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'Approval',\n });\n if (!log)\n throw new Error('`Approval` event not found.');\n return log;\n }\n approve.extractEvent = extractEvent;\n})(approve || (approve = {}));\n/**\n * Approves a spender to transfer TIP20 tokens on behalf of the caller.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.approveSync(client, {\n * spender: '0x...',\n * amount: 100n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function approveSync(client, parameters) {\n const { amount, token, throwOnReceiptRevert = true } = parameters;\n const { decimals } = resolveToken(client, { token });\n const resolved = internal_Token.resolveAmountDecimals(amount, decimals);\n const receipt = await approve.inner(writeContractSync, client, {\n ...parameters,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = approve.extractEvent(receipt.logs);\n return {\n ...args,\n ...(resolved === undefined\n ? {}\n : { decimals: resolved, formatted: formatUnits(args.amount, resolved) }),\n receipt,\n };\n}\n/**\n * Burns TIP20 tokens from a blocked address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.burnBlocked(client, {\n * from: '0x...',\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function burnBlocked(client, parameters) {\n return burnBlocked.inner(writeContract, client, parameters);\n}\n(function (burnBlocked) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { amount, from, token, ...rest } = parameters;\n const call = burnBlocked.call(client, { amount, from, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n burnBlocked.inner = inner;\n /**\n * Defines a call to the `burnBlocked` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.burnBlocked.call(client, {\n * from: '0x20c0...beef',\n * amount: 100n,\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * `amount.decimals` is inferred from the client's declared `tokens` when omitted.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { from, amount, token } = args;\n const { address, decimals } = resolveToken(client, { token });\n return defineCall({\n address,\n abi: Abis.tip20,\n functionName: 'burnBlocked',\n args: [from, internal_Token.toBaseUnits(amount, decimals)],\n });\n }\n Object.defineProperty(burnBlocked, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'BurnBlocked',\n });\n if (!log)\n throw new Error('`BurnBlocked` event not found.');\n return log;\n }\n burnBlocked.extractEvent = extractEvent;\n})(burnBlocked || (burnBlocked = {}));\n/**\n * Burns TIP20 tokens from a blocked address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.burnBlockedSync(client, {\n * from: '0x...',\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function burnBlockedSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await burnBlocked.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = burnBlocked.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Burns TIP20 tokens from the caller's balance.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.burn(client, {\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function burn(client, parameters) {\n return burn.inner(writeContract, client, parameters);\n}\n(function (burn) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { amount, from, memo, token, ...rest } = parameters;\n const call = burn.call(client, { amount, from, memo, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n burn.inner = inner;\n /**\n * Defines a call to the `burn`, `burnWithMemo`, or `burnAt` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.burn.call(client, {\n * amount: 100n,\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * `amount.decimals` is inferred from the client's declared `tokens` when omitted.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { amount, from, memo, token } = args;\n const { address, decimals } = resolveToken(client, { token });\n const value = internal_Token.toBaseUnits(amount, decimals);\n if (from)\n return defineCall({\n address,\n abi: Abis.tip20,\n functionName: 'burnAt',\n args: [from, value],\n });\n const callArgs = memo\n ? {\n functionName: 'burnWithMemo',\n args: [value, Hex.padLeft(memo, 32)],\n }\n : {\n functionName: 'burn',\n args: [value],\n };\n return defineCall({\n address,\n abi: Abis.tip20,\n ...callArgs,\n });\n }\n Object.defineProperty(burn, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: ['Burn', 'BurnAt'],\n });\n if (!log)\n throw new Error('`Burn` or `BurnAt` event not found.');\n return log;\n }\n burn.extractEvent = extractEvent;\n})(burn || (burn = {}));\n/**\n * Burns TIP20 tokens from the caller's balance.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.burnSync(client, {\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function burnSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await burn.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = burn.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Changes the transfer policy ID for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.changeTransferPolicy(client, {\n * token: '0x...',\n * policyId: 1n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function changeTransferPolicy(client, parameters) {\n return changeTransferPolicy.inner(writeContract, client, parameters);\n}\n(function (changeTransferPolicy) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { policyId, token, ...rest } = parameters;\n const call = changeTransferPolicy.call(client, { policyId, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n changeTransferPolicy.inner = inner;\n /**\n * Defines a call to the `changeTransferPolicyId` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.changeTransferPolicy.call(client, {\n * token: '0x20c0...babe',\n * policyId: 1n,\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, policyId } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'changeTransferPolicyId',\n args: [policyId],\n });\n }\n Object.defineProperty(changeTransferPolicy, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'TransferPolicyUpdate',\n });\n if (!log)\n throw new Error('`TransferPolicyUpdate` event not found.');\n return log;\n }\n changeTransferPolicy.extractEvent = extractEvent;\n})(changeTransferPolicy || (changeTransferPolicy = {}));\n/**\n * Changes the transfer policy ID for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.changeTransferPolicySync(client, {\n * token: '0x...',\n * policyId: 1n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function changeTransferPolicySync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await changeTransferPolicy.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = changeTransferPolicy.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Creates a new TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.create(client, {\n * name: 'My Token',\n * symbol: 'MTK',\n * currency: 'USD',\n * logoURI: 'https://example.com/token.svg',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function create(client, parameters) {\n return create.inner(writeContract, client, parameters);\n}\n(function (create) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { account = client.account, admin: admin_ = client.account, chain = client.chain, ...rest } = parameters;\n const admin = admin_ ? parseAccount(admin_) : undefined;\n if (!admin)\n throw new Error('admin is required.');\n const call = create.call(client, { ...rest, admin: admin.address });\n return (await withExecutionError(action)(client, {\n ...parameters,\n account,\n chain,\n ...call,\n }));\n }\n create.inner = inner;\n /**\n * Defines a call to the `createToken` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.create.call(client, {\n * name: 'My Token',\n * symbol: 'MTK',\n * currency: 'USD',\n * logoURI: 'https://example.com/token.svg',\n * admin: '0xfeed...fede',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { name, symbol, currency, logoURI, quoteToken = Addresses.pathUsd, admin, salt = Hex.random(32), } = args;\n return defineCall({\n address: Addresses.tip20Factory,\n abi: Abis.tip20Factory,\n args: typeof logoURI === 'string'\n ? [\n name,\n symbol,\n currency,\n resolveToken(client, { token: quoteToken }).address,\n admin,\n salt,\n logoURI,\n ]\n : [\n name,\n symbol,\n currency,\n resolveToken(client, { token: quoteToken }).address,\n admin,\n salt,\n ],\n functionName: 'createToken',\n });\n }\n Object.defineProperty(create, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the `TokenCreated` event from logs.\n *\n * @param logs - The logs.\n * @returns The `TokenCreated` event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20Factory,\n logs,\n eventName: 'TokenCreated',\n strict: true,\n });\n if (!log)\n throw new Error('`TokenCreated` event not found.');\n return log;\n }\n create.extractEvent = extractEvent;\n})(create || (create = {}));\n/**\n * Creates a new TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.createSync(client, {\n * name: 'My Token',\n * symbol: 'MTK',\n * currency: 'USD',\n * logoURI: 'https://example.com/token.svg',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function createSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await create.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = create.extractEvent(receipt.logs);\n const tokenId = TokenId.fromAddress(args.token);\n return {\n ...args,\n receipt,\n tokenId,\n };\n}\n/**\n * Gets TIP20 token allowance.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const allowance = await Actions.token.getAllowance(client, {\n * account: '0x...',\n * spender: '0x...',\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The token allowance, in base units and human-readable form.\n */\nexport async function getAllowance(client, parameters) {\n const { account, decimals, spender, token, ...rest } = parameters;\n const [amount, { decimals: resolved }] = await Promise.all([\n withExecutionError(readContract)(client, {\n ...rest,\n ...getAllowance.call(client, { account, spender, token }),\n }),\n resolveTokenWithDecimals(client, {\n decimals,\n token,\n }),\n ]);\n return internal_Token.toAmount(amount, resolved);\n}\n(function (getAllowance) {\n /**\n * Defines a call to the `allowance` function.\n *\n * Can be passed as a parameter to `multicall`, `simulateContract`, or any\n * other action that accepts a contract call. The token is selected by `token`,\n * which is either a TIP20 token id or a contract address.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n return defineCall({\n address: resolveToken(client, args).address,\n abi: Abis.tip20,\n functionName: 'allowance',\n args: [args.account, args.spender],\n });\n }\n Object.defineProperty(getAllowance, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(getAllowance || (getAllowance = {}));\n/**\n * Gets TIP20 token balance for an address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const balance = await Actions.token.getBalance(client, {\n * account: '0x...',\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The token balance, in base units and human-readable form.\n */\nexport async function getBalance(client, parameters) {\n const { account: account_ = client.account, decimals, token, ...rest } = parameters;\n if (!account_)\n throw new AccountNotFoundError();\n const account = parseAccount(account_).address;\n const [amount, { decimals: resolved }] = await Promise.all([\n withExecutionError(readContract)(client, {\n ...rest,\n ...getBalance.call(client, { account, token }),\n }),\n resolveTokenWithDecimals(client, {\n decimals,\n token,\n }),\n ]);\n return internal_Token.toAmount(amount, resolved);\n}\n(function (getBalance) {\n /**\n * Defines a call to the `balanceOf` function.\n *\n * Can be passed as a parameter to `multicall`, `simulateContract`, or any\n * other action that accepts a contract call. The token is selected by `token`,\n * which is either a TIP20 token id or a contract address.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const account_ = args.account ?? client?.account;\n if (!account_)\n throw new AccountNotFoundError();\n const account = parseAccount(account_).address;\n return defineCall({\n address: resolveToken(client, args).address,\n abi: Abis.tip20,\n functionName: 'balanceOf',\n args: [account],\n });\n }\n Object.defineProperty(getBalance, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(getBalance || (getBalance = {}));\n/**\n * Gets TIP20 token metadata including name, symbol, logo URI, currency, decimals, and total supply.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const metadata = await Actions.token.getMetadata(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The token metadata.\n */\nexport async function getMetadata(client, parameters) {\n const { token, ...rest } = parameters;\n const { address } = resolveToken(client, { token });\n const abi = Abis.tip20;\n const declared = findDeclaredToken(client, token);\n const overrides = {\n ...(declared?.decimals != null ? { decimals: declared.decimals } : {}),\n ...(declared?.name != null ? { name: declared.name } : {}),\n ...(declared?.symbol != null ? { symbol: declared.symbol } : {}),\n };\n if (TokenId.fromAddress(address) === TokenId.fromAddress(Addresses.pathUsd))\n return readMetadataContracts(client, {\n ...rest,\n contracts: [\n {\n address,\n abi,\n functionName: 'currency',\n },\n {\n address,\n abi,\n functionName: 'decimals',\n },\n {\n address,\n abi,\n functionName: 'logoURI',\n },\n {\n address,\n abi,\n functionName: 'name',\n },\n {\n address,\n abi,\n functionName: 'symbol',\n },\n {\n address,\n abi,\n functionName: 'totalSupply',\n },\n ],\n }).then(([currency, decimals, logoURI, name, symbol, totalSupply]) => ({\n name: unwrapMulticallResult(name),\n symbol: unwrapMulticallResult(symbol),\n currency: unwrapMulticallResult(currency),\n decimals: unwrapMulticallResult(decimals),\n logoURI: unwrapMulticallResult(logoURI, ''),\n totalSupply: unwrapMulticallResult(totalSupply),\n ...overrides,\n }));\n return readMetadataContracts(client, {\n ...rest,\n contracts: [\n {\n address,\n abi,\n functionName: 'currency',\n },\n {\n address,\n abi,\n functionName: 'decimals',\n },\n {\n address,\n abi,\n functionName: 'logoURI',\n },\n {\n address,\n abi,\n functionName: 'quoteToken',\n },\n {\n address,\n abi,\n functionName: 'name',\n },\n {\n address,\n abi,\n functionName: 'paused',\n },\n {\n address,\n abi,\n functionName: 'supplyCap',\n },\n {\n address,\n abi,\n functionName: 'symbol',\n },\n {\n address,\n abi,\n functionName: 'totalSupply',\n },\n {\n address,\n abi,\n functionName: 'transferPolicyId',\n },\n ],\n }).then(([currency, decimals, logoURI, quoteToken, name, paused, supplyCap, symbol, totalSupply, transferPolicyId,]) => ({\n name: unwrapMulticallResult(name),\n symbol: unwrapMulticallResult(symbol),\n currency: unwrapMulticallResult(currency),\n decimals: unwrapMulticallResult(decimals),\n logoURI: unwrapMulticallResult(logoURI, ''),\n quoteToken: unwrapMulticallResult(quoteToken),\n totalSupply: unwrapMulticallResult(totalSupply),\n paused: unwrapMulticallResult(paused),\n supplyCap: unwrapMulticallResult(supplyCap),\n transferPolicyId: unwrapMulticallResult(transferPolicyId),\n ...overrides,\n }));\n}\nasync function readMetadataContracts(client, parameters) {\n // Preserve the action's deployless default unless the client overrides it.\n if (client.batch?.multicall === undefined)\n return multicall(client, {\n ...parameters,\n allowFailure: true,\n deployless: true,\n });\n const { contracts, ...rest } = parameters;\n const results = await Promise.allSettled(contracts.map((contract) => withExecutionError(readContract)(client, {\n ...rest,\n ...contract,\n })));\n return results.map((result) => result.status === 'fulfilled'\n ? { result: result.value, status: 'success' }\n : { error: result.reason, status: 'failure' });\n}\nfunction unwrapMulticallResult(response, ...fallback) {\n if (response.status === 'failure') {\n if (fallback.length > 0)\n return fallback[0];\n throw response.error;\n }\n return response.result;\n}\n/**\n * Gets the total supply of a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const totalSupply = await Actions.token.getTotalSupply(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The token total supply, in base units and human-readable form.\n */\nexport async function getTotalSupply(client, parameters) {\n const { decimals, token, ...rest } = parameters;\n const [amount, { decimals: resolved }] = await Promise.all([\n withExecutionError(readContract)(client, {\n ...rest,\n ...getTotalSupply.call(client, { token }),\n }),\n resolveTokenWithDecimals(client, {\n decimals,\n token,\n }),\n ]);\n return internal_Token.toAmount(amount, resolved);\n}\n(function (getTotalSupply) {\n /**\n * Defines a call to the `totalSupply` function.\n *\n * Can be passed as a parameter to `multicall`, `simulateContract`, or any\n * other action that accepts a contract call. The token is selected by `token`,\n * which is either a TIP20 token id or a contract address.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n return defineCall({\n address: resolveToken(client, args).address,\n abi: Abis.tip20,\n args: [],\n functionName: 'totalSupply',\n });\n }\n Object.defineProperty(getTotalSupply, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(getTotalSupply || (getTotalSupply = {}));\n/**\n * Gets the admin role for a specific role in a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const adminRole = await Actions.token.getRoleAdmin(client, {\n * role: 'issuer',\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The admin role hash.\n */\nexport async function getRoleAdmin(client, parameters) {\n return withExecutionError(readContract)(client, {\n ...parameters,\n ...getRoleAdmin.call(client, parameters),\n });\n}\n(function (getRoleAdmin) {\n /**\n * Defines a call to the `getRoleAdmin` function.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { role, token } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'getRoleAdmin',\n args: [TokenRole.serialize(role)],\n });\n }\n Object.defineProperty(getRoleAdmin, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(getRoleAdmin || (getRoleAdmin = {}));\n/**\n * Checks if an account has a specific role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const hasRole = await Actions.token.hasRole(client, {\n * account: '0x...',\n * role: 'issuer',\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns Whether the account has the role.\n */\nexport async function hasRole(client, parameters) {\n const { account = client.account } = parameters;\n const address = account ? parseAccount(account).address : undefined;\n if (!address)\n throw new Error('account is required.');\n return withExecutionError(readContract)(client, {\n ...parameters,\n ...hasRole.call(client, { ...parameters, account: address }),\n });\n}\n(function (hasRole) {\n /**\n * Defines a call to the `hasRole` function.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { account, role, token } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'hasRole',\n args: [account, TokenRole.serialize(role)],\n });\n }\n Object.defineProperty(hasRole, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n})(hasRole || (hasRole = {}));\n/**\n * Grants a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.grantRoles(client, {\n * token: '0x...',\n * to: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function grantRoles(client, parameters) {\n return grantRoles.inner(sendTransaction, client, parameters);\n}\n(function (grantRoles) {\n /** @internal */\n async function inner(action, client, parameters) {\n return (await withExecutionError(action)(client, {\n ...parameters,\n calls: parameters.roles.map((role) => {\n const call = grantRoles.call(client, { ...parameters, role });\n return {\n ...call,\n data: encodeFunctionData(call),\n };\n }),\n }));\n }\n grantRoles.inner = inner;\n /**\n * Defines a call to the `grantRole` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.grantRoles.call(client, {\n * token: '0x20c0...babe',\n * to: '0x20c0...beef',\n * role: 'issuer',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, to, role } = args;\n const roleHash = TokenRole.serialize(role);\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'grantRole',\n args: [roleHash, to],\n });\n }\n Object.defineProperty(grantRoles, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the events from the logs.\n *\n * @param logs - Logs.\n * @returns The events.\n */\n function extractEvents(logs) {\n const events = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'RoleMembershipUpdated',\n });\n if (events.length === 0)\n throw new Error('`RoleMembershipUpdated` events not found.');\n return events;\n }\n grantRoles.extractEvents = extractEvents;\n})(grantRoles || (grantRoles = {}));\n/**\n * Grants a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.grantRolesSync(client, {\n * token: '0x...',\n * to: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function grantRolesSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await grantRoles.inner(sendTransactionSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const events = grantRoles.extractEvents(receipt.logs);\n const value = events.map((event) => event.args);\n return {\n receipt,\n value,\n };\n}\n/**\n * Mints TIP20 tokens to an address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.mint(client, {\n * to: '0x...',\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function mint(client, parameters) {\n return mint.inner(writeContract, client, parameters);\n}\n(function (mint) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { amount, memo, to, token, ...rest } = parameters;\n const call = mint.call(client, { amount, memo, to, token });\n return (await withExecutionError(action, {\n hints: {\n Unauthorized: [\n 'Minting requires the issuer role. Grant it to this account first.',\n ],\n },\n })(client, {\n ...rest,\n ...call,\n }));\n }\n mint.inner = inner;\n /**\n * Defines a call to the `mint` or `mintWithMemo` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.mint.call(client, {\n * to: '0x20c0...beef',\n * amount: 100n,\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * `amount.decimals` is inferred from the client's declared `tokens` when omitted.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { to, amount, memo, token } = args;\n const { address, decimals } = resolveToken(client, { token });\n const value = internal_Token.toBaseUnits(amount, decimals);\n const callArgs = memo\n ? {\n functionName: 'mintWithMemo',\n args: [to, value, Hex.padLeft(memo, 32)],\n }\n : {\n functionName: 'mint',\n args: [to, value],\n };\n return defineCall({\n address,\n abi: Abis.tip20,\n ...callArgs,\n });\n }\n Object.defineProperty(mint, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'Mint',\n });\n if (!log)\n throw new Error('`Mint` event not found.');\n return log;\n }\n mint.extractEvent = extractEvent;\n})(mint || (mint = {}));\n/**\n * Mints TIP20 tokens to an address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.mintSync(client, {\n * to: '0x...',\n * amount: 100n,\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function mintSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await mint.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = mint.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Pauses a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.pause(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function pause(client, parameters) {\n return pause.inner(writeContract, client, parameters);\n}\n(function (pause) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { token, ...rest } = parameters;\n const call = pause.call(client, { token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n pause.inner = inner;\n /**\n * Defines a call to the `pause` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.pause.call(client, {\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'pause',\n args: [],\n });\n }\n Object.defineProperty(pause, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'PauseStateUpdate',\n });\n if (!log)\n throw new Error('`PauseStateUpdate` event not found.');\n return log;\n }\n pause.extractEvent = extractEvent;\n})(pause || (pause = {}));\n/**\n * Pauses a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.pauseSync(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function pauseSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await pause.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = pause.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Renounces a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.renounceRoles(client, {\n * token: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function renounceRoles(client, parameters) {\n return renounceRoles.inner(sendTransaction, client, parameters);\n}\n(function (renounceRoles) {\n /** @internal */\n async function inner(action, client, parameters) {\n return (await withExecutionError(action)(client, {\n ...parameters,\n calls: parameters.roles.map((role) => {\n const call = renounceRoles.call(client, { ...parameters, role });\n return {\n ...call,\n data: encodeFunctionData(call),\n };\n }),\n }));\n }\n renounceRoles.inner = inner;\n /**\n * Defines a call to the `renounceRole` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.renounceRoles.call(client, {\n * token: '0x20c0...babe',\n * role: 'issuer',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, role } = args;\n const roleHash = TokenRole.serialize(role);\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'renounceRole',\n args: [roleHash],\n });\n }\n Object.defineProperty(renounceRoles, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the events from the logs.\n *\n * @param logs - Logs.\n * @returns The events.\n */\n function extractEvents(logs) {\n const events = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'RoleMembershipUpdated',\n });\n if (events.length === 0)\n throw new Error('`RoleMembershipUpdated` events not found.');\n return events;\n }\n renounceRoles.extractEvents = extractEvents;\n})(renounceRoles || (renounceRoles = {}));\n/**\n * Renounces a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.renounceRolesSync(client, {\n * token: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function renounceRolesSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await renounceRoles.inner(sendTransactionSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const events = renounceRoles.extractEvents(receipt.logs);\n const value = events.map((event) => event.args);\n return {\n receipt,\n value,\n };\n}\n/**\n * Revokes a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.revokeRoles(client, {\n * token: '0x...',\n * from: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function revokeRoles(client, parameters) {\n return revokeRoles.inner(sendTransaction, client, parameters);\n}\n(function (revokeRoles) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { from: _, ...rest } = parameters;\n return (await withExecutionError(action)(client, {\n ...rest,\n calls: parameters.roles.map((role) => {\n const call = revokeRoles.call(client, { ...parameters, role });\n return {\n ...call,\n data: encodeFunctionData(call),\n };\n }),\n }));\n }\n revokeRoles.inner = inner;\n /**\n * Defines a call to the `revokeRole` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.revokeRoles.call(client, {\n * token: '0x20c0...babe',\n * from: '0x20c0...beef',\n * role: 'issuer',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, from, role } = args;\n const roleHash = TokenRole.serialize(role);\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'revokeRole',\n args: [roleHash, from],\n });\n }\n Object.defineProperty(revokeRoles, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the events from the logs.\n *\n * @param logs - Logs.\n * @returns The events.\n */\n function extractEvents(logs) {\n const events = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'RoleMembershipUpdated',\n });\n if (events.length === 0)\n throw new Error('`RoleMembershipUpdated` events not found.');\n return events;\n }\n revokeRoles.extractEvents = extractEvents;\n})(revokeRoles || (revokeRoles = {}));\n/**\n * Revokes a role for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.revokeRolesSync(client, {\n * token: '0x...',\n * from: '0x...',\n * roles: ['issuer'],\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function revokeRolesSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await revokeRoles.inner(sendTransactionSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const events = revokeRoles.extractEvents(receipt.logs);\n const value = events.map((event) => event.args);\n return {\n receipt,\n value,\n };\n}\n/**\n * Sets the supply cap for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.setSupplyCap(client, {\n * token: '0x...',\n * supplyCap: 1000000n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function setSupplyCap(client, parameters) {\n return setSupplyCap.inner(writeContract, client, parameters);\n}\n(function (setSupplyCap) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { supplyCap, token, ...rest } = parameters;\n const call = setSupplyCap.call(client, { supplyCap, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n setSupplyCap.inner = inner;\n /**\n * Defines a call to the `setSupplyCap` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.setSupplyCap.call(client, {\n * token: '0x20c0...babe',\n * supplyCap: 1000000n,\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, supplyCap } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'setSupplyCap',\n args: [supplyCap],\n });\n }\n Object.defineProperty(setSupplyCap, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'SupplyCapUpdate',\n });\n if (!log)\n throw new Error('`SupplyCapUpdate` event not found.');\n return log;\n }\n setSupplyCap.extractEvent = extractEvent;\n})(setSupplyCap || (setSupplyCap = {}));\n/**\n * Sets the supply cap for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.setSupplyCapSync(client, {\n * token: '0x...',\n * supplyCap: 1000000n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function setSupplyCapSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await setSupplyCap.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = setSupplyCap.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Sets the admin role for a specific role in a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.setRoleAdmin(client, {\n * token: '0x...',\n * role: 'issuer',\n * adminRole: 'admin',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function setRoleAdmin(client, parameters) {\n return setRoleAdmin.inner(writeContract, client, parameters);\n}\n(function (setRoleAdmin) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { adminRole, role, token, ...rest } = parameters;\n const call = setRoleAdmin.call(client, { adminRole, role, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n setRoleAdmin.inner = inner;\n /**\n * Defines a call to the `setRoleAdmin` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.setRoleAdmin.call(client, {\n * token: '0x20c0...babe',\n * role: 'issuer',\n * adminRole: 'admin',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, role, adminRole } = args;\n const roleHash = TokenRole.serialize(role);\n const adminRoleHash = TokenRole.serialize(adminRole);\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'setRoleAdmin',\n args: [roleHash, adminRoleHash],\n });\n }\n Object.defineProperty(setRoleAdmin, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'RoleAdminUpdated',\n });\n if (!log)\n throw new Error('`RoleAdminUpdated` event not found.');\n return log;\n }\n setRoleAdmin.extractEvent = extractEvent;\n})(setRoleAdmin || (setRoleAdmin = {}));\n/**\n * Sets the admin role for a specific role in a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.setRoleAdminSync(client, {\n * token: '0x...',\n * role: 'issuer',\n * adminRole: 'admin',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function setRoleAdminSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await setRoleAdmin.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = setRoleAdmin.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Transfers TIP20 tokens to another address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.transfer(client, {\n * to: '0x...',\n * amount: 100n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function transfer(client, parameters) {\n return transfer.inner(writeContract, client, parameters);\n}\n(function (transfer) {\n /** @internal */\n async function inner(action, client, parameters) {\n return (await withExecutionError(action)(client, {\n ...parameters,\n ...transfer.call(client, parameters),\n }));\n }\n transfer.inner = inner;\n /**\n * Defines a call to the `transfer`, `transferFrom`, `transferWithMemo`, or\n * `transferFromWithMemo` function.\n *\n * Can be passed as a parameter to `estimateContractGas`, `simulateContract`,\n * `sendCalls`, `sendTransaction` (`calls`), or `multicall`. The token is\n * selected by `token`, which is either a TIP20 token id or a contract\n * `address`; `amount.decimals` is inferred from the client's declared\n * `tokens` when omitted.\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { from, memo, to, token } = args;\n const { address, decimals } = resolveToken(client, { token });\n const value = internal_Token.toBaseUnits(args.amount, decimals);\n const callArgs = (() => {\n if (memo && from)\n return {\n functionName: 'transferFromWithMemo',\n args: [from, to, value, Hex.padLeft(memo, 32)],\n };\n if (memo)\n return {\n functionName: 'transferWithMemo',\n args: [to, value, Hex.padLeft(memo, 32)],\n };\n if (from)\n return {\n functionName: 'transferFrom',\n args: [from, to, value],\n };\n return {\n functionName: 'transfer',\n args: [to, value],\n };\n })();\n return defineCall({\n address,\n abi: Abis.tip20,\n ...callArgs,\n });\n }\n Object.defineProperty(transfer, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Estimates the gas required to transfer TIP20 tokens. `amount.decimals` is\n * inferred from the client's declared `tokens` when omitted.\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The gas estimate.\n */\n async function estimateGas(client, parameters) {\n return estimateContractGas(client, {\n ...pickWriteParameters(parameters),\n ...transfer.call(client, parameters),\n });\n }\n transfer.estimateGas = estimateGas;\n /**\n * Simulates a transfer of TIP20 tokens. `amount.decimals` is inferred from\n * the client's declared `tokens` when omitted.\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The simulation result and write request.\n */\n async function simulate(client, parameters) {\n return simulateContract(client, {\n ...pickWriteParameters(parameters),\n ...transfer.call(client, parameters),\n });\n }\n transfer.simulate = simulate;\n /**\n * Extracts the `Transfer` event from logs.\n *\n * @param logs - Logs.\n * @returns The `Transfer` event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'Transfer',\n });\n if (!log)\n throw new Error('`Transfer` event not found.');\n return log;\n }\n transfer.extractEvent = extractEvent;\n})(transfer || (transfer = {}));\n/**\n * Transfers TIP20 tokens to another address.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.transferSync(client, {\n * to: '0x...',\n * amount: 100n,\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function transferSync(client, parameters) {\n const { amount, token, throwOnReceiptRevert = true } = parameters;\n const { decimals } = resolveToken(client, { token });\n const resolved = internal_Token.resolveAmountDecimals(amount, decimals);\n const receipt = await transfer.inner(writeContractSync, client, {\n ...parameters,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = transfer.extractEvent(receipt.logs);\n return {\n ...args,\n ...(resolved === undefined\n ? {}\n : { decimals: resolved, formatted: formatUnits(args.amount, resolved) }),\n receipt,\n };\n}\n/**\n * Unpauses a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.unpause(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function unpause(client, parameters) {\n return unpause.inner(writeContract, client, parameters);\n}\n(function (unpause) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { token, ...rest } = parameters;\n const call = unpause.call(client, { token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n unpause.inner = inner;\n /**\n * Defines a call to the `unpause` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.unpause.call(client, {\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'unpause',\n args: [],\n });\n }\n Object.defineProperty(unpause, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'PauseStateUpdate',\n });\n if (!log)\n throw new Error('`PauseStateUpdate` event not found.');\n return log;\n }\n unpause.extractEvent = extractEvent;\n})(unpause || (unpause = {}));\n/**\n * Unpauses a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.unpauseSync(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function unpauseSync(client, parameters) {\n const { throwOnReceiptRevert = true, ...rest } = parameters;\n const receipt = await unpause.inner(writeContractSync, client, {\n ...rest,\n throwOnReceiptRevert,\n });\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = unpause.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Updates the quote token for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.prepareUpdateQuoteToken(client, {\n * token: '0x...',\n * quoteToken: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function prepareUpdateQuoteToken(client, parameters) {\n return prepareUpdateQuoteToken.inner(writeContract, client, parameters);\n}\n(function (prepareUpdateQuoteToken) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { quoteToken, token, ...rest } = parameters;\n const call = prepareUpdateQuoteToken.call(client, { quoteToken, token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n prepareUpdateQuoteToken.inner = inner;\n /**\n * Defines a call to the `prepareUpdateQuoteToken` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.prepareUpdateQuoteToken.call(client, {\n * token: '0x20c0...babe',\n * quoteToken: '0x20c0...cafe',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token, quoteToken } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'setNextQuoteToken',\n args: [resolveToken(client, { token: quoteToken }).address],\n });\n }\n Object.defineProperty(prepareUpdateQuoteToken, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'NextQuoteTokenSet',\n });\n if (!log)\n throw new Error('`NextQuoteTokenSet` event not found.');\n return log;\n }\n prepareUpdateQuoteToken.extractEvent = extractEvent;\n})(prepareUpdateQuoteToken || (prepareUpdateQuoteToken = {}));\n/**\n * Updates the quote token for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.prepareUpdateQuoteTokenSync(client, {\n * token: '0x...',\n * quoteToken: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function prepareUpdateQuoteTokenSync(client, parameters) {\n const receipt = await prepareUpdateQuoteToken.inner(writeContractSync, client, parameters);\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = prepareUpdateQuoteToken.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Updates the quote token for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.updateQuoteToken(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction hash.\n */\nexport async function updateQuoteToken(client, parameters) {\n return updateQuoteToken.inner(writeContract, client, parameters);\n}\n(function (updateQuoteToken) {\n /** @internal */\n async function inner(action, client, parameters) {\n const { token, ...rest } = parameters;\n const call = updateQuoteToken.call(client, { token });\n return (await withExecutionError(action)(client, {\n ...rest,\n ...call,\n }));\n }\n updateQuoteToken.inner = inner;\n /**\n * Defines a call to the `updateQuoteToken` function.\n *\n * Can be passed as a parameter to:\n * - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call\n * - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call\n * - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls\n *\n * @example\n * ```ts\n * import { createClient, http, walletActions } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * }).extend(walletActions)\n *\n * const { result } = await client.sendCalls({\n * calls: [\n * actions.token.updateQuoteToken.call(client, {\n * token: '0x20c0...babe',\n * }),\n * ]\n * })\n * ```\n *\n * @param parameters - Client (optional), followed by the call arguments.\n * @returns The call.\n */\n function call(...parameters) {\n const [client, args] = resolveCallParameters(parameters);\n const { token } = args;\n return defineCall({\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n functionName: 'completeQuoteTokenUpdate',\n args: [],\n });\n }\n Object.defineProperty(updateQuoteToken, \"call\", { configurable: true, enumerable: true, value: call, writable: true });\n /**\n * Extracts the event from the logs.\n *\n * @param logs - Logs.\n * @returns The event.\n */\n function extractEvent(logs) {\n const [log] = parseEventLogs({\n abi: Abis.tip20,\n logs,\n eventName: 'QuoteTokenUpdate',\n });\n if (!log)\n throw new Error('`QuoteTokenUpdateCompleted` event not found.');\n return log;\n }\n updateQuoteToken.extractEvent = extractEvent;\n})(updateQuoteToken || (updateQuoteToken = {}));\n/**\n * Updates the quote token for a TIP20 token.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n * import { privateKeyToAccount } from 'viem/accounts'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const result = await Actions.token.updateQuoteTokenSync(client, {\n * token: '0x...',\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns The transaction receipt and event data.\n */\nexport async function updateQuoteTokenSync(client, parameters) {\n const receipt = await updateQuoteToken.inner(writeContractSync, client, parameters);\n if (receipt.status === 'pending')\n return { receipt };\n const { args } = updateQuoteToken.extractEvent(receipt.logs);\n return {\n ...args,\n receipt,\n };\n}\n/**\n * Watches for TIP20 token approval events.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchApprove(client, {\n * onApproval: (args, log) => {\n * console.log('Approval:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchApprove(client, parameters) {\n const { onApproval, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'Approval',\n onLogs: (logs) => {\n for (const log of logs)\n onApproval(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token burn events.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchBurn(client, {\n * onBurn: (args, log) => {\n * console.log('Burn:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchBurn(client, parameters) {\n const { onBurn, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'Burn',\n onLogs: (logs) => {\n for (const log of logs)\n onBurn(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for new TIP20 tokens created.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchCreate(client, {\n * onTokenCreated: (args, log) => {\n * console.log('Token created:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchCreate(client, parameters) {\n const { onTokenCreated, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: Addresses.tip20Factory,\n abi: Abis.tip20Factory,\n eventName: 'TokenCreated',\n onLogs: (logs) => {\n for (const log of logs)\n onTokenCreated(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token mint events.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchMint(client, {\n * onMint: (args, log) => {\n * console.log('Mint:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchMint(client, parameters) {\n const { onMint, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'Mint',\n onLogs: (logs) => {\n for (const log of logs)\n onMint(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token role admin updates.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchAdminRole(client, {\n * onRoleAdminUpdated: (args, log) => {\n * console.log('Role admin updated:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchAdminRole(client, parameters) {\n const { onRoleAdminUpdated, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'RoleAdminUpdated',\n onLogs: (logs) => {\n for (const log of logs)\n onRoleAdminUpdated(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token role membership updates.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchRole(client, {\n * onRoleUpdated: (args, log) => {\n * console.log('Role updated:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchRole(client, parameters) {\n const { onRoleUpdated, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'RoleMembershipUpdated',\n onLogs: (logs) => {\n for (const log of logs) {\n const type = log.args.hasRole ? 'granted' : 'revoked';\n onRoleUpdated({ ...log.args, type }, log);\n }\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token transfer events.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * account: privateKeyToAccount('0x...'),\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchTransfer(client, {\n * onTransfer: (args, log) => {\n * console.log('Transfer:', args)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchTransfer(client, parameters) {\n const { onTransfer, token, ...rest } = parameters;\n return watchContractEvent(client, {\n ...rest,\n address: resolveToken(client, { token }).address,\n abi: Abis.tip20,\n eventName: 'Transfer',\n onLogs: (logs) => {\n for (const log of logs)\n onTransfer(log.args, log);\n },\n strict: true,\n });\n}\n/**\n * Watches for TIP20 token quote token update events.\n *\n * @example\n * ```ts\n * import { createClient, http } from 'viem'\n * import { tempo } from 'viem/chains'\n * import { Actions } from 'viem/tempo'\n *\n * const client = createClient({\n * chain: tempo.extend({ feeToken: '0x20c0000000000000000000000000000000000001' })\n * transport: http(),\n * })\n *\n * const unwatch = actions.token.watchUpdateQuoteToken(client, {\n * onUpdateQuoteToken: (args, log) => {\n * if (args.completed)\n * console.log('quote token update completed:', args.newQuoteToken)\n * else\n * console.log('quote token update proposed:', args.newQuoteToken)\n * },\n * })\n * ```\n *\n * @param client - Client.\n * @param parameters - Parameters.\n * @returns A function to unsubscribe from the event.\n */\nexport function watchUpdateQuoteToken(client, parameters) {\n const { onUpdateQuoteToken, token, ...rest } = parameters;\n const address = resolveToken(client, { token }).address;\n return watchContractEvent(client, {\n ...rest,\n address,\n abi: Abis.tip20,\n onLogs: (logs) => {\n for (const log of logs) {\n if (log.eventName !== 'NextQuoteTokenSet' &&\n log.eventName !== 'QuoteTokenUpdate')\n continue;\n onUpdateQuoteToken({\n ...log.args,\n completed: log.eventName === 'QuoteTokenUpdate',\n }, log);\n }\n },\n strict: true,\n });\n}\n/** Thrown when an account's TIP-20 balance is lower than the amount a call needs. */\nexport class TokenInsufficientBalanceError extends TempoExecutionError {\n constructor(parameters) {\n const { decimals } = parameters;\n const [available, required, token] = parameters.error.args;\n super(parameters, {\n details: {\n token,\n available: formatAmount(available, decimals),\n required: formatAmount(required, decimals),\n shortfall: formatAmount(required - available, decimals),\n },\n name: 'TokenInsufficientBalanceError',\n shortMessage: `Insufficient balance of token \"${token}\".`,\n });\n /** Balance available. */\n Object.defineProperty(this, \"available\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token decimals, when known. */\n Object.defineProperty(this, \"decimals\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Amount required. */\n Object.defineProperty(this, \"required\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.available = available;\n this.decimals = decimals;\n this.required = required;\n this.token = token;\n }\n}\n/** Thrown when a spender's TIP-20 allowance is lower than the amount it tries to transfer. */\nexport class TokenInsufficientAllowanceError extends TempoExecutionError {\n constructor(parameters) {\n const { allowance, amount, decimals, owner, spender, token } = parameters;\n super(parameters, {\n details: {\n token,\n owner,\n spender,\n allowance: formatAmount(allowance, decimals),\n amount: formatAmount(amount, decimals),\n },\n name: 'TokenInsufficientAllowanceError',\n shortMessage: `Spender \"${spender}\" has an insufficient allowance from \"${owner}\" for token \"${token}\".`,\n });\n /** Current allowance, when known. */\n Object.defineProperty(this, \"allowance\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Amount the spender tried to transfer. */\n Object.defineProperty(this, \"amount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token decimals, when known. */\n Object.defineProperty(this, \"decimals\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token owner. */\n Object.defineProperty(this, \"owner\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Spender. */\n Object.defineProperty(this, \"spender\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.allowance = allowance;\n this.amount = amount;\n this.decimals = decimals;\n this.owner = owner;\n this.spender = spender;\n this.token = token;\n }\n}\n/** Thrown when minting would exceed a TIP-20 token's supply cap. */\nexport class TokenSupplyCapExceededError extends TempoExecutionError {\n constructor(parameters) {\n const { amount, decimals, supplyCap, token, totalSupply } = parameters;\n super(parameters, {\n details: {\n token,\n amount: formatAmount(amount, decimals),\n 'total supply': formatAmount(totalSupply, decimals),\n 'supply cap': formatAmount(supplyCap, decimals),\n 'mintable amount': supplyCap !== undefined && totalSupply !== undefined\n ? formatAmount(supplyCap - totalSupply, decimals)\n : undefined,\n },\n name: 'TokenSupplyCapExceededError',\n shortMessage: `Minting exceeds the supply cap of token \"${token}\".`,\n });\n /** Amount to mint. */\n Object.defineProperty(this, \"amount\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token decimals, when known. */\n Object.defineProperty(this, \"decimals\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Supply cap, when known. */\n Object.defineProperty(this, \"supplyCap\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Current total supply, when known. */\n Object.defineProperty(this, \"totalSupply\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.amount = amount;\n this.decimals = decimals;\n this.supplyCap = supplyCap;\n this.token = token;\n this.totalSupply = totalSupply;\n }\n}\n/** Thrown when a TIP-20 token's transfer policy forbids the sender or recipient. */\nexport class TokenPolicyForbidsError extends TempoExecutionError {\n constructor(parameters) {\n const { from, policyId, recipientAuthorized, senderAuthorized, to, token } = parameters;\n const party = senderAuthorized === false\n ? `sender \"${from}\"`\n : recipientAuthorized === false\n ? `recipient \"${to}\"`\n : 'this transfer';\n super(parameters, {\n details: {\n token,\n policy: policyId,\n from,\n to,\n 'sender authorized': senderAuthorized?.toString(),\n 'recipient authorized': recipientAuthorized?.toString(),\n },\n name: 'TokenPolicyForbidsError',\n shortMessage: `The transfer policy of token \"${token}\" forbids ${party}.`,\n });\n /** Sender, when known. */\n Object.defineProperty(this, \"from\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Transfer policy ID, when known. */\n Object.defineProperty(this, \"policyId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Whether the policy authorizes the recipient, when known. */\n Object.defineProperty(this, \"recipientAuthorized\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Whether the policy authorizes the sender, when known. */\n Object.defineProperty(this, \"senderAuthorized\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Recipient, when known. */\n Object.defineProperty(this, \"to\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.from = from;\n this.policyId = policyId;\n this.recipientAuthorized = recipientAuthorized;\n this.senderAuthorized = senderAuthorized;\n this.to = to;\n this.token = token;\n }\n}\n/** Thrown when calling a paused TIP-20 token. */\nexport class TokenPausedError extends TempoExecutionError {\n constructor(parameters) {\n super(parameters, {\n name: 'TokenPausedError',\n shortMessage: `Token \"${parameters.token}\" is paused.`,\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.token = parameters.token;\n }\n}\n/** Thrown when an account lacks the TIP-20 role a call requires. */\nexport class TokenUnauthorizedError extends TempoExecutionError {\n constructor(parameters) {\n const { account, role, token } = parameters;\n super(parameters, {\n details: { token, account, role },\n name: 'TokenUnauthorizedError',\n shortMessage: `Account \"${account}\" does not have the \"${role}\" role on token \"${token}\".`,\n });\n /** Account that made the call. */\n Object.defineProperty(this, \"account\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Role the call requires. */\n Object.defineProperty(this, \"role\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /** Token address. */\n Object.defineProperty(this, \"token\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.account = account;\n this.role = role;\n this.token = token;\n }\n}\n/** Roles required by TIP-20 functions. */\nconst requiredRoles = {\n burn: 'issuer',\n burnAt: 'burnAt',\n burnBlocked: 'burnBlocked',\n burnWithMemo: 'issuer',\n changeTransferPolicyId: 'defaultAdmin',\n completeQuoteTokenUpdate: 'defaultAdmin',\n mint: 'issuer',\n mintWithMemo: 'issuer',\n pause: 'pause',\n setLogoURI: 'defaultAdmin',\n setNextQuoteToken: 'defaultAdmin',\n setSupplyCap: 'defaultAdmin',\n unpause: 'unpause',\n};\n/** @internal */\nexport const errorResolvers = {\n 'ContractPaused()': ({ base, call }) => isTip20(call?.address)\n ? new TokenPausedError({ ...base, token: call.address })\n : undefined,\n 'InsufficientAllowance()': async (context) => {\n const { base, call, signer } = context;\n const owner = call?.arg('from');\n if (!isTip20(call?.address) || !owner || !signer)\n return undefined;\n const token = call.address;\n const [allowance, decimals] = await context.read([\n {\n address: token,\n abi: Abis.tip20,\n functionName: 'allowance',\n args: [owner, signer.address],\n },\n { address: token, abi: Abis.tip20, functionName: 'decimals' },\n ]);\n return new TokenInsufficientAllowanceError({\n ...base,\n allowance: allowance?.result,\n amount: call.arg('amount'),\n decimals: decimals?.result,\n owner,\n spender: signer.address,\n token,\n });\n },\n 'InsufficientBalance(uint256,uint256,address)': async (context) => {\n // Selector-only revert data carries no arguments.\n const token = context.base.error.args?.[2];\n if (!token)\n return undefined;\n const [decimals] = await context.read([\n { address: token, abi: Abis.tip20, functionName: 'decimals' },\n ]);\n return new TokenInsufficientBalanceError({\n ...context.base,\n decimals: decimals?.result,\n });\n },\n 'PolicyForbids()': async (context) => {\n const { base, call, signer } = context;\n if (!isTip20(call?.address))\n return undefined;\n const token = call.address;\n // Mints only check the recipient.\n const mint = call.functionName.startsWith('mint');\n const from = mint\n ? undefined\n : (call.arg('from') ?? signer?.address);\n const to = call.arg('to');\n const [policyId] = await context.read([\n { address: token, abi: Abis.tip20, functionName: 'transferPolicyId' },\n ]);\n const registry = {\n address: Addresses.tip403Registry,\n abi: Abis.tip403Registry,\n };\n const [sender, recipient] = policyId?.result === undefined\n ? []\n : await context.read([\n {\n ...registry,\n functionName: 'isAuthorizedSender',\n args: [policyId.result, from ?? zeroAddress],\n },\n {\n ...registry,\n functionName: mint\n ? 'isAuthorizedMintRecipient'\n : 'isAuthorizedRecipient',\n args: [policyId.result, to ?? zeroAddress],\n },\n ]);\n return new TokenPolicyForbidsError({\n ...base,\n from,\n policyId: policyId?.result,\n recipientAuthorized: to ? recipient?.result : undefined,\n senderAuthorized: from ? sender?.result : undefined,\n to,\n token,\n });\n },\n 'SupplyCapExceeded()': async (context) => {\n const { base, call } = context;\n if (!isTip20(call?.address))\n return undefined;\n const token = call.address;\n const [supplyCap, totalSupply, decimals] = await context.read([\n { address: token, abi: Abis.tip20, functionName: 'supplyCap' },\n { address: token, abi: Abis.tip20, functionName: 'totalSupply' },\n { address: token, abi: Abis.tip20, functionName: 'decimals' },\n ]);\n return new TokenSupplyCapExceededError({\n ...base,\n amount: call.arg('amount'),\n decimals: decimals?.result,\n supplyCap: supplyCap?.result,\n token,\n totalSupply: totalSupply?.result,\n });\n },\n 'Unauthorized()': ({ base, call, signer }) => {\n const role = call && requiredRoles[call.functionName];\n if (!isTip20(call?.address) || !role || !signer)\n return undefined;\n return new TokenUnauthorizedError({\n ...base,\n account: signer.address,\n role,\n token: call.address,\n });\n },\n};\n//# sourceMappingURL=token.js.map","import { decodeErrorResult, } from '../utils/abi/decodeErrorResult.js';\nimport { formatAbiItem } from '../utils/abi/formatAbiItem.js';\nimport { toFunctionSelector } from '../utils/hash/toFunctionSelector.js';\nimport * as Abis from './Abis.js';\n/** Human-readable templates keyed by error signature in `Abis.core`, with positional `{0}` placeholders. */\nexport const messages = {\n 'AbdicationAlreadyScheduled(uint8)': 'Abdication is already scheduled for capability {0}.',\n 'AccountAlreadyConfigurable()': 'The account is already a configurable account.',\n 'AccountHasCode()': 'Accounts with code cannot be upgraded.',\n 'AccountNotAllowed(address)': 'Account {0} is not allowed.',\n 'ActiveLeaderRemoved()': 'The active leader cannot be removed.',\n 'AddressAlreadyHasValidator()': 'This address already has a validator.',\n 'AddressNotReserved()': 'Address is not reserved.',\n 'AddressReserved()': 'Address is reserved.',\n 'AlreadyInitialized()': 'Already initialized.',\n 'AmountExceedsDeposit()': 'Amount exceeds deposit.',\n 'AmountNotIncreasing()': 'Amount is not increasing.',\n 'BelowMinimumOrderSize(uint128)': 'Order size is below the minimum allowed ({0}).',\n 'CallNotAllowed()': 'This call is not allowed.',\n 'CallbackDidNotReturnToZone()': 'The callback did not return to the zone.',\n 'CallbackRejected()': 'The callback was rejected.',\n 'CannotChangeWithinBlock()': 'Cannot change within the same block.',\n 'CapabilityAbdicated(uint8)': 'Capability {0} has been abdicated.',\n 'CaptureAmountInvalid()': 'Capture amount is invalid.',\n 'ChannelAlreadyExists()': 'Channel already exists.',\n 'ChannelNotFound()': 'Channel not found.',\n 'CloseNotReady()': 'Channel is not ready to close.',\n 'ContractPaused()': 'Contract is paused.',\n 'DepositBlockCapacityExceeded(uint64)': 'The deposit capacity per block exceeds the maximum ({0}).',\n 'DepositOverflow()': 'Deposit overflow.',\n 'DepositTooSmall()': 'The deposit is too small.',\n 'DepositsNotActive()': 'Deposits are not active.',\n 'DivisionByZero()': 'Division by zero.',\n 'DuplicateAllowedAccount()': 'The allowed account is duplicated.',\n 'DuplicateOwner()': 'The owner is duplicated.',\n 'DuplicateZoneGateway()': 'The zone gateway is duplicated.',\n 'EmptyV1ValidatorSet()': 'Validator set is empty.',\n 'EncryptionKeyExpired(uint256,uint64,uint64)': 'Encryption key {0} has expired.',\n 'ExpiringNonceHashNotSet()': 'Expiring nonce hash is not set.',\n 'ExpiringNonceReplay()': 'Expiring nonce has already been used.',\n 'ExpiringNonceSetFull()': 'Expiring nonce set is full.',\n 'ExpiryInPast()': 'Expiry is in the past.',\n 'GasFeeRateTooHigh()': 'The gas fee rate is too high.',\n 'IdenticalAddresses()': 'Addresses must be different.',\n 'IdenticalTokens()': 'Cannot swap a token for itself — input and output tokens must be different.',\n 'IncompatiblePolicyType()': 'Incompatible policy type.',\n 'IndexAlreadySet()': 'The index is already set.',\n 'IngressAlreadyExists(string)': 'Ingress \"{0}\" already exists.',\n 'InsufficientAllowance()': 'Insufficient allowance.',\n 'InsufficientBalance()': 'Insufficient balance.',\n 'InsufficientBalance(uint256,uint256,address)': 'Insufficient balance. Required: {1}, available: {0}.',\n 'InsufficientFeeTokenBalance()': 'Insufficient fee token balance.',\n 'InsufficientLiquidity()': 'Not enough liquidity in the order book to fill this trade.',\n 'InsufficientOutput()': 'The output amount is below the slippage minimum — try increasing slippage tolerance.',\n 'InsufficientReserves()': 'Insufficient reserves.',\n 'InvalidAccount()': 'Invalid account.',\n 'InvalidAdmin()': 'Invalid administrator.',\n 'InvalidAmount()': 'Invalid amount.',\n 'InvalidBaseToken()': 'This token is not a valid base token for the requested pair.',\n 'InvalidBouncebackRecipient()': 'Invalid bounceback recipient.',\n 'InvalidCallScope()': 'Invalid call scope.',\n 'InvalidCallbackTarget()': 'Invalid callback target.',\n 'InvalidCiphertextLength(uint256,uint256)': 'Invalid ciphertext length. Expected {1}, got {0}.',\n 'InvalidClaimAddress()': 'Invalid claim address.',\n 'InvalidClosedLoopConfig()': 'Invalid closed-loop configuration.',\n 'InvalidConfig()': 'Invalid configuration.',\n 'InvalidConfigurableAccountOwner()': 'Invalid owner.',\n 'InvalidCurrency()': 'Invalid currency.',\n 'InvalidDepositTransition()': 'Invalid deposit transition.',\n 'InvalidEncryptionKeyIndex(uint256)': 'Invalid encryption key index ({0}).',\n 'InvalidEphemeralPubkey()': 'Invalid ephemeral public key.',\n 'InvalidExpiringNonceExpiry()': 'Invalid expiring nonce expiry.',\n 'InvalidFlipTick()': 'The flip-order price tick is invalid.',\n 'InvalidFormat()': 'Invalid format.',\n 'InvalidKeyAuthorizationWitness()': 'Invalid key authorization witness.',\n 'InvalidKeyId()': 'Invalid key ID.',\n 'InvalidLeader()': 'Invalid leader.',\n 'InvalidLogoURI()': 'Invalid logo URI.',\n 'InvalidMasterAddress()': 'Invalid master address.',\n 'InvalidMigrationIndex()': 'Invalid migration index.',\n 'InvalidMode()': 'Invalid mode.',\n 'InvalidNonceKey()': 'Invalid nonce key.',\n 'InvalidOwner()': 'Invalid owner.',\n 'InvalidOwnerOrder()': 'Invalid owner order.',\n 'InvalidPayee()': 'Invalid payee.',\n 'InvalidPayload()': 'Invalid payload.',\n 'InvalidPolicyType()': 'Invalid policy type.',\n 'InvalidProof()': 'Invalid proof.',\n 'InvalidProofOfPossession()': 'Invalid proof of possession.',\n 'InvalidPublicKey()': 'Invalid public key.',\n 'InvalidQuorumCertificate()': 'Invalid quorum certificate.',\n 'InvalidQuoteToken()': 'Invalid quote token.',\n 'InvalidReceipt()': 'Invalid receipt.',\n 'InvalidReceivePolicyType()': 'Invalid receive policy type.',\n 'InvalidRecipient()': 'Invalid recipient.',\n 'InvalidRecoveryAuthority()': 'Invalid recovery authority.',\n 'InvalidSequencerSet()': 'Invalid sequencer set.',\n 'InvalidSignature()': 'Invalid signature.',\n 'InvalidSignatureFormat()': 'Invalid signature format.',\n 'InvalidSignatureType()': 'Invalid signature type.',\n 'InvalidSpendingLimit()': 'Invalid spending limit.',\n 'InvalidSupplyCap()': 'Invalid supply cap.',\n 'InvalidSwapCalculation()': 'Invalid swap calculation.',\n 'InvalidTempoBlockNumber()': 'Invalid Tempo block number.',\n 'InvalidThreshold()': 'Invalid threshold.',\n 'InvalidTick()': 'The price tick is invalid.',\n 'InvalidToken()': 'This token is not supported on the exchange.',\n 'InvalidTokenEnablementTransition()': 'Invalid token enablement transition.',\n 'InvalidTransferPolicyId()': 'Invalid transfer policy.',\n 'InvalidValidatorAddress()': 'Invalid validator address.',\n 'InvalidWeight()': 'Invalid weight.',\n 'KeyAlreadyExists()': 'Key already exists.',\n 'KeyAlreadyRevoked()': 'Key has already been revoked.',\n 'KeyAuthorizationWitnessAlreadyBurned()': 'Key authorization witness has already been burned.',\n 'KeyExpired()': 'Key has expired.',\n 'KeyNotFound()': 'Key not found.',\n 'LeaderAlreadyUpdatedThisBlock()': 'The leader has already been updated in this block.',\n 'LegacyAuthorizeKeySelectorChanged(bytes4)': 'Legacy authorize key selector changed to {0}.',\n 'LogoURITooLong()': 'Logo URI is too long.',\n 'MasterIdCollision(address)': 'Master ID collision with {0}.',\n 'MaxInputExceeded()': 'The required input exceeds the slippage maximum — try increasing slippage tolerance.',\n 'MigrationNotComplete()': 'Migration is not complete.',\n 'MustDelegateCall()': 'A delegate call is required.',\n 'NoEncryptionKeyAtBlock(uint64)': 'No encryption key exists at block {0}.',\n 'NoEncryptionKeySet()': 'No encryption key is set.',\n 'NoOptedInSupply()': 'No opted-in supply.',\n 'NonceOverflow()': 'Nonce overflow.',\n 'NotAdmin()': 'The caller is not the administrator.',\n 'NotFactory()': 'The caller is not the factory.',\n 'NotHostPort(string,string,string)': '\"{1}\" is not a valid host:port for {0}.',\n 'NotInitialized()': 'Not initialized.',\n 'NotIp(string,string)': '\"{0}\" is not a valid IP address.',\n 'NotIpPort(string,string)': '\"{0}\" is not a valid IP:port.',\n 'NotIpPort(string,string,string)': '\"{1}\" is not a valid IP:port for {0}.',\n 'NotOwner()': 'The caller is not an owner.',\n 'NotPauseAuthority()': 'The caller is not the pause authority.',\n 'NotPayeeOrOperator()': 'Not payee or operator.',\n 'NotPayer()': 'Not payer.',\n 'NotPendingAdmin()': 'The caller is not the pending administrator.',\n 'NotSelf()': 'The caller must be the contract itself.',\n 'NotSequencer()': 'The caller is not a sequencer.',\n 'OnlyDirectCall()': 'A direct call is required.',\n 'OrderDoesNotExist()': 'No order exists with the given ID.',\n 'OrderNotStale()': 'This order is not yet eligible for stale-cleanup.',\n 'PairAlreadyExists()': 'A trading pair for these tokens has already been created.',\n 'PairDoesNotExist()': 'No trading pair exists for these tokens.',\n 'PermitExpired()': 'Permit has expired.',\n 'PolicyForbids()': 'Forbidden by policy.',\n 'PolicyNotFound()': 'Policy not found.',\n 'PolicyNotSimple()': 'Policy is not a simple policy.',\n 'PortalIsPaused()': 'The portal is paused.',\n 'PrimitiveRootRequired()': 'The root key must sign the upgrade transaction.',\n 'ProofOfWorkFailed()': 'Proof of work failed.',\n 'ProtectedAddress()': 'Address is protected.',\n 'ProtocolNonceNotSupported()': 'Protocol nonce is not supported.',\n 'PublicKeyAlreadyExists()': 'Public key already exists.',\n 'ReentrantWithdrawal()': 'Reentrant withdrawals are not allowed.',\n 'RootKeyRetired(address)': 'The root key of {0} is retired.',\n 'SequencerConfigurationUnchanged()': 'The sequencer configuration is unchanged.',\n 'SignatureTypeMismatch(uint8,uint8)': 'Signature type mismatch. Expected {0}, got {1}.',\n 'SpendingLimitExceeded()': 'Spending limit exceeded.',\n 'StaleLeadershipEpoch(uint64,uint64)': 'Stale leadership epoch. Expected {0}, got {1}.',\n 'SupplyCapExceeded()': 'Supply cap exceeded.',\n 'TickOutOfBounds(int16)': 'Price tick {0} is outside the allowed range.',\n 'TokenAlreadyEnabled()': 'The token is already enabled.',\n 'TokenAlreadyExists(address)': 'Token {0} already exists.',\n 'TokenEnablementBlockCapacityExceeded(uint64)': 'The token enablement capacity per block exceeds the maximum ({0}).',\n 'TokenEnablementCursorNotInitialized()': 'The token enablement cursor is not initialized.',\n 'TokenMetadataTooLong()': 'Token metadata is too long.',\n 'TokenNotEnabled()': 'The token is not enabled.',\n 'TokenTransferPolicyNotSet()': 'The token transfer policy is not set.',\n 'TooManyOwners()': 'There are too many owners.',\n 'TransferFailed()': 'The transfer failed.',\n 'Unauthorized()': 'Unauthorized.',\n 'UnauthorizedCaller()': 'Unauthorized caller.',\n 'UnauthorizedClaimer()': 'Unauthorized claimer.',\n 'UnauthorizedConfigurableAccountCaller()': 'Unauthorized configurable account caller.',\n 'Uninitialized()': 'Uninitialized.',\n 'UpgradeMustBeOnlyCall()': 'The upgrade must be the only call in the transaction.',\n 'ValidatorAlreadyDeactivated()': 'Validator is already deactivated.',\n 'ValidatorAlreadyExists()': 'Validator already exists.',\n 'ValidatorNotFound()': 'Validator not found.',\n 'VirtualAddressNotAllowed()': 'Virtual address is not allowed.',\n 'VirtualAddressUnregistered()': 'Virtual address is not registered.',\n 'ZeroDeposit()': 'Deposit cannot be zero.',\n 'ZeroPublicKey()': 'Public key cannot be zero.',\n};\n/** Steps to resolve an error, keyed by error signature in `Abis.core`. */\nexport const hints = {\n 'CallNotAllowed()': [\n \"The access key's scopes do not allow this target, selector, or recipient.\",\n 'Authorize an access key whose scopes include this call.',\n ],\n 'ContractPaused()': [\n 'The token is paused. An account with the unpause role can unpause it.',\n ],\n 'ExpiringNonceReplay()': ['Resend the transaction with a new nonce.'],\n 'ExpiryInPast()': ['Set the expiry to a future time.'],\n 'InsufficientAllowance()': [\n 'Approve the spender for at least this amount.',\n ],\n 'InsufficientBalance(uint256,uint256,address)': [\n 'Fund the account or lower the amount.',\n ],\n 'InsufficientFeeTokenBalance()': [\n 'Fund the account with the fee token, or pay fees with another token.',\n ],\n 'KeyAlreadyExists()': ['Use a new access key, or revoke the existing one.'],\n 'KeyAlreadyRevoked()': [\n 'Revoked access keys cannot be used or re-authorized. Authorize a new access key.',\n ],\n 'KeyExpired()': ['Authorize a new access key.'],\n 'KeyNotFound()': [\n 'Authorize the access key first, or authorize it in the same transaction with a key authorization.',\n ],\n 'PolicyForbids()': [\n 'The token transfer policy forbids this sender or recipient.',\n ],\n 'SpendingLimitExceeded()': [\n 'Raise the spending limit, or wait for a periodic limit to reset.',\n ],\n 'UnauthorizedCaller()': ['Sign with the root key or an admin access key.'],\n 'AmountExceedsDeposit()': [\n 'Top up the channel, or use a voucher for a smaller amount.',\n ],\n 'AmountNotIncreasing()': [\n 'Use a voucher with a higher cumulative amount than the amount already settled.',\n ],\n 'BelowMinimumOrderSize(uint128)': ['Place a larger order.'],\n 'ChannelNotFound()': [\n 'Check the channel details, or open the channel first.',\n ],\n 'CloseNotReady()': [\n 'Request a close, then wait for the grace period to end before withdrawing.',\n ],\n 'InsufficientBalance()': [\n 'Deposit more of the token, or lower the amount.',\n ],\n 'InsufficientLiquidity()': ['Use a smaller amount.'],\n 'InsufficientOutput()': [\n 'Lower the minimum output amount, or sell a smaller amount.',\n ],\n 'InsufficientReserves()': ['Use a smaller amount.'],\n 'InvalidExpiringNonceExpiry()': [\n 'Set the transaction expiry to a time in the near future.',\n ],\n 'InvalidFlipTick()': [\n 'Choose a flip tick on the correct side of the order tick.',\n ],\n 'MaxInputExceeded()': [\n 'Raise the maximum input amount, or buy a smaller amount.',\n ],\n 'OrderDoesNotExist()': [\n 'Check the order ID. Filled and cancelled orders no longer exist.',\n ],\n 'OrderNotStale()': [\n 'Only orders whose maker lost authorization can be cancelled as stale.',\n ],\n 'PairDoesNotExist()': ['Create the trading pair first.'],\n 'PolicyNotFound()': ['Check the policy ID, or create the policy first.'],\n 'SignatureTypeMismatch(uint8,uint8)': [\n 'Sign with the same key type the access key was authorized with.',\n ],\n 'SupplyCapExceeded()': ['Mint a smaller amount, or raise the supply cap.'],\n 'TickOutOfBounds(int16)': ['Use a tick within the allowed range.'],\n 'Unauthorized()': ['The account lacks the permission this call requires.'],\n 'AccountAlreadyConfigurable()': [\n 'The account is already configurable. Rotate its owners with `updateConfig` instead.',\n ],\n 'AccountHasCode()': [\n 'Only accounts without code or delegation can be upgraded in place.',\n ],\n 'PrimitiveRootRequired()': [\n \"Send the upgrade from the account's root key, not an access key or another account.\",\n ],\n 'RootKeyRetired(address)': [\n 'The account was upgraded to a configurable account. Sign with its owners instead of the retired root key.',\n ],\n 'UnauthorizedConfigurableAccountCaller()': [\n 'Only the configurable account can update its own configuration.',\n ],\n 'UpgradeMustBeOnlyCall()': [\n 'Send `upgradeAccount` as the only call, without a key authorization or authorization list.',\n ],\n};\n/** Interpolate `{0}`, `{1}`, … placeholders with args. */\nfunction interpolate(template, args) {\n if (!args)\n return template;\n return template.replace(/\\{(\\d+)\\}/g, (_, i) => {\n const v = args[Number(i)];\n return v === undefined ? `{${i}}` : String(v);\n });\n}\nexport function from(error) {\n const source = typeof error === 'string'\n ? { data: error, message: 'Unknown execution error.' }\n : error;\n const decoded = parse(source);\n const descriptors = Object.getOwnPropertyDescriptors(source);\n // Native stack accessors depend on the original error's internal state.\n if ('stack' in source)\n descriptors.stack = {\n configurable: descriptors.stack?.configurable ?? true,\n enumerable: descriptors.stack?.enumerable ?? false,\n value: source.stack,\n writable: descriptors.stack?.writable ?? true,\n };\n for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(decoded)))\n descriptors[key] = {\n ...descriptor,\n enumerable: descriptors[key]?.enumerable ?? true,\n };\n return Object.create(Object.getPrototypeOf(source), descriptors);\n}\n/**\n * Selects execution metadata for JSON serialization.\n *\n * Omits decoded arguments and original error properties, including the stack and cause.\n *\n * @example\n * ```ts\n * import { ExecutionError } from 'viem/tempo'\n *\n * const error = ExecutionError.from(new Error('execution reverted: failed'))\n * const rpc = ExecutionError.serialize(error)\n * // { errorName: 'unknown', message: 'failed' }\n * ```\n *\n * @param preimage - Decorated execution error.\n * @returns Execution error without decoded arguments.\n */\nexport function serialize(preimage) {\n if (preimage.errorName === 'unknown')\n return { errorName: 'unknown', message: preimage.message };\n return {\n errorName: preimage.errorName,\n abiItem: preimage.abiItem,\n message: preimage.message,\n data: preimage.data,\n };\n}\nfunction extractRevertData(error, seen = new Set()) {\n if (!error || typeof error !== 'object' || seen.has(error))\n return null;\n seen.add(error);\n const e = error;\n if (typeof e.data === 'string' && /^0x(?:[\\da-f]{2})*$/i.test(e.data))\n return e.data;\n for (const inner of [e.data, e.cause, e.error]) {\n const data = extractRevertData(inner, seen);\n if (data)\n return data;\n }\n if (typeof e.walk === 'function') {\n const inner = e.walk((e) => typeof e.data === 'string');\n if (inner)\n return extractRevertData(inner, seen);\n }\n return null;\n}\nfunction parse(error) {\n const raw = error.details ??\n error.shortMessage ??\n error.message;\n const data = extractRevertData(error);\n if (data) {\n try {\n const decoded = decodeErrorResult({ abi: Abis.coreErrors, data });\n const template = messages[formatAbiItem(decoded.abiItem)];\n return {\n ...decoded,\n data,\n message: template\n ? interpolate(template, decoded.args)\n : raw.replace(/^execution reverted:\\s*/i, ''),\n };\n }\n catch {\n if (data.length === 10) {\n const abiItem = Abis.coreErrors.find((item) => item.type === 'error' &&\n toFunctionSelector(formatAbiItem(item)) === data.toLowerCase());\n if (abiItem?.type === 'error')\n return {\n abiItem,\n args: undefined,\n data,\n errorName: abiItem.name,\n message: messages[formatAbiItem(abiItem)],\n };\n }\n }\n }\n // Nodes print zero-argument errors as `Name(Name)`, whose revert data is the selector alone.\n const debugMatch = /\\b(\\w+)\\(\\1\\)/.exec(raw);\n const abiItem = debugMatch\n ? Abis.coreErrors.find((item) => item.name === debugMatch[1] && item.inputs.length === 0)\n : undefined;\n if (abiItem)\n return {\n abiItem,\n args: undefined,\n data: toFunctionSelector(formatAbiItem(abiItem)),\n errorName: abiItem.name,\n message: messages[formatAbiItem(abiItem)],\n };\n // Human-readable names cannot distinguish overloads with different templates.\n const nameMatch = /:\\s*(\\w+)\\(([^)]*)\\)/.exec(raw);\n if (nameMatch) {\n const templates = Object.entries(messages).filter(([signature]) => signature.startsWith(`${nameMatch[1]}(`));\n const template = nameMatch[2] === ''\n ? messages[`${nameMatch[1]}()`]\n : templates.length === 1\n ? templates[0]?.[1]\n : undefined;\n if (template)\n return { errorName: 'unknown', message: template };\n }\n return {\n errorName: 'unknown',\n message: raw.replace(/^execution reverted:\\s*/i, ''),\n };\n}\n//# sourceMappingURL=ExecutionError.js.map"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],"mappings":"A,mwCAAA,IAAa+hB,GA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