@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.
Files changed (86) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +9 -24
  3. package/dist/{chainConfig-D9VBbk0H.js → chainConfig-D801ynuH.js} +1388 -1859
  4. package/dist/chainConfig-D801ynuH.js.map +1 -0
  5. package/dist/config.d.ts +9 -53
  6. package/dist/config.d.ts.map +1 -1
  7. package/dist/{ensureAutomationSessionKey-CiAto4jZ.js → ensureAutomationSessionKey-DqAS9J9s.js} +19 -19
  8. package/dist/{ensureAutomationSessionKey-CiAto4jZ.js.map → ensureAutomationSessionKey-DqAS9J9s.js.map} +1 -1
  9. package/dist/{ensureModularPublishBootstrap-CDBZqcsZ.js → ensureModularPublishBootstrap-DqmBSJ7_.js} +8 -8
  10. package/dist/{ensureModularPublishBootstrap-CDBZqcsZ.js.map → ensureModularPublishBootstrap-DqmBSJ7_.js.map} +1 -1
  11. package/dist/{ensureSmartWalletThenPublish-hIBtsKXM.js → ensureSmartWalletThenPublish-DcuHyKXL.js} +4 -4
  12. package/dist/{ensureSmartWalletThenPublish-hIBtsKXM.js.map → ensureSmartWalletThenPublish-DcuHyKXL.js.map} +1 -1
  13. package/dist/helpers/constants.d.ts +1 -1
  14. package/dist/helpers/constants.d.ts.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +35 -35
  18. package/dist/index.js.map +1 -1
  19. package/dist/{managedAccountAdmin-Cn1E82-b.js → managedAccountAdmin-IdudyXSZ.js} +6 -6
  20. package/dist/{managedAccountAdmin-Cn1E82-b.js.map → managedAccountAdmin-IdudyXSZ.js.map} +1 -1
  21. package/dist/payment.d.ts +7 -10
  22. package/dist/payment.d.ts.map +1 -1
  23. package/dist/{publishAuthorization-D0HD1CgM.js → publishAuthorization-D1aMORBP.js} +9 -9
  24. package/dist/{publishAuthorization-D0HD1CgM.js.map → publishAuthorization-D1aMORBP.js.map} +1 -1
  25. package/dist/{resolveRevokeAccount-BPZey06q.js → resolveRevokeAccount-zYQmsure.js} +12 -12
  26. package/dist/{resolveRevokeAccount-BPZey06q.js.map → resolveRevokeAccount-zYQmsure.js.map} +1 -1
  27. package/dist/services/arweaveL1Finalize/enqueue.d.ts.map +1 -1
  28. package/dist/services/arweaveL1Finalize/worker.d.ts.map +1 -1
  29. package/dist/services/publish/actors/checking.d.ts.map +1 -1
  30. package/dist/services/publish/actors/createArweaveDataItems.d.ts.map +1 -1
  31. package/dist/services/publish/actors/createArweaveDataItemsPhase2.d.ts.map +1 -1
  32. package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts +5 -3
  33. package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts.map +1 -1
  34. package/dist/services/publish/actors/index.d.ts +0 -5
  35. package/dist/services/publish/actors/index.d.ts.map +1 -1
  36. package/dist/services/publish/actors/multiPublishReceipt.d.ts +3 -0
  37. package/dist/services/publish/actors/multiPublishReceipt.d.ts.map +1 -1
  38. package/dist/services/publish/actors/preparingHtmlEmbedded.d.ts +1 -1
  39. package/dist/services/publish/actors/publishRequestNormalize.d.ts.map +1 -1
  40. package/dist/services/publish/actors/recordMultiPublishReceipt.d.ts.map +1 -1
  41. package/dist/services/publish/actors/uploadViaBundler.d.ts.map +1 -1
  42. package/dist/services/publish/actors/utils.d.ts +0 -24
  43. package/dist/services/publish/actors/utils.d.ts.map +1 -1
  44. package/dist/services/publish/helpers/getPublishUploadData.d.ts +3 -4
  45. package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
  46. package/dist/services/publish/helpers/itemNeedsArweave.d.ts +1 -1
  47. package/dist/services/publish/helpers/itemNeedsArweave.d.ts.map +1 -1
  48. package/dist/services/publish/index.d.ts +3 -77
  49. package/dist/services/publish/index.d.ts.map +1 -1
  50. package/dist/services/publishCost/estimatePublishCost.d.ts +5 -4
  51. package/dist/services/publishCost/estimatePublishCost.d.ts.map +1 -1
  52. package/dist/services/publishCost/types.d.ts +5 -5
  53. package/dist/services/publishCost/types.d.ts.map +1 -1
  54. package/dist/services/publishManager/actions/createPublish.d.ts.map +1 -1
  55. package/dist/services/publishManager/actors/restorableSnapshot.d.ts +0 -4
  56. package/dist/services/publishManager/actors/restorableSnapshot.d.ts.map +1 -1
  57. package/dist/thirdweb.js +94 -94
  58. package/dist/thirdweb.js.map +1 -1
  59. package/dist/types.d.ts +4 -30
  60. package/dist/types.d.ts.map +1 -1
  61. package/dist/worker-DaG8XHbB.js +78 -0
  62. package/dist/worker-DaG8XHbB.js.map +1 -0
  63. package/package.json +8 -8
  64. package/dist/chainConfig-D9VBbk0H.js.map +0 -1
  65. package/dist/helpers/uploadApi.d.ts +0 -37
  66. package/dist/helpers/uploadApi.d.ts.map +0 -1
  67. package/dist/services/publish/actors/createArweaveTransactions.d.ts +0 -12
  68. package/dist/services/publish/actors/createArweaveTransactions.d.ts.map +0 -1
  69. package/dist/services/publish/actors/createArweaveTransactionsPhase2.d.ts +0 -8
  70. package/dist/services/publish/actors/createArweaveTransactionsPhase2.d.ts.map +0 -1
  71. package/dist/services/publish/actors/pollForConfirmation.d.ts +0 -20
  72. package/dist/services/publish/actors/pollForConfirmation.d.ts.map +0 -1
  73. package/dist/services/publish/actors/sendReimbursementRequest.d.ts +0 -7
  74. package/dist/services/publish/actors/sendReimbursementRequest.d.ts.map +0 -1
  75. package/dist/services/publish/actors/uploadData.d.ts +0 -6
  76. package/dist/services/publish/actors/uploadData.d.ts.map +0 -1
  77. package/dist/services/upload/actors.d.ts +0 -11
  78. package/dist/services/upload/actors.d.ts.map +0 -1
  79. package/dist/services/upload/index.d.ts +0 -5
  80. package/dist/services/upload/index.d.ts.map +0 -1
  81. package/dist/services/upload/uploadMachine.d.ts +0 -48
  82. package/dist/services/upload/uploadMachine.d.ts.map +0 -1
  83. package/dist/services/upload/utils.d.ts +0 -21
  84. package/dist/services/upload/utils.d.ts.map +0 -1
  85. package/dist/worker-WIMx6RTs.js +0 -87
  86. package/dist/worker-WIMx6RTs.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## Unreleased
