@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.
Files changed (312) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/dist/{chainConfig-CA1Hrrjg.js → chainConfig-DWzoOtkS.js} +394 -328
  4. package/dist/chainConfig-DWzoOtkS.js.map +1 -0
  5. package/dist/config.d.ts +5 -4
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/ensureAutomationSessionKey-h3zOmDr5.js +84 -0
  8. package/dist/ensureAutomationSessionKey-h3zOmDr5.js.map +1 -0
  9. package/dist/{ensureModularPublishBootstrap-DGBKVGg5.js → ensureModularPublishBootstrap-BImiIFJe.js} +9 -10
  10. package/dist/{ensureModularPublishBootstrap-5HJDqJJM.js.map → ensureModularPublishBootstrap-BImiIFJe.js.map} +1 -1
  11. package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js → ensureSmartWalletThenPublish-DuOYPJFd.js} +9 -10
  12. package/dist/{ensureSmartWalletThenPublish-Bm58tc-b.js.map → ensureSmartWalletThenPublish-DuOYPJFd.js.map} +1 -1
  13. package/dist/errors.d.ts +9 -0
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/helpers/abi/executor.d.ts +12 -0
  16. package/dist/helpers/abi/executor.d.ts.map +1 -1
  17. package/dist/helpers/abi/factory.d.ts +11 -0
  18. package/dist/helpers/abi/factory.d.ts.map +1 -1
  19. package/dist/helpers/abi/seedExecutorRouter.d.ts +9 -1
  20. package/dist/helpers/abi/seedExecutorRouter.d.ts.map +1 -1
  21. package/dist/helpers/adapters/thirdwebAccount.d.ts.map +1 -1
  22. package/dist/helpers/chainClient.d.ts +18 -2
  23. package/dist/helpers/chainClient.d.ts.map +1 -1
  24. package/dist/helpers/contracts/index.d.ts +9 -0
  25. package/dist/helpers/contracts/index.d.ts.map +1 -1
  26. package/dist/helpers/describeRevert.d.ts +3 -2
  27. package/dist/helpers/describeRevert.d.ts.map +1 -1
  28. package/dist/helpers/enrollPublishAutomation.d.ts +2 -2
  29. package/dist/helpers/enrollPublishAutomation.d.ts.map +1 -1
  30. package/dist/helpers/ensureAutomationSessionKey.d.ts.map +1 -1
  31. package/dist/helpers/ensureExecutorModule.d.ts +28 -5
  32. package/dist/helpers/ensureExecutorModule.d.ts.map +1 -1
  33. package/dist/helpers/executorModuleReadiness.d.ts +15 -1
  34. package/dist/helpers/executorModuleReadiness.d.ts.map +1 -1
  35. package/dist/helpers/gasLog.d.ts +8 -0
  36. package/dist/helpers/gasLog.d.ts.map +1 -0
  37. package/dist/helpers/seedPaymaster.d.ts +27 -0
  38. package/dist/helpers/seedPaymaster.d.ts.map +1 -0
  39. package/dist/helpers/thirdweb.d.ts.map +1 -1
  40. package/dist/index.d.ts +3 -3
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +271 -272
  43. package/dist/index.js.map +1 -1
  44. package/dist/{managedAccountAdmin-B64V1rlU.js → managedAccountAdmin-B4HkLWWE.js} +9 -10
  45. package/dist/{managedAccountAdmin-B64V1rlU.js.map → managedAccountAdmin-B4HkLWWE.js.map} +1 -1
  46. package/dist/{publishAuthorization-CxBkijU6.js → publishAuthorization-DgDI4zor.js} +1104 -1018
  47. package/dist/publishAuthorization-DgDI4zor.js.map +1 -0
  48. package/dist/{publishThirdwebClient-CBD9sKJR.js → publishThirdwebClient-CO18ST7C.js} +2 -2
  49. package/dist/{publishThirdwebClient-CBD9sKJR.js.map → publishThirdwebClient-CO18ST7C.js.map} +1 -1
  50. package/dist/{resolveRevokeAccount-CehU81k6.js → resolveRevokeAccount-DsNod8ti.js} +11 -11
  51. package/dist/{resolveRevokeAccount-B5iXpuRT.js.map → resolveRevokeAccount-DsNod8ti.js.map} +1 -1
  52. package/dist/thirdweb.d.ts +2 -1
  53. package/dist/thirdweb.d.ts.map +1 -1
  54. package/dist/thirdweb.js +147 -148
  55. package/dist/thirdweb.js.map +1 -1
  56. package/dist/{worker-2dUZSapK.js → worker-CN7zg73B.js} +2 -2
  57. package/dist/{worker-2dUZSapK.js.map → worker-CN7zg73B.js.map} +1 -1
  58. package/package.json +6 -6
  59. package/dist/chainConfig-3sSqEVQh.js +0 -1433
  60. package/dist/chainConfig-3sSqEVQh.js.map +0 -1
  61. package/dist/chainConfig-3wlYarAG.js +0 -1433
  62. package/dist/chainConfig-3wlYarAG.js.map +0 -1
  63. package/dist/chainConfig-BRcsMopd.js +0 -1442
  64. package/dist/chainConfig-BRcsMopd.js.map +0 -1
  65. package/dist/chainConfig-BYm5OXpk.js +0 -1433
  66. package/dist/chainConfig-BYm5OXpk.js.map +0 -1
  67. package/dist/chainConfig-CA1Hrrjg.js.map +0 -1
  68. package/dist/chainConfig-CYy0XJ0M.js +0 -1283
  69. package/dist/chainConfig-CYy0XJ0M.js.map +0 -1
  70. package/dist/chainConfig-CfVGYAsY.js +0 -1311
  71. package/dist/chainConfig-CfVGYAsY.js.map +0 -1
  72. package/dist/chainConfig-DDA4YmAB.js +0 -1424
  73. package/dist/chainConfig-DDA4YmAB.js.map +0 -1
  74. package/dist/config-BA9la8B6.js +0 -941
  75. package/dist/config-BA9la8B6.js.map +0 -1
  76. package/dist/config-BqguD2Tt.js +0 -806
  77. package/dist/config-BqguD2Tt.js.map +0 -1
  78. package/dist/config-CPBd5C_b.js +0 -1201
  79. package/dist/config-CPBd5C_b.js.map +0 -1
  80. package/dist/config-DkIapO94.js +0 -955
  81. package/dist/config-DkIapO94.js.map +0 -1
  82. package/dist/config-EQZZNH9H.js +0 -955
  83. package/dist/config-EQZZNH9H.js.map +0 -1
  84. package/dist/config-qjpaJcBA.js +0 -947
  85. package/dist/config-qjpaJcBA.js.map +0 -1
  86. package/dist/deploy-BJYwLfz-.js +0 -15
  87. package/dist/deploy-BJYwLfz-.js.map +0 -1
  88. package/dist/enrollPublishAutomation-DYQMoylY.js +0 -3422
  89. package/dist/enrollPublishAutomation-DYQMoylY.js.map +0 -1
  90. package/dist/ensureAutomationSessionKey-BMHLKfjj.js +0 -85
  91. package/dist/ensureAutomationSessionKey-BMHLKfjj.js.map +0 -1
  92. package/dist/ensureAutomationSessionKey-BZ9_3FMW.js +0 -86
  93. package/dist/ensureAutomationSessionKey-BZ9_3FMW.js.map +0 -1
  94. package/dist/ensureAutomationSessionKey-Bq0PaTYE.js +0 -84
  95. package/dist/ensureAutomationSessionKey-Bq0PaTYE.js.map +0 -1
  96. package/dist/ensureAutomationSessionKey-Bw74ZSGI.js +0 -85
  97. package/dist/ensureAutomationSessionKey-Bw74ZSGI.js.map +0 -1
  98. package/dist/ensureAutomationSessionKey-C8D7BFjU.js +0 -85
  99. package/dist/ensureAutomationSessionKey-C8D7BFjU.js.map +0 -1
  100. package/dist/ensureAutomationSessionKey-CClLVX2w.js +0 -85
  101. package/dist/ensureAutomationSessionKey-CClLVX2w.js.map +0 -1
  102. package/dist/ensureAutomationSessionKey-CNNN1jBQ.js +0 -85
  103. package/dist/ensureAutomationSessionKey-CNNN1jBQ.js.map +0 -1
  104. package/dist/ensureAutomationSessionKey-CeUbjcCl.js +0 -85
  105. package/dist/ensureAutomationSessionKey-CeUbjcCl.js.map +0 -1
  106. package/dist/ensureAutomationSessionKey-D8Gki6U6.js +0 -85
  107. package/dist/ensureAutomationSessionKey-D8Gki6U6.js.map +0 -1
  108. package/dist/ensureAutomationSessionKey-DEH7nwUc.js +0 -86
  109. package/dist/ensureAutomationSessionKey-DEH7nwUc.js.map +0 -1
  110. package/dist/ensureAutomationSessionKey-DKriW4Hr.js +0 -85
  111. package/dist/ensureAutomationSessionKey-DKriW4Hr.js.map +0 -1
  112. package/dist/ensureAutomationSessionKey-Dhvbii2M.js +0 -86
  113. package/dist/ensureAutomationSessionKey-Dhvbii2M.js.map +0 -1
  114. package/dist/ensureAutomationSessionKey-Dyfk8qVp.js +0 -85
  115. package/dist/ensureAutomationSessionKey-Dyfk8qVp.js.map +0 -1
  116. package/dist/ensureModularPublishBootstrap-5HJDqJJM.js +0 -24
  117. package/dist/ensureModularPublishBootstrap-BW8jKN_A.js +0 -24
  118. package/dist/ensureModularPublishBootstrap-BW8jKN_A.js.map +0 -1
  119. package/dist/ensureModularPublishBootstrap-BhYNmLzT.js +0 -24
  120. package/dist/ensureModularPublishBootstrap-BhYNmLzT.js.map +0 -1
  121. package/dist/ensureModularPublishBootstrap-Bsw1xSCt.js +0 -24
  122. package/dist/ensureModularPublishBootstrap-Bsw1xSCt.js.map +0 -1
  123. package/dist/ensureModularPublishBootstrap-Btih5xbB.js +0 -129
  124. package/dist/ensureModularPublishBootstrap-Btih5xbB.js.map +0 -1
  125. package/dist/ensureModularPublishBootstrap-C8wdnH1P.js +0 -128
  126. package/dist/ensureModularPublishBootstrap-C8wdnH1P.js.map +0 -1
  127. package/dist/ensureModularPublishBootstrap-CI4U08Gc.js +0 -129
  128. package/dist/ensureModularPublishBootstrap-CI4U08Gc.js.map +0 -1
  129. package/dist/ensureModularPublishBootstrap-CcU-hXll.js +0 -128
  130. package/dist/ensureModularPublishBootstrap-CcU-hXll.js.map +0 -1
  131. package/dist/ensureModularPublishBootstrap-CdrykHAi.js +0 -24
  132. package/dist/ensureModularPublishBootstrap-CdrykHAi.js.map +0 -1
  133. package/dist/ensureModularPublishBootstrap-DGBKVGg5.js.map +0 -1
  134. package/dist/ensureModularPublishBootstrap-DaREOqSc.js +0 -129
  135. package/dist/ensureModularPublishBootstrap-DaREOqSc.js.map +0 -1
  136. package/dist/ensureModularPublishBootstrap-DxIG-LUP.js +0 -24
  137. package/dist/ensureModularPublishBootstrap-DxIG-LUP.js.map +0 -1
  138. package/dist/ensureModularPublishBootstrap-Jm1AAqBo.js +0 -127
  139. package/dist/ensureModularPublishBootstrap-Jm1AAqBo.js.map +0 -1
  140. package/dist/ensureSessionKey-D2Lq-56x.js +0 -363
  141. package/dist/ensureSessionKey-D2Lq-56x.js.map +0 -1
  142. package/dist/ensureSmartWalletThenPublish-BFPugsKJ.js +0 -48
  143. package/dist/ensureSmartWalletThenPublish-BFPugsKJ.js.map +0 -1
  144. package/dist/ensureSmartWalletThenPublish-BSYzckyS.js +0 -49
  145. package/dist/ensureSmartWalletThenPublish-BSYzckyS.js.map +0 -1
  146. package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js +0 -49
  147. package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js.map +0 -1
  148. package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js +0 -48
  149. package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js.map +0 -1
  150. package/dist/ensureSmartWalletThenPublish-Bmm5Fpat.js +0 -49
  151. package/dist/ensureSmartWalletThenPublish-Bmm5Fpat.js.map +0 -1
  152. package/dist/ensureSmartWalletThenPublish-CE7acryB.js +0 -49
  153. package/dist/ensureSmartWalletThenPublish-CE7acryB.js.map +0 -1
  154. package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js +0 -48
  155. package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js.map +0 -1
  156. package/dist/ensureSmartWalletThenPublish-DAomriGc.js +0 -48
  157. package/dist/ensureSmartWalletThenPublish-DAomriGc.js.map +0 -1
  158. package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js +0 -48
  159. package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js.map +0 -1
  160. package/dist/ensureSmartWalletThenPublish-Dta2AOyJ.js +0 -48
  161. package/dist/ensureSmartWalletThenPublish-Dta2AOyJ.js.map +0 -1
  162. package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js +0 -48
  163. package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js.map +0 -1
  164. package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js +0 -48
  165. package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js.map +0 -1
  166. package/dist/errors-Du3LNbJN.js +0 -70
  167. package/dist/errors-Du3LNbJN.js.map +0 -1
  168. package/dist/errors-PZAaDlkq.js +0 -79
  169. package/dist/errors-PZAaDlkq.js.map +0 -1
  170. package/dist/helpers/adapters/managedAccountTxSender.d.ts +0 -21
  171. package/dist/helpers/adapters/managedAccountTxSender.d.ts.map +0 -1
  172. package/dist/helpers/modularAccount/abi.d.ts +0 -173
  173. package/dist/helpers/modularAccount/abi.d.ts.map +0 -1
  174. package/dist/helpers/modularAccount/deploy.d.ts +0 -13
  175. package/dist/helpers/modularAccount/deploy.d.ts.map +0 -1
  176. package/dist/helpers/modularAccount/eip712.d.ts +0 -30
  177. package/dist/helpers/modularAccount/eip712.d.ts.map +0 -1
  178. package/dist/helpers/modularAccount/encode.d.ts +0 -16
  179. package/dist/helpers/modularAccount/encode.d.ts.map +0 -1
  180. package/dist/helpers/modularAccount/ensureModule.d.ts +0 -10
  181. package/dist/helpers/modularAccount/ensureModule.d.ts.map +0 -1
  182. package/dist/helpers/modularAccount/ensureSessionKey.d.ts +0 -25
  183. package/dist/helpers/modularAccount/ensureSessionKey.d.ts.map +0 -1
  184. package/dist/helpers/modularAccount/index.d.ts +0 -9
  185. package/dist/helpers/modularAccount/index.d.ts.map +0 -1
  186. package/dist/helpers/modularAccount/permissions.d.ts +0 -32
  187. package/dist/helpers/modularAccount/permissions.d.ts.map +0 -1
  188. package/dist/helpers/modularAccount/reads.d.ts +0 -28
  189. package/dist/helpers/modularAccount/reads.d.ts.map +0 -1
  190. package/dist/helpers/thirdwebEnrollPublishAutomation.d.ts +0 -31
  191. package/dist/helpers/thirdwebEnrollPublishAutomation.d.ts.map +0 -1
  192. package/dist/helpers/thirdwebModularBootstrap.d.ts +0 -8
  193. package/dist/helpers/thirdwebModularBootstrap.d.ts.map +0 -1
  194. package/dist/helpers/transformPayloadToIntegerIds.d.ts +0 -34
  195. package/dist/helpers/transformPayloadToIntegerIds.d.ts.map +0 -1
  196. package/dist/managedAccountAdmin-BVLGWpEb.js +0 -29
  197. package/dist/managedAccountAdmin-BVLGWpEb.js.map +0 -1
  198. package/dist/managedAccountAdmin-Bje6X8Ds.js +0 -29
  199. package/dist/managedAccountAdmin-Bje6X8Ds.js.map +0 -1
  200. package/dist/managedAccountAdmin-C84-IlQ9.js +0 -29
  201. package/dist/managedAccountAdmin-C84-IlQ9.js.map +0 -1
  202. package/dist/managedAccountAdmin-DJMw6UH6.js +0 -29
  203. package/dist/managedAccountAdmin-DJMw6UH6.js.map +0 -1
  204. package/dist/managedAccountAdmin-DhCRBoPX.js +0 -29
  205. package/dist/managedAccountAdmin-DhCRBoPX.js.map +0 -1
  206. package/dist/managedAccountAdmin-NXD66lP5.js +0 -29
  207. package/dist/managedAccountAdmin-NXD66lP5.js.map +0 -1
  208. package/dist/publishAuthorization-B0G1em4a.js +0 -3695
  209. package/dist/publishAuthorization-B0G1em4a.js.map +0 -1
  210. package/dist/publishAuthorization-B1BVVfp0.js +0 -3604
  211. package/dist/publishAuthorization-B1BVVfp0.js.map +0 -1
  212. package/dist/publishAuthorization-BEqRnP2h.js +0 -3925
  213. package/dist/publishAuthorization-BEqRnP2h.js.map +0 -1
  214. package/dist/publishAuthorization-Bltn3y_K.js +0 -3599
  215. package/dist/publishAuthorization-Bltn3y_K.js.map +0 -1
  216. package/dist/publishAuthorization-By2Tt9kW.js +0 -3912
  217. package/dist/publishAuthorization-By2Tt9kW.js.map +0 -1
  218. package/dist/publishAuthorization-CSN2FsQk.js +0 -3479
  219. package/dist/publishAuthorization-CSN2FsQk.js.map +0 -1
  220. package/dist/publishAuthorization-CxBkijU6.js.map +0 -1
  221. package/dist/publishAuthorization-CxWY7lAQ.js +0 -3706
  222. package/dist/publishAuthorization-CxWY7lAQ.js.map +0 -1
  223. package/dist/publishAuthorization-DEriY_jm.js +0 -3687
  224. package/dist/publishAuthorization-DEriY_jm.js.map +0 -1
  225. package/dist/publishAuthorization-DfAQs1sN.js +0 -3707
  226. package/dist/publishAuthorization-DfAQs1sN.js.map +0 -1
  227. package/dist/publishAuthorization-DgdmgLTa.js +0 -3520
  228. package/dist/publishAuthorization-DgdmgLTa.js.map +0 -1
  229. package/dist/publishAuthorization-DjVrnMC0.js +0 -3925
  230. package/dist/publishAuthorization-DjVrnMC0.js.map +0 -1
  231. package/dist/publishAuthorization-DqhhCAhd.js +0 -3652
  232. package/dist/publishAuthorization-DqhhCAhd.js.map +0 -1
  233. package/dist/publishThirdwebClient-BdgkcqM7.js +0 -18
  234. package/dist/publishThirdwebClient-BdgkcqM7.js.map +0 -1
  235. package/dist/publishThirdwebClient-BkmDN480.js +0 -18
  236. package/dist/publishThirdwebClient-BkmDN480.js.map +0 -1
  237. package/dist/publishThirdwebClient-BnDhP3N-.js +0 -18
  238. package/dist/publishThirdwebClient-BnDhP3N-.js.map +0 -1
  239. package/dist/publishThirdwebClient-CQ29pzG2.js +0 -18
  240. package/dist/publishThirdwebClient-CQ29pzG2.js.map +0 -1
  241. package/dist/publishThirdwebClient-CZIVmr9Z.js +0 -18
  242. package/dist/publishThirdwebClient-CZIVmr9Z.js.map +0 -1
  243. package/dist/publishThirdwebClient-Ce7iBIsj.js +0 -18
  244. package/dist/publishThirdwebClient-Ce7iBIsj.js.map +0 -1
  245. package/dist/publishThirdwebClient-DroRrOFQ.js +0 -18
  246. package/dist/publishThirdwebClient-DroRrOFQ.js.map +0 -1
  247. package/dist/publishThirdwebClient-DzXFjQ7L.js +0 -18
  248. package/dist/publishThirdwebClient-DzXFjQ7L.js.map +0 -1
  249. package/dist/publishThirdwebClient-Dzb2vcEs.js +0 -18
  250. package/dist/publishThirdwebClient-Dzb2vcEs.js.map +0 -1
  251. package/dist/publishThirdwebClient-i8P7fivi.js +0 -18
  252. package/dist/publishThirdwebClient-i8P7fivi.js.map +0 -1
  253. package/dist/publishWalletRegistry-Cugh691z.js +0 -37
  254. package/dist/publishWalletRegistry-Cugh691z.js.map +0 -1
  255. package/dist/resolveRevokeAccount-B5iXpuRT.js +0 -38
  256. package/dist/resolveRevokeAccount-B7ImSb4Y.js +0 -38
  257. package/dist/resolveRevokeAccount-B7ImSb4Y.js.map +0 -1
  258. package/dist/resolveRevokeAccount-BEhKQBTm.js +0 -38
  259. package/dist/resolveRevokeAccount-BEhKQBTm.js.map +0 -1
  260. package/dist/resolveRevokeAccount-BM1j2l5Q.js +0 -38
  261. package/dist/resolveRevokeAccount-BM1j2l5Q.js.map +0 -1
  262. package/dist/resolveRevokeAccount-BtVG0xxc.js +0 -38
  263. package/dist/resolveRevokeAccount-BtVG0xxc.js.map +0 -1
  264. package/dist/resolveRevokeAccount-CJZZdBcQ.js +0 -39
  265. package/dist/resolveRevokeAccount-CJZZdBcQ.js.map +0 -1
  266. package/dist/resolveRevokeAccount-CaIMuCee.js +0 -39
  267. package/dist/resolveRevokeAccount-CaIMuCee.js.map +0 -1
  268. package/dist/resolveRevokeAccount-CehU81k6.js.map +0 -1
  269. package/dist/resolveRevokeAccount-Cg4TQgnd.js +0 -38
  270. package/dist/resolveRevokeAccount-Cg4TQgnd.js.map +0 -1
  271. package/dist/resolveRevokeAccount-DHnxtEIj.js +0 -39
  272. package/dist/resolveRevokeAccount-DHnxtEIj.js.map +0 -1
  273. package/dist/resolveRevokeAccount-DJKfLlyK.js +0 -38
  274. package/dist/resolveRevokeAccount-DJKfLlyK.js.map +0 -1
  275. package/dist/resolveRevokeAccount-S-2WXkNh.js +0 -38
  276. package/dist/resolveRevokeAccount-S-2WXkNh.js.map +0 -1
  277. package/dist/resolveRevokeAccount-mzR11KJ4.js +0 -38
  278. package/dist/resolveRevokeAccount-mzR11KJ4.js.map +0 -1
  279. package/dist/resolveRevokeAccount-yWARIv9i.js +0 -38
  280. package/dist/resolveRevokeAccount-yWARIv9i.js.map +0 -1
  281. package/dist/seedSigner-CFzMD7Rb.js +0 -66
  282. package/dist/seedSigner-CFzMD7Rb.js.map +0 -1
  283. package/dist/thirdweb-BoksPRz3.js +0 -194
  284. package/dist/thirdweb-BoksPRz3.js.map +0 -1
  285. package/dist/thirdwebAccount-C2iOcp4_.js +0 -59
  286. package/dist/thirdwebAccount-C2iOcp4_.js.map +0 -1
  287. package/dist/worker-B1PcFPLi.js +0 -69
  288. package/dist/worker-B1PcFPLi.js.map +0 -1
  289. package/dist/worker-B8gN5WTx.js +0 -69
  290. package/dist/worker-B8gN5WTx.js.map +0 -1
  291. package/dist/worker-BCG1r0AS.js +0 -69
  292. package/dist/worker-BCG1r0AS.js.map +0 -1
  293. package/dist/worker-BgErCNTb.js +0 -69
  294. package/dist/worker-BgErCNTb.js.map +0 -1
  295. package/dist/worker-C07rPV2G.js +0 -69
  296. package/dist/worker-C07rPV2G.js.map +0 -1
  297. package/dist/worker-C9Za_dlQ.js +0 -69
  298. package/dist/worker-C9Za_dlQ.js.map +0 -1
  299. package/dist/worker-CEgulQnm.js +0 -69
  300. package/dist/worker-CEgulQnm.js.map +0 -1
  301. package/dist/worker-C_TL94He.js +0 -69
  302. package/dist/worker-C_TL94He.js.map +0 -1
  303. package/dist/worker-CbtzcKG6.js +0 -69
  304. package/dist/worker-CbtzcKG6.js.map +0 -1
  305. package/dist/worker-DBC_g-3I.js +0 -69
  306. package/dist/worker-DBC_g-3I.js.map +0 -1
  307. package/dist/worker-DHUm-TeQ.js +0 -69
  308. package/dist/worker-DHUm-TeQ.js.map +0 -1
  309. package/dist/worker-DypHzXgH.js +0 -69
  310. package/dist/worker-DypHzXgH.js.map +0 -1
  311. package/dist/worker-ZL4Wg19t.js +0 -69
  312. package/dist/worker-ZL4Wg19t.js.map +0 -1
