Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- verification:
source_repo: ant-sdk
source_ref: main
source_commit: 7a113b390522d76d28b8f3e5b4078f9c9418d46f
verified_date: 2026-05-26
source_commit: 7853b76d99ef9e308140b763f23d043559b204c4
verified_date: 2026-05-28
verification_mode: current-merged-truth
-->
<!-- verification:
Expand Down Expand Up @@ -107,7 +107,7 @@ curl -X POST http://localhost:8082/v1/data/prepare \
-d "{\"data\":\"$DATA_B64\"}"
```

The in-memory data prepare endpoint supports only private uploads: `visibility` is accepted but `"public"` returns `501`. To prepare a public upload with an external signer, use `POST /v1/upload/prepare` with a file path and `"visibility":"public"` instead.
The in-memory data prepare endpoint accepts `"private"` (default) or `"public"` for `visibility`. When `"public"`, the serialized DataMap is bundled into the same external-signer payment batch and published on-network on finalize; the finalize response then includes a `data_map_address` field with its network address.

The prepare endpoints return a `payment_type` discriminator. Use that value to decide which on-chain call to make and which finalize payload to send back.

Expand Down
7 changes: 3 additions & 4 deletions docs/sdk/reference/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<!-- verification:
source_repo: ant-sdk
source_ref: main
source_commit: 7a113b390522d76d28b8f3e5b4078f9c9418d46f
verified_date: 2026-05-26
source_commit: 7853b76d99ef9e308140b763f23d043559b204c4
verified_date: 2026-05-28
verification_mode: current-merged-truth
-->

Expand Down Expand Up @@ -591,7 +591,7 @@ Prepares an in-memory data upload for external signing.
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `data` | string | Yes | Base64-encoded payload |
| `visibility` | string | No | `"private"` (default) or `"public"`. `"public"` returns `501` on this endpoint. Use `/v1/upload/prepare` with a file path for public external-signer uploads. |
| `visibility` | string | No | `"private"` (default) or `"public"`. When `"public"`, the serialized DataMap is bundled into the same external-signer payment batch and published on-network on finalize; `data_map_address` is then present in the finalize response. |

**Response:**

Expand Down Expand Up @@ -731,7 +731,6 @@ curl -X POST http://localhost:8082/v1/upload/finalize \
| `404` | Not found | Check the address or `upload_id` |
| `413` | Payload too large | Split the upload or switch to file endpoints |
| `500` | Internal server error | Check daemon logs and retry |
| `501` | Not implemented | `visibility:"public"` is not supported on `/v1/data/prepare`; use `/v1/upload/prepare` with a file path instead |
| `502` | Network unreachable | Confirm the daemon can reach the Autonomi network |
| `503` | Service unavailable | Configure a wallet before calling wallet or write endpoints |

Expand Down
Loading