@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
package/docs/index.md ADDED
@@ -0,0 +1,58 @@
1
+ ---
2
+ layout: home
3
+
4
+ hero:
5
+ name: Meddleware
6
+ text: Sui tools, documented
7
+ tagline: Decentralised storage, encryption, and NFT access control on Sui — with a hosted UI for each. Learn what they are, how to use them, and when.
8
+ actions:
9
+ - theme: brand
10
+ text: Get started
11
+ link: /getting-started
12
+ - theme: alt
13
+ text: How they fit together
14
+ link: /architecture
15
+
16
+ features:
17
+ - title: DAO
18
+ details: The platform console — treasury, commission policy, community access gates, and live on-chain activity. Read-only; no wallet needed to browse.
19
+ link: /dao/
20
+ linkText: Read more
21
+ - title: Walrus Storage
22
+ details: Upload files (blobs) to Walrus, decentralised storage on Sui. Manage blob lifetimes and extend them before they expire.
23
+ link: /walrus-storage/
24
+ linkText: Read more
25
+ - title: Sealed Storage
26
+ details: Encrypt a file in your browser, store the ciphertext on Walrus, and let only the right people decrypt it — enforced by an on-chain policy.
27
+ link: /sealed-storage/
28
+ linkText: Read more
29
+ - title: Access Gate
30
+ details: Sell or grant NFT passes that gate access to content, APIs, or apps. Ownership is checked on-chain; single-use or unlimited.
31
+ link: /access-gate/
32
+ linkText: Read more
33
+ ---
34
+
35
+ ## What is this?
36
+
37
+ Meddleware runs a small family of **Sui tools**, each with a hosted web app you can use with your own
38
+ wallet. This site explains each one in plain terms:
39
+
40
+ - **[DAO](/dao/)** — a read-only console showing the platform's treasury, commission rate, the
41
+ community access gates it controls, and a live feed of gate activity.
42
+ - **[Walrus Storage](/walrus-storage/)** — upload files to [Walrus](https://walrus.xyz), a
43
+ decentralised storage network on Sui, and manage how long they live.
44
+ - **[Sealed Storage](/sealed-storage/)** — client-side encryption ([Seal](https://seal-docs.wal.app/))
45
+ layered on Walrus, so a file can be stored publicly yet only decrypted by whoever an on-chain
46
+ **policy** allows.
47
+ - **[Access Gate](/access-gate/)** — create NFT "passes" that gate access to something; buyers
48
+ purchase a pass, and ownership is verified on-chain.
49
+
50
+ New here? Start with **[Getting started](/getting-started)**, then see
51
+ **[how the tools fit together](/architecture)** — Sealed Storage, for example, is Walrus + Seal +
52
+ Access Gate working as one.
53
+
54
+ ::: tip Where's the developer documentation?
55
+ This site is for **using** the tools. Building against the SDKs, self-hosting, and white-label
56
+ deployment are covered separately on the forthcoming `dev.meddleware.co.uk`. The **API reference**
57
+ sections here are still handy if you're a developer who just wants the shapes.
58
+ :::
@@ -0,0 +1,103 @@
1
+ # Class: PolicyRegistry
2
+
3
+ Defined in: registry.ts:8
4
+
5
+ A registry of Seal policy providers. Neither ordering nor identity is privileged — the
6
+ consuming UI iterates `list()` to render its policy picker, so registering a new provider is
7
+ the only change needed to expose a new policy type.
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new PolicyRegistry**(): `PolicyRegistry`
14
+
15
+ #### Returns
16
+
17
+ `PolicyRegistry`
18
+
19
+ ## Methods
20
+
21
+ ### get()
22
+
23
+ > **get**\<`P`\>(`type`): [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<`P`\>
24
+
25
+ Defined in: registry.ts:18
26
+
27
+ Look up a provider by type, throwing a clear error if it is not registered.
28
+
29
+ #### Type Parameters
30
+
31
+ ##### P
32
+
33
+ `P` = `Record`\<`string`, `unknown`\>
34
+
35
+ #### Parameters
36
+
37
+ ##### type
38
+
39
+ `string`
40
+
41
+ #### Returns
42
+
43
+ [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<`P`\>
44
+
45
+ ***
46
+
47
+ ### has()
48
+
49
+ > **has**(`type`): `boolean`
50
+
51
+ Defined in: registry.ts:28
52
+
53
+ True if a provider is registered for `type`.
54
+
55
+ #### Parameters
56
+
57
+ ##### type
58
+
59
+ `string`
60
+
61
+ #### Returns
62
+
63
+ `boolean`
64
+
65
+ ***
66
+
67
+ ### list()
68
+
69
+ > **list**(): [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<`never`\>[]
70
+
71
+ Defined in: registry.ts:33
72
+
73
+ All registered providers, in insertion order.
74
+
75
+ #### Returns
76
+
77
+ [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<`never`\>[]
78
+
79
+ ***
80
+
81
+ ### register()
82
+
83
+ > **register**\<`P`\>(`provider`): `this`
84
+
85
+ Defined in: registry.ts:12
86
+
87
+ Register (or replace) a provider. Returns `this` for chaining.
88
+
89
+ #### Type Parameters
90
+
91
+ ##### P
92
+
93
+ `P`
94
+
95
+ #### Parameters
96
+
97
+ ##### provider
98
+
99
+ [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<`P`\>
100
+
101
+ #### Returns
102
+
103
+ `this`
@@ -0,0 +1,113 @@
1
+ # Class: SealController
2
+
3
+ Defined in: controller.ts:47
4
+
5
+ Orchestrates Seal threshold encrypt/decrypt over a policy registry, and manages the per-address
6
+ SessionKey (signed once, cached until it expires). No policy logic lives here — that is entirely
7
+ in the registered providers, so new policy types need no controller changes.
8
+
9
+ ## Constructors
10
+
11
+ ### Constructor
12
+
13
+ > **new SealController**(`cfg`, `registry`): `SealController`
14
+
15
+ Defined in: controller.ts:51
16
+
17
+ #### Parameters
18
+
19
+ ##### cfg
20
+
21
+ [`SealControllerConfig`](../interfaces/SealControllerConfig.md)
22
+
23
+ ##### registry
24
+
25
+ [`PolicyRegistry`](PolicyRegistry.md)
26
+
27
+ #### Returns
28
+
29
+ `SealController`
30
+
31
+ ## Methods
32
+
33
+ ### decrypt()
34
+
35
+ > **decrypt**\<`P`\>(`type`, `params`, `id`, `ciphertext`, `opts`): `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
36
+
37
+ Defined in: controller.ts:84
38
+
39
+ Decrypt `ciphertext` sealed under policy `type` with identity `id` (hex, from the manifest).
40
+ `params` supplies the on-chain objects the policy's `seal_approve` needs. Prompts a single
41
+ wallet personal-message signature per address to mint a SessionKey (cached until expiry).
42
+
43
+ #### Type Parameters
44
+
45
+ ##### P
46
+
47
+ `P`
48
+
49
+ #### Parameters
50
+
51
+ ##### type
52
+
53
+ `string`
54
+
55
+ ##### params
56
+
57
+ `P`
58
+
59
+ ##### id
60
+
61
+ `string`
62
+
63
+ ##### ciphertext
64
+
65
+ `Uint8Array`
66
+
67
+ ##### opts
68
+
69
+ ###### address
70
+
71
+ `string`
72
+
73
+ ###### signPersonalMessage
74
+
75
+ [`SignPersonalMessage`](../type-aliases/SignPersonalMessage.md)
76
+
77
+ #### Returns
78
+
79
+ `Promise`\<`Uint8Array`\<`ArrayBufferLike`\>\>
80
+
81
+ ***
82
+
83
+ ### encrypt()
84
+
85
+ > **encrypt**\<`P`\>(`type`, `params`, `data`): `Promise`\<[`EncryptResult`](../interfaces/EncryptResult.md)\>
86
+
87
+ Defined in: controller.ts:67
88
+
89
+ Encrypt `data` under policy `type` with `params`. Returns the identity (hex) + ciphertext.
90
+
91
+ #### Type Parameters
92
+
93
+ ##### P
94
+
95
+ `P`
96
+
97
+ #### Parameters
98
+
99
+ ##### type
100
+
101
+ `string`
102
+
103
+ ##### params
104
+
105
+ `P`
106
+
107
+ ##### data
108
+
109
+ `Uint8Array`
110
+
111
+ #### Returns
112
+
113
+ `Promise`\<[`EncryptResult`](../interfaces/EncryptResult.md)\>
@@ -0,0 +1,27 @@
1
+ # Function: buildPublishSealedContentTx()
2
+
3
+ > **buildPublishSealedContentTx**(`tx`, `packageId`, `input`): `void`
4
+
5
+ Defined in: sealed-content.ts:20
6
+
7
+ Append `seal_policies::sealed_content::publish(...)` to `tx`. Sharing a `SealedContent` makes the
8
+ content discoverable by a gate's pass-holders (via the `SealedContentPublished` event). The
9
+ pointer grants nothing on its own — confidentiality is enforced by Seal + `nft_gate`.
10
+
11
+ ## Parameters
12
+
13
+ ### tx
14
+
15
+ `Transaction`
16
+
17
+ ### packageId
18
+
19
+ `string`
20
+
21
+ ### input
22
+
23
+ [`SealedContentInput`](../interfaces/SealedContentInput.md)
24
+
25
+ ## Returns
26
+
27
+ `void`
@@ -0,0 +1,17 @@
1
+ # Function: bytesToHex()
2
+
3
+ > **bytesToHex**(`bytes`): `string`
4
+
5
+ Defined in: bytes.ts:16
6
+
7
+ Bytes → lowercase hex (no `0x`).
8
+
9
+ ## Parameters
10
+
11
+ ### bytes
12
+
13
+ `Uint8Array`
14
+
15
+ ## Returns
16
+
17
+ `string`
@@ -0,0 +1,17 @@
1
+ # Function: concatBytes()
2
+
3
+ > **concatBytes**(...`parts`): `Uint8Array`
4
+
5
+ Defined in: bytes.ts:50
6
+
7
+ Concatenate byte arrays.
8
+
9
+ ## Parameters
10
+
11
+ ### parts
12
+
13
+ ...`Uint8Array`\<`ArrayBufferLike`\>[]
14
+
15
+ ## Returns
16
+
17
+ `Uint8Array`
@@ -0,0 +1,22 @@
1
+ # Function: createDefaultRegistry()
2
+
3
+ > **createDefaultRegistry**(`accessGatePackageId?`): [`PolicyRegistry`](../classes/PolicyRegistry.md)
4
+
5
+ Defined in: default-registry.ts:13
6
+
7
+ A registry pre-loaded with the built-in providers (`nft-gate`, `time-lock`), registered as
8
+ peers in no particular priority. Consumers may `.register(...)` additional providers.
9
+
10
+ ## Parameters
11
+
12
+ ### accessGatePackageId?
13
+
14
+ `string` = `''`
15
+
16
+ The deployed `access_gate` package ID for the target network.
17
+ Pass the network-specific package ID to enable `suggest()` on the nft-gate provider.
18
+ Omit (or pass `''`) to get a zero-config registry with no chain-suggestion capability.
19
+
20
+ ## Returns
21
+
22
+ [`PolicyRegistry`](../classes/PolicyRegistry.md)
@@ -0,0 +1,21 @@
1
+ # Function: createNftGateProvider()
2
+
3
+ > **createNftGateProvider**(`accessGatePackageId?`): [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<[`NftGateParams`](../interfaces/NftGateParams.md)\>
4
+
5
+ Defined in: providers/nft-gate.ts:52
6
+
7
+ Create an nft-gate policy provider.
8
+
9
+ ## Parameters
10
+
11
+ ### accessGatePackageId?
12
+
13
+ `string` = `''`
14
+
15
+ The deployed `access_gate` package ID for the target network.
16
+ When non-empty, `suggest()` will query the chain for `AdminCap` objects owned by the
17
+ connected wallet and surface the corresponding gates as selectable options.
18
+
19
+ ## Returns
20
+
21
+ [`SealPolicyProvider`](../interfaces/SealPolicyProvider.md)\<[`NftGateParams`](../interfaces/NftGateParams.md)\>
@@ -0,0 +1,17 @@
1
+ # Function: hexToBytes()
2
+
3
+ > **hexToBytes**(`hex`): `Uint8Array`
4
+
5
+ Defined in: bytes.ts:5
6
+
7
+ Hex (with or without `0x`) → bytes. Odd-length input is left-padded with a nibble.
8
+
9
+ ## Parameters
10
+
11
+ ### hex
12
+
13
+ `string`
14
+
15
+ ## Returns
16
+
17
+ `Uint8Array`
@@ -0,0 +1,17 @@
1
+ # Function: objectIdBytes()
2
+
3
+ > **objectIdBytes**(`id`): `Uint8Array`
4
+
5
+ Defined in: bytes.ts:23
6
+
7
+ A Sui object id → its canonical 32-byte (right-aligned) representation.
8
+
9
+ ## Parameters
10
+
11
+ ### id
12
+
13
+ `string`
14
+
15
+ ## Returns
16
+
17
+ `Uint8Array`
@@ -0,0 +1,17 @@
1
+ # Function: randomBytes()
2
+
3
+ > **randomBytes**(`len`): `Uint8Array`
4
+
5
+ Defined in: bytes.ts:45
6
+
7
+ Cryptographically-random bytes (Web Crypto; available in browsers and Node ≥ 18).
8
+
9
+ ## Parameters
10
+
11
+ ### len
12
+
13
+ `number`
14
+
15
+ ## Returns
16
+
17
+ `Uint8Array`
@@ -0,0 +1,17 @@
1
+ # Function: sealedContentEventType()
2
+
3
+ > **sealedContentEventType**(`packageId`): `string`
4
+
5
+ Defined in: sealed-content.ts:47
6
+
7
+ The Move event type used to index published pointers, e.g. for `queryEvents`.
8
+
9
+ ## Parameters
10
+
11
+ ### packageId
12
+
13
+ `string`
14
+
15
+ ## Returns
16
+
17
+ `string`
@@ -0,0 +1,17 @@
1
+ # Function: u64beBytes()
2
+
3
+ > **u64beBytes**(`v`): `Uint8Array`
4
+
5
+ Defined in: bytes.ts:33
6
+
7
+ A u64 → 8 big-endian bytes (matches the on-chain decode in `seal_policies::timelock`).
8
+
9
+ ## Parameters
10
+
11
+ ### v
12
+
13
+ `number` \| `bigint`
14
+
15
+ ## Returns
16
+
17
+ `Uint8Array`
@@ -0,0 +1,45 @@
1
+ # Seal client API
2
+
3
+ ## Classes
4
+
5
+ - [PolicyRegistry](classes/PolicyRegistry.md)
6
+ - [SealController](classes/SealController.md)
7
+
8
+ ## Interfaces
9
+
10
+ - [EncryptResult](interfaces/EncryptResult.md)
11
+ - [FieldSpec](interfaces/FieldSpec.md)
12
+ - [FieldSuggestion](interfaces/FieldSuggestion.md)
13
+ - [KeyServerConfig](interfaces/KeyServerConfig.md)
14
+ - [NftGateParams](interfaces/NftGateParams.md)
15
+ - [PolicyDescriptor](interfaces/PolicyDescriptor.md)
16
+ - [SealControllerConfig](interfaces/SealControllerConfig.md)
17
+ - [SealedContentInput](interfaces/SealedContentInput.md)
18
+ - [SealedContentPointer](interfaces/SealedContentPointer.md)
19
+ - [SealedManifest](interfaces/SealedManifest.md)
20
+ - [SealPolicyProvider](interfaces/SealPolicyProvider.md)
21
+ - [SealSuggestClient](interfaces/SealSuggestClient.md)
22
+ - [SuggestContext](interfaces/SuggestContext.md)
23
+ - [TimeLockParams](interfaces/TimeLockParams.md)
24
+
25
+ ## Type Aliases
26
+
27
+ - [SignPersonalMessage](type-aliases/SignPersonalMessage.md)
28
+
29
+ ## Variables
30
+
31
+ - [~~nftGateProvider~~](variables/nftGateProvider.md)
32
+ - [timeLockProvider](variables/timeLockProvider.md)
33
+
34
+ ## Functions
35
+
36
+ - [buildPublishSealedContentTx](functions/buildPublishSealedContentTx.md)
37
+ - [bytesToHex](functions/bytesToHex.md)
38
+ - [concatBytes](functions/concatBytes.md)
39
+ - [createDefaultRegistry](functions/createDefaultRegistry.md)
40
+ - [createNftGateProvider](functions/createNftGateProvider.md)
41
+ - [hexToBytes](functions/hexToBytes.md)
42
+ - [objectIdBytes](functions/objectIdBytes.md)
43
+ - [randomBytes](functions/randomBytes.md)
44
+ - [sealedContentEventType](functions/sealedContentEventType.md)
45
+ - [u64beBytes](functions/u64beBytes.md)
@@ -0,0 +1,23 @@
1
+ # Interface: EncryptResult
2
+
3
+ Defined in: controller.ts:35
4
+
5
+ ## Properties
6
+
7
+ ### ciphertext
8
+
9
+ > **ciphertext**: `Uint8Array`
10
+
11
+ Defined in: controller.ts:39
12
+
13
+ The encrypted object bytes to store (e.g. upload to Walrus).
14
+
15
+ ***
16
+
17
+ ### id
18
+
19
+ > **id**: `string`
20
+
21
+ Defined in: controller.ts:37
22
+
23
+ Seal identity (hex, no `0x`) — persist this in the manifest; required verbatim to decrypt.
@@ -0,0 +1,51 @@
1
+ # Interface: FieldSpec
2
+
3
+ Defined in: types.ts:42
4
+
5
+ A single input field a policy needs, used to render encrypt/decrypt forms generically.
6
+
7
+ ## Properties
8
+
9
+ ### help?
10
+
11
+ > `optional` **help?**: `string`
12
+
13
+ Defined in: types.ts:50
14
+
15
+ ***
16
+
17
+ ### kind
18
+
19
+ > **kind**: `"boolean"` \| `"text"` \| `"objectId"` \| `"datetime"`
20
+
21
+ Defined in: types.ts:48
22
+
23
+ Rendering/validation hint.
24
+
25
+ ***
26
+
27
+ ### label
28
+
29
+ > **label**: `string`
30
+
31
+ Defined in: types.ts:46
32
+
33
+ Human label for the form.
34
+
35
+ ***
36
+
37
+ ### name
38
+
39
+ > **name**: `string`
40
+
41
+ Defined in: types.ts:44
42
+
43
+ Key in the provider's params object.
44
+
45
+ ***
46
+
47
+ ### required
48
+
49
+ > **required**: `boolean`
50
+
51
+ Defined in: types.ts:49
@@ -0,0 +1,21 @@
1
+ # Interface: FieldSuggestion
2
+
3
+ Defined in: types.ts:4
4
+
5
+ A suggested value for a policy form field, sourced from chain state.
6
+
7
+ ## Properties
8
+
9
+ ### label
10
+
11
+ > **label**: `string`
12
+
13
+ Defined in: types.ts:6
14
+
15
+ ***
16
+
17
+ ### value
18
+
19
+ > **value**: `string`
20
+
21
+ Defined in: types.ts:5
@@ -0,0 +1,35 @@
1
+ # Interface: KeyServerConfig
2
+
3
+ Defined in: controller.ts:8
4
+
5
+ One key server in the threshold committee.
6
+
7
+ ## Properties
8
+
9
+ ### aggregatorUrl?
10
+
11
+ > `optional` **aggregatorUrl?**: `string`
12
+
13
+ Defined in: controller.ts:14
14
+
15
+ Aggregator URL — required for committee-mode key servers (all fetch-key calls proxy it).
16
+
17
+ ***
18
+
19
+ ### objectId
20
+
21
+ > **objectId**: `string`
22
+
23
+ Defined in: controller.ts:10
24
+
25
+ On-chain key server object id.
26
+
27
+ ***
28
+
29
+ ### weight?
30
+
31
+ > `optional` **weight?**: `number`
32
+
33
+ Defined in: controller.ts:12
34
+
35
+ Contribution toward the threshold (default 1).
@@ -0,0 +1,33 @@
1
+ # Interface: NftGateParams
2
+
3
+ Defined in: providers/nft-gate.ts:4
4
+
5
+ ## Properties
6
+
7
+ ### gateId
8
+
9
+ > **gateId**: `string`
10
+
11
+ Defined in: providers/nft-gate.ts:6
12
+
13
+ Access gate shared object id (0x…). Needed to encrypt AND decrypt.
14
+
15
+ ***
16
+
17
+ ### nftId?
18
+
19
+ > `optional` **nftId?**: `string`
20
+
21
+ Defined in: providers/nft-gate.ts:8
22
+
23
+ The holder's pass NFT object id. Needed only to decrypt.
24
+
25
+ ***
26
+
27
+ ### soulbound?
28
+
29
+ > `optional` **soulbound?**: `boolean`
30
+
31
+ Defined in: providers/nft-gate.ts:10
32
+
33
+ Whether the gate mints soulbound passes. Needed only to decrypt.