6
+
7
+ ### Breaking
8
+
9
+ - **Publish only uploads data items.** The L1 path (an Arweave transaction the upload API reimbursed from its own wallet, then confirmed and uploaded in chunks) is removed, so the upload server can drop its reimbursement route. Files go to `${uploadApiBaseUrl}/api/upload/arweave/batch` as signed data items, or to Turbo with `payment: { storage: 'user' }`.
10
+ - `useArweaveBundler` is deprecated. `true` changes nothing; `false` makes `initPublish` throw `PublishPaymentConfigError`. Apps that left it unset now upload data items and need `signDataItems` or a `dataItemSigner` (at `createPublish` or in the config).
11
+ - Removed: the `signArweaveTransactions` and `arweaveJwk` options (config and `createPublish`), the `SerializedPublishUpload` and `ArweaveTransactionInfoResult` types, and the context fields `reimbursementTransactionId`, `reimbursementConfirmed`, `requestResponse`, `transactionKeys`, `uploaderState` and `currentTransactionIndex`.
12
+ - `resolvePublishPayment(...).storage.path` and a cost estimate's `arweave.path` are always `'bundler'`. `chargedUploadBytes(work, uploadTo)` drops its `path` argument; `combinePublishCostEstimate` still accepts `arweavePath: 'bundler'`.
13
+ - A publish saved mid-way through the L1 path (`creatingArweaveTransactions`, `sendingReimbursementRequest`, `pollingForConfirmation`, `uploadingData` or their `Phase2` states) is marked interrupted on restore instead of resuming; publish the item again.
14
+ - The L1-finalize worker no longer restores data item ids that publish 0.7.4 and earlier overwrote with L1 ids. Databases that old are recreated by `@seedprotocol/sdk` (minimum upgrade-from version 0.7.7).
15
+
5
16
  ## 0.7.7 (2026-10-18)
