@arcadiasystems/morse-sdk 0.5.0 → 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 +34 -0
- package/README.md +50 -4
- package/dist/config.d.ts +28 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +40 -19
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/seal/default-adapter.d.ts +5 -4
- package/dist/seal/default-adapter.d.ts.map +1 -1
- package/dist/seal/default-adapter.js +6 -5
- package/dist/seal/default-adapter.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
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
|
+
|
|
5
39
|
## [0.5.0] - 2026-09-09
|
|
6
40
|
|
|
7
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.
|
package/README.md
CHANGED
|
@@ -6,7 +6,9 @@ TypeScript SDK for [Morse](https://github.com/arcadiasystems/morse-dcms/tree/mai
|
|
|
6
6
|
|
|
7
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
8
|
|
|
9
|
-
**
|
|
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.
|
|
10
12
|
|
|
11
13
|
## Install
|
|
12
14
|
|
|
@@ -135,13 +137,41 @@ morse-sdk ships two pairs of Walrus adapters. They implement the same interfaces
|
|
|
135
137
|
|
|
136
138
|
| Pair | Trust model | Browser CORS | Popup count for upload + addEntry | Storage cost paid by |
|
|
137
139
|
| ----------------------------------------------------------------- | ---------------- | --------------- | --------------------------------- | -------------------- |
|
|
138
|
-
| `DefaultWalrusReadAdapter` + `DefaultWalrusWriteAdapter` | Trustless (direct fanout to
|
|
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) |
|
|
139
141
|
| `HttpAggregatorReadAdapter` + `HttpPublisherWriteAdapter` | Operator-trusted | Reliable | 1 (`uploadBlob` is a publisher HTTP call, only `addEntry` signs) | Publisher operator (WAL); consumer (Sui gas only) |
|
|
140
142
|
|
|
141
143
|
**When to pick which:**
|
|
142
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.
|
|
143
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.
|
|
144
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
|
+
|
|
145
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`.
|
|
146
176
|
|
|
147
177
|
```ts
|
|
@@ -255,7 +285,8 @@ The full public surface, grouped by concern. Every export carries a JSDoc on its
|
|
|
255
285
|
| `DefaultWalrusReadAdapter.fromConfig(config)` | Walrus reads (`readBlob`, `readBlobByObjectId`, `readQuiltPatch`, `readBlobRef`). |
|
|
256
286
|
| `HttpPublisherWriteAdapter.fromConfig({ publisherUrl, ownerAddress })` | Walrus uploads via a publisher HTTP service (operator pays storage; 1 popup for upload + addEntry). |
|
|
257
287
|
| `HttpAggregatorReadAdapter.fromMorseConfig(config, suiClient)` / `.fromConfig({ aggregatorUrl, suiClient })` | Walrus reads via a single CORS-friendly aggregator endpoint instead of fanout to ~30 storage nodes. |
|
|
258
|
-
| `DefaultSealAdapter.fromMorseConfig(config, options, suiClient)` | Threshold encryption / decryption. Defaults the canonical 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. |
|
|
259
290
|
| `WalletAdapter` / `WalrusWriteAdapter` / `WalrusReadAdapter` / `SealAdapter` | Interfaces for substituting custom implementations. |
|
|
260
291
|
| `WalrusFlowCapable` / `isWalrusFlowCapable` | Optional capability for the 2-popup `addEntryFromBytes` path. |
|
|
261
292
|
|
|
@@ -445,7 +476,20 @@ const config = morseConfig({ network: "mainnet" }); // or "testnet"
|
|
|
445
476
|
The two networks differ in their Seal allowlist, and the difference is not cosmetic:
|
|
446
477
|
|
|
447
478
|
- **testnet** pins two independent Mysten key servers, so the default threshold is 2 of 2.
|
|
448
|
-
- **mainnet** pins
|
|
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
|
+
```
|
|
449
493
|
|
|
450
494
|
Override individual fields for forks or local nodes:
|
|
451
495
|
|
|
@@ -489,6 +533,8 @@ The `scripts/` directory has end-to-end smokes that cost real WAL and SUI. They'
|
|
|
489
533
|
|
|
490
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.
|
|
491
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
|
+
|
|
492
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`:
|
|
493
539
|
|
|
494
540
|
```sh
|
package/dist/config.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ export interface NetworkConfig {
|
|
|
63
63
|
* custom deployments), which makes the encrypted paths throw
|
|
64
64
|
* `ConfigurationError` until the consumer supplies `serverConfigs`.
|
|
65
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
|
+
*
|
|
66
70
|
* Entries are `@mysten/seal` `KeyServerConfig` objects and are passed
|
|
67
71
|
* through untouched. Seal distinguishes two server types and enforces the
|
|
68
72
|
* distinction at client construction: a committee-mode server REQUIRES
|
|
@@ -96,6 +100,30 @@ export type MorsePackageConfig = Pick<NetworkConfig, "packageId" | "originalPack
|
|
|
96
100
|
* a fresh deployment with no upgrades).
|
|
97
101
|
*/
|
|
98
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[];
|
|
99
127
|
/**
|
|
100
128
|
* Options for `morseConfig`. `network` is required; address fields are
|
|
101
129
|
* optional and override the canonical deployment when supplied. Use them
|
package/dist/config.d.ts.map
CHANGED
|
@@ -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;;;;;;;;;;;GAWG;AACH;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC/B,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC;IACvC;;;;;;;;OAQG;IACH,QAAQ,CAAC,iCAAiC,CAAC,EAAE,SAAS,CAAC;IACvD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM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;;;;;;;;;;;;;;;;;;;;;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
|
@@ -19,6 +19,36 @@ export const DEFAULT_RPC_URLS = {
|
|
|
19
19
|
localnet: "http://127.0.0.1:9000",
|
|
20
20
|
};
|
|
21
21
|
// morseConfig factory
|
|
22
|
+
/**
|
|
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
|
+
];
|
|
22
52
|
/**
|
|
23
53
|
* Canonical Morse deployment addresses per network. Mirrors
|
|
24
54
|
* `morse-contracts/Published.toml`; update on every contract publish or
|
|
@@ -38,26 +68,17 @@ const KNOWN_DEPLOYMENTS = {
|
|
|
38
68
|
recipientFileEventOriginPackageId: toPackageId("0x4fc7af5d1e19f96e5fab4e677948214eec35e238b252a106c7d5036dcebdcae2"),
|
|
39
69
|
// Shared PublicationRegistry created by the publish tx's init.
|
|
40
70
|
registryId: toRegistryId("0x8d8b23c7acd7c1b260c793f2c648c5be8eb06db7c107b9f06ca3f39b700868ea"),
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
// is the one no-signup option.
|
|
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.
|
|
45
74
|
//
|
|
46
|
-
//
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
// the
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
// their own `seal.serverConfigs`.
|
|
54
|
-
sealKeyServers: [
|
|
55
|
-
{
|
|
56
|
-
objectId: "0x686098f1439237fff9f36b99c7329683c22979d2005c2465cb891acb012a7595",
|
|
57
|
-
weight: 1,
|
|
58
|
-
aggregatorUrl: "https://seal-aggregator-mainnet.mystenlabs.com",
|
|
59
|
-
},
|
|
60
|
-
],
|
|
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: [],
|
|
61
82
|
// Canonical Mysten-run Walrus mainnet aggregator. Publisher is left
|
|
62
83
|
// undefined for the same reason as testnet: no single canonical operator.
|
|
63
84
|
walrusEndpoints: {
|
package/dist/config.js.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;GA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O;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";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;AACrB,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KA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B,KAAK,SAAS,EACd,KAAK,YAAY,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,KAAK,kBAAkB,EACvB,yBAAyB,EACzB,KAAK,gCAAgC,EACrC,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,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"}
|
|
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,EAC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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,
|
|
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,EAChB,sBAAsB,EAItB,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,SA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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
|
|
84
|
-
*
|
|
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
85
|
* not a weakened policy - a committee server is one endpoint fronting 8
|
|
86
86
|
* operators with its own internal quorum, which Seal enforces behind the
|
|
87
87
|
* aggregator and this SDK cannot express as a share count. Do not "fix"
|
|
@@ -89,8 +89,9 @@ export declare class DefaultSealAdapter implements SealAdapter {
|
|
|
89
89
|
* threshold must be <= `serverConfigs.length`.
|
|
90
90
|
*
|
|
91
91
|
* @throws {ConfigurationError} If neither `seal.serverConfigs` nor
|
|
92
|
-
* `morseConfig.sealKeyServers` provide any servers
|
|
93
|
-
*
|
|
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.
|
|
94
95
|
*/
|
|
95
96
|
static fromMorseConfig(morseConfig: {
|
|
96
97
|
packageId: PackageId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-adapter.d.ts","sourceRoot":"","sources":["../../src/seal/default-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIN,KAAK,eAAe,EAGpB,KAAK,oBAAoB,EACzB,KAAK,UAAU,EAEf,MAAM,cAAc,CAAC;AAUtB,OAAO,KAAK,EACX,SAAS,EAKT,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,WAAW,EACX,kBAAkB,EAClB,oCAAoC,EACpC,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,cAAc,CAAC;AAGtB;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9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AC;IAkChB,yBAAyB,CAC9B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,oCAAoC,GAC3C,OAAO,CAAC,UAAU,CAAC;YAsBR,uBAAuB;YA6BvB,gCAAgC;CA0B9C"}
|
|
@@ -38,8 +38,8 @@ 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
|
|
42
|
-
*
|
|
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
43
|
* not a weakened policy - a committee server is one endpoint fronting 8
|
|
44
44
|
* operators with its own internal quorum, which Seal enforces behind the
|
|
45
45
|
* aggregator and this SDK cannot express as a share count. Do not "fix"
|
|
@@ -47,13 +47,14 @@ export class DefaultSealAdapter {
|
|
|
47
47
|
* threshold must be <= `serverConfigs.length`.
|
|
48
48
|
*
|
|
49
49
|
* @throws {ConfigurationError} If neither `seal.serverConfigs` nor
|
|
50
|
-
* `morseConfig.sealKeyServers` provide any servers
|
|
51
|
-
*
|
|
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.
|
|
52
53
|
*/
|
|
53
54
|
static fromMorseConfig(morseConfig, seal, suiClient) {
|
|
54
55
|
const serverConfigs = seal.serverConfigs ?? morseConfig.sealKeyServers ?? [];
|
|
55
56
|
if (serverConfigs.length === 0) {
|
|
56
|
-
throw new ConfigurationError("morseConfig has no canonical Seal key servers for this network and no override was supplied. Pass seal.serverConfigs explicitly, or
|
|
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.");
|
|
57
58
|
}
|
|
58
59
|
const threshold = seal.threshold ?? Math.min(2, serverConfigs.length);
|
|
59
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
|
|
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,C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