@meddleware/seal-ui 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.ts +20 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/seal-ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Standalone Vue 3 SPA for Sealed Storage — client-side Seal encryption + access-gated, decentralised Walrus storage on Sui.",
5
5
  "author": "MeddleWare <meddleware@proton.me>",
6
6
  "license": "0BSD",
package/src/config.ts CHANGED
@@ -30,16 +30,32 @@ export const SEAL_PACKAGE_ID: string =
30
30
  ? '0x9f0563bfe42fbd29932cd280cc47efe17f5339b4dc569eb110114665eecc231e'
31
31
  : '')
32
32
 
33
- /** Threshold `t` in the t-of-n committee (default 2). */
33
+ /** Threshold `t` in the t-of-n committee (default 2 — matches the 3-server testnet default). */
34
34
  export const SEAL_THRESHOLD = Number(env.VITE_SEAL_THRESHOLD || '2')
35
35
 
36
36
  /**
37
37
  * The key-server committee. Object ids and aggregator URLs are supplied as parallel CSV lists
38
- * (index-aligned); aggregatorUrl is required for committee-mode servers.
38
+ * (index-aligned); aggregatorUrl is required for decentralized (committee-type) servers only —
39
+ * independent servers derive their URL from the on-chain object and do not need one.
40
+ *
41
+ * Defaults are the three verified Mysten Labs testnet servers:
42
+ * [0] Decentralized (Mysten) — requires aggregatorUrl
43
+ * [1] Independent server 1
44
+ * [2] Independent server 2
45
+ * Override via VITE_SEAL_SERVER_OBJECT_IDS_TESTNET / VITE_SEAL_AGGREGATOR_URLS_TESTNET.
39
46
  */
40
47
  export const SEAL_SERVERS: KeyServerConfig[] = (() => {
41
- const ids = csv(netEnv('VITE_SEAL_SERVER_OBJECT_IDS'))
42
- const aggs = csv(netEnv('VITE_SEAL_AGGREGATOR_URLS'))
48
+ const defaultIds = [
49
+ '0xb012378c9f3799fb5b1a7083da74a4069e3c3f1c93de0b27212a5799ce1e1e98',
50
+ '0x73d05d62c18d9374e3ea529e8e0ed6161da1a141a94d3f76ae3fe4e99356db75',
51
+ '0xf5d14a81a982144ae441cd7d64b09027f116a468bd36e7eca494f750591623c8',
52
+ ]
53
+ const defaultAggs = ['https://seal-aggregator-testnet.mystenlabs.com']
54
+
55
+ const envIds = csv(netEnv('VITE_SEAL_SERVER_OBJECT_IDS'))
56
+ const envAggs = csv(netEnv('VITE_SEAL_AGGREGATOR_URLS'))
57
+ const ids = envIds.length > 0 ? envIds : (NETWORK === 'testnet' ? defaultIds : [])
58
+ const aggs = envAggs.length > 0 ? envAggs : (NETWORK === 'testnet' ? defaultAggs : [])
43
59
  return ids.map((objectId, i) => ({ objectId, weight: 1, aggregatorUrl: aggs[i] }))
44
60
  })()
45
61