@seedprotocol/publish 0.6.7 → 0.6.8

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 (255) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +69 -11
  3. package/dist/chainConfig-3sSqEVQh.js +1433 -0
  4. package/dist/chainConfig-3sSqEVQh.js.map +1 -0
  5. package/dist/chainConfig-3wlYarAG.js +1433 -0
  6. package/dist/chainConfig-3wlYarAG.js.map +1 -0
  7. package/dist/chainConfig-BRcsMopd.js +1442 -0
  8. package/dist/chainConfig-BRcsMopd.js.map +1 -0
  9. package/dist/chainConfig-BYm5OXpk.js +1433 -0
  10. package/dist/chainConfig-BYm5OXpk.js.map +1 -0
  11. package/dist/chainConfig-CfVGYAsY.js +1311 -0
  12. package/dist/chainConfig-CfVGYAsY.js.map +1 -0
  13. package/dist/chainConfig-DDA4YmAB.js +1424 -0
  14. package/dist/chainConfig-DDA4YmAB.js.map +1 -0
  15. package/dist/config-CPBd5C_b.js +1201 -0
  16. package/dist/config-CPBd5C_b.js.map +1 -0
  17. package/dist/config-DkIapO94.js +955 -0
  18. package/dist/config-DkIapO94.js.map +1 -0
  19. package/dist/config-EQZZNH9H.js +955 -0
  20. package/dist/config-EQZZNH9H.js.map +1 -0
  21. package/dist/config.d.ts +85 -6
  22. package/dist/config.d.ts.map +1 -1
  23. package/dist/ensureAutomationSessionKey-BMHLKfjj.js +85 -0
  24. package/dist/ensureAutomationSessionKey-BMHLKfjj.js.map +1 -0
  25. package/dist/ensureAutomationSessionKey-BZ9_3FMW.js +86 -0
  26. package/dist/ensureAutomationSessionKey-BZ9_3FMW.js.map +1 -0
  27. package/dist/ensureAutomationSessionKey-C8D7BFjU.js +85 -0
  28. package/dist/ensureAutomationSessionKey-C8D7BFjU.js.map +1 -0
  29. package/dist/ensureAutomationSessionKey-CClLVX2w.js +85 -0
  30. package/dist/ensureAutomationSessionKey-CClLVX2w.js.map +1 -0
  31. package/dist/ensureAutomationSessionKey-CNNN1jBQ.js +85 -0
  32. package/dist/ensureAutomationSessionKey-CNNN1jBQ.js.map +1 -0
  33. package/dist/ensureAutomationSessionKey-D8Gki6U6.js +85 -0
  34. package/dist/ensureAutomationSessionKey-D8Gki6U6.js.map +1 -0
  35. package/dist/ensureAutomationSessionKey-DEH7nwUc.js +86 -0
  36. package/dist/ensureAutomationSessionKey-DEH7nwUc.js.map +1 -0
  37. package/dist/ensureAutomationSessionKey-Dhvbii2M.js +86 -0
  38. package/dist/ensureAutomationSessionKey-Dhvbii2M.js.map +1 -0
  39. package/dist/ensureAutomationSessionKey-Dyfk8qVp.js +85 -0
  40. package/dist/ensureAutomationSessionKey-Dyfk8qVp.js.map +1 -0
  41. package/dist/ensureModularPublishBootstrap-5HJDqJJM.js +24 -0
  42. package/dist/ensureModularPublishBootstrap-5HJDqJJM.js.map +1 -0
  43. package/dist/ensureModularPublishBootstrap-BW8jKN_A.js +24 -0
  44. package/dist/ensureModularPublishBootstrap-BW8jKN_A.js.map +1 -0
  45. package/dist/ensureModularPublishBootstrap-Btih5xbB.js +129 -0
  46. package/dist/ensureModularPublishBootstrap-Btih5xbB.js.map +1 -0
  47. package/dist/ensureModularPublishBootstrap-CI4U08Gc.js +129 -0
  48. package/dist/ensureModularPublishBootstrap-CI4U08Gc.js.map +1 -0
  49. package/dist/ensureModularPublishBootstrap-CcU-hXll.js +128 -0
  50. package/dist/ensureModularPublishBootstrap-CcU-hXll.js.map +1 -0
  51. package/dist/ensureModularPublishBootstrap-CdrykHAi.js +24 -0
  52. package/dist/ensureModularPublishBootstrap-CdrykHAi.js.map +1 -0
  53. package/dist/ensureModularPublishBootstrap-DGBKVGg5.js +24 -0
  54. package/dist/ensureModularPublishBootstrap-DGBKVGg5.js.map +1 -0
  55. package/dist/ensureModularPublishBootstrap-DaREOqSc.js +129 -0
  56. package/dist/ensureModularPublishBootstrap-DaREOqSc.js.map +1 -0
  57. package/dist/ensureModularPublishBootstrap-DxIG-LUP.js +24 -0
  58. package/dist/ensureModularPublishBootstrap-DxIG-LUP.js.map +1 -0
  59. package/dist/ensureSmartWalletThenPublish-BSYzckyS.js +49 -0
  60. package/dist/ensureSmartWalletThenPublish-BSYzckyS.js.map +1 -0
  61. package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js +49 -0
  62. package/dist/ensureSmartWalletThenPublish-Bf8FN1un.js.map +1 -0
  63. package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js +48 -0
  64. package/dist/ensureSmartWalletThenPublish-Bl415Ss6.js.map +1 -0
  65. package/dist/ensureSmartWalletThenPublish-CE7acryB.js +49 -0
  66. package/dist/ensureSmartWalletThenPublish-CE7acryB.js.map +1 -0
  67. package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js +48 -0
  68. package/dist/ensureSmartWalletThenPublish-D5GSZRyZ.js.map +1 -0
  69. package/dist/ensureSmartWalletThenPublish-DAomriGc.js +48 -0
  70. package/dist/ensureSmartWalletThenPublish-DAomriGc.js.map +1 -0
  71. package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js +48 -0
  72. package/dist/ensureSmartWalletThenPublish-DaZf3q5S.js.map +1 -0
  73. package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js +48 -0
  74. package/dist/ensureSmartWalletThenPublish-ekb0xJRn.js.map +1 -0
  75. package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js +48 -0
  76. package/dist/ensureSmartWalletThenPublish-v5fhvKxZ.js.map +1 -0
  77. package/dist/errors-Du3LNbJN.js.map +1 -1
  78. package/dist/errors.d.ts +2 -2
  79. package/dist/errors.d.ts.map +1 -1
  80. package/dist/helpers/abi/executor.d.ts +128 -0
  81. package/dist/helpers/abi/executor.d.ts.map +1 -1
  82. package/dist/helpers/abi/factory.d.ts +1 -1
  83. package/dist/helpers/abi/factory.d.ts.map +1 -1
  84. package/dist/helpers/abi/publisher.d.ts +11 -0
  85. package/dist/helpers/abi/publisher.d.ts.map +1 -1
  86. package/dist/helpers/abi/seedErrors.d.ts +141 -0
  87. package/dist/helpers/abi/seedErrors.d.ts.map +1 -0
  88. package/dist/helpers/abi/seedExecutorRouter.d.ts +60 -0
  89. package/dist/helpers/abi/seedExecutorRouter.d.ts.map +1 -0
  90. package/dist/helpers/adapters/permissionlessTxSender.d.ts +26 -0
  91. package/dist/helpers/adapters/permissionlessTxSender.d.ts.map +1 -1
  92. package/dist/helpers/adapters/thirdwebAccount.d.ts +10 -2
  93. package/dist/helpers/adapters/thirdwebAccount.d.ts.map +1 -1
  94. package/dist/helpers/approvedTargetsForAutomationPublish.d.ts +1 -1
  95. package/dist/helpers/blockchain.d.ts +4 -0
  96. package/dist/helpers/blockchain.d.ts.map +1 -1
  97. package/dist/helpers/chainClient.d.ts.map +1 -1
  98. package/dist/helpers/chainConfig.d.ts +2 -0
  99. package/dist/helpers/chainConfig.d.ts.map +1 -1
  100. package/dist/helpers/constants.d.ts +14 -3
  101. package/dist/helpers/constants.d.ts.map +1 -1
  102. package/dist/helpers/contracts/index.d.ts +25 -0
  103. package/dist/helpers/contracts/index.d.ts.map +1 -1
  104. package/dist/helpers/defaultApprovedTargetsForModularPublish.d.ts +12 -2
  105. package/dist/helpers/defaultApprovedTargetsForModularPublish.d.ts.map +1 -1
  106. package/dist/helpers/describeRevert.d.ts +33 -0
  107. package/dist/helpers/describeRevert.d.ts.map +1 -0
  108. package/dist/helpers/easDirect.d.ts +3 -8
  109. package/dist/helpers/easDirect.d.ts.map +1 -1
  110. package/dist/helpers/enrollPublishAutomation.d.ts +6 -2
  111. package/dist/helpers/enrollPublishAutomation.d.ts.map +1 -1
  112. package/dist/helpers/ensureAutomationSessionKey.d.ts.map +1 -1
  113. package/dist/helpers/ensureEip7702ModularAccountReady.d.ts +1 -1
  114. package/dist/helpers/ensureEip7702ModularAccountReady.d.ts.map +1 -1
  115. package/dist/helpers/ensureExecutorModule.d.ts +6 -3
  116. package/dist/helpers/ensureExecutorModule.d.ts.map +1 -1
  117. package/dist/helpers/ensureManagedAccountEasConfigured.d.ts +8 -3
  118. package/dist/helpers/ensureManagedAccountEasConfigured.d.ts.map +1 -1
  119. package/dist/helpers/ensureManagedAccountReady.d.ts.map +1 -1
  120. package/dist/helpers/ensureManagedSignerSessionKey.d.ts +5 -0
  121. package/dist/helpers/ensureManagedSignerSessionKey.d.ts.map +1 -1
  122. package/dist/helpers/ensureModularPublishBootstrap.d.ts +6 -2
  123. package/dist/helpers/ensureModularPublishBootstrap.d.ts.map +1 -1
  124. package/dist/helpers/ensureSmartWalletThenPublish.d.ts.map +1 -1
  125. package/dist/helpers/executorModuleReadiness.d.ts +28 -0
  126. package/dist/helpers/executorModuleReadiness.d.ts.map +1 -0
  127. package/dist/helpers/managedAccountAdmin.d.ts +12 -0
  128. package/dist/helpers/managedAccountAdmin.d.ts.map +1 -0
  129. package/dist/helpers/publishThirdwebClient.d.ts +10 -0
  130. package/dist/helpers/publishThirdwebClient.d.ts.map +1 -0
  131. package/dist/helpers/retryNonceTooLow.d.ts +12 -0
  132. package/dist/helpers/retryNonceTooLow.d.ts.map +1 -0
  133. package/dist/helpers/seedSigner.d.ts.map +1 -1
  134. package/dist/helpers/seedTwin.d.ts +47 -0
  135. package/dist/helpers/seedTwin.d.ts.map +1 -0
  136. package/dist/helpers/thirdweb.d.ts +21 -6
  137. package/dist/helpers/thirdweb.d.ts.map +1 -1
  138. package/dist/helpers/thirdwebChain.d.ts +21 -0
  139. package/dist/helpers/thirdwebChain.d.ts.map +1 -0
  140. package/dist/helpers/verifyPublishChain.d.ts +21 -0
  141. package/dist/helpers/verifyPublishChain.d.ts.map +1 -0
  142. package/dist/hooks/useItemPublishStatus.d.ts +2 -0
  143. package/dist/hooks/useItemPublishStatus.d.ts.map +1 -1
  144. package/dist/index.d.ts +9 -2
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +478 -398
  147. package/dist/index.js.map +1 -1
  148. package/dist/managedAccountAdmin-B64V1rlU.js +29 -0
  149. package/dist/managedAccountAdmin-B64V1rlU.js.map +1 -0
  150. package/dist/managedAccountAdmin-BVLGWpEb.js +29 -0
  151. package/dist/managedAccountAdmin-BVLGWpEb.js.map +1 -0
  152. package/dist/managedAccountAdmin-Bje6X8Ds.js +29 -0
  153. package/dist/managedAccountAdmin-Bje6X8Ds.js.map +1 -0
  154. package/dist/managedAccountAdmin-C84-IlQ9.js +29 -0
  155. package/dist/managedAccountAdmin-C84-IlQ9.js.map +1 -0
  156. package/dist/managedAccountAdmin-DhCRBoPX.js +29 -0
  157. package/dist/managedAccountAdmin-DhCRBoPX.js.map +1 -0
  158. package/dist/publishAuthorization-B0G1em4a.js +3695 -0
  159. package/dist/publishAuthorization-B0G1em4a.js.map +1 -0
  160. package/dist/publishAuthorization-B1BVVfp0.js +3604 -0
  161. package/dist/publishAuthorization-B1BVVfp0.js.map +1 -0
  162. package/dist/publishAuthorization-Bltn3y_K.js +3599 -0
  163. package/dist/publishAuthorization-Bltn3y_K.js.map +1 -0
  164. package/dist/publishAuthorization-By2Tt9kW.js +3912 -0
  165. package/dist/publishAuthorization-By2Tt9kW.js.map +1 -0
  166. package/dist/publishAuthorization-CxBkijU6.js +3925 -0
  167. package/dist/publishAuthorization-CxBkijU6.js.map +1 -0
  168. package/dist/publishAuthorization-CxWY7lAQ.js +3706 -0
  169. package/dist/publishAuthorization-CxWY7lAQ.js.map +1 -0
  170. package/dist/publishAuthorization-DEriY_jm.js +3687 -0
  171. package/dist/publishAuthorization-DEriY_jm.js.map +1 -0
  172. package/dist/publishAuthorization-DfAQs1sN.js +3707 -0
  173. package/dist/publishAuthorization-DfAQs1sN.js.map +1 -0
  174. package/dist/publishAuthorization-DqhhCAhd.js +3652 -0
  175. package/dist/publishAuthorization-DqhhCAhd.js.map +1 -0
  176. package/dist/publishThirdwebClient-BdgkcqM7.js +18 -0
  177. package/dist/publishThirdwebClient-BdgkcqM7.js.map +1 -0
  178. package/dist/publishThirdwebClient-BkmDN480.js +18 -0
  179. package/dist/publishThirdwebClient-BkmDN480.js.map +1 -0
  180. package/dist/publishThirdwebClient-BnDhP3N-.js +18 -0
  181. package/dist/publishThirdwebClient-BnDhP3N-.js.map +1 -0
  182. package/dist/publishThirdwebClient-CQ29pzG2.js +18 -0
  183. package/dist/publishThirdwebClient-CQ29pzG2.js.map +1 -0
  184. package/dist/publishThirdwebClient-CZIVmr9Z.js +18 -0
  185. package/dist/publishThirdwebClient-CZIVmr9Z.js.map +1 -0
  186. package/dist/publishThirdwebClient-DroRrOFQ.js +18 -0
  187. package/dist/publishThirdwebClient-DroRrOFQ.js.map +1 -0
  188. package/dist/publishThirdwebClient-DzXFjQ7L.js +18 -0
  189. package/dist/publishThirdwebClient-DzXFjQ7L.js.map +1 -0
  190. package/dist/publishThirdwebClient-Dzb2vcEs.js +18 -0
  191. package/dist/publishThirdwebClient-Dzb2vcEs.js.map +1 -0
  192. package/dist/publishThirdwebClient-i8P7fivi.js +18 -0
  193. package/dist/publishThirdwebClient-i8P7fivi.js.map +1 -0
  194. package/dist/react/ConnectButton.d.ts.map +1 -1
  195. package/dist/resolveRevokeAccount-B5iXpuRT.js +38 -0
  196. package/dist/resolveRevokeAccount-B5iXpuRT.js.map +1 -0
  197. package/dist/resolveRevokeAccount-B7ImSb4Y.js +38 -0
  198. package/dist/resolveRevokeAccount-B7ImSb4Y.js.map +1 -0
  199. package/dist/resolveRevokeAccount-BM1j2l5Q.js +38 -0
  200. package/dist/resolveRevokeAccount-BM1j2l5Q.js.map +1 -0
  201. package/dist/resolveRevokeAccount-BtVG0xxc.js +38 -0
  202. package/dist/resolveRevokeAccount-BtVG0xxc.js.map +1 -0
  203. package/dist/resolveRevokeAccount-CJZZdBcQ.js +39 -0
  204. package/dist/resolveRevokeAccount-CJZZdBcQ.js.map +1 -0
  205. package/dist/resolveRevokeAccount-CaIMuCee.js +39 -0
  206. package/dist/resolveRevokeAccount-CaIMuCee.js.map +1 -0
  207. package/dist/resolveRevokeAccount-Cg4TQgnd.js +38 -0
  208. package/dist/resolveRevokeAccount-Cg4TQgnd.js.map +1 -0
  209. package/dist/resolveRevokeAccount-DHnxtEIj.js +39 -0
  210. package/dist/resolveRevokeAccount-DHnxtEIj.js.map +1 -0
  211. package/dist/resolveRevokeAccount-S-2WXkNh.js +38 -0
  212. package/dist/resolveRevokeAccount-S-2WXkNh.js.map +1 -0
  213. package/dist/services/publish/actors/checking.d.ts.map +1 -1
  214. package/dist/services/publish/actors/createAttestations.d.ts.map +1 -1
  215. package/dist/services/publish/helpers/ensureEasSchemas.d.ts +12 -1
  216. package/dist/services/publish/helpers/ensureEasSchemas.d.ts.map +1 -1
  217. package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
  218. package/dist/services/publishManager/actions/createPublish.d.ts.map +1 -1
  219. package/dist/services/publishManager/actions/drainPendingCreates.d.ts +3 -0
  220. package/dist/services/publishManager/actions/drainPendingCreates.d.ts.map +1 -0
  221. package/dist/services/publishManager/actions/publishDone.d.ts.map +1 -1
  222. package/dist/services/publishManager/actions/queueCreatePublish.d.ts +2 -0
  223. package/dist/services/publishManager/actions/queueCreatePublish.d.ts.map +1 -0
  224. package/dist/services/publishManager/actors/restoreFromDb.d.ts.map +1 -1
  225. package/dist/services/publishManager/actors/savePublish.d.ts +11 -0
  226. package/dist/services/publishManager/actors/savePublish.d.ts.map +1 -1
  227. package/dist/services/publishManager/createPublishResult.d.ts +6 -0
  228. package/dist/services/publishManager/createPublishResult.d.ts.map +1 -0
  229. package/dist/services/publishManager/index.d.ts +61 -1
  230. package/dist/services/publishManager/index.d.ts.map +1 -1
  231. package/dist/services/revoke/revokeAttestations.d.ts +3 -2
  232. package/dist/services/revoke/revokeAttestations.d.ts.map +1 -1
  233. package/dist/thirdweb.d.ts +1 -0
  234. package/dist/thirdweb.d.ts.map +1 -1
  235. package/dist/thirdweb.js +193 -117
  236. package/dist/thirdweb.js.map +1 -1
  237. package/dist/worker-2dUZSapK.js +69 -0
  238. package/dist/worker-2dUZSapK.js.map +1 -0
  239. package/dist/worker-B8gN5WTx.js +69 -0
  240. package/dist/worker-B8gN5WTx.js.map +1 -0
  241. package/dist/worker-BgErCNTb.js +69 -0
  242. package/dist/worker-BgErCNTb.js.map +1 -0
  243. package/dist/worker-C07rPV2G.js +69 -0
  244. package/dist/worker-C07rPV2G.js.map +1 -0
  245. package/dist/worker-C9Za_dlQ.js +69 -0
  246. package/dist/worker-C9Za_dlQ.js.map +1 -0
  247. package/dist/worker-CEgulQnm.js +69 -0
  248. package/dist/worker-CEgulQnm.js.map +1 -0
  249. package/dist/worker-C_TL94He.js +69 -0
  250. package/dist/worker-C_TL94He.js.map +1 -0
  251. package/dist/worker-DypHzXgH.js +69 -0
  252. package/dist/worker-DypHzXgH.js.map +1 -0
  253. package/dist/worker-ZL4Wg19t.js +69 -0
  254. package/dist/worker-ZL4Wg19t.js.map +1 -0
  255. package/package.json +6 -6
