@meddleware/walrus-ui 0.1.48 → 0.1.50
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/walrus-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
4
4
|
"homepage": "https://docs.meddleware.co.uk/blockchain/sui/walrus-storage/",
|
|
5
5
|
"description": "Standalone Vue 3 SPA for uploading blobs to Walrus decentralised storage and managing owned blobs — wallet-connected, NFT-gated relay support.",
|
|
6
6
|
"author": "Meddleware <dev@meddleware.co.uk>",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@meddleware/design-tokens": "^0.1.7",
|
|
49
49
|
"@meddleware/ui": "^0.1.28",
|
|
50
|
-
"@meddleware/walrus-client": "^0.0.
|
|
51
|
-
"@meddleware/walrus-relay": "^0.1.
|
|
50
|
+
"@meddleware/walrus-client": "^0.0.24",
|
|
51
|
+
"@meddleware/walrus-relay": "^0.1.25",
|
|
52
52
|
"@mysten/sui": "^2.33.1",
|
|
53
53
|
"@mysten/wallet-standard": "^0.21.0",
|
|
54
54
|
"@mysten/walrus": "~1.2.32",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@meddleware/wallet-adapter": ">=0.0.12 <0.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@meddleware/access-gate-client": "^0.0.
|
|
63
|
-
"@meddleware/wallet-adapter": "^0.0.
|
|
62
|
+
"@meddleware/access-gate-client": "^0.0.3",
|
|
63
|
+
"@meddleware/wallet-adapter": "^0.0.13",
|
|
64
64
|
"@playwright/test": "~1.63.0",
|
|
65
65
|
"@types/node": "~24.12.2",
|
|
66
66
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
@@ -13,8 +13,12 @@ import {
|
|
|
13
13
|
loadPendingCertifies,
|
|
14
14
|
clearPendingCertify,
|
|
15
15
|
type PendingCertify,
|
|
16
|
+
browserStorage,
|
|
16
17
|
} from '@meddleware/walrus-client/flow'
|
|
17
18
|
|
|
19
|
+
// Browser storage that never throws (blocked site data falls back to memory for this page).
|
|
20
|
+
const storage = browserStorage()
|
|
21
|
+
|
|
18
22
|
const props = defineProps<{
|
|
19
23
|
/** Connected wallet address whose owned blobs to list; `null` when no wallet is connected. */
|
|
20
24
|
address: string | null
|
|
@@ -89,10 +93,10 @@ function refreshPending(): void {
|
|
|
89
93
|
return
|
|
90
94
|
}
|
|
91
95
|
const key = pendingCertifyKey(walrusNetwork.value, props.address)
|
|
92
|
-
const map = loadPendingCertifies(
|
|
96
|
+
const map = loadPendingCertifies(storage, key)
|
|
93
97
|
for (const blob of blobs.value) {
|
|
94
98
|
if (blob.certified && blob.objectId in map) {
|
|
95
|
-
clearPendingCertify(
|
|
99
|
+
clearPendingCertify(storage, key, blob.objectId)
|
|
96
100
|
delete map[blob.objectId]
|
|
97
101
|
}
|
|
98
102
|
}
|
|
@@ -167,7 +171,7 @@ async function certifyBlob(blob: OwnedBlob): Promise<void> {
|
|
|
167
171
|
actionStatus.value = { ...actionStatus.value, [blob.objectId]: 'Approve in wallet…' }
|
|
168
172
|
const { digest } = await executor.signAndExecute(tx)
|
|
169
173
|
await executor.waitForTransaction(digest)
|
|
170
|
-
clearPendingCertify(
|
|
174
|
+
clearPendingCertify(storage, pendingCertifyKey(currentNetwork(), props.address), blob.objectId)
|
|
171
175
|
actionStatus.value = { ...actionStatus.value, [blob.objectId]: `Certified ✓ (${digest.slice(0, 8)}…)` }
|
|
172
176
|
await refresh()
|
|
173
177
|
} catch (e) {
|
|
@@ -26,7 +26,11 @@ import {
|
|
|
26
26
|
type BlobUploadResult as UploadResult,
|
|
27
27
|
type ExistingCopy,
|
|
28
28
|
type UploadProgress,
|
|
29
|
+
browserStorage,
|
|
29
30
|
} from '@meddleware/walrus-client/flow'
|
|
31
|
+
|
|
32
|
+
// Browser storage that never throws (blocked site data falls back to memory for this page).
|
|
33
|
+
const storage = browserStorage()
|
|
30
34
|
import { useOwnedBlobs } from '../composables/useOwnedBlobs.js'
|
|
31
35
|
import MyBlobs from './MyBlobs.vue'
|
|
32
36
|
|
|
@@ -95,7 +99,6 @@ async function performUpload(
|
|
|
95
99
|
if (!net) throw new Error(`Walrus storage is not available on ${network.value}.`)
|
|
96
100
|
const executor = await buildExecutor()
|
|
97
101
|
const address = account.value.address
|
|
98
|
-
const storage = window.localStorage
|
|
99
102
|
const state = gateState.value
|
|
100
103
|
const gate = state.gate
|
|
101
104
|
const nftId = state.nftId.value
|
|
@@ -159,7 +162,7 @@ async function findExistingCopy(blobId: string): Promise<ExistingCopy | null> {
|
|
|
159
162
|
if (certified) {
|
|
160
163
|
return { kind: 'certified', blobId, objectId: certified.objectId, endEpoch: certified.endEpoch }
|
|
161
164
|
}
|
|
162
|
-
const store = loadPendingCertifies(
|
|
165
|
+
const store = loadPendingCertifies(storage, pendingCertifyKey(net, address))
|
|
163
166
|
const pending = copies.find((b) => !b.certified && b.objectId in store)
|
|
164
167
|
if (pending) {
|
|
165
168
|
return { kind: 'pending', blobId, objectId: pending.objectId, endEpoch: pending.endEpoch }
|