@meddleware/docs 0.0.1

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 (137) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE +14 -0
  3. package/README.md +54 -0
  4. package/docs/.vitepress/config.ts +101 -0
  5. package/docs/.vitepress/theme/custom.css +51 -0
  6. package/docs/.vitepress/theme/index.ts +8 -0
  7. package/docs/access-gate/api/functions/buildAccessProof.md +38 -0
  8. package/docs/access-gate/api/functions/buildAirdropTx.md +21 -0
  9. package/docs/access-gate/api/functions/buildConsumeTx.md +27 -0
  10. package/docs/access-gate/api/functions/buildCreateGateTx.md +52 -0
  11. package/docs/access-gate/api/functions/buildMakeGateImmutableTx.md +19 -0
  12. package/docs/access-gate/api/functions/buildPurchaseTx.md +23 -0
  13. package/docs/access-gate/api/functions/buildSetAutoBurnAtZeroTx.md +21 -0
  14. package/docs/access-gate/api/functions/buildSetDefaultUsesTx.md +21 -0
  15. package/docs/access-gate/api/functions/buildSetNftDescriptionTx.md +21 -0
  16. package/docs/access-gate/api/functions/buildSetNftImageUrlTx.md +21 -0
  17. package/docs/access-gate/api/functions/buildSetNftNameTx.md +21 -0
  18. package/docs/access-gate/api/functions/buildSetPausedTx.md +21 -0
  19. package/docs/access-gate/api/functions/buildSetPaymentRecipientTx.md +21 -0
  20. package/docs/access-gate/api/functions/buildSetPriceTx.md +21 -0
  21. package/docs/access-gate/api/functions/buildSetSoulboundTx.md +21 -0
  22. package/docs/access-gate/api/functions/decodeAccessProof.md +17 -0
  23. package/docs/access-gate/api/functions/encodeAccessProof.md +17 -0
  24. package/docs/access-gate/api/functions/fetchAccessNftById.md +27 -0
  25. package/docs/access-gate/api/functions/fetchAccessNfts.md +34 -0
  26. package/docs/access-gate/api/functions/fetchAdminCaps.md +30 -0
  27. package/docs/access-gate/api/functions/fetchChallenge.md +32 -0
  28. package/docs/access-gate/api/functions/fetchGate.md +26 -0
  29. package/docs/access-gate/api/functions/fetchOwnedGates.md +31 -0
  30. package/docs/access-gate/api/functions/ownsAccessNft.md +35 -0
  31. package/docs/access-gate/api/functions/parseAdminCap.md +26 -0
  32. package/docs/access-gate/api/functions/parseGate.md +19 -0
  33. package/docs/access-gate/api/functions/parseOwnedAccessNft.md +19 -0
  34. package/docs/access-gate/api/functions/personalMessageForNonce.md +18 -0
  35. package/docs/access-gate/api/index.md +47 -0
  36. package/docs/access-gate/api/interfaces/AccessGateConfig.md +57 -0
  37. package/docs/access-gate/api/interfaces/AccessProof.md +46 -0
  38. package/docs/access-gate/api/interfaces/Challenge.md +25 -0
  39. package/docs/access-gate/api/interfaces/GateAdminContext.md +37 -0
  40. package/docs/access-gate/api/interfaces/OwnedAccessNft.md +31 -0
  41. package/docs/access-gate/api/interfaces/OwnedGate.md +125 -0
  42. package/docs/access-gate/api/interfaces/OwnedObjectsClient.md +49 -0
  43. package/docs/access-gate/api/interfaces/SuiObjectClient.md +37 -0
  44. package/docs/access-gate/api/type-aliases/PersonalMessageSigner.md +17 -0
  45. package/docs/access-gate/api/typedoc-sidebar.json +1 -0
  46. package/docs/access-gate/index.md +61 -0
  47. package/docs/access-gate/reference.md +111 -0
  48. package/docs/access-gate/using.md +68 -0
  49. package/docs/architecture.md +61 -0
  50. package/docs/dao/index.md +71 -0
  51. package/docs/dao/reference.md +94 -0
  52. package/docs/getting-started.md +59 -0
  53. package/docs/index.md +58 -0
  54. package/docs/sealed-storage/api/classes/PolicyRegistry.md +103 -0
  55. package/docs/sealed-storage/api/classes/SealController.md +113 -0
  56. package/docs/sealed-storage/api/functions/buildPublishSealedContentTx.md +27 -0
  57. package/docs/sealed-storage/api/functions/bytesToHex.md +17 -0
  58. package/docs/sealed-storage/api/functions/concatBytes.md +17 -0
  59. package/docs/sealed-storage/api/functions/createDefaultRegistry.md +22 -0
  60. package/docs/sealed-storage/api/functions/createNftGateProvider.md +21 -0
  61. package/docs/sealed-storage/api/functions/hexToBytes.md +17 -0
  62. package/docs/sealed-storage/api/functions/objectIdBytes.md +17 -0
  63. package/docs/sealed-storage/api/functions/randomBytes.md +17 -0
  64. package/docs/sealed-storage/api/functions/sealedContentEventType.md +17 -0
  65. package/docs/sealed-storage/api/functions/u64beBytes.md +17 -0
  66. package/docs/sealed-storage/api/index.md +45 -0
  67. package/docs/sealed-storage/api/interfaces/EncryptResult.md +23 -0
  68. package/docs/sealed-storage/api/interfaces/FieldSpec.md +51 -0
  69. package/docs/sealed-storage/api/interfaces/FieldSuggestion.md +21 -0
  70. package/docs/sealed-storage/api/interfaces/KeyServerConfig.md +35 -0
  71. package/docs/sealed-storage/api/interfaces/NftGateParams.md +33 -0
  72. package/docs/sealed-storage/api/interfaces/PolicyDescriptor.md +49 -0
  73. package/docs/sealed-storage/api/interfaces/SealControllerConfig.md +63 -0
  74. package/docs/sealed-storage/api/interfaces/SealPolicyProvider.md +115 -0
  75. package/docs/sealed-storage/api/interfaces/SealSuggestClient.md +74 -0
  76. package/docs/sealed-storage/api/interfaces/SealedContentInput.md +45 -0
  77. package/docs/sealed-storage/api/interfaces/SealedContentPointer.md +53 -0
  78. package/docs/sealed-storage/api/interfaces/SealedManifest.md +65 -0
  79. package/docs/sealed-storage/api/interfaces/SuggestContext.md +25 -0
  80. package/docs/sealed-storage/api/interfaces/TimeLockParams.md +13 -0
  81. package/docs/sealed-storage/api/type-aliases/SignPersonalMessage.md +17 -0
  82. package/docs/sealed-storage/api/typedoc-sidebar.json +1 -0
  83. package/docs/sealed-storage/api/variables/nftGateProvider.md +9 -0
  84. package/docs/sealed-storage/api/variables/timeLockProvider.md +9 -0
  85. package/docs/sealed-storage/index.md +68 -0
  86. package/docs/sealed-storage/policies.md +52 -0
  87. package/docs/sealed-storage/reference.md +79 -0
  88. package/docs/sealed-storage/using.md +55 -0
  89. package/docs/walrus-storage/api/classes/RetryableWalrusClientError.md +101 -0
  90. package/docs/walrus-storage/api/classes/WalrusFile.md +111 -0
  91. package/docs/walrus-storage/api/functions/buildAccessProofToken.md +21 -0
  92. package/docs/walrus-storage/api/functions/certifyBlobTransaction.md +30 -0
  93. package/docs/walrus-storage/api/functions/createBlobUploadFlow.md +30 -0
  94. package/docs/walrus-storage/api/functions/createRelayAccessToken.md +45 -0
  95. package/docs/walrus-storage/api/functions/createUploadFlow.md +30 -0
  96. package/docs/walrus-storage/api/functions/createWalrusClient.md +23 -0
  97. package/docs/walrus-storage/api/functions/estimateStorageCost.md +35 -0
  98. package/docs/walrus-storage/api/functions/extendBlobLifetime.md +40 -0
  99. package/docs/walrus-storage/api/functions/extendBlobLifetimeTransaction.md +34 -0
  100. package/docs/walrus-storage/api/functions/fetchOwnedWalrusBlobs.md +34 -0
  101. package/docs/walrus-storage/api/functions/fetchRelayChallenge.md +32 -0
  102. package/docs/walrus-storage/api/functions/getWalrusPackageConfig.md +25 -0
  103. package/docs/walrus-storage/api/functions/personalMessageForNonce.md +18 -0
  104. package/docs/walrus-storage/api/functions/readBlobAttributes.md +27 -0
  105. package/docs/walrus-storage/api/functions/setBlobAttributes.md +40 -0
  106. package/docs/walrus-storage/api/functions/setBlobAttributesTransaction.md +34 -0
  107. package/docs/walrus-storage/api/functions/uploadBytes.md +38 -0
  108. package/docs/walrus-storage/api/functions/uploadImageBytes.md +34 -0
  109. package/docs/walrus-storage/api/functions/uploadLocalFile.md +37 -0
  110. package/docs/walrus-storage/api/functions/walrusBlobUrl.md +26 -0
  111. package/docs/walrus-storage/api/index.md +56 -0
  112. package/docs/walrus-storage/api/interfaces/CertifyOptions.md +46 -0
  113. package/docs/walrus-storage/api/interfaces/StorageCost.md +35 -0
  114. package/docs/walrus-storage/api/type-aliases/AccessProofInput.md +7 -0
  115. package/docs/walrus-storage/api/type-aliases/CreateWalrusClientOptions.md +113 -0
  116. package/docs/walrus-storage/api/type-aliases/ExtendOptions.md +8 -0
  117. package/docs/walrus-storage/api/type-aliases/OwnedBlob.md +57 -0
  118. package/docs/walrus-storage/api/type-aliases/PersonalMessageSigner.md +17 -0
  119. package/docs/walrus-storage/api/type-aliases/RelayChallenge.md +7 -0
  120. package/docs/walrus-storage/api/type-aliases/UploadOptions.md +37 -0
  121. package/docs/walrus-storage/api/type-aliases/UploadResult.md +27 -0
  122. package/docs/walrus-storage/api/type-aliases/WalrusClient.md +7 -0
  123. package/docs/walrus-storage/api/type-aliases/WalrusNetwork.md +7 -0
  124. package/docs/walrus-storage/api/typedoc-sidebar.json +1 -0
  125. package/docs/walrus-storage/api/variables/DEFAULT_RPC_URLS.md +7 -0
  126. package/docs/walrus-storage/api/variables/LONG_TERM_EPOCHS.md +12 -0
  127. package/docs/walrus-storage/api/variables/MAINNET_WALRUS_PACKAGE_CONFIG.md +15 -0
  128. package/docs/walrus-storage/api/variables/PUBLIC_UPLOAD_RELAY_HOSTS.md +10 -0
  129. package/docs/walrus-storage/api/variables/TESTNET_WALRUS_PACKAGE_CONFIG.md +19 -0
  130. package/docs/walrus-storage/api/variables/WALRUS_AGGREGATOR_HOSTS.md +7 -0
  131. package/docs/walrus-storage/index.md +54 -0
  132. package/docs/walrus-storage/reference.md +69 -0
  133. package/docs/walrus-storage/using.md +53 -0
  134. package/package.json +50 -0
  135. package/scripts/gen-api.mjs +107 -0
  136. package/tsconfig.json +13 -0
  137. package/tsconfig.typedoc.json +20 -0
