@arcadiasystems/morse-sdk 0.4.3 → 0.6.0

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 CHANGED
@@ -2,6 +2,69 @@
2
2
 
3
3
  All notable changes to `morse-sdk` will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
4
 
5
+ ## [0.6.0] - 2026-09-09
6
+
7
+ Fixes a mainnet Seal default shipped in 0.5.0 that could produce permanently unreadable ciphertext. Upgrade if you use `morseConfig({ network: "mainnet" })` with any encrypted path.
8
+
9
+ ### Fixed
10
+
11
+ - **Mainnet no longer defaults `sealKeyServers` to Mysten's committee.** 0.5.0 pinned the committee aggregator as a zero-config default on the understanding that it was the one no-signup mainnet option. It is not: it answers `401 No API key found in request` on every endpoint, including `/v1/service` and `/v1/fetch_key`. Every mainnet Seal operator is commercial.
12
+
13
+ The failure mode was worse than an outage. Seal reads key-server public keys from chain but fetches key shares from the operator, so `encrypt` succeeded and only `decrypt` returned 401. A mainnet consumer could encrypt content, pay to store the ciphertext on Walrus, and only then discover it could never be read. `morseConfig({ network: "mainnet" }).sealKeyServers` is now `[]`, so `DefaultSealAdapter.fromMorseConfig` throws `ConfigurationError` at construction instead, before anything is encrypted or paid for.
14
+
15
+ Public paths are unaffected: publications, collections, entries and non-encrypted files never touch Seal. The mainnet publication lifecycle is verified end to end on chain (create, read, list, delete).
16
+ - `ConfigurationError` from `DefaultSealAdapter.fromMorseConfig` now explains that mainnet operators are commercial and names `MAINNET_SEAL_COMMITTEE`, rather than only suggesting "use a network where the allowlist is pinned".
17
+ - README no longer claims encrypted mainnet flows work without setup.
18
+
19
+ ### Added
20
+
21
+ - **`MAINNET_SEAL_COMMITTEE`**: Mysten's mainnet committee as a ready-made `readonly KeyServerConfig[]`, for consumers who have credentials. Deliberately not a default and deliberately without an API key; spread it and add the `apiKeyName` / `apiKey` your operator issues. Committee mode is one logical server fronting 8 operators with an internal 5-of-8 quorum, which is why it carries `aggregatorUrl` (Seal throws `InvalidClientOptionsError` without it) and why the derived threshold is 1.
22
+
23
+ ### Added: upload relay support in the smokes
24
+
25
+ - **`WALRUS_UPLOAD_RELAY`** routes smoke uploads through a Walrus upload relay (`1` for the canonical host for the network, or an explicit URL) instead of the direct fanout, via a new `walrusWriteConfig()` helper in `scripts/_shared.ts`. `WalrusAdapterConfig` already forwarded `uploadRelay` to `@mysten/walrus`; nothing in the SDK surface changed, it was simply undocumented.
26
+
27
+ This turned out to matter. Direct writes fan out to every node in the committee at once (95 on mainnet, ~100 on testnet) and failed from the development machine on both networks, while individual nodes were healthy: 86/95 mainnet nodes answered, carrying 874 of 1000 shards under strict TLS, far above write quorum. The same script, key and network succeeds first try through the relay. The failure is the connection burst, not node health, the chain, or this SDK. README now documents the relay, its per-upload tip, the `sendTip.max` trap, and the trust trade.
28
+ - Smoke success markers are consistent. `phase-8-recipient-file` and `example-recipient-file-alice-bob` printed `[ok] ...` while every other script printed `PHASE N ...: PASS`, so a grep-based runner scored successful runs as failures. Both now match, and phase 8 gained the `FAIL` marker it was missing.
29
+
30
+ ### Verified on chain
31
+
32
+ Run against both networks with the relay. Mainnet: publications, publisher caps, collections (blob and quilt), Walrus blob and quilt uploads, and entry lifecycle in both collection modes. Testnet: all of the above plus the encrypted entry round trip and recipient files, public and encrypted.
33
+
34
+ ### Known gaps
35
+
36
+ - Seal on mainnet is unexercised end to end, and will stay that way until a credentialed operator is available. Phases 7 and 8 fail there at adapter construction, which is the intended new behaviour.
37
+ - `TESTED_SUBSTRATE.suiNetwork` still reads `"testnet"`, unchanged: the full suite passes there, whereas mainnet is missing the two Seal-dependent phases.
38
+
39
+ ## [0.5.0] - 2026-09-09
40
+
41
+ Mainnet support. `morseConfig({ network: "mainnet" })` previously threw `ConfigurationError`; it now returns a complete `NetworkConfig` against the mainnet deployment (`published-at`: `0x4fc7af5d1e19f96e5fab4e677948214eec35e238b252a106c7d5036dcebdcae2`, published 2026-09-09 in tx `HmiywHYifmrNLMvY2oT8cP5W9hpQc2wFTJAaaQoM8mLY`). No API shape changed and no consumer code needs editing beyond the network literal.
42
+
43
+ ### Added
44
+
45
+ - **Canonical mainnet deployment in `morseConfig`.** All six address fields are baked in, so mainnet consumers supply no addresses. Because the mainnet publish is an unupgraded v1, `packageId`, `originalPackageId`, and `recipientFileEventOriginPackageId` are all the same address; they are still stored as three separate fields because the first upgrade splits them, and a test pins the invariant so a half-finished upgrade fails loudly rather than silently returning empty type-filtered reads.
46
+ - **Mainnet Seal key servers default to Mysten's decentralized committee** (`0x686098f1...`, aggregator `https://seal-aggregator-mainnet.mystenlabs.com`). Unlike testnet, mainnet has no free open key-server allowlist: the independent mainnet operators are commercial and issue per-consumer API keys, so the committee is the only zero-onboarding option. It is one endpoint fronting 8 operators with an internal 5-of-8 quorum, which `@mysten/seal` models as a single server with `serverType: "Committee"`. Two consequences worth knowing: the entry **must** carry `aggregatorUrl` (Seal throws `InvalidClientOptionsError: Committee server ... requires aggregatorUrl in config` without it, and throws the mirror-image error for an independent server that *has* it), and `DefaultSealAdapter.fromMorseConfig` correctly resolves the default threshold to 1 rather than 2, since the real quorum is enforced behind the aggregator and cannot be expressed as a share count. Pass `seal.serverConfigs` to route through your own servers instead.
47
+ - **Mainnet Walrus aggregator** pinned to `https://aggregator.walrus-mainnet.walrus.space` for `HttpAggregatorReadAdapter.fromMorseConfig`. Publisher stays undefined on both networks, unchanged: there is no single canonical operator and picking one is a trust decision the SDK should not make for everyone.
48
+ - First tests for `DefaultSealAdapter.fromMorseConfig`, which had none. Cover the default threshold for both the single-server (mainnet) and multi-server (testnet) shapes, the `originalPackageId` / `packageId` split between Seal identity binding and PTB targets, and the no-key-servers `ConfigurationError`.
49
+
50
+ ### Changed
51
+
52
+ - The mainnet-specific `ConfigurationError` ("Morse is not yet deployed on mainnet") is gone, along with the branch that raised it. A network with no canonical deployment and no overrides now always gets the generic message naming the network. Only localnet reaches this path.
53
+ - `ConfigurationError` message from `HttpAggregatorReadAdapter.fromMorseConfig` no longer claims testnet is the only network with a pinned aggregator.
54
+ - Doc comments that described mainnet as unpinned or "pre-freeze" now describe the committee-mode constraint instead, in `config.ts`, `seal/default-adapter.ts`, and `walrus/http-aggregator-read-adapter.ts`.
55
+
56
+ ### Release + tooling
57
+
58
+ - **`prepublishOnly` now gates `npm publish`** on lint, typecheck, tests and a fresh build. `dist/` is gitignored and there was no build step wired into publish, so publishing from a clean checkout without a manual `bun run build` would have shipped a package whose `main` pointed at a file that was not in the tarball.
59
+ - **Smoke scripts take `MORSE_NETWORK`** (`mainnet` or `testnet`, default `testnet`); mainnet additionally requires `MORSE_ALLOW_MAINNET=1` so an inherited shell variable cannot spend real SUI and WAL. Every script now derives its Walrus adapter network from the same resolved value as its Sui client, which removes the possibility of pairing a mainnet Sui client with a testnet Walrus client. `scripts/_shared.ts` gained `smokeNetwork()` / `smokeConfig()` and `SmokeContext.network`.
60
+ - **README links now resolve on npmjs.com.** The `examples/` and `CONTRIBUTING.md` links were relative, and neither directory ships in the tarball, so all 13 were dead on the registry page for every published version to date. They are absolute GitHub URLs now; `./LICENSE` stays relative because it does ship.
61
+
62
+ ### Known gaps
63
+
64
+ - **`TESTED_SUBSTRATE.suiNetwork` still reads `"testnet"`, deliberately.** It records where the paid `scripts/phase-N-*.ts` smoke suite has actually run end to end, and that is testnet only. Mainnet is verified at the config layer (unit tests) and the read layer (a live gRPC `listPublicationsOwnedBy` against the deployed package), not by a full paid write cycle. The constant and the README compatibility table get updated when a mainnet smoke actually runs.
65
+ - `scripts/` and `examples/` remain hardcoded to testnet. `scripts/_shared.ts` is the single choke point if a `MORSE_NETWORK` override is added later. Neither directory ships in the npm tarball.
66
+ - The Move contracts remain unaudited on both networks.
67
+
5
68
  ## [0.4.3] - 2026-07-07
