@seedprotocol/publish 0.4.17 → 0.4.20

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 (71) hide show
  1. package/README.md +6 -0
  2. package/dist/config.d.ts +40 -3
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/errors.d.ts +27 -0
  5. package/dist/errors.d.ts.map +1 -1
  6. package/dist/helpers/arweave.d.ts +3 -2
  7. package/dist/helpers/arweave.d.ts.map +1 -1
  8. package/dist/helpers/arweave.test.d.ts +2 -0
  9. package/dist/helpers/arweave.test.d.ts.map +1 -0
  10. package/dist/helpers/constants.d.ts +6 -0
  11. package/dist/helpers/constants.d.ts.map +1 -1
  12. package/dist/helpers/debugPublishIngest.d.ts +2 -0
  13. package/dist/helpers/debugPublishIngest.d.ts.map +1 -0
  14. package/dist/helpers/ensureExecutorModule.d.ts +15 -0
  15. package/dist/helpers/ensureExecutorModule.d.ts.map +1 -0
  16. package/dist/helpers/ensureManagedAccountReady.d.ts +36 -0
  17. package/dist/helpers/ensureManagedAccountReady.d.ts.map +1 -0
  18. package/dist/helpers/ensureManagedAccountReady.test.d.ts +2 -0
  19. package/dist/helpers/ensureManagedAccountReady.test.d.ts.map +1 -0
  20. package/dist/helpers/ensureSmartWalletThenPublish.d.ts +11 -1
  21. package/dist/helpers/ensureSmartWalletThenPublish.d.ts.map +1 -1
  22. package/dist/helpers/publishDisplayHelpers.d.ts +22 -0
  23. package/dist/helpers/publishDisplayHelpers.d.ts.map +1 -1
  24. package/dist/hooks/useArweaveL1Finalize.d.ts +23 -0
  25. package/dist/hooks/useArweaveL1Finalize.d.ts.map +1 -0
  26. package/dist/hooks/useItemPublishStatus.d.ts +8 -0
  27. package/dist/hooks/useItemPublishStatus.d.ts.map +1 -1
  28. package/dist/hooks/usePublishProcess.d.ts.map +1 -1
  29. package/dist/index-BfABV7U1.js +4840 -0
  30. package/dist/index-BfABV7U1.js.map +1 -0
  31. package/dist/index-DhVUuOO3.js +4824 -0
  32. package/dist/index-DhVUuOO3.js.map +1 -0
  33. package/dist/index-P7oBN4Yu.js +4785 -0
  34. package/dist/index-P7oBN4Yu.js.map +1 -0
  35. package/dist/index.d.ts +11 -4
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +110 -4338
  38. package/dist/index.js.map +1 -1
  39. package/dist/react/ConnectButton.d.ts.map +1 -1
  40. package/dist/react/PublishModeButtons.d.ts +15 -0
  41. package/dist/react/PublishModeButtons.d.ts.map +1 -0
  42. package/dist/services/PublishManager/actions/createPublish.d.ts.map +1 -1
  43. package/dist/services/PublishManager/actions/stopAll.d.ts +2 -1
  44. package/dist/services/PublishManager/actions/stopAll.d.ts.map +1 -1
  45. package/dist/services/PublishManager/actors/savePublish.d.ts.map +1 -1
  46. package/dist/services/PublishManager/actors/subscribe.d.ts.map +1 -1
  47. package/dist/services/arweaveL1Finalize/enqueue.d.ts +7 -0
  48. package/dist/services/arweaveL1Finalize/enqueue.d.ts.map +1 -0
  49. package/dist/services/arweaveL1Finalize/worker.d.ts +3 -0
  50. package/dist/services/arweaveL1Finalize/worker.d.ts.map +1 -0
  51. package/dist/services/publish/actors/checking.d.ts.map +1 -1
  52. package/dist/services/publish/actors/createArweaveDataItems.d.ts.map +1 -1
  53. package/dist/services/publish/actors/createArweaveTransactions.d.ts.map +1 -1
  54. package/dist/services/publish/actors/createAttestations.d.ts.map +1 -1
  55. package/dist/services/publish/actors/createAttestationsDirectToEas.d.ts.map +1 -1
  56. package/dist/services/publish/actors/persistSeedUid.d.ts +4 -2
  57. package/dist/services/publish/actors/persistSeedUid.d.ts.map +1 -1
  58. package/dist/services/publish/actors/publishRequestNormalize.d.ts +13 -0
  59. package/dist/services/publish/actors/publishRequestNormalize.d.ts.map +1 -0
  60. package/dist/services/publish/helpers/getPublishUploadData.d.ts +8 -2
  61. package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
  62. package/dist/services/upload/uploadMachine.d.ts +1 -1
  63. package/dist/types.d.ts +19 -2
  64. package/dist/types.d.ts.map +1 -1
  65. package/dist/worker-BxY09Tmw.js +73 -0
  66. package/dist/worker-BxY09Tmw.js.map +1 -0
  67. package/dist/worker-Ce8qDQKc.js +73 -0
  68. package/dist/worker-Ce8qDQKc.js.map +1 -0
  69. package/dist/worker-F-UKvyIU.js +73 -0
  70. package/dist/worker-F-UKvyIU.js.map +1 -0
  71. package/package.json +5 -5
