Skip to content

Commit 52d900d

Browse files
afarukcalidevops-talus
authored andcommitted
Update docs from nexus-sdk (commit: dbd3cc843a086ea70b524cd2f623e46deaadb0f2)
1 parent 2028f66 commit 52d900d

File tree

2 files changed

+139
-2
lines changed

2 files changed

+139
-2
lines changed

nexus-sdk/guides/math-branching-with-chat.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -621,5 +621,5 @@ This extended DAG demonstrates how to combine mathematical computation with natu
621621

622622
<!-- List of references -->
623623

624-
[math-branching-entry-guide]: ./math-branching-dag-entry.md
624+
[math-branching-entry-guide]: ./math_branching-dag-entry.md
625625
[llm-openai-chat-prep-tool]: ./llm-openai-chat-prep-tool.md

tools/storage-walrus/README.md

+138-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `xyz.taluslabs.storage.walrus.upload-json`
1+
# `xyz.taluslabs.storage.walrus.upload-json@1`
22

33
Standard Nexus Tool that uploads a JSON file to Walrus and returns the blob ID.
44

@@ -54,3 +54,140 @@ The blob upload failed.
5454
- **`err.status_code`: [`Option<u16>`]** - HTTP status code if available (for network errors)
5555

5656
---
57+
58+
# `xyz.taluslabs.storage.walrus.upload-file@1`
59+
60+
Standard Nexus Tool that uploads a file to Walrus and returns the blob ID.
61+
62+
## Input
63+
64+
**`file_path`: [`String`]**
65+
66+
The path to the file to upload.
67+
68+
_opt_ **`publisher_url`: [`Option<String>`]** _default_: [`None`]
69+
70+
The walrus publisher URL.
71+
72+
_opt_ **`epochs`: [`u64`]** _default_: [`1`]
73+
74+
Number of epochs to store the file.
75+
76+
_opt_ **`send_to`: [`Option<String>`]** _default_: [`None`]
77+
78+
Optional address to which the created Blob object should be sent.
79+
80+
## Output Variants & Ports
81+
82+
**`newly_created`**
83+
84+
A new blob was created and uploaded successfully.
85+
86+
- **`newly_created.blob_id`: [`String`]** - The unique identifier for the uploaded blob
87+
- **`newly_created.end_epoch`: [`u64`]** - The epoch at which the blob will expire
88+
- **`newly_created.sui_object_id`: [`String`]** - Sui object ID of the newly created blob
89+
90+
**`already_certified`**
91+
92+
The blob was already certified in the blockchain.
93+
94+
- **`already_certified.blob_id`: [`String`]** - The unique identifier for the blob
95+
- **`already_certified.end_epoch`: [`u64`]** - The epoch at which the blob will expire
96+
- **`already_certified.tx_digest`: [`String`]** - Transaction digest of the certified blob
97+
98+
**`err`**
99+
100+
The file upload failed.
101+
102+
- **`err.reason`: [`String`]** - A detailed error message describing what went wrong
103+
- **`err.kind`: [`UploadErrorKind`]** - Type of error that occurred
104+
- Possible kinds:
105+
- `network` - Error during HTTP requests or network connectivity issues
106+
- `validation` - Invalid file data or file validation failures
107+
108+
# `xyz.taluslabs.storage.walrus.read-json@1`
109+
110+
Standard Nexus Tool that reads a JSON file from Walrus and returns the JSON data. The tool can also validate the JSON data against a provided schema.
111+
112+
## Input
113+
114+
**`blob_id`: [`String`]**
115+
116+
The blob ID of the JSON file to read.
117+
118+
_opt_ **`aggregator_url`: [`Option<String>`]** _default_: [`None`]
119+
120+
The URL of the Walrus aggregator to read the JSON from.
121+
122+
_opt_ **`json_schema`: [`Option<WalrusJsonSchema>`]** _default_: [`None`]
123+
124+
Optional JSON schema to validate the data against.
125+
126+
### WalrusJsonSchema Structure
127+
128+
- **`name`: [`String`]** - The name of the schema. Must match `[a-zA-Z0-9-_]`, with a maximum length of 64.
129+
- **`schema`: [`schemars::Schema`]** - The JSON schema for the expected output.
130+
- **`description`: [`Option<String>`]** - A description of the expected format.
131+
- **`strict`: [`Option<bool>`]** - Whether to enable strict schema adherence when validating the output.
132+
133+
## Output Variants & Ports
134+
135+
**`ok`**
136+
137+
The JSON data was read successfully.
138+
139+
- **`ok.json`: [`Value`]** - The JSON data as a structured value
140+
141+
**`err`**
142+
143+
The JSON read operation failed.
144+
145+
- **`err.reason`: [`String`]** - A detailed error message describing what went wrong
146+
- **`err.kind`: [`ReadErrorKind`]** - Type of error that occurred
147+
- Possible kinds:
148+
- `network` - Error during HTTP requests or network connectivity issues
149+
- `validation` - Invalid JSON data format or parsing failures
150+
- `schema` - Error validating the JSON against the provided schema
151+
- **`err.status_code`: [`Option<u16>`]** - HTTP status code if available (for network errors)
152+
153+
---
154+
155+
# `xyz.taluslabs.storage.walrus.verify-blob@1`
156+
157+
Standard Nexus Tool that verifies a blob in Walrus.
158+
159+
## Input
160+
161+
**`blob_id`: [`String`]**
162+
163+
The ID of the blob to verify.
164+
165+
_opt_ **`aggregator_url`: [`Option<String>`]** _default_: [`None`]
166+
167+
The URL of the Walrus aggregator to verify the blob against.
168+
169+
## Output Variants & Ports
170+
171+
**`verified`**
172+
173+
The blob exists and is verified.
174+
175+
- **`verified.blob_id`: [`String`]** - The ID of the verified blob
176+
177+
**`unverified`**
178+
179+
The blob does not exist or could not be verified.
180+
181+
- **`unverified.blob_id`: [`String`]** - The ID of the unverified blob
182+
183+
**`err`**
184+
185+
An error occurred during verification.
186+
187+
- **`err.reason`: [`String`]** - A detailed error message describing what went wrong
188+
- **`err.kind`: [`UploadErrorKind`]** - Type of error that occurred
189+
- Possible kinds:
190+
- `server` - Server-side errors during verification
191+
- **`err.status_code`: [`Option<u16>`]** - HTTP status code if available (for API errors)
192+
193+
---

0 commit comments

Comments
 (0)