@seedprotocol/publish 0.6.9 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/dist/{chainConfig-CYy0XJ0M.js → chainConfig-BJ8C_RRz.js} +392 -220
- package/dist/chainConfig-BJ8C_RRz.js.map +1 -0
- package/dist/{chainConfig-BRcsMopd.js → chainConfig-DWynbnb8.js} +446 -433
- package/dist/chainConfig-DWynbnb8.js.map +1 -0
- package/dist/{chainConfig-CA1Hrrjg.js → chainConfig-DWzoOtkS.js} +394 -328
- package/dist/chainConfig-DWzoOtkS.js.map +1 -0
- package/dist/{chainConfig-3wlYarAG.js → chainConfig-DmuPBs3D.js} +442 -420
- package/dist/chainConfig-DmuPBs3D.js.map +1 -0
- package/dist/config.d.ts +5 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/ensureAutomationSessionKey-BVmh030S.js +84 -0
- package/dist/ensureAutomationSessionKey-BVmh030S.js.map +1 -0
- package/dist/ensureAutomationSessionKey-CxpJY_uH.js +84 -0
- package/dist/ensureAutomationSessionKey-CxpJY_uH.js.map +1 -0
- package/dist/ensureAutomationSessionKey-DwRm4YMJ.js +84 -0
- package/dist/ensureAutomationSessionKey-DwRm4YMJ.js.map +1 -0
- 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/{ensureModularPublishBootstrap-DxIG-LUP.js → ensureModularPublishBootstrap-CmxyX_EN.js} +9 -10
- package/dist/{ensureModularPublishBootstrap-BW8jKN_A.js.map → ensureModularPublishBootstrap-CmxyX_EN.js.map} +1 -1
- package/dist/{ensureModularPublishBootstrap-BW8jKN_A.js → ensureModularPublishBootstrap-DRFhp-O2.js} +9 -10
- package/dist/{ensureModularPublishBootstrap-BhYNmLzT.js.map → ensureModularPublishBootstrap-DRFhp-O2.js.map} +1 -1
- package/dist/{ensureModularPublishBootstrap-BhYNmLzT.js → ensureModularPublishBootstrap-DegJnYKL.js} +9 -10
- package/dist/{ensureModularPublishBootstrap-Bsw1xSCt.js.map → ensureModularPublishBootstrap-DegJnYKL.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js → ensureSmartWalletThenPublish-0nKg13WN.js} +9 -10
- package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js.map → ensureSmartWalletThenPublish-0nKg13WN.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-D5GSZRyZ.js → ensureSmartWalletThenPublish-BdqeUL6t.js} +9 -10
- package/dist/{ensureSmartWalletThenPublish-D5GSZRyZ.js.map → ensureSmartWalletThenPublish-BdqeUL6t.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-DAomriGc.js → ensureSmartWalletThenPublish-BfEndtFo.js} +9 -10
- package/dist/{ensureSmartWalletThenPublish-DAomriGc.js.map → ensureSmartWalletThenPublish-BfEndtFo.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-Dta2AOyJ.js → ensureSmartWalletThenPublish-DuOYPJFd.js} +9 -10
- package/dist/{ensureSmartWalletThenPublish-Bl415Ss6.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/{managedAccountAdmin-Bje6X8Ds.js → managedAccountAdmin-ByEX_Eg2.js} +9 -10
- package/dist/{managedAccountAdmin-BVLGWpEb.js.map → managedAccountAdmin-ByEX_Eg2.js.map} +1 -1
- package/dist/{managedAccountAdmin-C84-IlQ9.js → managedAccountAdmin-DS6nniiu.js} +9 -10
- package/dist/{managedAccountAdmin-Bje6X8Ds.js.map → managedAccountAdmin-DS6nniiu.js.map} +1 -1
- package/dist/managedAccountAdmin-DwFI-ZfE.js +28 -0
- package/dist/{managedAccountAdmin-C84-IlQ9.js.map → managedAccountAdmin-DwFI-ZfE.js.map} +1 -1
- package/dist/{publishAuthorization-DjVrnMC0.js → publishAuthorization-C-XYb9Ef.js} +1500 -1391
- package/dist/publishAuthorization-C-XYb9Ef.js.map +1 -0
- package/dist/{publishAuthorization-BEqRnP2h.js → publishAuthorization-CG23g8w2.js} +1460 -1398
- package/dist/publishAuthorization-CG23g8w2.js.map +1 -0
- package/dist/{publishAuthorization-CxBkijU6.js → publishAuthorization-CvK_coYp.js} +1104 -1018
- package/dist/publishAuthorization-CvK_coYp.js.map +1 -0
- package/dist/{publishAuthorization-By2Tt9kW.js → publishAuthorization-DgDI4zor.js} +1162 -1063
- package/dist/publishAuthorization-DgDI4zor.js.map +1 -0
- package/dist/{publishThirdwebClient-CBD9sKJR.js → publishThirdwebClient-BQ_KnMi5.js} +2 -2
- package/dist/{publishThirdwebClient-CBD9sKJR.js.map → publishThirdwebClient-BQ_KnMi5.js.map} +1 -1
- package/dist/{publishThirdwebClient-BdgkcqM7.js → publishThirdwebClient-BmqsJCjp.js} +2 -2
- package/dist/{publishThirdwebClient-BdgkcqM7.js.map → publishThirdwebClient-BmqsJCjp.js.map} +1 -1
- package/dist/{publishThirdwebClient-BkmDN480.js → publishThirdwebClient-CO18ST7C.js} +2 -2
- package/dist/{publishThirdwebClient-BkmDN480.js.map → publishThirdwebClient-CO18ST7C.js.map} +1 -1
- package/dist/{publishThirdwebClient-BnDhP3N-.js → publishThirdwebClient-D-K2WEeM.js} +2 -2
- package/dist/{publishThirdwebClient-BnDhP3N-.js.map → publishThirdwebClient-D-K2WEeM.js.map} +1 -1
- package/dist/{resolveRevokeAccount-CehU81k6.js → resolveRevokeAccount-9-OzXVdp.js} +11 -11
- package/dist/{resolveRevokeAccount-B5iXpuRT.js.map → resolveRevokeAccount-9-OzXVdp.js.map} +1 -1
- package/dist/{resolveRevokeAccount-BEhKQBTm.js → resolveRevokeAccount-CXa5XlOv.js} +11 -11
- package/dist/{resolveRevokeAccount-B7ImSb4Y.js.map → resolveRevokeAccount-CXa5XlOv.js.map} +1 -1
- package/dist/{resolveRevokeAccount-CaIMuCee.js → resolveRevokeAccount-DsNod8ti.js} +11 -12
- package/dist/{resolveRevokeAccount-BtVG0xxc.js.map → resolveRevokeAccount-DsNod8ti.js.map} +1 -1
- package/dist/{resolveRevokeAccount-DHnxtEIj.js → resolveRevokeAccount-QgZ6YZuS.js} +11 -12
- package/dist/{resolveRevokeAccount-BM1j2l5Q.js.map → resolveRevokeAccount-QgZ6YZuS.js.map} +1 -1
- package/dist/services/publish/actors/checking.d.ts.map +1 -1
- package/dist/services/publish/actors/createAttestations.d.ts.map +1 -1
- package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts.map +1 -1
- package/dist/services/publish/actors/multiPublishReceipt.d.ts +58 -0
- package/dist/services/publish/actors/multiPublishReceipt.d.ts.map +1 -0
- package/dist/services/publish/actors/persistSeedUid.d.ts.map +1 -1
- package/dist/services/publish/actors/recordMultiPublishReceipt.d.ts +45 -0
- package/dist/services/publish/actors/recordMultiPublishReceipt.d.ts.map +1 -0
- package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
- package/dist/services/publishCost/types.d.ts +3 -1
- package/dist/services/publishCost/types.d.ts.map +1 -1
- package/dist/services/publishManager/actions/publishDone.d.ts.map +1 -1
- package/dist/services/publishManager/actions/stopAll.d.ts.map +1 -1
- package/dist/services/publishManager/actions/stopPublish.d.ts.map +1 -1
- package/dist/services/publishManager/actors/restoreFromDb.d.ts.map +1 -1
- package/dist/services/publishManager/index.d.ts +3 -3
- package/dist/services/publishManager/index.d.ts.map +1 -1
- package/dist/services/publishManager/publishLocks.d.ts +22 -0
- package/dist/services/publishManager/publishLocks.d.ts.map +1 -0
- package/dist/services/revoke/revokeAttestations.d.ts.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-CJRUAOAn.js} +2 -2
- package/dist/{worker-2dUZSapK.js.map → worker-CJRUAOAn.js.map} +1 -1
- package/dist/{worker-B1PcFPLi.js → worker-CN7zg73B.js} +2 -2
- package/dist/{worker-B1PcFPLi.js.map → worker-CN7zg73B.js.map} +1 -1
- package/dist/{worker-BCG1r0AS.js → worker-FmHZbku5.js} +9 -6
- package/dist/{worker-BCG1r0AS.js.map → worker-FmHZbku5.js.map} +1 -1
- package/dist/{worker-B8gN5WTx.js → worker-qoGuo876.js} +2 -2
- package/dist/{worker-B8gN5WTx.js.map → worker-qoGuo876.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.map +0 -1
- 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.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-Bsw1xSCt.js +0 -24
- 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.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-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-DaZf3q5S.js +0 -48
- package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js.map +0 -1
- 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-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.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.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.map +0 -1
- package/dist/publishAuthorization-DqhhCAhd.js +0 -3652
- package/dist/publishAuthorization-DqhhCAhd.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-BEhKQBTm.js.map +0 -1
- package/dist/resolveRevokeAccount-BM1j2l5Q.js +0 -38
- package/dist/resolveRevokeAccount-BtVG0xxc.js +0 -38
- package/dist/resolveRevokeAccount-CJZZdBcQ.js +0 -39
- package/dist/resolveRevokeAccount-CJZZdBcQ.js.map +0 -1
- 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.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-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
package/dist/index.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { SeedProvider as At, SeedProvider as jt, useLiveQuery as L } from "@seedprotocol/react";
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, H as o, I as s, M as c, Mt as l, N as u, O as d, Ot as f, R as p, S as m, T as h, Tt as g, U as _, W as v, Y as y, _t as ee, a as te, c as ne, ct as re, d as ie, dt as b, et as ae, f as oe, ft as se, gt as ce, ht as le, i as ue, j as x, jt as S, k as C, kt as de, l as fe, mt as pe, n as me, o as w, pt as he, q as ge, r as _e, s as ve, st as ye, t as be, tt as xe, vt as Se, w as Ce, x as we, yt as Te } from "./chainConfig-DWynbnb8.js";
|
|
2
|
+
import { $ as Ee, C as De, J as Oe, Q as ke, X as Ae, Y as je, Z as Me, _ as Ne, a as Pe, c as Fe, et as Ie, g as Le, h as Re, i as ze, l as Be, n as Ve, nt as He, o as Ue, q as We, r as Ge, s as Ke, t as qe, tt as Je, v as Ye, w as Xe } from "./publishAuthorization-C-XYb9Ef.js";
|
|
3
|
+
import { n as Ze, r as Qe } from "./collectBatchUids-CnIe9jUB.js";
|
|
4
|
+
import { BaseDb as T, arweaveL1FinalizeJobs as E, isItemOwned as $e, publishProcesses as D, uploadProcesses as et } from "@seedprotocol/sdk";
|
|
5
|
+
import { createPublicClient as tt, createWalletClient as nt, custom as rt, defineChain as it, http as O } from "viem";
|
|
6
|
+
import { ethers as at } from "ethers";
|
|
7
|
+
import { DOMAIN_OWNERSHIP_CHALLENGE_TTL_MS as ot, DOMAIN_OWNERSHIP_DEFAULT_EXPIRATION_SECS as st, DOMAIN_OWNERSHIP_METHOD as ct, DOMAIN_OWNERSHIP_METHOD as lt, DOMAIN_OWNERSHIP_SCHEMA_DEF as ut, DOMAIN_OWNERSHIP_SCHEMA_DEF as k, DOMAIN_OWNERSHIP_SCHEMA_NAME as dt, DOMAIN_OWNERSHIP_SCHEMA_NAME as ft, DOMAIN_OWNERSHIP_SCOPE_REGISTRABLE as pt, EAS_CHAIN_DEPLOYMENTS as mt, PUBLISHED_BY_SCHEMA_DEF as ht, PUBLISHED_BY_SCHEMA_DEF as A, PUBLISHED_BY_SCHEMA_NAME as gt, PUBLISHED_BY_SCHEMA_NAME as _t, assessDomainOwnership as vt, buildDomainOwnershipTxtValue as yt, decodeDomainOwnershipData as bt, domainOwnershipTxtName as xt, getDomainOwnershipFromEas as St, getEasChainDeployment as Ct, hashDomainOwnershipChallenge as wt, hashDomainRegistryFingerprint as Tt, hashPublishedByBatch as Et, hashPublishedByBatch as Dt, isValidEasAttestationUid as j, normalizeBytes32Hex as M, parseDomainOwnershipTxtValue as Ot } from "@seedprotocol/eas";
|
|
8
|
+
import { useCallback as kt, useEffect as N, useMemo as P, useRef as At, useState as F } from "react";
|
|
9
|
+
import { jsx as I, jsxs as jt } from "react/jsx-runtime";
|
|
10
|
+
import { SeedProvider as Mt, SeedProvider as Nt, useLiveQuery as L } from "@seedprotocol/react";
|
|
12
11
|
import { entryPoint08Address as R } from "viem/account-abstraction";
|
|
13
|
-
import { createSmartAccountClient as
|
|
14
|
-
import { to7702SimpleSmartAccount as
|
|
15
|
-
import { createPimlicoClient as
|
|
16
|
-
import { NO_EXPIRATION as
|
|
17
|
-
import { and as
|
|
18
|
-
import { useSelector as
|
|
19
|
-
import { lookup as
|
|
12
|
+
import { createSmartAccountClient as Pt } from "permissionless";
|
|
13
|
+
import { to7702SimpleSmartAccount as Ft } from "permissionless/accounts";
|
|
14
|
+
import { createPimlicoClient as It } from "permissionless/clients/pimlico";
|
|
15
|
+
import { NO_EXPIRATION as Lt, SchemaEncoder as Rt, SchemaRegistry as zt, ZERO_BYTES32 as z } from "@ethereum-attestation-service/eas-sdk";
|
|
16
|
+
import { and as Bt, desc as B, eq as V, inArray as Vt, notInArray as Ht } from "drizzle-orm";
|
|
17
|
+
import { useSelector as Ut } from "@xstate/react";
|
|
18
|
+
import { lookup as Wt, toRegistrableDomain as Gt } from "rdapper";
|
|
20
19
|
//#region src/helpers/seedTwin.ts
|
|
21
|
-
function
|
|
20
|
+
function Kt(e) {
|
|
22
21
|
let t = [
|
|
23
22
|
["chainId", e?.chainId],
|
|
24
23
|
["rpcUrl", e?.rpcUrl],
|
|
@@ -30,7 +29,7 @@ function Wt(e) {
|
|
|
30
29
|
["contracts.seedProtocolExecutor", e?.contracts?.seedProtocolExecutor]
|
|
31
30
|
].filter(([, e]) => e == null || e === "").map(([e]) => e);
|
|
32
31
|
if (t.length > 0) throw Error(`seedTwinConfig: twin.json is missing ${t.join(", ")}. Re-run twin:up.`);
|
|
33
|
-
let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r =
|
|
32
|
+
let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r = it({
|
|
34
33
|
id: e.chainId,
|
|
35
34
|
name: `Seed twin${n}`,
|
|
36
35
|
nativeCurrency: {
|
|
@@ -64,7 +63,7 @@ function Wt(e) {
|
|
|
64
63
|
}
|
|
65
64
|
//#endregion
|
|
66
65
|
//#region src/react/PublishModeButtons.tsx
|
|
67
|
-
var
|
|
66
|
+
var qt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish mode" }) => {
|
|
68
67
|
let i = {
|
|
69
68
|
display: "inline-flex",
|
|
70
69
|
gap: 8,
|
|
@@ -79,7 +78,7 @@ var Gt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
|
|
|
79
78
|
cursor: n ? "not-allowed" : "pointer",
|
|
80
79
|
opacity: n ? .6 : 1
|
|
81
80
|
});
|
|
82
|
-
return /* @__PURE__ */
|
|
81
|
+
return /* @__PURE__ */ jt("div", {
|
|
83
82
|
role: "group",
|
|
84
83
|
"aria-label": r,
|
|
85
84
|
style: i,
|
|
@@ -97,11 +96,11 @@ var Gt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
|
|
|
97
96
|
children: "New version"
|
|
98
97
|
})]
|
|
99
98
|
});
|
|
100
|
-
},
|
|
101
|
-
t &&
|
|
102
|
-
}, [t]), /* @__PURE__ */ I(
|
|
103
|
-
value: t ??
|
|
104
|
-
children: /* @__PURE__ */ I(
|
|
99
|
+
}, Jt = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => (N(() => {
|
|
100
|
+
t && ve(t);
|
|
101
|
+
}, [t]), /* @__PURE__ */ I(Je.Provider, {
|
|
102
|
+
value: t ?? te(),
|
|
103
|
+
children: /* @__PURE__ */ I(Nt, {
|
|
105
104
|
queryClient: n,
|
|
106
105
|
queryClientRef: r,
|
|
107
106
|
children: e
|
|
@@ -109,31 +108,31 @@ var Gt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
|
|
|
109
108
|
}));
|
|
110
109
|
//#endregion
|
|
111
110
|
//#region src/helpers/adapters/eip1193.ts
|
|
112
|
-
async function
|
|
113
|
-
let
|
|
114
|
-
if (!
|
|
111
|
+
async function H(e, t = {}) {
|
|
112
|
+
let n = t.chain ?? _e(), r = t.address;
|
|
113
|
+
if (!r) {
|
|
115
114
|
let t = await e.request({ method: "eth_requestAccounts" });
|
|
116
115
|
if (!t?.[0]) throw Error("@seedprotocol/publish: EIP-1193 provider returned no accounts");
|
|
117
|
-
|
|
116
|
+
r = t[0];
|
|
118
117
|
}
|
|
119
|
-
let
|
|
120
|
-
account:
|
|
121
|
-
chain:
|
|
122
|
-
transport:
|
|
118
|
+
let i = nt({
|
|
119
|
+
account: r,
|
|
120
|
+
chain: n,
|
|
121
|
+
transport: rt(e)
|
|
123
122
|
});
|
|
124
123
|
return {
|
|
125
|
-
signer:
|
|
126
|
-
address:
|
|
127
|
-
signMessage: async ({ message: e }) =>
|
|
128
|
-
account:
|
|
124
|
+
signer: Ce({
|
|
125
|
+
address: r,
|
|
126
|
+
signMessage: async ({ message: e }) => i.signMessage({
|
|
127
|
+
account: r,
|
|
129
128
|
message: typeof e == "string" ? e : { raw: e.raw }
|
|
130
129
|
})
|
|
131
130
|
}),
|
|
132
|
-
txSender:
|
|
133
|
-
address:
|
|
134
|
-
sendTransaction: async (e) => ({ transactionHash: await
|
|
135
|
-
account:
|
|
136
|
-
chain:
|
|
131
|
+
txSender: h({
|
|
132
|
+
address: r,
|
|
133
|
+
sendTransaction: async (e) => ({ transactionHash: await i.sendTransaction({
|
|
134
|
+
account: r,
|
|
135
|
+
chain: n,
|
|
137
136
|
to: e.to,
|
|
138
137
|
data: e.data,
|
|
139
138
|
value: e.value,
|
|
@@ -142,14 +141,14 @@ async function qt(e, t = {}) {
|
|
|
142
141
|
})
|
|
143
142
|
};
|
|
144
143
|
}
|
|
145
|
-
async function
|
|
144
|
+
async function Yt(e = {}) {
|
|
146
145
|
let t = globalThis.ethereum;
|
|
147
146
|
if (!t) throw Error("@seedprotocol/publish: window.ethereum is not available");
|
|
148
|
-
return
|
|
147
|
+
return H(t, e);
|
|
149
148
|
}
|
|
150
149
|
//#endregion
|
|
151
150
|
//#region src/helpers/adapters/permissionlessTxSender.ts
|
|
152
|
-
function
|
|
151
|
+
function Xt(e) {
|
|
153
152
|
return {
|
|
154
153
|
address: e.address,
|
|
155
154
|
type: "local",
|
|
@@ -164,7 +163,7 @@ function Yt(e) {
|
|
|
164
163
|
}
|
|
165
164
|
};
|
|
166
165
|
}
|
|
167
|
-
async function
|
|
166
|
+
async function Zt(e) {
|
|
168
167
|
let t;
|
|
169
168
|
try {
|
|
170
169
|
t = (await (await fetch(e, {
|
|
@@ -184,48 +183,48 @@ async function Xt(e) {
|
|
|
184
183
|
let n = t.map((e) => String(e).toLowerCase());
|
|
185
184
|
if (!n.includes(R.toLowerCase())) throw Error(`@seedprotocol/publish: PublishConfig.bundlerUrl (${e}) does not support EntryPoint v0.8 (it lists ${n.join(", ") || "none"}). The top-level bundlerUrl is only for the permissionless EIP-7702 sender. For Thirdweb in-app wallets (e.g. a local twin's bundler), set PublishConfig.thirdweb.bundlerUrl instead.`);
|
|
186
185
|
}
|
|
187
|
-
async function
|
|
188
|
-
let { signer: t, bundlerUrl:
|
|
189
|
-
await
|
|
190
|
-
let
|
|
191
|
-
chain:
|
|
192
|
-
transport:
|
|
193
|
-
}),
|
|
194
|
-
client:
|
|
195
|
-
owner:
|
|
186
|
+
async function U(e) {
|
|
187
|
+
let { signer: t, bundlerUrl: n, paymasterUrl: r } = e;
|
|
188
|
+
await Zt(n);
|
|
189
|
+
let i = _e(), a = me(), o = t.address, s = tt({
|
|
190
|
+
chain: i,
|
|
191
|
+
transport: O(a)
|
|
192
|
+
}), c = Xt(t), l = await Ft({
|
|
193
|
+
client: s,
|
|
194
|
+
owner: c,
|
|
196
195
|
entryPoint: {
|
|
197
196
|
address: R,
|
|
198
197
|
version: "0.8"
|
|
199
198
|
}
|
|
200
|
-
}),
|
|
201
|
-
transport:
|
|
199
|
+
}), u = It({
|
|
200
|
+
transport: O(r ?? n),
|
|
202
201
|
entryPoint: {
|
|
203
202
|
address: R,
|
|
204
203
|
version: "0.8"
|
|
205
204
|
}
|
|
206
|
-
}),
|
|
207
|
-
account:
|
|
208
|
-
chain:
|
|
209
|
-
bundlerTransport:
|
|
210
|
-
paymaster:
|
|
211
|
-
userOperation: { estimateFeesPerGas: async () => (await
|
|
205
|
+
}), d = Pt({
|
|
206
|
+
account: l,
|
|
207
|
+
chain: i,
|
|
208
|
+
bundlerTransport: O(n),
|
|
209
|
+
paymaster: u,
|
|
210
|
+
userOperation: { estimateFeesPerGas: async () => (await u.getUserOperationGasPrice()).fast }
|
|
212
211
|
});
|
|
213
|
-
return
|
|
214
|
-
address:
|
|
212
|
+
return h({
|
|
213
|
+
address: l.address ?? o,
|
|
215
214
|
sendTransaction: async (e) => {
|
|
216
215
|
let t;
|
|
217
216
|
try {
|
|
218
|
-
let n = await
|
|
217
|
+
let n = await d.sendUserOperation({ calls: [{
|
|
219
218
|
to: e.to,
|
|
220
219
|
data: e.data,
|
|
221
220
|
value: e.value ?? 0n
|
|
222
221
|
}] });
|
|
223
|
-
t = await
|
|
222
|
+
t = await d.waitForUserOperationReceipt({ hash: n });
|
|
224
223
|
} catch (e) {
|
|
225
224
|
let t = e instanceof Error ? e.message : String(e);
|
|
226
225
|
throw Error(`@seedprotocol/publish: permissionless/EIP-7702 send failed (${t}). Ensure bundlerUrl/paymasterUrl support EntryPoint v0.8, or use accountMode: 'eoa' / Thirdweb adapter.`, { cause: e });
|
|
227
226
|
}
|
|
228
|
-
return { transactionHash: Qt(t,
|
|
227
|
+
return { transactionHash: Qt(t, l.address) };
|
|
229
228
|
}
|
|
230
229
|
});
|
|
231
230
|
}
|
|
@@ -233,7 +232,7 @@ function Qt(e, t) {
|
|
|
233
232
|
let n = e.receipt.transactionHash;
|
|
234
233
|
if (e.success) return n;
|
|
235
234
|
let r = e.reason;
|
|
236
|
-
throw r && !/^0x[0-9a-f]*$/i.test(r) ? new
|
|
235
|
+
throw r && !/^0x[0-9a-f]*$/i.test(r) ? new pe(`The publish UserOp in transaction ${n} failed: ${r}`, "USEROP_REVERTED", t) : Ie({
|
|
237
236
|
txHash: n,
|
|
238
237
|
revertData: r,
|
|
239
238
|
sender: t
|
|
@@ -242,60 +241,60 @@ function Qt(e, t) {
|
|
|
242
241
|
//#endregion
|
|
243
242
|
//#region src/react/useSeedWallet.ts
|
|
244
243
|
function $t() {
|
|
245
|
-
let [
|
|
244
|
+
let [e, n] = F(() => x()), [r, a] = F(() => x() ? "connected" : "disconnected");
|
|
246
245
|
N(() => {
|
|
247
|
-
n(
|
|
246
|
+
n(x());
|
|
248
247
|
}, []);
|
|
249
|
-
let
|
|
250
|
-
|
|
248
|
+
let o = kt(async (e) => {
|
|
249
|
+
a("connecting");
|
|
251
250
|
try {
|
|
252
|
-
let
|
|
253
|
-
|
|
254
|
-
let
|
|
255
|
-
|
|
256
|
-
signer:
|
|
257
|
-
bundlerUrl:
|
|
258
|
-
paymasterUrl:
|
|
251
|
+
let t;
|
|
252
|
+
t = i(e) ? e : await H(e);
|
|
253
|
+
let r = w(), o = t.txSender;
|
|
254
|
+
r.accountMode === "eip7702" && r.bundlerUrl && (o = await U({
|
|
255
|
+
signer: t.signer,
|
|
256
|
+
bundlerUrl: r.bundlerUrl,
|
|
257
|
+
paymasterUrl: r.paymasterUrl
|
|
259
258
|
}));
|
|
260
259
|
let s = {
|
|
261
|
-
signer:
|
|
260
|
+
signer: t.signer,
|
|
262
261
|
txSender: o,
|
|
263
|
-
ownedAddresses: [
|
|
264
|
-
publisherAddress:
|
|
262
|
+
ownedAddresses: [t.signer.address, o.address],
|
|
263
|
+
publisherAddress: t.signer.address
|
|
265
264
|
};
|
|
266
|
-
return await
|
|
265
|
+
return await c(s), n(s), a("connected"), s;
|
|
267
266
|
} catch (e) {
|
|
268
|
-
throw
|
|
267
|
+
throw a("disconnected"), e;
|
|
269
268
|
}
|
|
270
|
-
}, []),
|
|
271
|
-
|
|
269
|
+
}, []), s = kt(() => {
|
|
270
|
+
t(), n(null), a("disconnected");
|
|
272
271
|
}, []);
|
|
273
272
|
return {
|
|
274
|
-
address:
|
|
275
|
-
signer:
|
|
276
|
-
txSender:
|
|
273
|
+
address: e?.signer.address,
|
|
274
|
+
signer: e?.signer,
|
|
275
|
+
txSender: e?.txSender,
|
|
277
276
|
status: r,
|
|
278
|
-
connect:
|
|
279
|
-
disconnect:
|
|
277
|
+
connect: o,
|
|
278
|
+
disconnect: s
|
|
280
279
|
};
|
|
281
280
|
}
|
|
282
281
|
//#endregion
|
|
283
282
|
//#region src/services/publishCost/gasHeuristics.ts
|
|
284
|
-
var
|
|
283
|
+
var W = {
|
|
285
284
|
BASE: 80000n,
|
|
286
285
|
NEW_SEED: 120000n,
|
|
287
286
|
NEW_VERSION: 80000n,
|
|
288
287
|
ATTESTATION: 55000n
|
|
289
288
|
};
|
|
290
289
|
function en(e) {
|
|
291
|
-
return
|
|
290
|
+
return W.BASE + W.NEW_SEED * BigInt(e.newSeedCount) + W.NEW_VERSION * BigInt(e.newVersionCount) + W.ATTESTATION * BigInt(e.attestationCount);
|
|
292
291
|
}
|
|
293
292
|
//#endregion
|
|
294
293
|
//#region src/services/publishCost/tokenPrices.ts
|
|
295
|
-
var tn = 6e4,
|
|
294
|
+
var tn = 6e4, G = null, K = null;
|
|
296
295
|
function nn() {
|
|
297
296
|
try {
|
|
298
|
-
return
|
|
297
|
+
return w().getTokenPrices;
|
|
299
298
|
} catch {
|
|
300
299
|
return;
|
|
301
300
|
}
|
|
@@ -316,38 +315,38 @@ async function an() {
|
|
|
316
315
|
}
|
|
317
316
|
async function on(e) {
|
|
318
317
|
let t = Date.now();
|
|
319
|
-
return !e?.forceRefresh &&
|
|
318
|
+
return !e?.forceRefresh && G && t - G.fetchedAt < tn ? G : (K && !e?.forceRefresh || (K = (async () => {
|
|
320
319
|
try {
|
|
321
320
|
let e = nn(), t = e ? await e() : await an(), n = {
|
|
322
321
|
ethUsd: t.ethUsd,
|
|
323
322
|
arUsd: t.arUsd,
|
|
324
323
|
fetchedAt: Date.now()
|
|
325
324
|
};
|
|
326
|
-
return
|
|
325
|
+
return G = n, n;
|
|
327
326
|
} catch (e) {
|
|
328
|
-
if (
|
|
327
|
+
if (G) return G;
|
|
329
328
|
throw e;
|
|
330
329
|
} finally {
|
|
331
|
-
|
|
330
|
+
K = null;
|
|
332
331
|
}
|
|
333
|
-
})()),
|
|
332
|
+
})()), K);
|
|
334
333
|
}
|
|
335
334
|
function sn() {
|
|
336
|
-
|
|
335
|
+
G = null, K = null;
|
|
337
336
|
}
|
|
338
337
|
//#endregion
|
|
339
338
|
//#region src/services/publishCost/marketRates.ts
|
|
340
|
-
var cn = 6e4, ln = 1e6,
|
|
339
|
+
var cn = 6e4, ln = 1e6, q = null, J = null;
|
|
341
340
|
async function un() {
|
|
342
|
-
return
|
|
341
|
+
return ye().getGasPrice();
|
|
343
342
|
}
|
|
344
343
|
async function dn() {
|
|
345
|
-
let e = BigInt(await
|
|
344
|
+
let e = BigInt(await Ee().transactions.getPrice(ln));
|
|
346
345
|
return Number(e) / ln;
|
|
347
346
|
}
|
|
348
347
|
async function fn(e) {
|
|
349
348
|
let t = Date.now();
|
|
350
|
-
return !e?.forceRefresh &&
|
|
349
|
+
return !e?.forceRefresh && q && t - q.fetchedAt < cn ? q : (J && !e?.forceRefresh || (J = (async () => {
|
|
351
350
|
try {
|
|
352
351
|
let [t, n, r] = await Promise.all([
|
|
353
352
|
on({ forceRefresh: e?.forceRefresh }),
|
|
@@ -359,24 +358,24 @@ async function fn(e) {
|
|
|
359
358
|
winstonPerByte: r,
|
|
360
359
|
fetchedAt: Date.now()
|
|
361
360
|
};
|
|
362
|
-
return
|
|
361
|
+
return q = i, i;
|
|
363
362
|
} catch (e) {
|
|
364
|
-
if (
|
|
363
|
+
if (q) return q;
|
|
365
364
|
throw e;
|
|
366
365
|
} finally {
|
|
367
|
-
|
|
366
|
+
J = null;
|
|
368
367
|
}
|
|
369
|
-
})()),
|
|
368
|
+
})()), J);
|
|
370
369
|
}
|
|
371
370
|
function pn() {
|
|
372
|
-
|
|
371
|
+
q = null, J = null, sn();
|
|
373
372
|
}
|
|
374
373
|
//#endregion
|
|
375
374
|
//#region src/services/publishCost/estimatePublishCost.ts
|
|
376
375
|
var mn = 0xe8d4a51000, hn = 0xde0b6b3a7640000;
|
|
377
376
|
function gn() {
|
|
378
377
|
try {
|
|
379
|
-
let e =
|
|
378
|
+
let e = w();
|
|
380
379
|
return {
|
|
381
380
|
evmUserPays: !e.paymasterUrl,
|
|
382
381
|
arweavePath: e.useArweaveBundler ? "bundler" : "l1"
|
|
@@ -549,11 +548,11 @@ function kn(e) {
|
|
|
549
548
|
return !e || e.status !== "done" ? !1 : e.value === S.SUCCESS || e.value === S.FAILURE;
|
|
550
549
|
}
|
|
551
550
|
function An(e) {
|
|
552
|
-
let t =
|
|
551
|
+
let t = Re.getService(), n = Ut(t, (t) => t?.context?.publishProcesses?.get(e) ?? null), r = At(null);
|
|
553
552
|
N(() => {
|
|
554
553
|
r.current = null;
|
|
555
554
|
}, [e]);
|
|
556
|
-
let [i, a] = F(void 0), [o, s] = F(null), c =
|
|
555
|
+
let [i, a] = F(void 0), [o, s] = F(null), c = T.getAppDb(), l = P(() => e && c ? c.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)).limit(1) : null, [c, e]), u = L(l)?.[0], d = u?.status, f = P(() => {
|
|
557
556
|
if (n != null) return i;
|
|
558
557
|
if (o === "success" || o === "failure") return o;
|
|
559
558
|
let e = On(u);
|
|
@@ -605,13 +604,13 @@ function jn(e) {
|
|
|
605
604
|
n(!1);
|
|
606
605
|
return;
|
|
607
606
|
}
|
|
608
|
-
|
|
607
|
+
$e(e).then(n).catch(() => n(!1));
|
|
609
608
|
}, [e?.seedLocalId]), t;
|
|
610
609
|
}
|
|
611
610
|
//#endregion
|
|
612
611
|
//#region src/hooks/useArweaveL1Finalize.ts
|
|
613
612
|
function Mn(e) {
|
|
614
|
-
let t =
|
|
613
|
+
let t = T.getAppDb(), n = P(() => e && t ? t.select().from(E).where(V(E.seedLocalId, e)).orderBy(B(E.updatedAt)) : null, [t, e]), r = L(n) ?? [];
|
|
615
614
|
return P(() => {
|
|
616
615
|
let e = r.filter((e) => e.phase === "pending_l1").length, t = r.filter((e) => e.phase === "confirmed").length;
|
|
617
616
|
return {
|
|
@@ -625,7 +624,7 @@ function Mn(e) {
|
|
|
625
624
|
//#endregion
|
|
626
625
|
//#region src/hooks/useItemPublishStatus.ts
|
|
627
626
|
function Nn(e) {
|
|
628
|
-
let { publishProcess: t, value: n } = An(e ?? ""), r = Mn(e), i =
|
|
627
|
+
let { publishProcess: t, value: n } = An(e ?? ""), r = Mn(e), i = T.getAppDb(), a = P(() => e && i ? i.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)).limit(1) : null, [i, e]), o = L(a)?.[0];
|
|
629
628
|
return {
|
|
630
629
|
latestRecord: o,
|
|
631
630
|
publishProcess: t,
|
|
@@ -639,12 +638,12 @@ function Nn(e) {
|
|
|
639
638
|
//#endregion
|
|
640
639
|
//#region src/hooks/usePublishProcesses.ts
|
|
641
640
|
function Pn() {
|
|
642
|
-
let e =
|
|
643
|
-
return P(() => e ? e.select().from(
|
|
641
|
+
let e = T.getAppDb();
|
|
642
|
+
return P(() => e ? e.select().from(D).orderBy(B(D.startedAt)) : null, [e]);
|
|
644
643
|
}
|
|
645
644
|
function Fn(e) {
|
|
646
|
-
let t =
|
|
647
|
-
return P(() => t && e ? t.select().from(
|
|
645
|
+
let t = T.getAppDb();
|
|
646
|
+
return P(() => t && e ? t.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)) : null, [t, e]);
|
|
648
647
|
}
|
|
649
648
|
function In() {
|
|
650
649
|
let e = Pn(), t = L(e);
|
|
@@ -675,7 +674,7 @@ function Vn(e) {
|
|
|
675
674
|
return Bn(e).nonActiveCount;
|
|
676
675
|
}
|
|
677
676
|
function Hn(e) {
|
|
678
|
-
let t =
|
|
677
|
+
let t = T.getAppDb(), n = P(() => e != null && t ? t.select().from(D).where(V(D.id, e)).limit(1) : null, [t, e]), r = L(n), i = r === void 0;
|
|
679
678
|
return {
|
|
680
679
|
record: r && r.length > 0 ? r[0] : null,
|
|
681
680
|
isLoading: i
|
|
@@ -684,33 +683,33 @@ function Hn(e) {
|
|
|
684
683
|
//#endregion
|
|
685
684
|
//#region src/hooks/clearCompletedPublishProcesses.ts
|
|
686
685
|
async function Un() {
|
|
687
|
-
let e =
|
|
688
|
-
e && await e.delete(
|
|
686
|
+
let e = T.getAppDb();
|
|
687
|
+
e && await e.delete(D).where(Ht(D.status, ["in_progress"]));
|
|
689
688
|
}
|
|
690
689
|
async function Wn(e) {
|
|
691
|
-
let t =
|
|
692
|
-
t && await t.delete(
|
|
690
|
+
let t = T.getAppDb();
|
|
691
|
+
t && await t.delete(D).where(Bt(V(D.seedLocalId, e), Ht(D.status, ["in_progress"])));
|
|
693
692
|
}
|
|
694
693
|
async function Gn() {
|
|
695
|
-
let e =
|
|
696
|
-
e && await e.delete(
|
|
694
|
+
let e = T.getAppDb();
|
|
695
|
+
e && await e.delete(D);
|
|
697
696
|
}
|
|
698
697
|
async function Kn() {
|
|
699
|
-
let e =
|
|
700
|
-
e && await e.delete(
|
|
698
|
+
let e = T.getAppDb();
|
|
699
|
+
e && await e.delete(et);
|
|
701
700
|
}
|
|
702
701
|
async function qn(e) {
|
|
703
|
-
let t =
|
|
704
|
-
t && await t.delete(
|
|
702
|
+
let t = T.getAppDb();
|
|
703
|
+
t && await t.delete(D).where(V(D.seedLocalId, e));
|
|
705
704
|
}
|
|
706
705
|
async function Jn(e) {
|
|
707
|
-
let t =
|
|
708
|
-
t && await t.delete(
|
|
706
|
+
let t = T.getAppDb();
|
|
707
|
+
t && await t.delete(D).where(V(D.id, e));
|
|
709
708
|
}
|
|
710
709
|
async function Yn(e) {
|
|
711
710
|
if (e.length === 0) return;
|
|
712
|
-
let t =
|
|
713
|
-
t && await t.delete(
|
|
711
|
+
let t = T.getAppDb();
|
|
712
|
+
t && await t.delete(D).where(Vt(D.id, e));
|
|
714
713
|
}
|
|
715
714
|
//#endregion
|
|
716
715
|
//#region src/hooks/publishProcessHelpers.ts
|
|
@@ -731,7 +730,7 @@ function Zn(e) {
|
|
|
731
730
|
//#endregion
|
|
732
731
|
//#region src/hooks/usePublishCostEstimate.ts
|
|
733
732
|
function Qn(e, t) {
|
|
734
|
-
let [n, r] = F(null), [i, a] = F(!1), [o, s] = F(!1), [c, l] = F(null), u =
|
|
733
|
+
let [n, r] = F(null), [i, a] = F(!1), [o, s] = F(!1), [c, l] = F(null), u = At(() => {}), d = t?.publishMode, f = t?.priceRefreshMs, p = t?.itemIdleMs;
|
|
735
734
|
return N(() => {
|
|
736
735
|
if (!e) {
|
|
737
736
|
r(null), a(!1), s(!1), l(null), u.current = () => {};
|
|
@@ -754,7 +753,7 @@ function Qn(e, t) {
|
|
|
754
753
|
isEstimating: i,
|
|
755
754
|
isStale: o,
|
|
756
755
|
error: c,
|
|
757
|
-
refresh:
|
|
756
|
+
refresh: kt(() => {
|
|
758
757
|
u.current();
|
|
759
758
|
}, [])
|
|
760
759
|
};
|
|
@@ -763,24 +762,24 @@ function Qn(e, t) {
|
|
|
763
762
|
//#region src/helpers/ensureWalletThenPublish.ts
|
|
764
763
|
function $n(e) {
|
|
765
764
|
if (e) {
|
|
766
|
-
if (e instanceof
|
|
767
|
-
if (
|
|
768
|
-
if (
|
|
765
|
+
if (e instanceof at.Wallet) return e;
|
|
766
|
+
if (i(e)) return e.signer;
|
|
767
|
+
if (d(e)) return e;
|
|
769
768
|
}
|
|
770
769
|
}
|
|
771
770
|
async function er(e, t) {
|
|
772
|
-
let n =
|
|
771
|
+
let n = w();
|
|
773
772
|
if (n.useModularExecutor) {
|
|
774
|
-
let { ensureSmartWalletThenPublish: n } = await import("./ensureSmartWalletThenPublish-
|
|
773
|
+
let { ensureSmartWalletThenPublish: n } = await import("./ensureSmartWalletThenPublish-BfEndtFo.js").then((e) => e.n);
|
|
775
774
|
return n(e, null, async () => {
|
|
776
|
-
let e =
|
|
775
|
+
let e = x();
|
|
777
776
|
return e?.publisherAddress ?? e?.signer.address ?? null;
|
|
778
777
|
}, t);
|
|
779
778
|
}
|
|
780
|
-
let r =
|
|
779
|
+
let r = x();
|
|
781
780
|
if (!r) return { outcome: "no_wallet" };
|
|
782
781
|
if (n.accountMode === "eip7702" && n.bundlerUrl) {
|
|
783
|
-
let e = await
|
|
782
|
+
let e = await U({
|
|
784
783
|
signer: r.signer,
|
|
785
784
|
bundlerUrl: n.bundlerUrl,
|
|
786
785
|
paymasterUrl: n.paymasterUrl
|
|
@@ -792,20 +791,20 @@ async function er(e, t) {
|
|
|
792
791
|
};
|
|
793
792
|
}
|
|
794
793
|
let i = r.publisherAddress ?? r.txSender.address ?? r.signer.address;
|
|
795
|
-
return i?.trim() ? (
|
|
794
|
+
return i?.trim() ? (Re.createPublish(e, i, r, {
|
|
796
795
|
...t,
|
|
797
796
|
dataItemSigner: $n(t?.dataItemSigner) ?? r.signer
|
|
798
797
|
}), { outcome: "started" }) : { outcome: "no_address" };
|
|
799
798
|
}
|
|
800
799
|
//#endregion
|
|
801
800
|
//#region src/services/domainOwnership/registry.ts
|
|
802
|
-
function
|
|
803
|
-
let t =
|
|
801
|
+
function Y(e) {
|
|
802
|
+
let t = Gt(e);
|
|
804
803
|
if (!t) throw Error(`@seedprotocol/publish: unable to resolve registrable domain for "${e}"`);
|
|
805
804
|
return t.toLowerCase();
|
|
806
805
|
}
|
|
807
|
-
async function
|
|
808
|
-
let t =
|
|
806
|
+
async function tr(e) {
|
|
807
|
+
let t = Y(e), n = await Wt(t);
|
|
809
808
|
if (!n.ok || !n.record) return null;
|
|
810
809
|
let r = n.record;
|
|
811
810
|
return {
|
|
@@ -819,8 +818,8 @@ async function J(e) {
|
|
|
819
818
|
isRegistered: r.isRegistered
|
|
820
819
|
};
|
|
821
820
|
}
|
|
822
|
-
function
|
|
823
|
-
return
|
|
821
|
+
function nr(e) {
|
|
822
|
+
return Tt({
|
|
824
823
|
domain: e.domain,
|
|
825
824
|
creationDate: e.creationDate ?? "",
|
|
826
825
|
registrarIanaId: e.registrarIanaId ?? ""
|
|
@@ -828,36 +827,36 @@ function tr(e) {
|
|
|
828
827
|
}
|
|
829
828
|
//#endregion
|
|
830
829
|
//#region src/services/domainOwnership/challenge.ts
|
|
831
|
-
function
|
|
830
|
+
function rr(e) {
|
|
832
831
|
let t = new Uint8Array(e);
|
|
833
832
|
return crypto.getRandomValues(t), t;
|
|
834
833
|
}
|
|
835
|
-
function
|
|
834
|
+
function ir(e) {
|
|
836
835
|
let t = "";
|
|
837
836
|
for (let n of e) t += String.fromCharCode(n);
|
|
838
837
|
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
|
839
838
|
}
|
|
840
|
-
function
|
|
841
|
-
let t = e.normalizeRegistrable === !1 ? e.domain.trim().toLowerCase().replace(/\.$/, "") :
|
|
839
|
+
function ar(e) {
|
|
840
|
+
let t = e.normalizeRegistrable === !1 ? e.domain.trim().toLowerCase().replace(/\.$/, "") : Y(e.domain);
|
|
842
841
|
if (!t || t.includes(" ")) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a valid domain");
|
|
843
842
|
let n = e.claimer.trim();
|
|
844
843
|
if (!/^0x[0-9a-fA-F]{40}$/.test(n)) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a 20-byte hex claimer address");
|
|
845
|
-
let r = e.scope ??
|
|
844
|
+
let r = e.scope ?? pt, i = e.ttlMs ?? ot, a = e.now ?? Date.now(), o = new Date(a + i).toISOString(), s = ir(rr(32)), c = wt({
|
|
846
845
|
domain: t,
|
|
847
846
|
claimer: n,
|
|
848
847
|
token: s,
|
|
849
848
|
scope: r
|
|
850
|
-
}), l =
|
|
849
|
+
}), l = xt(t), u = yt({
|
|
851
850
|
token: s,
|
|
852
851
|
claimer: n,
|
|
853
852
|
expiry: o
|
|
854
853
|
});
|
|
855
854
|
return {
|
|
856
|
-
challengeId: rr(
|
|
855
|
+
challengeId: ir(rr(16)),
|
|
857
856
|
domain: t,
|
|
858
857
|
claimer: n,
|
|
859
858
|
scope: r,
|
|
860
|
-
method:
|
|
859
|
+
method: lt,
|
|
861
860
|
token: s,
|
|
862
861
|
txtName: l,
|
|
863
862
|
txtValue: u,
|
|
@@ -868,14 +867,14 @@ function ir(e) {
|
|
|
868
867
|
}
|
|
869
868
|
//#endregion
|
|
870
869
|
//#region src/services/domainOwnership/dnsVerify.ts
|
|
871
|
-
async function
|
|
870
|
+
async function or(e) {
|
|
872
871
|
let { promises: t } = await import("node:dns");
|
|
873
872
|
return {
|
|
874
873
|
source: "node:dns",
|
|
875
874
|
values: (await t.resolveTxt(e)).map((e) => e.join(""))
|
|
876
875
|
};
|
|
877
876
|
}
|
|
878
|
-
async function
|
|
877
|
+
async function sr(e, t, n) {
|
|
879
878
|
let r = `${n}?name=${encodeURIComponent(e)}&type=TXT`, i = await fetch(r, { headers: { accept: "application/dns-json" } });
|
|
880
879
|
if (!i.ok) throw Error(`DoH ${t} HTTP ${i.status}`);
|
|
881
880
|
let a = await i.json();
|
|
@@ -885,20 +884,20 @@ async function or(e, t, n) {
|
|
|
885
884
|
dnssecAuthenticated: !!a.AD
|
|
886
885
|
};
|
|
887
886
|
}
|
|
888
|
-
function
|
|
889
|
-
let e = [(e) =>
|
|
890
|
-
return typeof document > "u" && e.unshift((e) =>
|
|
887
|
+
function cr() {
|
|
888
|
+
let e = [(e) => sr(e, "cloudflare-doh", "https://cloudflare-dns.com/dns-query"), (e) => sr(e, "google-doh", "https://dns.google/resolve")];
|
|
889
|
+
return typeof document > "u" && e.unshift((e) => or(e)), e;
|
|
891
890
|
}
|
|
892
|
-
function
|
|
893
|
-
let n =
|
|
891
|
+
function lr(e, t) {
|
|
892
|
+
let n = Ot(t);
|
|
894
893
|
for (let r of e) {
|
|
895
894
|
if (r === t || r.replace(/^"|"$/g, "") === t) return !0;
|
|
896
|
-
let e =
|
|
895
|
+
let e = Ot(r);
|
|
897
896
|
if (n && e && e.token === n.token && e.claimer === n.claimer) return !0;
|
|
898
897
|
}
|
|
899
898
|
return !1;
|
|
900
899
|
}
|
|
901
|
-
async function
|
|
900
|
+
async function ur(e, t) {
|
|
902
901
|
let n = t?.now ?? Date.now();
|
|
903
902
|
if (Date.parse(e.expiresAt) <= n) return {
|
|
904
903
|
ok: !1,
|
|
@@ -906,7 +905,7 @@ async function lr(e, t) {
|
|
|
906
905
|
lookups: [],
|
|
907
906
|
error: "Challenge expired"
|
|
908
907
|
};
|
|
909
|
-
let r =
|
|
908
|
+
let r = yt({
|
|
910
909
|
token: e.token,
|
|
911
910
|
claimer: e.claimer,
|
|
912
911
|
expiry: e.expiresAt
|
|
@@ -917,11 +916,11 @@ async function lr(e, t) {
|
|
|
917
916
|
lookups: [],
|
|
918
917
|
error: "Challenge txtValue does not match token/claimer/expiry"
|
|
919
918
|
};
|
|
920
|
-
let i = t?.lookups ??
|
|
919
|
+
let i = t?.lookups ?? cr(), a = t?.quorum ?? 2, o = [], s = [], c = !1;
|
|
921
920
|
await Promise.all(i.map(async (t) => {
|
|
922
921
|
try {
|
|
923
922
|
let n = await t(e.txtName);
|
|
924
|
-
o.push(n),
|
|
923
|
+
o.push(n), lr(n.values, r) && (s.push(n.source), n.dnssecAuthenticated && (c = !0));
|
|
925
924
|
} catch {
|
|
926
925
|
o.push({
|
|
927
926
|
source: "error",
|
|
@@ -939,32 +938,32 @@ async function lr(e, t) {
|
|
|
939
938
|
}
|
|
940
939
|
//#endregion
|
|
941
940
|
//#region src/services/domainOwnership/index.ts
|
|
942
|
-
var
|
|
943
|
-
function
|
|
944
|
-
if (
|
|
945
|
-
if (
|
|
941
|
+
var dr = "0x0000000000000000000000000000000000000000", fr = !0;
|
|
942
|
+
function pr(e) {
|
|
943
|
+
if (i(e)) return e.txSender;
|
|
944
|
+
if (C(e)) return e;
|
|
946
945
|
throw Error("@seedprotocol/publish: domain ownership write APIs require a PublishWallet or SeedTxSender");
|
|
947
946
|
}
|
|
948
|
-
async function
|
|
947
|
+
async function X(e, t) {
|
|
949
948
|
let n = await e.sendTransaction(t);
|
|
950
|
-
return
|
|
951
|
-
}
|
|
952
|
-
function
|
|
953
|
-
return
|
|
954
|
-
}
|
|
955
|
-
async function
|
|
956
|
-
let t =
|
|
957
|
-
return await Me(n) || (await
|
|
958
|
-
schema:
|
|
959
|
-
resolverAddress:
|
|
960
|
-
revocable:
|
|
961
|
-
})), await
|
|
949
|
+
return b(n.transactionHash);
|
|
950
|
+
}
|
|
951
|
+
function Z() {
|
|
952
|
+
return zt.getSchemaUID(k, dr, fr);
|
|
953
|
+
}
|
|
954
|
+
async function mr(e) {
|
|
955
|
+
let t = pr(e), n = Z();
|
|
956
|
+
return await Me(n) || (await X(t, ke({
|
|
957
|
+
schema: k,
|
|
958
|
+
resolverAddress: dr,
|
|
959
|
+
revocable: fr
|
|
960
|
+
})), await X(t, Ae({
|
|
962
961
|
schemaUid: n,
|
|
963
|
-
schemaName:
|
|
962
|
+
schemaName: ft
|
|
964
963
|
}))), n;
|
|
965
964
|
}
|
|
966
|
-
function
|
|
967
|
-
return new
|
|
965
|
+
function hr(e) {
|
|
966
|
+
return new Rt(k).encodeData([
|
|
968
967
|
{
|
|
969
968
|
name: "domain",
|
|
970
969
|
value: e.domain,
|
|
@@ -982,7 +981,7 @@ function mr(e) {
|
|
|
982
981
|
},
|
|
983
982
|
{
|
|
984
983
|
name: "challengeHash",
|
|
985
|
-
value:
|
|
984
|
+
value: M(e.challengeHash),
|
|
986
985
|
type: "bytes32"
|
|
987
986
|
},
|
|
988
987
|
{
|
|
@@ -1002,7 +1001,7 @@ function mr(e) {
|
|
|
1002
1001
|
},
|
|
1003
1002
|
{
|
|
1004
1003
|
name: "registryFingerprint",
|
|
1005
|
-
value:
|
|
1004
|
+
value: M(e.registryFingerprint),
|
|
1006
1005
|
type: "bytes32"
|
|
1007
1006
|
},
|
|
1008
1007
|
{
|
|
@@ -1012,38 +1011,38 @@ function mr(e) {
|
|
|
1012
1011
|
}
|
|
1013
1012
|
]);
|
|
1014
1013
|
}
|
|
1015
|
-
function
|
|
1014
|
+
function gr(e) {
|
|
1016
1015
|
if (typeof e.override == "number" && e.override > 0) return e.override;
|
|
1017
1016
|
if (e.registryExpirationDate) {
|
|
1018
1017
|
let t = Date.parse(e.registryExpirationDate);
|
|
1019
1018
|
if (Number.isFinite(t) && t > 0) return Math.floor(t / 1e3);
|
|
1020
1019
|
}
|
|
1021
|
-
return e.verifiedAt +
|
|
1020
|
+
return e.verifiedAt + st;
|
|
1022
1021
|
}
|
|
1023
|
-
async function
|
|
1024
|
-
let t =
|
|
1022
|
+
async function _r(e) {
|
|
1023
|
+
let t = pr(e.wallet), n = e.ensureSchema === !1 ? Z() : await mr(e.wallet), r = Y(e.domain), i = e.claimer.trim();
|
|
1025
1024
|
if (!/^0x[0-9a-fA-F]{40}$/.test(i)) throw Error("@seedprotocol/publish: attestDomainOwnership requires a valid claimer address");
|
|
1026
|
-
let a =
|
|
1025
|
+
let a = M(e.challengeHash);
|
|
1027
1026
|
if (a === z) throw Error("@seedprotocol/publish: attestDomainOwnership requires a non-zero challengeHash");
|
|
1028
|
-
let o = e.verifiedAt ?? Math.floor(Date.now() / 1e3), c =
|
|
1027
|
+
let o = e.verifiedAt ?? Math.floor(Date.now() / 1e3), c = nr({
|
|
1029
1028
|
domain: r,
|
|
1030
1029
|
creationDate: e.registrySnapshot.creationDate ?? "",
|
|
1031
1030
|
registrarIanaId: e.registrySnapshot.registrarIanaId ?? ""
|
|
1032
|
-
}),
|
|
1031
|
+
}), l = e.registrySnapshot.creationDate ?? "", u = e.registrySnapshot.expirationDate ?? "", d = e.scope ?? pt, f = e.method ?? lt, m = gr({
|
|
1033
1032
|
verifiedAt: o,
|
|
1034
|
-
registryExpirationDate:
|
|
1033
|
+
registryExpirationDate: u,
|
|
1035
1034
|
override: e.expirationTime
|
|
1036
|
-
}), h =
|
|
1035
|
+
}), h = hr({
|
|
1037
1036
|
domain: r,
|
|
1038
1037
|
claimer: i,
|
|
1039
|
-
method:
|
|
1038
|
+
method: f,
|
|
1040
1039
|
challengeHash: a,
|
|
1041
1040
|
verifiedAt: o,
|
|
1042
|
-
registryCreationDate:
|
|
1043
|
-
registryExpirationDate:
|
|
1041
|
+
registryCreationDate: l,
|
|
1042
|
+
registryExpirationDate: u,
|
|
1044
1043
|
registryFingerprint: c,
|
|
1045
|
-
scope:
|
|
1046
|
-
}), g = await
|
|
1044
|
+
scope: d
|
|
1045
|
+
}), g = await X(t, p({
|
|
1047
1046
|
schema: n,
|
|
1048
1047
|
data: {
|
|
1049
1048
|
recipient: i,
|
|
@@ -1055,8 +1054,8 @@ async function gr(e) {
|
|
|
1055
1054
|
}
|
|
1056
1055
|
}));
|
|
1057
1056
|
if (!g) throw Error("@seedprotocol/publish: attestDomainOwnership failed — no receipt");
|
|
1058
|
-
let { easContractAddress: _ } =
|
|
1059
|
-
if (!v || !
|
|
1057
|
+
let { easContractAddress: _ } = w(), v = s(g, _);
|
|
1058
|
+
if (!v || !j(v)) throw Error("@seedprotocol/publish: attestDomainOwnership failed — could not parse attestation UID");
|
|
1060
1059
|
return {
|
|
1061
1060
|
uid: v,
|
|
1062
1061
|
schemaUid: n,
|
|
@@ -1066,22 +1065,22 @@ async function gr(e) {
|
|
|
1066
1065
|
expirationTime: m
|
|
1067
1066
|
};
|
|
1068
1067
|
}
|
|
1069
|
-
async function
|
|
1070
|
-
let t =
|
|
1071
|
-
if (!
|
|
1072
|
-
if (!await
|
|
1073
|
-
schema:
|
|
1074
|
-
data: [{ uid:
|
|
1068
|
+
async function vr(e) {
|
|
1069
|
+
let t = pr(e.wallet), r = e.schemaUid ?? Z(), i = M(e.uid);
|
|
1070
|
+
if (!j(i)) throw Error("@seedprotocol/publish: revokeDomainOwnership requires a valid attestation uid");
|
|
1071
|
+
if (!await X(t, n([{
|
|
1072
|
+
schema: r,
|
|
1073
|
+
data: [{ uid: i }]
|
|
1075
1074
|
}]))) throw Error("@seedprotocol/publish: revokeDomainOwnership failed — no receipt");
|
|
1076
1075
|
}
|
|
1077
|
-
async function
|
|
1078
|
-
let { challenge: t } = e, n =
|
|
1076
|
+
async function yr(e) {
|
|
1077
|
+
let { challenge: t } = e, n = wt({
|
|
1079
1078
|
domain: t.domain,
|
|
1080
1079
|
claimer: t.claimer,
|
|
1081
1080
|
token: t.token,
|
|
1082
1081
|
scope: t.scope
|
|
1083
1082
|
});
|
|
1084
|
-
if (
|
|
1083
|
+
if (M(n) !== M(t.challengeHash)) return {
|
|
1085
1084
|
ok: !1,
|
|
1086
1085
|
dns: {
|
|
1087
1086
|
ok: !1,
|
|
@@ -1093,7 +1092,7 @@ async function vr(e) {
|
|
|
1093
1092
|
challengeHash: n,
|
|
1094
1093
|
error: "Challenge hash does not match domain/claimer/token/scope"
|
|
1095
1094
|
};
|
|
1096
|
-
let r = await
|
|
1095
|
+
let r = await ur(t, {
|
|
1097
1096
|
lookups: e.dnsLookups,
|
|
1098
1097
|
now: e.now
|
|
1099
1098
|
});
|
|
@@ -1104,7 +1103,7 @@ async function vr(e) {
|
|
|
1104
1103
|
challengeHash: n,
|
|
1105
1104
|
error: r.error ?? "DNS verification failed"
|
|
1106
1105
|
};
|
|
1107
|
-
let i = e.registryLookup ??
|
|
1106
|
+
let i = e.registryLookup ?? tr, a;
|
|
1108
1107
|
try {
|
|
1109
1108
|
a = await i(t.domain);
|
|
1110
1109
|
} catch {
|
|
@@ -1123,8 +1122,8 @@ async function vr(e) {
|
|
|
1123
1122
|
error: "Registry lookup failed"
|
|
1124
1123
|
};
|
|
1125
1124
|
}
|
|
1126
|
-
async function
|
|
1127
|
-
let t = await
|
|
1125
|
+
async function br(e) {
|
|
1126
|
+
let t = await yr({
|
|
1128
1127
|
challenge: e.challenge,
|
|
1129
1128
|
dnsLookups: e.dnsLookups,
|
|
1130
1129
|
registryLookup: e.registryLookup,
|
|
@@ -1132,7 +1131,7 @@ async function yr(e) {
|
|
|
1132
1131
|
});
|
|
1133
1132
|
if (!t.ok || !t.registrySnapshot) throw Error(`@seedprotocol/publish: verifyAndAttestDomainOwnership failed — ${t.error ?? "verification failed"}`);
|
|
1134
1133
|
return {
|
|
1135
|
-
...await
|
|
1134
|
+
...await _r({
|
|
1136
1135
|
wallet: e.wallet,
|
|
1137
1136
|
domain: e.challenge.domain,
|
|
1138
1137
|
claimer: e.challenge.claimer,
|
|
@@ -1146,21 +1145,21 @@ async function yr(e) {
|
|
|
1146
1145
|
dns: t.dns
|
|
1147
1146
|
};
|
|
1148
1147
|
}
|
|
1149
|
-
async function
|
|
1150
|
-
let t = (await
|
|
1148
|
+
async function xr(e) {
|
|
1149
|
+
let t = (await St({
|
|
1151
1150
|
toolAddresses: e.toolAddresses,
|
|
1152
1151
|
schemaUid: e.schemaUid,
|
|
1153
1152
|
excludeRevoked: !0
|
|
1154
|
-
})).find((t) =>
|
|
1153
|
+
})).find((t) => M(t.id) === M(e.uid));
|
|
1155
1154
|
if (!t) throw Error("@seedprotocol/publish: assessDomainOwnershipLive could not find attestation for uid/toolAddresses");
|
|
1156
|
-
let n =
|
|
1155
|
+
let n = bt(t.decodedDataJson ?? "[]"), r = e.registryLookup ?? tr, i;
|
|
1157
1156
|
try {
|
|
1158
1157
|
i = await r(n.domain);
|
|
1159
1158
|
} catch {
|
|
1160
1159
|
i = null;
|
|
1161
1160
|
}
|
|
1162
1161
|
return {
|
|
1163
|
-
...
|
|
1162
|
+
...vt({
|
|
1164
1163
|
decoded: n,
|
|
1165
1164
|
registrySnapshot: i,
|
|
1166
1165
|
now: e.now
|
|
@@ -1172,50 +1171,50 @@ async function br(e) {
|
|
|
1172
1171
|
}
|
|
1173
1172
|
//#endregion
|
|
1174
1173
|
//#region src/services/publishedBy/index.ts
|
|
1175
|
-
var
|
|
1176
|
-
function
|
|
1177
|
-
if (
|
|
1178
|
-
if (
|
|
1174
|
+
var Sr = "0x0000000000000000000000000000000000000000", Cr = !0;
|
|
1175
|
+
function wr(e) {
|
|
1176
|
+
if (i(e)) return e.txSender;
|
|
1177
|
+
if (C(e)) return e;
|
|
1179
1178
|
throw Error("@seedprotocol/publish: attestPublishedBy / revokePublishedBy require a PublishWallet or SeedTxSender");
|
|
1180
1179
|
}
|
|
1181
1180
|
async function Q(e, t) {
|
|
1182
1181
|
let n = await e.sendTransaction(t);
|
|
1183
|
-
return
|
|
1182
|
+
return b(n.transactionHash);
|
|
1184
1183
|
}
|
|
1185
1184
|
function $() {
|
|
1186
|
-
return
|
|
1185
|
+
return zt.getSchemaUID(A, Sr, Cr);
|
|
1187
1186
|
}
|
|
1188
|
-
async function
|
|
1189
|
-
let t =
|
|
1190
|
-
return await Me(n) || (await Q(t,
|
|
1191
|
-
schema:
|
|
1192
|
-
resolverAddress:
|
|
1193
|
-
revocable:
|
|
1194
|
-
})), await Q(t,
|
|
1187
|
+
async function Tr(e) {
|
|
1188
|
+
let t = wr(e), n = $();
|
|
1189
|
+
return await Me(n) || (await Q(t, ke({
|
|
1190
|
+
schema: A,
|
|
1191
|
+
resolverAddress: Sr,
|
|
1192
|
+
revocable: Cr
|
|
1193
|
+
})), await Q(t, Ae({
|
|
1195
1194
|
schemaUid: n,
|
|
1196
|
-
schemaName:
|
|
1195
|
+
schemaName: _t
|
|
1197
1196
|
}))), n;
|
|
1198
1197
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return new
|
|
1198
|
+
function Er(e) {
|
|
1199
|
+
return new Rt(A).encodeData([
|
|
1201
1200
|
{
|
|
1202
1201
|
name: "seedUid",
|
|
1203
|
-
value:
|
|
1202
|
+
value: M(e.seedUid),
|
|
1204
1203
|
type: "bytes32"
|
|
1205
1204
|
},
|
|
1206
1205
|
{
|
|
1207
1206
|
name: "versionUid",
|
|
1208
|
-
value:
|
|
1207
|
+
value: M(e.versionUid || z),
|
|
1209
1208
|
type: "bytes32"
|
|
1210
1209
|
},
|
|
1211
1210
|
{
|
|
1212
1211
|
name: "attestationUids",
|
|
1213
|
-
value: e.attestationUids.map((e) =>
|
|
1212
|
+
value: e.attestationUids.map((e) => M(e)),
|
|
1214
1213
|
type: "bytes32[]"
|
|
1215
1214
|
},
|
|
1216
1215
|
{
|
|
1217
1216
|
name: "batchHash",
|
|
1218
|
-
value:
|
|
1217
|
+
value: M(e.batchHash),
|
|
1219
1218
|
type: "bytes32"
|
|
1220
1219
|
},
|
|
1221
1220
|
{
|
|
@@ -1230,27 +1229,27 @@ function wr(e) {
|
|
|
1230
1229
|
}
|
|
1231
1230
|
]);
|
|
1232
1231
|
}
|
|
1233
|
-
async function
|
|
1234
|
-
let t =
|
|
1235
|
-
if (e.mode === "uids") r = e.attestationUids.map((e) =>
|
|
1232
|
+
async function Dr(e) {
|
|
1233
|
+
let t = wr(e.wallet), n = e.ensureSchema === !1 ? $() : await Tr(e.wallet), r = [], i;
|
|
1234
|
+
if (e.mode === "uids") r = e.attestationUids.map((e) => M(e)).filter((e) => j(e)), i = e.batchHash ? M(e.batchHash) : Dt(r);
|
|
1236
1235
|
else {
|
|
1237
1236
|
if (!e.batchHash) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires batchHash");
|
|
1238
|
-
if (i =
|
|
1237
|
+
if (i = M(e.batchHash), i === z) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires a non-zero batchHash");
|
|
1239
1238
|
}
|
|
1240
|
-
let a =
|
|
1241
|
-
if (!
|
|
1242
|
-
let o =
|
|
1239
|
+
let a = M(e.seedUid);
|
|
1240
|
+
if (!j(a)) throw Error("@seedprotocol/publish: attestPublishedBy requires a valid seedUid");
|
|
1241
|
+
let o = Er({
|
|
1243
1242
|
seedUid: a,
|
|
1244
|
-
versionUid:
|
|
1243
|
+
versionUid: M(e.versionUid ?? z),
|
|
1245
1244
|
attestationUids: r,
|
|
1246
1245
|
batchHash: i,
|
|
1247
1246
|
toolName: e.toolName,
|
|
1248
1247
|
toolVersion: e.toolVersion
|
|
1249
|
-
}), c = await Q(t,
|
|
1248
|
+
}), c = await Q(t, p({
|
|
1250
1249
|
schema: n,
|
|
1251
1250
|
data: {
|
|
1252
|
-
recipient:
|
|
1253
|
-
expirationTime: BigInt(
|
|
1251
|
+
recipient: u,
|
|
1252
|
+
expirationTime: BigInt(Lt),
|
|
1254
1253
|
revocable: !0,
|
|
1255
1254
|
refUID: a,
|
|
1256
1255
|
data: o,
|
|
@@ -1258,8 +1257,8 @@ async function Tr(e) {
|
|
|
1258
1257
|
}
|
|
1259
1258
|
}));
|
|
1260
1259
|
if (!c) throw Error("@seedprotocol/publish: attestPublishedBy failed — no receipt");
|
|
1261
|
-
let { easContractAddress:
|
|
1262
|
-
if (!d || !
|
|
1260
|
+
let { easContractAddress: l } = w(), d = s(c, l);
|
|
1261
|
+
if (!d || !j(d)) throw Error("@seedprotocol/publish: attestPublishedBy failed — could not parse attestation UID");
|
|
1263
1262
|
return {
|
|
1264
1263
|
uid: d,
|
|
1265
1264
|
schemaUid: n,
|
|
@@ -1267,15 +1266,15 @@ async function Tr(e) {
|
|
|
1267
1266
|
attestationUids: r
|
|
1268
1267
|
};
|
|
1269
1268
|
}
|
|
1270
|
-
async function
|
|
1271
|
-
let t =
|
|
1272
|
-
if (!
|
|
1273
|
-
if (!await Q(t,
|
|
1274
|
-
schema:
|
|
1275
|
-
data: [{ uid:
|
|
1269
|
+
async function Or(e) {
|
|
1270
|
+
let t = wr(e.wallet), r = e.schemaUid ?? $(), i = M(e.uid);
|
|
1271
|
+
if (!j(i)) throw Error("@seedprotocol/publish: revokePublishedBy requires a valid attestation uid");
|
|
1272
|
+
if (!await Q(t, n([{
|
|
1273
|
+
schema: r,
|
|
1274
|
+
data: [{ uid: i }]
|
|
1276
1275
|
}]))) throw Error("@seedprotocol/publish: revokePublishedBy failed — no receipt");
|
|
1277
1276
|
}
|
|
1278
1277
|
//#endregion
|
|
1279
|
-
export {
|
|
1278
|
+
export { se as AttestationVerificationError, g as DEFAULT_PUBLISH_CHAIN, ct as DOMAIN_OWNERSHIP_METHOD, ut as DOMAIN_OWNERSHIP_SCHEMA_DEF, dt as DOMAIN_OWNERSHIP_SCHEMA_NAME, mt as EAS_CHAIN_DEPLOYMENTS, he as Eip7702ModularAccountPublishError, f as MANAGED_ACCOUNT_FACTORY_ADDRESSES, de as MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA, pe as ManagedAccountPublishError, ht as PUBLISHED_BY_SCHEMA_DEF, gt as PUBLISHED_BY_SCHEMA_NAME, qe as PUBLISH_AUTHORIZATION_SCHEMA_DEF, Ve as PUBLISH_AUTHORIZATION_SCHEMA_NAME, Ge as PUBLISH_AUTHORIZATION_SCOPES, W as PUBLISH_GAS_HEURISTICS, ie as PublishChainConfigError, Re as PublishManager, qt as PublishModeButtons, Jt as PublishProvider, le as PublishTransactionRevertedError, l as SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA, Mt as SeedProvider, we as asPublishWallet, m as asSeedSigner, r as asSeedTxSender, De as assertExecutorModuleReadyForAccount, Ne as assertManagedAccountEasMatchesConfig, xr as assessDomainOwnershipLive, ze as assessPublishAuthorizationLive, _r as attestDomainOwnership, Pe as attestPublishAuthorization, Dr as attestPublishedBy, We as buildPublishAnchorBytes, Gn as clearAllPublishProcesses, Kn as clearAllUploadProcesses, Un as clearCompletedPublishProcesses, Wn as clearCompletedPublishProcessesForSeed, t as clearPublishWallet, Ze as collectPublishedBatch, vn as combinePublishCostEstimate, ue as configurePublish, ar as createDomainOwnershipChallenge, U as createPermissionlessTxSender, Jn as deletePublishProcessById, Yn as deletePublishProcessesByIds, qn as deletePublishProcessesForSeed, hr as encodeDomainOwnershipAttestationData, o as encodeEasAttest, _ as encodeEasMultiAttest, v as encodeEasMultiRevoke, ge as encodeMultiPublish, Ue as encodePublishAuthorizationAttestationData, Er as encodePublishedByAttestationData, y as encodeSetEas, mr as ensureDomainOwnershipSchema, je as ensureEasSchemasForItem, Ye as ensureManagedAccountEasConfigured, Ke as ensurePublishAuthorizationSchema, Tr as ensurePublishedBySchema, er as ensureWalletThenPublish, yn as estimatePublishCost, nr as fingerprintFromRegistrySnapshot, H as fromEip1193Provider, a as fromEthersWallet, Yt as fromWindowEthereum, Ee as getArweave, Xn as getArweaveTransactionIds, fn as getCachedMarketRates, on as getCachedTokenPrices, En as getDisplayStepId, Z as getDomainOwnershipSchemaUid, Ct as getEasChainDeployment, Zn as getEasPayload, Fe as getPublishAuthorizationSchemaUid, be as getPublishChainName, w as getPublishConfig, On as getPublishMachineValueForUi, ye as getPublishPublicClient, x as getPublishWallet, $ as getPublishedBySchemaUid, Et as hashPublishedByBatch, en as heuristicPublishGas, ve as initPublish, re as isContractDeployed, ce as isEip7702ModularAccountPublishError, ee as isManagedAccountPublishError, i as isPublishWallet, Se as isRouterNonModularCoreAccountError, d as isSeedSigner, C as isSeedTxSender, tr as lookupDomainRegistry, Y as normalizeRegistrableDomain, Le as publishMachine, e as readFactorySeedExecutor, ae as readGetEas, xe as readIsActiveSigner, ne as requireManagedAccountFactoryAddress, pn as resetMarketRateCache, sn as resetTokenPriceCache, Dn as resolvePublishDisplayValue, fe as resolvePublishEasChain, vr as revokeDomainOwnership, Be as revokePublishAuthorization, Or as revokePublishedBy, Kt as seedTwinConfig, c as setPublishWallet, Xe as simulateCallFromAccount, Te as stringifyUnderlyingCause, Qe as uidsFromAttestationPairs, Mn as useArweaveL1Finalize, jn as useCanPublishItem, Nn as useItemPublishStatus, He as usePublishConfig, Qn as usePublishCostEstimate, An as usePublishProcess, Hn as usePublishProcessById, Ln as usePublishProcesses, zn as usePublishProcessesForSeed, Rn as usePublishProcessesNonActiveCount, Vn as usePublishProcessesNonActiveCountForSeed, In as usePublishProcessesState, Bn as usePublishProcessesStateForSeed, $t as useSeedWallet, br as verifyAndAttestDomainOwnership, Oe as verifyDataItem, yr as verifyDomainOwnershipChallenge, ur as verifyDomainOwnershipDns, oe as verifyPublishChain, b as waitForPublishReceipt, Tn as watchPublishCost };
|
|
1280
1279
|
|
|
1281
1280
|
//# sourceMappingURL=index.js.map
|