6
17
 
7
18
  ### Commits
package/README.md CHANGED
@@ -46,9 +46,6 @@ initPublish({
46
46
  rpcUrl: import.meta.env.VITE_RPC_URL,
47
47
  chain: optimismSepolia,
48
48
  accountMode: 'eoa',
49
- // Files (images, Html, ...) go to Arweave as data items the wallet signs. Without this, uploads
50
- // take the L1 path, which needs an Arweave key: arweaveJwk or signArweaveTransactions.
51
- useArweaveBundler: true,
52
49
  })
53
50
 
54
51
  function Connect() {
@@ -135,8 +132,8 @@ from the sender your config selects:
135
132
  | Permissionless EIP-7702 | `bundlerUrl` (Recipe 2) | sponsored by `paymasterUrl`, else the bundler |
136
133
  | Connected wallet | neither | the user's ETH |
137
134
 
138
- Storage goes through the upload API at `uploadApiBaseUrl`, and its operator pays: directly on the
139
- bundler path, and on the L1 path by reimbursing the user's Arweave key before the upload.
135
+ Files go to Arweave as data items signed by the user's key. By default they go to the upload API's
136
+ bundler routes at `uploadApiBaseUrl`, and its operator pays for them.
140
137
 
141
138
  To state the intent instead, set `payment`. It fills in those settings' defaults, and `initPublish`
142
139
  throws `PublishPaymentConfigError` when a setting contradicts it:
@@ -154,7 +151,7 @@ reports the same in `evm.userPays` / `arweave.userPays`.
154
151
 
155
152
  #### Users pay for storage (Turbo)
156
153
 
157
- `payment: { storage: 'user' }` sends data items (signed by the user's EVM key, as on the bundler path)
154
+ `payment: { storage: 'user' }` sends the data items (signed by the user's EVM key)
158
155
  straight to [Turbo](https://docs.ar.io/build/upload/bundling-services/), which charges that address's
159
156
  Turbo credits. Users top up through Turbo with a card or crypto. Items under Turbo's free-tier size
160
157
  cost nothing. Before uploading, the publish checks the balance covers the items and fails with
@@ -251,27 +248,15 @@ Fund both the ManagedAccount and the in-app EOA before publishing: `bun run twin
251
248
 
252
249
  Twin quirks the SDK handles: automation pre-flight simulations retry with a balance override when the account can't cover OP's up-front L1 fee, EOA sends retry when the fork's pending-nonce lookup lags a block, and `getArweave()` follows the gateway's protocol and port (e.g. `http://localhost:1984`).
253
250
 
254
- ### Experimental: Arweave bundler (instant uploads)
251
+ ### Arweave uploads
255
252
 
256
- When using your own gateway with an Arweave bundler, you can enable instant uploads instead of the default reimbursement + chunk upload flow. **This is experimental and not yet validated for production.**
253
+ Publish signs each file (image, Html, ...) as an Arweave data item and posts them in one batch to `${uploadApiBaseUrl}/api/upload/arweave/batch`, whose operator pays for them (or to Turbo with `payment: { storage: 'user' }`). A background worker records each bundle's L1 transaction once it is anchored.
257
254
 
258
- **Memory:** Large publishes hold signed DataItems and a single packed batch body in memory briefly. Electron and other Chromium renderers often cap near ~4 GB JS heap. See [docs/PUBLISH_MEMORY.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/PUBLISH_MEMORY.md) for scaling, `publishMode`, and path differences (`signDataItems` vs `dataItemSigner`).
259
-
260
- Set `useArweaveBundler: true`. The bundler uses the same `uploadApiBaseUrl` (e.g. `${uploadApiBaseUrl}/upload/batch`).
255
+ `useArweaveBundler` is deprecated: `true` changes nothing, and `false` makes `initPublish` throw. The L1 path it used to select, an Arweave transaction the upload API reimbursed, has been removed along with the `signArweaveTransactions` and `arweaveJwk` options.
261
256
 
262
- ```tsx
263
- <PublishProvider
264
- config={{
265
- thirdwebClientId: import.meta.env.VITE_THIRDWEB_CLIENT_ID,
266
- uploadApiBaseUrl: import.meta.env.VITE_UPLOAD_API_BASE_URL,
267
- useArweaveBundler: true,
268
- }}
269
- >
270
- <App />
271
- </PublishProvider>
272
- ```
257
+ **Memory:** Large publishes hold signed DataItems and a single packed batch body in memory briefly. Electron and other Chromium renderers often cap near ~4 GB JS heap. See [docs/PUBLISH_MEMORY.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/PUBLISH_MEMORY.md) for scaling, `publishMode`, and path differences (`signDataItems` vs `dataItemSigner`).
273
258
 
274
- When using the bundler, you must provide a signer at publish time via `PublishManager.createPublish` options:
259
+ Provide a data item signer at publish time via `PublishManager.createPublish` options:
275
260
 
276
261
  ```tsx
277
262
  // Signer passed at publish time (recommended for apps where signer isn't available at startup)
@@ -290,7 +275,7 @@ PublishManager.createPublish(item, address, account, {
290
275
 
291
276
  You can also provide `signDataItems` or `dataItemSigner` in the PublishProvider config as a fallback when the signer is available at startup.
292
277
 
293
- **Html properties with embedded `data:image/...;base64,...` (materialization):** When `useArweaveBundler: true`, the publish machine runs the same two-phase flow as L1: phase 1 uploads non-deferred payloads (including materialized Image DataItems), rewrites Html files on disk with Arweave URLs, then phase 2 builds and uploads Html-only DataItems. **`signDataItems` is invoked twice per publish** in that scenario (once per phase)—implementations should sign/upload the `uploads` array they receive each time. The in-process **`dataItemSigner`** path performs two HTTP batch uploads to your bundler API. Per-property `htmlEmbeddedDataUriPolicy: 'preserve'` skips materialization and keeps a single phase, unless the Html has `seed:property/<name>` placeholders (see [docs/PUBLISHING.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/PUBLISHING.md)), which always take the two-phase path.
278
+ **Html properties with embedded `data:image/...;base64,...` (materialization):** the publish machine runs a two-phase flow: phase 1 uploads non-deferred payloads (including materialized Image DataItems), rewrites Html files on disk with Arweave URLs, then phase 2 builds and uploads Html-only DataItems. **`signDataItems` is invoked twice per publish** in that scenario (once per phase)—implementations should sign/upload the `uploads` array they receive each time. The in-process **`dataItemSigner`** path performs two HTTP batch uploads to your bundler API. Per-property `htmlEmbeddedDataUriPolicy: 'preserve'` skips materialization and keeps a single phase, unless the Html has `seed:property/<name>` placeholders (see [docs/PUBLISHING.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/PUBLISHING.md)), which always take the two-phase path.
294
279
 
295
280
  ### Arweave upload tags
296
281