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