@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,1311 +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 te, setAdditionalSyncAddresses as l, setGetPublisherForNewSeeds as u, setRevokeExecutor as d, updateSeedRevokedAt as ne } from "@seedprotocol/sdk";
4
- import { createPublicClient as f, encodeAbiParameters as re, encodeFunctionData as p, http as m, parseEventLogs as h } from "viem";
5
- import { prepareTransaction as g, sendTransaction as _ } from "thirdweb";
6
- import { ethers as v } from "ethers";
7
- import { defineChain as ie, optimismSepolia as y } from "thirdweb/chains";
8
- import { configureEasReadChain as ae, expectEasReadChain as oe, resolveEasChainDeployment as se } from "@seedprotocol/eas";
9
- //#region src/helpers/constants.ts
10
- var ce = "0x44d562ac1d7cd77e232978687fea027ace48f719cf1d58c7888e509663bb87fc", le = { 11155420: "0x76f47d88bfaf670f5208911181fcdc0e160cb16d" }, ue = "0xcd8c945872df8e664e55cf8885c85ea3ea8f2148", de = ue, fe = {
11
- SUCCESS: "success",
12
- FAILURE: "failure"
13
- }, pe = [
14
- "pollingForConfirmation",
15
- "uploadingData",
16
- "uploadingViaBundler",
17
- "uploadingViaBundlerPhase2"
18
- ], me = 3e4, b = t, he = [
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
- ], ge = [
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
- ], x = [
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: ge
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: ge
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
- ...he
182
- ], S = [{
183
- name: "schema",
184
- type: "bytes32"
185
- }, {
186
- name: "data",
187
- type: "tuple[]",
188
- components: [
189
- {
190
- name: "recipient",
191
- type: "address"
192
- },
193
- {
194
- name: "expirationTime",
195
- type: "uint64"
196
- },
197
- {
198
- name: "revocable",
199
- type: "bool"
200
- },
201
- {
202
- name: "refUID",
203
- type: "bytes32"
204
- },
205
- {
206
- name: "data",
207
- type: "bytes"
208
- },
209
- {
210
- name: "value",
211
- type: "uint256"
212
- }
213
- ]
214
- }], _e = [{
215
- type: "function",
216
- name: "multiPublish",
217
- stateMutability: "nonpayable",
218
- inputs: [{
219
- name: "requests",
220
- type: "tuple[]",
221
- components: [
222
- {
223
- name: "localId",
224
- type: "string"
225
- },
226
- {
227
- name: "seedUid",
228
- type: "bytes32"
229
- },
230
- {
231
- name: "seedSchemaUid",
232
- type: "bytes32"
233
- },
234
- {
235
- name: "versionUid",
236
- type: "bytes32"
237
- },
238
- {
239
- name: "versionSchemaUid",
240
- type: "bytes32"
241
- },
242
- {
243
- name: "seedIsRevocable",
244
- type: "bool"
245
- },
246
- {
247
- name: "listOfAttestations",
248
- type: "tuple[]",
249
- components: S
250
- },
251
- {
252
- name: "propertiesToUpdate",
253
- type: "tuple[]",
254
- components: [{
255
- name: "publishLocalId",
256
- type: "string"
257
- }, {
258
- name: "propertySchemaUid",
259
- type: "bytes32"
260
- }]
261
- }
262
- ]
263
- }],
264
- outputs: [{ type: "bytes32[]" }]
265
- }], ve = [{
266
- type: "function",
267
- name: "multiPublish",
268
- stateMutability: "nonpayable",
269
- inputs: [{
270
- name: "requests",
271
- type: "tuple[]",
272
- components: [
273
- {
274
- name: "localIdIndex",
275
- type: "uint256"
276
- },
277
- {
278
- name: "seedUid",
279
- type: "bytes32"
280
- },
281
- {
282
- name: "seedSchemaUid",
283
- type: "bytes32"
284
- },
285
- {
286
- name: "versionUid",
287
- type: "bytes32"
288
- },
289
- {
290
- name: "versionSchemaUid",
291
- type: "bytes32"
292
- },
293
- {
294
- name: "seedIsRevocable",
295
- type: "bool"
296
- },
297
- {
298
- name: "listOfAttestations",
299
- type: "tuple[]",
300
- components: S
301
- },
302
- {
303
- name: "propertiesToUpdate",
304
- type: "tuple[]",
305
- components: [{
306
- name: "publishLocalIdIndex",
307
- type: "uint256"
308
- }, {
309
- name: "propertySchemaUid",
310
- type: "bytes32"
311
- }]
312
- }
313
- ]
314
- }],
315
- outputs: [{ type: "bytes32[]" }]
316
- }], C = [
317
- {
318
- type: "function",
319
- name: "getEas",
320
- stateMutability: "view",
321
- inputs: [],
322
- outputs: [{ type: "address" }]
323
- },
324
- {
325
- type: "function",
326
- name: "setEas",
327
- stateMutability: "nonpayable",
328
- inputs: [{
329
- name: "_eas",
330
- type: "address"
331
- }],
332
- outputs: [{ type: "string" }]
333
- },
334
- {
335
- type: "function",
336
- name: "isActiveSigner",
337
- stateMutability: "view",
338
- inputs: [{
339
- name: "signer",
340
- type: "address"
341
- }],
342
- outputs: [{ type: "bool" }]
343
- }
344
- ], ye = [{
345
- type: "event",
346
- name: "CreatedAttestation",
347
- inputs: [{
348
- name: "result",
349
- type: "tuple",
350
- indexed: !1,
351
- components: [{
352
- name: "schemaUid",
353
- type: "bytes32"
354
- }, {
355
- name: "attestationUid",
356
- type: "bytes32"
357
- }]
358
- }]
359
- }, {
360
- type: "event",
361
- name: "SeedPublished",
362
- inputs: [{
363
- name: "returnedDataFromEAS",
364
- type: "bytes",
365
- indexed: !1
366
- }]
367
- }], be = [{
368
- type: "function",
369
- name: "getAddress",
370
- stateMutability: "view",
371
- inputs: [{
372
- name: "_adminSigner",
373
- type: "address"
374
- }, {
375
- name: "_data",
376
- type: "bytes"
377
- }],
378
- outputs: [{ type: "address" }]
379
- }, {
380
- type: "function",
381
- name: "createAccount",
382
- stateMutability: "nonpayable",
383
- inputs: [{
384
- name: "_admin",
385
- type: "address"
386
- }, {
387
- name: "_data",
388
- type: "bytes"
389
- }],
390
- outputs: [{ type: "address" }]
391
- }], xe = [{
392
- type: "event",
393
- name: "CreatedAttestation",
394
- inputs: [{
395
- name: "result",
396
- type: "tuple",
397
- indexed: !1,
398
- components: [{
399
- name: "schemaUid",
400
- type: "bytes32"
401
- }, {
402
- name: "attestationUid",
403
- type: "bytes32"
404
- }]
405
- }]
406
- }, {
407
- type: "event",
408
- name: "SeedPublished",
409
- inputs: [{
410
- name: "seedUid",
411
- type: "bytes32",
412
- indexed: !1
413
- }, {
414
- name: "versionUid",
415
- type: "bytes32",
416
- indexed: !1
417
- }]
418
- }], w = [
419
- {
420
- type: "function",
421
- name: "multiPublish",
422
- stateMutability: "payable",
423
- inputs: [{
424
- name: "requests",
425
- type: "tuple[]",
426
- components: [
427
- {
428
- name: "localId",
429
- type: "string"
430
- },
431
- {
432
- name: "seedUid",
433
- type: "bytes32"
434
- },
435
- {
436
- name: "versionUid",
437
- type: "bytes32"
438
- },
439
- {
440
- name: "seedSchemaUid",
441
- type: "bytes32"
442
- },
443
- {
444
- name: "versionSchemaUid",
445
- type: "bytes32"
446
- },
447
- {
448
- name: "seedIsRevocable",
449
- type: "bool"
450
- },
451
- {
452
- name: "listOfAttestations",
453
- type: "tuple[]",
454
- components: [{
455
- name: "schema",
456
- type: "bytes32"
457
- }, {
458
- name: "data",
459
- type: "tuple[]",
460
- components: [
461
- {
462
- name: "recipient",
463
- type: "address"
464
- },
465
- {
466
- name: "expirationTime",
467
- type: "uint64"
468
- },
469
- {
470
- name: "revocable",
471
- type: "bool"
472
- },
473
- {
474
- name: "refUID",
475
- type: "bytes32"
476
- },
477
- {
478
- name: "data",
479
- type: "bytes"
480
- },
481
- {
482
- name: "value",
483
- type: "uint256"
484
- }
485
- ]
486
- }]
487
- },
488
- {
489
- name: "propertiesToUpdate",
490
- type: "tuple[]",
491
- components: [{
492
- name: "publishIndex",
493
- type: "uint256"
494
- }, {
495
- name: "propertySchemaUid",
496
- type: "bytes32"
497
- }]
498
- }
499
- ]
500
- }],
501
- outputs: [{
502
- name: "",
503
- type: "bytes32[]"
504
- }]
505
- },
506
- {
507
- type: "function",
508
- name: "isInitialized",
509
- stateMutability: "view",
510
- inputs: [{
511
- name: "account",
512
- type: "address"
513
- }],
514
- outputs: [{
515
- name: "",
516
- type: "bool"
517
- }]
518
- },
519
- {
520
- type: "function",
521
- name: "getEAS",
522
- stateMutability: "view",
523
- inputs: [{
524
- name: "account",
525
- type: "address"
526
- }],
527
- outputs: [{
528
- name: "",
529
- type: "address"
530
- }]
531
- },
532
- {
533
- type: "error",
534
- name: "AlreadyInitialized",
535
- inputs: [{
536
- name: "account",
537
- type: "address"
538
- }]
539
- },
540
- {
541
- type: "error",
542
- name: "NotInitialized",
543
- inputs: [{
544
- name: "account",
545
- type: "address"
546
- }]
547
- },
548
- {
549
- type: "error",
550
- name: "InvalidEASAddress",
551
- inputs: []
552
- },
553
- {
554
- type: "error",
555
- name: "AttestationFailed",
556
- inputs: []
557
- },
558
- {
559
- type: "error",
560
- name: "MultiAttestFailed",
561
- inputs: []
562
- }
563
- ], T = [{
564
- type: "function",
565
- name: "getSchema",
566
- stateMutability: "view",
567
- inputs: [{
568
- name: "uid",
569
- type: "bytes32"
570
- }],
571
- outputs: [{
572
- name: "",
573
- type: "tuple",
574
- components: [
575
- {
576
- name: "uid",
577
- type: "bytes32"
578
- },
579
- {
580
- name: "resolver",
581
- type: "address"
582
- },
583
- {
584
- name: "revocable",
585
- type: "bool"
586
- },
587
- {
588
- name: "schema",
589
- type: "string"
590
- }
591
- ]
592
- }]
593
- }, {
594
- type: "function",
595
- name: "register",
596
- stateMutability: "nonpayable",
597
- inputs: [
598
- {
599
- name: "schema",
600
- type: "string"
601
- },
602
- {
603
- name: "resolver",
604
- type: "address"
605
- },
606
- {
607
- name: "revocable",
608
- type: "bool"
609
- }
610
- ],
611
- outputs: [{ type: "bytes32" }]
612
- }], E = null, D = null;
613
- function Se() {
614
- try {
615
- let e = Y().thirdwebSecretKey;
616
- return e ? { headers: { "x-secret-key": e } } : void 0;
617
- } catch {
618
- return;
619
- }
620
- }
621
- function Ce() {
622
- let e = Q(), t = $(), n = Se();
623
- return f({
624
- chain: e,
625
- transport: m(t, n ? { fetchOptions: n } : void 0)
626
- });
627
- }
628
- function O() {
629
- let e = Q(), t = $(), n = "";
630
- try {
631
- n = Y().thirdwebSecretKey ?? "";
632
- } catch {
633
- n = "";
634
- }
635
- let r = `${e.id}:${t}:${n ? "1" : "0"}:${n}`;
636
- return (!E || D !== r) && (D = r, E = Ce()), E;
637
- }
638
- async function k(e) {
639
- return O().waitForTransactionReceipt({ hash: e });
640
- }
641
- async function A(e) {
642
- let t = await O().getBytecode({ address: e });
643
- return !!t && t !== "0x";
644
- }
645
- async function we(e) {
646
- try {
647
- let t = await O().getBlock({ blockNumber: e });
648
- if (t?.timestamp != null) return Number(t.timestamp) * 1e3;
649
- } catch {}
650
- return null;
651
- }
652
- var Te = 5, Ee = 6e3;
653
- async function De(e, t = Te, n = Ee) {
654
- for (let r = 0; r < t; r++) {
655
- if (await A(e)) return !0;
656
- r < t - 1 && await new Promise((e) => {
657
- setTimeout(e, n);
658
- });
659
- }
660
- return !1;
661
- }
662
- //#endregion
663
- //#region src/helpers/contracts/index.ts
664
- function Oe(e, t, n) {
665
- return {
666
- to: e,
667
- data: p({
668
- abi: _e,
669
- functionName: "multiPublish",
670
- args: [t]
671
- }),
672
- gas: n
673
- };
674
- }
675
- function ke(e, t, n) {
676
- return {
677
- to: e,
678
- data: p({
679
- abi: ve,
680
- functionName: "multiPublish",
681
- args: [t]
682
- }),
683
- gas: n
684
- };
685
- }
686
- function Ae(e, t, n) {
687
- let r = /* @__PURE__ */ new Map();
688
- t.forEach((e, t) => {
689
- e.localId && r.set(e.localId, BigInt(t));
690
- });
691
- let i = t.map((e) => ({
692
- localId: e.localId,
693
- seedUid: e.seedUid,
694
- versionUid: e.versionUid,
695
- seedSchemaUid: e.seedSchemaUid,
696
- versionSchemaUid: e.versionSchemaUid,
697
- seedIsRevocable: e.seedIsRevocable,
698
- listOfAttestations: e.listOfAttestations,
699
- propertiesToUpdate: (e.propertiesToUpdate ?? []).flatMap((e) => {
700
- let t = e.publishLocalId ? r.get(e.publishLocalId) : void 0;
701
- return t === void 0 ? [] : [{
702
- publishIndex: t,
703
- propertySchemaUid: e.propertySchemaUid
704
- }];
705
- })
706
- }));
707
- return {
708
- to: e,
709
- data: p({
710
- abi: w,
711
- functionName: "multiPublish",
712
- args: [i]
713
- }),
714
- gas: n
715
- };
716
- }
717
- async function je(e, t) {
718
- return O().readContract({
719
- address: e,
720
- abi: w,
721
- functionName: "isInitialized",
722
- args: [t]
723
- });
724
- }
725
- async function Me(e, t) {
726
- return O().readContract({
727
- address: e,
728
- abi: w,
729
- functionName: "getEAS",
730
- args: [t]
731
- });
732
- }
733
- function Ne(e, t) {
734
- return {
735
- to: e,
736
- data: p({
737
- abi: C,
738
- functionName: "setEas",
739
- args: [t]
740
- })
741
- };
742
- }
743
- async function Pe(e) {
744
- return O().readContract({
745
- address: e,
746
- abi: C,
747
- functionName: "getEas"
748
- });
749
- }
750
- async function Fe(e, t) {
751
- return O().readContract({
752
- address: e,
753
- abi: C,
754
- functionName: "isActiveSigner",
755
- args: [t]
756
- });
757
- }
758
- async function Ie(e, t = "0x") {
759
- return O().readContract({
760
- address: Z(),
761
- abi: be,
762
- functionName: "getAddress",
763
- args: [e, t]
764
- });
765
- }
766
- function Le(e, t = "0x") {
767
- return {
768
- to: Z(),
769
- data: p({
770
- abi: be,
771
- functionName: "createAccount",
772
- args: [e, t]
773
- })
774
- };
775
- }
776
- var Re = "0x0000000000000000000000000000000000000000";
777
- function j(e) {
778
- let { easContractAddress: t } = Y();
779
- return {
780
- to: t,
781
- data: p({
782
- abi: x,
783
- functionName: "attest",
784
- args: [{
785
- schema: e.schema,
786
- data: {
787
- recipient: e.data.recipient ?? Re,
788
- expirationTime: e.data.expirationTime ?? 0n,
789
- revocable: e.data.revocable ?? !0,
790
- refUID: e.data.refUID,
791
- data: e.data.data,
792
- value: e.data.value ?? 0n
793
- }
794
- }]
795
- })
796
- };
797
- }
798
- function M(e) {
799
- let { easContractAddress: t } = Y();
800
- return {
801
- to: t,
802
- data: p({
803
- abi: x,
804
- functionName: "multiAttest",
805
- args: [e]
806
- })
807
- };
808
- }
809
- function N(e) {
810
- let { easContractAddress: t } = Y();
811
- return {
812
- to: t,
813
- data: p({
814
- abi: x,
815
- functionName: "multiRevoke",
816
- args: [e.map((e) => ({
817
- schema: e.schema,
818
- data: e.data.map((e) => ({
819
- uid: e.uid,
820
- value: e.value ?? 0n
821
- }))
822
- }))]
823
- })
824
- };
825
- }
826
- var ze = "0x" + "0".repeat(64);
827
- async function Be(e) {
828
- let t = await O().readContract({
829
- address: Y().schemaRegistryAddress,
830
- abi: T,
831
- functionName: "getSchema",
832
- args: [e]
833
- });
834
- return !t || t.uid === ze ? null : {
835
- uid: t.uid,
836
- resolver: t.resolver,
837
- revocable: t.revocable,
838
- schema: t.schema
839
- };
840
- }
841
- function Ve(e) {
842
- return {
843
- to: Y().schemaRegistryAddress,
844
- data: p({
845
- abi: T,
846
- functionName: "register",
847
- args: [
848
- e.schema,
849
- e.resolverAddress,
850
- e.revocable
851
- ]
852
- })
853
- };
854
- }
855
- //#endregion
856
- //#region src/helpers/easDirect.ts
857
- var He = "0x0000000000000000000000000000000000000000", P = "0x" + "0".repeat(64);
858
- function Ue(e) {
859
- return j(e);
860
- }
861
- function We(e) {
862
- return M(e);
863
- }
864
- function Ge(e) {
865
- return re([{ type: "bytes32" }], [e]);
866
- }
867
- function Ke(e, t) {
868
- return F(e, t)[0]?.uid;
869
- }
870
- function F(e, t) {
871
- if (!e.logs?.length) return [];
872
- let n = t.toLowerCase(), r = e.logs.filter((e) => e.address && e.address.toLowerCase() === n);
873
- if (!r.length) return [];
874
- try {
875
- let e = h({
876
- abi: x,
877
- eventName: "Attested",
878
- logs: r,
879
- strict: !1
880
- }), t = [];
881
- for (let n of e) {
882
- let e = n.args?.uid, r = n.args?.schemaUID;
883
- e && e !== P && r && t.push({
884
- schemaUid: r,
885
- uid: e
886
- });
887
- }
888
- return t;
889
- } catch {
890
- return [];
891
- }
892
- }
893
- function I(e, t = {}) {
894
- if (!t.viaExecutorModule) return N(e);
895
- let n = Y().modularAccountModuleContract?.trim();
896
- if (!n || !/^0x[0-9a-fA-F]{40}$/.test(n)) throw Error("@seedprotocol/publish: revoking via the executor module requires PublishConfig.modularAccountModuleContract");
897
- return qe(n, e);
898
- }
899
- function qe(e, t) {
900
- return {
901
- to: e,
902
- data: p({
903
- abi: x,
904
- functionName: "multiRevoke",
905
- args: [t.map((e) => ({
906
- schema: e.schema,
907
- data: e.data.map((e) => ({
908
- uid: e.uid,
909
- value: e.value ?? 0n
910
- }))
911
- }))]
912
- })
913
- };
914
- }
915
- //#endregion
916
- //#region src/helpers/publishWalletRegistry.ts
917
- var L = null;
918
- function Je() {
919
- return a.isInitialized() ? Promise.resolve() : new Promise((e) => {
920
- a.onReady(() => e());
921
- });
922
- }
923
- async function Ye(e) {
924
- if (L = e, !e) return;
925
- await Je();
926
- let t = /* @__PURE__ */ new Set();
927
- for (let n of e.ownedAddresses ?? []) n && t.add(n.toLowerCase());
928
- t.add(e.signer.address.toLowerCase()), t.add(e.txSender.address.toLowerCase()), e.publisherAddress && t.add(e.publisherAddress.toLowerCase());
929
- try {
930
- await a.setAddresses({ owned: [...t] });
931
- let n = e.publisherAddress ?? e.signer.address;
932
- n && await a.claimUnpublishedDrafts(n);
933
- } catch (e) {
934
- console.warn("[publishWalletRegistry] Failed to set seed client addresses:", e);
935
- }
936
- }
937
- function R() {
938
- return L;
939
- }
940
- function Xe() {
941
- L = null;
942
- }
943
- //#endregion
944
- //#region src/helpers/seedSigner.ts
945
- var Ze = Symbol.for("seedprotocol.SeedSigner"), Qe = Symbol.for("seedprotocol.SeedTxSender");
946
- function z(e) {
947
- return Object.assign(e, { [Ze]: !0 });
948
- }
949
- function B(e) {
950
- return Object.assign(e, { [Qe]: !0 });
951
- }
952
- function V(e) {
953
- return !!e && typeof e == "object" && Ze in e;
954
- }
955
- function H(e) {
956
- return !!e && typeof e == "object" && Qe in e;
957
- }
958
- function U(e) {
959
- return !!e && typeof e == "object" && "signer" in e && "txSender" in e && V(e.signer) && H(e.txSender);
960
- }
961
- function $e(e) {
962
- let t = e.address;
963
- return {
964
- signer: z({
965
- address: t,
966
- signMessage: async ({ message: t }) => {
967
- if (typeof t == "string") return await e.signMessage(t);
968
- let n = t.raw, r = typeof n == "string" ? v.getBytes(n) : n instanceof Uint8Array ? n : new Uint8Array(n);
969
- return await e.signMessage(r);
970
- }
971
- }),
972
- txSender: B({
973
- address: t,
974
- sendTransaction: async (t) => ({ transactionHash: (await e.sendTransaction({
975
- to: t.to,
976
- data: t.data,
977
- value: t.value,
978
- gasLimit: t.gas
979
- })).hash })
980
- })
981
- };
982
- }
983
- function et(e) {
984
- if (U(e)) return e.signer;
985
- if (V(e)) return e;
986
- throw Error("@seedprotocol/publish: expected a SeedSigner or PublishWallet. Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
987
- }
988
- function tt(e) {
989
- if (U(e)) return e.txSender;
990
- if (H(e)) return e;
991
- throw Error("@seedprotocol/publish: expected a SeedTxSender or PublishWallet. Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
992
- }
993
- function nt(e) {
994
- if (U(e)) return e;
995
- throw Error("@seedprotocol/publish: expected a PublishWallet (signer + txSender). Use fromEthersWallet, fromEip1193Provider, or fromThirdwebAccount.");
996
- }
997
- //#endregion
998
- //#region src/helpers/thirdwebChain.ts
999
- var W = null;
1000
- function rt(e = Q()) {
1001
- if (W?.id === e.id) return W.chain;
1002
- let t = e.id === y.id ? y : ie({
1003
- id: e.id,
1004
- name: e.name,
1005
- nativeCurrency: e.nativeCurrency,
1006
- testnet: e.testnet ? !0 : void 0,
1007
- blockExplorers: e.blockExplorers ? Object.values(e.blockExplorers).map(({ name: e, url: t, apiUrl: n }) => ({
1008
- name: e,
1009
- url: t,
1010
- apiUrl: n
1011
- })) : void 0
1012
- });
1013
- return W = {
1014
- id: e.id,
1015
- chain: t
1016
- }, t;
1017
- }
1018
- //#endregion
1019
- //#region src/helpers/adapters/thirdwebAccount.ts
1020
- var it = /* @__PURE__ */ e({
1021
- asSeedSignerFromThirdweb: () => ot,
1022
- asThirdwebPublishWallet: () => at,
1023
- fromThirdwebAccount: () => G
1024
- });
1025
- function G(e, t) {
1026
- let n = t?.client, r = e.address;
1027
- return {
1028
- signer: z({
1029
- address: r,
1030
- signMessage: async ({ message: t }) => await e.signMessage({ message: t })
1031
- }),
1032
- txSender: B({
1033
- address: r,
1034
- sendTransaction: async (t) => {
1035
- let r = n ?? (await import("./publishThirdwebClient-DroRrOFQ.js").then((e) => e.n)).getClient(), i = rt(), a = g({
1036
- client: r,
1037
- chain: i,
1038
- to: t.to,
1039
- data: t.data,
1040
- value: t.value,
1041
- gas: t.gas
1042
- });
1043
- return { transactionHash: (await _({
1044
- account: e,
1045
- transaction: a
1046
- })).transactionHash };
1047
- }
1048
- })
1049
- };
1050
- }
1051
- function at(e, t) {
1052
- if (U(e)) return e;
1053
- if (V(e)) throw Error("@seedprotocol/publish/thirdweb: SeedSigner alone cannot send sponsored txs. Pass fromThirdwebAccount(account) or a PublishWallet.");
1054
- return G(e, t);
1055
- }
1056
- function ot(e) {
1057
- return U(e) ? e.signer : V(e) ? e : G(e).signer;
1058
- }
1059
- //#endregion
1060
- //#region src/helpers/verifyPublishChain.ts
1061
- var K = class extends Error {
1062
- chainId;
1063
- problems;
1064
- name = "PublishChainConfigError";
1065
- constructor(e, t) {
1066
- super(`@seedprotocol/publish: chain ${e} is not set up for publishing:\n- ${t.join("\n- ")}`), this.chainId = e, this.problems = t;
1067
- }
1068
- }, q = null;
1069
- function st() {
1070
- let e = Y();
1071
- return [
1072
- e.chain.id,
1073
- $(),
1074
- e.easContractAddress,
1075
- e.schemaRegistryAddress,
1076
- e.thirdwebAccountFactoryAddress ?? "",
1077
- e.modularAccountModuleContract ?? ""
1078
- ].join("|").toLowerCase();
1079
- }
1080
- async function ct() {
1081
- let e = Y(), { chain: t } = e, n = [], r;
1082
- try {
1083
- r = await O().getChainId();
1084
- } catch (e) {
1085
- throw new K(t.id, [`could not reach the RPC (${lt($())}): ${e instanceof Error ? e.message : String(e)}`]);
1086
- }
1087
- 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}.`]);
1088
- let i = [
1089
- [
1090
- "EAS contract",
1091
- e.easContractAddress,
1092
- "set easContractAddress"
1093
- ],
1094
- [
1095
- "EAS SchemaRegistry",
1096
- e.schemaRegistryAddress,
1097
- "set schemaRegistryAddress"
1098
- ],
1099
- [
1100
- "ManagedAccount factory",
1101
- e.thirdwebAccountFactoryAddress,
1102
- "deploy the factory or fix managedAccountFactoryAddress"
1103
- ],
1104
- [
1105
- "executor module",
1106
- e.modularAccountModuleContract?.trim() || void 0,
1107
- "deploy the module or fix modularAccountModuleContract"
1108
- ]
1109
- ], a = await Promise.all(i.map(async ([e, n, r]) => n ? await A(n) ? null : `no ${e} at ${n} on ${t.name}; ${r}.` : null));
1110
- for (let e of a) e && n.push(e);
1111
- if (n.length > 0) throw new K(t.id, n);
1112
- }
1113
- function lt(e) {
1114
- try {
1115
- let t = new URL(e);
1116
- return `${t.protocol}//${t.host}`;
1117
- } catch {
1118
- return "configured rpcUrl";
1119
- }
1120
- }
1121
- function ut() {
1122
- let e = st();
1123
- if (q?.key === e) return q.result;
1124
- let t = ct();
1125
- return q = {
1126
- key: e,
1127
- result: t
1128
- }, t.catch(() => {
1129
- q?.result === t && (q = null);
1130
- }), t;
1131
- }
1132
- //#endregion
1133
- //#region src/services/revoke/revokeAttestations.ts
1134
- async function dt(e) {
1135
- if (!e) return !1;
1136
- let t = s();
1137
- if (!t) return !1;
1138
- let n = await t(), r = e.toLowerCase();
1139
- return !!n?.some((e) => e?.toLowerCase() === r);
1140
- }
1141
- async function ft(e, t) {
1142
- if (!t || !Y().modularAccountModuleContract?.trim()) return !1;
1143
- let n = e.signer?.address;
1144
- if (!n || n.toLowerCase() === t.toLowerCase()) return !1;
1145
- try {
1146
- let { isAutomationSessionActive: e } = await import("./ensureAutomationSessionKey-Dyfk8qVp.js").then((e) => e.n);
1147
- return await e(t, n);
1148
- } catch {
1149
- return !1;
1150
- }
1151
- }
1152
- async function pt(e) {
1153
- let { seedLocalId: t, seedUid: n, seedSchemaUid: a } = e;
1154
- await i(), await ut();
1155
- let s = await o({
1156
- seedLocalId: t,
1157
- seedUid: n
1158
- }), l = !1, u = R();
1159
- if (!u) try {
1160
- let { getConnectedAccount: e } = await import("./publishAuthorization-DEriY_jm.js").then((e) => e.H), { resolveRevokeAccount: t } = await import("./resolveRevokeAccount-B7ImSb4Y.js"), n = await e();
1161
- if (!n) throw Error("No wallet connected. Connect a wallet to revoke attestations.");
1162
- u = G(await t({
1163
- account: n,
1164
- attester: s
1165
- }));
1166
- } catch (e) {
1167
- 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 });
1168
- }
1169
- else if (await dt(s)) {
1170
- l = !0;
1171
- let { modularAccountModuleContract: e } = Y();
1172
- if (!e?.trim()) throw Error("Revocation not supported for items published via the modular executor.");
1173
- }
1174
- let d = u.txSender, f = await ft(u, s);
1175
- if (f) {
1176
- let { assertExecutorModuleReadyForAccount: e } = await import("./publishAuthorization-DEriY_jm.js").then((e) => e.b);
1177
- await e(s);
1178
- }
1179
- let re = f || l, [p, m] = await Promise.all([ee(n), c(n)]), h = p.map((e) => e.uid).filter((e) => te(e)), g = /* @__PURE__ */ new Map();
1180
- for (let { uid: e, schemaUid: t } of m) {
1181
- if (!te(e)) continue;
1182
- let n = g.get(t) ?? [];
1183
- n.push(e), g.set(t, n);
1184
- }
1185
- let _ = [];
1186
- for (let [e, t] of g) t.length > 0 && _.push({
1187
- schema: e,
1188
- data: t.map((e) => ({ uid: e }))
1189
- });
1190
- h.length > 0 && _.push({
1191
- schema: r,
1192
- data: h.map((e) => ({ uid: e }))
1193
- }), _.push({
1194
- schema: a,
1195
- data: [{ uid: n }]
1196
- });
1197
- for (let e of _) {
1198
- if (e.data.length === 0) continue;
1199
- let t = I([e], { viaExecutorModule: re });
1200
- if (f) {
1201
- let { simulateCallFromAccount: e } = await import("./publishAuthorization-DEriY_jm.js").then((e) => e.b);
1202
- await e({
1203
- managedAddress: s,
1204
- tx: t,
1205
- action: "multiRevoke via the executor module"
1206
- });
1207
- }
1208
- try {
1209
- await k((await d.sendTransaction(t)).transactionHash);
1210
- } catch (e) {
1211
- let t = e instanceof Error ? e.message : String(e);
1212
- if (t.includes("AccessDenied") || t.includes("0x4ca88867")) throw Error("Only the original attester can revoke attestations. Connect the wallet that published this item.");
1213
- if (t.includes("AlreadyRevoked")) continue;
1214
- throw e;
1215
- }
1216
- }
1217
- let v = Math.floor(Date.now() / 1e3);
1218
- await ne({
1219
- seedLocalId: t,
1220
- revokedAt: v
1221
- });
1222
- }
1223
- //#endregion
1224
- //#region src/config.ts
1225
- oe("publish");
1226
- var J = null;
1227
- function mt(e) {
1228
- J = e;
1229
- }
1230
- function ht() {
1231
- return J;
1232
- }
1233
- function gt(e) {
1234
- let t = X(e);
1235
- ae("publish", {
1236
- chainId: t.chainId,
1237
- indexerUrl: t.indexerUrl
1238
- }), mt(e), u(async () => {
1239
- let e = R();
1240
- if (e?.publisherAddress) return e.publisherAddress;
1241
- if (e?.signer?.address) return e.signer.address;
1242
- }), d(pt), import("./worker-BgErCNTb.js").then((e) => {
1243
- e.startArweaveL1FinalizeWorker();
1244
- }), l(async () => e.useModularExecutor && e.modularAccountModuleContract ? [e.modularAccountModuleContract] : []);
1245
- }
1246
- var _t = gt;
1247
- function Y() {
1248
- let e = J;
1249
- if (!e) throw Error("@seedprotocol/publish: Call initPublish() or ensure PublishProvider is mounted with config before using the publish package");
1250
- let t = e.useArweaveBundler ?? !1, r = e.arweaveUploadVerificationBaseUrl ?? e.uploadApiBaseUrl, i = e.arweaveGraphqlUrl ?? n, a = e.useModularExecutor ?? !1, o = e.chain ?? b, s = X(e), c = e.accountMode ?? (e.bundlerUrl ? "eip7702" : "eoa");
1251
- return {
1252
- ...e,
1253
- thirdwebAccountFactoryAddress: e.managedAccountFactoryAddress ?? le[o.id],
1254
- easContractAddress: s.easContractAddress,
1255
- schemaRegistryAddress: s.schemaRegistryAddress,
1256
- easChain: s,
1257
- useIntegerLocalIds: e.useIntegerLocalIds ?? !1,
1258
- useDirectEas: e.useDirectEas ?? !1,
1259
- modularAccountModuleData: e.modularAccountModuleData ?? "0x",
1260
- useModularExecutor: a,
1261
- useArweaveBundler: t,
1262
- arweaveUploadVerificationBaseUrl: r,
1263
- arweaveGraphqlUrl: i,
1264
- autoDeployManagedAccount: e.autoDeployManagedAccount ?? !1,
1265
- autoDeployEip7702ModularAccount: vt(e, a),
1266
- chain: o,
1267
- accountMode: c
1268
- };
1269
- }
1270
- function X(e) {
1271
- let t = e.chain ?? b;
1272
- try {
1273
- return se(t.id, {
1274
- name: t.name,
1275
- easContractAddress: e.easContractAddress,
1276
- schemaRegistryAddress: e.schemaRegistryAddress
1277
- });
1278
- } catch (e) {
1279
- throw Error(`@seedprotocol/publish: ${t.name} (chain ${t.id}) has no known EAS deployment. Pass easContractAddress and schemaRegistryAddress in initPublish / PublishProvider config.`, { cause: e });
1280
- }
1281
- }
1282
- function Z() {
1283
- let { thirdwebAccountFactoryAddress: e, chain: t } = Y();
1284
- 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.`);
1285
- return e;
1286
- }
1287
- function vt(e, t) {
1288
- return e.autoDeployEip7702ModularAccount === !0 || e.autoDeployEip7702ModularAccount !== !1 && t;
1289
- }
1290
- //#endregion
1291
- //#region src/helpers/chainConfig.ts
1292
- function Q() {
1293
- try {
1294
- return Y().chain ?? b;
1295
- } catch {
1296
- return b;
1297
- }
1298
- }
1299
- function $() {
1300
- let e = Y();
1301
- if (e.rpcUrl) return e.rpcUrl;
1302
- if (e.thirdwebClientId) return `https://${(e.chain ?? b).id}.rpc.thirdweb.com/${e.thirdwebClientId}`;
1303
- 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.");
1304
- }
1305
- function yt() {
1306
- return Q().name;
1307
- }
1308
- //#endregion
1309
- export { O as $, P as A, N as B, U as C, R as D, Xe as E, We as F, Ne as G, Oe as H, I, Ie as J, Me as K, Le as L, Ke as M, F as N, Ye as O, Ue as P, we as Q, j as R, $e as S, H as T, ke as U, Ae as V, Ve as W, Fe as X, Pe as Y, Be as Z, nt as _, ht as a, ye as at, z as b, Z as c, ce as ct, ut as d, ue as dt, A as et, ot as f, me as ft, rt as g, it as h, _t as i, w as it, Ge as j, He as k, X as l, pe as lt, G as m, de as mt, $ as n, k as nt, Y as o, x as ot, at as p, fe as pt, je as q, Q as r, xe as rt, gt as s, b as st, yt as t, De as tt, K as u, le as ut, et as v, V as w, B as x, tt as y, M as z };
1310
-
1311
- //# sourceMappingURL=chainConfig-CfVGYAsY.js.map