|
| 1 | +# `xyz.taluslabs.storage.walrus.upload-json` |
| 2 | + |
| 3 | +Standard Nexus Tool that uploads a JSON file to Walrus and returns the blob ID. |
| 4 | + |
| 5 | +## Input |
| 6 | + |
| 7 | +**`json`: [`String`]** |
| 8 | + |
| 9 | +The JSON data to upload. |
| 10 | + |
| 11 | +_opt_ **`publisher_url`: [`Option<String>`]** _default_: [`None`] |
| 12 | + |
| 13 | +The walrus publisher URL. |
| 14 | + |
| 15 | +_opt_ **`aggregator_url`: [`Option<String>`]** _default_: [`None`] |
| 16 | + |
| 17 | +The URL of the Walrus aggregator to upload the JSON to. |
| 18 | + |
| 19 | +_opt_ **`epochs`: [`u64`]** _default_: [`1`] |
| 20 | + |
| 21 | +Number of epochs to store the data. |
| 22 | + |
| 23 | +_opt_ **`send_to_address`: [`Option<String>`]** _default_: [`None`] |
| 24 | + |
| 25 | +Optional address to which the created Blob object should be sent. |
| 26 | + |
| 27 | +## Output Variants & Ports |
| 28 | + |
| 29 | +**`newly_created`** |
| 30 | + |
| 31 | +A new blob was created and uploaded successfully. |
| 32 | + |
| 33 | +- **`newly_created.blob_id`: [`String`]** - The unique identifier for the uploaded blob |
| 34 | +- **`newly_created.end_epoch`: [`u64`]** - The epoch at which the blob will expire |
| 35 | +- **`newly_created.sui_object_id`: [`String`]** - Sui object ID of the newly created blob |
| 36 | + |
| 37 | +**`already_certified`** |
| 38 | + |
| 39 | +The blob was already certified in the blockchain. |
| 40 | + |
| 41 | +- **`already_certified.blob_id`: [`String`]** - The unique identifier for the blob |
| 42 | +- **`already_certified.end_epoch`: [`u64`]** - The epoch at which the blob will expire |
| 43 | +- **`already_certified.tx_digest`: [`String`]** - Transaction digest of the certified blob |
| 44 | + |
| 45 | +**`err`** |
| 46 | + |
| 47 | +The blob upload failed. |
| 48 | + |
| 49 | +- **`err.reason`: [`String`]** - A detailed error message describing what went wrong |
| 50 | +- **`err.kind`: [`UploadErrorKind`]** - Type of error that occurred |
| 51 | + - Possible kinds: |
| 52 | + - `network` - Error during HTTP requests or network connectivity issues |
| 53 | + - `validation` - Invalid JSON input or data validation failures |
| 54 | +- **`err.status_code`: [`Option<u16>`]** - HTTP status code if available (for network errors) |
| 55 | + |
| 56 | +--- |
0 commit comments