@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.
- package/CHANGELOG.md +14 -0
- package/LICENSE +14 -0
- package/README.md +54 -0
- package/docs/.vitepress/config.ts +101 -0
- package/docs/.vitepress/theme/custom.css +51 -0
- package/docs/.vitepress/theme/index.ts +8 -0
- package/docs/access-gate/api/functions/buildAccessProof.md +38 -0
- package/docs/access-gate/api/functions/buildAirdropTx.md +21 -0
- package/docs/access-gate/api/functions/buildConsumeTx.md +27 -0
- package/docs/access-gate/api/functions/buildCreateGateTx.md +52 -0
- package/docs/access-gate/api/functions/buildMakeGateImmutableTx.md +19 -0
- package/docs/access-gate/api/functions/buildPurchaseTx.md +23 -0
- package/docs/access-gate/api/functions/buildSetAutoBurnAtZeroTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetDefaultUsesTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetNftDescriptionTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetNftImageUrlTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetNftNameTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetPausedTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetPaymentRecipientTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetPriceTx.md +21 -0
- package/docs/access-gate/api/functions/buildSetSoulboundTx.md +21 -0
- package/docs/access-gate/api/functions/decodeAccessProof.md +17 -0
- package/docs/access-gate/api/functions/encodeAccessProof.md +17 -0
- package/docs/access-gate/api/functions/fetchAccessNftById.md +27 -0
- package/docs/access-gate/api/functions/fetchAccessNfts.md +34 -0
- package/docs/access-gate/api/functions/fetchAdminCaps.md +30 -0
- package/docs/access-gate/api/functions/fetchChallenge.md +32 -0
- package/docs/access-gate/api/functions/fetchGate.md +26 -0
- package/docs/access-gate/api/functions/fetchOwnedGates.md +31 -0
- package/docs/access-gate/api/functions/ownsAccessNft.md +35 -0
- package/docs/access-gate/api/functions/parseAdminCap.md +26 -0
- package/docs/access-gate/api/functions/parseGate.md +19 -0
- package/docs/access-gate/api/functions/parseOwnedAccessNft.md +19 -0
- package/docs/access-gate/api/functions/personalMessageForNonce.md +18 -0
- package/docs/access-gate/api/index.md +47 -0
- package/docs/access-gate/api/interfaces/AccessGateConfig.md +57 -0
- package/docs/access-gate/api/interfaces/AccessProof.md +46 -0
- package/docs/access-gate/api/interfaces/Challenge.md +25 -0
- package/docs/access-gate/api/interfaces/GateAdminContext.md +37 -0
- package/docs/access-gate/api/interfaces/OwnedAccessNft.md +31 -0
- package/docs/access-gate/api/interfaces/OwnedGate.md +125 -0
- package/docs/access-gate/api/interfaces/OwnedObjectsClient.md +49 -0
- package/docs/access-gate/api/interfaces/SuiObjectClient.md +37 -0
- package/docs/access-gate/api/type-aliases/PersonalMessageSigner.md +17 -0
- package/docs/access-gate/api/typedoc-sidebar.json +1 -0
- package/docs/access-gate/index.md +61 -0
- package/docs/access-gate/reference.md +111 -0
- package/docs/access-gate/using.md +68 -0
- package/docs/architecture.md +61 -0
- package/docs/dao/index.md +71 -0
- package/docs/dao/reference.md +94 -0
- package/docs/getting-started.md +59 -0
- package/docs/index.md +58 -0
- package/docs/sealed-storage/api/classes/PolicyRegistry.md +103 -0
- package/docs/sealed-storage/api/classes/SealController.md +113 -0
- package/docs/sealed-storage/api/functions/buildPublishSealedContentTx.md +27 -0
- package/docs/sealed-storage/api/functions/bytesToHex.md +17 -0
- package/docs/sealed-storage/api/functions/concatBytes.md +17 -0
- package/docs/sealed-storage/api/functions/createDefaultRegistry.md +22 -0
- package/docs/sealed-storage/api/functions/createNftGateProvider.md +21 -0
- package/docs/sealed-storage/api/functions/hexToBytes.md +17 -0
- package/docs/sealed-storage/api/functions/objectIdBytes.md +17 -0
- package/docs/sealed-storage/api/functions/randomBytes.md +17 -0
- package/docs/sealed-storage/api/functions/sealedContentEventType.md +17 -0
- package/docs/sealed-storage/api/functions/u64beBytes.md +17 -0
- package/docs/sealed-storage/api/index.md +45 -0
- package/docs/sealed-storage/api/interfaces/EncryptResult.md +23 -0
- package/docs/sealed-storage/api/interfaces/FieldSpec.md +51 -0
- package/docs/sealed-storage/api/interfaces/FieldSuggestion.md +21 -0
- package/docs/sealed-storage/api/interfaces/KeyServerConfig.md +35 -0
- package/docs/sealed-storage/api/interfaces/NftGateParams.md +33 -0
- package/docs/sealed-storage/api/interfaces/PolicyDescriptor.md +49 -0
- package/docs/sealed-storage/api/interfaces/SealControllerConfig.md +63 -0
- package/docs/sealed-storage/api/interfaces/SealPolicyProvider.md +115 -0
- package/docs/sealed-storage/api/interfaces/SealSuggestClient.md +74 -0
- package/docs/sealed-storage/api/interfaces/SealedContentInput.md +45 -0
- package/docs/sealed-storage/api/interfaces/SealedContentPointer.md +53 -0
- package/docs/sealed-storage/api/interfaces/SealedManifest.md +65 -0
- package/docs/sealed-storage/api/interfaces/SuggestContext.md +25 -0
- package/docs/sealed-storage/api/interfaces/TimeLockParams.md +13 -0
- package/docs/sealed-storage/api/type-aliases/SignPersonalMessage.md +17 -0
- package/docs/sealed-storage/api/typedoc-sidebar.json +1 -0
- package/docs/sealed-storage/api/variables/nftGateProvider.md +9 -0
- package/docs/sealed-storage/api/variables/timeLockProvider.md +9 -0
- package/docs/sealed-storage/index.md +68 -0
- package/docs/sealed-storage/policies.md +52 -0
- package/docs/sealed-storage/reference.md +79 -0
- package/docs/sealed-storage/using.md +55 -0
- package/docs/walrus-storage/api/classes/RetryableWalrusClientError.md +101 -0
- package/docs/walrus-storage/api/classes/WalrusFile.md +111 -0
- package/docs/walrus-storage/api/functions/buildAccessProofToken.md +21 -0
- package/docs/walrus-storage/api/functions/certifyBlobTransaction.md +30 -0
- package/docs/walrus-storage/api/functions/createBlobUploadFlow.md +30 -0
- package/docs/walrus-storage/api/functions/createRelayAccessToken.md +45 -0
- package/docs/walrus-storage/api/functions/createUploadFlow.md +30 -0
- package/docs/walrus-storage/api/functions/createWalrusClient.md +23 -0
- package/docs/walrus-storage/api/functions/estimateStorageCost.md +35 -0
- package/docs/walrus-storage/api/functions/extendBlobLifetime.md +40 -0
- package/docs/walrus-storage/api/functions/extendBlobLifetimeTransaction.md +34 -0
- package/docs/walrus-storage/api/functions/fetchOwnedWalrusBlobs.md +34 -0
- package/docs/walrus-storage/api/functions/fetchRelayChallenge.md +32 -0
- package/docs/walrus-storage/api/functions/getWalrusPackageConfig.md +25 -0
- package/docs/walrus-storage/api/functions/personalMessageForNonce.md +18 -0
- package/docs/walrus-storage/api/functions/readBlobAttributes.md +27 -0
- package/docs/walrus-storage/api/functions/setBlobAttributes.md +40 -0
- package/docs/walrus-storage/api/functions/setBlobAttributesTransaction.md +34 -0
- package/docs/walrus-storage/api/functions/uploadBytes.md +38 -0
- package/docs/walrus-storage/api/functions/uploadImageBytes.md +34 -0
- package/docs/walrus-storage/api/functions/uploadLocalFile.md +37 -0
- package/docs/walrus-storage/api/functions/walrusBlobUrl.md +26 -0
- package/docs/walrus-storage/api/index.md +56 -0
- package/docs/walrus-storage/api/interfaces/CertifyOptions.md +46 -0
- package/docs/walrus-storage/api/interfaces/StorageCost.md +35 -0
- package/docs/walrus-storage/api/type-aliases/AccessProofInput.md +7 -0
- package/docs/walrus-storage/api/type-aliases/CreateWalrusClientOptions.md +113 -0
- package/docs/walrus-storage/api/type-aliases/ExtendOptions.md +8 -0
- package/docs/walrus-storage/api/type-aliases/OwnedBlob.md +57 -0
- package/docs/walrus-storage/api/type-aliases/PersonalMessageSigner.md +17 -0
- package/docs/walrus-storage/api/type-aliases/RelayChallenge.md +7 -0
- package/docs/walrus-storage/api/type-aliases/UploadOptions.md +37 -0
- package/docs/walrus-storage/api/type-aliases/UploadResult.md +27 -0
- package/docs/walrus-storage/api/type-aliases/WalrusClient.md +7 -0
- package/docs/walrus-storage/api/type-aliases/WalrusNetwork.md +7 -0
- package/docs/walrus-storage/api/typedoc-sidebar.json +1 -0
- package/docs/walrus-storage/api/variables/DEFAULT_RPC_URLS.md +7 -0
- package/docs/walrus-storage/api/variables/LONG_TERM_EPOCHS.md +12 -0
- package/docs/walrus-storage/api/variables/MAINNET_WALRUS_PACKAGE_CONFIG.md +15 -0
- package/docs/walrus-storage/api/variables/PUBLIC_UPLOAD_RELAY_HOSTS.md +10 -0
- package/docs/walrus-storage/api/variables/TESTNET_WALRUS_PACKAGE_CONFIG.md +19 -0
- package/docs/walrus-storage/api/variables/WALRUS_AGGREGATOR_HOSTS.md +7 -0
- package/docs/walrus-storage/index.md +54 -0
- package/docs/walrus-storage/reference.md +69 -0
- package/docs/walrus-storage/using.md +53 -0
- package/package.json +50 -0
- package/scripts/gen-api.mjs +107 -0
- package/tsconfig.json +13 -0
- package/tsconfig.typedoc.json +20 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Function: fetchRelayChallenge()
|
|
2
|
+
|
|
3
|
+
> **fetchRelayChallenge**(`relayHost`, `opts?`): `Promise`\<`Challenge`\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/access.ts:54
|
|
6
|
+
|
|
7
|
+
Fetch a fresh challenge from the gateway's `GET /v1/challenge` endpoint.
|
|
8
|
+
Tolerates both `expiresAt` (camelCase) and `expires_at` (snake_case) response shapes.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### relayHost
|
|
13
|
+
|
|
14
|
+
`string`
|
|
15
|
+
|
|
16
|
+
### opts?
|
|
17
|
+
|
|
18
|
+
#### signal?
|
|
19
|
+
|
|
20
|
+
`AbortSignal`
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`Promise`\<`Challenge`\>
|
|
25
|
+
|
|
26
|
+
## Throws
|
|
27
|
+
|
|
28
|
+
if the network request fails or the gateway returns a non-2xx status.
|
|
29
|
+
|
|
30
|
+
## Throws
|
|
31
|
+
|
|
32
|
+
if the response body is missing the required `nonce` field.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Function: getWalrusPackageConfig()
|
|
2
|
+
|
|
3
|
+
> **getWalrusPackageConfig**(`network`): `object`
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/client.ts:54
|
|
6
|
+
|
|
7
|
+
Return the Walrus on-chain package config for the given network.
|
|
8
|
+
|
|
9
|
+
## Parameters
|
|
10
|
+
|
|
11
|
+
### network
|
|
12
|
+
|
|
13
|
+
[`WalrusNetwork`](../type-aliases/WalrusNetwork.md)
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`object`
|
|
18
|
+
|
|
19
|
+
### stakingPoolId
|
|
20
|
+
|
|
21
|
+
> **stakingPoolId**: `string`
|
|
22
|
+
|
|
23
|
+
### systemObjectId
|
|
24
|
+
|
|
25
|
+
> **systemObjectId**: `string`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Function: personalMessageForNonce()
|
|
2
|
+
|
|
3
|
+
> **personalMessageForNonce**(`nonce`): `Uint8Array`
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/nft-gate-client/dist/proof.d.ts:6
|
|
6
|
+
|
|
7
|
+
The exact bytes a wallet signs (as a personal message) to answer a challenge. Both the
|
|
8
|
+
client (signing) and the gateway (verifying) MUST derive the message identically.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### nonce
|
|
13
|
+
|
|
14
|
+
`string`
|
|
15
|
+
|
|
16
|
+
## Returns
|
|
17
|
+
|
|
18
|
+
`Uint8Array`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Function: readBlobAttributes()
|
|
2
|
+
|
|
3
|
+
> **readBlobAttributes**(`client`, `blobObjectId`): `Promise`\<`Record`\<`string`, `string`\>\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:197
|
|
6
|
+
|
|
7
|
+
Read a blob's on-chain attributes.
|
|
8
|
+
|
|
9
|
+
## Parameters
|
|
10
|
+
|
|
11
|
+
### client
|
|
12
|
+
|
|
13
|
+
`ClientWithExtensions`
|
|
14
|
+
|
|
15
|
+
A Walrus-extended client.
|
|
16
|
+
|
|
17
|
+
### blobObjectId
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The on-chain Blob object id.
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<`Record`\<`string`, `string`\>\>
|
|
26
|
+
|
|
27
|
+
The attribute map, or `null` if the blob has none.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Function: setBlobAttributes()
|
|
2
|
+
|
|
3
|
+
> **setBlobAttributes**(`client`, `blobObjectId`, `signer`, `attributes`): `Promise`\<\{ `digest`: `string`; \}\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:142
|
|
6
|
+
|
|
7
|
+
Set on-chain key/value attributes on a blob (Node.js — signs and executes). A
|
|
8
|
+
`null` value deletes that attribute.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### client
|
|
13
|
+
|
|
14
|
+
`ClientWithExtensions`
|
|
15
|
+
|
|
16
|
+
A Walrus-extended client.
|
|
17
|
+
|
|
18
|
+
### blobObjectId
|
|
19
|
+
|
|
20
|
+
`string`
|
|
21
|
+
|
|
22
|
+
The on-chain Blob object id.
|
|
23
|
+
|
|
24
|
+
### signer
|
|
25
|
+
|
|
26
|
+
`Signer`
|
|
27
|
+
|
|
28
|
+
The keypair authorising the write.
|
|
29
|
+
|
|
30
|
+
### attributes
|
|
31
|
+
|
|
32
|
+
`Record`\<`string`, `string` \| `null`\>
|
|
33
|
+
|
|
34
|
+
Attributes to set; `null` deletes the key.
|
|
35
|
+
|
|
36
|
+
## Returns
|
|
37
|
+
|
|
38
|
+
`Promise`\<\{ `digest`: `string`; \}\>
|
|
39
|
+
|
|
40
|
+
The executed transaction digest.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Function: setBlobAttributesTransaction()
|
|
2
|
+
|
|
3
|
+
> **setBlobAttributesTransaction**(`client`, `blobObjectId`, `attributes`): `Promise`\<`Transaction`\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:182
|
|
6
|
+
|
|
7
|
+
Build (but do not sign) a set-blob-attributes transaction for a browser wallet
|
|
8
|
+
to sign. Browser counterpart of [setBlobAttributes](setBlobAttributes.md).
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### client
|
|
13
|
+
|
|
14
|
+
`ClientWithExtensions`
|
|
15
|
+
|
|
16
|
+
A Walrus-extended client.
|
|
17
|
+
|
|
18
|
+
### blobObjectId
|
|
19
|
+
|
|
20
|
+
`string`
|
|
21
|
+
|
|
22
|
+
The on-chain Blob object id.
|
|
23
|
+
|
|
24
|
+
### attributes
|
|
25
|
+
|
|
26
|
+
`Record`\<`string`, `string` \| `null`\>
|
|
27
|
+
|
|
28
|
+
Attributes to set; `null` deletes the key.
|
|
29
|
+
|
|
30
|
+
## Returns
|
|
31
|
+
|
|
32
|
+
`Promise`\<`Transaction`\>
|
|
33
|
+
|
|
34
|
+
An unsigned `Transaction`.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Function: uploadBytes()
|
|
2
|
+
|
|
3
|
+
> **uploadBytes**(`client`, `contents`, `identifier`, `signer`, `options?`): `Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/upload.ts:50
|
|
6
|
+
|
|
7
|
+
Upload raw bytes as a Walrus quilt (file bundle). Use this from Node.js with a keypair
|
|
8
|
+
signer; use [createUploadFlow](createUploadFlow.md) in the browser for wallet-popup-safe signing.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### client
|
|
13
|
+
|
|
14
|
+
`ClientWithExtensions`
|
|
15
|
+
|
|
16
|
+
### contents
|
|
17
|
+
|
|
18
|
+
`Uint8Array`
|
|
19
|
+
|
|
20
|
+
### identifier
|
|
21
|
+
|
|
22
|
+
`string`
|
|
23
|
+
|
|
24
|
+
### signer
|
|
25
|
+
|
|
26
|
+
`Signer`
|
|
27
|
+
|
|
28
|
+
### options?
|
|
29
|
+
|
|
30
|
+
[`UploadOptions`](../type-aliases/UploadOptions.md) = `{}`
|
|
31
|
+
|
|
32
|
+
## Returns
|
|
33
|
+
|
|
34
|
+
`Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
35
|
+
|
|
36
|
+
## Throws
|
|
37
|
+
|
|
38
|
+
if the Walrus write transaction fails or the signer rejects.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Function: uploadImageBytes()
|
|
2
|
+
|
|
3
|
+
> **uploadImageBytes**(`client`, `contents`, `signer`, `options?`): `Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/upload.ts:113
|
|
6
|
+
|
|
7
|
+
Upload raw bytes as a Walrus raw blob (served directly at `/v1/blobs/<blobId>`).
|
|
8
|
+
Use this for assets that must be URL-addressable (e.g. token icons). Node.js only.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### client
|
|
13
|
+
|
|
14
|
+
`ClientWithExtensions`
|
|
15
|
+
|
|
16
|
+
### contents
|
|
17
|
+
|
|
18
|
+
`Uint8Array`
|
|
19
|
+
|
|
20
|
+
### signer
|
|
21
|
+
|
|
22
|
+
`Signer`
|
|
23
|
+
|
|
24
|
+
### options?
|
|
25
|
+
|
|
26
|
+
[`UploadOptions`](../type-aliases/UploadOptions.md) = `{}`
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
31
|
+
|
|
32
|
+
## Throws
|
|
33
|
+
|
|
34
|
+
if the Walrus write transaction fails or the signer rejects.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Function: uploadLocalFile()
|
|
2
|
+
|
|
3
|
+
> **uploadLocalFile**(`client`, `filePath`, `identifier`, `signer`, `options?`): `Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/upload.ts:74
|
|
6
|
+
|
|
7
|
+
Read a local file and upload it as a Walrus quilt. Node.js only.
|
|
8
|
+
|
|
9
|
+
## Parameters
|
|
10
|
+
|
|
11
|
+
### client
|
|
12
|
+
|
|
13
|
+
`ClientWithExtensions`
|
|
14
|
+
|
|
15
|
+
### filePath
|
|
16
|
+
|
|
17
|
+
`string`
|
|
18
|
+
|
|
19
|
+
### identifier
|
|
20
|
+
|
|
21
|
+
`string`
|
|
22
|
+
|
|
23
|
+
### signer
|
|
24
|
+
|
|
25
|
+
`Signer`
|
|
26
|
+
|
|
27
|
+
### options?
|
|
28
|
+
|
|
29
|
+
[`UploadOptions`](../type-aliases/UploadOptions.md) = `{}`
|
|
30
|
+
|
|
31
|
+
## Returns
|
|
32
|
+
|
|
33
|
+
`Promise`\<[`UploadResult`](../type-aliases/UploadResult.md)\>
|
|
34
|
+
|
|
35
|
+
## Throws
|
|
36
|
+
|
|
37
|
+
if the file cannot be read or the upload fails.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Function: walrusBlobUrl()
|
|
2
|
+
|
|
3
|
+
> **walrusBlobUrl**(`network`, `blobId`, `aggregatorHost?`): `string`
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/client.ts:44
|
|
6
|
+
|
|
7
|
+
Public URL that serves a RAW blob's bytes (e.g. a token icon). Only meaningful
|
|
8
|
+
for blobs written with `uploadImageBytes` / `writeBlob` (raw), NOT quilts.
|
|
9
|
+
|
|
10
|
+
## Parameters
|
|
11
|
+
|
|
12
|
+
### network
|
|
13
|
+
|
|
14
|
+
[`WalrusNetwork`](../type-aliases/WalrusNetwork.md)
|
|
15
|
+
|
|
16
|
+
### blobId
|
|
17
|
+
|
|
18
|
+
`string`
|
|
19
|
+
|
|
20
|
+
### aggregatorHost?
|
|
21
|
+
|
|
22
|
+
`string`
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
`string`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Walrus client API
|
|
2
|
+
|
|
3
|
+
## Classes
|
|
4
|
+
|
|
5
|
+
- [RetryableWalrusClientError](classes/RetryableWalrusClientError.md)
|
|
6
|
+
- [WalrusFile](classes/WalrusFile.md)
|
|
7
|
+
|
|
8
|
+
## Interfaces
|
|
9
|
+
|
|
10
|
+
- [CertifyOptions](interfaces/CertifyOptions.md)
|
|
11
|
+
- [StorageCost](interfaces/StorageCost.md)
|
|
12
|
+
|
|
13
|
+
## Type Aliases
|
|
14
|
+
|
|
15
|
+
- [AccessProofInput](type-aliases/AccessProofInput.md)
|
|
16
|
+
- [CreateWalrusClientOptions](type-aliases/CreateWalrusClientOptions.md)
|
|
17
|
+
- [ExtendOptions](type-aliases/ExtendOptions.md)
|
|
18
|
+
- [OwnedBlob](type-aliases/OwnedBlob.md)
|
|
19
|
+
- [PersonalMessageSigner](type-aliases/PersonalMessageSigner.md)
|
|
20
|
+
- [RelayChallenge](type-aliases/RelayChallenge.md)
|
|
21
|
+
- [UploadOptions](type-aliases/UploadOptions.md)
|
|
22
|
+
- [UploadResult](type-aliases/UploadResult.md)
|
|
23
|
+
- [WalrusClient](type-aliases/WalrusClient.md)
|
|
24
|
+
- [WalrusNetwork](type-aliases/WalrusNetwork.md)
|
|
25
|
+
|
|
26
|
+
## Variables
|
|
27
|
+
|
|
28
|
+
- [DEFAULT\_RPC\_URLS](variables/DEFAULT_RPC_URLS.md)
|
|
29
|
+
- [LONG\_TERM\_EPOCHS](variables/LONG_TERM_EPOCHS.md)
|
|
30
|
+
- [MAINNET\_WALRUS\_PACKAGE\_CONFIG](variables/MAINNET_WALRUS_PACKAGE_CONFIG.md)
|
|
31
|
+
- [PUBLIC\_UPLOAD\_RELAY\_HOSTS](variables/PUBLIC_UPLOAD_RELAY_HOSTS.md)
|
|
32
|
+
- [TESTNET\_WALRUS\_PACKAGE\_CONFIG](variables/TESTNET_WALRUS_PACKAGE_CONFIG.md)
|
|
33
|
+
- [WALRUS\_AGGREGATOR\_HOSTS](variables/WALRUS_AGGREGATOR_HOSTS.md)
|
|
34
|
+
|
|
35
|
+
## Functions
|
|
36
|
+
|
|
37
|
+
- [buildAccessProofToken](functions/buildAccessProofToken.md)
|
|
38
|
+
- [certifyBlobTransaction](functions/certifyBlobTransaction.md)
|
|
39
|
+
- [createBlobUploadFlow](functions/createBlobUploadFlow.md)
|
|
40
|
+
- [createRelayAccessToken](functions/createRelayAccessToken.md)
|
|
41
|
+
- [createUploadFlow](functions/createUploadFlow.md)
|
|
42
|
+
- [createWalrusClient](functions/createWalrusClient.md)
|
|
43
|
+
- [estimateStorageCost](functions/estimateStorageCost.md)
|
|
44
|
+
- [extendBlobLifetime](functions/extendBlobLifetime.md)
|
|
45
|
+
- [extendBlobLifetimeTransaction](functions/extendBlobLifetimeTransaction.md)
|
|
46
|
+
- [fetchOwnedWalrusBlobs](functions/fetchOwnedWalrusBlobs.md)
|
|
47
|
+
- [fetchRelayChallenge](functions/fetchRelayChallenge.md)
|
|
48
|
+
- [getWalrusPackageConfig](functions/getWalrusPackageConfig.md)
|
|
49
|
+
- [personalMessageForNonce](functions/personalMessageForNonce.md)
|
|
50
|
+
- [readBlobAttributes](functions/readBlobAttributes.md)
|
|
51
|
+
- [setBlobAttributes](functions/setBlobAttributes.md)
|
|
52
|
+
- [setBlobAttributesTransaction](functions/setBlobAttributesTransaction.md)
|
|
53
|
+
- [uploadBytes](functions/uploadBytes.md)
|
|
54
|
+
- [uploadImageBytes](functions/uploadImageBytes.md)
|
|
55
|
+
- [uploadLocalFile](functions/uploadLocalFile.md)
|
|
56
|
+
- [walrusBlobUrl](functions/walrusBlobUrl.md)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Interface: CertifyOptions
|
|
2
|
+
|
|
3
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:71
|
|
4
|
+
|
|
5
|
+
A blob's storage-node availability certificate, serialized as base64 (from the upload step).
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
### blobId
|
|
10
|
+
|
|
11
|
+
> **blobId**: `string`
|
|
12
|
+
|
|
13
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:73
|
|
14
|
+
|
|
15
|
+
The Walrus blob id.
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### blobObjectId
|
|
20
|
+
|
|
21
|
+
> **blobObjectId**: `string`
|
|
22
|
+
|
|
23
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:75
|
|
24
|
+
|
|
25
|
+
The on-chain Blob object id (not the blob id).
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### certificate
|
|
30
|
+
|
|
31
|
+
> **certificate**: `string`
|
|
32
|
+
|
|
33
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:80
|
|
34
|
+
|
|
35
|
+
The base64 availability certificate returned by the upload step. `@mysten/walrus` accepts the
|
|
36
|
+
base64 string directly (it parses it internally), so no BCS handling is needed here.
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### deletable?
|
|
41
|
+
|
|
42
|
+
> `optional` **deletable?**: `boolean`
|
|
43
|
+
|
|
44
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:82
|
|
45
|
+
|
|
46
|
+
Must match how the blob was registered (our uploads register non-deletable).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Interface: StorageCost
|
|
2
|
+
|
|
3
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:105
|
|
4
|
+
|
|
5
|
+
Breakdown of the on-chain cost (in MIST) of storing a blob of `size` bytes for `epochs` epochs.
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
### storageCost
|
|
10
|
+
|
|
11
|
+
> **storageCost**: `bigint`
|
|
12
|
+
|
|
13
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:107
|
|
14
|
+
|
|
15
|
+
Per-epoch storage cost × epochs (the part that scales with duration / that an extend pays).
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### totalCost
|
|
20
|
+
|
|
21
|
+
> **totalCost**: `bigint`
|
|
22
|
+
|
|
23
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:111
|
|
24
|
+
|
|
25
|
+
`storageCost + writeCost`.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### writeCost
|
|
30
|
+
|
|
31
|
+
> **writeCost**: `bigint`
|
|
32
|
+
|
|
33
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:109
|
|
34
|
+
|
|
35
|
+
One-time write cost (paid on registration, not on extend).
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Type Alias: CreateWalrusClientOptions
|
|
2
|
+
|
|
3
|
+
> **CreateWalrusClientOptions** = `object`
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/client.ts:59
|
|
6
|
+
|
|
7
|
+
Options accepted by [createWalrusClient](../functions/createWalrusClient.md).
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### disableUploadRelay?
|
|
12
|
+
|
|
13
|
+
> `optional` **disableUploadRelay?**: `boolean`
|
|
14
|
+
|
|
15
|
+
Defined in: @meddleware/walrus-client/src/client.ts:105
|
|
16
|
+
|
|
17
|
+
When true, build a client with NO upload relay (direct-to-storage-node).
|
|
18
|
+
Overrides `uploadRelayHost` and the default relay fallback. Useful for
|
|
19
|
+
server-side Node.js scripts where relay infra is unnecessary.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### network?
|
|
24
|
+
|
|
25
|
+
> `optional` **network?**: `WalrusClientNetwork`
|
|
26
|
+
|
|
27
|
+
Defined in: @meddleware/walrus-client/src/client.ts:61
|
|
28
|
+
|
|
29
|
+
Target network (default `'testnet'`). Use `'localnet'` with `walrusPackageConfig` + `rpcUrl`.
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### rpcUrl?
|
|
34
|
+
|
|
35
|
+
> `optional` **rpcUrl?**: `string`
|
|
36
|
+
|
|
37
|
+
Defined in: @meddleware/walrus-client/src/client.ts:63
|
|
38
|
+
|
|
39
|
+
Override the Sui JSON-RPC/gRPC fullnode URL. Defaults to the public Mysten endpoint for the network.
|
|
40
|
+
|
|
41
|
+
***
|
|
42
|
+
|
|
43
|
+
### storageNodeUrlScheme?
|
|
44
|
+
|
|
45
|
+
> `optional` **storageNodeUrlScheme?**: `"http"` \| `"https"`
|
|
46
|
+
|
|
47
|
+
Defined in: @meddleware/walrus-client/src/client.ts:76
|
|
48
|
+
|
|
49
|
+
URL scheme used when contacting storage nodes. Defaults to `'https'`. Set `'http'` for a localnet
|
|
50
|
+
testbed whose storage nodes do not terminate TLS.
|
|
51
|
+
|
|
52
|
+
***
|
|
53
|
+
|
|
54
|
+
### uploadRelayAuthToken?
|
|
55
|
+
|
|
56
|
+
> `optional` **uploadRelayAuthToken?**: `string` \| (() => `string` \| `undefined`)
|
|
57
|
+
|
|
58
|
+
Defined in: @meddleware/walrus-client/src/client.ts:94
|
|
59
|
+
|
|
60
|
+
Bearer token for the upload relay `Authorization` header. Obtain via
|
|
61
|
+
`createRelayAccessToken` from the `access` module when the relay is NFT-gated.
|
|
62
|
+
|
|
63
|
+
May be a **provider function** resolved per request instead of a static string. This lets a
|
|
64
|
+
retained upload flow be resumed with a FRESH token: an interrupted single-use upload keeps its
|
|
65
|
+
on-chain consume (the `consumeDigest`) but must present a new challenge signature on retry, so
|
|
66
|
+
the client reads the current token on each relay call rather than baking one in at construction.
|
|
67
|
+
|
|
68
|
+
***
|
|
69
|
+
|
|
70
|
+
### uploadRelayHost?
|
|
71
|
+
|
|
72
|
+
> `optional` **uploadRelayHost?**: `string`
|
|
73
|
+
|
|
74
|
+
Defined in: @meddleware/walrus-client/src/client.ts:84
|
|
75
|
+
|
|
76
|
+
Upload relay host URL. Defaults to the public Mysten relay for the network.
|
|
77
|
+
Operators running their own relay (e.g. Meddleware's NFT-gated relay) should
|
|
78
|
+
pass their relay URL here alongside `uploadRelayAuthToken`.
|
|
79
|
+
|
|
80
|
+
***
|
|
81
|
+
|
|
82
|
+
### uploadRelayMaxTipMist?
|
|
83
|
+
|
|
84
|
+
> `optional` **uploadRelayMaxTipMist?**: `number`
|
|
85
|
+
|
|
86
|
+
Defined in: @meddleware/walrus-client/src/client.ts:99
|
|
87
|
+
|
|
88
|
+
Maximum tip payment to the upload relay in MIST (default 1,000,000 = 0.001 SUI).
|
|
89
|
+
The relay may request less; this cap prevents the client from overpaying.
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### walrusPackageConfig?
|
|
94
|
+
|
|
95
|
+
> `optional` **walrusPackageConfig?**: `WalrusPackageConfig`
|
|
96
|
+
|
|
97
|
+
Defined in: @meddleware/walrus-client/src/client.ts:71
|
|
98
|
+
|
|
99
|
+
Custom Walrus on-chain package config (system object / staking pool / exchange ids). Supply this
|
|
100
|
+
to target a network the SDK does not bundle — e.g. a localnet testbed whose ids are harvested at
|
|
101
|
+
deploy time. When set it is passed to the Walrus extension in place of the bundled network config.
|
|
102
|
+
**Caller-supplied only** — never hardcode addresses here (keeps the "no hardcoded package
|
|
103
|
+
addresses" invariant intact; the value is discovered at runtime, e.g. from `.env.localnet`).
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
107
|
+
### wasmUrl?
|
|
108
|
+
|
|
109
|
+
> `optional` **wasmUrl?**: `string`
|
|
110
|
+
|
|
111
|
+
Defined in: @meddleware/walrus-client/src/client.ts:78
|
|
112
|
+
|
|
113
|
+
Optional WASM bundle URL for the Walrus WASM client.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Type Alias: ExtendOptions
|
|
2
|
+
|
|
3
|
+
> **ExtendOptions** = \{ `endEpoch?`: `never`; `epochs`: `number`; \} \| \{ `endEpoch`: `number`; `epochs?`: `never`; \}
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/manage.ts:25
|
|
6
|
+
|
|
7
|
+
How to extend a blob's storage: either add `epochs` more, or extend up to an
|
|
8
|
+
absolute `endEpoch`. Exactly one of the two must be provided.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Type Alias: OwnedBlob
|
|
2
|
+
|
|
3
|
+
> **OwnedBlob** = `object`
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/walrus-client/src/query.ts:19
|
|
6
|
+
|
|
7
|
+
A Walrus blob object owned by a Sui address.
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### blobId
|
|
12
|
+
|
|
13
|
+
> **blobId**: `string`
|
|
14
|
+
|
|
15
|
+
Defined in: @meddleware/walrus-client/src/query.ts:23
|
|
16
|
+
|
|
17
|
+
Aggregator-URL-compatible blob id string (`GET /v1/blobs/<blobId>`).
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### certified
|
|
22
|
+
|
|
23
|
+
> **certified**: `boolean`
|
|
24
|
+
|
|
25
|
+
Defined in: @meddleware/walrus-client/src/query.ts:29
|
|
26
|
+
|
|
27
|
+
Whether the blob has been certified.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### endEpoch
|
|
32
|
+
|
|
33
|
+
> **endEpoch**: `number`
|
|
34
|
+
|
|
35
|
+
Defined in: @meddleware/walrus-client/src/query.ts:27
|
|
36
|
+
|
|
37
|
+
Epoch at which the blob's storage expires.
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### objectId
|
|
42
|
+
|
|
43
|
+
> **objectId**: `string`
|
|
44
|
+
|
|
45
|
+
Defined in: @meddleware/walrus-client/src/query.ts:21
|
|
46
|
+
|
|
47
|
+
The on-chain Blob object id.
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### size
|
|
52
|
+
|
|
53
|
+
> **size**: `number`
|
|
54
|
+
|
|
55
|
+
Defined in: @meddleware/walrus-client/src/query.ts:25
|
|
56
|
+
|
|
57
|
+
Size in bytes.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Type Alias: PersonalMessageSigner
|
|
2
|
+
|
|
3
|
+
> **PersonalMessageSigner** = (`message`) => `Promise`\<\{ `signature`: `string`; \}\>
|
|
4
|
+
|
|
5
|
+
Defined in: @meddleware/nft-gate-client/dist/proof.d.ts:12
|
|
6
|
+
|
|
7
|
+
A wallet-provided personal-message signer (e.g. wallet-standard `sui:signPersonalMessage`).
|
|
8
|
+
|
|
9
|
+
## Parameters
|
|
10
|
+
|
|
11
|
+
### message
|
|
12
|
+
|
|
13
|
+
`Uint8Array`
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
`Promise`\<\{ `signature`: `string`; \}\>
|