@@ -0,0 +1,48 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { C as t, g as n, m as r, o as i, t as a, w as o } from "./chainConfig-CfVGYAsY.js";
3
+ import { r as s } from "./errors-Du3LNbJN.js";
4
+ import { B as c, M as l, h as u, j as d } from "./publishAuthorization-DEriY_jm.js";
5
+ import { ethers as f } from "ethers";
6
+ //#region src/helpers/ensureSmartWalletThenPublish.ts
7
+ var p = /* @__PURE__ */ e({ ensureSmartWalletThenPublish: () => _ }), m = "A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.", h = () => `Could not connect the managed publishing account on ${a()}. Reconnect with the same sign-in method and try again.`;
8
+ function g(e) {
9
+ if (e) return e instanceof f.Wallet ? e : t(e) ? e.signer : o(e) ? e : r(e).signer;
10
+ }
11
+ async function _(e, t, a, o) {
12
+ let f = i(), p = await a();
13
+ if (!p || !p.trim()) return { outcome: "no_address" };
14
+ if (f.useModularExecutor) {
15
+ let t = await l();
16
+ if (!t) return {
17
+ outcome: "managed_not_ready",
18
+ error: new s(m, "MANAGED_ACCOUNT_UNAVAILABLE")
19
+ };
20
+ let i;
21
+ try {
22
+ i = await d(n());
23
+ } catch (e) {
24
+ return {
25
+ outcome: "managed_not_ready",
26
+ error: new s(h(), "MANAGED_ACCOUNT_UNAVAILABLE", void 0, e)
27
+ };
28
+ }
29
+ let a = r(t);
30
+ return u.createPublish(e, i, a, {
31
+ ...o,
32
+ dataItemSigner: g(o?.dataItemSigner) ?? a.signer
33
+ }), { outcome: "started" };
34
+ }
35
+ let _ = await c(t ?? null);
36
+ if ("address" in _) {
37
+ let t = r(_.account);
38
+ return u.createPublish(e, _.address, t, {
39
+ ...o,
40
+ dataItemSigner: g(o?.dataItemSigner) ?? t.signer
41
+ }), { outcome: "started" };
42
+ }
43
+ return { outcome: "needs_deploy" };
44
+ }
45
+ //#endregion
46
+ export { p as n, _ as t };
47
+
48
+ //# sourceMappingURL=ensureSmartWalletThenPublish-DaZf3q5S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureSmartWalletThenPublish-DaZf3q5S.js","names":[],"sources":["../src/helpers/ensureSmartWalletThenPublish.ts"],"sourcesContent":["import type { Item } from '@seedprotocol/sdk'\nimport type { Account } from 'thirdweb/wallets'\nimport {\n getConnectedManagedAccountAddress,\n getConnectedModularAccount,\n resolveSmartWalletForPublish,\n} from './thirdweb'\nimport { fromThirdwebAccount } from './adapters/thirdwebAccount'\nimport { isPublishWallet, isSeedSigner, type PublishWallet, type SeedSigner } from './seedSigner'\nimport { ethers } from 'ethers'\nimport { PublishManager } from '../services/publishManager'\nimport type { CreatePublishOptions } from '../config'\nimport { getPublishConfig } from '../config'\nimport { ManagedAccountPublishError } from '../errors'\nimport { getPublishThirdwebChain } from './thirdwebChain'\nimport { getPublishChainName } from './chainConfig'\n\nexport type EnsureSmartWalletResult =\n | { outcome: 'started' }\n | { outcome: 'no_address' }\n | { outcome: 'needs_deploy' }\n | { outcome: 'managed_not_ready'; error: ManagedAccountPublishError }\n\nconst MSG_NO_ACCOUNT_MODULAR =\n 'A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.'\n\nconst MSG_MANAGED_UNAVAILABLE = () =>\n `Could not connect the managed publishing account on ${getPublishChainName()}. Reconnect with the same sign-in method and try again.`\n\nfunction coerceDataItemSigner(\n signer: CreatePublishOptions['dataItemSigner'] | Account | SeedSigner | PublishWallet | undefined,\n): CreatePublishOptions['dataItemSigner'] {\n if (!signer) return undefined\n if (signer instanceof ethers.Wallet) return signer\n if (isPublishWallet(signer)) return signer.signer\n if (isSeedSigner(signer)) return signer\n return fromThirdwebAccount(signer as Account).signer\n}\n\n/**\n * Thirdweb path: resolves the smart wallet for the current account; if deployed, starts publish.\n * Prefer {@link ensureWalletThenPublish} for vendor-neutral entry.\n */\nexport async function ensureSmartWalletThenPublish(\n item: Item<any>,\n activeAccount: Account | null | undefined,\n getAddress: () => Promise<string | null>,\n options?: CreatePublishOptions,\n): Promise<EnsureSmartWalletResult> {\n const config = getPublishConfig()\n const address = await getAddress()\n if (!address || !address.trim()) {\n return { outcome: 'no_address' }\n }\n\n if (config.useModularExecutor) {\n const modularAccount = await getConnectedModularAccount()\n if (!modularAccount) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(MSG_NO_ACCOUNT_MODULAR, 'MANAGED_ACCOUNT_UNAVAILABLE'),\n }\n }\n\n let managedAddress: string\n try {\n managedAddress = await getConnectedManagedAccountAddress(getPublishThirdwebChain())\n } catch (cause) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(\n MSG_MANAGED_UNAVAILABLE(),\n 'MANAGED_ACCOUNT_UNAVAILABLE',\n undefined,\n cause,\n ),\n }\n }\n\n const wallet = fromThirdwebAccount(modularAccount)\n PublishManager.createPublish(item, managedAddress, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n\n const resolved = await resolveSmartWalletForPublish(activeAccount ?? null)\n if ('address' in resolved) {\n const wallet = fromThirdwebAccount(resolved.account)\n PublishManager.createPublish(item, resolved.address, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n return { outcome: 'needs_deploy' }\n}\n"],"mappings":";;;;;;sEAuBM,IACJ,+GAEI,UACJ,uDAAuD,EAAoB,EAAE;AAE/E,SAAS,EACP,GACwC;CACnC,OAIL,OAHI,aAAkB,EAAO,SAAe,IACxC,EAAgB,CAAM,IAAU,EAAO,SACvC,EAAa,CAAM,IAAU,IAC1B,EAAoB,CAAiB,CAAC,CAAC;AAChD;AAMA,eAAsB,EACpB,GACA,GACA,GACA,GACkC;CAClC,IAAM,IAAS,EAAiB,GAC1B,IAAU,MAAM,EAAW;CACjC,IAAI,CAAC,KAAW,CAAC,EAAQ,KAAK,GAC5B,OAAO,EAAE,SAAS,aAAa;CAGjC,IAAI,EAAO,oBAAoB;EAC7B,IAAM,IAAiB,MAAM,EAA2B;EACxD,IAAI,CAAC,GACH,OAAO;GACL,SAAS;GACT,OAAO,IAAI,EAA2B,GAAwB,6BAA6B;EAC7F;EAGF,IAAI;EACJ,IAAI;GACF,IAAiB,MAAM,EAAkC,EAAwB,CAAC;EACpF,SAAS,GAAO;GACd,OAAO;IACL,SAAS;IACT,OAAO,IAAI,EACT,EAAwB,GACxB,+BACA,KAAA,GACA,CACF;GACF;EACF;EAEA,IAAM,IAAS,EAAoB,CAAc;EAKjD,OAJA,EAAe,cAAc,GAAM,GAAgB,GAAQ;GACzD,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CAEA,IAAM,IAAW,MAAM,EAA6B,KAAiB,IAAI;CACzE,IAAI,aAAa,GAAU;EACzB,IAAM,IAAS,EAAoB,EAAS,OAAO;EAKnD,OAJA,EAAe,cAAc,GAAM,EAAS,SAAS,GAAQ;GAC3D,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CACA,OAAO,EAAE,SAAS,eAAe;AACnC"}
@@ -0,0 +1,48 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { T as t, _ as n, h as r, o as i, t as a, w as o } from "./chainConfig-DDA4YmAB.js";
3
+ import { r as s } from "./errors-Du3LNbJN.js";
4
+ import { A as c, h as l, j as u, z as d } from "./publishAuthorization-B0G1em4a.js";
5
+ import { ethers as f } from "ethers";
6
+ //#region src/helpers/ensureSmartWalletThenPublish.ts
7
+ var p = /* @__PURE__ */ e({ ensureSmartWalletThenPublish: () => _ }), m = "A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.", h = () => `Could not connect the managed publishing account on ${a()}. Reconnect with the same sign-in method and try again.`;
8
+ function g(e) {
9
+ if (e) return e instanceof f.Wallet ? e : o(e) ? e.signer : t(e) ? e : r(e).signer;
10
+ }
11
+ async function _(e, t, a, o) {
12
+ let f = i(), p = await a();
13
+ if (!p || !p.trim()) return { outcome: "no_address" };
14
+ if (f.useModularExecutor) {
15
+ let t = await u();
16
+ if (!t) return {
17
+ outcome: "managed_not_ready",
18
+ error: new s(m, "MANAGED_ACCOUNT_UNAVAILABLE")
19
+ };
20
+ let i;
21
+ try {
22
+ i = await c(n());
23
+ } catch (e) {
24
+ return {
25
+ outcome: "managed_not_ready",
26
+ error: new s(h(), "MANAGED_ACCOUNT_UNAVAILABLE", void 0, e)
27
+ };
28
+ }
29
+ let a = r(t);
30
+ return l.createPublish(e, i, a, {
31
+ ...o,
32
+ dataItemSigner: g(o?.dataItemSigner) ?? a.signer
33
+ }), { outcome: "started" };
34
+ }
35
+ let _ = await d(t ?? null);
36
+ if ("address" in _) {
37
+ let t = r(_.account);
38
+ return l.createPublish(e, _.address, t, {
39
+ ...o,
40
+ dataItemSigner: g(o?.dataItemSigner) ?? t.signer
41
+ }), { outcome: "started" };
42
+ }
43
+ return { outcome: "needs_deploy" };
44
+ }
45
+ //#endregion
46
+ export { p as n, _ as t };
47
+
48
+ //# sourceMappingURL=ensureSmartWalletThenPublish-ekb0xJRn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureSmartWalletThenPublish-ekb0xJRn.js","names":[],"sources":["../src/helpers/ensureSmartWalletThenPublish.ts"],"sourcesContent":["import type { Item } from '@seedprotocol/sdk'\nimport type { Account } from 'thirdweb/wallets'\nimport {\n getConnectedManagedAccountAddress,\n getConnectedModularAccount,\n resolveSmartWalletForPublish,\n} from './thirdweb'\nimport { fromThirdwebAccount } from './adapters/thirdwebAccount'\nimport { isPublishWallet, isSeedSigner, type PublishWallet, type SeedSigner } from './seedSigner'\nimport { ethers } from 'ethers'\nimport { PublishManager } from '../services/publishManager'\nimport type { CreatePublishOptions } from '../config'\nimport { getPublishConfig } from '../config'\nimport { ManagedAccountPublishError } from '../errors'\nimport { getPublishThirdwebChain } from './thirdwebChain'\nimport { getPublishChainName } from './chainConfig'\n\nexport type EnsureSmartWalletResult =\n | { outcome: 'started' }\n | { outcome: 'no_address' }\n | { outcome: 'needs_deploy' }\n | { outcome: 'managed_not_ready'; error: ManagedAccountPublishError }\n\nconst MSG_NO_ACCOUNT_MODULAR =\n 'A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.'\n\nconst MSG_MANAGED_UNAVAILABLE = () =>\n `Could not connect the managed publishing account on ${getPublishChainName()}. Reconnect with the same sign-in method and try again.`\n\nfunction coerceDataItemSigner(\n signer: CreatePublishOptions['dataItemSigner'] | Account | SeedSigner | PublishWallet | undefined,\n): CreatePublishOptions['dataItemSigner'] {\n if (!signer) return undefined\n if (signer instanceof ethers.Wallet) return signer\n if (isPublishWallet(signer)) return signer.signer\n if (isSeedSigner(signer)) return signer\n return fromThirdwebAccount(signer as Account).signer\n}\n\n/**\n * Thirdweb path: resolves the smart wallet for the current account; if deployed, starts publish.\n * Prefer {@link ensureWalletThenPublish} for vendor-neutral entry.\n */\nexport async function ensureSmartWalletThenPublish(\n item: Item<any>,\n activeAccount: Account | null | undefined,\n getAddress: () => Promise<string | null>,\n options?: CreatePublishOptions,\n): Promise<EnsureSmartWalletResult> {\n const config = getPublishConfig()\n const address = await getAddress()\n if (!address || !address.trim()) {\n return { outcome: 'no_address' }\n }\n\n if (config.useModularExecutor) {\n const modularAccount = await getConnectedModularAccount()\n if (!modularAccount) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(MSG_NO_ACCOUNT_MODULAR, 'MANAGED_ACCOUNT_UNAVAILABLE'),\n }\n }\n\n let managedAddress: string\n try {\n managedAddress = await getConnectedManagedAccountAddress(getPublishThirdwebChain())\n } catch (cause) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(\n MSG_MANAGED_UNAVAILABLE(),\n 'MANAGED_ACCOUNT_UNAVAILABLE',\n undefined,\n cause,\n ),\n }\n }\n\n const wallet = fromThirdwebAccount(modularAccount)\n PublishManager.createPublish(item, managedAddress, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n\n const resolved = await resolveSmartWalletForPublish(activeAccount ?? null)\n if ('address' in resolved) {\n const wallet = fromThirdwebAccount(resolved.account)\n PublishManager.createPublish(item, resolved.address, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n return { outcome: 'needs_deploy' }\n}\n"],"mappings":";;;;;;sEAuBM,IACJ,+GAEI,UACJ,uDAAuD,EAAoB,EAAE;AAE/E,SAAS,EACP,GACwC;CACnC,OAIL,OAHI,aAAkB,EAAO,SAAe,IACxC,EAAgB,CAAM,IAAU,EAAO,SACvC,EAAa,CAAM,IAAU,IAC1B,EAAoB,CAAiB,CAAC,CAAC;AAChD;AAMA,eAAsB,EACpB,GACA,GACA,GACA,GACkC;CAClC,IAAM,IAAS,EAAiB,GAC1B,IAAU,MAAM,EAAW;CACjC,IAAI,CAAC,KAAW,CAAC,EAAQ,KAAK,GAC5B,OAAO,EAAE,SAAS,aAAa;CAGjC,IAAI,EAAO,oBAAoB;EAC7B,IAAM,IAAiB,MAAM,EAA2B;EACxD,IAAI,CAAC,GACH,OAAO;GACL,SAAS;GACT,OAAO,IAAI,EAA2B,GAAwB,6BAA6B;EAC7F;EAGF,IAAI;EACJ,IAAI;GACF,IAAiB,MAAM,EAAkC,EAAwB,CAAC;EACpF,SAAS,GAAO;GACd,OAAO;IACL,SAAS;IACT,OAAO,IAAI,EACT,EAAwB,GACxB,+BACA,KAAA,GACA,CACF;GACF;EACF;EAEA,IAAM,IAAS,EAAoB,CAAc;EAKjD,OAJA,EAAe,cAAc,GAAM,GAAgB,GAAQ;GACzD,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CAEA,IAAM,IAAW,MAAM,EAA6B,KAAiB,IAAI;CACzE,IAAI,aAAa,GAAU;EACzB,IAAM,IAAS,EAAoB,EAAS,OAAO;EAKnD,OAJA,EAAe,cAAc,GAAM,EAAS,SAAS,GAAQ;GAC3D,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CACA,OAAO,EAAE,SAAS,eAAe;AACnC"}
@@ -0,0 +1,48 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { E as t, T as n, _ as r, h as i, o as a, t as o } from "./chainConfig-3sSqEVQh.js";
3
+ import { r as s } from "./errors-Du3LNbJN.js";
4
+ import { A as c, h as l, j as u, z as d } from "./publishAuthorization-By2Tt9kW.js";
5
+ import { ethers as f } from "ethers";
6
+ //#region src/helpers/ensureSmartWalletThenPublish.ts
7
+ var p = /* @__PURE__ */ e({ ensureSmartWalletThenPublish: () => _ }), m = "A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.", h = () => `Could not connect the managed publishing account on ${o()}. Reconnect with the same sign-in method and try again.`;
8
+ function g(e) {
9
+ if (e) return e instanceof f.Wallet ? e : n(e) ? e.signer : t(e) ? e : i(e).signer;
10
+ }
11
+ async function _(e, t, n, o) {
12
+ let f = a(), p = await n();
13
+ if (!p || !p.trim()) return { outcome: "no_address" };
14
+ if (f.useModularExecutor) {
15
+ let t = await u();
16
+ if (!t) return {
17
+ outcome: "managed_not_ready",
18
+ error: new s(m, "MANAGED_ACCOUNT_UNAVAILABLE")
19
+ };
20
+ let n;
21
+ try {
22
+ n = await c(r());
23
+ } catch (e) {
24
+ return {
25
+ outcome: "managed_not_ready",
26
+ error: new s(h(), "MANAGED_ACCOUNT_UNAVAILABLE", void 0, e)
27
+ };
28
+ }
29
+ let a = i(t);
30
+ return l.createPublish(e, n, a, {
31
+ ...o,
32
+ dataItemSigner: g(o?.dataItemSigner) ?? a.signer
33
+ }), { outcome: "started" };
34
+ }
35
+ let _ = await d(t ?? null);
36
+ if ("address" in _) {
37
+ let t = i(_.account);
38
+ return l.createPublish(e, _.address, t, {
39
+ ...o,
40
+ dataItemSigner: g(o?.dataItemSigner) ?? t.signer
41
+ }), { outcome: "started" };
42
+ }
43
+ return { outcome: "needs_deploy" };
44
+ }
45
+ //#endregion
46
+ export { p as n, _ as t };
47
+
48
+ //# sourceMappingURL=ensureSmartWalletThenPublish-v5fhvKxZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureSmartWalletThenPublish-v5fhvKxZ.js","names":[],"sources":["../src/helpers/ensureSmartWalletThenPublish.ts"],"sourcesContent":["import type { Item } from '@seedprotocol/sdk'\nimport type { Account } from 'thirdweb/wallets'\nimport {\n getConnectedManagedAccountAddress,\n getConnectedModularAccount,\n resolveSmartWalletForPublish,\n} from './thirdweb'\nimport { fromThirdwebAccount } from './adapters/thirdwebAccount'\nimport { isPublishWallet, isSeedSigner, type PublishWallet, type SeedSigner } from './seedSigner'\nimport { ethers } from 'ethers'\nimport { PublishManager } from '../services/publishManager'\nimport type { CreatePublishOptions } from '../config'\nimport { getPublishConfig } from '../config'\nimport { ManagedAccountPublishError } from '../errors'\nimport { getPublishThirdwebChain } from './thirdwebChain'\nimport { getPublishChainName } from './chainConfig'\n\nexport type EnsureSmartWalletResult =\n | { outcome: 'started' }\n | { outcome: 'no_address' }\n | { outcome: 'needs_deploy' }\n | { outcome: 'managed_not_ready'; error: ManagedAccountPublishError }\n\nconst MSG_NO_ACCOUNT_MODULAR =\n 'A connected wallet is required for publishing with the modular executor. Connect your wallet and try again.'\n\nconst MSG_MANAGED_UNAVAILABLE = () =>\n `Could not connect the managed publishing account on ${getPublishChainName()}. Reconnect with the same sign-in method and try again.`\n\nfunction coerceDataItemSigner(\n signer: CreatePublishOptions['dataItemSigner'] | Account | SeedSigner | PublishWallet | undefined,\n): CreatePublishOptions['dataItemSigner'] {\n if (!signer) return undefined\n if (signer instanceof ethers.Wallet) return signer\n if (isPublishWallet(signer)) return signer.signer\n if (isSeedSigner(signer)) return signer\n return fromThirdwebAccount(signer as Account).signer\n}\n\n/**\n * Thirdweb path: resolves the smart wallet for the current account; if deployed, starts publish.\n * Prefer {@link ensureWalletThenPublish} for vendor-neutral entry.\n */\nexport async function ensureSmartWalletThenPublish(\n item: Item<any>,\n activeAccount: Account | null | undefined,\n getAddress: () => Promise<string | null>,\n options?: CreatePublishOptions,\n): Promise<EnsureSmartWalletResult> {\n const config = getPublishConfig()\n const address = await getAddress()\n if (!address || !address.trim()) {\n return { outcome: 'no_address' }\n }\n\n if (config.useModularExecutor) {\n const modularAccount = await getConnectedModularAccount()\n if (!modularAccount) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(MSG_NO_ACCOUNT_MODULAR, 'MANAGED_ACCOUNT_UNAVAILABLE'),\n }\n }\n\n let managedAddress: string\n try {\n managedAddress = await getConnectedManagedAccountAddress(getPublishThirdwebChain())\n } catch (cause) {\n return {\n outcome: 'managed_not_ready',\n error: new ManagedAccountPublishError(\n MSG_MANAGED_UNAVAILABLE(),\n 'MANAGED_ACCOUNT_UNAVAILABLE',\n undefined,\n cause,\n ),\n }\n }\n\n const wallet = fromThirdwebAccount(modularAccount)\n PublishManager.createPublish(item, managedAddress, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n\n const resolved = await resolveSmartWalletForPublish(activeAccount ?? null)\n if ('address' in resolved) {\n const wallet = fromThirdwebAccount(resolved.account)\n PublishManager.createPublish(item, resolved.address, wallet, {\n ...options,\n dataItemSigner: coerceDataItemSigner(options?.dataItemSigner) ?? wallet.signer,\n })\n return { outcome: 'started' }\n }\n return { outcome: 'needs_deploy' }\n}\n"],"mappings":";;;;;;sEAuBM,IACJ,+GAEI,UACJ,uDAAuD,EAAoB,EAAE;AAE/E,SAAS,EACP,GACwC;CACnC,OAIL,OAHI,aAAkB,EAAO,SAAe,IACxC,EAAgB,CAAM,IAAU,EAAO,SACvC,EAAa,CAAM,IAAU,IAC1B,EAAoB,CAAiB,CAAC,CAAC;AAChD;AAMA,eAAsB,EACpB,GACA,GACA,GACA,GACkC;CAClC,IAAM,IAAS,EAAiB,GAC1B,IAAU,MAAM,EAAW;CACjC,IAAI,CAAC,KAAW,CAAC,EAAQ,KAAK,GAC5B,OAAO,EAAE,SAAS,aAAa;CAGjC,IAAI,EAAO,oBAAoB;EAC7B,IAAM,IAAiB,MAAM,EAA2B;EACxD,IAAI,CAAC,GACH,OAAO;GACL,SAAS;GACT,OAAO,IAAI,EAA2B,GAAwB,6BAA6B;EAC7F;EAGF,IAAI;EACJ,IAAI;GACF,IAAiB,MAAM,EAAkC,EAAwB,CAAC;EACpF,SAAS,GAAO;GACd,OAAO;IACL,SAAS;IACT,OAAO,IAAI,EACT,EAAwB,GACxB,+BACA,KAAA,GACA,CACF;GACF;EACF;EAEA,IAAM,IAAS,EAAoB,CAAc;EAKjD,OAJA,EAAe,cAAc,GAAM,GAAgB,GAAQ;GACzD,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CAEA,IAAM,IAAW,MAAM,EAA6B,KAAiB,IAAI;CACzE,IAAI,aAAa,GAAU;EACzB,IAAM,IAAS,EAAoB,EAAS,OAAO;EAKnD,OAJA,EAAe,cAAc,GAAM,EAAS,SAAS,GAAQ;GAC3D,GAAG;GACH,gBAAgB,EAAqB,GAAS,cAAc,KAAK,EAAO;EAC1E,CAAC,GACM,EAAE,SAAS,UAAU;CAC9B;CACA,OAAO,EAAE,SAAS,eAAe;AACnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors-Du3LNbJN.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["export class AttestationVerificationError extends Error {\n constructor(\n message: string,\n public readonly seedLocalId: string,\n public readonly expectedSchemas: string[],\n public readonly foundSchemas: string[],\n public readonly code: 'METADATA_PROPERTIES_MISSING' = 'METADATA_PROPERTIES_MISSING',\n ) {\n super(message)\n this.name = 'AttestationVerificationError'\n }\n}\n\nexport type ManagedAccountPublishErrorCode =\n | 'MANAGED_ACCOUNT_NOT_DEPLOYED'\n | 'MANAGED_ACCOUNT_UNAVAILABLE'\n | 'EXECUTOR_MODULE_NOT_INSTALLED'\n | 'MANAGED_ACCOUNT_SET_EAS_FAILED'\n | 'MODULAR_SIGNER_ACTIVATION_FAILED'\n\n/**\n * Best-effort string for RPC / thirdweb / viem failures that are not plain `Error`\n * (so logs and UIs can show the real revert or RPC reason).\n */\nexport function stringifyUnderlyingCause(u: unknown, maxLen = 700): string {\n if (u == null) return ''\n if (u instanceof Error) {\n const nested = u.cause instanceof Error ? ` | cause: ${u.cause.message}` : ''\n return (u.message + nested).slice(0, maxLen)\n }\n if (typeof u === 'object') {\n const o = u as Record<string, unknown>\n const parts: string[] = []\n if (typeof o.message === 'string') parts.push(o.message)\n if (typeof o.shortMessage === 'string') parts.push(o.shortMessage)\n if (typeof o.details === 'string') parts.push(o.details)\n if (typeof o.reason === 'string') parts.push(o.reason)\n if (parts.length) return parts.join(' | ').slice(0, maxLen)\n try {\n return JSON.stringify(u).slice(0, maxLen)\n } catch {\n return String(u).slice(0, maxLen)\n }\n }\n return String(u).slice(0, maxLen)\n}\n\n/**\n * Thrown or returned when the managed publishing account (Optimism Sepolia) is missing,\n * unreachable, missing the executor module for the modular executor path, or EAS\n * pointer setup (`getEas` / `setEas`) fails, or modular session-signer activation fails.\n */\nexport class ManagedAccountPublishError extends Error {\n /** Original error when connection or deployment failed (avoids shadowing `Error.cause`). */\n public readonly underlyingCause?: unknown\n\n constructor(\n message: string,\n public readonly code: ManagedAccountPublishErrorCode,\n public readonly managedAddress?: string,\n underlyingCause?: unknown,\n ) {\n const extra =\n underlyingCause != null && underlyingCause !== ''\n ? ` (${stringifyUnderlyingCause(underlyingCause)})`\n : ''\n super(message + extra)\n this.name = 'ManagedAccountPublishError'\n this.underlyingCause = underlyingCause\n }\n}\n\n/**\n * True when `e` is a managed-account publish error. Uses `name` + `code` as a fallback\n * when `instanceof` fails across duplicate bundled class identities.\n */\nexport function isManagedAccountPublishError(e: unknown): e is ManagedAccountPublishError {\n if (e instanceof ManagedAccountPublishError) return true\n if (typeof e !== 'object' || e === null) return false\n const o = e as { name?: string; code?: unknown }\n return o.name === 'ManagedAccountPublishError' && typeof o.code === 'string'\n}\n\nexport type Eip7702ModularAccountPublishErrorCode =\n | 'EIP7702_MODULAR_ACCOUNT_UNAVAILABLE'\n | 'EIP7702_MODULAR_NOT_UPGRADED'\n | 'EIP7702_MODULAR_DEPLOY_FAILED'\n | 'EIP7702_MODULAR_NOT_CONFIRMED'\n\n/**\n * Thrown when the in-app modular (EIP-7702) wallet is missing, not upgraded on-chain, or deploy/bootstrap failed.\n */\nexport class Eip7702ModularAccountPublishError extends Error {\n public readonly underlyingCause?: unknown\n\n constructor(\n message: string,\n public readonly code: Eip7702ModularAccountPublishErrorCode,\n public readonly modularAddress?: string,\n underlyingCause?: unknown,\n ) {\n const extra =\n underlyingCause != null && underlyingCause !== ''\n ? ` (${stringifyUnderlyingCause(underlyingCause)})`\n : ''\n super(message + extra)\n this.name = 'Eip7702ModularAccountPublishError'\n this.underlyingCause = underlyingCause\n }\n}\n\nconst eip7702ModularCodes: Eip7702ModularAccountPublishErrorCode[] = [\n 'EIP7702_MODULAR_ACCOUNT_UNAVAILABLE',\n 'EIP7702_MODULAR_NOT_UPGRADED',\n 'EIP7702_MODULAR_DEPLOY_FAILED',\n 'EIP7702_MODULAR_NOT_CONFIRMED',\n]\n\nexport function isEip7702ModularAccountPublishError(e: unknown): e is Eip7702ModularAccountPublishError {\n if (e instanceof Eip7702ModularAccountPublishError) return true\n if (typeof e !== 'object' || e === null) return false\n const o = e as { name?: string; code?: unknown }\n return (\n o.name === 'Eip7702ModularAccountPublishError' &&\n typeof o.code === 'string' &&\n (eip7702ModularCodes as string[]).includes(o.code)\n )\n}\n\n/**\n * True when the RPC/contract error indicates the account is **not** Thirdweb ModularCore\n * (no Router / `getInstalledModules`), e.g. default EIP-4337 smart accounts.\n * Includes viem \"Cannot decode zero data\" when `eth_call` returns `0x` for a missing Router view.\n */\nexport function isRouterNonModularCoreAccountError(cause: unknown): boolean {\n const msg = stringifyUnderlyingCause(cause)\n if (/Router:\\s*function does not exist/i.test(msg)) return true\n if (/Cannot decode zero data\\s*\\(\\s*[\"']0x[\"']\\s*\\)/i.test(msg)) return true\n return false\n}\n"],"mappings":";AAAA,IAAa,IAAb,cAAkD,MAAM;CAGpC;CACA;CACA;CACA;CALlB,YACE,GACA,GACA,GACA,GACA,IAAsD,+BACtD;EAEA,AADA,MAAM,CAAO,GALG,KAAA,cAAA,GACA,KAAA,kBAAA,GACA,KAAA,eAAA,GACA,KAAA,OAAA,GAGhB,KAAK,OAAO;CACd;AACF;AAaA,SAAgB,EAAyB,GAAY,IAAS,KAAa;CACzE,IAAI,KAAK,MAAM,OAAO;CACtB,IAAI,aAAa,OAAO;EACtB,IAAM,IAAS,EAAE,iBAAiB,QAAQ,aAAa,EAAE,MAAM,YAAY;EAC3E,QAAQ,EAAE,U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AAFA,MAAM,IAAU,CAAK,GARL,KAAA,OAAA,GACA,KAAA,iBAAA,GAQhB,KAAK,OAAO,qCACZ,KAAK,kBAAkB;CACzB;AACF,GAEM,IAA+D;CACnE;CACA;CACA;CACA;AACF;AAEA,SAAgB,EAAoC,GAAoD;CACtG,IAAI,aAAa,GAAmC,OAAO;CAC3D,IAAI,OAAO,KAAM,aAAY,GAAY,OAAO;CAChD,IAAM,IAAI;CACV,OACE,EAAE,SAAS,uCACX,OAAO,EAAE,QAAS,YACjB,EAAiC,SAAS,EAAE,IAAI;AAErD;AAOA,SAAgB,EAAmC,GAAyB;CAC1E,IAAM,IAAM,EAAyB,CAAK;CAG1C,OADA,GADI,qCAAqC,KAAK,CAAG,KAC7C,kDAAkD,KAAK,CAAG;AAEhE"}
1
+ {"version":3,"file":"errors-Du3LNbJN.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["export class AttestationVerificationError extends Error {\n constructor(\n message: string,\n public readonly seedLocalId: string,\n public readonly expectedSchemas: string[],\n public readonly foundSchemas: string[],\n public readonly code: 'METADATA_PROPERTIES_MISSING' = 'METADATA_PROPERTIES_MISSING',\n ) {\n super(message)\n this.name = 'AttestationVerificationError'\n }\n}\n\nexport type ManagedAccountPublishErrorCode =\n | 'MANAGED_ACCOUNT_NOT_DEPLOYED'\n | 'MANAGED_ACCOUNT_UNAVAILABLE'\n | 'EXECUTOR_MODULE_NOT_INSTALLED'\n | 'MANAGED_ACCOUNT_SET_EAS_FAILED'\n | 'MODULAR_SIGNER_ACTIVATION_FAILED'\n | 'AUTOMATION_UNSUPPORTED_ACCOUNT'\n | 'AUTOMATION_PREFLIGHT_FAILED'\n | 'PUBLISH_PREFLIGHT_FAILED'\n | 'USEROP_FAILED_NO_REASON'\n | 'USEROP_REVERTED'\n\n/**\n * Best-effort string for RPC / thirdweb / viem failures that are not plain `Error`\n * (so logs and UIs can show the real revert or RPC reason).\n */\nexport function stringifyUnderlyingCause(u: unknown, maxLen = 700): string {\n if (u == null) return ''\n if (u instanceof Error) {\n const nested = u.cause instanceof Error ? ` | cause: ${u.cause.message}` : ''\n return (u.message + nested).slice(0, maxLen)\n }\n if (typeof u === 'object') {\n const o = u as Record<string, unknown>\n const parts: string[] = []\n if (typeof o.message === 'string') parts.push(o.message)\n if (typeof o.shortMessage === 'string') parts.push(o.shortMessage)\n if (typeof o.details === 'string') parts.push(o.details)\n if (typeof o.reason === 'string') parts.push(o.reason)\n if (parts.length) return parts.join(' | ').slice(0, maxLen)\n try {\n return JSON.stringify(u).slice(0, maxLen)\n } catch {\n return String(u).slice(0, maxLen)\n }\n }\n return String(u).slice(0, maxLen)\n}\n\n/**\n * Thrown or returned when the managed publishing account (on the publish chain) is missing,\n * unreachable, missing the executor module for the modular executor path, or EAS\n * pointer setup (`getEas` / `setEas`) fails, or modular session-signer activation fails.\n */\nexport class ManagedAccountPublishError extends Error {\n /** Original error when connection or deployment failed (avoids shadowing `Error.cause`). */\n public readonly underlyingCause?: unknown\n\n constructor(\n message: string,\n public readonly code: ManagedAccountPublishErrorCode,\n public readonly managedAddress?: string,\n underlyingCause?: unknown,\n ) {\n const extra =\n underlyingCause != null && underlyingCause !== ''\n ? ` (${stringifyUnderlyingCause(underlyingCause)})`\n : ''\n super(message + extra)\n this.name = 'ManagedAccountPublishError'\n this.underlyingCause = underlyingCause\n }\n}\n\n/**\n * True when `e` is a managed-account publish error. Uses `name` + `code` as a fallback\n * when `instanceof` fails across duplicate bundled class identities.\n */\nexport function isManagedAccountPublishError(e: unknown): e is ManagedAccountPublishError {\n if (e instanceof ManagedAccountPublishError) return true\n if (typeof e !== 'object' || e === null) return false\n const o = e as { name?: string; code?: unknown }\n return o.name === 'ManagedAccountPublishError' && typeof o.code === 'string'\n}\n\nexport type Eip7702ModularAccountPublishErrorCode =\n | 'EIP7702_MODULAR_ACCOUNT_UNAVAILABLE'\n | 'EIP7702_MODULAR_NOT_UPGRADED'\n | 'EIP7702_MODULAR_DEPLOY_FAILED'\n | 'EIP7702_MODULAR_NOT_CONFIRMED'\n\n/**\n * Thrown when the in-app modular (EIP-7702) wallet is missing, not upgraded on-chain, or deploy/bootstrap failed.\n */\nexport class Eip7702ModularAccountPublishError extends Error {\n public readonly underlyingCause?: unknown\n\n constructor(\n message: string,\n public readonly code: Eip7702ModularAccountPublishErrorCode,\n public readonly modularAddress?: string,\n underlyingCause?: unknown,\n ) {\n const extra =\n underlyingCause != null && underlyingCause !== ''\n ? ` (${stringifyUnderlyingCause(underlyingCause)})`\n : ''\n super(message + extra)\n this.name = 'Eip7702ModularAccountPublishError'\n this.underlyingCause = underlyingCause\n }\n}\n\nconst eip7702ModularCodes: Eip7702ModularAccountPublishErrorCode[] = [\n 'EIP7702_MODULAR_ACCOUNT_UNAVAILABLE',\n 'EIP7702_MODULAR_NOT_UPGRADED',\n 'EIP7702_MODULAR_DEPLOY_FAILED',\n 'EIP7702_MODULAR_NOT_CONFIRMED',\n]\n\nexport function isEip7702ModularAccountPublishError(e: unknown): e is Eip7702ModularAccountPublishError {\n if (e instanceof Eip7702ModularAccountPublishError) return true\n if (typeof e !== 'object' || e === null) return false\n const o = e as { name?: string; code?: unknown }\n return (\n o.name === 'Eip7702ModularAccountPublishError' &&\n typeof o.code === 'string' &&\n (eip7702ModularCodes as string[]).includes(o.code)\n )\n}\n\n/**\n * True when the RPC/contract error indicates the account is **not** Thirdweb ModularCore\n * (no Router / `getInstalledModules`), e.g. default EIP-4337 smart accounts.\n * Includes viem \"Cannot decode zero data\" when `eth_call` returns `0x` for a missing Router view.\n */\nexport function isRouterNonModularCoreAccountError(cause: unknown): boolean {\n const msg = stringifyUnderlyingCause(cause)\n if (/Router:\\s*function does not exist/i.test(msg)) return true\n if (/Cannot decode zero data\\s*\\(\\s*[\"']0x[\"']\\s*\\)/i.test(msg)) return true\n return false\n}\n"],"mappings":";AAAA,IAAa,IAAb,cAAkD,MAAM;CAGpC;CACA;CACA;CACA;CALlB,YACE,GACA,GACA,GACA,GACA,IAAsD,+BACtD;EAEA,AADA,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4B,OAAO;CACpD,IAAI,OAAO,KAAM,aAAY,GAAY,OAAO;CAChD,IAAM,IAAI;CACV,OAAO,EAAE,SAAS,gCAAgC,OAAO,EAAE,QAAS;AACtE;AAWA,IAAa,IAAb,cAAuD,MAAM;CAKzC;CACA;CALlB;CAEA,YACE,GACA,GACA,GACA,GACA;EACA,IAAM,IACJ,KAAmB,QAAQ,MAAoB,KAC3C,KAAK,EAAyB,CAAe,EAAE,KAC/C;EAGN,AAFA,MAAM,IAAU,CAAK,GARL,KAAA,OAAA,GACA,KAAA,iBAAA,GAQhB,KAAK,OAAO,qCACZ,KAAK,kBAAkB;CACzB;AACF,GAEM,IAA+D;CACnE;CACA;CACA;CACA;AACF;AAEA,SAAgB,EAAoC,GAAoD;CACtG,IAAI,aAAa,GAAmC,OAAO;CAC3D,IAAI,OAAO,KAAM,aAAY,GAAY,OAAO;CAChD,IAAM,IAAI;CACV,OACE,EAAE,SAAS,uCACX,OAAO,EAAE,QAAS,YACjB,EAAiC,SAAS,EAAE,IAAI;AAErD;AAOA,SAAgB,EAAmC,GAAyB;CAC1E,IAAM,IAAM,EAAyB,CAAK;CAG1C,OADA,GADI,qCAAqC,KAAK,CAAG,KAC7C,kDAAkD,KAAK,CAAG;AAEhE"}
package/dist/errors.d.ts CHANGED
@@ -5,14 +5,14 @@ export declare class AttestationVerificationError extends Error {
5
5
  readonly code: 'METADATA_PROPERTIES_MISSING';
6
6
  constructor(message: string, seedLocalId: string, expectedSchemas: string[], foundSchemas: string[], code?: 'METADATA_PROPERTIES_MISSING');
7
7
  }
8
- export type ManagedAccountPublishErrorCode = 'MANAGED_ACCOUNT_NOT_DEPLOYED' | 'MANAGED_ACCOUNT_UNAVAILABLE' | 'EXECUTOR_MODULE_NOT_INSTALLED' | 'MANAGED_ACCOUNT_SET_EAS_FAILED' | 'MODULAR_SIGNER_ACTIVATION_FAILED';
8
+ export type ManagedAccountPublishErrorCode = 'MANAGED_ACCOUNT_NOT_DEPLOYED' | 'MANAGED_ACCOUNT_UNAVAILABLE' | 'EXECUTOR_MODULE_NOT_INSTALLED' | 'MANAGED_ACCOUNT_SET_EAS_FAILED' | 'MODULAR_SIGNER_ACTIVATION_FAILED' | 'AUTOMATION_UNSUPPORTED_ACCOUNT' | 'AUTOMATION_PREFLIGHT_FAILED' | 'PUBLISH_PREFLIGHT_FAILED' | 'USEROP_FAILED_NO_REASON' | 'USEROP_REVERTED';
9
9
  /**
10
10
  * Best-effort string for RPC / thirdweb / viem failures that are not plain `Error`
11
11
  * (so logs and UIs can show the real revert or RPC reason).
12
12
  */
13
13
  export declare function stringifyUnderlyingCause(u: unknown, maxLen?: number): string;
14
14
  /**
15
- * Thrown or returned when the managed publishing account (Optimism Sepolia) is missing,
15
+ * Thrown or returned when the managed publishing account (on the publish chain) is missing,
16
16
  * unreachable, missing the executor module for the modular executor path, or EAS
17
17
  * pointer setup (`getEas` / `setEas`) fails, or modular session-signer activation fails.
18
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,4BAA6B,SAAQ,KAAK;aAGnC,WAAW,EAAE,MAAM;aACnB,eAAe,EAAE,MAAM,EAAE;aACzB,YAAY,EAAE,MAAM,EAAE;aACtB,IAAI,EAAE,6BAA6B;gBAJnD,OAAO,EAAE,MAAM,EACC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EAAE,EACzB,YAAY,EAAE,MAAM,EAAE,EACtB,IAAI,GAAE,6BAA6D;CAKtF;AAED,MAAM,MAAM,8BAA8B,GACtC,8BAA8B,GAC9B,6BAA6B,GAC7B,+BAA+B,GAC/B,gCAAgC,GAChC,kCAAkC,CAAA;AAEtC;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,SAAM,GAAG,MAAM,CAqBzE;AAED;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;aAMjC,IAAI,EAAE,8B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32
  }];
33
+ /**
34
+ * SeedProtocolExecutor (ERC-7579 executor module) calls and errors.
35
+ * `multiPublish` takes `PublishRequestData` (selector 0x2a29fadc), which differs from the
36
+ * ManagedAccount extension's `PublishRequestDataLegacy`: bytes32 fields are ordered
37
+ * seedUid, versionUid, seedSchemaUid, versionSchemaUid, and propertiesToUpdate uses a
38
+ * uint256 `publishIndex` instead of a string `publishLocalId`.
39
+ */
40
+ export declare const executorModuleAbi: readonly [{
41
+ readonly type: "function";
42
+ readonly name: "multiPublish";
43
+ readonly stateMutability: "payable";
44
+ readonly inputs: readonly [{
45
+ readonly name: "requests";
46
+ readonly type: "tuple[]";
47
+ readonly components: readonly [{
48
+ readonly name: "localId";
49
+ readonly type: "string";
50
+ }, {
51
+ readonly name: "seedUid";
52
+ readonly type: "bytes32";
53
+ }, {
54
+ readonly name: "versionUid";
55
+ readonly type: "bytes32";
56
+ }, {
57
+ readonly name: "seedSchemaUid";
58
+ readonly type: "bytes32";
59
+ }, {
60
+ readonly name: "versionSchemaUid";
61
+ readonly type: "bytes32";
62
+ }, {
63
+ readonly name: "seedIsRevocable";
64
+ readonly type: "bool";
65
+ }, {
66
+ readonly name: "listOfAttestations";
67
+ readonly type: "tuple[]";
68
+ readonly components: readonly [{
69
+ readonly name: "schema";
70
+ readonly type: "bytes32";
71
+ }, {
72
+ readonly name: "data";
73
+ readonly type: "tuple[]";
74
+ readonly components: readonly [{
75
+ readonly name: "recipient";
76
+ readonly type: "address";
77
+ }, {
78
+ readonly name: "expirationTime";
79
+ readonly type: "uint64";
80
+ }, {
81
+ readonly name: "revocable";
82
+ readonly type: "bool";
83
+ }, {
84
+ readonly name: "refUID";
85
+ readonly type: "bytes32";
86
+ }, {
87
+ readonly name: "data";
88
+ readonly type: "bytes";
89
+ }, {
90
+ readonly name: "value";
91
+ readonly type: "uint256";
92
+ }];
93
+ }];
94
+ }, {
95
+ readonly name: "propertiesToUpdate";
96
+ readonly type: "tuple[]";
97
+ readonly components: readonly [{
98
+ readonly name: "publishIndex";
99
+ readonly type: "uint256";
100
+ }, {
101
+ readonly name: "propertySchemaUid";
102
+ readonly type: "bytes32";
103
+ }];
104
+ }];
105
+ }];
106
+ readonly outputs: readonly [{
107
+ readonly name: "";
108
+ readonly type: "bytes32[]";
109
+ }];
110
+ }, {
111
+ readonly type: "function";
112
+ readonly name: "isInitialized";
113
+ readonly stateMutability: "view";
114
+ readonly inputs: readonly [{
115
+ readonly name: "account";
116
+ readonly type: "address";
117
+ }];
118
+ readonly outputs: readonly [{
119
+ readonly name: "";
120
+ readonly type: "bool";
121
+ }];
122
+ }, {
123
+ readonly type: "function";
124
+ readonly name: "getEAS";
125
+ readonly stateMutability: "view";
126
+ readonly inputs: readonly [{
127
+ readonly name: "account";
128
+ readonly type: "address";
129
+ }];
130
+ readonly outputs: readonly [{
131
+ readonly name: "";
132
+ readonly type: "address";
133
+ }];
134
+ }, {
135
+ readonly type: "error";
136
+ readonly name: "AlreadyInitialized";
137
+ readonly inputs: readonly [{
138
+ readonly name: "account";
139
+ readonly type: "address";
140
+ }];
141
+ }, {
142
+ readonly type: "error";
143
+ readonly name: "NotInitialized";
144
+ readonly inputs: readonly [{
145
+ readonly name: "account";
146
+ readonly type: "address";
147
+ }];
148
+ }, {
149
+ readonly type: "error";
150
+ readonly name: "InvalidEASAddress";
151
+ readonly inputs: readonly [];
152
+ }, {
153
+ readonly type: "error";
154
+ readonly name: "AttestationFailed";
155
+ readonly inputs: readonly [];
156
+ }, {
157
+ readonly type: "error";
158
+ readonly name: "MultiAttestFailed";
159
+ readonly inputs: readonly [];
160
+ }];
33
161
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBpB,CAAA"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBpB,CAAA;AAWV;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDpB,CAAA"}
@@ -1,4 +1,4 @@
1
- /** Thirdweb ManagedAccount factory (0x76f47…) on Optimism Sepolia. */
1
+ /** Thirdweb ManagedAccount factory ABI (see `MANAGED_ACCOUNT_FACTORY_ADDRESSES` for deployments). */
2
2
  export declare const managedAccountFactoryAbi: readonly [{
3
3
  readonly type: "function";
4
4
  readonly name: "getAddress";
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/factory.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB3B,CAAA"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/factory.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqB3B,CAAA"}
@@ -170,6 +170,17 @@ export declare const publisherReadWriteAbi: readonly [{
170
170
  readonly outputs: readonly [{
171
171
  readonly type: "bool";
172
172
  }];
173
+ }, {
174
+ readonly type: "function";
175
+ readonly name: "isAdmin";
176
+ readonly stateMutability: "view";
177
+ readonly inputs: readonly [{
178
+ readonly name: "signer";
179
+ readonly type: "address";
180
+ }];
181
+ readonly outputs: readonly [{
182
+ readonly type: "bool";
183
+ }];
173
184
  }];
174
185
  /** Extension / ManagedAccount publisher events. */
175
186
  export declare const publisherEventsAbi: readonly [{
@@ -1 +1 @@
1
- {"version":3,"file":"publisher.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/publisher.ts"],"names":[],"mappings":"AAmBA,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkClB,CAAA;AAEV,uEAAuE;AACvE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAA;AAEV,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBxB,CAAA;AAEV,mDAAmD;AACnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;EAqBrB,CAAA"}
1
+ {"version":3,"file":"publisher.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/publisher.ts"],"names":[],"mappings":"AAmBA,+DAA+D;AAC/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkClB,CAAA;AAEV,uEAAuE;AACvE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCzB,CAAA;AAEV,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BxB,CAAA;AAEV,mDAAmD;AACnD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;EAqBrB,CAAA"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Custom errors a publish call can revert with on the ManagedAccount stack: SeedPublishLib,
3
+ * the Seed protocol extensions, SeedAccountAuth and the Seed executor router extension.
4
+ * The executor module's own errors are in `executorModuleAbi`, EAS's in `easAbi`.
5
+ */
6
+ export declare const seedErrorsAbi: readonly [{
7
+ readonly type: "error";
8
+ readonly name: "PublishIndexOutOfBounds";
9
+ readonly inputs: readonly [{
10
+ readonly name: "targetIndex";
11
+ readonly type: "uint256";
12
+ }, {
13
+ readonly name: "length";
14
+ readonly type: "uint256";
15
+ }];
16
+ }, {
17
+ readonly type: "error";
18
+ readonly name: "UnknownPublishLocalId";
19
+ readonly inputs: readonly [{
20
+ readonly name: "publishLocalId";
21
+ readonly type: "string";
22
+ }];
23
+ }, {
24
+ readonly type: "error";
25
+ readonly name: "PublishTargetAlreadyAttested";
26
+ readonly inputs: readonly [{
27
+ readonly name: "requestIndex";
28
+ readonly type: "uint256";
29
+ }, {
30
+ readonly name: "targetIndex";
31
+ readonly type: "uint256";
32
+ }];
33
+ }, {
34
+ readonly type: "error";
35
+ readonly name: "EmptyAttestationData";
36
+ readonly inputs: readonly [{
37
+ readonly name: "targetIndex";
38
+ readonly type: "uint256";
39
+ }, {
40
+ readonly name: "propertySchemaUid";
41
+ readonly type: "bytes32";
42
+ }];
43
+ }, {
44
+ readonly type: "error";
45
+ readonly name: "PropertyToUpdateNotFound";
46
+ readonly inputs: readonly [{
47
+ readonly name: "requestIndex";
48
+ readonly type: "uint256";
49
+ }, {
50
+ readonly name: "targetIndex";
51
+ readonly type: "uint256";
52
+ }, {
53
+ readonly name: "propertySchemaUid";
54
+ readonly type: "bytes32";
55
+ }];
56
+ }, {
57
+ readonly type: "error";
58
+ readonly name: "AmbiguousPropertyToUpdate";
59
+ readonly inputs: readonly [{
60
+ readonly name: "targetIndex";
61
+ readonly type: "uint256";
62
+ }, {
63
+ readonly name: "propertySchemaUid";
64
+ readonly type: "bytes32";
65
+ }];
66
+ }, {
67
+ readonly type: "error";
68
+ readonly name: "InvalidEAS";
69
+ readonly inputs: readonly [{
70
+ readonly name: "eas";
71
+ readonly type: "address";
72
+ }];
73
+ }, {
74
+ readonly type: "error";
75
+ readonly name: "AttestationFailed";
76
+ readonly inputs: readonly [{
77
+ readonly name: "schemaUid";
78
+ readonly type: "bytes32";
79
+ }];
80
+ }, {
81
+ readonly type: "error";
82
+ readonly name: "Unauthorized";
83
+ readonly inputs: readonly [{
84
+ readonly name: "caller";
85
+ readonly type: "address";
86
+ }];
87
+ }, {
88
+ readonly type: "error";
89
+ readonly name: "InvalidAddress";
90
+ readonly inputs: readonly [{
91
+ readonly name: "addr";
92
+ readonly type: "address";
93
+ }];
94
+ }, {
95
+ readonly type: "error";
96
+ readonly name: "SeedExecutorAlreadyInstalled";
97
+ readonly inputs: readonly [];
98
+ }, {
99
+ readonly type: "error";
100
+ readonly name: "SeedExecutorNotInstalled";
101
+ readonly inputs: readonly [];
102
+ }, {
103
+ readonly type: "error";
104
+ readonly name: "NotSeedExecutor";
105
+ readonly inputs: readonly [{
106
+ readonly name: "caller";
107
+ readonly type: "address";
108
+ }];
109
+ }, {
110
+ readonly type: "error";
111
+ readonly name: "UnsupportedExecutionMode";
112
+ readonly inputs: readonly [{
113
+ readonly name: "mode";
114
+ readonly type: "bytes32";
115
+ }];
116
+ }, {
117
+ readonly type: "error";
118
+ readonly name: "TargetNotAllowed";
119
+ readonly inputs: readonly [{
120
+ readonly name: "target";
121
+ readonly type: "address";
122
+ }];
123
+ }, {
124
+ readonly type: "error";
125
+ readonly name: "SelectorNotAllowed";
126
+ readonly inputs: readonly [{
127
+ readonly name: "selector";
128
+ readonly type: "bytes4";
129
+ }];
130
+ }, {
131
+ readonly type: "error";
132
+ readonly name: "ValueMismatch";
133
+ readonly inputs: readonly [{
134
+ readonly name: "encodedValue";
135
+ readonly type: "uint256";
136
+ }, {
137
+ readonly name: "sentValue";
138
+ readonly type: "uint256";
139
+ }];
140
+ }];
141
+ //# sourceMappingURL=seedErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seedErrors.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/seedErrors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEhB,CAAA"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * `SeedExecutorRouterExtension`, routed on ManagedAccounts by the factory
3
+ * (seed-protocol contracts/SeedExecutorRouterExtension.sol). Installs the Seed executor on a
4
+ * Router (non-ModularCore) account.
5
+ */
6
+ export declare const seedExecutorRouterAbi: readonly [{
7
+ readonly type: "function";
8
+ readonly name: "installSeedExecutor";
9
+ readonly stateMutability: "nonpayable";
10
+ readonly inputs: readonly [];
11
+ readonly outputs: readonly [];
12
+ }, {
13
+ readonly type: "function";
14
+ readonly name: "getSeedExecutor";
15
+ readonly stateMutability: "view";
16
+ readonly inputs: readonly [];
17
+ readonly outputs: readonly [{
18
+ readonly name: "executor";
19
+ readonly type: "address";
20
+ }, {
21
+ readonly name: "eas";
22
+ readonly type: "address";
23
+ }];
24
+ }, {
25
+ readonly type: "function";
26
+ readonly name: "isModuleInstalled";
27
+ readonly stateMutability: "view";
28
+ readonly inputs: readonly [{
29
+ readonly name: "moduleTypeId";
30
+ readonly type: "uint256";
31
+ }, {
32
+ readonly name: "module";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly name: "additionalContext";
36
+ readonly type: "bytes";
37
+ }];
38
+ readonly outputs: readonly [{
39
+ readonly name: "";
40
+ readonly type: "bool";
41
+ }];
42
+ }, {
43
+ readonly type: "error";
44
+ readonly name: "Unauthorized";
45
+ readonly inputs: readonly [{
46
+ readonly name: "caller";
47
+ readonly type: "address";
48
+ }];
49
+ }, {
50
+ readonly type: "error";
51
+ readonly name: "SeedExecutorAlreadyInstalled";
52
+ readonly inputs: readonly [];
53
+ }, {
54
+ readonly type: "error";
55
+ readonly name: "SeedExecutorNotInstalled";
56
+ readonly inputs: readonly [];
57
+ }];
58
+ /** ERC-7579 module type id for executors. */
59
+ export declare const MODULE_TYPE_EXECUTOR = 2n;
60
+ //# sourceMappingURL=seedExecutorRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seedExecutorRouter.d.ts","sourceRoot":"","sources":["../../../src/helpers/abi/seedExecutorRouter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BxB,CAAA;AAEV,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB,KAAK,CAAA"}