package/README.md CHANGED
@@ -110,6 +110,12 @@ PublishManager.createPublish(item, address, account, {
110
110
 
111
111
  You can also provide `signDataItems` or `dataItemSigner` in the PublishProvider config as a fallback when the signer is available at startup.
112
112
 
113
+ ### Arweave upload tags
114
+
115
+ Add optional tags (e.g. `App-Name`) on **`PublishProvider` / `initPublish` config** as **`arweaveUploadTags`**, and/or per publish via **`createPublish` options**. Resolved order: **`[...configTags, ...perPublishTags]`**, appended after `Content-SHA-256` / `Content-Type` on each upload.
116
+
117
+ When implementing **`signDataItems`**, use **`upload.tags`** as the tag list for each DataItem. Avoid rebuilding tags from `contentHash` / `contentType` only, or you will drop configured tags.
118
+
113
119
  ## Development
114
120
 
115
121
  ```bash
package/dist/config.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { type TransactionTag } from '@seedprotocol/sdk';
1
2
  import { ethers } from 'ethers';
2
3
  /** Serialized upload item for Arweave signing (input to callback or used internally with JWK) */
3
4
  export interface SerializedPublishUpload {
@@ -30,6 +31,11 @@ export interface PublishConfig {
30
31
  * Defaults to {@link uploadApiBaseUrl} (e.g. set `ARWEAVE_UPLOAD_API_BASE_URL` as `uploadApiBaseUrl`).
31
32
  */
32
33
  arweaveUploadVerificationBaseUrl?: string;
34
+ /**
35
+ * Arweave gateway GraphQL URL for resolving L1 bundle tx ids after bundler upload.
36
+ * Defaults to {@link DEFAULT_ARWEAVE_GRAPHQL_URL}.
37
+ */
38
+ arweaveGraphqlUrl?: string;
33
39
  /**
34
40
  * Use integer indices instead of string localId/publishLocalId for multiPublish (gas-efficient).
35
41
  * Set to true when using the new contract that expects uint256 localIdIndex/publishLocalIdIndex.
@@ -42,8 +48,9 @@ export interface PublishConfig {
42
48
  */
43
49
  useDirectEas?: boolean;
44
50
  /**
45
- * Optional IModularCore module to ensure is installed on the connected account contract.
46
- * When set, onConnect will check getInstalledModules and install if missing.
51
+ * Optional IModularCore module to ensure is installed on the **ModularCore** account contract.
52
+ * When set, onConnect / publish prep will check getInstalledModules and install if missing.
53
+ * If the smart account is not ModularCore (no Router), install is skipped — typical for default EIP-4337 accounts.
47
54
  */
48
55
  modularAccountModuleContract?: string;
49
56
  /** Optional module install data (default "0x"). Used with modularAccountModuleContract. */
@@ -53,12 +60,27 @@ export interface PublishConfig {
53
60
  * Default: false (uses the smart wallet executor).
54
61
  */
55
62
  useModularExecutor?: boolean;
63
+ /**
64
+ * When true (and `useModularExecutor`), attempts to deploy the ManagedAccount via the factory
65
+ * if it is not yet deployed on Optimism Sepolia. Default: false (surface `managed_not_ready` instead).
66
+ */
67
+ autoDeployManagedAccount?: boolean;
68
+ /**
69
+ * Called when optional wallet setup steps fail after connect (e.g. executor module install).
70
+ */
71
+ onWalletSetupWarning?: (error: unknown) => void;
56
72
  /**
57
73
  * EXPERIMENTAL: Use Arweave bundler for instant uploads instead of reimbursement + chunk upload.
58
74
  * When true, skips sendReimbursementRequest, pollForConfirmation, and chunk-by-chunk uploadData.
59
75
  * Uses uploadApiBaseUrl for the bundler endpoint. Not yet validated for production.
60
76
  */
61
77
  useArweaveBundler?: boolean;
78
+ /**
79
+ * Tags appended to every Arweave upload after Content-SHA-256 / Content-Type (e.g. App-Name).
80
+ * Merged at publish time with {@link CreatePublishOptions.arweaveUploadTags} as
81
+ * `[...config, ...options]`.
82
+ */
83
+ arweaveUploadTags?: TransactionTag[];
62
84
  /**
63
85
  * Optional fallback: Sign Arweave upload transactions (non-bundler path). Prefer passing at createPublish time.
64
86
  */
@@ -79,12 +101,18 @@ export interface PublishConfig {
79
101
  dataItemSigner?: ethers.Wallet | import('thirdweb/wallets').Account;
80
102
  /**
81
103
  * Optional fallback: Sign DataItems when useArweaveBundler is true. Prefer passing at createPublish time.
104
+ * Each upload includes `tags` (content + configured {@link arweaveUploadTags}); forward them into the DataItem.
82
105
  */
83
106
  signDataItems?: (uploads: import('./services/publish/helpers/getPublishUploadData').PublishUploadData[]) => Promise<ArweaveDataItemInfoResult[]>;
84
107
  }
85
108
  /** Options passed at createPublish time. Signers here override config fallbacks. */
86
109
  export interface CreatePublishOptions {
87
- /** Required when useArweaveBundler: sign DataItems (wallet flow) */
110
+ /** `patch` (default): pending properties only. `new_version`: new Version attestation + all properties. */
111
+ publishMode?: import('./types').PublishMode;
112
+ /**
113
+ * Required when useArweaveBundler: sign DataItems (wallet flow).
114
+ * Use each upload's `tags` when building the signed DataItem.
115
+ */
88
116
  signDataItems?: (uploads: import('./services/publish/helpers/getPublishUploadData').PublishUploadData[]) => Promise<ArweaveDataItemInfoResult[]>;
89
117
  /** Required when useArweaveBundler: signer for DataItems (backend/script flow) */
90
118
  dataItemSigner?: ethers.Wallet | import('thirdweb/wallets').Account;
@@ -98,6 +126,11 @@ export interface CreatePublishOptions {
98
126
  d?: string;
99
127
  [key: string]: unknown;
100
128
  };
129
+ /**
130
+ * Extra tags for this publish only, appended after {@link PublishConfig.arweaveUploadTags}.
131
+ * Resolved order: `[...initPublishTags, ...theseTags]`.
132
+ */
133
+ arweaveUploadTags?: TransactionTag[];
101
134
  }
102
135
  /**
103
136
  * Internal: Set config ref. Called by PublishProvider on mount or initPublish.
@@ -120,12 +153,16 @@ export interface ResolvedPublishConfig extends PublishConfig {
120
153
  uploadApiBaseUrl: string;
121
154
  /** Resolved verification origin (defaults to uploadApiBaseUrl). */
122
155
  arweaveUploadVerificationBaseUrl: string;
156
+ /** Resolved GraphQL endpoint for L1 tx resolution (defaults to DEFAULT_ARWEAVE_GRAPHQL_URL). */
157
+ arweaveGraphqlUrl: string;
123
158
  easContractAddress: string;
124
159
  useIntegerLocalIds: boolean;
125
160
  useDirectEas: boolean;
126
161
  modularAccountModuleData: string;
127
162
  useModularExecutor: boolean;
128
163
  useArweaveBundler: boolean;
164
+ /** Resolved: defaults to false. */
165
+ autoDeployManagedAccount: boolean;
129
166
  }
130
167
  /**
131
168
  * Internal: Get resolved config. Reads from ref set by initPublish or PublishProvider.
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,iGAAiG;AACjG,MAAM,WAAW,uBAAuB;IACtC,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACzC;AAED,kEAAkE;AAClE,MAAM,WAAW,4BAA4B;IAC3C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,MAAM,CAAA;IACxB,yJAAyJ;IACzJ,gBAAgB,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAA;IACzC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,4BAA4B,CAAC,EAAE,MAAM,CAAA;IACrC,2FAA2F;IAC3F,wBAAwB,CAAC,EA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a,GAAG,IAAI,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,IAAI,CAmBlD;AAED,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,oBAAc,CAAA;AAE3C,MAAM,WAAW,qBAAsB,SAAQ,aAAa;IAC1D,6BAA6B,EAAE,MAAM,CAAA;IACrC,gBAAgB,EAAE,MAAM,CAAA;IACxB,mEAAmE;IACnE,gCAAgC,EAAE,MAAM,CAAA;IACxC,gGAAgG;IAChG,iBAAiB,EAAE,MAAM,CAAA;IACzB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,YAAY,EAAE,OAAO,CAAA;IACrB,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,OAAO,CAAA;IAC3B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,mCAAmC;IACnC,wBAAwB,EAAE,OAAO,CAAA;CAClC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,qBAAqB,CAwBxD"}
package/dist/errors.d.ts CHANGED
@@ -5,4 +5,31 @@ 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';
9
+ /**
10
+ * Thrown or returned when the managed publishing account (Optimism Sepolia) is missing,
11
+ * unreachable, or missing the executor module for the modular executor path.
12
+ */
13
+ export declare class ManagedAccountPublishError extends Error {
14
+ readonly code: ManagedAccountPublishErrorCode;
15
+ readonly managedAddress?: string | undefined;
16
+ /** Original error when connection or deployment failed (avoids shadowing `Error.cause`). */
17
+ readonly underlyingCause?: unknown;
18
+ constructor(message: string, code: ManagedAccountPublishErrorCode, managedAddress?: string | undefined, underlyingCause?: unknown);
19
+ }
20
+ /**
21
+ * True when `e` is a managed-account publish error. Uses `name` + `code` as a fallback
22
+ * when `instanceof` fails across duplicate bundled class identities.
23
+ */
24
+ export declare function isManagedAccountPublishError(e: unknown): e is ManagedAccountPublishError;
25
+ /**
26
+ * Best-effort string for RPC / thirdweb / viem failures that are not plain `Error`
27
+ * (so logs and UIs can show the real revert or RPC reason).
28
+ */
29
+ export declare function stringifyUnderlyingCause(u: unknown, maxLen?: number): string;
30
+ /**
31
+ * True when the RPC/contract error indicates the account is **not** Thirdweb ModularCore
32
+ * (no Router / `getInstalledModules`), e.g. default EIP-4337 smart accounts.
33
+ */
34
+ export declare function isRouterNonModularCoreAccountError(cause: unknown): boolean;
8
35
  //# sourceMappingURL=errors.d.ts.map
@@ -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"}
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,CAAA;AAEnC;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;aAMjC,IAAI,EAAE,8BAA8B;aACpC,cAAc,CAAC,EAAE,MAAM;IANzC,4FAA4F;IAC5F,SAAgB,eAAe,CAAC,EAAE,OAAO,CAAA;gBAGvC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,8BAA8B,EACpC,cAAc,CAAC,EAAE,MAAM,YAAA,EACvC,eAAe,CAAC,EAAE,OAAO;CAM5B;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,0BAA0B,CAKxF;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,SAAM,GAAG,MAAM,CAqBzE;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1E"}
@@ -4,6 +4,7 @@ interface Tag {
4
4
  name: string;
5
5
  value: string;
6
6
  }
7
+ export declare function buildPublishAnchorBytes(walletAddress: string, timestampMs: number, uniqueness: bigint): Uint8Array;
7
8
  /**
8
9
  * Type guard: true if signer is ethers.Wallet (has privateKey). Thirdweb Account does not.
9
10
  */
@@ -21,7 +22,7 @@ export declare const writeUint64LE: (value: number) => Uint8Array;
21
22
  /**
22
23
  * Create a signed ANS-104 DataItem. Uses deep-hash for the message to sign (per arbundles/Irys).
23
24
  */
24
- export declare const createSignedDataItem: (data: Uint8Array, signer: ethers.Wallet, tags: Tag[]) => Promise<{
25
+ export declare const createSignedDataItem: (data: Uint8Array, signer: ethers.Wallet, tags: Tag[], rawAnchor?: Uint8Array) => Promise<{
25
26
  id: string;
26
27
  raw: Uint8Array;
27
28
  }>;
@@ -29,7 +30,7 @@ export declare const createSignedDataItem: (data: Uint8Array, signer: ethers.Wal
29
30
  * Create a signed ANS-104 DataItem using a Thirdweb Account (EOA, ManagedAccount, Modular Account).
30
31
  * Uses deep-hash for the message to sign (per arbundles/Irys).
31
32
  */
32
- export declare const createSignedDataItemWithAccount: (data: Uint8Array, account: Account, tags: Tag[]) => Promise<{
33
+ export declare const createSignedDataItemWithAccount: (data: Uint8Array, account: Account, tags: Tag[], rawAnchor?: Uint8Array) => Promise<{
33
34
  id: string;
34
35
  raw: Uint8Array;
35
36
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"arweave.d.ts","sourceRoot":"","sources":["../../src/helpers/arweave.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAsB/C,UAAU,GAAG;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,CAOvE;AAkBD;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,GAAG,EAAE,KAAG,UA+B3C,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,UAO7C,CAAA;AA4GD;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,UAAU,EAChB,QAAQ,MAAM,CAAC,MAAM,EACrB,MAAM,GAAG,EAAE,KACV,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,CAkBzC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B,GAC1C,MAAM,UAAU,EAChB,SAAS,OAAO,EAChB,MAAM,GAAG,EAAE,KACV,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,CA8B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UAAU,CAAA;CAAE,CA6BzC,CAAA;AAsCD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CA0CtE;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,KAAG,MAM7C,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=arweave.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arweave.test.d.ts","sourceRoot":"","sources":["../../src/helpers/arweave.test.ts"],"names":[],"mappings":""}
@@ -9,6 +9,12 @@ export declare const EAS_SCHEMA_NAME_ATTESTATION_UID: "0x44d562ac1d7cd77e2329786
9
9
  export declare const THIRDWEB_ACCOUNT_FACTORY_ADDRESS: "0x76f47d88bfaf670f5208911181fcdc0e160cb16d";
10
10
  /** EAS contract address on Optimism Sepolia (chain 11155420) */
11
11
  export declare const EAS_CONTRACT_ADDRESS: "0x4200000000000000000000000000000000000021";
12
+ /**
13
+ * SeedProtocol contract on Optimism Sepolia — same deployment as
14
+ * `helpers/thirdweb/11155420/0xcd8c945872df8e664e55cf8885c85ea3ea8f2148` (multiPublish ABI).
15
+ * The Thirdweb managed smart account address is not this contract; `multiPublish` must target this `to`.
16
+ */
17
+ export declare const SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA: "0xcd8c945872df8e664e55cf8885c85ea3ea8f2148";
12
18
  export declare const PublishMachineStates: {
13
19
  readonly SUCCESS: "success";
14
20
  readonly FAILURE: "failure";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,EAClC,4CAAqD,CAAA;AAEvD,wEAAwE;AACxE,eAAO,MAAM,+BAA+B,EAC1C,oEAA6E,CAAA;AAE/E,2EAA2E;AAC3E,eAAO,MAAM,gCAAgC,EAC3C,4CAAqD,CAAA;AAEvD,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAC/B,4CAAqD,CAAA;AAEvD,eAAO,MAAM,oBAAoB;;;CAGvB,CAAA;AAEV,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,6EAI9B,CAAA;AAEV,eAAO,MAAM,yBAAyB,QAAS,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/helpers/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,EAClC,4CAAqD,CAAA;AAEvD,wEAAwE;AACxE,eAAO,MAAM,+BAA+B,EAC1C,oEAA6E,CAAA;AAE/E,2EAA2E;AAC3E,eAAO,MAAM,gCAAgC,EAC3C,4CAAqD,CAAA;AAEvD,gEAAgE;AAChE,eAAO,MAAM,oBAAoB,EAC/B,4CAAqD,CAAA;AAEvD;;;;GAIG;AACH,eAAO,MAAM,yCAAyC,EACpD,4CAAqD,CAAA;AAEvD,eAAO,MAAM,oBAAoB;;;CAGvB,CAAA;AAEV,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,6EAI9B,CAAA;AAEV,eAAO,MAAM,yBAAyB,QAAS,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function debugPublishIngest(location: string, message: string, hypothesisId: string, data: Record<string, unknown>, runId?: string): void;
2
+ //# sourceMappingURL=debugPublishIngest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugPublishIngest.d.ts","sourceRoot":"","sources":["../../src/helpers/debugPublishIngest.ts"],"names":[],"mappings":"AAOA,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,SAAkB,GACtB,IAAI,CAgBN"}
@@ -0,0 +1,15 @@
1
+ import type { Account } from 'thirdweb/wallets';
2
+ import type { PublishConfig } from '../config';
3
+ /**
4
+ * Ensures `modularAccountModuleContract` is installed on `contractAddress` when that contract
5
+ * implements Thirdweb ModularCore (`getInstalledModules` / Router). If the account does not
6
+ * support ModularCore (RPC error `Router: function does not exist`), this is a **no-op** — many
7
+ * EIP-4337 managed accounts embed `multiPublish` without pluggable modules.
8
+ *
9
+ * No-op if `modularAccountModuleContract` is unset.
10
+ *
11
+ * @param contractAddress - Account contract to inspect (typically the managed smart account)
12
+ * @param account - Account that can sign `installModule` for that contract
13
+ */
14
+ export declare function ensureExecutorModuleInstalled(contractAddress: string, account: Account, config: Pick<PublishConfig, 'modularAccountModuleContract'>): Promise<void>;
15
+ //# sourceMappingURL=ensureExecutorModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureExecutorModule.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureExecutorModule.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAI/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAM9C;;;;;;;;;;GAUG;AACH,wBAAsB,6BAA6B,CACjD,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,8BAA8B,CAAC,GAC1D,OAAO,CAAC,IAAI,CAAC,CAwCf"}
@@ -0,0 +1,36 @@
1
+ import { ManagedAccountPublishError } from '../errors';
2
+ export type EnsureManagedAccountReadyResult = {
3
+ kind: 'skip';
4
+ } | {
5
+ kind: 'unavailable';
6
+ cause: unknown;
7
+ } | {
8
+ kind: 'not_deployed';
9
+ managedAddress: string;
10
+ } | {
11
+ kind: 'ready';
12
+ managedAddress: string;
13
+ };
14
+ /**
15
+ * Checks managed account deployment for the modular executor path.
16
+ * Returns `{ kind: 'skip' }` when `useModularExecutor` is false.
17
+ */
18
+ export declare function ensureManagedAccountReady(): Promise<EnsureManagedAccountReadyResult>;
19
+ /**
20
+ * Deploys the ManagedAccount via the factory using the managed in-app wallet signer.
21
+ * @throws ManagedAccountPublishError on missing account or deploy failure
22
+ */
23
+ export declare function tryDeployManagedAccount(): Promise<void>;
24
+ export type ModularExecutorPublishPrepResult = {
25
+ ok: true;
26
+ managedAddress: string;
27
+ } | {
28
+ ok: false;
29
+ error: ManagedAccountPublishError;
30
+ };
31
+ /**
32
+ * Full gate for modular executor publish: deployment check, optional factory deploy, optional executor module on the managed contract.
33
+ * Call only when `useModularExecutor` is true.
34
+ */
35
+ export declare function runModularExecutorPublishPrep(): Promise<ModularExecutorPublishPrepResult>;
36
+ //# sourceMappingURL=ensureManagedAccountReady.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureManagedAccountReady.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedAccountReady.ts"],"names":[],"mappings":"AASA,OAAO,EAAgC,0BAA0B,EAAE,MAAM,WAAW,CAAA;AAepF,MAAM,MAAM,+BAA+B,GACvC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C;;;GAGG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,+BAA+B,CAAC,CAkB1F;AAYD;;;GAGG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAO7D;AAED,MAAM,MAAM,gCAAgC,GACxC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,0BAA0B,CAAA;CAAE,CAAA;AAEpD;;;GAGG;AACH,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,gCAAgC,CAAC,CAqE/F"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ensureManagedAccountReady.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensureManagedAccountReady.test.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureManagedAccountReady.test.ts"],"names":[],"mappings":""}
@@ -1,16 +1,26 @@
1
1
  import type { Account } from 'thirdweb/wallets';
2
2
  import type { Item } from '@seedprotocol/sdk';
3
3
  import type { CreatePublishOptions } from '../config';
4
+ import { ManagedAccountPublishError } from '../errors';
4
5
  export type EnsureSmartWalletResult = {
5
6
  outcome: 'started';
6
7
  } | {
7
8
  outcome: 'no_address';
8
9
  } | {
9
10
  outcome: 'needs_deploy';
11
+ } | {
12
+ outcome: 'managed_not_ready';
13
+ error: ManagedAccountPublishError;
10
14
  };
11
15
  /**
12
16
  * Resolves the smart wallet for the current account; if deployed, starts publish.
13
- * If the user has no deployed ManagedAccount, returns needs_deploy so the caller can open the deploy modal.
17
+ * If the user has no deployed ManagedAccount (non-modular path), returns needs_deploy so the caller can open the deploy modal.
18
+ *
19
+ * When `useModularExecutor` is true, runs {@link runModularExecutorPublishPrep} first and uses the **managed** account
20
+ * address as the publish `address` (context for `multiPublish`).
21
+ *
22
+ * Pass `options.publishMode`: `patch` (default) publishes only pending properties on the current Version;
23
+ * `new_version` creates a new Version attestation and re-attests all properties (requires an existing Seed UID).
14
24
  */
15
25
  export declare function ensureSmartWalletThenPublish(item: Item<any>, activeAccount: Account | null | undefined, getAddress: () => Promise<string | null>, options?: CreatePublishOptions): Promise<EnsureSmartWalletResult>;
16
26
  //# sourceMappingURL=ensureSmartWalletThenPublish.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ensureSmartWalletThenPublish.d.ts","sourceRoot":"","sources":["../../src/helpers/ensureSmartWalletThenPublish.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE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GAAG,IAAI,GAAG,SAAS,EACzC,UAAU,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EACxC,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,uBAAuB,CAAC,CA0ClC"}
@@ -5,4 +5,26 @@
5
5
  * machine value for display.
6
6
  */
7
7
  export declare function getDisplayStepId(machineValue: string): string;
8
+ type PublishRowStatus = 'in_progress' | 'completed' | 'failed' | 'interrupted';
9
+ /**
10
+ * Single source of truth for step UIs: the live machine while running; once the
11
+ * actor is gone, prefer the DB row status so we never flash an intermediate
12
+ * `persistedSnapshot` value (e.g. creatingAttestations) after a completed run.
13
+ */
14
+ export declare function resolvePublishDisplayValue(publishProcess: unknown | null | undefined, record: {
15
+ status: PublishRowStatus;
16
+ } | undefined, machineValue: string | undefined): string | undefined;
17
+ export type PublishRowForDisplay = {
18
+ status: string;
19
+ persistedSnapshot: string;
20
+ completedAt?: number | null;
21
+ };
22
+ /**
23
+ * Derives the machine-state string for UI from the persisted DB row. Prefer
24
+ * `status` / `completedAt` over raw `persistedSnapshot` JSON so a stale or
25
+ * out-of-order snapshot write cannot force the UI back to an intermediate step
26
+ * after a terminal save (common when consumers read `JSON.parse(persistedSnapshot).value`).
27
+ */
28
+ export declare function getPublishMachineValueForUi(record: PublishRowForDisplay | undefined): string | undefined;
29
+ export {};
8
30
  //# sourceMappingURL=publishDisplayHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"publishDisplayHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/publishDisplayHelpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAK7D"}
1
+ {"version":3,"file":"publishDisplayHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/publishDisplayHelpers.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED,KAAK,gBAAgB,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAA;AAE9E;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAC1C,MAAM,EAAE;IAAE,MAAM,EAAE,gBAAgB,CAAA;CAAE,GAAG,SAAS,EAChD,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,MAAM,GAAG,SAAS,CAKpB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,iBAAiB,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,oBAAoB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CA6BxG"}
@@ -0,0 +1,23 @@
1
+ export type ArweaveL1FinalizeJobRow = {
2
+ id: number;
3
+ seedLocalId: string;
4
+ dataItemId: string;
5
+ l1TransactionId: string | null;
6
+ bundleId: string | null;
7
+ phase: string;
8
+ statusJson: string | null;
9
+ errorMessage: string | null;
10
+ versionLocalId: string | null;
11
+ itemPropertyName: string | null;
12
+ updatedAt: number | null;
13
+ };
14
+ /**
15
+ * Live L1 finalization jobs for a seed (bundler path). Empty when not using bundler or no jobs.
16
+ */
17
+ export declare function useArweaveL1Finalize(seedLocalId: string | undefined): {
18
+ hasPendingL1: boolean;
19
+ pendingCount: number;
20
+ confirmedCount: number;
21
+ jobs: ArweaveL1FinalizeJobRow[];
22
+ };
23
+ //# sourceMappingURL=useArweaveL1Finalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useArweaveL1Finalize.d.ts","sourceRoot":"","sources":["../../src/hooks/useArweaveL1Finalize.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,uBAAuB,GAAG;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;;;;;EA0BnE"}
@@ -19,5 +19,13 @@ export declare function useItemPublishStatus(seedLocalId: string | undefined): {
19
19
  publishProcess: import("xstate").ActorRef<any, any, import("xstate").EventObject> | null;
20
20
  isActive: boolean;
21
21
  publishValue: string | undefined;
22
+ arweaveL1Pending: boolean;
23
+ arweaveL1Jobs: import("./useArweaveL1Finalize").ArweaveL1FinalizeJobRow[];
24
+ arweaveL1Summary: {
25
+ hasPendingL1: boolean;
26
+ pendingCount: number;
27
+ confirmedCount: number;
28
+ jobs: import("./useArweaveL1Finalize").ArweaveL1FinalizeJobRow[];
29
+ };
22
30
  };
23
31
  //# sourceMappingURL=useItemPublishStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useItemPublishStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useItemPublishStatus.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAA;AAEzF,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;;;;;EAwBnE"}
1
+ {"version":3,"file":"useItemPublishStatus.d.ts","sourceRoot":"","sources":["../../src/hooks/useItemPublishStatus.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAA;AAEzF,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,oBAAoB,CAAA;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS;;;;;;;;;;;;;EA4BnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePublishProcess.d.ts","sourceRoot":"","sources":["../../src/hooks/usePublishProcess.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM;;;EAwBpD"}
1
+ {"version":3,"file":"usePublishProcess.d.ts","sourceRoot":"","sources":["../../src/hooks/usePublishProcess.ts"],"names":[],"mappings":"AAcA,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM;;;EAmHpD"}