@meddleware/seal-ui 0.0.4 → 0.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meddleware/seal-ui",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
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",
@@ -40,7 +40,7 @@
40
40
  "@meddleware/design-tokens": "^0.1.2",
41
41
  "@meddleware/seal-client": "^0.0.2",
42
42
  "@meddleware/ui": "^0.1.6",
43
- "@meddleware/wallet-adapter": "^0.0.2",
43
+ "@meddleware/wallet-adapter": "^0.0.4",
44
44
  "@mysten/seal": "^1.4.7",
45
45
  "@mysten/sui": "^2.28.0",
46
46
  "@mysten/wallet-standard": "^0.20.0",
@@ -15,13 +15,14 @@ import {
15
15
  type SealPolicyProvider,
16
16
  type SealedContentPointer,
17
17
  } from '@meddleware/seal-client'
18
+ import { WalletGuard } from '@meddleware/wallet-adapter'
18
19
  import { useWallet } from '../wallet.js'
19
20
  import { registry, getSealController } from '../seal.js'
20
21
  import { storeBlob, readBlob } from '../walrus.js'
21
22
  import { discoverSealedContent } from '../sealed-content.js'
22
23
  import { NETWORK, MAINNET_PENDING, SEAL_CONFIGURED, SEAL_PACKAGE_ID } from '../config.js'
23
24
 
24
- const { wallets, account, connect, disconnect, signPersonalMessage, signAndExecute } = useWallet()
25
+ const { account, signPersonalMessage, signAndExecute } = useWallet()
25
26
 
26
27
  const providers = registry.list() as SealPolicyProvider[]
27
28
  const disabled = computed(() => MAINNET_PENDING || !SEAL_CONFIGURED)
@@ -265,10 +266,6 @@ async function performUnlock(item: SealedContentPointer): Promise<void> {
265
266
  }
266
267
  }
267
268
 
268
- const shortAddr = computed(() => {
269
- const a = account.value?.address
270
- return a ? `${a.slice(0, 6)}…${a.slice(-4)}` : ''
271
- })
272
269
  </script>
273
270
 
274
271
  <template>
@@ -284,28 +281,7 @@ const shortAddr = computed(() => {
284
281
  (<code>VITE_SEAL_PACKAGE_ID_*</code> / <code>VITE_SEAL_SERVER_OBJECT_IDS_*</code>).
285
282
  </div>
286
283
 
287
- <section class="card" style="display:flex;align-items:center;justify-content:space-between;gap:1rem">
288
- <template v-if="account">
289
- <span class="muted">Connected: {{ shortAddr }}</span>
290
- <button class="link" @click="disconnect">Disconnect</button>
291
- </template>
292
- <template v-else>
293
- <span class="muted">Wallet needed only to decrypt.</span>
294
- <span>
295
- <button
296
- v-for="w in wallets"
297
- :key="w.name"
298
- class="primary"
299
- style="margin-left:0.4rem"
300
- @click="connect(w)"
301
- >
302
- Connect {{ w.name }}
303
- </button>
304
- <span v-if="!wallets.length" class="muted">No Sui wallet detected.</span>
305
- </span>
306
- </template>
307
- </section>
308
-
284
+ <WalletGuard message="Connect a Sui wallet to encrypt and decrypt sealed content.">
309
285
  <nav class="tabs">
310
286
  <button :class="{ active: tab === 'encrypt' }" @click="tab = 'encrypt'">Encrypt</button>
311
287
  <button :class="{ active: tab === 'decrypt' }" @click="tab = 'decrypt'">Decrypt</button>
@@ -449,6 +425,7 @@ const shortAddr = computed(() => {
449
425
  Decryption keys are released by a threshold committee of independent key servers. If enough
450
426
  servers are unreachable, decryption pauses — storage and retrieval are unaffected.
451
427
  </p>
428
+ </WalletGuard>
452
429
  </div>
453
430
  </template>
454
431