@seedprotocol/publish 0.7.8 → 0.7.9-next.1177.ga3e08ed
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/CHANGELOG.md +11 -0
- package/README.md +9 -24
- package/dist/{chainConfig-D9VBbk0H.js → chainConfig-D801ynuH.js} +1388 -1859
- package/dist/chainConfig-D801ynuH.js.map +1 -0
- package/dist/config.d.ts +9 -53
- package/dist/config.d.ts.map +1 -1
- package/dist/{ensureAutomationSessionKey-CiAto4jZ.js → ensureAutomationSessionKey-DqAS9J9s.js} +19 -19
- package/dist/{ensureAutomationSessionKey-CiAto4jZ.js.map → ensureAutomationSessionKey-DqAS9J9s.js.map} +1 -1
- package/dist/{ensureModularPublishBootstrap-CDBZqcsZ.js → ensureModularPublishBootstrap-DqmBSJ7_.js} +8 -8
- package/dist/{ensureModularPublishBootstrap-CDBZqcsZ.js.map → ensureModularPublishBootstrap-DqmBSJ7_.js.map} +1 -1
- package/dist/{ensureSmartWalletThenPublish-hIBtsKXM.js → ensureSmartWalletThenPublish-DcuHyKXL.js} +4 -4
- package/dist/{ensureSmartWalletThenPublish-hIBtsKXM.js.map → ensureSmartWalletThenPublish-DcuHyKXL.js.map} +1 -1
- package/dist/helpers/constants.d.ts +1 -1
- package/dist/helpers/constants.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -35
- package/dist/index.js.map +1 -1
- package/dist/{managedAccountAdmin-Cn1E82-b.js → managedAccountAdmin-IdudyXSZ.js} +6 -6
- package/dist/{managedAccountAdmin-Cn1E82-b.js.map → managedAccountAdmin-IdudyXSZ.js.map} +1 -1
- package/dist/payment.d.ts +7 -10
- package/dist/payment.d.ts.map +1 -1
- package/dist/{publishAuthorization-D0HD1CgM.js → publishAuthorization-D1aMORBP.js} +9 -9
- package/dist/{publishAuthorization-D0HD1CgM.js.map → publishAuthorization-D1aMORBP.js.map} +1 -1
- package/dist/{resolveRevokeAccount-BPZey06q.js → resolveRevokeAccount-zYQmsure.js} +12 -12
- package/dist/{resolveRevokeAccount-BPZey06q.js.map → resolveRevokeAccount-zYQmsure.js.map} +1 -1
- package/dist/services/arweaveL1Finalize/enqueue.d.ts.map +1 -1
- package/dist/services/arweaveL1Finalize/worker.d.ts.map +1 -1
- package/dist/services/publish/actors/checking.d.ts.map +1 -1
- package/dist/services/publish/actors/createArweaveDataItems.d.ts.map +1 -1
- package/dist/services/publish/actors/createArweaveDataItemsPhase2.d.ts.map +1 -1
- package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts +5 -3
- package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts.map +1 -1
- package/dist/services/publish/actors/index.d.ts +0 -5
- package/dist/services/publish/actors/index.d.ts.map +1 -1
- package/dist/services/publish/actors/multiPublishReceipt.d.ts +3 -0
- package/dist/services/publish/actors/multiPublishReceipt.d.ts.map +1 -1
- package/dist/services/publish/actors/preparingHtmlEmbedded.d.ts +1 -1
- package/dist/services/publish/actors/publishRequestNormalize.d.ts.map +1 -1
- package/dist/services/publish/actors/recordMultiPublishReceipt.d.ts.map +1 -1
- package/dist/services/publish/actors/uploadViaBundler.d.ts.map +1 -1
- package/dist/services/publish/actors/utils.d.ts +0 -24
- package/dist/services/publish/actors/utils.d.ts.map +1 -1
- package/dist/services/publish/helpers/getPublishUploadData.d.ts +3 -4
- package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
- package/dist/services/publish/helpers/itemNeedsArweave.d.ts +1 -1
- package/dist/services/publish/helpers/itemNeedsArweave.d.ts.map +1 -1
- package/dist/services/publish/index.d.ts +3 -77
- package/dist/services/publish/index.d.ts.map +1 -1
- package/dist/services/publishCost/estimatePublishCost.d.ts +5 -4
- package/dist/services/publishCost/estimatePublishCost.d.ts.map +1 -1
- package/dist/services/publishCost/types.d.ts +5 -5
- package/dist/services/publishCost/types.d.ts.map +1 -1
- package/dist/services/publishManager/actions/createPublish.d.ts.map +1 -1
- package/dist/services/publishManager/actors/restorableSnapshot.d.ts +0 -4
- package/dist/services/publishManager/actors/restorableSnapshot.d.ts.map +1 -1
- package/dist/thirdweb.js +94 -94
- package/dist/thirdweb.js.map +1 -1
- package/dist/types.d.ts +4 -30
- package/dist/types.d.ts.map +1 -1
- package/dist/worker-DaG8XHbB.js +78 -0
- package/dist/worker-DaG8XHbB.js.map +1 -0
- package/package.json +8 -8
- package/dist/chainConfig-D9VBbk0H.js.map +0 -1
- package/dist/helpers/uploadApi.d.ts +0 -37
- package/dist/helpers/uploadApi.d.ts.map +0 -1
- package/dist/services/publish/actors/createArweaveTransactions.d.ts +0 -12
- package/dist/services/publish/actors/createArweaveTransactions.d.ts.map +0 -1
- package/dist/services/publish/actors/createArweaveTransactionsPhase2.d.ts +0 -8
- package/dist/services/publish/actors/createArweaveTransactionsPhase2.d.ts.map +0 -1
- package/dist/services/publish/actors/pollForConfirmation.d.ts +0 -20
- package/dist/services/publish/actors/pollForConfirmation.d.ts.map +0 -1
- package/dist/services/publish/actors/sendReimbursementRequest.d.ts +0 -7
- package/dist/services/publish/actors/sendReimbursementRequest.d.ts.map +0 -1
- package/dist/services/publish/actors/uploadData.d.ts +0 -6
- package/dist/services/publish/actors/uploadData.d.ts.map +0 -1
- package/dist/services/upload/actors.d.ts +0 -11
- package/dist/services/upload/actors.d.ts.map +0 -1
- package/dist/services/upload/index.d.ts +0 -5
- package/dist/services/upload/index.d.ts.map +0 -1
- package/dist/services/upload/uploadMachine.d.ts +0 -48
- package/dist/services/upload/uploadMachine.d.ts.map +0 -1
- package/dist/services/upload/utils.d.ts +0 -21
- package/dist/services/upload/utils.d.ts.map +0 -1
- package/dist/worker-WIMx6RTs.js +0 -87
- package/dist/worker-WIMx6RTs.js.map +0 -1
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import type { ActorRefFrom } from 'xstate';
|
|
2
|
-
import { PublishMachineContext
|
|
2
|
+
import { PublishMachineContext } from '../../types';
|
|
3
3
|
export declare const publishMachine: import("xstate").StateMachine<Partial<PublishMachineContext>, import("xstate").AnyEventObject, {
|
|
4
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<
|
|
5
|
-
context: PublishMachineContext;
|
|
6
|
-
event: unknown;
|
|
7
|
-
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<import("./actors").CreateArweaveTransactionsResult, {
|
|
8
|
-
context: PublishMachineContext;
|
|
9
|
-
event: unknown;
|
|
10
|
-
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<{
|
|
4
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<{
|
|
11
5
|
deferredHtmlSeedLocalIds: string[];
|
|
12
6
|
}, {
|
|
13
7
|
context: PublishMachineContext;
|
|
@@ -19,14 +13,6 @@ export declare const publishMachine: import("xstate").StateMachine<Partial<Publi
|
|
|
19
13
|
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<import("./actors").CreateArweaveDataItemsResult, {
|
|
20
14
|
context: PublishMachineContext;
|
|
21
15
|
event: unknown;
|
|
22
|
-
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<ReimbursementResponse, {
|
|
23
|
-
context: PublishMachineContext;
|
|
24
|
-
event: unknown;
|
|
25
|
-
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<void, {
|
|
26
|
-
context: PublishMachineContext;
|
|
27
|
-
event: unknown;
|
|
28
|
-
}, import("xstate").EventObject> | import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
29
|
-
context: PublishMachineContext;
|
|
30
16
|
}, import("xstate").EventObject> | import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
31
17
|
context: PublishMachineContext;
|
|
32
18
|
}, import("xstate").EventObject> | import("xstate").PromiseActorLogic<{
|
|
@@ -48,20 +34,6 @@ export declare const publishMachine: import("xstate").StateMachine<Partial<Publi
|
|
|
48
34
|
context: PublishMachineContext;
|
|
49
35
|
}, import("xstate").EventObject>> | undefined;
|
|
50
36
|
}, {
|
|
51
|
-
src: "createArweaveTransactions";
|
|
52
|
-
logic: import("xstate").PromiseActorLogic<import("./actors").CreateArweaveTransactionsResult, {
|
|
53
|
-
context: PublishMachineContext;
|
|
54
|
-
event: unknown;
|
|
55
|
-
}, import("xstate").EventObject>;
|
|
56
|
-
id: string | undefined;
|
|
57
|
-
} | {
|
|
58
|
-
src: "createArweaveTransactionsPhase2";
|
|
59
|
-
logic: import("xstate").PromiseActorLogic<import("./actors").CreateArweaveTransactionsResult, {
|
|
60
|
-
context: PublishMachineContext;
|
|
61
|
-
event: unknown;
|
|
62
|
-
}, import("xstate").EventObject>;
|
|
63
|
-
id: string | undefined;
|
|
64
|
-
} | {
|
|
65
37
|
src: "createArweaveDataItems";
|
|
66
38
|
logic: import("xstate").PromiseActorLogic<import("./actors").CreateArweaveDataItemsResult, {
|
|
67
39
|
context: PublishMachineContext;
|
|
@@ -75,26 +47,6 @@ export declare const publishMachine: import("xstate").StateMachine<Partial<Publi
|
|
|
75
47
|
event: unknown;
|
|
76
48
|
}, import("xstate").EventObject>;
|
|
77
49
|
id: string | undefined;
|
|
78
|
-
} | {
|
|
79
|
-
src: "sendReimbursementRequest";
|
|
80
|
-
logic: import("xstate").PromiseActorLogic<ReimbursementResponse, {
|
|
81
|
-
context: PublishMachineContext;
|
|
82
|
-
event: unknown;
|
|
83
|
-
}, import("xstate").EventObject>;
|
|
84
|
-
id: string | undefined;
|
|
85
|
-
} | {
|
|
86
|
-
src: "pollForConfirmation";
|
|
87
|
-
logic: import("xstate").PromiseActorLogic<void, {
|
|
88
|
-
context: PublishMachineContext;
|
|
89
|
-
event: unknown;
|
|
90
|
-
}, import("xstate").EventObject>;
|
|
91
|
-
id: string | undefined;
|
|
92
|
-
} | {
|
|
93
|
-
src: "uploadData";
|
|
94
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
95
|
-
context: PublishMachineContext;
|
|
96
|
-
}, import("xstate").EventObject>;
|
|
97
|
-
id: string | undefined;
|
|
98
50
|
} | {
|
|
99
51
|
src: "uploadViaBundler";
|
|
100
52
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, {
|
|
@@ -151,33 +103,15 @@ export declare const publishMachine: import("xstate").StateMachine<Partial<Publi
|
|
|
151
103
|
}, {
|
|
152
104
|
type: "handleError";
|
|
153
105
|
params: unknown;
|
|
154
|
-
} | {
|
|
155
|
-
type: "assignErrorCreatingArweaveTransactions";
|
|
156
|
-
params: import("xstate").NonReducibleUnknown;
|
|
157
106
|
} | {
|
|
158
107
|
type: "assignErrorCreatingArweaveDataItems";
|
|
159
108
|
params: import("xstate").NonReducibleUnknown;
|
|
160
|
-
} | {
|
|
161
|
-
type: "assignErrorSendingReimbursementRequest";
|
|
162
|
-
params: import("xstate").NonReducibleUnknown;
|
|
163
|
-
} | {
|
|
164
|
-
type: "assignErrorPollingForConfirmation";
|
|
165
|
-
params: import("xstate").NonReducibleUnknown;
|
|
166
|
-
} | {
|
|
167
|
-
type: "assignErrorUploadingData";
|
|
168
|
-
params: import("xstate").NonReducibleUnknown;
|
|
169
109
|
} | {
|
|
170
110
|
type: "assignErrorPreparingHtmlEmbedded";
|
|
171
111
|
params: import("xstate").NonReducibleUnknown;
|
|
172
112
|
} | {
|
|
173
113
|
type: "assignErrorRewritingHtmlEmbedded";
|
|
174
114
|
params: import("xstate").NonReducibleUnknown;
|
|
175
|
-
} | {
|
|
176
|
-
type: "assignErrorCreatingArweaveTransactionsPhase2";
|
|
177
|
-
params: import("xstate").NonReducibleUnknown;
|
|
178
|
-
} | {
|
|
179
|
-
type: "assignErrorUploadingDataPhase2";
|
|
180
|
-
params: import("xstate").NonReducibleUnknown;
|
|
181
115
|
} | {
|
|
182
116
|
type: "assignErrorUploadingViaBundler";
|
|
183
117
|
params: import("xstate").NonReducibleUnknown;
|
|
@@ -208,25 +142,17 @@ export declare const publishMachine: import("xstate").StateMachine<Partial<Publi
|
|
|
208
142
|
} | {
|
|
209
143
|
type: "assignErrorCheckingFailed";
|
|
210
144
|
params: import("xstate").NonReducibleUnknown;
|
|
211
|
-
}, never, never, "success" | "failure" | "
|
|
145
|
+
}, never, never, "success" | "failure" | "uploadingViaBundler" | "uploadingViaBundlerPhase2" | "checking" | "authorizing" | "preparingHtmlEmbedded" | "rewritingHtmlEmbedded" | "creatingArweaveDataItems" | "creatingArweaveDataItemsPhase2" | "creatingAttestations" | "creatingAttestationsDirectToEas" | "stopping" | "attestationFailureRecoverable" | "attestationFailureRecoverableDirectToEas", string, Partial<PublishMachineContext>, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
212
146
|
id: "publish";
|
|
213
147
|
states: {
|
|
214
148
|
readonly authorizing: {};
|
|
215
149
|
readonly checking: {};
|
|
216
150
|
readonly preparingHtmlEmbedded: {};
|
|
217
|
-
readonly creatingArweaveTransactions: {};
|
|
218
151
|
readonly creatingArweaveDataItems: {};
|
|
219
|
-
readonly sendingReimbursementRequest: {};
|
|
220
|
-
readonly pollingForConfirmation: {};
|
|
221
152
|
readonly uploadingViaBundler: {};
|
|
222
153
|
readonly creatingArweaveDataItemsPhase2: {};
|
|
223
154
|
readonly uploadingViaBundlerPhase2: {};
|
|
224
|
-
readonly uploadingData: {};
|
|
225
155
|
readonly rewritingHtmlEmbedded: {};
|
|
226
|
-
readonly creatingArweaveTransactionsPhase2: {};
|
|
227
|
-
readonly sendingReimbursementRequestPhase2: {};
|
|
228
|
-
readonly pollingForConfirmationPhase2: {};
|
|
229
|
-
readonly uploadingDataPhase2: {};
|
|
230
156
|
readonly creatingAttestations: {};
|
|
231
157
|
readonly attestationFailureRecoverable: {};
|
|
232
158
|
readonly creatingAttestationsDirectToEas: {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/publish/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,OAAO,EAEL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/publish/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAE1C,OAAO,EAEL,qBAAqB,EAEtB,MAAiG,aAAa,CAAA;AA4C/G,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAibzB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { IItem } from '@seedprotocol/sdk';
|
|
2
2
|
import { type MarketRates } from './marketRates';
|
|
3
3
|
import type { EstimatePublishCostOptions, PublishCostEstimate, PublishWorkSummary } from './types';
|
|
4
|
-
/** Arweave charges every
|
|
4
|
+
/** Arweave charges every transaction for at least this much data; a bundle is one transaction. */
|
|
5
5
|
export declare const ARWEAVE_MIN_CHARGED_BYTES: number;
|
|
6
6
|
/** Turbo doesn't charge for uploads up to this size. */
|
|
7
7
|
export declare const TURBO_FREE_BYTES: number;
|
|
8
8
|
type PublishCostFlags = {
|
|
9
9
|
evmUserPays?: boolean;
|
|
10
10
|
arweaveUserPays?: boolean;
|
|
11
|
-
|
|
11
|
+
/** Ignored: uploads are always bundled. Accepted so a previous estimate's `arweave.path` can be passed back. */
|
|
12
|
+
arweavePath?: 'bundler';
|
|
12
13
|
/** Where uploads go; with 'turbo' small uploads are free. */
|
|
13
14
|
uploadTo?: 'upload-api' | 'turbo';
|
|
14
15
|
/** The publish chain is a testnet. */
|
|
15
16
|
testnet?: boolean;
|
|
16
17
|
};
|
|
17
|
-
/** The bytes Arweave (or Turbo) charges for, given
|
|
18
|
-
export declare function chargedUploadBytes(work: Pick<PublishWorkSummary, 'uploadCount' | 'uploadBytes' | 'uploadSizes'>,
|
|
18
|
+
/** The bytes Arweave (or Turbo) charges for, given where the uploads go. */
|
|
19
|
+
export declare function chargedUploadBytes(work: Pick<PublishWorkSummary, 'uploadCount' | 'uploadBytes' | 'uploadSizes'>, uploadTo?: 'upload-api' | 'turbo'): number;
|
|
19
20
|
export declare function combinePublishCostEstimate(work: PublishWorkSummary, rates: MarketRates, flags?: PublishCostFlags): PublishCostEstimate;
|
|
20
21
|
export declare function estimatePublishCost(item: IItem<any>, options?: EstimatePublishCostOptions): Promise<PublishCostEstimate>;
|
|
21
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimatePublishCost.d.ts","sourceRoot":"","sources":["../../../src/services/publishCost/estimatePublishCost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAK9C,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAIlG,
|
|
1
|
+
{"version":3,"file":"estimatePublishCost.d.ts","sourceRoot":"","sources":["../../../src/services/publishCost/estimatePublishCost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAK9C,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAIlG,kGAAkG;AAClG,eAAO,MAAM,yBAAyB,QAAa,CAAA;AACnD,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,QAAa,CAAA;AAE1C,KAAK,gBAAgB,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,gHAAgH;IAChH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,YAAY,GAAG,OAAO,CAAA;IACjC,sCAAsC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAuBD,4EAA4E;AAC5E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC,EAC7E,QAAQ,GAAE,YAAY,GAAG,OAAsB,GAC9C,MAAM,CAOR;AAMD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,WAAW,EAClB,KAAK,CAAC,EAAE,gBAAgB,GACvB,mBAAmB,CAyCrB;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,EAChB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAS9B"}
|
|
@@ -31,16 +31,16 @@ export type PublishCostEstimate = {
|
|
|
31
31
|
/** Bytes uploaded. */
|
|
32
32
|
bytes: number;
|
|
33
33
|
/**
|
|
34
|
-
* Bytes paid for:
|
|
35
|
-
*
|
|
34
|
+
* Bytes paid for: the bundle is one transaction, charged for at least 256 KiB; with Turbo,
|
|
35
|
+
* uploads of 100 KiB or less are free.
|
|
36
36
|
*/
|
|
37
37
|
chargedBytes: number;
|
|
38
38
|
uploadCount: number;
|
|
39
|
-
|
|
39
|
+
/** Always `'bundler'`: uploads are signed data items. */
|
|
40
|
+
path: 'bundler';
|
|
40
41
|
/**
|
|
41
42
|
* Whether the user pays for storage (`payment.storage`). With the default `'operator'` the
|
|
42
|
-
* upload API
|
|
43
|
-
* Arweave key before the upload (the deferred-Html second pass is not reimbursed).
|
|
43
|
+
* upload API's bundler routes pay for the data items.
|
|
44
44
|
*/
|
|
45
45
|
userPays: boolean;
|
|
46
46
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/publishCost/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE5E,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,iGAAiG;IACjG,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACnD,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,yFAAyF;QACzF,QAAQ,EAAE,OAAO,CAAA;QACjB,2EAA2E;QAC3E,OAAO,EAAE,OAAO,CAAA;KACjB,CAAA;IACD,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;QACX,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAA;QACb;;;WAGG;QACH,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/services/publishCost/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAE5E,YAAY,EAAE,WAAW,EAAE,CAAA;AAE3B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,WAAW,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,iGAAiG;IACjG,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACnD,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE;QACH,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,GAAG,EAAE,MAAM,CAAA;QACX,yFAAyF;QACzF,QAAQ,EAAE,OAAO,CAAA;QACjB,2EAA2E;QAC3E,OAAO,EAAE,OAAO,CAAA;KACjB,CAAA;IACD,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAA;QACV,GAAG,EAAE,MAAM,CAAA;QACX,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAA;QACb;;;WAGG;QACH,YAAY,EAAE,MAAM,CAAA;QACpB,WAAW,EAAE,MAAM,CAAA;QACnB,yDAAyD;QACzD,IAAI,EAAE,SAAS,CAAA;QACf;;;WAGG;QACH,QAAQ,EAAE,OAAO,CAAA;KAClB,CAAA;IACD,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,IAAI,EAAE,kBAAkB,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,4EAA4E;IAC5E,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,KAAK,CAAC,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,EAAE,MAAM,CAAA;QACnB,cAAc,EAAE,MAAM,CAAA;KACvB,CAAA;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPublish.d.ts","sourceRoot":"","sources":["../../../../src/services/publishManager/actions/createPublish.ts"],"names":[],"mappings":"AA2CA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"createPublish.d.ts","sourceRoot":"","sources":["../../../../src/services/publishManager/actions/createPublish.ts"],"names":[],"mappings":"AA2CA,eAAO,MAAM,aAAa,qTA+FxB,CAAA"}
|
|
@@ -11,10 +11,6 @@ export interface PersistedSnapshot {
|
|
|
11
11
|
};
|
|
12
12
|
modelName?: string;
|
|
13
13
|
schemaId?: string;
|
|
14
|
-
reimbursementTransactionId?: string;
|
|
15
|
-
requestResponse?: unknown;
|
|
16
|
-
arweaveTransactions?: unknown[];
|
|
17
|
-
publishUploads?: unknown[];
|
|
18
14
|
bundlerUploadNotNeeded?: boolean;
|
|
19
15
|
};
|
|
20
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restorableSnapshot.d.ts","sourceRoot":"","sources":["../../../../src/services/publishManager/actors/restorableSnapshot.ts"],"names":[],"mappings":"AAEA;yGACyG;AACzG,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QACtE,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,
|
|
1
|
+
{"version":3,"file":"restorableSnapshot.d.ts","sourceRoot":"","sources":["../../../../src/services/publishManager/actors/restorableSnapshot.ts"],"names":[],"mappings":"AAEA;yGACyG;AACzG,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QACtE,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,sBAAsB,CAAC,EAAE,OAAO,CAAA;KACjC,CAAA;CACF;AA8BD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAQvE"}
|
package/dist/thirdweb.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as e,
|
|
2
|
-
import { i as
|
|
3
|
-
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-
|
|
4
|
-
import { t as L } from "./ensureSmartWalletThenPublish-
|
|
5
|
-
import { t as R } from "./ensureModularPublishBootstrap-
|
|
6
|
-
import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-
|
|
1
|
+
import { $ as e, B as t, F as n, G as r, H as i, Ht as a, J as o, K as s, Kt as c, L as l, M as u, N as d, P as f, Q as p, R as m, Rt as ee, U as h, V as g, Vt as te, W as _, Wt as ne, X as re, Y as ie, Z as ae, _t as v, a as y, et as oe, gt as b, ht as se, i as ce, it as x, j as le, m as S, mt as ue, nt as de, o as fe, q as C, qt as w, rt as pe, t as T, tt as me, z as he } from "./chainConfig-D801ynuH.js";
|
|
2
|
+
import { i as E, t as D } from "./publishWalletRegistry-BaQe9rIR.js";
|
|
3
|
+
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-D1aMORBP.js";
|
|
4
|
+
import { t as L } from "./ensureSmartWalletThenPublish-DcuHyKXL.js";
|
|
5
|
+
import { t as R } from "./ensureModularPublishBootstrap-DqmBSJ7_.js";
|
|
6
|
+
import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-DqAS9J9s.js";
|
|
7
7
|
import { client as H } from "@seedprotocol/sdk";
|
|
8
8
|
import { deploySmartAccount as ge, getContract as U, sendTransaction as _e } from "thirdweb";
|
|
9
9
|
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";
|
|
@@ -27,10 +27,10 @@ async function Pe(e, t, n) {
|
|
|
27
27
|
if (n.useModularExecutor) {
|
|
28
28
|
if (!t) return;
|
|
29
29
|
try {
|
|
30
|
-
|
|
31
|
-
let e =
|
|
30
|
+
p();
|
|
31
|
+
let e = _();
|
|
32
32
|
await e.autoConnect({
|
|
33
|
-
client:
|
|
33
|
+
client: x(),
|
|
34
34
|
chain: v(n)
|
|
35
35
|
});
|
|
36
36
|
let r = e.getAccount();
|
|
@@ -45,103 +45,103 @@ async function Pe(e, t, n) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
var Fe = () => {
|
|
48
|
-
let e = j(),
|
|
48
|
+
let e = j(), n = v(e), a = Se(), s = xe(), c = Ce(), l = we(), u = G(null), d = G(!1), f = G(!1);
|
|
49
49
|
W(() => {
|
|
50
50
|
if (typeof window > "u") return;
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
let
|
|
51
|
+
let t = d.current;
|
|
52
|
+
d.current = l;
|
|
53
|
+
let i;
|
|
54
54
|
try {
|
|
55
|
-
|
|
55
|
+
i = performance.getEntriesByType("navigation")[0]?.type;
|
|
56
56
|
} catch {
|
|
57
|
-
|
|
57
|
+
i = void 0;
|
|
58
58
|
}
|
|
59
|
-
if (
|
|
60
|
-
let
|
|
59
|
+
if (i !== "reload") return;
|
|
60
|
+
let a = !1;
|
|
61
61
|
try {
|
|
62
|
-
|
|
62
|
+
a = sessionStorage.getItem(q) === "1";
|
|
63
63
|
} catch {
|
|
64
|
-
|
|
64
|
+
a = !1;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
client:
|
|
68
|
-
chain:
|
|
66
|
+
a || t && !l && c === "disconnected" && (f.current || (f.current = !0, (e.useModularExecutor ? r() : _()).autoConnect({
|
|
67
|
+
client: x(),
|
|
68
|
+
chain: n
|
|
69
69
|
}).catch(() => {})));
|
|
70
70
|
}, [
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
c,
|
|
72
|
+
l,
|
|
73
73
|
e.useModularExecutor,
|
|
74
|
-
|
|
74
|
+
n
|
|
75
75
|
]);
|
|
76
|
-
let
|
|
77
|
-
let
|
|
78
|
-
if (!
|
|
76
|
+
let m = Te(async (r) => {
|
|
77
|
+
let a = r.getAccount();
|
|
78
|
+
if (!a) return;
|
|
79
79
|
await Ne();
|
|
80
|
-
let
|
|
80
|
+
let o = /* @__PURE__ */ new Set([a.address.toLowerCase()]), s;
|
|
81
81
|
if (e.useModularExecutor) {
|
|
82
|
-
|
|
83
|
-
let e =
|
|
82
|
+
p();
|
|
83
|
+
let e = r.getAdminAccount?.()?.address ?? a.address, t = async () => {
|
|
84
84
|
try {
|
|
85
|
-
return await
|
|
85
|
+
return await i(n);
|
|
86
86
|
} catch {
|
|
87
87
|
try {
|
|
88
|
-
return await
|
|
88
|
+
return await C(e);
|
|
89
89
|
} catch {
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
s = await t(), s ||= (await new Promise((e) => queueMicrotask(() => e())), await t()), s && o.add(s.toLowerCase());
|
|
95
95
|
}
|
|
96
|
-
let
|
|
97
|
-
if (
|
|
98
|
-
|
|
96
|
+
let c = [...o].sort().join(",");
|
|
97
|
+
if (u.current !== c) {
|
|
98
|
+
u.current !== null && S.stopAll(), u.current = c;
|
|
99
99
|
try {
|
|
100
|
-
let e =
|
|
101
|
-
await
|
|
102
|
-
...
|
|
103
|
-
ownedAddresses: [...
|
|
104
|
-
publisherAddress:
|
|
105
|
-
...
|
|
106
|
-
...
|
|
107
|
-
await
|
|
100
|
+
let e = r.getAdminAccount?.()?.address, n = !!s || !!e && e.toLowerCase() !== a.address.toLowerCase(), i = b(a, { kind: n ? "smart" : "eoa" }), c = r.getAdminAccount?.(), l = s ? i.signer : n && c && c.address.toLowerCase() !== a.address.toLowerCase() ? b(c, { kind: "eoa" }).signer : void 0;
|
|
101
|
+
await E({
|
|
102
|
+
...i,
|
|
103
|
+
ownedAddresses: [...o],
|
|
104
|
+
publisherAddress: s ?? a.address,
|
|
105
|
+
...l ? { dataItemSigner: l } : {},
|
|
106
|
+
...n && !s ? { deploy: async () => {
|
|
107
|
+
await t(a);
|
|
108
108
|
} } : {},
|
|
109
|
-
...e && e.toLowerCase() !==
|
|
109
|
+
...e && e.toLowerCase() !== a.address.toLowerCase() ? { adminAddress: e } : {}
|
|
110
110
|
});
|
|
111
111
|
} catch (e) {
|
|
112
|
-
throw
|
|
112
|
+
throw u.current = null, console.warn("[ConnectButton] Failed to set seed client addresses:", e), e;
|
|
113
113
|
}
|
|
114
|
-
await Pe(
|
|
114
|
+
await Pe(a, s, e);
|
|
115
115
|
}
|
|
116
116
|
}, [e]);
|
|
117
117
|
return W(() => {
|
|
118
|
-
if (
|
|
119
|
-
if (
|
|
120
|
-
|
|
118
|
+
if (l) return;
|
|
119
|
+
if (c !== "connected") {
|
|
120
|
+
u.current = null;
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
if (!
|
|
123
|
+
if (!a) return;
|
|
124
124
|
let e = !1;
|
|
125
125
|
return (async () => {
|
|
126
126
|
try {
|
|
127
127
|
if (e) return;
|
|
128
|
-
await
|
|
128
|
+
await m(a);
|
|
129
129
|
} catch {}
|
|
130
130
|
})(), () => {
|
|
131
131
|
e = !0;
|
|
132
132
|
};
|
|
133
133
|
}, [
|
|
134
|
-
n,
|
|
135
|
-
r?.address,
|
|
136
|
-
i,
|
|
137
134
|
a,
|
|
138
|
-
|
|
135
|
+
s?.address,
|
|
136
|
+
c,
|
|
137
|
+
l,
|
|
138
|
+
m
|
|
139
139
|
]), /* @__PURE__ */ K(ve, {
|
|
140
|
-
client:
|
|
141
|
-
wallets:
|
|
140
|
+
client: x(),
|
|
141
|
+
wallets: o(e),
|
|
142
142
|
autoConnect: !0,
|
|
143
|
-
chain:
|
|
144
|
-
chains: [
|
|
143
|
+
chain: n,
|
|
144
|
+
chains: [n],
|
|
145
145
|
onConnect: async (e, t) => {
|
|
146
146
|
let n = e.getAccount();
|
|
147
147
|
if (n) {
|
|
@@ -150,7 +150,7 @@ var Fe = () => {
|
|
|
150
150
|
} catch {}
|
|
151
151
|
console.log("[ConnectButton] Connected", n.address);
|
|
152
152
|
try {
|
|
153
|
-
await
|
|
153
|
+
await m(e);
|
|
154
154
|
} catch {}
|
|
155
155
|
}
|
|
156
156
|
},
|
|
@@ -158,7 +158,7 @@ var Fe = () => {
|
|
|
158
158
|
try {
|
|
159
159
|
sessionStorage.setItem(q, "1");
|
|
160
160
|
} catch {}
|
|
161
|
-
D(),
|
|
161
|
+
D(), S.stopAll();
|
|
162
162
|
},
|
|
163
163
|
theme: be({ colors: {
|
|
164
164
|
primaryButtonBg: "#1D2939",
|
|
@@ -171,8 +171,8 @@ var Fe = () => {
|
|
|
171
171
|
});
|
|
172
172
|
}, Ie = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => {
|
|
173
173
|
let i = G(void 0);
|
|
174
|
-
return t && i.current !== t && (
|
|
175
|
-
value: t ??
|
|
174
|
+
return t && i.current !== t && (fe(t), i.current = t), /* @__PURE__ */ K(M.Provider, {
|
|
175
|
+
value: t ?? ce(),
|
|
176
176
|
children: /* @__PURE__ */ K(ye, { children: /* @__PURE__ */ K(ke, {
|
|
177
177
|
queryClient: n,
|
|
178
178
|
queryClientRef: r,
|
|
@@ -181,32 +181,32 @@ var Fe = () => {
|
|
|
181
181
|
});
|
|
182
182
|
}, 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 ${T()} yet. Enable autoDeployEip7702ModularAccount in publish config or complete wallet setup, then retry.`, ze = () => `Automatic EIP-7702 smart account setup failed on ${T()}. 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;
|
|
183
183
|
async function Be() {
|
|
184
|
-
let { autoDeployEip7702ModularAccount: e } = y(), t =
|
|
184
|
+
let { autoDeployEip7702ModularAccount: e } = y(), t = r();
|
|
185
185
|
await t.autoConnect({
|
|
186
|
-
client:
|
|
186
|
+
client: x(),
|
|
187
187
|
chain: v()
|
|
188
188
|
});
|
|
189
189
|
let n = t.getAccount();
|
|
190
|
-
if (!n) throw new
|
|
191
|
-
let
|
|
192
|
-
client:
|
|
190
|
+
if (!n) throw new c(Le, "EIP7702_MODULAR_ACCOUNT_UNAVAILABLE");
|
|
191
|
+
let i = x(), o = U({
|
|
192
|
+
client: i,
|
|
193
193
|
chain: v(),
|
|
194
194
|
address: n.address
|
|
195
195
|
});
|
|
196
|
-
if (!await
|
|
197
|
-
if (!e) throw new
|
|
196
|
+
if (!await te(n.address)) {
|
|
197
|
+
if (!e) throw new c(Re(), "EIP7702_MODULAR_NOT_UPGRADED", n.address);
|
|
198
198
|
try {
|
|
199
199
|
await ge({
|
|
200
200
|
smartAccount: n,
|
|
201
201
|
chain: v(),
|
|
202
|
-
client:
|
|
203
|
-
accountContract:
|
|
202
|
+
client: i,
|
|
203
|
+
accountContract: o
|
|
204
204
|
});
|
|
205
205
|
} catch (e) {
|
|
206
206
|
if (await a(n.address, Y)) return;
|
|
207
|
-
throw new
|
|
207
|
+
throw new c(ze(), "EIP7702_MODULAR_DEPLOY_FAILED", n.address, e);
|
|
208
208
|
}
|
|
209
|
-
if (!await a(n.address, Y)) throw new
|
|
209
|
+
if (!await a(n.address, Y)) throw new c(J, "EIP7702_MODULAR_NOT_CONFIRMED", n.address);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
//#endregion
|
|
@@ -218,15 +218,15 @@ function X(e) {
|
|
|
218
218
|
//#region src/helpers/ensureManagedSignerSessionKey.ts
|
|
219
219
|
var Ve = () => `Could not connect the managed publishing account to authorize the modular signer on ${T()}. Reconnect and try again.`, Z = () => `Could not authorize the modular wallet as a session signer on your publishing account on ${T()}.`;
|
|
220
220
|
async function He(e) {
|
|
221
|
-
let { managedAddress: t, signerAddress: n } = e, r =
|
|
221
|
+
let { managedAddress: t, signerAddress: n } = e, r = _();
|
|
222
222
|
await r.autoConnect({
|
|
223
|
-
client:
|
|
223
|
+
client: x(),
|
|
224
224
|
chain: v()
|
|
225
225
|
});
|
|
226
226
|
let i = r.getAccount();
|
|
227
|
-
if (!i) throw new
|
|
227
|
+
if (!i) throw new w(Ve(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
|
|
228
228
|
let a = U({
|
|
229
|
-
client:
|
|
229
|
+
client: x(),
|
|
230
230
|
chain: v(),
|
|
231
231
|
address: t
|
|
232
232
|
}), o = {
|
|
@@ -240,7 +240,7 @@ async function He(e) {
|
|
|
240
240
|
newPermissions: o
|
|
241
241
|
});
|
|
242
242
|
} catch (e) {
|
|
243
|
-
throw new
|
|
243
|
+
throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
244
244
|
}
|
|
245
245
|
if (s) try {
|
|
246
246
|
let e = Ae({
|
|
@@ -252,28 +252,28 @@ async function He(e) {
|
|
|
252
252
|
account: i,
|
|
253
253
|
transaction: e
|
|
254
254
|
});
|
|
255
|
-
await
|
|
255
|
+
await ne(t.transactionHash);
|
|
256
256
|
} catch (e) {
|
|
257
|
-
throw new
|
|
257
|
+
throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
258
258
|
}
|
|
259
259
|
let c = !1;
|
|
260
260
|
try {
|
|
261
|
-
c = await
|
|
261
|
+
c = await ee(t, n);
|
|
262
262
|
} catch (e) {
|
|
263
|
-
throw new
|
|
263
|
+
throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
|
|
264
264
|
}
|
|
265
|
-
if (!c) throw new
|
|
265
|
+
if (!c) throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
|
|
266
266
|
}
|
|
267
267
|
//#endregion
|
|
268
268
|
//#region src/helpers/enrollPublishAutomation.ts
|
|
269
269
|
async function Q(e) {
|
|
270
|
-
let t =
|
|
270
|
+
let t = _();
|
|
271
271
|
await t.autoConnect({
|
|
272
|
-
client:
|
|
272
|
+
client: x(),
|
|
273
273
|
chain: v()
|
|
274
274
|
});
|
|
275
275
|
let n = t.getAccount();
|
|
276
|
-
if (!n) throw new
|
|
276
|
+
if (!n) throw new w("Could not connect the managed publishing account to enroll or revoke publish automation.", "MANAGED_ACCOUNT_UNAVAILABLE", e);
|
|
277
277
|
return n;
|
|
278
278
|
}
|
|
279
279
|
async function $(e, t) {
|
|
@@ -282,13 +282,13 @@ async function $(e, t) {
|
|
|
282
282
|
async function Ue(e) {
|
|
283
283
|
let t = y();
|
|
284
284
|
if (!t.modularAccountModuleContract?.trim()) throw Error("@seedprotocol/publish: enrollPublishAutomation requires PublishConfig.modularAccountModuleContract");
|
|
285
|
-
let
|
|
285
|
+
let r = await Q(e), i;
|
|
286
286
|
try {
|
|
287
|
-
|
|
287
|
+
i = await f(e, r, t);
|
|
288
288
|
} catch (t) {
|
|
289
|
-
throw t instanceof
|
|
289
|
+
throw t instanceof w ? t : new w("Executor module setup failed for publish automation.", "EXECUTOR_MODULE_NOT_INSTALLED", e, t);
|
|
290
290
|
}
|
|
291
|
-
await
|
|
291
|
+
await n(e, i.status === "installed" ? { installedEas: i.eas } : { readAttempts: i.status === "already-installed" ? 5 : 1 });
|
|
292
292
|
}
|
|
293
293
|
async function We(e) {
|
|
294
294
|
let { managedAddress: t, sessionKeyAddress: n, appAddress: r, expiresAt: i } = e;
|
|
@@ -369,6 +369,6 @@ async function Ke(e) {
|
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
//#endregion
|
|
372
|
-
export {
|
|
372
|
+
export { de as CALL_GAS_HEADROOM_BPS, Fe as ConnectButton, l as ExternalWalletsForDeploy, I as PUBLISH_AUTOMATION_SCOPES, Ie as PublishProvider, m as appMetadata, P as approvedTargetsForAutomationPublish, ue as asSeedSignerFromThirdweb, se as asThirdwebPublishWallet, Ke as assertStorageBoundToIdentity, k as buildAutomationSessionKeyPermissions, X as defaultApprovedTargetsForModularPublish, he as deployManagedAccountViaFactory, t as deploySmartWalletContract, We as enrollPublishAutomation, V as ensureAutomationSessionKey, Be as ensureEip7702ModularAccountReady, f as ensureExecutorModuleInstalled, le as ensureManagedAccountReady, He as ensureManagedSignerSessionKey, R as ensureModularPublishBootstrap, L as ensureSmartWalletThenPublish, b as fromThirdwebAccount, x as getClient, g as getConnectedAccount, i as getConnectedManagedAccountAddress, h as getConnectedModularAccount, _ as getManagedAccountWallet, r as getModularAccountWallet, v as getPublishThirdwebChain, s as getSharedPublishInAppWalletStorage, C as getSmartWalletAddressForAdmin, o as getWalletsForConnectButton, A as hashAutomationSessionKeyPermissions, B as isAutomationSessionActive, ie as isSmartWalletDeployed, re as pollSmartWalletDeployed, z as removeAutomationSessionKey, ae as resolveSmartWalletForPublish, Ge as revokePublishAutomation, u as runModularExecutorPublishPrep, pe as seedPaymaster, F as toThirdwebSessionKeyPermissions, d as tryDeployManagedAccount, e as useActiveSmartWalletContract, oe as useLocalWalletAccount, j as usePublishConfig, me as wallets };
|
|
373
373
|
|
|
374
374
|
//# sourceMappingURL=thirdweb.js.map
|