6
69
 
7
70
  ### Fixed
package/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  # morse-sdk
2
2
 
3
- TypeScript SDK for [Morse](../morse-contracts), a decentralized content management system on the Sui blockchain. Wraps the Move contract surface, Walrus storage, and Seal threshold encryption behind a typed adapter pattern.
3
+ TypeScript SDK for [Morse](https://github.com/arcadiasystems/morse-dcms/tree/main/morse-contracts), a decentralized content management system on the Sui blockchain. Wraps the Move contract surface, Walrus storage, and Seal threshold encryption behind a typed adapter pattern.
4
4
 
5
5
  ## Status
6
6
 
7
- Pre-release. Testnet only. The Move contract addresses are baked in via `morseConfig({ network: "testnet" })` and re-pinned on every contract redeploy. Mainnet support arrives once the contracts are frozen.
7
+ Pre-release. Mainnet and testnet are both wired: the Move contract addresses are baked in, so `morseConfig({ network: "mainnet" })` and `morseConfig({ network: "testnet" })` both return a complete config with no addresses to supply.
8
+
9
+ **Encrypted content needs your own Seal key servers on mainnet.** Public publications, collections, entries and files work out of the box on both networks. Encryption does not, on mainnet: every mainnet Seal operator is commercial, including Mysten's committee aggregator, which rejects unauthenticated requests. `DefaultSealAdapter.fromMorseConfig` therefore throws `ConfigurationError` on mainnet until you supply `serverConfigs`. See [Network configuration](#network-configuration).
10
+
11
+ **The contracts are unaudited.** On mainnet, SUI and WAL cost real money, there is no faucet, and a mistake is not recoverable. The publication lifecycle has been verified end to end on mainnet; the Walrus and Seal paths have not (see [Compatibility](#compatibility)). Treat mainnet as usable but young, and size your first deployment accordingly.
8
12
 
9
13
  ## Install
10
14
 
@@ -36,12 +40,13 @@ morse-sdk is built and tested against specific minor versions of its Mysten subs
36
40
 
37
41
  | morse-sdk | `@mysten/sui` | `@mysten/walrus` | `@mysten/seal` | Sui network | Verified |
38
42
  | --------- | ------------- | ---------------- | -------------- | ----------- | --------- |
43
+ | 0.5.x | 2.16.2-2.16.x | 1.1.6-1.1.x | 1.1.3-1.1.x | testnet | 2026-06-05 |
39
44
  | 0.4.x | 2.16.2-2.16.x | 1.1.6-1.1.x | 1.1.3-1.1.x | testnet | 2026-06-05 |
40
45
  | 0.1.x | 2.16.2-2.16.x | 1.1.6-1.1.x | 1.1.3-1.1.x | testnet | 2026-05-10 |
41
46
 
42
47
  Mysten ships breaking changes inside major version boundaries. Newer minors (e.g. `@mysten/walrus@1.2.x`, `@mysten/sui@2.17+`) are outside the verified ranges and may produce runtime errors; morse-sdk needs a coordinated bump and re-verification before a new Mysten minor is supported. Pin via `bun add @arcadiasystems/morse-sdk@~0.4.0` if you want patch updates without surprise minors.
43
48
 
44
- The verification protocol is documented in [`CONTRIBUTING.md`](./CONTRIBUTING.md): every Mysten dep bump runs the full `scripts/phase-N-*.ts` smoke suite against testnet before the bump lands.
49
+ The verification protocol is documented in [`CONTRIBUTING.md`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/CONTRIBUTING.md): every Mysten dep bump runs the full `scripts/phase-N-*.ts` smoke suite against testnet before the bump lands. The `Sui network` column records where that paid smoke suite actually ran, which is why it still reads `testnet` for 0.5.x even though mainnet addresses ship. `TESTED_SUBSTRATE.suiNetwork` reports the same thing programmatically.
45
50
 
46
51
  ### Runtime requirements
47
52
 
@@ -68,6 +73,9 @@ import {
68
73
  RpcPublicationReader,
69
74
  } from "@arcadiasystems/morse-sdk";
70
75
 
76
+ // The quick start uses testnet on purpose: every step below spends gas and
77
+ // WAL, and on mainnet that is real money. Switch both literals to "mainnet"
78
+ // once the flow works for you.
71
79
  const config = morseConfig({ network: "testnet" });
72
80
  const client = new SuiGrpcClient({ network: "testnet", baseUrl: config.rpcUrl });
73
81
  const keypair = Ed25519Keypair.fromSecretKey(privateKey); // Bech32 "suiprivkey1..."
@@ -121,7 +129,7 @@ const fetched = await reader.getEntry(created.publicationId, "blog", entry.entry
121
129
 
122
130
  `addEntryFromBytes` runs in **2 wallet popups** (one for `register_blob`, one for the combined `certify_blob + add_entry_to_collection` PTB) instead of the 3 popups a separate `uploadBlob` + `addEntry` would emit. See "Choosing the right entry path" below for when to prefer the lower-level split form.
123
131
 
124
- The compile-checked end-to-end version is in [`examples/quickstart.ts`](./examples/quickstart.ts).
132
+ The compile-checked end-to-end version is in [`examples/quickstart.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/quickstart.ts).
125
133
 
126
134
  ## Walrus access patterns
127
135
 
@@ -129,19 +137,48 @@ morse-sdk ships two pairs of Walrus adapters. They implement the same interfaces
129
137
 
130
138
  | Pair | Trust model | Browser CORS | Popup count for upload + addEntry | Storage cost paid by |
131
139
  | ----------------------------------------------------------------- | ---------------- | --------------- | --------------------------------- | -------------------- |
132
- | `DefaultWalrusReadAdapter` + `DefaultWalrusWriteAdapter` | Trustless (direct fanout to ~30 storage nodes) | Spotty on testnet | 2 (with `addEntryFromBytes`) or 3 (split) | Consumer wallet (WAL + gas) |
140
+ | `DefaultWalrusReadAdapter` + `DefaultWalrusWriteAdapter` | Trustless (direct fanout to every storage node) | Spotty; depends on your network | 2 (with `addEntryFromBytes`) or 3 (split) | Consumer wallet (WAL + gas) |
133
141
  | `HttpAggregatorReadAdapter` + `HttpPublisherWriteAdapter` | Operator-trusted | Reliable | 1 (`uploadBlob` is a publisher HTTP call, only `addEntry` signs) | Publisher operator (WAL); consumer (Sui gas only) |
134
142
 
135
143
  **When to pick which:**
136
144
  - **Default direct-protocol pair**: trustless reads, full control. Best for CLI smokes, server-side dapps, or browser dapps that don't hit CORS gaps. The flow-aware optimization (`addEntryFromBytes`) cuts popups from 3 to 2.
137
145
  - **HTTP pair**: reliable browser reads (one CORS-friendly endpoint instead of ~30), and a "publisher pays storage" UX where the user signs only the on-chain `addEntry`. Trade trustless reads for operator trust; use `verifyBlobIntegrity` on the read adapter for a trust-but-verify path.
138
146
 
147
+ ### When direct writes fail: the upload relay
148
+
149
+ A direct write pushes slivers to every node in the committee at once (95 on mainnet, ~100 on testnet). Networks that cannot sustain that burst fail with `NotEnoughBlobConfirmationsError` or "Unable to connect", **even when the nodes are healthy and far above write quorum**. If uploads fail for you while reads work, this is almost certainly why, and it is not a fault in your config.
150
+
151
+ `WalrusAdapterConfig` is `@mysten/walrus`'s `WalrusClientConfig`, so you can hand the client an upload relay and let it do the fanout server-side. One connection replaces ~95:
152
+
153
+ ```ts
154
+ const writer = DefaultWalrusWriteAdapter.fromConfig(
155
+ {
156
+ network: "mainnet",
157
+ suiClient,
158
+ uploadRelay: {
159
+ host: "https://upload-relay.mainnet.walrus.space",
160
+ sendTip: { max: 10_000_000 },
161
+ },
162
+ },
163
+ signer,
164
+ );
165
+ ```
166
+
167
+ Three things to know before reaching for it:
168
+
169
+ - **It costs a tip per upload**, on top of WAL and gas. Mainnet is linear in encoded size (40 MIST/KiB at the time of writing), testnet is a small constant. Query the live figure at `GET /v1/tip-config`.
170
+ - **`sendTip.max` must cover it.** Too low and `@mysten/walrus` throws `Tip amount (N) exceeds the maximum allowed tip (M)` before uploading anything.
171
+ - **The relay sees your bytes.** Same trust trade as the HTTP aggregator, so encrypt first if that matters.
172
+
173
+ The smoke scripts take `WALRUS_UPLOAD_RELAY=1` to route through the canonical relay for the selected network, which is the quickest way to tell a network problem apart from a real one.
174
+
139
175
  The HTTP adapters are NOT compatible with `addEntryFromBytes` / `addEncryptedEntryFromBytes`. Those functions require `WalrusFlowCapable` for the 2-popup combined PTB; the publisher-paid path is naturally 1-popup through standard `uploadBlob` + `addEntry`.
140
176
 
141
177
  ```ts
142
- // Default (direct, trustless, 2-3 popups)
143
- const reader = DefaultWalrusReadAdapter.fromConfig({ network: "testnet", suiClient });
144
- const writer = DefaultWalrusWriteAdapter.fromConfig({ network: "testnet", suiClient }, signer);
178
+ // Default (direct, trustless, 2-3 popups). network is "mainnet" or "testnet";
179
+ // Walrus has no localnet.
180
+ const reader = DefaultWalrusReadAdapter.fromConfig({ network: "mainnet", suiClient });
181
+ const writer = DefaultWalrusWriteAdapter.fromConfig({ network: "mainnet", suiClient }, signer);
145
182
 
146
183
  // HTTP (operator-trusted, 1 popup for upload+addEntry)
147
184
  const reader = HttpAggregatorReadAdapter.fromMorseConfig(config, suiClient);
@@ -151,7 +188,7 @@ const writer = HttpPublisherWriteAdapter.fromConfig({
151
188
  });
152
189
  ```
153
190
 
154
- The aggregator URL for testnet is baked into `morseConfig.walrusEndpoints.aggregator` (Mysten's canonical service). The publisher URL is intentionally not baked in publishers are operator-specific and consumers pick one explicitly.
191
+ The aggregator URL is baked into `morseConfig.walrusEndpoints.aggregator` for both mainnet and testnet (Mysten's canonical service for each). The publisher URL is intentionally not baked in - publishers are operator-specific and consumers pick one explicitly. Note that the publisher in the snippet above is a testnet operator; there is no mainnet equivalent the SDK will pick for you.
155
192
 
156
193
  `HttpPublisherWriteAdapter` parses Mysten's published publisher binary (camelCase JSON) and the documented OpenAPI schema (snake_case fallback). For non-standard publisher forks that serve a different shape, pass `parseResponse` to `HttpPublisherWriteAdapter.fromConfig({ ..., parseResponse })` — it receives the raw decoded JSON and returns an `UploadBlobResult`, replacing the built-in parser. Throws from the callback propagate verbatim.
157
194
 
@@ -177,17 +214,17 @@ Per-concern, compile-checked illustrative code. Each file is short, focused, and
177
214
 
178
215
  | Concern | File | Covers |
179
216
  | ------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
180
- | Setup | [`examples/setup.ts`](./examples/setup.ts) | morseConfig, gRPC client, KeypairAdapter, reader |
181
- | Quick start | [`examples/quickstart.ts`](./examples/quickstart.ts) | End-to-end happy path |
182
- | Publication lifecycle | [`examples/publication-lifecycle.ts`](./examples/publication-lifecycle.ts) | createPublication, transferOwnership, deletePublication |
183
- | Publisher cap roles | [`examples/publisher-caps.ts`](./examples/publisher-caps.ts) | issuePublisherCap, transferPublisherCap, revokePublisherCap, destroyPublisherCap |
184
- | Collections | [`examples/collections.ts`](./examples/collections.ts) | createCollection (Blob and Quilt modes), deleteCollection |
185
- | Entries (revisions, draft → publish) | [`examples/entries.ts`](./examples/entries.ts) | addEntry, appendDraftRevision, publishFromDraft, publishDirect, deleteEntry |
186
- | Encrypted entries | [`examples/encrypted-entries.ts`](./examples/encrypted-entries.ts) | buildPublisherSealId, encrypt, addEncryptedEntry, appendEncryptedDraftRevision, decrypt |
187
- | Reading | [`examples/reading.ts`](./examples/reading.ts) | getPublication, getEntry, getRevision, listEntries, scanEntries |
188
- | Browser wallet integration | [`examples/wallet-standard.ts`](./examples/wallet-standard.ts) | WalletAdapter impl against `@mysten/dapp-kit` hooks (or any wallet-standard signer) |
189
- | React + dapp-kit + Suiet | [`examples/wallet-standard-react.md`](./examples/wallet-standard-react.md) | Worked walkthrough: providers, connect button, hook, adapter wiring, Seal SessionKey |
190
- | Walrus HTTP adapters | [`examples/walrus-http-adapters.ts`](./examples/walrus-http-adapters.ts) | HttpAggregatorReadAdapter + HttpPublisherWriteAdapter (browser-friendly, operator-paid storage) |
217
+ | Setup | [`examples/setup.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/setup.ts) | morseConfig, gRPC client, KeypairAdapter, reader |
218
+ | Quick start | [`examples/quickstart.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/quickstart.ts) | End-to-end happy path |
219
+ | Publication lifecycle | [`examples/publication-lifecycle.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/publication-lifecycle.ts) | createPublication, transferOwnership, deletePublication |
220
+ | Publisher cap roles | [`examples/publisher-caps.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/publisher-caps.ts) | issuePublisherCap, transferPublisherCap, revokePublisherCap, destroyPublisherCap |
221
+ | Collections | [`examples/collections.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/collections.ts) | createCollection (Blob and Quilt modes), deleteCollection |
222
+ | Entries (revisions, draft → publish) | [`examples/entries.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/entries.ts) | addEntry, appendDraftRevision, publishFromDraft, publishDirect, deleteEntry |
223
+ | Encrypted entries | [`examples/encrypted-entries.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/encrypted-entries.ts) | buildPublisherSealId, encrypt, addEncryptedEntry, appendEncryptedDraftRevision, decrypt |
224
+ | Reading | [`examples/reading.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/reading.ts) | getPublication, getEntry, getRevision, listEntries, scanEntries |
225
+ | Browser wallet integration | [`examples/wallet-standard.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/wallet-standard.ts) | WalletAdapter impl against `@mysten/dapp-kit` hooks (or any wallet-standard signer) |
226
+ | React + dapp-kit + Suiet | [`examples/wallet-standard-react.md`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/wallet-standard-react.md) | Worked walkthrough: providers, connect button, hook, adapter wiring, Seal SessionKey |
227
+ | Walrus HTTP adapters | [`examples/walrus-http-adapters.ts`](https://github.com/arcadiasystems/morse-dcms/blob/main/morse-sdk/examples/walrus-http-adapters.ts) | HttpAggregatorReadAdapter + HttpPublisherWriteAdapter (browser-friendly, operator-paid storage) |
191
228
 
192
229
  ## API reference
193
230
 
@@ -197,8 +234,8 @@ The full public surface, grouped by concern. Every export carries a JSDoc on its
197
234
 
198
235
  | Export | Purpose |
199
236
  | --- | --- |
200
- | `morseConfig({ network })` | Build a `NetworkConfig` for testnet (canonical addresses baked in) or supply override fields for forks / local nodes. |
201
- | `Network` | Const enum-like: `"mainnet" \| "testnet" \| "localnet"`. Mainnet currently throws `ConfigurationError` (gates v1.0.0). |
237
+ | `morseConfig({ network })` | Build a `NetworkConfig` for mainnet or testnet (canonical addresses baked in), or supply override fields for forks / local nodes. |
238
+ | `Network` | Const enum-like: `"mainnet" \| "testnet" \| "localnet"`. Mainnet and testnet resolve to canonical deployments; localnet throws `ConfigurationError` unless you pass `packageId` and `registryId`. |
202
239
  | `DEFAULT_RPC_URLS` | Public Sui fullnode URLs per network. Read-only. |
203
240
  | `TESTED_SUBSTRATE` | Mysten substrate versions verified end-to-end. Diagnostic constant. |
204
241
 
@@ -248,7 +285,8 @@ The full public surface, grouped by concern. Every export carries a JSDoc on its
248
285
  | `DefaultWalrusReadAdapter.fromConfig(config)` | Walrus reads (`readBlob`, `readBlobByObjectId`, `readQuiltPatch`, `readBlobRef`). |
249
286
  | `HttpPublisherWriteAdapter.fromConfig({ publisherUrl, ownerAddress })` | Walrus uploads via a publisher HTTP service (operator pays storage; 1 popup for upload + addEntry). |
250
287
  | `HttpAggregatorReadAdapter.fromMorseConfig(config, suiClient)` / `.fromConfig({ aggregatorUrl, suiClient })` | Walrus reads via a single CORS-friendly aggregator endpoint instead of fanout to ~30 storage nodes. |
251
- | `DefaultSealAdapter.fromMorseConfig(config, options, suiClient)` | Threshold encryption / decryption. Defaults canonical testnet key servers. |
288
+ | `DefaultSealAdapter.fromMorseConfig(config, options, suiClient)` | Threshold encryption / decryption. Defaults to the network's canonical key servers: two independent servers on testnet, none on mainnet (throws `ConfigurationError`; pass `serverConfigs`). |
289
+ | `MAINNET_SEAL_COMMITTEE` | Mysten's mainnet Seal committee as a ready-made `sealKeyServers` value. Requires the `apiKeyName` / `apiKey` Mysten issues you; not a default. |
252
290
  | `WalletAdapter` / `WalrusWriteAdapter` / `WalrusReadAdapter` / `SealAdapter` | Interfaces for substituting custom implementations. |
253
291
  | `WalrusFlowCapable` / `isWalrusFlowCapable` | Optional capability for the 2-popup `addEntryFromBytes` path. |
254
292
 
@@ -426,13 +464,33 @@ Copy uses the protocol's own terminology ("publication", "entry", "PublisherCap"
426
464
  ## Network configuration
427
465
 
428
466
  ```ts
429
- const config = morseConfig({ network: "testnet" });
467
+ const config = morseConfig({ network: "mainnet" }); // or "testnet"
430
468
  // {
431
- // network, rpcUrl, packageId, originalPackageId, registryId,
432
- // sealKeyServers: [{ objectId, weight }, ...] // canonical testnet allowlist
469
+ // network, rpcUrl, packageId, originalPackageId,
470
+ // recipientFileEventOriginPackageId, registryId,
471
+ // sealKeyServers: [...], // canonical allowlist for the network
472
+ // walrusEndpoints: { aggregator }
433
473
  // }
434
474
  ```
435
475
 
476
+ The two networks differ in their Seal allowlist, and the difference is not cosmetic:
477
+
478
+ - **testnet** pins two independent Mysten key servers, so the default threshold is 2 of 2.
479
+ - **mainnet** pins nothing, and `DefaultSealAdapter.fromMorseConfig` throws `ConfigurationError` until you supply servers. There is no free open operator on mainnet: the independent ones are commercial and issue per-consumer API keys, and Mysten's committee aggregator answers `401 No API key found in request` to unauthenticated callers.
480
+
481
+ This is a hard failure on purpose. Seal reads key-server public keys from chain but fetches key shares from the operator, so an unusable operator still lets `encrypt` succeed and fails only at `decrypt`. Defaulting to one would let you encrypt, pay to store the ciphertext on Walrus, and discover later that it cannot be read. Once you have credentials, `MAINNET_SEAL_COMMITTEE` is the committee in the right shape:
482
+
483
+ ```ts
484
+ const config = morseConfig({
485
+ network: "mainnet",
486
+ sealKeyServers: MAINNET_SEAL_COMMITTEE.map((s) => ({
487
+ ...s,
488
+ apiKeyName: "x-api-key",
489
+ apiKey: process.env.SEAL_API_KEY,
490
+ })),
491
+ });
492
+ ```
493
+
436
494
  Override individual fields for forks or local nodes:
437
495
 
438
496
  ```ts
@@ -448,18 +506,18 @@ const config = morseConfig({
448
506
 
449
507
  ## Known limitations
450
508
 
451
- - **Testnet only at v0.x**. Mainnet config lands once the contracts are frozen.
509
+ - **Unaudited contracts**. The Move package has not been audited. This is the main reason to be conservative about what you put on mainnet.
452
510
  - **No encrypted publish path**. The Move contract hardcodes `encrypted=false` on `publish_from_draft` and `publish_direct`. Encrypted content stays as drafts.
453
511
  - **`Subscription` access policy is reserved**, not enforced.
454
512
  - **`listEntries` ordering is dynamic-field object-store order**, not chronological. Sort by `entry.id` for insertion order.
455
- - **Walrus testnet flakiness**. `NotEnoughBlobConfirmationsError` from the underlying client is environmental; rerun. The SDK preserves the original error as the `cause` (use `instanceof` for narrowing Walrus error classes don't set `.name`). Browser consumers may additionally see `NoBlobMetadataReceivedError` on reads from testnet due to CORS gaps on a subset of Walrus storage nodes; the CLI smoke scripts hit the full node pool and are more reliable for verification.
456
- - **Walrus uploads need WAL, not just SUI**. Get testnet SUI from the [Sui faucet](https://faucet.sui.io/), then swap some for WAL at [stake-wal.wal.app](https://stake-wal.wal.app/?network=testnet). Uploads error with `Insufficient balance of ::wal::WAL` if you skip this.
457
- - **Walrus storage is epoch-funded, not permanent**. Blobs persist for the epochs you pay for (a testnet epoch is roughly a day) and expire afterwards unless renewed; Walrus testnet is also periodically wiped. The on-chain revision history is immutable, but treat testnet payloads as disposable.
513
+ - **Walrus flakiness**. `NotEnoughBlobConfirmationsError` from the underlying client is environmental; rerun. The SDK preserves the original error as the `cause` (use `instanceof` for narrowing - Walrus error classes don't set `.name`). Browser consumers may additionally see `NoBlobMetadataReceivedError` on reads from testnet due to CORS gaps on a subset of Walrus storage nodes; `HttpAggregatorReadAdapter` exists to route around that. Mainnet node CORS coverage has not been measured by this project, so browser fanout reads there are unproven rather than known-good.
514
+ - **Walrus uploads need WAL, not just SUI**. Uploads error with `Insufficient balance of ::wal::WAL` if you skip this. On testnet, get SUI from the [Sui faucet](https://faucet.sui.io/) and swap some for WAL at [stake-wal.wal.app](https://stake-wal.wal.app/?network=testnet). On mainnet there is no faucet: both SUI and WAL have to be acquired, and every upload spends real value.
515
+ - **Walrus storage is epoch-funded, not permanent**. Blobs persist for the epochs you pay for and expire afterwards unless renewed, on both networks. Epoch length differs (a testnet epoch is roughly a day; mainnet epochs are much longer), so the same `epochs` argument buys very different durations. Walrus testnet is additionally wiped periodically, so treat testnet payloads as disposable; mainnet blobs are not wiped but still lapse if you let storage expire. The on-chain revision history is immutable either way.
458
516
  - **gRPC client only**. The reader and adapter interfaces are typed against `Pick<SuiGrpcClient, ...>` from `@mysten/sui/grpc`. `SuiJsonRpcClient` from `@mysten/sui/jsonRpc` has differently-named methods (`getDynamicFields` vs `listDynamicFields`, etc.) and is not yet a drop-in alternative. JSON-RPC fallback is planned; for now, environments that block gRPC need to proxy or use a gRPC-compatible RPC endpoint.
459
517
 
460
518
  ## Smoke scripts
461
519
 
462
- The `scripts/` directory has end-to-end testnet smokes that cost real WAL and SUI. They're the canonical "this works against the live deployment" checks:
520
+ The `scripts/` directory has end-to-end smokes that cost real WAL and SUI. They're the canonical "this works against the live deployment" checks. All of them are hardcoded to testnet via `scripts/_shared.ts`; running them against mainnet would spend real value and is not wired up.
463
521
 
464
522
  | Script | Exercises |
465
523
  | ------------------------- | -------------------------------------------------- |
@@ -473,7 +531,17 @@ The `scripts/` directory has end-to-end testnet smokes that cost real WAL and SU
473
531
  | `phase-6-blob-http.ts` | HTTP publisher upload + aggregator read; skips when `WALRUS_PUBLISHER_URL` unset |
474
532
  | `phase-7-encrypted-http.ts` | HTTP variant of phase-7; skips when `WALRUS_PUBLISHER_URL` unset |
475
533
 
476
- Each requires `PRIVATE_KEY` (Bech32 `suiprivkey1...`) on an address with testnet SUI; phase-5 onward also needs WAL on the same address. Phase-7 picks up Seal key servers from `morseConfig.sealKeyServers` (canonical testnet allowlist baked in) by default pass `SEAL_KEY_SERVERS` only if you want to override with a custom set.
534
+ Each requires `PRIVATE_KEY` (Bech32 `suiprivkey1...`) on a funded address; phase-5 onward also needs WAL on the same address. Phase-7 picks up Seal key servers from `morseConfig.sealKeyServers` by default - pass `SEAL_KEY_SERVERS` only if you want to override with a custom set.
535
+
536
+ `WALRUS_UPLOAD_RELAY=1` routes the Walrus uploads through the canonical relay for the selected network instead of the direct fanout (see [When direct writes fail](#when-direct-writes-fail-the-upload-relay)). Set it to an explicit base URL to use a different relay. Phases 5 onward fail on networks that cannot open ~95 simultaneous connections; this is the switch that tells that apart from a real defect.
537
+
538
+ `MORSE_NETWORK` selects the target network and defaults to `testnet`. Only `mainnet` and `testnet` are accepted, since Walrus has no localnet. Running against mainnet additionally requires `MORSE_ALLOW_MAINNET=1`:
539
+
540
+ ```sh
541
+ MORSE_NETWORK=mainnet MORSE_ALLOW_MAINNET=1 bun run scripts/phase-2-publication.ts
542
+ ```
543
+
544
+ The second variable is not redundant. These scripts create and delete real publications, collections, entries and Walrus blobs, which on mainnet costs real SUI and WAL. Requiring two variables means an inherited `MORSE_NETWORK` from another shell cannot quietly spend money. Every script derives its Walrus and Sui clients from the same resolved network, so a mainnet Sui client can never pair with a testnet Walrus client.
477
545
 
478
546
  ## Development
479
547
 
package/dist/config.d.ts CHANGED
@@ -59,16 +59,28 @@ export interface NetworkConfig {
59
59
  /**
60
60
  * Canonical Seal threshold-encryption key servers for the network. Used by
61
61
  * `DefaultSealAdapter.fromMorseConfig` when the consumer omits an explicit
62
- * `serverConfigs`. Empty for networks where the allowlist isn't pinned yet
63
- * (e.g. mainnet pre-freeze).
62
+ * `serverConfigs`. Empty for networks with no pinned allowlist (localnet,
63
+ * custom deployments), which makes the encrypted paths throw
64
+ * `ConfigurationError` until the consumer supplies `serverConfigs`.
65
+ *
66
+ * Empty on mainnet by design: every mainnet operator is commercial, so
67
+ * there is nothing to default to. Supply `serverConfigs` yourself, or start
68
+ * from `MAINNET_SEAL_COMMITTEE` and add the credentials it documents.
69
+ *
70
+ * Entries are `@mysten/seal` `KeyServerConfig` objects and are passed
71
+ * through untouched. Seal distinguishes two server types and enforces the
72
+ * distinction at client construction: a committee-mode server REQUIRES
73
+ * `aggregatorUrl`, an independent server must NOT have it. Getting this
74
+ * wrong surfaces as `InvalidClientOptionsError` at runtime, not at compile
75
+ * time, so `config.test.ts` guards both directions.
64
76
  */
65
77
  readonly sealKeyServers: readonly KeyServerConfig[];
66
78
  /**
67
79
  * Canonical Walrus HTTP endpoints for the network. Used by
68
80
  * `HttpAggregatorReadAdapter.fromMorseConfig` (and the future publisher
69
81
  * equivalent when a "canonical" publisher exists). Aggregator is pinned
70
- * to Mysten's testnet service; publisher is intentionally left
71
- * undefined pass `walrusEndpoints.publisher` to override.
82
+ * to Mysten's service for the network; publisher is intentionally left
83
+ * undefined - pass `walrusEndpoints.publisher` to override.
72
84
  */
73
85
  readonly walrusEndpoints: WalrusEndpoints;
74
86
  }
@@ -88,6 +100,30 @@ export type MorsePackageConfig = Pick<NetworkConfig, "packageId" | "originalPack
88
100
  * a fresh deployment with no upgrades).
89
101
  */
90
102
  export type MorseRecipientFileConfig = MorsePackageConfig & Pick<NetworkConfig, "recipientFileEventOriginPackageId">;
103
+ /**
104
+ * Mysten's decentralized Seal committee on mainnet, as a ready-made
105
+ * `sealKeyServers` value. NOT a default: the aggregator is a credentialed
106
+ * service that answers 401 to unauthenticated requests, so this only works
107
+ * once you add the `apiKeyName` and `apiKey` Mysten issues you.
108
+ *
109
+ * Committee mode is one logical server fronting 8 operators with an internal
110
+ * 5-of-8 quorum, which is why `aggregatorUrl` is required (Seal throws
111
+ * `InvalidClientOptionsError` without it) and why a single entry of weight 1
112
+ * is the correct shape. `DefaultSealAdapter.fromMorseConfig` then resolves
113
+ * threshold to 1; the real quorum lives behind the aggregator and is not
114
+ * something this SDK can express as a share count.
115
+ *
116
+ * @example
117
+ * const config = morseConfig({
118
+ * network: "mainnet",
119
+ * sealKeyServers: MAINNET_SEAL_COMMITTEE.map((s) => ({
120
+ * ...s,
121
+ * apiKeyName: "x-api-key",
122
+ * apiKey: process.env.SEAL_API_KEY,
123
+ * })),
124
+ * });
125
+ */
126
+ export declare const MAINNET_SEAL_COMMITTEE: readonly KeyServerConfig[];
91
127
  /**
92
128
  * Options for `morseConfig`. `network` is required; address fields are
93
129
  * optional and override the canonical deployment when supplied. Use them
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAIpD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxD,8BAA8B;AAC9B,eAAO,MAAM,OAAO;;;;CAIV,CAAC;AACX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;AAI7D,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAI9D,CAAC;AAIF;;;;;;;;;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IACpD;;;;;;OAMG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;CAC1C;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACpC,aAAa,EACb,WAAW,GAAG,mBAAmB,CACjC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GACxD,IAAI,CAAC,aAAa,EAAE,mCAAmC,CAAC,CAAC;AAI1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAO5D,CAAC;AA0GF;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC;IACvC,QAAQ,CAAC,iCAAiC,CAAC,EAAE,SAAS,CAAC;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrD,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;CAC3C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,aAAa,CA6BtE"}
package/dist/config.js CHANGED
@@ -20,11 +20,71 @@ export const DEFAULT_RPC_URLS = {
20
20
  };
21
21
  // morseConfig factory
22
22
  /**
23
- * Canonical Morse deployment addresses per network. Updated on every contract
24
- * redeploy during active development; expected to stabilize after Phase 7
25
- * when the contracts are frozen for v0.1.0.
23
+ * Mysten's decentralized Seal committee on mainnet, as a ready-made
24
+ * `sealKeyServers` value. NOT a default: the aggregator is a credentialed
25
+ * service that answers 401 to unauthenticated requests, so this only works
26
+ * once you add the `apiKeyName` and `apiKey` Mysten issues you.
27
+ *
28
+ * Committee mode is one logical server fronting 8 operators with an internal
29
+ * 5-of-8 quorum, which is why `aggregatorUrl` is required (Seal throws
30
+ * `InvalidClientOptionsError` without it) and why a single entry of weight 1
31
+ * is the correct shape. `DefaultSealAdapter.fromMorseConfig` then resolves
32
+ * threshold to 1; the real quorum lives behind the aggregator and is not
33
+ * something this SDK can express as a share count.
34
+ *
35
+ * @example
36
+ * const config = morseConfig({
37
+ * network: "mainnet",
38
+ * sealKeyServers: MAINNET_SEAL_COMMITTEE.map((s) => ({
39
+ * ...s,
40
+ * apiKeyName: "x-api-key",
41
+ * apiKey: process.env.SEAL_API_KEY,
42
+ * })),
43
+ * });
44
+ */
45
+ export const MAINNET_SEAL_COMMITTEE = [
46
+ {
47
+ objectId: "0x686098f1439237fff9f36b99c7329683c22979d2005c2465cb891acb012a7595",
48
+ weight: 1,
49
+ aggregatorUrl: "https://seal-aggregator-mainnet.mystenlabs.com",
50
+ },
51
+ ];
52
+ /**
53
+ * Canonical Morse deployment addresses per network. Mirrors
54
+ * `morse-contracts/Published.toml`; update on every contract publish or
55
+ * upgrade. Networks absent from this map require explicit `packageId` and
56
+ * `registryId` overrides.
26
57
  */
27
58
  const KNOWN_DEPLOYMENTS = {
59
+ mainnet: {
60
+ // Published 2026-09-09, tx HmiywHYifmrNLMvY2oT8cP5W9hpQc2wFTJAaaQoM8mLY.
61
+ // A fresh v1 publish with no upgrades, so published-at, original-id, and
62
+ // the recipient_file type origin are all the same address. They are
63
+ // spelled out separately rather than aliased because the FIRST upgrade
64
+ // splits them: packageId moves, the other two stay here. See the testnet
65
+ // entry below for what that divergence looks like in practice.
66
+ packageId: toPackageId("0x4fc7af5d1e19f96e5fab4e677948214eec35e238b252a106c7d5036dcebdcae2"),
67
+ originalPackageId: toPackageId("0x4fc7af5d1e19f96e5fab4e677948214eec35e238b252a106c7d5036dcebdcae2"),
68
+ recipientFileEventOriginPackageId: toPackageId("0x4fc7af5d1e19f96e5fab4e677948214eec35e238b252a106c7d5036dcebdcae2"),
69
+ // Shared PublicationRegistry created by the publish tx's init.
70
+ registryId: toRegistryId("0x8d8b23c7acd7c1b260c793f2c648c5be8eb06db7c107b9f06ca3f39b700868ea"),
71
+ // Deliberately empty: mainnet has no key servers this SDK can default to.
72
+ // Every operator is commercial, including Mysten's committee aggregator,
73
+ // which answers 401 "No API key found in request" on every endpoint.
74
+ //
75
+ // 0.5.0 shipped the committee here and it was actively harmful. Seal
76
+ // reads key-server public keys from chain but fetches key SHARES from the
77
+ // aggregator, so encryption succeeded and only decryption 401'd: a
78
+ // consumer could encrypt, pay to store the ciphertext on Walrus, and then
79
+ // find it permanently unreadable. Failing at construction instead is the
80
+ // whole point. See `MAINNET_SEAL_COMMITTEE` to opt in with credentials.
81
+ sealKeyServers: [],
82
+ // Canonical Mysten-run Walrus mainnet aggregator. Publisher is left
83
+ // undefined for the same reason as testnet: no single canonical operator.
84
+ walrusEndpoints: {
85
+ aggregator: "https://aggregator.walrus-mainnet.walrus.space",
86
+ },
87
+ },
28
88
  testnet: {
29
89
  // Updated 2026-06-04 for v4 upgrade (recipient_file::new_recipient_file_with_seal_prefix
30
90
  // + seal_approve_with_prefix added; legacy file/allowlist modules unused).
@@ -55,7 +115,7 @@ const KNOWN_DEPLOYMENTS = {
55
115
  // `HttpAggregatorReadAdapter.fromMorseConfig` for browser dapps that
56
116
  // need a single CORS-friendly endpoint instead of the direct-protocol
57
117
  // shard fanout (which has incomplete CORS coverage on testnet).
58
- // Publisher is intentionally undefined there is no single canonical
118
+ // Publisher is intentionally undefined - there is no single canonical
59
119
  // testnet publisher; consumers wire their own (Nami, self-hosted, etc).
60
120
  walrusEndpoints: {
61
121
  aggregator: "https://aggregator.walrus-testnet.walrus.space",
@@ -76,9 +136,6 @@ export function morseConfig(options) {
76
136
  deployment?.recipientFileEventOriginPackageId;
77
137
  const registryId = options.registryId ?? deployment?.registryId;
78
138
  if (!packageId || !registryId) {
79
- if (options.network === "mainnet") {
80
- throw new ConfigurationError("Morse is not yet deployed on mainnet. Use { network: 'testnet' } or supply packageId, originalPackageId, and registryId for a custom deployment.");
81
- }
82
139
  throw new ConfigurationError(`No canonical Morse deployment for network "${options.network}". Supply packageId, originalPackageId, and registryId for a custom deployment.`);
83
140
  }
84
141
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,UAAU;AAEV,8BAA8B;AAC9B,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACX,CAAC;AAGX,wBAAwB;AAExB,2FAA2F;AAC3F,MAAM,CAAC,MAAM,gBAAgB,GAAsC;IAClE,OAAO,EAAE,qCAAqC;IAC9C,OAAO,EAAE,qCAAqC;IAC9C,QAAQ,EAAE,uBAAuB;CACjC,CAAC;AAuFF,sBAAsB;AAEtB;;;;GAIG;AACH,MAAM,iBAAiB,GAYnB;IACH,OAAO,EAAE;QACR,yFAAyF;QACzF,2EAA2E;QAC3E,oEAAoE;QACpE,sEAAsE;QACtE,SAAS,EAAE,WAAW,CACrB,oEAAoE,CACpE;QACD,iBAAiB,EAAE,WAAW,CAC7B,oEAAoE,CACpE;QACD,kEAAkE;QAClE,iEAAiE;QACjE,iDAAiD;QACjD,iCAAiC,EAAE,WAAW,CAC7C,oEAAoE,CACpE;QACD,UAAU,EAAE,YAAY,CACvB,oEAAoE,CACpE;QACD,wEAAwE;QACxE,2BAA2B;QAC3B,8FAA8F;QAC9F,mDAAmD;QACnD,cAAc,EAAE;YACf;gBACC,QAAQ,EACP,oEAAoE;gBACrE,MAAM,EAAE,CAAC;aACT;YACD;gBACC,QAAQ,EACP,oEAAoE;gBACr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AO,CAAC,iCAAiC;QACzC,UAAU,EAAE,iCAAiC,CAAC;IAC/C,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,UAAU,EAAE,UAAU,CAAC;IAEhE,IAAI,CAAC,SAAS,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,IAAI,kBAAkB,CAC3B,8CAA8C,OAAO,CAAC,OAAO,iFAAiF,CAC9I,CAAC;IACH,CAAC;IAED,OAAO;QACN,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC;QAC3D,SAAS;QACT,UAAU;QACV,GAAG,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC;QACjE,GAAG,CAAC,iCAAiC,KAAK,SAAS;YAClD,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,EAAE,iCAAiC,EAAE,CAAC;QACzC,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,UAAU,EAAE,cAAc,IAAI,EAAE;QAC1E,eAAe,EAAE,OAAO,CAAC,eAAe;YACvC,UAAU,EAAE,eAAe,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE;KAClD,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  export type { ObjectReader, TransactionExecutor } from "./clients.js";
5
5
  export { accessPolicyFromU8, accessPolicyToU8, storageModeFromU8, storageModeToU8, toBlobObjectId, toOwnerCapId, toPackageId, toPublicationId, toPublisherCapId, toQuiltPatchId, toRecipientFileId, toRegistryId, toSuiAddress, toSuiObjectId, toWalrusBlobId, } from "./codecs.js";
6
6
  export { TESTED_SUBSTRATE } from "./compatibility.js";
7
- export { DEFAULT_RPC_URLS, type MorseConfigOptions, type MorsePackageConfig, type MorseRecipientFileConfig, morseConfig, Network, type NetworkConfig, type WalrusEndpoints, } from "./config.js";
7
+ export { DEFAULT_RPC_URLS, MAINNET_SEAL_COMMITTEE, type MorseConfigOptions, type MorsePackageConfig, type MorseRecipientFileConfig, morseConfig, Network, type NetworkConfig, type WalrusEndpoints, } from "./config.js";
8
8
  export { type FormattedError, formatUserMessage, } from "./errors.format.js";
9
9
  export { ABORT_CODES, type AbortEntry, type AbortModule, ConfigurationError, ContractAbortError, MorseError, NotFoundError, type NotFoundResource, SealError, type SealErrorCode, TransportError, UNKNOWN_ABORT_NAME, UnauthorizedError, UncertifiedBlobError, type UnsupportedWalletSchemeCode, UnsupportedWalletSchemeError, ValidationError, } from "./errors.js";
10
10
  export { type AddEncryptedEntryArgs, type AddEncryptedEntryFromBytesArgs, type AddEntryArgs, type AddEntryFromBytesArgs, type AddEntryFromBytesResult, type AddEntryResult, type AddRecipientArgs, type AppendDraftRevisionArgs, type AppendEncryptedDraftRevisionArgs, addEncryptedEntry, addEncryptedEntryFromBytes, addEntry, addEntryFromBytes, addRecipient, appendDraftRevision, appendEncryptedDraftRevision, type CreateCollectionArgs, type CreateCollectionResult, type CreateEncryptedRecipientFileArgs, type CreatePublicationArgs, type CreatePublicationResult, type CreateRecipientFileArgs, type CreateRecipientFileResult, createCollection, createEncryptedRecipientFile, createPublication, createRecipientFile, type DeleteCollectionArgs, type DeleteCollectionResult, type DeleteEntryArgs, type DeleteEntryResult, type DeletePublicationArgs, type DeletePublicationResult, type DeleteRecipientFileArgs, type DestroyPublisherCapArgs, type DestroyPublisherCapResult, deleteCollection, deleteEntry, deletePublication, deleteRecipientFile, destroyPublisherCap, type FileUploadProgressCallback, type FileUploadProgressEvent, type IssuePublisherCapArgs, type IssuePublisherCapResult, issuePublisherCap, type ProgressCallback, type ProgressEvent, type PublicationConfig, type PublishDirectArgs, type PublishFromDraftArgs, publishDirect, publishFromDraft, type RecipientFileOpResult, type RemoveRecipientArgs, type RevisionAppendResult, type RevokePublisherCapArgs, type RevokePublisherCapResult, removeRecipient, revokePublisherCap, type TransferOwnershipArgs, type TransferOwnershipResult, type TransferPublisherCapArgs, type TransferPublisherCapResult, type TransferRecipientFileOwnershipArgs, transferOwnership, transferPublisherCap, transferRecipientFileOwnership, type UpdateRecipientFileMetadataArgs, type UploadEncryptedRecipientFileArgs, type UploadEncryptedRecipientFileResult, type UploadRecipientFileArgs, type UploadRecipientFileResult, updateRecipientFileMetadata, uploadEncryptedRecipientFileFromBytes, uploadRecipientFileFromBytes, } from "./ops/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACN,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,WAAW,EACX,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,cAAc,EACnB,iBAAiB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,KAAK,gBAAgB,EACrB,SAAS,EACT,KAAK,aAAa,EAClB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,eAAe,GACf,MAAM,aAAa,CAAC;A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B,EAC1B,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,GAChC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,KAAK,gCAAgC,EACrC,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,gCAAgC,EACrC,yBAAyB,EACzB,KAAK,gCAAgC,EACrC,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,GACvB,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export { accessPolicyFromU8, accessPolicyToU8, storageModeFromU8, storageModeToU8, toBlobObjectId, toOwnerCapId, toPackageId, toPublicationId, toPublisherCapId, toQuiltPatchId, toRecipientFileId, toRegistryId, toSuiAddress, toSuiObjectId, toWalrusBlobId, } from "./codecs.js";
5
5
  export { TESTED_SUBSTRATE } from "./compatibility.js";
6
- export { DEFAULT_RPC_URLS, morseConfig, Network, } from "./config.js";
6
+ export { DEFAULT_RPC_URLS, MAINNET_SEAL_COMMITTEE, morseConfig, Network, } from "./config.js";
7
7
  export { formatUserMessage, } from "./errors.format.js";
8
8
  export { ABORT_CODES, ConfigurationError, ContractAbortError, MorseError, NotFoundError, SealError, TransportError, UNKNOWN_ABORT_NAME, UnauthorizedError, UncertifiedBlobError, UnsupportedWalletSchemeError, ValidationError, } from "./errors.js";
9
9
  export { addEncryptedEntry, addEncryptedEntryFromBytes, addEntry, addEntryFromBytes, addRecipient, appendDraftRevision, appendEncryptedDraftRevision, createCollection, createEncryptedRecipientFile, createPublication, createRecipientFile, deleteCollection, deleteEntry, deletePublication, deleteRecipientFile, destroyPublisherCap, issuePublisherCap, publishDirect, publishFromDraft, removeRecipient, revokePublisherCap, transferOwnership, transferPublisherCap, transferRecipientFileOwnership, updateRecipientFileMetadata, uploadEncryptedRecipientFileFromBytes, uploadRecipientFileFromBytes, } from "./ops/index.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EACN,gBAAgB,EAIhB,WAAW,EACX,OAAO,GAGP,MAAM,aAAa,CAAC;AACrB,OAAO,EAEN,iBAAiB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,WAAW,EAGX,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,aAAa,EAEb,SAAS,EAET,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EAEpB,4BAA4B,EAC5B,eAAe,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAUN,iBAAiB,EACjB,0BAA0B,EAC1B,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,EACnB,4BAA4B,EAQ5B,gBAAgB,EAChB,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EAUnB,gBAAgB,EA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kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EAEzB,yBAAyB,EAEzB,mBAAmB,EAInB,sBAAsB,EACtB,oBAAoB,GAepB,MAAM,mBAAmB,CAAC"}
@@ -69,8 +69,8 @@ export declare class DefaultSealAdapter implements SealAdapter {
69
69
  /**
70
70
  * Build an adapter from a morse package config (typically
71
71
  * `morseConfig({ network })`). Defaults `serverConfigs` from
72
- * `morseConfig.sealKeyServers` (the canonical testnet allowlist baked
73
- * into morse-sdk) when omitted; defaults `threshold` to
72
+ * `morseConfig.sealKeyServers` (the canonical allowlist baked into
73
+ * morse-sdk for the network) when omitted; defaults `threshold` to
74
74
  * `min(2, serverConfigs.length)` when omitted. Picks
75
75
  * `originalPackageId ?? packageId` internally; passing a post-upgrade
76
76
  * `packageId` directly would silently produce ciphertexts that become
@@ -80,9 +80,18 @@ export declare class DefaultSealAdapter implements SealAdapter {
80
80
  * want a custom set (paid plans, alternate trust assumptions, region
81
81
  * pinning), or `threshold` when you want a non-default TSS shape.
82
82
  *
83
+ * On the default threshold with a committee-mode server (one entry, as in
84
+ * `MAINNET_SEAL_COMMITTEE`): `min(2, 1)` resolves to 1. That is correct and
85
+ * not a weakened policy - a committee server is one endpoint fronting 8
86
+ * operators with its own internal quorum, which Seal enforces behind the
87
+ * aggregator and this SDK cannot express as a share count. Do not "fix"
88
+ * this by forcing a higher threshold; `fromConfig` would reject it, since
89
+ * threshold must be <= `serverConfigs.length`.
90
+ *
83
91
  * @throws {ConfigurationError} If neither `seal.serverConfigs` nor
84
- * `morseConfig.sealKeyServers` provide any servers (e.g. mainnet
85
- * pre-freeze).
92
+ * `morseConfig.sealKeyServers` provide any servers. This is the mainnet
93
+ * default: no mainnet operator is free, so nothing is pinned and the
94
+ * consumer must supply servers. Also localnet and custom deployments.
86
95
  */
87
96
  static fromMorseConfig(morseConfig: {
88
97
  packageId: PackageId;
@@ -1 +1 @@
1
- {"version":3,"file":"default-adapter.d.ts","sourceRoot":"","sources":["../../src/seal/default-ad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AC;YAsBR,uBAAuB;YA6BvB,gCAAgC;CA0B9C"}
@@ -27,8 +27,8 @@ export class DefaultSealAdapter {
27
27
  /**
28
28
  * Build an adapter from a morse package config (typically
29
29
  * `morseConfig({ network })`). Defaults `serverConfigs` from
30
- * `morseConfig.sealKeyServers` (the canonical testnet allowlist baked
31
- * into morse-sdk) when omitted; defaults `threshold` to
30
+ * `morseConfig.sealKeyServers` (the canonical allowlist baked into
31
+ * morse-sdk for the network) when omitted; defaults `threshold` to
32
32
  * `min(2, serverConfigs.length)` when omitted. Picks
33
33
  * `originalPackageId ?? packageId` internally; passing a post-upgrade
34
34
  * `packageId` directly would silently produce ciphertexts that become
@@ -38,14 +38,23 @@ export class DefaultSealAdapter {
38
38
  * want a custom set (paid plans, alternate trust assumptions, region
39
39
  * pinning), or `threshold` when you want a non-default TSS shape.
40
40
  *
41
+ * On the default threshold with a committee-mode server (one entry, as in
42
+ * `MAINNET_SEAL_COMMITTEE`): `min(2, 1)` resolves to 1. That is correct and
43
+ * not a weakened policy - a committee server is one endpoint fronting 8
44
+ * operators with its own internal quorum, which Seal enforces behind the
45
+ * aggregator and this SDK cannot express as a share count. Do not "fix"
46
+ * this by forcing a higher threshold; `fromConfig` would reject it, since
47
+ * threshold must be <= `serverConfigs.length`.
48
+ *
41
49
  * @throws {ConfigurationError} If neither `seal.serverConfigs` nor
42
- * `morseConfig.sealKeyServers` provide any servers (e.g. mainnet
43
- * pre-freeze).
50
+ * `morseConfig.sealKeyServers` provide any servers. This is the mainnet
51
+ * default: no mainnet operator is free, so nothing is pinned and the
52
+ * consumer must supply servers. Also localnet and custom deployments.
44
53
  */
45
54
  static fromMorseConfig(morseConfig, seal, suiClient) {
46
55
  const serverConfigs = seal.serverConfigs ?? morseConfig.sealKeyServers ?? [];
47
56
  if (serverConfigs.length === 0) {
48
- throw new ConfigurationError("morseConfig has no canonical Seal key servers for this network and no override was supplied. Pass seal.serverConfigs explicitly, or use a network where the allowlist is pinned.");
57
+ throw new ConfigurationError("morseConfig has no canonical Seal key servers for this network and no override was supplied. Testnet pins an open allowlist; mainnet does not, because every mainnet Seal operator is commercial. Pass seal.serverConfigs explicitly, or start from the exported MAINNET_SEAL_COMMITTEE and add the apiKeyName and apiKey your operator issues.");
49
58
  }
50
59
  const threshold = seal.threshold ?? Math.min(2, serverConfigs.length);
51
60
  return DefaultSealAdapter.fromConfig({
@@ -1 +1 @@
1
- {"version":3,"file":"default-adapter.js","sourceRoot":"","sources":["../../src/seal/default-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EAEtB,aAAa,EACb,UAAU,EAGV,kCAAkC,GAClC,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AAetB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAmDtD,6DAA6D;AAC7D,MAAM,OAAO,kBAAkB;IACb,MAAM,CAAiB;IACvB,SAAS,CAAuB;IAChC,SAAS,CAAY;IACrB,eAAe,CAAY;IAC3B,SAAS,CAAS;IAEnC,YAAY,OAAkC;QAC7C,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;QAC/C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,eAAe,CACrB,WAIC,EACD,IAAmD,EACnD,SAA+B;QAE/B,MAAM,aAAa,GAClB,IAAI,CAAC,aAAa,IAAI,WAAW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E;YACnE,KAAK;SACL,CAAC,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,YAAY,kCAAkC,EAAE,CAAC;QACzD,OAAO,IAAI,SAAS,CACnB,cAAc,EACd,6CAA6C,EAC7C,EAAE,KAAK,EAAE,CACT,CAAC;IACH,CAAC;IACD,IACC,KAAK,YAAY,eAAe;QAChC,KAAK,YAAY,sBAAsB,EACtC,CAAC;QACF,OAAO,IAAI,SAAS,CACnB,gBAAgB,EAChB,2BAA2B,KAAK,CAAC,OAAO,EAAE,EAC1C,EAAE,KAAK,EAAE,CACT,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC5B,OAAO,qBAAqB,KAAK,CAAC,OAAO,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAED,SAAS,UAAU,CAAC,KAAiB;IACpC,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
1
+ {"version":3,"file":"default-adapter.js","sourceRoot":"","sources":["../../src/seal/default-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACN,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EAEtB,aAAa,EACb,UAAU,EAGV,kCAAkC,GAClC,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AAetB,OAAO,EAAE,qBAAqB,EAAE,MAAM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IAAI,GAAG,GAAG,IAAI,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QAC1B,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -7,7 +7,9 @@
7
7
  * committee. On testnet a subset of those nodes do not ship CORS headers,
8
8
  * so browser fetches frequently fail with `NoBlobMetadataReceivedError`
9
9
  * even when the blob is healthy. CLI smokes against the same blob succeed
10
- * because the CLI does not enforce CORS. The aggregator HTTP service is a
10
+ * because the CLI does not enforce CORS. Mainnet node CORS coverage has not
11
+ * been measured by this project, so treat the fanout path there as unproven
12
+ * from a browser rather than assumed good. The aggregator HTTP service is a
11
13
  * Walrus-operator-run wrapper that internally does the shard math and
12
14
  * exposes a single CORS-friendly endpoint.
13
15
  *
@@ -92,7 +94,7 @@ export declare class HttpAggregatorReadAdapter implements WalrusReadAdapter {
92
94
  * `headers` here if you want them; everything else is inferred.
93
95
  *
94
96
  * @throws {ConfigurationError} If the network has no canonical aggregator
95
- * URL (e.g. mainnet pre-freeze, or a custom-deployment config without
97
+ * URL (localnet, or a custom-deployment config without
96
98
  * `walrusEndpoints.aggregator` supplied).
97
99
  */
98
100
  static fromMorseConfig(morseConfig: Pick<NetworkConfig, "walrusEndpoints">, suiClient: ObjectReader, extras?: Pick<HttpAggregatorReadAdapterOptions, "headers" | "fetch" | "verifyBlobIntegrity">): HttpAggregatorReadAdapter;
@@ -1 +1 @@
1
- {"version":3,"file":"http-aggregator-read-adapter.d.ts","sourceRoot":"","sources":["../../src/walrus/http-aggregator-read-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,C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B,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,EACnD,SAAS,EAAE,YAAY,EACvB,MAAM,CAAC,EAAE,IAAI,CACZ,gCAAgC,EAChC,SAAS,GAAG,OAAO,GAAG,qBAAqB,CAC3C,GACC,yBAAyB;IAkBtB,QAAQ,CACb,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;IAgBhB,kBAAkB,CACvB,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;IAQhB,cAAc,CACnB,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;IAMhB,WAAW,CAChB,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;YAOR,UAAU;YAgDV,uBAAuB;CAmDrC"}
1
+ {"version":3,"file":"http-aggregator-read-adapter.d.ts","sourceRoot":"","sources":["../../src/walrus/http-aggregator-read-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAOlD,OAAO,KAAK,EACX,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,2BAA2B,CAAC;AAGnC,gFAAgF;AAChF,KAAK,SAAS,GAAG,CAChB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAE,KAClD,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ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,cAAc,CACnB,OAAO,EAAE,YAAY,EACrB,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;IAMhB,WAAW,CAChB,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,iBAAsB,GAC7B,OAAO,CAAC,UAAU,CAAC;YAOR,UAAU;YAgDV,uBAAuB;CAmDrC"}
@@ -7,7 +7,9 @@
7
7
  * committee. On testnet a subset of those nodes do not ship CORS headers,
8
8
  * so browser fetches frequently fail with `NoBlobMetadataReceivedError`
9
9
  * even when the blob is healthy. CLI smokes against the same blob succeed
10
- * because the CLI does not enforce CORS. The aggregator HTTP service is a
10
+ * because the CLI does not enforce CORS. Mainnet node CORS coverage has not
11
+ * been measured by this project, so treat the fanout path there as unproven
12
+ * from a browser rather than assumed good. The aggregator HTTP service is a
11
13
  * Walrus-operator-run wrapper that internally does the shard math and
12
14
  * exposes a single CORS-friendly endpoint.
13
15
  *
@@ -65,13 +67,13 @@ export class HttpAggregatorReadAdapter {
65
67
  * `headers` here if you want them; everything else is inferred.
66
68
  *
67
69
  * @throws {ConfigurationError} If the network has no canonical aggregator
68
- * URL (e.g. mainnet pre-freeze, or a custom-deployment config without
70
+ * URL (localnet, or a custom-deployment config without
69
71
  * `walrusEndpoints.aggregator` supplied).
70
72
  */
71
73
  static fromMorseConfig(morseConfig, suiClient, extras) {
72
74
  const url = morseConfig.walrusEndpoints?.aggregator ?? "";
73
75
  if (url.length === 0) {
74
- throw new ConfigurationError("morseConfig.walrusEndpoints.aggregator is empty. Pass an aggregator URL explicitly to HttpAggregatorReadAdapter.fromConfig({ aggregatorUrl, suiClient }), or use a network where the endpoint is pinned (testnet).");
76
+ throw new ConfigurationError("morseConfig.walrusEndpoints.aggregator is empty. Pass an aggregator URL explicitly to HttpAggregatorReadAdapter.fromConfig({ aggregatorUrl, suiClient }), or use a network where the endpoint is pinned (mainnet, testnet).");
75
77
  }
76
78
  return new HttpAggregatorReadAdapter({
77
79
  aggregatorUrl: url,
@@ -1 +1 @@
1
- {"version":3,"file":"http-aggregator-read-adapter.js","sourceRoot":"","sources":["../../src/walrus/http-aggregator-read-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EACN,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AAWtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAwD3D;;;;;GAKG;AACH,MAAM,OAAO,yBAAyB;IAC5B,cAAc,CAAS;IACvB,UAAU,CAAe;IACzB,QAAQ,CAAe;IACvB,MAAM,CAAY;IAClB,oBAAoB,CAA4B;IAEzD,YAAY,OAAyC;QACpD,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;QACnE,sEAAsE;QACtE,oEAAoE;QACpE,iEAAiE;QACjE,oEAAoE;QACpE,mCAAmC;QACnC,IAAI,CAAC,MAAM;YACV,OAAO,CAAC,KAAK,IAAK,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAe,CAAC;QACnE,IAAI,OAAO,CAAC,mBAAmB,KAAK,SAAS,EAAE,CAAC;YAC/C,IAAI,CAAC,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;QACzD,CAAC;IACF,CAAC;IAED,iEAAiE;IACjE,MAAM,CAAC,UAAU,CAChB,OAAyC;QAEzC,OAAO,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;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,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC/C,MAAM,IAAI,eAAe,CACxB,sBAAsB,YAAY,6BAA6B,EAC/D,WAAW,CACX,CAAC;QACH,CAAC;QACD,MAAM,SAAS,GAAI,IAA8B,CAAC,OAAO,CAAC;QAC1D,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YACpE,MAAM,IAAI,eAAe,CACxB,sBAAsB,YAAY,qCAAqC,OAAO,SAAS,EAAE,EACzF,cAAc,CACd,CAAC;QACH,CAAC;QACD,oEAAoE;QACpE,8EAA8E;QAC9E,IAAI,CAAC;YACJ,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;YACnC,OAAO,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,eAAe,CACxB,yDAAyD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjH,cAAc,EACd,EAAE,KAAK,EAAE,CACT,CAAC;QACH,CAAC;IACF,CAAC;CACD"}
1
+ {"version":3,"file":"http-aggregator-read-adapter.js","sourceRoot":"","sources":["../../src/walrus/http-aggregator-read-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EACN,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,eAAe,GACf,MAAM,cAAc,CAAC;AAWtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAwD3D;;;;;GAKG;AACH,MAAM,OAAO,yBAAyB;IAC5B,cAAc,CAAS;IACvB,UAAU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AAC,CAAC;YACnC,OAAO,cAAc,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,eAAe,CACxB,yDAAyD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACjH,cAAc,EACd,EAAE,KAAK,EAAE,CACT,CAAC;QACH,CAAC;IACF,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcadiasystems/morse-sdk",
3
- "version": "0.4.3",
3
+ "version": "0.6.0",
4
4
  "description": "TypeScript SDK for Morse dCMS on the Sui blockchain.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -41,6 +41,7 @@
41
41
  },
42
42
  "scripts": {
43
43
  "prebuild": "rm -rf dist",
44
+ "prepublishOnly": "bun run lint && bun run typecheck && bun test && bun run build",
44
45
  "build": "tsc -p tsconfig.build.json",
45
46
  "typecheck": "tsc --noEmit",
46
47
  "lint": "biome check .",