@seedprotocol/publish 0.6.9 → 0.6.10
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/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/dist/{chainConfig-CA1Hrrjg.js → chainConfig-DWzoOtkS.js} +394 -328
- package/dist/chainConfig-DWzoOtkS.js.map +1 -0
- package/dist/config.d.ts +5 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/ensureAutomationSessionKey-h3zOmDr5.js +84 -0
- package/dist/ensureAutomationSessionKey-h3zOmDr5.js.map +1 -0
- package/dist/{ensureModularPublishBootstrap-DGBKVGg5.js → ensureModularPublishBootstrap-BImiIFJe.js} +9 -10
- package/dist/{ensureModularPublishBootstrap-5HJDqJJM.js.map → ensureModularPublishBootstrap-BImiIFJe.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js → ensureSmartWalletThenPublish-DuOYPJFd.js} +9 -10
- package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js.map → ensureSmartWalletThenPublish-DuOYPJFd.js.map} +1 -1
- package/dist/errors.d.ts +9 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/helpers/abi/executor.d.ts +12 -0
- package/dist/helpers/abi/executor.d.ts.map +1 -1
- package/dist/helpers/abi/factory.d.ts +11 -0
- package/dist/helpers/abi/factory.d.ts.map +1 -1
- package/dist/helpers/abi/seedExecutorRouter.d.ts +9 -1
- package/dist/helpers/abi/seedExecutorRouter.d.ts.map +1 -1
- package/dist/helpers/adapters/thirdwebAccount.d.ts.map +1 -1
- package/dist/helpers/chainClient.d.ts +18 -2
- package/dist/helpers/chainClient.d.ts.map +1 -1
- package/dist/helpers/contracts/index.d.ts +9 -0
- package/dist/helpers/contracts/index.d.ts.map +1 -1
- package/dist/helpers/describeRevert.d.ts +3 -2
- package/dist/helpers/describeRevert.d.ts.map +1 -1
- package/dist/helpers/enrollPublishAutomation.d.ts +2 -2
- package/dist/helpers/enrollPublishAutomation.d.ts.map +1 -1
- package/dist/helpers/ensureAutomationSessionKey.d.ts.map +1 -1
- package/dist/helpers/ensureExecutorModule.d.ts +28 -5
- package/dist/helpers/ensureExecutorModule.d.ts.map +1 -1
- package/dist/helpers/executorModuleReadiness.d.ts +15 -1
- package/dist/helpers/executorModuleReadiness.d.ts.map +1 -1
- package/dist/helpers/gasLog.d.ts +8 -0
- package/dist/helpers/gasLog.d.ts.map +1 -0
- package/dist/helpers/seedPaymaster.d.ts +27 -0
- package/dist/helpers/seedPaymaster.d.ts.map +1 -0
- package/dist/helpers/thirdweb.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +271 -272
- package/dist/index.js.map +1 -1
- package/dist/{managedAccountAdmin-B64V1rlU.js → managedAccountAdmin-B4HkLWWE.js} +9 -10
- package/dist/{managedAccountAdmin-B64V1rlU.js.map → managedAccountAdmin-B4HkLWWE.js.map} +1 -1
- package/dist/{publishAuthorization-CxBkijU6.js → publishAuthorization-DgDI4zor.js} +1104 -1018
- package/dist/publishAuthorization-DgDI4zor.js.map +1 -0
- package/dist/{publishThirdwebClient-CBD9sKJR.js → publishThirdwebClient-CO18ST7C.js} +2 -2
- package/dist/{publishThirdwebClient-CBD9sKJR.js.map → publishThirdwebClient-CO18ST7C.js.map} +1 -1
- package/dist/{resolveRevokeAccount-CehU81k6.js → resolveRevokeAccount-DsNod8ti.js} +11 -11
- package/dist/{resolveRevokeAccount-B5iXpuRT.js.map → resolveRevokeAccount-DsNod8ti.js.map} +1 -1
- package/dist/thirdweb.d.ts +2 -1
- package/dist/thirdweb.d.ts.map +1 -1
- package/dist/thirdweb.js +147 -148
- package/dist/thirdweb.js.map +1 -1
- package/dist/{worker-2dUZSapK.js → worker-CN7zg73B.js} +2 -2
- package/dist/{worker-2dUZSapK.js.map → worker-CN7zg73B.js.map} +1 -1
- package/package.json +6 -6
- package/dist/chainConfig-3sSqEVQh.js +0 -1433
- package/dist/chainConfig-3sSqEVQh.js.map +0 -1
- package/dist/chainConfig-3wlYarAG.js +0 -1433
- package/dist/chainConfig-3wlYarAG.js.map +0 -1
- package/dist/chainConfig-BRcsMopd.js +0 -1442
- package/dist/chainConfig-BRcsMopd.js.map +0 -1
- package/dist/chainConfig-BYm5OXpk.js +0 -1433
- package/dist/chainConfig-BYm5OXpk.js.map +0 -1
- package/dist/chainConfig-CA1Hrrjg.js.map +0 -1
- package/dist/chainConfig-CYy0XJ0M.js +0 -1283
- package/dist/chainConfig-CYy0XJ0M.js.map +0 -1
- package/dist/chainConfig-CfVGYAsY.js +0 -1311
- package/dist/chainConfig-CfVGYAsY.js.map +0 -1
- package/dist/chainConfig-DDA4YmAB.js +0 -1424
- package/dist/chainConfig-DDA4YmAB.js.map +0 -1
- package/dist/config-BA9la8B6.js +0 -941
- package/dist/config-BA9la8B6.js.map +0 -1
- package/dist/config-BqguD2Tt.js +0 -806
- package/dist/config-BqguD2Tt.js.map +0 -1
- package/dist/config-CPBd5C_b.js +0 -1201
- package/dist/config-CPBd5C_b.js.map +0 -1
- package/dist/config-DkIapO94.js +0 -955
- package/dist/config-DkIapO94.js.map +0 -1
- package/dist/config-EQZZNH9H.js +0 -955
- package/dist/config-EQZZNH9H.js.map +0 -1
- package/dist/config-qjpaJcBA.js +0 -947
- package/dist/config-qjpaJcBA.js.map +0 -1
- package/dist/deploy-BJYwLfz-.js +0 -15
- package/dist/deploy-BJYwLfz-.js.map +0 -1
- package/dist/enrollPublishAutomation-DYQMoylY.js +0 -3422
- package/dist/enrollPublishAutomation-DYQMoylY.js.map +0 -1
- package/dist/ensureAutomationSessionKey-BMHLKfjj.js +0 -85
- package/dist/ensureAutomationSessionKey-BMHLKfjj.js.map +0 -1
- package/dist/ensureAutomationSessionKey-BZ9_3FMW.js +0 -86
- package/dist/ensureAutomationSessionKey-BZ9_3FMW.js.map +0 -1
- package/dist/ensureAutomationSessionKey-Bq0PaTYE.js +0 -84
- package/dist/ensureAutomationSessionKey-Bq0PaTYE.js.map +0 -1
- package/dist/ensureAutomationSessionKey-Bw74ZSGI.js +0 -85
- package/dist/ensureAutomationSessionKey-Bw74ZSGI.js.map +0 -1
- package/dist/ensureAutomationSessionKey-C8D7BFjU.js +0 -85
- package/dist/ensureAutomationSessionKey-C8D7BFjU.js.map +0 -1
- package/dist/ensureAutomationSessionKey-CClLVX2w.js +0 -85
- package/dist/ensureAutomationSessionKey-CClLVX2w.js.map +0 -1
- package/dist/ensureAutomationSessionKey-CNNN1jBQ.js +0 -85
- package/dist/ensureAutomationSessionKey-CNNN1jBQ.js.map +0 -1
- package/dist/ensureAutomationSessionKey-CeUbjcCl.js +0 -85
- package/dist/ensureAutomationSessionKey-CeUbjcCl.js.map +0 -1
- package/dist/ensureAutomationSessionKey-D8Gki6U6.js +0 -85
- package/dist/ensureAutomationSessionKey-D8Gki6U6.js.map +0 -1
- package/dist/ensureAutomationSessionKey-DEH7nwUc.js +0 -86
- package/dist/ensureAutomationSessionKey-DEH7nwUc.js.map +0 -1
- package/dist/ensureAutomationSessionKey-DKriW4Hr.js +0 -85
- package/dist/ensureAutomationSessionKey-DKriW4Hr.js.map +0 -1
- package/dist/ensureAutomationSessionKey-Dhvbii2M.js +0 -86
- package/dist/ensureAutomationSessionKey-Dhvbii2M.js.map +0 -1
- package/dist/ensureAutomationSessionKey-Dyfk8qVp.js +0 -85
- package/dist/ensureAutomationSessionKey-Dyfk8qVp.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-5HJDqJJM.js +0 -24
- package/dist/ensureModularPublishBootstrap-BW8jKN_A.js +0 -24
- package/dist/ensureModularPublishBootstrap-BW8jKN_A.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-BhYNmLzT.js +0 -24
- package/dist/ensureModularPublishBootstrap-BhYNmLzT.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-Bsw1xSCt.js +0 -24
- package/dist/ensureModularPublishBootstrap-Bsw1xSCt.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-Btih5xbB.js +0 -129
- package/dist/ensureModularPublishBootstrap-Btih5xbB.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-C8wdnH1P.js +0 -128
- package/dist/ensureModularPublishBootstrap-C8wdnH1P.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-CI4U08Gc.js +0 -129
- package/dist/ensureModularPublishBootstrap-CI4U08Gc.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-CcU-hXll.js +0 -128
- package/dist/ensureModularPublishBootstrap-CcU-hXll.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-CdrykHAi.js +0 -24
- package/dist/ensureModularPublishBootstrap-CdrykHAi.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-DGBKVGg5.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-DaREOqSc.js +0 -129
- package/dist/ensureModularPublishBootstrap-DaREOqSc.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-DxIG-LUP.js +0 -24
- package/dist/ensureModularPublishBootstrap-DxIG-LUP.js.map +0 -1
- package/dist/ensureModularPublishBootstrap-Jm1AAqBo.js +0 -127
- package/dist/ensureModularPublishBootstrap-Jm1AAqBo.js.map +0 -1
- package/dist/ensureSessionKey-D2Lq-56x.js +0 -363
- package/dist/ensureSessionKey-D2Lq-56x.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-BFPugsKJ.js +0 -48
- package/dist/ensureSmartWalletThenPublish-BFPugsKJ.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-BSYzckyS.js +0 -49
- package/dist/ensureSmartWalletThenPublish-BSYzckyS.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js +0 -49
- package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js +0 -48
- package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-Bmm5Fpat.js +0 -49
- package/dist/ensureSmartWalletThenPublish-Bmm5Fpat.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-CE7acryB.js +0 -49
- package/dist/ensureSmartWalletThenPublish-CE7acryB.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js +0 -48
- package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-DAomriGc.js +0 -48
- package/dist/ensureSmartWalletThenPublish-DAomriGc.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js +0 -48
- package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-Dta2AOyJ.js +0 -48
- package/dist/ensureSmartWalletThenPublish-Dta2AOyJ.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js +0 -48
- package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js +0 -48
- package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js.map +0 -1
- package/dist/errors-Du3LNbJN.js +0 -70
- package/dist/errors-Du3LNbJN.js.map +0 -1
- package/dist/errors-PZAaDlkq.js +0 -79
- package/dist/errors-PZAaDlkq.js.map +0 -1
- package/dist/helpers/adapters/managedAccountTxSender.d.ts +0 -21
- package/dist/helpers/adapters/managedAccountTxSender.d.ts.map +0 -1
- package/dist/helpers/modularAccount/abi.d.ts +0 -173
- package/dist/helpers/modularAccount/abi.d.ts.map +0 -1
- package/dist/helpers/modularAccount/deploy.d.ts +0 -13
- package/dist/helpers/modularAccount/deploy.d.ts.map +0 -1
- package/dist/helpers/modularAccount/eip712.d.ts +0 -30
- package/dist/helpers/modularAccount/eip712.d.ts.map +0 -1
- package/dist/helpers/modularAccount/encode.d.ts +0 -16
- package/dist/helpers/modularAccount/encode.d.ts.map +0 -1
- package/dist/helpers/modularAccount/ensureModule.d.ts +0 -10
- package/dist/helpers/modularAccount/ensureModule.d.ts.map +0 -1
- package/dist/helpers/modularAccount/ensureSessionKey.d.ts +0 -25
- package/dist/helpers/modularAccount/ensureSessionKey.d.ts.map +0 -1
- package/dist/helpers/modularAccount/index.d.ts +0 -9
- package/dist/helpers/modularAccount/index.d.ts.map +0 -1
- package/dist/helpers/modularAccount/permissions.d.ts +0 -32
- package/dist/helpers/modularAccount/permissions.d.ts.map +0 -1
- package/dist/helpers/modularAccount/reads.d.ts +0 -28
- package/dist/helpers/modularAccount/reads.d.ts.map +0 -1
- package/dist/helpers/thirdwebEnrollPublishAutomation.d.ts +0 -31
- package/dist/helpers/thirdwebEnrollPublishAutomation.d.ts.map +0 -1
- package/dist/helpers/thirdwebModularBootstrap.d.ts +0 -8
- package/dist/helpers/thirdwebModularBootstrap.d.ts.map +0 -1
- package/dist/helpers/transformPayloadToIntegerIds.d.ts +0 -34
- package/dist/helpers/transformPayloadToIntegerIds.d.ts.map +0 -1
- package/dist/managedAccountAdmin-BVLGWpEb.js +0 -29
- package/dist/managedAccountAdmin-BVLGWpEb.js.map +0 -1
- package/dist/managedAccountAdmin-Bje6X8Ds.js +0 -29
- package/dist/managedAccountAdmin-Bje6X8Ds.js.map +0 -1
- package/dist/managedAccountAdmin-C84-IlQ9.js +0 -29
- package/dist/managedAccountAdmin-C84-IlQ9.js.map +0 -1
- package/dist/managedAccountAdmin-DJMw6UH6.js +0 -29
- package/dist/managedAccountAdmin-DJMw6UH6.js.map +0 -1
- package/dist/managedAccountAdmin-DhCRBoPX.js +0 -29
- package/dist/managedAccountAdmin-DhCRBoPX.js.map +0 -1
- package/dist/managedAccountAdmin-NXD66lP5.js +0 -29
- package/dist/managedAccountAdmin-NXD66lP5.js.map +0 -1
- package/dist/publishAuthorization-B0G1em4a.js +0 -3695
- package/dist/publishAuthorization-B0G1em4a.js.map +0 -1
- package/dist/publishAuthorization-B1BVVfp0.js +0 -3604
- package/dist/publishAuthorization-B1BVVfp0.js.map +0 -1
- package/dist/publishAuthorization-BEqRnP2h.js +0 -3925
- package/dist/publishAuthorization-BEqRnP2h.js.map +0 -1
- package/dist/publishAuthorization-Bltn3y_K.js +0 -3599
- package/dist/publishAuthorization-Bltn3y_K.js.map +0 -1
- package/dist/publishAuthorization-By2Tt9kW.js +0 -3912
- package/dist/publishAuthorization-By2Tt9kW.js.map +0 -1
- package/dist/publishAuthorization-CSN2FsQk.js +0 -3479
- package/dist/publishAuthorization-CSN2FsQk.js.map +0 -1
- package/dist/publishAuthorization-CxBkijU6.js.map +0 -1
- package/dist/publishAuthorization-CxWY7lAQ.js +0 -3706
- package/dist/publishAuthorization-CxWY7lAQ.js.map +0 -1
- package/dist/publishAuthorization-DEriY_jm.js +0 -3687
- package/dist/publishAuthorization-DEriY_jm.js.map +0 -1
- package/dist/publishAuthorization-DfAQs1sN.js +0 -3707
- package/dist/publishAuthorization-DfAQs1sN.js.map +0 -1
- package/dist/publishAuthorization-DgdmgLTa.js +0 -3520
- package/dist/publishAuthorization-DgdmgLTa.js.map +0 -1
- package/dist/publishAuthorization-DjVrnMC0.js +0 -3925
- package/dist/publishAuthorization-DjVrnMC0.js.map +0 -1
- package/dist/publishAuthorization-DqhhCAhd.js +0 -3652
- package/dist/publishAuthorization-DqhhCAhd.js.map +0 -1
- package/dist/publishThirdwebClient-BdgkcqM7.js +0 -18
- package/dist/publishThirdwebClient-BdgkcqM7.js.map +0 -1
- package/dist/publishThirdwebClient-BkmDN480.js +0 -18
- package/dist/publishThirdwebClient-BkmDN480.js.map +0 -1
- package/dist/publishThirdwebClient-BnDhP3N-.js +0 -18
- package/dist/publishThirdwebClient-BnDhP3N-.js.map +0 -1
- package/dist/publishThirdwebClient-CQ29pzG2.js +0 -18
- package/dist/publishThirdwebClient-CQ29pzG2.js.map +0 -1
- package/dist/publishThirdwebClient-CZIVmr9Z.js +0 -18
- package/dist/publishThirdwebClient-CZIVmr9Z.js.map +0 -1
- package/dist/publishThirdwebClient-Ce7iBIsj.js +0 -18
- package/dist/publishThirdwebClient-Ce7iBIsj.js.map +0 -1
- package/dist/publishThirdwebClient-DroRrOFQ.js +0 -18
- package/dist/publishThirdwebClient-DroRrOFQ.js.map +0 -1
- package/dist/publishThirdwebClient-DzXFjQ7L.js +0 -18
- package/dist/publishThirdwebClient-DzXFjQ7L.js.map +0 -1
- package/dist/publishThirdwebClient-Dzb2vcEs.js +0 -18
- package/dist/publishThirdwebClient-Dzb2vcEs.js.map +0 -1
- package/dist/publishThirdwebClient-i8P7fivi.js +0 -18
- package/dist/publishThirdwebClient-i8P7fivi.js.map +0 -1
- package/dist/publishWalletRegistry-Cugh691z.js +0 -37
- package/dist/publishWalletRegistry-Cugh691z.js.map +0 -1
- package/dist/resolveRevokeAccount-B5iXpuRT.js +0 -38
- package/dist/resolveRevokeAccount-B7ImSb4Y.js +0 -38
- package/dist/resolveRevokeAccount-B7ImSb4Y.js.map +0 -1
- package/dist/resolveRevokeAccount-BEhKQBTm.js +0 -38
- package/dist/resolveRevokeAccount-BEhKQBTm.js.map +0 -1
- package/dist/resolveRevokeAccount-BM1j2l5Q.js +0 -38
- package/dist/resolveRevokeAccount-BM1j2l5Q.js.map +0 -1
- package/dist/resolveRevokeAccount-BtVG0xxc.js +0 -38
- package/dist/resolveRevokeAccount-BtVG0xxc.js.map +0 -1
- package/dist/resolveRevokeAccount-CJZZdBcQ.js +0 -39
- package/dist/resolveRevokeAccount-CJZZdBcQ.js.map +0 -1
- package/dist/resolveRevokeAccount-CaIMuCee.js +0 -39
- package/dist/resolveRevokeAccount-CaIMuCee.js.map +0 -1
- package/dist/resolveRevokeAccount-CehU81k6.js.map +0 -1
- package/dist/resolveRevokeAccount-Cg4TQgnd.js +0 -38
- package/dist/resolveRevokeAccount-Cg4TQgnd.js.map +0 -1
- package/dist/resolveRevokeAccount-DHnxtEIj.js +0 -39
- package/dist/resolveRevokeAccount-DHnxtEIj.js.map +0 -1
- package/dist/resolveRevokeAccount-DJKfLlyK.js +0 -38
- package/dist/resolveRevokeAccount-DJKfLlyK.js.map +0 -1
- package/dist/resolveRevokeAccount-S-2WXkNh.js +0 -38
- package/dist/resolveRevokeAccount-S-2WXkNh.js.map +0 -1
- package/dist/resolveRevokeAccount-mzR11KJ4.js +0 -38
- package/dist/resolveRevokeAccount-mzR11KJ4.js.map +0 -1
- package/dist/resolveRevokeAccount-yWARIv9i.js +0 -38
- package/dist/resolveRevokeAccount-yWARIv9i.js.map +0 -1
- package/dist/seedSigner-CFzMD7Rb.js +0 -66
- package/dist/seedSigner-CFzMD7Rb.js.map +0 -1
- package/dist/thirdweb-BoksPRz3.js +0 -194
- package/dist/thirdweb-BoksPRz3.js.map +0 -1
- package/dist/thirdwebAccount-C2iOcp4_.js +0 -59
- package/dist/thirdwebAccount-C2iOcp4_.js.map +0 -1
- package/dist/worker-B1PcFPLi.js +0 -69
- package/dist/worker-B1PcFPLi.js.map +0 -1
- package/dist/worker-B8gN5WTx.js +0 -69
- package/dist/worker-B8gN5WTx.js.map +0 -1
- package/dist/worker-BCG1r0AS.js +0 -69
- package/dist/worker-BCG1r0AS.js.map +0 -1
- package/dist/worker-BgErCNTb.js +0 -69
- package/dist/worker-BgErCNTb.js.map +0 -1
- package/dist/worker-C07rPV2G.js +0 -69
- package/dist/worker-C07rPV2G.js.map +0 -1
- package/dist/worker-C9Za_dlQ.js +0 -69
- package/dist/worker-C9Za_dlQ.js.map +0 -1
- package/dist/worker-CEgulQnm.js +0 -69
- package/dist/worker-CEgulQnm.js.map +0 -1
- package/dist/worker-C_TL94He.js +0 -69
- package/dist/worker-C_TL94He.js.map +0 -1
- package/dist/worker-CbtzcKG6.js +0 -69
- package/dist/worker-CbtzcKG6.js.map +0 -1
- package/dist/worker-DBC_g-3I.js +0 -69
- package/dist/worker-DBC_g-3I.js.map +0 -1
- package/dist/worker-DHUm-TeQ.js +0 -69
- package/dist/worker-DHUm-TeQ.js.map +0 -1
- package/dist/worker-DypHzXgH.js +0 -69
- package/dist/worker-DypHzXgH.js.map +0 -1
- package/dist/worker-ZL4Wg19t.js +0 -69
- package/dist/worker-ZL4Wg19t.js.map +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-3sSqEVQh.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-BdgkcqM7.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-BdgkcqM7.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { r as t } from "./config-DkIapO94.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-BkmDN480.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-BkmDN480.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-BYm5OXpk.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-BnDhP3N-.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-BnDhP3N-.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-DDA4YmAB.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-CQ29pzG2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-CQ29pzG2.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { r as t } from "./config-EQZZNH9H.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-CZIVmr9Z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-CZIVmr9Z.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-CYy0XJ0M.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-Ce7iBIsj.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-Ce7iBIsj.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-CfVGYAsY.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-DroRrOFQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-DroRrOFQ.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { r as t } from "./config-CPBd5C_b.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-DzXFjQ7L.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-DzXFjQ7L.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-BRcsMopd.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-Dzb2vcEs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-Dzb2vcEs.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./chainConfig-3wlYarAG.js";
|
|
3
|
-
import { createThirdwebClient as n } from "thirdweb";
|
|
4
|
-
//#region src/helpers/publishThirdwebClient.ts
|
|
5
|
-
var r = /* @__PURE__ */ e({ getClient: () => o }), i = null, a = null;
|
|
6
|
-
function o() {
|
|
7
|
-
let { thirdwebClientId: e, thirdwebSecretKey: r } = t();
|
|
8
|
-
if (!e && !r) throw Error("@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.");
|
|
9
|
-
let o = `${e ?? ""}\0${r ?? ""}`;
|
|
10
|
-
return (!i || a !== o) && (a = o, i = n(e ? {
|
|
11
|
-
clientId: e,
|
|
12
|
-
...r ? { secretKey: r } : {}
|
|
13
|
-
} : { secretKey: r })), i;
|
|
14
|
-
}
|
|
15
|
-
//#endregion
|
|
16
|
-
export { r as n, o as t };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=publishThirdwebClient-i8P7fivi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishThirdwebClient-i8P7fivi.js","names":[],"sources":["../src/helpers/publishThirdwebClient.ts"],"sourcesContent":["import { createThirdwebClient, type ThirdwebClient } from 'thirdweb'\nimport { getPublishConfig } from '../config'\n\nlet _client: ThirdwebClient | null = null\nlet _clientKey: string | null = null\n\n/**\n * Thirdweb client for publish sends and contract calls.\n * Uses `thirdwebSecretKey` when set so server-side RPC is not limited to browser origins.\n * Recreates the client when the client id or secret key changes.\n */\nexport function getClient(): ThirdwebClient {\n const { thirdwebClientId, thirdwebSecretKey } = getPublishConfig()\n if (!thirdwebClientId && !thirdwebSecretKey) {\n throw new Error(\n '@seedprotocol/publish/thirdweb: thirdwebClientId or thirdwebSecretKey is required. Pass one in initPublish / PublishProvider config.',\n )\n }\n const key = `${thirdwebClientId ?? ''}\\0${thirdwebSecretKey ?? ''}`\n if (!_client || _clientKey !== key) {\n _clientKey = key\n _client = thirdwebClientId\n ? createThirdwebClient({\n clientId: thirdwebClientId,\n ...(thirdwebSecretKey ? { secretKey: thirdwebSecretKey } : {}),\n })\n : createThirdwebClient({ secretKey: thirdwebSecretKey! })\n }\n return _client\n}\n\n/** Drop the cached client (tests). */\nexport function resetPublishThirdwebClient(): void {\n _client = null\n _clientKey = null\n}\n"],"mappings":";;;;mDAGI,IAAiC,MACjC,IAA4B;AAOhC,SAAgB,IAA4B;CAC1C,IAAM,EAAE,qBAAkB,yBAAsB,EAAiB;CACjE,IAAI,CAAC,KAAoB,CAAC,GACxB,MAAU,MACR,sIACF;CAEF,IAAM,IAAM,GAAG,KAAoB,GAAG,IAAI,KAAqB;CAU/D,QATI,CAAC,KAAW,MAAe,OAC7B,IAAa,GACb,IACI,EADM,IACe;EACnB,UAAU;EACV,GAAI,IAAoB,EAAE,WAAW,EAAkB,IAAI,CAAC;CAC9D,IACqB,EAAE,WAAW,EAAmB,CAAC,IAErD;AACT"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { client as t } from "@seedprotocol/sdk";
|
|
3
|
-
//#region src/helpers/publishWalletRegistry.ts
|
|
4
|
-
var n = /* @__PURE__ */ e({
|
|
5
|
-
clearPublishWallet: () => s,
|
|
6
|
-
getPublishWallet: () => o,
|
|
7
|
-
setPublishWallet: () => a
|
|
8
|
-
}), r = null;
|
|
9
|
-
function i() {
|
|
10
|
-
return t.isInitialized() ? Promise.resolve() : new Promise((e) => {
|
|
11
|
-
t.onReady(() => e());
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
async function a(e) {
|
|
15
|
-
if (r = e, !e) return;
|
|
16
|
-
await i();
|
|
17
|
-
let n = /* @__PURE__ */ new Set();
|
|
18
|
-
for (let t of e.ownedAddresses ?? []) t && n.add(t.toLowerCase());
|
|
19
|
-
n.add(e.signer.address.toLowerCase()), n.add(e.txSender.address.toLowerCase()), e.publisherAddress && n.add(e.publisherAddress.toLowerCase());
|
|
20
|
-
try {
|
|
21
|
-
await t.setAddresses({ owned: [...n] });
|
|
22
|
-
let r = e.publisherAddress ?? e.signer.address;
|
|
23
|
-
r && await t.claimUnpublishedDrafts(r);
|
|
24
|
-
} catch (e) {
|
|
25
|
-
console.warn("[publishWalletRegistry] Failed to set seed client addresses:", e);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
function o() {
|
|
29
|
-
return r;
|
|
30
|
-
}
|
|
31
|
-
function s() {
|
|
32
|
-
r = null;
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { a as i, o as n, n as r, s as t };
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=publishWalletRegistry-Cugh691z.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"publishWalletRegistry-Cugh691z.js","names":[],"sources":["../src/helpers/publishWalletRegistry.ts"],"sourcesContent":["import { client as seedClient } from '@seedprotocol/sdk'\nimport type { PublishWallet, SeedSigner, SeedTxSender } from './seedSigner'\n\nexport type PublishWalletSession = PublishWallet & {\n /** Addresses to treat as owned in the Seed SDK (EOA + smart account, etc.). */\n ownedAddresses?: string[]\n /** Preferred publisher address for new seeds (defaults to signer.address). */\n publisherAddress?: string\n /**\n * When the execution wallet (signer/txSender) is a session key / modular wallet,\n * the ManagedAccount admin wallet used for session-key grants and module install.\n */\n managedAdmin?: PublishWallet\n}\n\nlet session: PublishWalletSession | null = null\n\nfunction waitUntilSeedInitialized(): Promise<void> {\n if (seedClient.isInitialized()) return Promise.resolve()\n return new Promise((resolve) => {\n seedClient.onReady(() => resolve())\n })\n}\n\n/**\n * Register the active publish wallet (EIP-1193, ethers, Thirdweb adapter, etc.).\n * Syncs owned addresses into the Seed SDK when possible.\n */\nexport async function setPublishWallet(\n next: PublishWalletSession | null,\n): Promise<void> {\n session = next\n if (!next) return\n await waitUntilSeedInitialized()\n const owned = new Set<string>()\n for (const a of next.ownedAddresses ?? []) {\n if (a) owned.add(a.toLowerCase())\n }\n owned.add(next.signer.address.toLowerCase())\n owned.add(next.txSender.address.toLowerCase())\n if (next.publisherAddress) owned.add(next.publisherAddress.toLowerCase())\n try {\n await seedClient.setAddresses({ owned: [...owned] })\n const claimAs = next.publisherAddress ?? next.signer.address\n if (claimAs) {\n await seedClient.claimUnpublishedDrafts(claimAs)\n }\n } catch (err) {\n console.warn('[publishWalletRegistry] Failed to set seed client addresses:', err)\n }\n}\n\nexport function getPublishWallet(): PublishWalletSession | null {\n return session\n}\n\nexport function clearPublishWallet(): void {\n session = null\n}\n\n/** Convenience for callers that only need signing. */\nexport function getRegisteredSigner(): SeedSigner | null {\n return session?.signer ?? null\n}\n\n/** Convenience for callers that only need sending. */\nexport function getRegisteredTxSender(): SeedTxSender | null {\n return session?.txSender ?? null\n}\n"],"mappings":";;;;;;;IAeI,IAAuC;AAE3C,SAAS,IAA0C;CAEjD,OADI,EAAW,cAAc,IAAU,QAAQ,QAAQ,IAChD,IAAI,SAAS,MAAY;EAC9B,EAAW,cAAc,EAAQ,CAAC;CACpC,CAAC;AACH;AAMA,eAAsB,EACpB,GACe;CAEf,IADA,IAAU,GACN,CAAC,GAAM;CACX,MAAM,EAAyB;CAC/B,IAAM,oBAAQ,IAAI,IAAY;CAC9B,KAAK,IAAM,KAAK,EAAK,kBAAkB,CAAC,GACtC,AAAI,KAAG,EAAM,IAAI,EAAE,YAAY,CAAC;CAIlC,AAFA,EAAM,IAAI,EAAK,OAAO,QAAQ,YAAY,CAAC,GAC3C,EAAM,IAAI,EAAK,SAAS,QAAQ,YAAY,CAAC,GACzC,EAAK,oBAAkB,EAAM,IAAI,EAAK,iBAAiB,YAAY,CAAC;CACxE,IAAI;EACF,MAAM,EAAW,aAAa,EAAE,OAAO,CAAC,GAAG,CAAK,EAAE,CAAC;EACnD,IAAM,IAAU,EAAK,oBAAoB,EAAK,OAAO;EACrD,AAAI,KACF,MAAM,EAAW,uBAAuB,CAAO;CAEnD,SAAS,GAAK;EACZ,QAAQ,KAAK,gEAAgE,CAAG;CAClF;AACF;AAEA,SAAgB,IAAgD;CAC9D,OAAO;AACT;AAEA,SAAgB,IAA2B;CACzC,IAAU;AACZ"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { _ as e, o as t } from "./chainConfig-DDA4YmAB.js";
|
|
2
|
-
import { A as n, F as r, L as i, M as a } from "./publishAuthorization-B0G1em4a.js";
|
|
3
|
-
import { t as o } from "./publishThirdwebClient-CQ29pzG2.js";
|
|
4
|
-
import { getGetAdditionalSyncAddresses as s } from "@seedprotocol/sdk";
|
|
5
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
6
|
-
async function c(c) {
|
|
7
|
-
let { account: l, attester: u } = c;
|
|
8
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
9
|
-
let d = s(), f = !1;
|
|
10
|
-
if (d) {
|
|
11
|
-
let e = await d(), t = u.toLowerCase();
|
|
12
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
let t = await r(l.address);
|
|
16
|
-
if (u.toLowerCase() === t.toLowerCase() || f) {
|
|
17
|
-
let r = f ? await n(e()).catch(() => t) : t;
|
|
18
|
-
if (await i(r)) {
|
|
19
|
-
let t = a();
|
|
20
|
-
await t.autoConnect({
|
|
21
|
-
client: o(),
|
|
22
|
-
chain: e()
|
|
23
|
-
});
|
|
24
|
-
let n = t.getAccount();
|
|
25
|
-
if (n) return n;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
if (f) {
|
|
30
|
-
let { modularAccountModuleContract: e } = t();
|
|
31
|
-
throw e?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
32
|
-
}
|
|
33
|
-
return l;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { c as resolveRevokeAccount };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=resolveRevokeAccount-B5iXpuRT.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { g as e, o as t } from "./chainConfig-CfVGYAsY.js";
|
|
2
|
-
import { I as n, N as r, R as i, j as a } from "./publishAuthorization-DEriY_jm.js";
|
|
3
|
-
import { t as o } from "./publishThirdwebClient-DroRrOFQ.js";
|
|
4
|
-
import { getGetAdditionalSyncAddresses as s } from "@seedprotocol/sdk";
|
|
5
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
6
|
-
async function c(c) {
|
|
7
|
-
let { account: l, attester: u } = c;
|
|
8
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
9
|
-
let d = s(), f = !1;
|
|
10
|
-
if (d) {
|
|
11
|
-
let e = await d(), t = u.toLowerCase();
|
|
12
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
let t = await n(l.address);
|
|
16
|
-
if (u.toLowerCase() === t.toLowerCase() || f) {
|
|
17
|
-
let n = f ? await a(e()).catch(() => t) : t;
|
|
18
|
-
if (await i(n)) {
|
|
19
|
-
let t = r();
|
|
20
|
-
await t.autoConnect({
|
|
21
|
-
client: o(),
|
|
22
|
-
chain: e()
|
|
23
|
-
});
|
|
24
|
-
let n = t.getAccount();
|
|
25
|
-
if (n) return n;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
if (f) {
|
|
30
|
-
let { modularAccountModuleContract: e } = t();
|
|
31
|
-
throw e?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
32
|
-
}
|
|
33
|
-
return l;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { c as resolveRevokeAccount };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=resolveRevokeAccount-B7ImSb4Y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRevokeAccount-B7ImSb4Y.js","names":[],"sources":["../src/helpers/resolveRevokeAccount.ts"],"sourcesContent":["import type { Account } from 'thirdweb/wallets'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport { getPublishConfig } from '~/config'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n getConnectedManagedAccountAddress,\n} from '~/helpers/thirdweb'\nimport { getPublishThirdwebChain } from './thirdwebChain'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * When the attester is the legacy executor module address, attempts the ManagedAccount\n * wallet if `modularAccountModuleContract` is configured (executor-routed multiRevoke).\n * Throws only when the module was the attester and no ManagedAccount path is available.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n let attesterIsExecutorModule = false\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n attesterIsExecutorModule = !!additional?.some(\n (a: string | undefined) => a?.toLowerCase() === attesterLower,\n )\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower || attesterIsExecutorModule) {\n const managedAddress = attesterIsExecutorModule\n ? await getConnectedManagedAccountAddress(getPublishThirdwebChain()).catch(() => derivedManagedAccount)\n : derivedManagedAccount\n const deployed = await isSmartWalletDeployed(managedAddress)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: getPublishThirdwebChain(),\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through\n }\n\n if (attesterIsExecutorModule) {\n const { modularAccountModuleContract } = getPublishConfig()\n if (!modularAccountModuleContract?.trim()) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n // Module configured but ManagedAccount wallet unavailable\n throw new Error(\n 'Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.',\n )\n }\n\n return account\n}\n"],"mappings":";;;;;AAsBA,eAAsB,EAAqB,GAGtB;CACnB,IAAM,EAAE,YAAS,gBAAa;CAE9B,IAAI,CAAC,KAAY,EAAQ,QAAQ,YAAY,MAAM,EAAS,YAAY,GACtE,OAAO;CAGT,IAAM,IAAmB,EAA8B,GACnD,IAA2B;CAC/B,IAAI,GAAkB;EACpB,IAAM,IAAa,MAAM,EAAiB,GACpC,IAAgB,EAAS,YAAY;EAC3C,IAA2B,CAAC,CAAC,GAAY,MACtC,MAA0B,GAAG,YAAY,MAAM,CAClD;CACF;CAEA,IAAI;EACF,IAAM,IAAwB,MAAM,EAA8B,EAAQ,OAAO;EAIjF,IAHsB,EAAS,YAG3B,MAFiB,EAAsB,YAErB,KAAgB,GAA0B;GAC9D,IAAM,IAAiB,IACnB,MAAM,EAAkC,EAAwB,CAAC,CAAC,CAAC,YAAY,CAAqB,IACpG;GAEJ,IAAI,MADmB,EAAsB,CAAc,GAC7C;IACZ,IAAM,IAAuB,EAAwB;IACrD,MAAM,EAAqB,YAAY;KACrC,QAAQ,EAAU;KAClB,OAAO,EAAwB;IACjC,CAAC;IACD,IAAM,IAAiB,EAAqB,WAAW;IACvD,IAAI,GACF,OAAO;GAEX;EACF;CACF,QAAQ,CAER;CAEA,IAAI,GAA0B;EAC5B,IAAM,EAAE,oCAAiC,EAAiB;EAO1D,MANK,GAA8B,KAAK,IAM9B,MACR,sIACF,IAPY,MACR,wEACF;CAMJ;CAEA,OAAO;AACT"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./config-qjpaJcBA.js";
|
|
2
|
-
import { D as t, I as n, P as r, j as i, k as a } from "./publishAuthorization-CSN2FsQk.js";
|
|
3
|
-
import { getGetAdditionalSyncAddresses as o } from "@seedprotocol/sdk";
|
|
4
|
-
import { optimismSepolia as s } from "thirdweb/chains";
|
|
5
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
6
|
-
async function c(c) {
|
|
7
|
-
let { account: l, attester: u } = c;
|
|
8
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
9
|
-
let d = o(), f = !1;
|
|
10
|
-
if (d) {
|
|
11
|
-
let e = await d(), t = u.toLowerCase();
|
|
12
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
let e = await r(l.address);
|
|
16
|
-
if (u.toLowerCase() === e.toLowerCase() || f) {
|
|
17
|
-
let r = f ? await a(s).catch(() => e) : e;
|
|
18
|
-
if (await n(r)) {
|
|
19
|
-
let e = i();
|
|
20
|
-
await e.autoConnect({
|
|
21
|
-
client: t(),
|
|
22
|
-
chain: s
|
|
23
|
-
});
|
|
24
|
-
let n = e.getAccount();
|
|
25
|
-
if (n) return n;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
if (f) {
|
|
30
|
-
let { modularAccountModuleContract: t } = e();
|
|
31
|
-
throw t?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
32
|
-
}
|
|
33
|
-
return l;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { c as resolveRevokeAccount };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=resolveRevokeAccount-BEhKQBTm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRevokeAccount-BEhKQBTm.js","names":[],"sources":["../src/helpers/resolveRevokeAccount.ts"],"sourcesContent":["import type { Account } from 'thirdweb/wallets'\nimport { optimismSepolia } from 'thirdweb/chains'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport { getPublishConfig } from '~/config'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n getConnectedManagedAccountAddress,\n} from '~/helpers/thirdweb'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * When the attester is the legacy executor module address, attempts the ManagedAccount\n * wallet if `modularAccountModuleContract` is configured (executor-routed multiRevoke).\n * Throws only when the module was the attester and no ManagedAccount path is available.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n let attesterIsExecutorModule = false\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n attesterIsExecutorModule = !!additional?.some(\n (a: string | undefined) => a?.toLowerCase() === attesterLower,\n )\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower || attesterIsExecutorModule) {\n const managedAddress = attesterIsExecutorModule\n ? await getConnectedManagedAccountAddress(optimismSepolia).catch(() => derivedManagedAccount)\n : derivedManagedAccount\n const deployed = await isSmartWalletDeployed(managedAddress)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: optimismSepolia,\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through\n }\n\n if (attesterIsExecutorModule) {\n const { modularAccountModuleContract } = getPublishConfig()\n if (!modularAccountModuleContract?.trim()) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n // Module configured but ManagedAccount wallet unavailable\n throw new Error(\n 'Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.',\n )\n }\n\n return account\n}\n"],"mappings":";;;;;AAsBA,eAAsB,EAAqB,GAGtB;CACnB,IAAM,EAAE,YAAS,gBAAa;CAE9B,IAAI,CAAC,KAAY,EAAQ,QAAQ,YAAY,MAAM,EAAS,YAAY,GACtE,OAAO;CAGT,IAAM,IAAmB,EAA8B,GACnD,IAA2B;CAC/B,IAAI,GAAkB;EACpB,IAAM,IAAa,MAAM,EAAiB,GACpC,IAAgB,EAAS,YAAY;EAC3C,IAA2B,CAAC,CAAC,GAAY,MACtC,MAA0B,GAAG,YAAY,MAAM,CAClD;CACF;CAEA,IAAI;EACF,IAAM,IAAwB,MAAM,EAA8B,EAAQ,OAAO;EAIjF,IAHsB,EAAS,YAG3B,MAFiB,EAAsB,YAErB,KAAgB,GAA0B;GAC9D,IAAM,IAAiB,IACnB,MAAM,EAAkC,CAAe,CAAC,CAAC,YAAY,CAAqB,IAC1F;GAEJ,IAAI,MADmB,EAAsB,CAAc,GAC7C;IACZ,IAAM,IAAuB,EAAwB;IACrD,MAAM,EAAqB,YAAY;KACrC,QAAQ,EAAU;KAClB,OAAO;IACT,CAAC;IACD,IAAM,IAAiB,EAAqB,WAAW;IACvD,IAAI,GACF,OAAO;GAEX;EACF;CACF,QAAQ,CAER;CAEA,IAAI,GAA0B;EAC5B,IAAM,EAAE,oCAAiC,EAAiB;EAO1D,MANK,GAA8B,KAAK,IAM9B,MACR,sIACF,IAPY,MACR,wEACF;CAMJ;CAEA,OAAO;AACT"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { _ as e, o as t } from "./chainConfig-3sSqEVQh.js";
|
|
2
|
-
import { A as n, F as r, L as i, M as a } from "./publishAuthorization-By2Tt9kW.js";
|
|
3
|
-
import { t as o } from "./publishThirdwebClient-BdgkcqM7.js";
|
|
4
|
-
import { getGetAdditionalSyncAddresses as s } from "@seedprotocol/sdk";
|
|
5
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
6
|
-
async function c(c) {
|
|
7
|
-
let { account: l, attester: u } = c;
|
|
8
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
9
|
-
let d = s(), f = !1;
|
|
10
|
-
if (d) {
|
|
11
|
-
let e = await d(), t = u.toLowerCase();
|
|
12
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
let t = await r(l.address);
|
|
16
|
-
if (u.toLowerCase() === t.toLowerCase() || f) {
|
|
17
|
-
let r = f ? await n(e()).catch(() => t) : t;
|
|
18
|
-
if (await i(r)) {
|
|
19
|
-
let t = a();
|
|
20
|
-
await t.autoConnect({
|
|
21
|
-
client: o(),
|
|
22
|
-
chain: e()
|
|
23
|
-
});
|
|
24
|
-
let n = t.getAccount();
|
|
25
|
-
if (n) return n;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
if (f) {
|
|
30
|
-
let { modularAccountModuleContract: e } = t();
|
|
31
|
-
throw e?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
32
|
-
}
|
|
33
|
-
return l;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { c as resolveRevokeAccount };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=resolveRevokeAccount-BM1j2l5Q.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRevokeAccount-BM1j2l5Q.js","names":[],"sources":["../src/helpers/resolveRevokeAccount.ts"],"sourcesContent":["import type { Account } from 'thirdweb/wallets'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport { getPublishConfig } from '~/config'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n getConnectedManagedAccountAddress,\n} from '~/helpers/thirdweb'\nimport { getPublishThirdwebChain } from './thirdwebChain'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * When the attester is the legacy executor module address, attempts the ManagedAccount\n * wallet if `modularAccountModuleContract` is configured (executor-routed multiRevoke).\n * Throws only when the module was the attester and no ManagedAccount path is available.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n let attesterIsExecutorModule = false\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n attesterIsExecutorModule = !!additional?.some(\n (a: string | undefined) => a?.toLowerCase() === attesterLower,\n )\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower || attesterIsExecutorModule) {\n const managedAddress = attesterIsExecutorModule\n ? await getConnectedManagedAccountAddress(getPublishThirdwebChain()).catch(() => derivedManagedAccount)\n : derivedManagedAccount\n const deployed = await isSmartWalletDeployed(managedAddress)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: getPublishThirdwebChain(),\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through\n }\n\n if (attesterIsExecutorModule) {\n const { modularAccountModuleContract } = getPublishConfig()\n if (!modularAccountModuleContract?.trim()) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n // Module configured but ManagedAccount wallet unavailable\n throw new Error(\n 'Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.',\n )\n }\n\n return account\n}\n"],"mappings":";;;;;AAsBA,eAAsB,EAAqB,GAGtB;CACnB,IAAM,EAAE,YAAS,gBAAa;CAE9B,IAAI,CAAC,KAAY,EAAQ,QAAQ,YAAY,MAAM,EAAS,YAAY,GACtE,OAAO;CAGT,IAAM,IAAmB,EAA8B,GACnD,IAA2B;CAC/B,IAAI,GAAkB;EACpB,IAAM,IAAa,MAAM,EAAiB,GACpC,IAAgB,EAAS,YAAY;EAC3C,IAA2B,CAAC,CAAC,GAAY,MACtC,MAA0B,GAAG,YAAY,MAAM,CAClD;CACF;CAEA,IAAI;EACF,IAAM,IAAwB,MAAM,EAA8B,EAAQ,OAAO;EAIjF,IAHsB,EAAS,YAG3B,MAFiB,EAAsB,YAErB,KAAgB,GAA0B;GAC9D,IAAM,IAAiB,IACnB,MAAM,EAAkC,EAAwB,CAAC,CAAC,CAAC,YAAY,CAAqB,IACpG;GAEJ,IAAI,MADmB,EAAsB,CAAc,GAC7C;IACZ,IAAM,IAAuB,EAAwB;IACrD,MAAM,EAAqB,YAAY;KACrC,QAAQ,EAAU;KAClB,OAAO,EAAwB;IACjC,CAAC;IACD,IAAM,IAAiB,EAAqB,WAAW;IACvD,IAAI,GACF,OAAO;GAEX;EACF;CACF,QAAQ,CAER;CAEA,IAAI,GAA0B;EAC5B,IAAM,EAAE,oCAAiC,EAAiB;EAO1D,MANK,GAA8B,KAAK,IAM9B,MACR,sIACF,IAPY,MACR,wEACF;CAMJ;CAEA,OAAO;AACT"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { _ as e, o as t } from "./chainConfig-BRcsMopd.js";
|
|
2
|
-
import { A as n, F as r, L as i, M as a } from "./publishAuthorization-CxWY7lAQ.js";
|
|
3
|
-
import { t as o } from "./publishThirdwebClient-Dzb2vcEs.js";
|
|
4
|
-
import { getGetAdditionalSyncAddresses as s } from "@seedprotocol/sdk";
|
|
5
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
6
|
-
async function c(c) {
|
|
7
|
-
let { account: l, attester: u } = c;
|
|
8
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
9
|
-
let d = s(), f = !1;
|
|
10
|
-
if (d) {
|
|
11
|
-
let e = await d(), t = u.toLowerCase();
|
|
12
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
13
|
-
}
|
|
14
|
-
try {
|
|
15
|
-
let t = await r(l.address);
|
|
16
|
-
if (u.toLowerCase() === t.toLowerCase() || f) {
|
|
17
|
-
let r = f ? await n(e()).catch(() => t) : t;
|
|
18
|
-
if (await i(r)) {
|
|
19
|
-
let t = a();
|
|
20
|
-
await t.autoConnect({
|
|
21
|
-
client: o(),
|
|
22
|
-
chain: e()
|
|
23
|
-
});
|
|
24
|
-
let n = t.getAccount();
|
|
25
|
-
if (n) return n;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {}
|
|
29
|
-
if (f) {
|
|
30
|
-
let { modularAccountModuleContract: e } = t();
|
|
31
|
-
throw e?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
32
|
-
}
|
|
33
|
-
return l;
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { c as resolveRevokeAccount };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=resolveRevokeAccount-BtVG0xxc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRevokeAccount-BtVG0xxc.js","names":[],"sources":["../src/helpers/resolveRevokeAccount.ts"],"sourcesContent":["import type { Account } from 'thirdweb/wallets'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport { getPublishConfig } from '~/config'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n getConnectedManagedAccountAddress,\n} from '~/helpers/thirdweb'\nimport { getPublishThirdwebChain } from './thirdwebChain'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * When the attester is the legacy executor module address, attempts the ManagedAccount\n * wallet if `modularAccountModuleContract` is configured (executor-routed multiRevoke).\n * Throws only when the module was the attester and no ManagedAccount path is available.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n let attesterIsExecutorModule = false\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n attesterIsExecutorModule = !!additional?.some(\n (a: string | undefined) => a?.toLowerCase() === attesterLower,\n )\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower || attesterIsExecutorModule) {\n const managedAddress = attesterIsExecutorModule\n ? await getConnectedManagedAccountAddress(getPublishThirdwebChain()).catch(() => derivedManagedAccount)\n : derivedManagedAccount\n const deployed = await isSmartWalletDeployed(managedAddress)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: getPublishThirdwebChain(),\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through\n }\n\n if (attesterIsExecutorModule) {\n const { modularAccountModuleContract } = getPublishConfig()\n if (!modularAccountModuleContract?.trim()) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n // Module configured but ManagedAccount wallet unavailable\n throw new Error(\n 'Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.',\n )\n }\n\n return account\n}\n"],"mappings":";;;;;AAsBA,eAAsB,EAAqB,GAGtB;CACnB,IAAM,EAAE,YAAS,gBAAa;CAE9B,IAAI,CAAC,KAAY,EAAQ,QAAQ,YAAY,MAAM,EAAS,YAAY,GACtE,OAAO;CAGT,IAAM,IAAmB,EAA8B,GACnD,IAA2B;CAC/B,IAAI,GAAkB;EACpB,IAAM,IAAa,MAAM,EAAiB,GACpC,IAAgB,EAAS,YAAY;EAC3C,IAA2B,CAAC,CAAC,GAAY,MACtC,MAA0B,GAAG,YAAY,MAAM,CAClD;CACF;CAEA,IAAI;EACF,IAAM,IAAwB,MAAM,EAA8B,EAAQ,OAAO;EAIjF,IAHsB,EAAS,YAG3B,MAFiB,EAAsB,YAErB,KAAgB,GAA0B;GAC9D,IAAM,IAAiB,IACnB,MAAM,EAAkC,EAAwB,CAAC,CAAC,CAAC,YAAY,CAAqB,IACpG;GAEJ,IAAI,MADmB,EAAsB,CAAc,GAC7C;IACZ,IAAM,IAAuB,EAAwB;IACrD,MAAM,EAAqB,YAAY;KACrC,QAAQ,EAAU;KAClB,OAAO,EAAwB;IACjC,CAAC;IACD,IAAM,IAAiB,EAAqB,WAAW;IACvD,IAAI,GACF,OAAO;GAEX;EACF;CACF,QAAQ,CAER;CAEA,IAAI,GAA0B;EAC5B,IAAM,EAAE,oCAAiC,EAAiB;EAO1D,MANK,GAA8B,KAAK,IAM9B,MACR,sIACF,IAPY,MACR,wEACF;CAMJ;CAEA,OAAO;AACT"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { r as e } from "./config-CPBd5C_b.js";
|
|
2
|
-
import { I as t, N as n, R as r, j as i } from "./publishAuthorization-DqhhCAhd.js";
|
|
3
|
-
import { t as a } from "./publishThirdwebClient-DzXFjQ7L.js";
|
|
4
|
-
import { getGetAdditionalSyncAddresses as o } from "@seedprotocol/sdk";
|
|
5
|
-
import { optimismSepolia as s } from "thirdweb/chains";
|
|
6
|
-
//#region src/helpers/resolveRevokeAccount.ts
|
|
7
|
-
async function c(c) {
|
|
8
|
-
let { account: l, attester: u } = c;
|
|
9
|
-
if (!u || l.address.toLowerCase() === u.toLowerCase()) return l;
|
|
10
|
-
let d = o(), f = !1;
|
|
11
|
-
if (d) {
|
|
12
|
-
let e = await d(), t = u.toLowerCase();
|
|
13
|
-
f = !!e?.some((e) => e?.toLowerCase() === t);
|
|
14
|
-
}
|
|
15
|
-
try {
|
|
16
|
-
let e = await t(l.address);
|
|
17
|
-
if (u.toLowerCase() === e.toLowerCase() || f) {
|
|
18
|
-
let t = f ? await i(s).catch(() => e) : e;
|
|
19
|
-
if (await r(t)) {
|
|
20
|
-
let e = n();
|
|
21
|
-
await e.autoConnect({
|
|
22
|
-
client: a(),
|
|
23
|
-
chain: s
|
|
24
|
-
});
|
|
25
|
-
let t = e.getAccount();
|
|
26
|
-
if (t) return t;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
} catch {}
|
|
30
|
-
if (f) {
|
|
31
|
-
let { modularAccountModuleContract: t } = e();
|
|
32
|
-
throw t?.trim() ? Error("Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.") : Error("Revocation not supported for items published via the modular executor.");
|
|
33
|
-
}
|
|
34
|
-
return l;
|
|
35
|
-
}
|
|
36
|
-
//#endregion
|
|
37
|
-
export { c as resolveRevokeAccount };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=resolveRevokeAccount-CJZZdBcQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRevokeAccount-CJZZdBcQ.js","names":[],"sources":["../src/helpers/resolveRevokeAccount.ts"],"sourcesContent":["import type { Account } from 'thirdweb/wallets'\nimport { optimismSepolia } from 'thirdweb/chains'\nimport { getGetAdditionalSyncAddresses } from '@seedprotocol/sdk'\nimport { getPublishConfig } from '~/config'\nimport {\n getClient,\n getSmartWalletAddressForAdmin,\n isSmartWalletDeployed,\n getManagedAccountWallet,\n getConnectedManagedAccountAddress,\n} from '~/helpers/thirdweb'\n\n/**\n * Resolves which account to use for revoking attestations.\n * When the attester is the user's ManagedAccount (EIP4337) but they're connected\n * with a different wallet (e.g. EOA or modular account), attempts to use the\n * ManagedAccount wallet for the revoke.\n *\n * When the attester is the legacy executor module address, attempts the ManagedAccount\n * wallet if `modularAccountModuleContract` is configured (executor-routed multiRevoke).\n * Throws only when the module was the attester and no ManagedAccount path is available.\n */\nexport async function resolveRevokeAccount(params: {\n account: Account\n attester: string | null\n}): Promise<Account> {\n const { account, attester } = params\n\n if (!attester || account.address.toLowerCase() === attester.toLowerCase()) {\n return account\n }\n\n const additionalGetter = getGetAdditionalSyncAddresses()\n let attesterIsExecutorModule = false\n if (additionalGetter) {\n const additional = await additionalGetter()\n const attesterLower = attester.toLowerCase()\n attesterIsExecutorModule = !!additional?.some(\n (a: string | undefined) => a?.toLowerCase() === attesterLower,\n )\n }\n\n try {\n const derivedManagedAccount = await getSmartWalletAddressForAdmin(account.address)\n const attesterLower = attester.toLowerCase()\n const derivedLower = derivedManagedAccount.toLowerCase()\n\n if (attesterLower === derivedLower || attesterIsExecutorModule) {\n const managedAddress = attesterIsExecutorModule\n ? await getConnectedManagedAccountAddress(optimismSepolia).catch(() => derivedManagedAccount)\n : derivedManagedAccount\n const deployed = await isSmartWalletDeployed(managedAddress)\n if (deployed) {\n const managedAccountWallet = getManagedAccountWallet()\n await managedAccountWallet.autoConnect({\n client: getClient(),\n chain: optimismSepolia,\n })\n const managedAccount = managedAccountWallet.getAccount()\n if (managedAccount) {\n return managedAccount\n }\n }\n }\n } catch {\n // Fall through\n }\n\n if (attesterIsExecutorModule) {\n const { modularAccountModuleContract } = getPublishConfig()\n if (!modularAccountModuleContract?.trim()) {\n throw new Error(\n 'Revocation not supported for items published via the modular executor.',\n )\n }\n // Module configured but ManagedAccount wallet unavailable\n throw new Error(\n 'Revocation not supported for items published via the modular executor. Connect the ManagedAccount that controls the executor module.',\n )\n }\n\n return account\n}\n"],"mappings":";;;;;;AAsBA,eAAsB,EAAqB,GAGtB;CACnB,IAAM,EAAE,YAAS,gBAAa;CAE9B,IAAI,CAAC,KAAY,EAAQ,QAAQ,YAAY,MAAM,EAAS,YAAY,GACtE,OAAO;CAGT,IAAM,IAAmB,EAA8B,GACnD,IAA2B;CAC/B,IAAI,GAAkB;EACpB,IAAM,IAAa,MAAM,EAAiB,GACpC,IAAgB,EAAS,YAAY;EAC3C,IAA2B,CAAC,CAAC,GAAY,MACtC,MAA0B,GAAG,YAAY,MAAM,CAClD;CACF;CAEA,IAAI;EACF,IAAM,IAAwB,MAAM,EAA8B,EAAQ,OAAO;EAIjF,IAHsB,EAAS,YAG3B,MAFiB,EAAsB,YAErB,KAAgB,GAA0B;GAC9D,IAAM,IAAiB,IACnB,MAAM,EAAkC,CAAe,CAAC,CAAC,YAAY,CAAqB,IAC1F;GAEJ,IAAI,MADmB,EAAsB,CAAc,GAC7C;IACZ,IAAM,IAAuB,EAAwB;IACrD,MAAM,EAAqB,YAAY;KACrC,QAAQ,EAAU;KAClB,OAAO;IACT,CAAC;IACD,IAAM,IAAiB,EAAqB,WAAW;IACvD,IAAI,GACF,OAAO;GAEX;EACF;CACF,QAAQ,CAER;CAEA,IAAI,GAA0B;EAC5B,IAAM,EAAE,oCAAiC,EAAiB;EAO1D,MANK,GAA8B,KAAK,IAM9B,MACR,sIACF,IAPY,MACR,wEACF;CAMJ;CAEA,OAAO;AACT"}
|