@@ -0,0 +1,37 @@
1
+ # Type Alias: UploadOptions
2
+
3
+ > **UploadOptions** = `object`
4
+
5
+ Defined in: @meddleware/walrus-client/src/upload.ts:27
6
+
7
+ Options shared by all upload helpers.
8
+
9
+ ## Properties
10
+
11
+ ### deletable?
12
+
13
+ > `optional` **deletable?**: `boolean`
14
+
15
+ Defined in: @meddleware/walrus-client/src/upload.ts:31
16
+
17
+ Whether the blob can be deleted by its owner (default false).
18
+
19
+ ***
20
+
21
+ ### epochs?
22
+
23
+ > `optional` **epochs?**: `number`
24
+
25
+ Defined in: @meddleware/walrus-client/src/upload.ts:29
26
+
27
+ Storage epochs to reserve (default: MAX\_SINGLE\_RESERVATION\_EPOCHS).
28
+
29
+ ***
30
+
31
+ ### tags?
32
+
33
+ > `optional` **tags?**: `Record`\<`string`, `string`\>
34
+
35
+ Defined in: @meddleware/walrus-client/src/upload.ts:33
36
+
37
+ Arbitrary key-value metadata tags stored with the blob.
@@ -0,0 +1,27 @@
1
+ # Type Alias: UploadResult
2
+
3
+ > **UploadResult** = `object`
4
+
5
+ Defined in: @meddleware/walrus-client/src/upload.ts:37
6
+
7
+ The object IDs returned after a successful upload.
8
+
9
+ ## Properties
10
+
11
+ ### blobId
12
+
13
+ > **blobId**: `string`
14
+
15
+ Defined in: @meddleware/walrus-client/src/upload.ts:39
16
+
17
+ Walrus content-addressed blob ID.
18
+
19
+ ***
20
+
21
+ ### blobObjectId
22
+
23
+ > **blobObjectId**: `string`
24
+
25
+ Defined in: @meddleware/walrus-client/src/upload.ts:41
26
+
27
+ On-chain Walrus blob object ID.
@@ -0,0 +1,7 @@
1
+ # Type Alias: WalrusClient
2
+
3
+ > **WalrusClient** = `ReturnType`\<*typeof* [`createWalrusClient`](../functions/createWalrusClient.md)\>
4
+
5
+ Defined in: @meddleware/walrus-client/src/upload.ts:6
6
+
7
+ The return type of [createWalrusClient](../functions/createWalrusClient.md).
@@ -0,0 +1,7 @@
1
+ # Type Alias: WalrusNetwork
2
+
3
+ > **WalrusNetwork** = `"testnet"` \| `"mainnet"`
4
+
5
+ Defined in: @meddleware/walrus-client/src/client.ts:9
6
+
7
+ Supported Walrus network environments.
@@ -0,0 +1 @@
1
+ [{"text":"Classes","collapsed":true,"items":[{"text":"RetryableWalrusClientError","link":"/docs/walrus-storage/api/classes/RetryableWalrusClientError.md"},{"text":"WalrusFile","link":"/docs/walrus-storage/api/classes/WalrusFile.md"}]},{"text":"Interfaces","collapsed":true,"items":[{"text":"CertifyOptions","link":"/docs/walrus-storage/api/interfaces/CertifyOptions.md"},{"text":"StorageCost","link":"/docs/walrus-storage/api/interfaces/StorageCost.md"}]},{"text":"Type Aliases","collapsed":true,"items":[{"text":"AccessProofInput","link":"/docs/walrus-storage/api/type-aliases/AccessProofInput.md"},{"text":"CreateWalrusClientOptions","link":"/docs/walrus-storage/api/type-aliases/CreateWalrusClientOptions.md"},{"text":"ExtendOptions","link":"/docs/walrus-storage/api/type-aliases/ExtendOptions.md"},{"text":"OwnedBlob","link":"/docs/walrus-storage/api/type-aliases/OwnedBlob.md"},{"text":"PersonalMessageSigner","link":"/docs/walrus-storage/api/type-aliases/PersonalMessageSigner.md"},{"text":"RelayChallenge","link":"/docs/walrus-storage/api/type-aliases/RelayChallenge.md"},{"text":"UploadOptions","link":"/docs/walrus-storage/api/type-aliases/UploadOptions.md"},{"text":"UploadResult","link":"/docs/walrus-storage/api/type-aliases/UploadResult.md"},{"text":"WalrusClient","link":"/docs/walrus-storage/api/type-aliases/WalrusClient.md"},{"text":"WalrusNetwork","link":"/docs/walrus-storage/api/type-aliases/WalrusNetwork.md"}]},{"text":"Variables","collapsed":true,"items":[{"text":"DEFAULT_RPC_URLS","link":"/docs/walrus-storage/api/variables/DEFAULT_RPC_URLS.md"},{"text":"LONG_TERM_EPOCHS","link":"/docs/walrus-storage/api/variables/LONG_TERM_EPOCHS.md"},{"text":"MAINNET_WALRUS_PACKAGE_CONFIG","link":"/docs/walrus-storage/api/variables/MAINNET_WALRUS_PACKAGE_CONFIG.md"},{"text":"PUBLIC_UPLOAD_RELAY_HOSTS","link":"/docs/walrus-storage/api/variables/PUBLIC_UPLOAD_RELAY_HOSTS.md"},{"text":"TESTNET_WALRUS_PACKAGE_CONFIG","link":"/docs/walrus-storage/api/variables/TESTNET_WALRUS_PACKAGE_CONFIG.md"},{"text":"WALRUS_AGGREGATOR_HOSTS","link":"/docs/walrus-storage/api/variables/WALRUS_AGGREGATOR_HOSTS.md"}]},{"text":"Functions","collapsed":true,"items":[{"text":"buildAccessProofToken","link":"/docs/walrus-storage/api/functions/buildAccessProofToken.md"},{"text":"certifyBlobTransaction","link":"/docs/walrus-storage/api/functions/certifyBlobTransaction.md"},{"text":"createBlobUploadFlow","link":"/docs/walrus-storage/api/functions/createBlobUploadFlow.md"},{"text":"createRelayAccessToken","link":"/docs/walrus-storage/api/functions/createRelayAccessToken.md"},{"text":"createUploadFlow","link":"/docs/walrus-storage/api/functions/createUploadFlow.md"},{"text":"createWalrusClient","link":"/docs/walrus-storage/api/functions/createWalrusClient.md"},{"text":"estimateStorageCost","link":"/docs/walrus-storage/api/functions/estimateStorageCost.md"},{"text":"extendBlobLifetime","link":"/docs/walrus-storage/api/functions/extendBlobLifetime.md"},{"text":"extendBlobLifetimeTransaction","link":"/docs/walrus-storage/api/functions/extendBlobLifetimeTransaction.md"},{"text":"fetchOwnedWalrusBlobs","link":"/docs/walrus-storage/api/functions/fetchOwnedWalrusBlobs.md"},{"text":"fetchRelayChallenge","link":"/docs/walrus-storage/api/functions/fetchRelayChallenge.md"},{"text":"getWalrusPackageConfig","link":"/docs/walrus-storage/api/functions/getWalrusPackageConfig.md"},{"text":"personalMessageForNonce","link":"/docs/walrus-storage/api/functions/personalMessageForNonce.md"},{"text":"readBlobAttributes","link":"/docs/walrus-storage/api/functions/readBlobAttributes.md"},{"text":"setBlobAttributes","link":"/docs/walrus-storage/api/functions/setBlobAttributes.md"},{"text":"setBlobAttributesTransaction","link":"/docs/walrus-storage/api/functions/setBlobAttributesTransaction.md"},{"text":"uploadBytes","link":"/docs/walrus-storage/api/functions/uploadBytes.md"},{"text":"uploadImageBytes","link":"/docs/walrus-storage/api/functions/uploadImageBytes.md"},{"text":"uploadLocalFile","link":"/docs/walrus-storage/api/functions/uploadLocalFile.md"},{"text":"walrusBlobUrl","link":"/docs/walrus-storage/api/functions/walrusBlobUrl.md"}]}]
@@ -0,0 +1,7 @@
1
+ # Variable: DEFAULT\_RPC\_URLS
2
+
3
+ > `const` **DEFAULT\_RPC\_URLS**: `Record`\<[`WalrusNetwork`](../type-aliases/WalrusNetwork.md), `string`\>
4
+
5
+ Defined in: @meddleware/walrus-client/src/client.ts:18
6
+
7
+ Default Sui full-node RPC URLs, keyed by network.
@@ -0,0 +1,12 @@
1
+ # Variable: LONG\_TERM\_EPOCHS
2
+
3
+ > `const` **LONG\_TERM\_EPOCHS**: `200` = `200`
4
+
5
+ Defined in: @meddleware/walrus-client/src/upload.ts:24
6
+
7
+ Recommended TARGET lifetime for critical assets (~7.7 years at a ~2-week epoch
8
+ cadence). NOTE: this cannot be reached in one reservation — it exceeds
9
+ MAX\_SINGLE\_RESERVATION\_EPOCHS. Reaching it requires periodic renewal via
10
+ [extendBlobLifetime](../functions/extendBlobLifetime.md) before expiry. When passing this as an initial
11
+ `epochs` value, clamp to `MAX_SINGLE_RESERVATION_EPOCHS` first, or pass an
12
+ explicit `epochs <= 53`.
@@ -0,0 +1,15 @@
1
+ # Variable: MAINNET\_WALRUS\_PACKAGE\_CONFIG
2
+
3
+ > `const` **MAINNET\_WALRUS\_PACKAGE\_CONFIG**: `object`
4
+
5
+ Defined in: @meddleware/walrus-client/node\_modules/@mysten/walrus/dist/constants.d.mts:9
6
+
7
+ ## Type Declaration
8
+
9
+ ### stakingPoolId
10
+
11
+ > **stakingPoolId**: `string`
12
+
13
+ ### systemObjectId
14
+
15
+ > **systemObjectId**: `string`
@@ -0,0 +1,10 @@
1
+ # Variable: PUBLIC\_UPLOAD\_RELAY\_HOSTS
2
+
3
+ > `const` **PUBLIC\_UPLOAD\_RELAY\_HOSTS**: `Record`\<[`WalrusNetwork`](../type-aliases/WalrusNetwork.md), `string`\>
4
+
5
+ Defined in: @meddleware/walrus-client/src/client.ts:29
6
+
7
+ Public Mysten-operated upload relays. Used as the default when no `uploadRelayHost`
8
+ is specified. An upload relay is REQUIRED for browser uploads — direct-to-storage-node
9
+ writes fail from browsers and constrained networks. Operators who run their own relay
10
+ should pass `uploadRelayHost` to `createWalrusClient` instead.
@@ -0,0 +1,19 @@
1
+ # Variable: TESTNET\_WALRUS\_PACKAGE\_CONFIG
2
+
3
+ > `const` **TESTNET\_WALRUS\_PACKAGE\_CONFIG**: `object`
4
+
5
+ Defined in: @meddleware/walrus-client/node\_modules/@mysten/walrus/dist/constants.d.mts:4
6
+
7
+ ## Type Declaration
8
+
9
+ ### exchangeIds
10
+
11
+ > **exchangeIds**: `string`[]
12
+
13
+ ### stakingPoolId
14
+
15
+ > **stakingPoolId**: `string`
16
+
17
+ ### systemObjectId
18
+
19
+ > **systemObjectId**: `string`
@@ -0,0 +1,7 @@
1
+ # Variable: WALRUS\_AGGREGATOR\_HOSTS
2
+
3
+ > `const` **WALRUS\_AGGREGATOR\_HOSTS**: `Record`\<[`WalrusNetwork`](../type-aliases/WalrusNetwork.md), `string`\>
4
+
5
+ Defined in: @meddleware/walrus-client/src/client.ts:35
6
+
7
+ Public Walrus aggregators (serve raw blob bytes at `/v1/blobs/<blobId>`).
@@ -0,0 +1,54 @@
1
+ # Walrus Storage
2
+
3
+ Upload files to [Walrus](https://walrus.xyz) — decentralised "blob" storage on Sui — and manage how
4
+ long they live. Open the app at [sui-walrus.meddleware.co.uk](https://sui-walrus.meddleware.co.uk).
5
+
6
+ ## What it is
7
+
8
+ Walrus stores arbitrary files (called **blobs**) across a decentralised network, with the metadata and
9
+ lifetime tracked on Sui. The Meddleware Walrus Storage app is a thin front-end for it: connect a
10
+ wallet, upload a file, get back a **blob ID**, and later list and extend the blobs you own.
11
+
12
+ ## When to use it
13
+
14
+ - You need **durable, decentralised** file storage addressable by a stable ID.
15
+ - You're storing content for an app, NFT media, datasets, or documents.
16
+ - You want to store **encrypted** content — pair it with [Sealed Storage](/sealed-storage/), which
17
+ uses Walrus underneath.
18
+
19
+ When **not** to: Walrus is not a permanent free drive. Storage is paid and **time-bounded** (see
20
+ below), and blobs are public unless you encrypt them first.
21
+
22
+ ## The one thing to understand: blobs expire
23
+
24
+ ::: warning Walrus storage is time-bounded
25
+ A blob is stored for a number of **epochs** (Walrus's unit of time), not forever. When the paid
26
+ period ends, the blob can be deleted by the network. If you need to keep something, **extend its
27
+ lifetime before it expires** — the app's *My Blobs* view lets you do this.
28
+ :::
29
+
30
+ Roughly: more epochs = longer storage = higher up-front cost. The app shows you the cost before you
31
+ confirm, and long-term durations are supported for content you intend to keep.
32
+
33
+ ## Public vs gated uploads (relays)
34
+
35
+ Browser uploads go through an **upload relay**. Two modes:
36
+
37
+ - **Public relay** — the default fallback (Mysten's public relay). Works for anyone.
38
+ - **Gated relay** — Meddleware's relay, gated by an [Access Gate](/access-gate/) NFT. You prove you
39
+ hold a valid pass and the relay accepts your upload. A small **tip** covers the relay's costs, and
40
+ the app caps the tip so you never overpay.
41
+
42
+ If you don't hold a pass, uploads simply use the public relay. Either way, the blob ends up on the
43
+ same Walrus network.
44
+
45
+ ## What you get back
46
+
47
+ After an upload completes you receive a **blob ID** — the stable handle you use to read the content
48
+ back (via a Walrus aggregator) or to reference it elsewhere. See [Reference](/walrus-storage/reference)
49
+ for the exact shapes.
50
+
51
+ ## Next
52
+
53
+ - **[Using it](/walrus-storage/using)** — upload, view, and extend blobs step by step.
54
+ - **[Reference](/walrus-storage/reference)** — blob/relay shapes and the SDK API.
@@ -0,0 +1,69 @@
1
+ # Walrus Storage — reference
2
+
3
+ Shapes and identifiers behind the Walrus Storage app. Conceptual here; the **exhaustive, always-current
4
+ API** is auto-generated from the `@meddleware/walrus-client` SDK — see [SDK API](#sdk-api).
5
+
6
+ ## Blob lifetime
7
+
8
+ Walrus measures storage in **epochs**. The client exposes protocol-bounded constants (e.g. a
9
+ long-term default and a maximum single reservation) that reflect Walrus's `max_epochs_ahead`. You
10
+ choose a duration at upload time and can extend later; extension must happen **before** expiry.
11
+
12
+ ## Upload result
13
+
14
+ An upload returns a stable **blob ID** plus registration details. Conceptually:
15
+
16
+ ```ts
17
+ interface UploadResult {
18
+ blobId: string // stable handle used to read the blob back
19
+ // …registration/certification details (see generated SDK API for exact fields)
20
+ }
21
+ ```
22
+
23
+ ## Owned blob
24
+
25
+ *My Blobs* lists the blobs your address owns:
26
+
27
+ ```ts
28
+ interface OwnedBlob {
29
+ blobId: string
30
+ // …end epoch / size / object id (see generated SDK API for exact fields)
31
+ }
32
+ ```
33
+
34
+ ## Storage cost estimate
35
+
36
+ Before confirming, the app estimates cost from the chosen duration:
37
+
38
+ ```ts
39
+ interface StorageCost {
40
+ // …storage + write cost in MIST (see generated SDK API for exact fields)
41
+ }
42
+ ```
43
+
44
+ ## Gated relay: access-proof wire format
45
+
46
+ When uploading through the **gated** relay, the client proves NFT ownership with a signed proof. The
47
+ wire format is shared with the [Access Gate](/access-gate/) gateway:
48
+
49
+ - **Personal message signed by the wallet:** `nft-gate:access:<nonce>`
50
+ - **Proof token** (sent as `Authorization: Bearer …`): base64 of
51
+
52
+ ```json
53
+ { "address": "0x…", "nonce": "…", "signature": "…", "consumeDigest": "…" }
54
+ ```
55
+
56
+ The relay verifies the signature and on-chain pass ownership, then accepts the upload. See the
57
+ [Access Gate reference](/access-gate/reference) for the full protocol.
58
+
59
+ ## SDK API
60
+
61
+ The full `@meddleware/walrus-client` API — client factory, upload flows, lifetime management, owned-blob
62
+ queries, and relay access helpers — is generated here:
63
+
64
+ - [Walrus client API](./api/)
65
+
66
+ ::: tip Using the SDK in your own app?
67
+ This reference lists the shapes; the **how-to** for integrating the SDK (and self-hosting a relay) is
68
+ `dev.meddleware.co.uk` material, planned in the package's own docs.
69
+ :::
@@ -0,0 +1,53 @@
1
+ # Walrus Storage — using it
2
+
3
+ A walkthrough of the [Walrus Storage app](https://sui-walrus.meddleware.co.uk). You'll need a
4
+ [Sui wallet with a little SUI](/getting-started).
5
+
6
+ ## Upload a blob
7
+
8
+ 1. **Connect** your wallet (header).
9
+ 2. Go to the **Upload** tab and **choose a file**.
10
+ 3. Pick a **storage duration** (in epochs). The app estimates the cost — longer durations cost more
11
+ up front.
12
+ 4. If you hold an [Access Gate](/access-gate/) pass for the gated relay, the app detects it and uses
13
+ the gated relay (a capped **tip** applies); otherwise it uses the public relay.
14
+ 5. **Confirm** the transaction(s) in your wallet. Uploading registers the blob on Sui and stores the
15
+ bytes on Walrus.
16
+ 6. When it finishes you get a **blob ID** — copy it. That's how you (or anyone) reads the content back.
17
+
18
+ ::: tip Interrupted upload?
19
+ The gated flow is designed so an interrupted or retried upload **doesn't waste** a single-use pass —
20
+ the app remembers the in-progress redemption and resumes it rather than consuming another use.
21
+ :::
22
+
23
+ ## View your blobs
24
+
25
+ Open **My Blobs**. The app lists the Walrus blobs your address owns, with their IDs and remaining
26
+ lifetime. This reads on-chain ownership directly — no extra login.
27
+
28
+ ## Extend a blob's lifetime
29
+
30
+ Because blobs expire, *My Blobs* lets you **extend** one before it lapses:
31
+
32
+ 1. Find the blob in **My Blobs**.
33
+ 2. Choose **Extend** and pick how many additional epochs.
34
+ 3. Confirm the transaction. The blob's stored-until point moves out accordingly.
35
+
36
+ Do this **before** expiry — once a blob has lapsed and been removed, it can't be extended, only
37
+ re-uploaded.
38
+
39
+ ## Read a blob back
40
+
41
+ A blob ID resolves through a Walrus **aggregator** over plain HTTP. Anyone with the ID can fetch the
42
+ bytes (blobs are public unless you encrypted them first with [Sealed Storage](/sealed-storage/)).
43
+
44
+ ## Common questions
45
+
46
+ **Is my file private?** No — Walrus blobs are public. If you need privacy, use
47
+ [Sealed Storage](/sealed-storage/), which encrypts before storing.
48
+
49
+ **Why did I sign more than once?** Registering and storing can involve more than one step; the app
50
+ guides you through each wallet prompt.
51
+
52
+ **What does the tip do?** On the gated relay, the tip covers the relay's operating cost. The app
53
+ requests the minimum and caps it so you can't overpay.
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@meddleware/docs",
3
+ "version": "0.0.1",
4
+ "description": "Meddleware user documentation site (docs.meddleware.co.uk) — VitePress. Explains the DAO, Walrus Storage, Sealed Storage, and Access Gate: what each is, how to use it, and when.",
5
+ "author": "Meddleware <dev@meddleware.co.uk>",
6
+ "license": "0BSD",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/meddleware-org/docs.git"
10
+ },
11
+ "type": "module",
12
+ "files": [
13
+ "docs",
14
+ "scripts",
15
+ "tsconfig.json",
16
+ "tsconfig.typedoc.json",
17
+ "CHANGELOG.md"
18
+ ],
19
+ "scripts": {
20
+ "gen:api": "node scripts/gen-api.mjs",
21
+ "dev": "npm run gen:api && vitepress dev docs",
22
+ "build": "npm run gen:api && vitepress build docs",
23
+ "preview": "vitepress preview docs",
24
+ "type-check": "tsc --noEmit"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "dependencies": {
30
+ "@meddleware/design-tokens": "^0.1.2"
31
+ },
32
+ "devDependencies": {
33
+ "@meddleware/nft-gate-client": "^0.0.6",
34
+ "@meddleware/seal-client": "^0.0.3",
35
+ "@meddleware/walrus-client": "^0.0.11",
36
+ "@mysten/seal": "^1.4.7",
37
+ "@mysten/sui": "^2.30.0",
38
+ "@mysten/walrus": "^0.7.0",
39
+ "@types/node": "~24.12.2",
40
+ "typedoc": "^0.28.0",
41
+ "typedoc-plugin-markdown": "^4.4.0",
42
+ "typedoc-vitepress-theme": "^1.1.0",
43
+ "typescript": "~6.0.0",
44
+ "vitepress": "^1.6.3",
45
+ "vue": "^3.5.40"
46
+ },
47
+ "engines": {
48
+ "node": "^22.18.0 || >=24.12.0"
49
+ }
50
+ }
@@ -0,0 +1,107 @@
1
+ // Autodoc step for the docs site (Part C of the docs plan).
2
+ //
3
+ // Generates Markdown API reference from the published Meddleware TypeScript SDKs using TypeDoc +
4
+ // typedoc-plugin-markdown, writing into each service's `api/` subtree (git-ignored, built fresh).
5
+ // The service `reference.md` pages link into these.
6
+ //
7
+ // Design goals:
8
+ // - Exhaustive: point TypeDoc at each SDK's full public entry so nothing is hand-maintained.
9
+ // - Resilient: a missing/unresolvable package warns and writes a placeholder instead of failing
10
+ // the whole docs build. An empty result is a signal to fix the SDK's `types`/`exports`, not to
11
+ // paper over here — CI logs make that visible.
12
+ import { createRequire } from 'node:module'
13
+ import { execFileSync } from 'node:child_process'
14
+ import { mkdirSync, writeFileSync, existsSync } from 'node:fs'
15
+ import { fileURLToPath } from 'node:url'
16
+ import { dirname, resolve, join } from 'node:path'
17
+
18
+ const require = createRequire(import.meta.url)
19
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
20
+ const docsRoot = join(root, 'docs')
21
+
22
+ // Each SDK → where its generated reference lands under docs/.
23
+ const targets = [
24
+ { pkg: '@meddleware/walrus-client', out: 'walrus-storage/api', name: 'Walrus client API' },
25
+ { pkg: '@meddleware/seal-client', out: 'sealed-storage/api', name: 'Seal client API' },
26
+ { pkg: '@meddleware/nft-gate-client', out: 'access-gate/api', name: 'NFT-gate client API' },
27
+ ]
28
+
29
+ // Resolve the SDK's TypeScript entry. These packages export their `.` as `./src/index.ts`
30
+ // (string-form exports) but restrict `./package.json`, so resolve the package entry directly
31
+ // rather than via its package.json. Fall back to a manual src/index.ts probe if needed.
32
+ function resolveEntry(pkg) {
33
+ try {
34
+ // `.` export → src/index.ts for the Meddleware SDKs.
35
+ return require.resolve(pkg)
36
+ } catch {
37
+ // Fallback: locate the installed package dir without relying on an exported package.json.
38
+ try {
39
+ const dir = join(root, 'node_modules', ...pkg.split('/'))
40
+ for (const candidate of ['src/index.ts', 'index.ts', 'dist/index.d.ts']) {
41
+ const p = join(dir, candidate)
42
+ if (existsSync(p)) return p
43
+ }
44
+ } catch {
45
+ /* ignore */
46
+ }
47
+ return null
48
+ }
49
+ }
50
+
51
+ function typedocBin() {
52
+ const bin = join(root, 'node_modules', '.bin', process.platform === 'win32' ? 'typedoc.cmd' : 'typedoc')
53
+ return existsSync(bin) ? bin : null
54
+ }
55
+
56
+ let failures = 0
57
+ for (const { pkg, out, name } of targets) {
58
+ const outDir = join(docsRoot, out)
59
+ mkdirSync(outDir, { recursive: true })
60
+
61
+ const entry = resolveEntry(pkg)
62
+ const bin = typedocBin()
63
+ if (!entry || !bin) {
64
+ failures++
65
+ const why = !entry ? `could not resolve ${pkg}` : 'typedoc binary not found'
66
+ console.warn(`[gen:api] ${name}: ${why} — writing placeholder.`)
67
+ writeFileSync(
68
+ join(outDir, 'index.md'),
69
+ `# ${name}\n\n::: warning Reference not generated\nAutodoc could not run for \`${pkg}\` (${why}). ` +
70
+ `Ensure the package is installed and exposes its TypeScript \`src\`/types, then rebuild.\n:::\n`,
71
+ )
72
+ continue
73
+ }
74
+
75
+ try {
76
+ execFileSync(
77
+ bin,
78
+ [
79
+ entry,
80
+ '--plugin', 'typedoc-plugin-markdown',
81
+ '--plugin', 'typedoc-vitepress-theme',
82
+ '--out', outDir,
83
+ '--readme', 'none',
84
+ '--githubPages', 'false',
85
+ '--hideBreadcrumbs', 'true',
86
+ '--tsconfig', join(root, 'tsconfig.typedoc.json'),
87
+ '--skipErrorChecking',
88
+ '--name', name,
89
+ ],
90
+ { stdio: 'inherit', cwd: root },
91
+ )
92
+ console.log(`[gen:api] ${name}: generated → docs/${out}`)
93
+ } catch (e) {
94
+ failures++
95
+ console.warn(`[gen:api] ${name}: TypeDoc failed — writing placeholder. ${e?.message ?? e}`)
96
+ writeFileSync(
97
+ join(outDir, 'index.md'),
98
+ `# ${name}\n\n::: warning Reference not generated\nTypeDoc failed for \`${pkg}\`. See build logs.\n:::\n`,
99
+ )
100
+ }
101
+ }
102
+
103
+ if (failures) {
104
+ console.warn(`[gen:api] completed with ${failures} placeholder(s); site still builds.`)
105
+ } else {
106
+ console.log('[gen:api] all SDK references generated.')
107
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "resolveJsonModule": true,
10
+ "types": ["node"]
11
+ },
12
+ "include": ["docs/.vitepress", "scripts"]
13
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Bundler",
6
+ "strict": false,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "resolveJsonModule": true,
10
+ "allowImportingTsExtensions": true,
11
+ "noEmit": true,
12
+ "types": []
13
+ },
14
+ "//": "Used only by scripts/gen-api.mjs (TypeDoc). Includes the installed SDK sources so the TS program has inputs; TypeDoc's entryPoints then select what is documented.",
15
+ "include": [
16
+ "node_modules/@meddleware/seal-client/src",
17
+ "node_modules/@meddleware/walrus-client/src",
18
+ "node_modules/@meddleware/nft-gate-client/src"
19
+ ]
20
+ }