@@ -1,1283 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { optimismSepolia as t } from "viem/chains";
3
- import { DEFAULT_ARWEAVE_GRAPHQL_URL as n, VERSION_SCHEMA_UID as r, assertLocalDbChain as i, client as a, getAttesterForSeed as o, getGetAdditionalSyncAddresses as s, getMetadataAttestationUidsForSeedUid as c, getVersionsForSeedUid as ee, isValidEasAttestationUid as l, setAdditionalSyncAddresses as u, setGetPublisherForNewSeeds as d, setRevokeExecutor as te, updateSeedRevokedAt as ne } from "@seedprotocol/sdk";
4
- import { createPublicClient as f, encodeAbiParameters as p, encodeFunctionData as m, http as h, parseEventLogs as g } from "viem";
5
- import { prepareTransaction as re, sendTransaction as ie } from "thirdweb";
6
- import { ethers as ae } from "ethers";
7
- import { defineChain as oe, optimismSepolia as se } from "thirdweb/chains";
8
- import { configureEasReadChain as ce, expectEasReadChain as le, resolveEasChainDeployment as ue } from "@seedprotocol/eas";
9
- //#region src/helpers/constants.ts
10
- var de = "0x44d562ac1d7cd77e232978687fea027ace48f719cf1d58c7888e509663bb87fc", fe = { 11155420: "0x76f47d88bfaf670f5208911181fcdc0e160cb16d" }, pe = "0xcd8c945872df8e664e55cf8885c85ea3ea8f2148", me = pe, he = {
11
- SUCCESS: "success",
12
- FAILURE: "failure"
13
- }, ge = [
14
- "pollingForConfirmation",
15
- "uploadingData",
16
- "uploadingViaBundler",
17
- "uploadingViaBundlerPhase2"
18
- ], _e = 3e4, _ = t, ve = [
19
- {
20
- type: "error",
21
- name: "AccessDenied",
22
- inputs: []
23
- },
24
- {
25
- type: "error",
26
- name: "AlreadyRevoked",
27
- inputs: []
28
- },
29
- {
30
- type: "error",
31
- name: "InvalidRevocation",
32
- inputs: []
33
- },
34
- {
35
- type: "error",
36
- name: "InvalidRevocations",
37
- inputs: []
38
- },
39
- {
40
- type: "error",
41
- name: "InvalidSchema",
42
- inputs: []
43
- },
44
- {
45
- type: "error",
46
- name: "Irrevocable",
47
- inputs: []
48
- },
49
- {
50
- type: "error",
51
- name: "NotFound",
52
- inputs: []
53
- },
54
- {
55
- type: "error",
56
- name: "NotPayable",
57
- inputs: []
58
- },
59
- {
60
- type: "error",
61
- name: "InsufficientValue",
62
- inputs: []
63
- },
64
- {
65
- type: "error",
66
- name: "InvalidLength",
67
- inputs: []
68
- }
69
- ], ye = [
70
- {
71
- name: "recipient",
72
- type: "address"
73
- },
74
- {
75
- name: "expirationTime",
76
- type: "uint64"
77
- },
78
- {
79
- name: "revocable",
80
- type: "bool"
81
- },
82
- {
83
- name: "refUID",
84
- type: "bytes32"
85
- },
86
- {
87
- name: "data",
88
- type: "bytes"
89
- },
90
- {
91
- name: "value",
92
- type: "uint256"
93
- }
94
- ], v = [
95
- {
96
- type: "function",
97
- name: "attest",
98
- stateMutability: "payable",
99
- inputs: [{
100
- name: "request",
101
- type: "tuple",
102
- components: [{
103
- name: "schema",
104
- type: "bytes32"
105
- }, {
106
- name: "data",
107
- type: "tuple",
108
- components: ye
109
- }]
110
- }],
111
- outputs: [{ type: "bytes32" }]
112
- },
113
- {
114
- type: "function",
115
- name: "multiAttest",
116
- stateMutability: "payable",
117
- inputs: [{
118
- name: "requests",
119
- type: "tuple[]",
120
- components: [{
121
- name: "schema",
122
- type: "bytes32"
123
- }, {
124
- name: "data",
125
- type: "tuple[]",
126
- components: ye
127
- }]
128
- }],
129
- outputs: [{ type: "bytes32[]" }]
130
- },
131
- {
132
- type: "function",
133
- name: "multiRevoke",
134
- stateMutability: "payable",
135
- inputs: [{
136
- name: "multiRequests",
137
- type: "tuple[]",
138
- components: [{
139
- name: "schema",
140
- type: "bytes32"
141
- }, {
142
- name: "data",
143
- type: "tuple[]",
144
- components: [{
145
- name: "uid",
146
- type: "bytes32"
147
- }, {
148
- name: "value",
149
- type: "uint256"
150
- }]
151
- }]
152
- }],
153
- outputs: []
154
- },
155
- {
156
- type: "event",
157
- name: "Attested",
158
- inputs: [
159
- {
160
- name: "recipient",
161
- type: "address",
162
- indexed: !0
163
- },
164
- {
165
- name: "attester",
166
- type: "address",
167
- indexed: !0
168
- },
169
- {
170
- name: "uid",
171
- type: "bytes32",
172
- indexed: !1
173
- },
174
- {
175
- name: "schemaUID",
176
- type: "bytes32",
177
- indexed: !0
178
- }
179
- ]
180
- },
181
- ...ve
182
- ], y = [{
183
- type: "function",
184
- name: "multiPublish",
185
- stateMutability: "payable",
186
- inputs: [{
187
- name: "requests",
188
- type: "tuple[]",
189
- components: [
190
- {
191
- name: "localId",
192
- type: "string"
193
- },
194
- {
195
- name: "seedUid",
196
- type: "bytes32"
197
- },
198
- {
199
- name: "seedSchemaUid",
200
- type: "bytes32"
201
- },
202
- {
203
- name: "versionUid",
204
- type: "bytes32"
205
- },
206
- {
207
- name: "versionSchemaUid",
208
- type: "bytes32"
209
- },
210
- {
211
- name: "seedIsRevocable",
212
- type: "bool"
213
- },
214
- {
215
- name: "listOfAttestations",
216
- type: "tuple[]",
217
- components: [{
218
- name: "schema",
219
- type: "bytes32"
220
- }, {
221
- name: "data",
222
- type: "tuple[]",
223
- components: [
224
- {
225
- name: "recipient",
226
- type: "address"
227
- },
228
- {
229
- name: "expirationTime",
230
- type: "uint64"
231
- },
232
- {
233
- name: "revocable",
234
- type: "bool"
235
- },
236
- {
237
- name: "refUID",
238
- type: "bytes32"
239
- },
240
- {
241
- name: "data",
242
- type: "bytes"
243
- },
244
- {
245
- name: "value",
246
- type: "uint256"
247
- }
248
- ]
249
- }]
250
- },
251
- {
252
- name: "propertiesToUpdate",
253
- type: "tuple[]",
254
- components: [{
255
- name: "publishIndex",
256
- type: "uint256"
257
- }, {
258
- name: "propertySchemaUid",
259
- type: "bytes32"
260
- }]
261
- }
262
- ]
263
- }],
264
- outputs: [{ type: "bytes32[]" }]
265
- }], b = [
266
- {
267
- type: "function",
268
- name: "getEas",
269
- stateMutability: "view",
270
- inputs: [],
271
- outputs: [{ type: "address" }]
272
- },
273
- {
274
- type: "function",
275
- name: "setEas",
276
- stateMutability: "nonpayable",
277
- inputs: [{
278
- name: "_eas",
279
- type: "address"
280
- }],
281
- outputs: [{ type: "string" }]
282
- },
283
- {
284
- type: "function",
285
- name: "isActiveSigner",
286
- stateMutability: "view",
287
- inputs: [{
288
- name: "signer",
289
- type: "address"
290
- }],
291
- outputs: [{ type: "bool" }]
292
- },
293
- {
294
- type: "function",
295
- name: "isAdmin",
296
- stateMutability: "view",
297
- inputs: [{
298
- name: "signer",
299
- type: "address"
300
- }],
301
- outputs: [{ type: "bool" }]
302
- }
303
- ], be = [{
304
- type: "event",
305
- name: "CreatedAttestation",
306
- inputs: [{
307
- name: "result",
308
- type: "tuple",
309
- indexed: !1,
310
- components: [{
311
- name: "schemaUid",
312
- type: "bytes32"
313
- }, {
314
- name: "attestationUid",
315
- type: "bytes32"
316
- }]
317
- }]
318
- }, {
319
- type: "event",
320
- name: "SeedPublished",
321
- inputs: [{
322
- name: "returnedDataFromEAS",
323
- type: "bytes",
324
- indexed: !1
325
- }]
326
- }], x = [{
327
- type: "function",
328
- name: "getAddress",
329
- stateMutability: "view",
330
- inputs: [{
331
- name: "_adminSigner",
332
- type: "address"
333
- }, {
334
- name: "_data",
335
- type: "bytes"
336
- }],
337
- outputs: [{ type: "address" }]
338
- }, {
339
- type: "function",
340
- name: "createAccount",
341
- stateMutability: "nonpayable",
342
- inputs: [{
343
- name: "_admin",
344
- type: "address"
345
- }, {
346
- name: "_data",
347
- type: "bytes"
348
- }],
349
- outputs: [{ type: "address" }]
350
- }], xe = [{
351
- type: "event",
352
- name: "CreatedAttestation",
353
- inputs: [{
354
- name: "result",
355
- type: "tuple",
356
- indexed: !1,
357
- components: [{
358
- name: "schemaUid",
359
- type: "bytes32"
360
- }, {
361
- name: "attestationUid",
362
- type: "bytes32"
363
- }]
364
- }]
365
- }, {
366
- type: "event",
367
- name: "SeedPublished",
368
- inputs: [{
369
- name: "seedUid",
370
- type: "bytes32",
371
- indexed: !1
372
- }, {
373
- name: "versionUid",
374
- type: "bytes32",
375
- indexed: !1
376
- }]
377
- }], S = [
378
- y[0],
379
- {
380
- type: "function",
381
- name: "isInitialized",
382
- stateMutability: "view",
383
- inputs: [{
384
- name: "account",
385
- type: "address"
386
- }],
387
- outputs: [{
388
- name: "",
389
- type: "bool"
390
- }]
391
- },
392
- {
393
- type: "function",
394
- name: "getEAS",
395
- stateMutability: "view",
396
- inputs: [{
397
- name: "account",
398
- type: "address"
399
- }],
400
- outputs: [{
401
- name: "",
402
- type: "address"
403
- }]
404
- },
405
- {
406
- type: "error",
407
- name: "AlreadyInitialized",
408
- inputs: [{
409
- name: "account",
410
- type: "address"
411
- }]
412
- },
413
- {
414
- type: "error",
415
- name: "NotInitialized",
416
- inputs: [{
417
- name: "account",
418
- type: "address"
419
- }]
420
- },
421
- {
422
- type: "error",
423
- name: "InvalidEASAddress",
424
- inputs: []
425
- },
426
- {
427
- type: "error",
428
- name: "AttestationFailed",
429
- inputs: []
430
- },
431
- {
432
- type: "error",
433
- name: "MultiAttestFailed",
434
- inputs: []
435
- }
436
- ], C = [
437
- {
438
- type: "function",
439
- name: "installSeedExecutor",
440
- stateMutability: "nonpayable",
441
- inputs: [],
442
- outputs: []
443
- },
444
- {
445
- type: "function",
446
- name: "getSeedExecutor",
447
- stateMutability: "view",
448
- inputs: [],
449
- outputs: [{
450
- name: "executor",
451
- type: "address"
452
- }, {
453
- name: "eas",
454
- type: "address"
455
- }]
456
- },
457
- {
458
- type: "function",
459
- name: "isModuleInstalled",
460
- stateMutability: "view",
461
- inputs: [
462
- {
463
- name: "moduleTypeId",
464
- type: "uint256"
465
- },
466
- {
467
- name: "module",
468
- type: "address"
469
- },
470
- {
471
- name: "additionalContext",
472
- type: "bytes"
473
- }
474
- ],
475
- outputs: [{
476
- name: "",
477
- type: "bool"
478
- }]
479
- },
480
- {
481
- type: "error",
482
- name: "Unauthorized",
483
- inputs: [{
484
- name: "caller",
485
- type: "address"
486
- }]
487
- },
488
- {
489
- type: "error",
490
- name: "SeedExecutorAlreadyInstalled",
491
- inputs: []
492
- },
493
- {
494
- type: "error",
495
- name: "SeedExecutorNotInstalled",
496
- inputs: []
497
- }
498
- ], Se = 2n, w = [{
499
- type: "function",
500
- name: "getSchema",
501
- stateMutability: "view",
502
- inputs: [{
503
- name: "uid",
504
- type: "bytes32"
505
- }],
506
- outputs: [{
507
- name: "",
508
- type: "tuple",
509
- components: [
510
- {
511
- name: "uid",
512
- type: "bytes32"
513
- },
514
- {
515
- name: "resolver",
516
- type: "address"
517
- },
518
- {
519
- name: "revocable",
520
- type: "bool"
521
- },
522
- {
523
- name: "schema",
524
- type: "string"
525
- }
526
- ]
527
- }]
528
- }, {
529
- type: "function",
530
- name: "register",
531
- stateMutability: "nonpayable",
532
- inputs: [
533
- {
534
- name: "schema",
535
- type: "string"
536
- },
537
- {
538
- name: "resolver",
539
- type: "address"
540
- },
541
- {
542
- name: "revocable",
543
- type: "bool"
544
- }
545
- ],
546
- outputs: [{ type: "bytes32" }]
547
- }], T = null, E = null;
548
- function Ce() {
549
- try {
550
- let e = Y().thirdwebSecretKey;
551
- return e ? { headers: { "x-secret-key": e } } : void 0;
552
- } catch {
553
- return;
554
- }
555
- }
556
- function we() {
557
- let e = Q(), t = $(), n = Ce();
558
- return f({
559
- chain: e,
560
- transport: h(t, n ? { fetchOptions: n } : void 0)
561
- });
562
- }
563
- function D() {
564
- let e = Q(), t = $(), n = "";
565
- try {
566
- n = Y().thirdwebSecretKey ?? "";
567
- } catch {
568
- n = "";
569
- }
570
- let r = `${e.id}:${t}:${n ? "1" : "0"}:${n}`;
571
- return (!T || E !== r) && (E = r, T = we()), T;
572
- }
573
- async function O(e) {
574
- return D().waitForTransactionReceipt({ hash: e });
575
- }
576
- async function k(e) {
577
- let t = await D().getBytecode({ address: e });
578
- return !!t && t !== "0x";
579
- }
580
- async function Te(e) {
581
- try {
582
- let t = await D().getBlock({ blockNumber: e });
583
- if (t?.timestamp != null) return Number(t.timestamp) * 1e3;
584
- } catch {}
585
- return null;
586
- }
587
- var Ee = 5, De = 6e3;
588
- async function Oe(e, t = Ee, n = De) {
589
- for (let r = 0; r < t; r++) {
590
- if (await k(e)) return !0;
591
- r < t - 1 && await new Promise((e) => {
592
- setTimeout(e, n);
593
- });
594
- }
595
- return !1;
596
- }
597
- //#endregion
598
- //#region src/helpers/contracts/index.ts
599
- function ke(e) {
600
- let t = /* @__PURE__ */ new Map();
601
- return e.forEach((e, n) => {
602
- if (e.localId) {
603
- if (t.has(e.localId)) throw Error(`multiPublish: duplicate localId "${e.localId}" in the batch`);
604
- t.set(e.localId, BigInt(n));
605
- }
606
- }), (e) => (e.propertiesToUpdate ?? []).map((n) => {
607
- if (!n.publishLocalId) throw Error(`multiPublish: request "${e.localId}" has a cross-reference with no publishLocalId`);
608
- let r = t.get(n.publishLocalId);
609
- if (r === void 0) throw Error(`multiPublish: request "${e.localId}" cross-references localId "${n.publishLocalId}", which isn't in the batch`);
610
- return {
611
- publishIndex: r,
612
- propertySchemaUid: n.propertySchemaUid
613
- };
614
- });
615
- }
616
- function A(e, t, n) {
617
- let r = ke(t);
618
- return {
619
- to: e,
620
- data: m({
621
- abi: y,
622
- functionName: "multiPublish",
623
- args: [t.map((e) => ({
624
- localId: e.localId,
625
- seedUid: e.seedUid,
626
- seedSchemaUid: e.seedSchemaUid,
627
- versionUid: e.versionUid,
628
- versionSchemaUid: e.versionSchemaUid,
629
- seedIsRevocable: e.seedIsRevocable,
630
- listOfAttestations: e.listOfAttestations,
631
- propertiesToUpdate: r(e)
632
- }))]
633
- }),
634
- gas: n
635
- };
636
- }
637
- function Ae(e, t, n) {
638
- return A(e, t, n);
639
- }
640
- async function je(e, t) {
641
- return D().readContract({
642
- address: e,
643
- abi: S,
644
- functionName: "isInitialized",
645
- args: [t]
646
- });
647
- }
648
- async function Me(e, t) {
649
- return D().readContract({
650
- address: e,
651
- abi: S,
652
- functionName: "getEAS",
653
- args: [t]
654
- });
655
- }
656
- async function Ne(e) {
657
- try {
658
- let [t, n] = await D().readContract({
659
- address: e,
660
- abi: C,
661
- functionName: "getSeedExecutor"
662
- });
663
- return {
664
- executor: t,
665
- eas: n
666
- };
667
- } catch {
668
- return null;
669
- }
670
- }
671
- async function Pe(e, t) {
672
- return D().readContract({
673
- address: e,
674
- abi: C,
675
- functionName: "isModuleInstalled",
676
- args: [
677
- Se,
678
- t,
679
- "0x"
680
- ]
681
- });
682
- }
683
- function Fe(e) {
684
- return {
685
- to: e,
686
- data: m({
687
- abi: C,
688
- functionName: "installSeedExecutor"
689
- })
690
- };
691
- }
692
- function Ie(e, t) {
693
- return {
694
- to: e,
695
- data: m({
696
- abi: b,
697
- functionName: "setEas",
698
- args: [t]
699
- })
700
- };
701
- }
702
- async function Le(e) {
703
- return D().readContract({
704
- address: e,
705
- abi: b,
706
- functionName: "getEas"
707
- });
708
- }
709
- async function Re(e, t) {
710
- return D().readContract({
711
- address: e,
712
- abi: b,
713
- functionName: "isActiveSigner",
714
- args: [t]
715
- });
716
- }
717
- async function ze(e, t) {
718
- return D().readContract({
719
- address: e,
720
- abi: b,
721
- functionName: "isAdmin",
722
- args: [t]
723
- });
724
- }
725
- async function Be(e, t = "0x") {
726
- return D().readContract({
727
- address: Z(),
728
- abi: x,
729
- functionName: "getAddress",
730
- args: [e, t]
731
- });
732
- }
733
- function Ve(e, t = "0x") {
734
- return {
735
- to: Z(),
736
- data: m({
737
- abi: x,
738
- functionName: "createAccount",
739
- args: [e, t]
740
- })
741
- };
742
- }
743
- var He = "0x0000000000000000000000000000000000000000";
744
- function j(e) {
745
- let { easContractAddress: t } = Y();
746
- return {
747
- to: t,
748
- data: m({
749
- abi: v,
750
- functionName: "attest",
751
- args: [{
752
- schema: e.schema,
753
- data: {
754
- recipient: e.data.recipient ?? He,
755
- expirationTime: e.data.expirationTime ?? 0n,
756
- revocable: e.data.revocable ?? !0,
757
- refUID: e.data.refUID,
758
- data: e.data.data,
759
- value: e.data.value ?? 0n
760
- }
761
- }]
762
- })
763
- };
764
- }
765
- function M(e) {
766
- let { easContractAddress: t } = Y();
767
- return {
768
- to: t,
769
- data: m({
770
- abi: v,
771
- functionName: "multiAttest",
772
- args: [e]
773
- })
774
- };
775
- }
776
- function N(e) {
777
- let { easContractAddress: t } = Y();
778
- return {
779
- to: t,
780
- data: m({
781
- abi: v,
782
- functionName: "multiRevoke",
783
- args: [e.map((e) => ({
784
- schema: e.schema,
785
- data: e.data.map((e) => ({
786
- uid: e.uid,
787
- value: e.value ?? 0n
788
- }))
789
- }))]
790
- })
791
- };
792
- }
793
- var Ue = "0x" + "0".repeat(64);
794
- async function We(e) {
795
- let t = await D().readContract({
796
- address: Y().schemaRegistryAddress,
797
- abi: w,
798
- functionName: "getSchema",
799
- args: [e]
800
- });
801
- return !t || t.uid === Ue ? null : {
802
- uid: t.uid,
803
- resolver: t.resolver,
804
- revocable: t.revocable,
805
- schema: t.schema
806
- };
807
- }
808
- function Ge(e) {
809
- return {
810
- to: Y().schemaRegistryAddress,
811
- data: m({
812
- abi: w,
813
- functionName: "register",
814
- args: [
815
- e.schema,
816
- e.resolverAddress,
817
- e.revocable
818
- ]
819
- })
820
- };
821
- }
822
- //#endregion
823
- //#region src/helpers/easDirect.ts
824
- var Ke = "0x0000000000000000000000000000000000000000", P = "0x" + "0".repeat(64);
825
- function qe(e) {
826
- return j(e);
827
- }
828
- function Je(e) {
829
- return M(e);
830
- }
831
- function Ye(e) {
832
- return p([{ type: "bytes32" }], [e]);
833
- }
834
- function Xe(e, t) {
835
- return F(e, t)[0]?.uid;
836
- }
837
- function F(e, t) {
838
- if (!e.logs?.length) return [];
839
- let n = t.toLowerCase(), r = e.logs.filter((e) => e.address && e.address.toLowerCase() === n);
840
- if (!r.length) return [];
841
- try {
842
- let e = g({
843
- abi: v,
844
- eventName: "Attested",
845
- logs: r,
846
- strict: !1
847
- }), t = [];
848
- for (let n of e) {
849
- let e = n.args?.uid, r = n.args?.schemaUID;
850
- e && e !== P && r && t.push({
851
- schemaUid: r,
852
- uid: e
853
- });
854
- }
855
- return t;
856
- } catch {
857
- return [];
858
- }
859
- }
860
- function I(e) {
861
- return N(e);
862
- }
863
- //#endregion
864
- //#region src/helpers/publishWalletRegistry.ts
865
- var L = null;
866
- function Ze() {
867
- return a.isInitialized() ? Promise.resolve() : new Promise((e) => {
868
- a.onReady(() => e());
869
- });
870
- }
871
- async function Qe(e) {
872
- if (L = e, !e) return;
873
- await Ze();
874
- let t = /* @__PURE__ */ new Set();
875
- for (let n of e.ownedAddresses ?? []) n && t.add(n.toLowerCase());
876
- t.add(e.signer.address.toLowerCase()), t.add(e.txSender.address.toLowerCase()), e.publisherAddress && t.add(e.publisherAddress.toLowerCase());
877
- try {
878
- await a.setAddresses({ owned: [...t] });
879
- let n = e.publisherAddress ?? e.signer.address;
880
- n && await a.claimUnpublishedDrafts(n);
881
- } catch (e) {
882
- console.warn("[publishWalletRegistry] Failed to set seed client addresses:", e);
883
- }
884
- }
885
- function R() {
886
- return L;
887
- }
888
- function $e() {
889
- L = null;
890
- }
891
- //#endregion
892
- //#region src/helpers/retryNonceTooLow.ts
893
- function et(e) {
894
- let t = [], n = e;
895
- for (let e = 0; n && e < 5; e++) {
896
- let e = n;
897
- t.push(String(e.message ?? ""), String(e.shortMessage ?? ""), String(e.details ?? ""), String(e.code ?? "")), n = e.cause;
898
- }
899
- return /nonce too low|nonce has already been used|NONCE_EXPIRED|nonce.*already.*(used|known)|lower than the current nonce/i.test(t.join(" "));
900
- }
901
- async function tt(e, { attempts: t = 3, delayMs: n = 1e3 } = {}) {
902
- for (let r = 1;; r++) try {
903
- return await e();
904
- } catch (e) {
905
- if (r >= t || !et(e)) throw e;
906
- await new Promise((e) => setTimeout(e, n));
907
- }
908
- }
909
- //#endregion
910
- //#region src/helpers/seedSigner.ts
911
- var nt = Symbol.for("seedprotocol.SeedSigner"), rt = Symbol.for("seedprotocol.SeedTxSender");
912
- function z(e) {
913
- return Object.assign(e, { [nt]: !0 });
914
- }
915
- function B(e) {
916
- return Object.assign(e, { [rt]: !0 });
917
- }
918
- function V(e) {
919
- return !!e && typeof e == "object" && nt in e;
920
- }
921
- function H(e) {
922
- return !!e && typeof e == "object" && rt in e;
923
- }
924
- function U(e) {
925
- return !!e && typeof e == "object" && "signer" in e && "txSender" in e && V(e.signer) && H(e.txSender);
926
- }
927
- function it(e) {
928
- let t = e.address;
929
- return {
930
- signer: z({
931
- address: t,
932
- signMessage: async ({ message: t }) => {
933
- if (typeof t == "string") return await e.signMessage(t);
934
- let n = t.raw, r = typeof n == "string" ? ae.getBytes(n) : n instanceof Uint8Array ? n : new Uint8Array(n);
935
- return await e.signMessage(r);
936
- }
937
- }),
938
- txSender: B({
939
- address: t,
940
- sendTransaction: async (t) => ({ transactionHash: (await tt(() => e.sendTransaction({
941
- to: t.to,
942
- data: t.data,
943
- value: t.value,
944
- gasLimit: t.gas
945
- }))).hash })
946
- })
947
- };
948
- }
949
- function at(e) {
950
- if (U(e)) return e.signer;
951
- if (V(e)) return e;
952
- throw Error("@seedprotocol/publish: expected a SeedSigner or PublishWallet. Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
953
- }
954
- function ot(e) {
955
- if (U(e)) return e.txSender;
956
- if (H(e)) return e;
957
- throw Error("@seedprotocol/publish: expected a SeedTxSender or PublishWallet. Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
958
- }
959
- function st(e) {
960
- if (U(e)) return e;
961
- throw Error("@seedprotocol/publish: expected a PublishWallet (signer + txSender). Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
962
- }
963
- //#endregion
964
- //#region src/helpers/thirdwebChain.ts
965
- var W = null;
966
- function ct(e) {
967
- let t = e ?? St() ?? {}, n = t.chain ?? _, r = t.rpcUrl?.trim() || void 0, i = `${n.id}|${r ?? ""}`;
968
- if (W?.key === i) return W.chain;
969
- let a;
970
- return a = n.id === se.id && !r ? se : oe({
971
- id: n.id,
972
- name: n.name,
973
- nativeCurrency: n.nativeCurrency,
974
- testnet: n.testnet ? !0 : void 0,
975
- blockExplorers: n.blockExplorers ? Object.values(n.blockExplorers).map(({ name: e, url: t, apiUrl: n }) => ({
976
- name: e,
977
- url: t,
978
- apiUrl: n
979
- })) : void 0,
980
- ...r ? { rpc: r } : {}
981
- }), W = {
982
- key: i,
983
- chain: a
984
- }, a;
985
- }
986
- var lt = /* @__PURE__ */ new Set([31337, 1337]);
987
- function ut(e) {
988
- if (lt.has(e.id)) return !0;
989
- try {
990
- let t = new URL(e.rpc).hostname.replace(/^\[|\]$/g, "");
991
- return t === "localhost" || t === "127.0.0.1" || t === "::1" || t.endsWith(".localhost");
992
- } catch {
993
- return !1;
994
- }
995
- }
996
- //#endregion
997
- //#region src/helpers/adapters/thirdwebAccount.ts
998
- var dt = /* @__PURE__ */ e({
999
- asSeedSignerFromThirdweb: () => pt,
1000
- asThirdwebPublishWallet: () => ft,
1001
- fromThirdwebAccount: () => G
1002
- });
1003
- function G(e, t) {
1004
- let n = t?.client, r = e.address;
1005
- return {
1006
- signer: z({
1007
- address: r,
1008
- signMessage: async ({ message: t }) => await e.signMessage({ message: t })
1009
- }),
1010
- txSender: B({
1011
- address: r,
1012
- sendTransaction: async (t) => {
1013
- let r = n ?? (await import("./publishThirdwebClient-Ce7iBIsj.js").then((e) => e.n)).getClient(), i = ct(), a = re({
1014
- client: r,
1015
- chain: i,
1016
- to: t.to,
1017
- data: t.data,
1018
- value: t.value,
1019
- gas: t.gas
1020
- });
1021
- return { transactionHash: (await tt(() => ie({
1022
- account: e,
1023
- transaction: a
1024
- }))).transactionHash };
1025
- }
1026
- })
1027
- };
1028
- }
1029
- function ft(e, t) {
1030
- if (U(e)) return e;
1031
- if (V(e)) throw Error("@seedprotocol/publish/thirdweb: SeedSigner alone cannot send sponsored txs. Pass fromThirdwebAccount(account) or a PublishWallet.");
1032
- return G(e, t);
1033
- }
1034
- function pt(e) {
1035
- return U(e) ? e.signer : V(e) ? e : G(e).signer;
1036
- }
1037
- //#endregion
1038
- //#region src/helpers/verifyPublishChain.ts
1039
- var K = class extends Error {
1040
- chainId;
1041
- problems;
1042
- name = "PublishChainConfigError";
1043
- constructor(e, t) {
1044
- super(`@seedprotocol/publish: chain ${e} is not set up for publishing:\n- ${t.join("\n- ")}`), this.chainId = e, this.problems = t;
1045
- }
1046
- }, q = null;
1047
- function mt() {
1048
- let e = Y();
1049
- return [
1050
- e.chain.id,
1051
- $(),
1052
- e.easContractAddress,
1053
- e.schemaRegistryAddress,
1054
- e.thirdwebAccountFactoryAddress ?? "",
1055
- e.modularAccountModuleContract ?? ""
1056
- ].join("|").toLowerCase();
1057
- }
1058
- async function ht() {
1059
- let e = Y(), { chain: t } = e, n = [], r;
1060
- try {
1061
- r = await D().getChainId();
1062
- } catch (e) {
1063
- throw new K(t.id, [`could not reach the RPC (${gt($())}): ${e instanceof Error ? e.message : String(e)}`]);
1064
- }
1065
- if (r !== t.id) throw new K(t.id, [`the RPC reports chain ${r}, but PublishConfig.chain is ${t.name} (${t.id}). Point rpcUrl at ${t.name}.`]);
1066
- let i = [
1067
- [
1068
- "EAS contract",
1069
- e.easContractAddress,
1070
- "set easContractAddress"
1071
- ],
1072
- [
1073
- "EAS SchemaRegistry",
1074
- e.schemaRegistryAddress,
1075
- "set schemaRegistryAddress"
1076
- ],
1077
- [
1078
- "ManagedAccount factory",
1079
- e.thirdwebAccountFactoryAddress,
1080
- "deploy the factory or fix managedAccountFactoryAddress"
1081
- ],
1082
- [
1083
- "executor module",
1084
- e.modularAccountModuleContract?.trim() || void 0,
1085
- "deploy the module or fix modularAccountModuleContract"
1086
- ]
1087
- ], a = await Promise.all(i.map(async ([e, n, r]) => n ? await k(n) ? null : `no ${e} at ${n} on ${t.name}; ${r}.` : null));
1088
- for (let e of a) e && n.push(e);
1089
- if (n.length > 0) throw new K(t.id, n);
1090
- }
1091
- function gt(e) {
1092
- try {
1093
- let t = new URL(e);
1094
- return `${t.protocol}//${t.host}`;
1095
- } catch {
1096
- return "configured rpcUrl";
1097
- }
1098
- }
1099
- function _t() {
1100
- let e = mt();
1101
- if (q?.key === e) return q.result;
1102
- let t = ht();
1103
- return q = {
1104
- key: e,
1105
- result: t
1106
- }, t.catch(() => {
1107
- q?.result === t && (q = null);
1108
- }), t;
1109
- }
1110
- //#endregion
1111
- //#region src/services/revoke/revokeAttestations.ts
1112
- async function vt(e) {
1113
- if (!e) return !1;
1114
- let t = s();
1115
- if (!t) return !1;
1116
- let n = await t(), r = e.toLowerCase();
1117
- return !!n?.some((e) => e?.toLowerCase() === r);
1118
- }
1119
- async function yt(e, t) {
1120
- if (!t || !Y().modularAccountModuleContract?.trim()) return !1;
1121
- let n = e.signer?.address;
1122
- if (!n || n.toLowerCase() === t.toLowerCase()) return !1;
1123
- try {
1124
- let { isAutomationSessionActive: e } = await import("./ensureAutomationSessionKey-CeUbjcCl.js").then((e) => e.n);
1125
- return await e(t, n);
1126
- } catch {
1127
- return !1;
1128
- }
1129
- }
1130
- async function bt(e) {
1131
- let { seedLocalId: t, seedUid: n, seedSchemaUid: a } = e;
1132
- await i(), await _t();
1133
- let s = await o({
1134
- seedLocalId: t,
1135
- seedUid: n
1136
- });
1137
- if (await vt(s)) throw Error("Revocation not supported for items attested by the Seed executor module: the executor has no revoke and is the only attester that could revoke them.");
1138
- let u = R();
1139
- if (!u) try {
1140
- let { getConnectedAccount: e } = await import("./publishAuthorization-DjVrnMC0.js").then((e) => e.V), { resolveRevokeAccount: t } = await import("./resolveRevokeAccount-mzR11KJ4.js"), n = await e();
1141
- if (!n) throw Error("No wallet connected. Connect a wallet to revoke attestations.");
1142
- u = G(await t({
1143
- account: n,
1144
- attester: s
1145
- }));
1146
- } catch (e) {
1147
- throw e instanceof Error && e.message.includes("No wallet connected") || e instanceof Error && e.message.includes("Revocation not supported") ? e : Error("No wallet connected. Use useSeedWallet / setPublishWallet, or @seedprotocol/publish/thirdweb ConnectButton.", { cause: e });
1148
- }
1149
- let d = u.txSender;
1150
- if (await yt(u, s)) throw Error("Automation session keys cannot revoke attestations. Revoking is owner-only: connect the account that published this item.");
1151
- let [te, f] = await Promise.all([ee(n), c(n)]), p = te.map((e) => e.uid).filter((e) => l(e)), m = /* @__PURE__ */ new Map();
1152
- for (let { uid: e, schemaUid: t } of f) {
1153
- if (!l(e)) continue;
1154
- let n = m.get(t) ?? [];
1155
- n.push(e), m.set(t, n);
1156
- }
1157
- let h = [];
1158
- for (let [e, t] of m) t.length > 0 && h.push({
1159
- schema: e,
1160
- data: t.map((e) => ({ uid: e }))
1161
- });
1162
- p.length > 0 && h.push({
1163
- schema: r,
1164
- data: p.map((e) => ({ uid: e }))
1165
- }), h.push({
1166
- schema: a,
1167
- data: [{ uid: n }]
1168
- });
1169
- for (let e of h) {
1170
- if (e.data.length === 0) continue;
1171
- let t = I([e]);
1172
- try {
1173
- await O((await d.sendTransaction(t)).transactionHash);
1174
- } catch (e) {
1175
- let t = e instanceof Error ? e.message : String(e);
1176
- if (t.includes("AccessDenied") || t.includes("0x4ca88867")) throw Error("Only the original attester can revoke attestations. Connect the wallet that published this item.");
1177
- if (t.includes("AlreadyRevoked")) continue;
1178
- throw e;
1179
- }
1180
- }
1181
- let g = Math.floor(Date.now() / 1e3);
1182
- await ne({
1183
- seedLocalId: t,
1184
- revokedAt: g
1185
- });
1186
- }
1187
- //#endregion
1188
- //#region src/config.ts
1189
- le("publish");
1190
- var J = null;
1191
- function xt(e) {
1192
- J = e;
1193
- }
1194
- function St() {
1195
- return J;
1196
- }
1197
- function Ct(e) {
1198
- let t = X(e);
1199
- ce("publish", {
1200
- chainId: t.chainId,
1201
- indexerUrl: t.indexerUrl
1202
- }), xt(e), d(async () => {
1203
- let e = R();
1204
- if (e?.publisherAddress) return e.publisherAddress;
1205
- if (e?.signer?.address) return e.signer.address;
1206
- }), te(bt), import("./worker-CbtzcKG6.js").then((e) => {
1207
- e.startArweaveL1FinalizeWorker();
1208
- }), u(async () => e.useModularExecutor && e.modularAccountModuleContract ? [e.modularAccountModuleContract] : []);
1209
- }
1210
- var wt = Ct;
1211
- function Tt(e) {
1212
- let t = e?.thirdweb ?? {};
1213
- return {
1214
- bundlerUrl: t.bundlerUrl?.trim() || void 0,
1215
- sponsorGas: t.sponsorGas ?? !0,
1216
- modularWalletMode: t.modularWalletMode ?? "EIP7702"
1217
- };
1218
- }
1219
- function Y() {
1220
- let e = J;
1221
- if (!e) throw Error("@seedprotocol/publish: Call initPublish() or ensure PublishProvider is mounted with config before using the publish package");
1222
- let t = e.useArweaveBundler ?? !1, r = e.arweaveUploadVerificationBaseUrl ?? e.uploadApiBaseUrl, i = e.arweaveGraphqlUrl ?? n, a = e.useModularExecutor ?? !1, o = e.chain ?? _, s = X(e), c = e.accountMode ?? (e.bundlerUrl ? "eip7702" : "eoa");
1223
- return {
1224
- ...e,
1225
- thirdwebAccountFactoryAddress: e.managedAccountFactoryAddress ?? fe[o.id],
1226
- easContractAddress: s.easContractAddress,
1227
- schemaRegistryAddress: s.schemaRegistryAddress,
1228
- easChain: s,
1229
- useDirectEas: e.useDirectEas ?? !1,
1230
- modularAccountModuleData: e.modularAccountModuleData ?? "0x",
1231
- useModularExecutor: a,
1232
- useArweaveBundler: t,
1233
- arweaveUploadVerificationBaseUrl: r,
1234
- arweaveGraphqlUrl: i,
1235
- autoDeployManagedAccount: e.autoDeployManagedAccount ?? !1,
1236
- autoDeployEip7702ModularAccount: Et(e, a),
1237
- chain: o,
1238
- accountMode: c,
1239
- thirdweb: Tt(e)
1240
- };
1241
- }
1242
- function X(e) {
1243
- let t = e.chain ?? _;
1244
- try {
1245
- return ue(t.id, {
1246
- name: t.name,
1247
- easContractAddress: e.easContractAddress,
1248
- schemaRegistryAddress: e.schemaRegistryAddress
1249
- });
1250
- } catch (e) {
1251
- throw Error(`@seedprotocol/publish: ${t.name} (chain ${t.id}) has no known EAS deployment. Pass easContractAddress and schemaRegistryAddress in initPublish / PublishProvider config.`, { cause: e });
1252
- }
1253
- }
1254
- function Z() {
1255
- let { thirdwebAccountFactoryAddress: e, chain: t } = Y();
1256
- if (!e) throw Error(`@seedprotocol/publish: no ManagedAccount factory is known for ${t.name} (chain ${t.id}). Pass managedAccountFactoryAddress in publish config, or use the EOA / direct EAS path.`);
1257
- return e;
1258
- }
1259
- function Et(e, t) {
1260
- return e.autoDeployEip7702ModularAccount === !0 || e.autoDeployEip7702ModularAccount !== !1 && t;
1261
- }
1262
- //#endregion
1263
- //#region src/helpers/chainConfig.ts
1264
- function Q() {
1265
- try {
1266
- return Y().chain ?? _;
1267
- } catch {
1268
- return _;
1269
- }
1270
- }
1271
- function $() {
1272
- let e = Y();
1273
- if (e.rpcUrl) return e.rpcUrl;
1274
- if (e.thirdwebClientId) return `https://${(e.chain ?? _).id}.rpc.thirdweb.com/${e.thirdwebClientId}`;
1275
- throw Error("@seedprotocol/publish: rpcUrl is required when thirdwebClientId is not set. A thirdwebSecretKey authenticates Thirdweb RPC but does not build this URL. Pass rpcUrl or thirdwebClientId in initPublish / PublishProvider config.");
1276
- }
1277
- function Dt() {
1278
- return Q().name;
1279
- }
1280
- //#endregion
1281
- export { ze as $, Qe as A, j as B, B as C, H as D, V as E, F, A as G, N as H, qe as I, Me as J, Ge as K, Je as L, P as M, Ye as N, $e as O, Xe as P, Re as Q, I as R, z as S, U as T, Ae as U, M as V, Fe as W, Be as X, je as Y, Le as Z, ct as _, _e as _t, St as a, k as at, at as b, Z as c, xe as ct, K as d, v as dt, We as et, _t as f, _ as ft, dt as g, pe as gt, G as h, fe as ht, wt as i, D as it, Ke as j, R as k, X as l, S as lt, ft as m, ge as mt, $ as n, Ne as nt, Y as o, Oe as ot, pt as p, de as pt, Ie as q, Q as r, Te as rt, Ct as s, O as st, Dt as t, Pe as tt, Tt as u, be as ut, ut as v, he as vt, it as w, ot as x, st as y, me as yt, Ve as z };
1282
-
1283
- //# sourceMappingURL=chainConfig-CYy0XJ0M.js.map