@seedprotocol/publish 0.7.3-next.613.g79a8dfd → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/chainConfig-RhKIuGtN.js +5289 -0
- package/dist/chainConfig-RhKIuGtN.js.map +1 -0
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/{ensureAutomationSessionKey-bw6knEyC.js → ensureAutomationSessionKey-CvUntLne.js} +25 -26
- package/dist/{ensureAutomationSessionKey-bw6knEyC.js.map → ensureAutomationSessionKey-CvUntLne.js.map} +1 -1
- package/dist/{ensureModularPublishBootstrap-Vc4Jz_B9.js → ensureModularPublishBootstrap-D9q246TT.js} +9 -11
- package/dist/{ensureModularPublishBootstrap-Vc4Jz_B9.js.map → ensureModularPublishBootstrap-D9q246TT.js.map} +1 -1
- package/dist/ensureSmartWalletThenPublish-C_iS5Wb-.js +52 -0
- package/dist/ensureSmartWalletThenPublish-C_iS5Wb-.js.map +1 -0
- package/dist/helpers/ensureSmartWalletThenPublish.d.ts +1 -0
- package/dist/helpers/ensureSmartWalletThenPublish.d.ts.map +1 -1
- package/dist/helpers/ensureWalletThenPublish.d.ts +7 -0
- package/dist/helpers/ensureWalletThenPublish.d.ts.map +1 -1
- package/dist/helpers/publishItem.d.ts +21 -0
- package/dist/helpers/publishItem.d.ts.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +341 -476
- package/dist/index.js.map +1 -1
- package/dist/managedAccountAdmin-CLVRJEKI.js +26 -0
- package/dist/{managedAccountAdmin-B3DPMmhR.js.map → managedAccountAdmin-CLVRJEKI.js.map} +1 -1
- package/dist/publishAuthorization-DAarz1JK.js +176 -0
- package/dist/publishAuthorization-DAarz1JK.js.map +1 -0
- package/dist/{resolveRevokeAccount-CkbTpC27.js → resolveRevokeAccount-TRcqJtIO.js} +13 -15
- package/dist/{resolveRevokeAccount-CkbTpC27.js.map → resolveRevokeAccount-TRcqJtIO.js.map} +1 -1
- package/dist/services/publish/helpers/getPublishUploadData.d.ts +12 -23
- package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
- package/dist/services/upload/uploadMachine.d.ts +1 -1
- package/dist/thirdweb.js +144 -145
- package/dist/thirdweb.js.map +1 -1
- package/dist/{worker-CCQ7KBMm.js → worker-CyuMiBB-.js} +2 -2
- package/dist/{worker-CCQ7KBMm.js.map → worker-CyuMiBB-.js.map} +1 -1
- package/package.json +6 -6
- package/dist/chainConfig-BDMRU4m8.js +0 -1455
- package/dist/chainConfig-BDMRU4m8.js.map +0 -1
- package/dist/ensureSmartWalletThenPublish-42iEhiHG.js +0 -47
- package/dist/ensureSmartWalletThenPublish-42iEhiHG.js.map +0 -1
- package/dist/managedAccountAdmin-B3DPMmhR.js +0 -28
- package/dist/publishAuthorization-CAFF5jQ2.js +0 -4023
- package/dist/publishAuthorization-CAFF5jQ2.js.map +0 -1
- package/dist/publishThirdwebClient-CPzAjnmf.js +0 -18
- package/dist/publishThirdwebClient-CPzAjnmf.js.map +0 -1
package/dist/thirdweb.js
CHANGED
|
@@ -1,161 +1,160 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-bw6knEyC.js";
|
|
1
|
+
import { A as e, At as t, B as n, C as r, D as i, Dt as a, F as o, Ft as s, G as c, H as l, I as u, It as d, J as f, K as ee, L as p, M as m, N as te, Nt as ne, O as re, P as h, R as g, S as ie, T as ae, U as oe, V as _, W as v, a as y, et as se, ht as ce, i as le, j as ue, jt as b, k as de, nt as x, o as fe, p as S, pt as pe, q as me, rt as C, t as w, tt as he, w as T, x as E, z as D } from "./chainConfig-RhKIuGtN.js";
|
|
2
|
+
import { a as O, d as k, f as A, g as j, h as M, l as N, m as P, p as F, u as I } from "./publishAuthorization-DAarz1JK.js";
|
|
3
|
+
import { t as L } from "./ensureSmartWalletThenPublish-C_iS5Wb-.js";
|
|
4
|
+
import { t as R } from "./ensureModularPublishBootstrap-D9q246TT.js";
|
|
5
|
+
import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-CvUntLne.js";
|
|
7
6
|
import { client as H } from "@seedprotocol/sdk";
|
|
8
7
|
import { deploySmartAccount as ge, getContract as U, sendTransaction as _e } from "thirdweb";
|
|
9
|
-
import {
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { addSessionKey as
|
|
8
|
+
import { ConnectButton as ve, ThirdwebProvider as ye, darkTheme as be, useActiveAccount as xe, useActiveWallet as Se, useActiveWalletConnectionStatus as Ce, useIsAutoConnecting as we } from "thirdweb/react";
|
|
9
|
+
import { useCallback as Te, useEffect as W, useRef as G } from "react";
|
|
10
|
+
import { assessPublishAuthorization as Ee, decodePublishAuthorizationData as De, getPublishAuthorizationFromEas as Oe } from "@seedprotocol/eas";
|
|
11
|
+
import { jsx as K } from "react/jsx-runtime";
|
|
12
|
+
import { SeedProvider as ke } from "@seedprotocol/react";
|
|
13
|
+
import { addSessionKey as Ae, shouldUpdateSessionKey as je } from "thirdweb/extensions/erc4337";
|
|
15
14
|
//#region src/react/ConnectButton.tsx
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
console.warn("[ConnectButton] Wallet setup / module install skipped:", e),
|
|
15
|
+
var q = "seedProtocol:publish:userChoseWalletDisconnect";
|
|
16
|
+
function Me(e) {
|
|
17
|
+
console.warn("[ConnectButton] Wallet setup / module install skipped:", e), y().onWalletSetupWarning?.(e);
|
|
19
18
|
}
|
|
20
|
-
function
|
|
19
|
+
function Ne() {
|
|
21
20
|
return H.isInitialized() ? Promise.resolve() : new Promise((e) => {
|
|
22
21
|
H.onReady(() => e());
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
|
-
async function
|
|
24
|
+
async function Pe(e, t, n) {
|
|
26
25
|
if (n.modularAccountModuleContract) {
|
|
27
26
|
if (n.useModularExecutor) {
|
|
28
27
|
if (!t) return;
|
|
29
28
|
try {
|
|
30
|
-
|
|
31
|
-
let e =
|
|
29
|
+
l();
|
|
30
|
+
let e = h();
|
|
32
31
|
await e.autoConnect({
|
|
33
|
-
client:
|
|
34
|
-
chain:
|
|
32
|
+
client: f(),
|
|
33
|
+
chain: C(n)
|
|
35
34
|
});
|
|
36
35
|
let r = e.getAccount();
|
|
37
36
|
if (!r) return;
|
|
38
|
-
await
|
|
37
|
+
await T(t, r, n);
|
|
39
38
|
} catch {}
|
|
40
39
|
} else try {
|
|
41
|
-
await
|
|
40
|
+
await T(e.address, e, n);
|
|
42
41
|
} catch (e) {
|
|
43
|
-
|
|
42
|
+
Me(e);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
var
|
|
48
|
-
let
|
|
49
|
-
|
|
46
|
+
var Fe = () => {
|
|
47
|
+
let e = j(), t = C(e), n = Se(), r = xe(), i = Ce(), a = we(), s = G(null), c = G(!1), u = G(!1);
|
|
48
|
+
W(() => {
|
|
50
49
|
if (typeof window > "u") return;
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
let
|
|
50
|
+
let n = c.current;
|
|
51
|
+
c.current = a;
|
|
52
|
+
let r;
|
|
54
53
|
try {
|
|
55
|
-
|
|
54
|
+
r = performance.getEntriesByType("navigation")[0]?.type;
|
|
56
55
|
} catch {
|
|
57
|
-
|
|
56
|
+
r = void 0;
|
|
58
57
|
}
|
|
59
|
-
if (
|
|
60
|
-
let
|
|
58
|
+
if (r !== "reload") return;
|
|
59
|
+
let s = !1;
|
|
61
60
|
try {
|
|
62
|
-
|
|
61
|
+
s = sessionStorage.getItem(q) === "1";
|
|
63
62
|
} catch {
|
|
64
|
-
|
|
63
|
+
s = !1;
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
client:
|
|
68
|
-
chain:
|
|
65
|
+
s || n && !a && i === "disconnected" && (u.current || (u.current = !0, (e.useModularExecutor ? o() : h()).autoConnect({
|
|
66
|
+
client: f(),
|
|
67
|
+
chain: t
|
|
69
68
|
}).catch(() => {})));
|
|
70
69
|
}, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
i,
|
|
71
|
+
a,
|
|
72
|
+
e.useModularExecutor,
|
|
73
|
+
t
|
|
75
74
|
]);
|
|
76
|
-
let
|
|
77
|
-
let
|
|
78
|
-
if (!
|
|
79
|
-
await
|
|
80
|
-
let
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
-
let
|
|
75
|
+
let d = Te(async (n) => {
|
|
76
|
+
let r = n.getAccount();
|
|
77
|
+
if (!r) return;
|
|
78
|
+
await Ne(), S.stopAll();
|
|
79
|
+
let i = /* @__PURE__ */ new Set([r.address.toLowerCase()]), a;
|
|
80
|
+
if (e.useModularExecutor) {
|
|
81
|
+
l();
|
|
82
|
+
let e = n.getAdminAccount?.()?.address ?? r.address, o = async () => {
|
|
84
83
|
try {
|
|
85
|
-
return await
|
|
84
|
+
return await m(t);
|
|
86
85
|
} catch {
|
|
87
86
|
try {
|
|
88
|
-
return await
|
|
87
|
+
return await p(e);
|
|
89
88
|
} catch {
|
|
90
89
|
return;
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
};
|
|
94
|
-
|
|
93
|
+
a = await o(), a ||= (await new Promise((e) => queueMicrotask(() => e())), await o()), a && i.add(a.toLowerCase());
|
|
95
94
|
}
|
|
96
|
-
let
|
|
97
|
-
if (
|
|
98
|
-
|
|
95
|
+
let o = [...i].sort().join(",");
|
|
96
|
+
if (s.current !== o) {
|
|
97
|
+
s.current = o;
|
|
99
98
|
try {
|
|
100
|
-
let e =
|
|
101
|
-
await
|
|
99
|
+
let e = x(r);
|
|
100
|
+
await ce({
|
|
102
101
|
...e,
|
|
103
|
-
ownedAddresses: [...
|
|
104
|
-
publisherAddress:
|
|
102
|
+
ownedAddresses: [...i],
|
|
103
|
+
publisherAddress: a ?? r.address
|
|
105
104
|
});
|
|
106
105
|
} catch (e) {
|
|
107
|
-
throw
|
|
106
|
+
throw s.current = null, console.warn("[ConnectButton] Failed to set seed client addresses:", e), e;
|
|
108
107
|
}
|
|
109
|
-
await
|
|
108
|
+
await Pe(r, a, e);
|
|
110
109
|
}
|
|
111
|
-
}, [
|
|
112
|
-
return
|
|
113
|
-
if (
|
|
114
|
-
if (
|
|
115
|
-
|
|
110
|
+
}, [e]);
|
|
111
|
+
return W(() => {
|
|
112
|
+
if (a) return;
|
|
113
|
+
if (i !== "connected") {
|
|
114
|
+
s.current = null;
|
|
116
115
|
return;
|
|
117
116
|
}
|
|
118
|
-
if (!
|
|
117
|
+
if (!n) return;
|
|
119
118
|
let e = !1;
|
|
120
119
|
return (async () => {
|
|
121
120
|
try {
|
|
122
121
|
if (e) return;
|
|
123
|
-
await
|
|
122
|
+
await d(n);
|
|
124
123
|
} catch {}
|
|
125
124
|
})(), () => {
|
|
126
125
|
e = !0;
|
|
127
126
|
};
|
|
128
127
|
}, [
|
|
128
|
+
n,
|
|
129
|
+
r?.address,
|
|
129
130
|
i,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
f
|
|
134
|
-
|
|
135
|
-
client: I(),
|
|
136
|
-
wallets: y(n),
|
|
131
|
+
a,
|
|
132
|
+
d
|
|
133
|
+
]), /* @__PURE__ */ K(ve, {
|
|
134
|
+
client: f(),
|
|
135
|
+
wallets: g(e),
|
|
137
136
|
autoConnect: !0,
|
|
138
|
-
chain:
|
|
139
|
-
chains: [
|
|
137
|
+
chain: t,
|
|
138
|
+
chains: [t],
|
|
140
139
|
onConnect: async (e, t) => {
|
|
141
140
|
let n = e.getAccount();
|
|
142
141
|
if (n) {
|
|
143
142
|
try {
|
|
144
|
-
sessionStorage.removeItem(
|
|
143
|
+
sessionStorage.removeItem(q);
|
|
145
144
|
} catch {}
|
|
146
145
|
console.log("[ConnectButton] Connected", n.address);
|
|
147
146
|
try {
|
|
148
|
-
await
|
|
147
|
+
await d(e);
|
|
149
148
|
} catch {}
|
|
150
149
|
}
|
|
151
150
|
},
|
|
152
151
|
onDisconnect: () => {
|
|
153
152
|
try {
|
|
154
|
-
sessionStorage.setItem(
|
|
153
|
+
sessionStorage.setItem(q, "1");
|
|
155
154
|
} catch {}
|
|
156
|
-
|
|
155
|
+
pe(), S.stopAll();
|
|
157
156
|
},
|
|
158
|
-
theme:
|
|
157
|
+
theme: be({ colors: {
|
|
159
158
|
primaryButtonBg: "#1D2939",
|
|
160
159
|
primaryButtonText: "#FFFFFF",
|
|
161
160
|
secondaryButtonHoverBg: "#1D2939",
|
|
@@ -164,125 +163,125 @@ var Pe = () => {
|
|
|
164
163
|
borderColor: "#344054"
|
|
165
164
|
} })
|
|
166
165
|
});
|
|
167
|
-
},
|
|
168
|
-
t &&
|
|
169
|
-
}, [t]), /* @__PURE__ */
|
|
170
|
-
value: t ??
|
|
171
|
-
children: /* @__PURE__ */
|
|
172
|
-
queryClient:
|
|
173
|
-
queryClientRef:
|
|
166
|
+
}, Ie = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => (W(() => {
|
|
167
|
+
t && fe(t);
|
|
168
|
+
}, [t]), /* @__PURE__ */ K(M.Provider, {
|
|
169
|
+
value: t ?? le(),
|
|
170
|
+
children: /* @__PURE__ */ K(ye, { children: /* @__PURE__ */ K(ke, {
|
|
171
|
+
queryClient: n,
|
|
172
|
+
queryClientRef: r,
|
|
174
173
|
children: e
|
|
175
174
|
}) })
|
|
176
|
-
})),
|
|
175
|
+
})), Le = "Modular (EIP-7702) wallet is not connected. Sign in with the same method and try again.", Re = () => `Your modular account is not upgraded to an EIP-7702 smart account on ${w()} yet. Enable autoDeployEip7702ModularAccount in publish config or complete wallet setup, then retry.`, ze = () => `Automatic EIP-7702 smart account setup failed on ${w()}. Retry or reconnect your wallet.`, J = "EIP-7702 upgrade was sent but on-chain bytecode was not detected yet. Wait a moment and retry.", Y = 5;
|
|
177
176
|
async function Be() {
|
|
178
|
-
let { autoDeployEip7702ModularAccount: e } =
|
|
179
|
-
await
|
|
180
|
-
client:
|
|
181
|
-
chain:
|
|
177
|
+
let { autoDeployEip7702ModularAccount: e } = y(), n = o();
|
|
178
|
+
await n.autoConnect({
|
|
179
|
+
client: f(),
|
|
180
|
+
chain: C()
|
|
182
181
|
});
|
|
183
|
-
let
|
|
184
|
-
if (!
|
|
185
|
-
let i =
|
|
182
|
+
let r = n.getAccount();
|
|
183
|
+
if (!r) throw new s(Le, "EIP7702_MODULAR_ACCOUNT_UNAVAILABLE");
|
|
184
|
+
let i = f(), a = U({
|
|
186
185
|
client: i,
|
|
187
|
-
chain:
|
|
188
|
-
address:
|
|
186
|
+
chain: C(),
|
|
187
|
+
address: r.address
|
|
189
188
|
});
|
|
190
|
-
if (!await r
|
|
191
|
-
if (!e) throw new
|
|
189
|
+
if (!await t(r.address)) {
|
|
190
|
+
if (!e) throw new s(Re(), "EIP7702_MODULAR_NOT_UPGRADED", r.address);
|
|
192
191
|
try {
|
|
193
192
|
await ge({
|
|
194
|
-
smartAccount:
|
|
195
|
-
chain:
|
|
193
|
+
smartAccount: r,
|
|
194
|
+
chain: C(),
|
|
196
195
|
client: i,
|
|
197
196
|
accountContract: a
|
|
198
197
|
});
|
|
199
198
|
} catch (e) {
|
|
200
|
-
if (await
|
|
201
|
-
throw new
|
|
199
|
+
if (await b(r.address, Y)) return;
|
|
200
|
+
throw new s(ze(), "EIP7702_MODULAR_DEPLOY_FAILED", r.address, e);
|
|
202
201
|
}
|
|
203
|
-
if (!await
|
|
202
|
+
if (!await b(r.address, Y)) throw new s(J, "EIP7702_MODULAR_NOT_CONFIRMED", r.address);
|
|
204
203
|
}
|
|
205
204
|
}
|
|
206
205
|
//#endregion
|
|
207
206
|
//#region src/helpers/defaultApprovedTargetsForModularPublish.ts
|
|
208
207
|
function X(e) {
|
|
209
|
-
return
|
|
208
|
+
return P();
|
|
210
209
|
}
|
|
211
210
|
//#endregion
|
|
212
211
|
//#region src/helpers/ensureManagedSignerSessionKey.ts
|
|
213
|
-
var Ve = () => `Could not connect the managed publishing account to authorize the modular signer on ${
|
|
212
|
+
var Ve = () => `Could not connect the managed publishing account to authorize the modular signer on ${w()}. Reconnect and try again.`, Z = () => `Could not authorize the modular wallet as a session signer on your publishing account on ${w()}.`;
|
|
214
213
|
async function He(e) {
|
|
215
|
-
let { managedAddress: t, signerAddress: n } = e, r =
|
|
214
|
+
let { managedAddress: t, signerAddress: n } = e, r = h();
|
|
216
215
|
await r.autoConnect({
|
|
217
|
-
client:
|
|
218
|
-
chain:
|
|
216
|
+
client: f(),
|
|
217
|
+
chain: C()
|
|
219
218
|
});
|
|
220
|
-
let
|
|
221
|
-
if (!
|
|
219
|
+
let i = r.getAccount();
|
|
220
|
+
if (!i) throw new d(Ve(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
|
|
222
221
|
let o = U({
|
|
223
|
-
client:
|
|
224
|
-
chain:
|
|
222
|
+
client: f(),
|
|
223
|
+
chain: C(),
|
|
225
224
|
address: t
|
|
226
225
|
}), s = {
|
|
227
226
|
approvedTargets: X(t),
|
|
228
227
|
nativeTokenLimitPerTransaction: 0
|
|
229
|
-
},
|
|
228
|
+
}, c = !1;
|
|
230
229
|
try {
|
|
231
|
-
|
|
230
|
+
c = await je({
|
|
232
231
|
accountContract: o,
|
|
233
232
|
sessionKeyAddress: n,
|
|
234
233
|
newPermissions: s
|
|
235
234
|
});
|
|
236
235
|
} catch (e) {
|
|
237
|
-
throw new
|
|
236
|
+
throw new d(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
238
237
|
}
|
|
239
|
-
if (
|
|
240
|
-
let e =
|
|
238
|
+
if (c) try {
|
|
239
|
+
let e = Ae({
|
|
241
240
|
contract: o,
|
|
242
|
-
account:
|
|
241
|
+
account: i,
|
|
243
242
|
sessionKeyAddress: n,
|
|
244
243
|
permissions: s
|
|
245
244
|
}), t = await _e({
|
|
246
|
-
account:
|
|
245
|
+
account: i,
|
|
247
246
|
transaction: e
|
|
248
247
|
});
|
|
249
|
-
await
|
|
248
|
+
await ne(t.transactionHash);
|
|
250
249
|
} catch (e) {
|
|
251
|
-
throw new
|
|
250
|
+
throw new d(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
252
251
|
}
|
|
253
|
-
let
|
|
252
|
+
let l = !1;
|
|
254
253
|
try {
|
|
255
|
-
|
|
254
|
+
l = await a(t, n);
|
|
256
255
|
} catch (e) {
|
|
257
|
-
throw new
|
|
256
|
+
throw new d(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
258
257
|
}
|
|
259
|
-
if (!
|
|
258
|
+
if (!l) throw new d(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
|
|
260
259
|
}
|
|
261
260
|
//#endregion
|
|
262
261
|
//#region src/helpers/enrollPublishAutomation.ts
|
|
263
262
|
async function Q(e) {
|
|
264
|
-
let t =
|
|
263
|
+
let t = h();
|
|
265
264
|
await t.autoConnect({
|
|
266
|
-
client:
|
|
267
|
-
chain:
|
|
265
|
+
client: f(),
|
|
266
|
+
chain: C()
|
|
268
267
|
});
|
|
269
268
|
let n = t.getAccount();
|
|
270
|
-
if (!n) throw new
|
|
269
|
+
if (!n) throw new d("Could not connect the managed publishing account to enroll or revoke publish automation.", "MANAGED_ACCOUNT_UNAVAILABLE", e);
|
|
271
270
|
return n;
|
|
272
271
|
}
|
|
273
272
|
async function $(e, t) {
|
|
274
|
-
return t ||
|
|
273
|
+
return t || x(await Q(e));
|
|
275
274
|
}
|
|
276
275
|
async function Ue(e) {
|
|
277
|
-
let t =
|
|
276
|
+
let t = y();
|
|
278
277
|
if (!t.modularAccountModuleContract?.trim()) throw Error("@seedprotocol/publish: enrollPublishAutomation requires PublishConfig.modularAccountModuleContract");
|
|
279
278
|
let n = await Q(e), r;
|
|
280
279
|
try {
|
|
281
|
-
r = await
|
|
280
|
+
r = await T(e, n, t);
|
|
282
281
|
} catch (t) {
|
|
283
|
-
throw t instanceof
|
|
282
|
+
throw t instanceof d ? t : new d("Executor module setup failed for publish automation.", "EXECUTOR_MODULE_NOT_INSTALLED", e, t);
|
|
284
283
|
}
|
|
285
|
-
await
|
|
284
|
+
await ae(e, r.status === "installed" ? { installedEas: r.eas } : { readAttempts: r.status === "already-installed" ? 5 : 1 });
|
|
286
285
|
}
|
|
287
286
|
async function We(e) {
|
|
288
287
|
let { managedAddress: t, sessionKeyAddress: n, appAddress: r, expiresAt: i } = e;
|
|
@@ -295,7 +294,7 @@ async function We(e) {
|
|
|
295
294
|
return {
|
|
296
295
|
managedAddress: t,
|
|
297
296
|
sessionKeyAddress: n,
|
|
298
|
-
authorization: await
|
|
297
|
+
authorization: await O({
|
|
299
298
|
wallet: a,
|
|
300
299
|
identity: t,
|
|
301
300
|
sessionKey: n,
|
|
@@ -309,7 +308,7 @@ async function Ge(e) {
|
|
|
309
308
|
await z({
|
|
310
309
|
managedAddress: t,
|
|
311
310
|
sessionKeyAddress: n
|
|
312
|
-
}), await
|
|
311
|
+
}), await N({
|
|
313
312
|
wallet: i,
|
|
314
313
|
uid: r
|
|
315
314
|
});
|
|
@@ -333,15 +332,15 @@ async function Ke(e) {
|
|
|
333
332
|
o.push(e instanceof Error ? e.message : "isActiveSigner check failed");
|
|
334
333
|
}
|
|
335
334
|
if (a) try {
|
|
336
|
-
let e = await
|
|
335
|
+
let e = await Oe({
|
|
337
336
|
identities: [t],
|
|
338
337
|
sessionKeys: [n],
|
|
339
338
|
excludeRevoked: !0
|
|
340
339
|
}), i = r == null ? Date.now() : r * 1e3;
|
|
341
340
|
for (let t of e) try {
|
|
342
|
-
let e =
|
|
341
|
+
let e = De(t.decodedDataJson ?? "[]");
|
|
343
342
|
if (e.identity.toLowerCase() !== c || e.sessionKey.toLowerCase() !== s) continue;
|
|
344
|
-
let n = typeof t.expirationTime == "number" ? t.expirationTime : null, r =
|
|
343
|
+
let n = typeof t.expirationTime == "number" ? t.expirationTime : null, r = Ee({
|
|
345
344
|
decoded: e,
|
|
346
345
|
expirationTime: n,
|
|
347
346
|
now: i
|
|
@@ -363,6 +362,6 @@ async function Ke(e) {
|
|
|
363
362
|
};
|
|
364
363
|
}
|
|
365
364
|
//#endregion
|
|
366
|
-
export {
|
|
365
|
+
export { ee as CALL_GAS_HEADROOM_BPS, Fe as ConnectButton, i as ExternalWalletsForDeploy, I as PUBLISH_AUTOMATION_SCOPES, Ie as PublishProvider, re as appMetadata, P as approvedTargetsForAutomationPublish, se as asSeedSignerFromThirdweb, he as asThirdwebPublishWallet, Ke as assertStorageBoundToIdentity, k as buildAutomationSessionKeyPermissions, X as defaultApprovedTargetsForModularPublish, de as deployManagedAccountViaFactory, e as deploySmartWalletContract, We as enrollPublishAutomation, V as ensureAutomationSessionKey, Be as ensureEip7702ModularAccountReady, T as ensureExecutorModuleInstalled, E as ensureManagedAccountReady, He as ensureManagedSignerSessionKey, R as ensureModularPublishBootstrap, L as ensureSmartWalletThenPublish, x as fromThirdwebAccount, f as getClient, ue as getConnectedAccount, m as getConnectedManagedAccountAddress, te as getConnectedModularAccount, h as getManagedAccountWallet, o as getModularAccountWallet, C as getPublishThirdwebChain, u as getSharedPublishInAppWalletStorage, p as getSmartWalletAddressForAdmin, g as getWalletsForConnectButton, A as hashAutomationSessionKeyPermissions, B as isAutomationSessionActive, D as isSmartWalletDeployed, n as pollSmartWalletDeployed, z as removeAutomationSessionKey, _ as resolveSmartWalletForPublish, Ge as revokePublishAutomation, ie as runModularExecutorPublishPrep, me as seedPaymaster, F as toThirdwebSessionKeyPermissions, r as tryDeployManagedAccount, oe as useActiveSmartWalletContract, v as useLocalWalletAccount, j as usePublishConfig, c as wallets };
|
|
367
366
|
|
|
368
367
|
//# sourceMappingURL=thirdweb.js.map
|