Skip to content

feat(antd-go)!: adopt PaymentMode enum + put/get convention (1/11)#116

Merged
Nic-dorman merged 2 commits into
mainfrom
nic/antd-go-payment-mode-rename
May 21, 2026
Merged

feat(antd-go)!: adopt PaymentMode enum + put/get convention (1/11)#116
Nic-dorman merged 2 commits into
mainfrom
nic/antd-go-payment-mode-rename

Conversation

@Nic-dorman
Copy link
Copy Markdown
Collaborator

Summary

First per-SDK PR adopting the renamed antd surface from #115. Stacks on
top of #115 (and indirectly #114); will rebase to main once those merge.

  • Renames the Go method surface to the put/get convention: DataPut /
    DataGet (private), DataPutPublic / DataGetPublic, FilePutPublic /
    FileGetPublic. Adds new FilePut / FileGet for the private-file
    endpoints introduced in feat(antd)!: normalize put/get convention + close private-file PUT and GET gaps #115.
  • PaymentMode is now a required positional argument on every put/cost
    method (REST and gRPC). The previous variadic "fake-optional" pattern is
    gone — callers pass antd.PaymentModeAuto explicitly.
  • gRPC client now threads payment_mode end-to-end. The previous gRPC
    client silently dropped the field; this PR closes that gap on both data
    and file paths plus the two Cost rpcs.
  • Result types are now per-method:
    • DataPutResult (private, returns DataMap)
    • DataPutPublicResult (public, returns Address)
    • FilePutResult (private file, returns DataMap + storage/gas/chunks/mode)
    • FilePutPublicResult (public file, returns Address + storage/gas/chunks/mode)
    • PutResult retained, now exclusive to ChunkPut
    • FileUploadResult dropped
  • Proto Go stubs regenerated from antd/proto/antd/v1/*.proto.

This is part of the 11-SDK fan-out — the remaining 10 SDKs (Rust, Python,
Java, Kotlin, C++, C#, Ruby, Dart, Elixir, Swift) will follow the same
template in subsequent PRs.

Breaking changes

Pre-1.0; no compatibility shim. Downstream Go consumers of antd-go need
to update call sites (rename methods, pass PaymentMode, switch to the
new result types). Indelible follow-up is tracked separately.

Test plan

  • go build ./... clean
  • go vet ./... clean
  • go test ./... clean (REST + gRPC mocks + integration skips)
  • TestPaymentModeWiresIntoRequestBody asserts the REST body field on
    every put/cost endpoint
  • gRPC tests assert lastPaymentMode is populated by the proto request
    on every put/cost call
  • dev2 full-stack sweep (.full-stack-sweep.sh) pass — run before merge

🤖 Generated with Claude Code

Nic-dorman added a commit that referenced this pull request May 20, 2026
Completes the G1 (script SDKs) fan-out PR. Same template as antd-go #116
and the antd-py / antd-ruby changes earlier in this branch.

- New `Antd.PaymentMode` module with `:auto` / `:merkle` / `:single` atoms
  and a `to_wire/1` helper that serializes to the daemon string.
- `Antd.Client` (REST) and `Antd.GrpcClient` get renamed functions:
  data_put_private -> data_put, data_get_private -> data_get,
  file_upload_public -> file_put_public, file_download_public ->
  file_get_public. New: file_put, file_get (the V2-340 private-file
  endpoints).
- New result structs: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult retained for chunk_put only.
- `payment_mode` is a kwarg defaulting to `:auto` on data_put,
  data_put_public, data_cost, file_put, file_put_public, file_cost
  (REST + gRPC).
- Top-level `Antd` module facade defdelegate list aligned with the
  renamed/added functions.
- Generated proto stubs (lib/antd/v1/*.pb.ex) added.
- ExUnit tests under test/antd/ updated; new wiring assertions verify
  payment_mode reaches the request body on every put/cost endpoint.
- README + examples (02_data, 04_files, 06_private_data) updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…return types, fix Quick Start .cost reads

Follow-up to 4935d8a. The earlier polish caught the put/get renames but
missed the *additions* introduced by V2-340 plus the return-type rename
on DataPutResult / DataPutPublicResult.

Per-SDK README changes across all 14 non-antd-go SDKs:
- Files API tables now list both private (file_put / file_get) and public
  (file_put_public / file_get_public) variants. Private = caller-held DataMap
  (NOT stored on-network); public = DataMap stored on-network at the
  returned address.
- Quick Start snippets stop reading result.cost on DataPutPublicResult.
  The field no longer exists (DataPutPublicResult has address,
  chunks_stored, payment_mode_used); examples now show chunks_stored
  instead. Same bug class as antd-mcp fixed.
- Data + Files signatures show the payment_mode kwarg/parameter that all
  put and cost methods accept.
- Return types corrected: DataPutResult / DataPutPublicResult / FilePutResult /
  FilePutPublicResult instead of the stale PutResult.
- Models tables (where present — py, csharp, js, zig memory-notes) list the
  new typed results and PutResult is annotated as chunk_put only.

antd-go README is updated in #116 directly and already had this content
on its branch; no change here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman force-pushed the nic/v2-340-file-upload-private branch from cc9cea2 to 7e3d414 Compare May 21, 2026 15:41
@Nic-dorman Nic-dorman changed the base branch from nic/v2-340-file-upload-private to main May 21, 2026 15:44
Nic-dorman and others added 2 commits May 21, 2026 15:45
First per-SDK PR adopting the renamed antd surface — see ant-sdk #115 for the
proto/REST contract this lands against.

API rename (private = unqualified verb, `_public` suffix = public):

- DataPutPrivate / DataGetPrivate     -> DataPut / DataGet
- FileUploadPublic / FileDownloadPublic -> FilePutPublic / FileGetPublic
- New: FilePut / FileGet (the V2-340 private-file endpoints)

PaymentMode threading:

- PaymentMode becomes a required positional arg (dropping the variadic
  "fake-optional" pattern). Callers pass antd.PaymentModeAuto explicitly.
- gRPC client now threads payment_mode on every put/cost path (previously
  the gRPC client ignored payment_mode entirely).
- DataCost and FileCost gain payment_mode parameters to match the renamed
  proto/REST request messages.

Result types:

- New: DataPutResult, DataPutPublicResult, FilePutResult, FilePutPublicResult
- Dropped: FileUploadResult (replaced by FilePutPublicResult)
- Kept: PutResult — now exclusive to ChunkPut

Tests:

- TestPaymentModeWiresIntoRequestBody asserts payment_mode reaches the REST
  body on every put/cost endpoint.
- gRPC mocks capture lastPaymentMode and gRPC tests assert the enum reaches
  the proto request field.

Proto stubs regenerated from antd/proto/antd/v1/*.proto.

Branch off nic/v2-340-file-upload-private; rebase to main once #115 lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three docs surfaces had stale Go method names / signatures pointing at the
pre-rename API:

- llms-full.txt — Go SDK Method Signatures section now lists DataPut /
  DataGet / FilePut / FileGet / FileGetPublic with their required
  PaymentMode parameter; ChunkPut/ChunkGet stay unchanged.
- README.md — top-level Go quickstart snippet passes antd.PaymentModeAuto.
- llms.txt — Go examples count fixed (4 examples spanning 01-07, not 5
  spanning 01-05 — the 04/05/06 slots are unused; example 07 is the
  external-signer one).

Other languages' sections (Java, C#, etc.) retain pre-rename signatures
on purpose — those land in each per-SDK fan-out PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman force-pushed the nic/antd-go-payment-mode-rename branch from cd3022b to 579678d Compare May 21, 2026 15:46
@Nic-dorman Nic-dorman merged commit 937ee7a into main May 21, 2026
4 checks passed
Nic-dorman added a commit that referenced this pull request May 21, 2026
Part 1 of the G1 (script SDKs) fan-out PR. Applies the same template as
antd-go #116 to Python and Ruby.

antd-py:
- New `PaymentMode` Enum (AUTO/MERKLE/SINGLE) in models.py
- Renamed methods on RestClient + AsyncRestClient + GrpcClient + AsyncGrpcClient:
  data_put_private -> data_put, data_get_private -> data_get,
  file_upload_public -> file_put_public, file_download_public -> file_get_public.
  New: file_put, file_get.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult retained for chunk_put only.
- payment_mode now a kwarg with PaymentMode.AUTO default; threaded through
  data_put, data_put_public, data_cost, file_put, file_put_public, file_cost
  on REST + gRPC paths.
- Proto stubs regenerated via scripts/generate_proto.py.
- Tests: TestPaymentModeWiring asserts payment_mode reaches the REST body on
  every put/cost endpoint; renamed/added per-method tests.
- README + examples (02_data, 04_files, 06_private_data, 07_external_signer)
  updated.

antd-ruby:
- New `Antd::PaymentMode` module with AUTO/MERKLE/SINGLE constants.
- Same Client + GrpcClient method renames and additions as antd-py.
- Same new result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult.
- Proto stubs regenerated via grpc_tools_ruby_protoc.
- Tests: WebMock body matchers assert payment_mode wires through; gRPC fake
  shim + fake stubs renamed to match new RPC names.
- README + examples (04_files, 06_private_data, 07_external_signer) updated.

Elixir update follows in a separate commit on this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
Completes the G1 (script SDKs) fan-out PR. Same template as antd-go #116
and the antd-py / antd-ruby changes earlier in this branch.

- New `Antd.PaymentMode` module with `:auto` / `:merkle` / `:single` atoms
  and a `to_wire/1` helper that serializes to the daemon string.
- `Antd.Client` (REST) and `Antd.GrpcClient` get renamed functions:
  data_put_private -> data_put, data_get_private -> data_get,
  file_upload_public -> file_put_public, file_download_public ->
  file_get_public. New: file_put, file_get (the V2-340 private-file
  endpoints).
- New result structs: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult retained for chunk_put only.
- `payment_mode` is a kwarg defaulting to `:auto` on data_put,
  data_put_public, data_cost, file_put, file_put_public, file_cost
  (REST + gRPC).
- Top-level `Antd` module facade defdelegate list aligned with the
  renamed/added functions.
- Generated proto stubs (lib/antd/v1/*.pb.ex) added.
- ExUnit tests under test/antd/ updated; new wiring assertions verify
  payment_mode reaches the request body on every put/cost endpoint.
- README + examples (02_data, 04_files, 06_private_data) updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…t convention (G1 script SDKs) (#117)

* feat(antd-py,antd-ruby)!: adopt PaymentMode enum + put/get convention

Part 1 of the G1 (script SDKs) fan-out PR. Applies the same template as
antd-go #116 to Python and Ruby.

antd-py:
- New `PaymentMode` Enum (AUTO/MERKLE/SINGLE) in models.py
- Renamed methods on RestClient + AsyncRestClient + GrpcClient + AsyncGrpcClient:
  data_put_private -> data_put, data_get_private -> data_get,
  file_upload_public -> file_put_public, file_download_public -> file_get_public.
  New: file_put, file_get.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult retained for chunk_put only.
- payment_mode now a kwarg with PaymentMode.AUTO default; threaded through
  data_put, data_put_public, data_cost, file_put, file_put_public, file_cost
  on REST + gRPC paths.
- Proto stubs regenerated via scripts/generate_proto.py.
- Tests: TestPaymentModeWiring asserts payment_mode reaches the REST body on
  every put/cost endpoint; renamed/added per-method tests.
- README + examples (02_data, 04_files, 06_private_data, 07_external_signer)
  updated.

antd-ruby:
- New `Antd::PaymentMode` module with AUTO/MERKLE/SINGLE constants.
- Same Client + GrpcClient method renames and additions as antd-py.
- Same new result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult.
- Proto stubs regenerated via grpc_tools_ruby_protoc.
- Tests: WebMock body matchers assert payment_mode wires through; gRPC fake
  shim + fake stubs renamed to match new RPC names.
- README + examples (04_files, 06_private_data, 07_external_signer) updated.

Elixir update follows in a separate commit on this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(antd-elixir)!: adopt PaymentMode enum + put/get convention

Completes the G1 (script SDKs) fan-out PR. Same template as antd-go #116
and the antd-py / antd-ruby changes earlier in this branch.

- New `Antd.PaymentMode` module with `:auto` / `:merkle` / `:single` atoms
  and a `to_wire/1` helper that serializes to the daemon string.
- `Antd.Client` (REST) and `Antd.GrpcClient` get renamed functions:
  data_put_private -> data_put, data_get_private -> data_get,
  file_upload_public -> file_put_public, file_download_public ->
  file_get_public. New: file_put, file_get (the V2-340 private-file
  endpoints).
- New result structs: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult retained for chunk_put only.
- `payment_mode` is a kwarg defaulting to `:auto` on data_put,
  data_put_public, data_cost, file_put, file_put_public, file_cost
  (REST + gRPC).
- Top-level `Antd` module facade defdelegate list aligned with the
  renamed/added functions.
- Generated proto stubs (lib/antd/v1/*.pb.ex) added.
- ExUnit tests under test/antd/ updated; new wiring assertions verify
  payment_mode reaches the request body on every put/cost endpoint.
- README + examples (02_data, 04_files, 06_private_data) updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(antd-py,antd-ruby): drop .cost reads in 02_data examples

DataPutPublicResult dropped the .cost field (REST data_put_public no
longer returns it). Surface chunks_stored + payment_mode_used instead,
matching the antd-go template.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…ed-static)

Same template as antd-go #116 and G1 (#117). PaymentMode enum (Auto/Merkle/Single)
in models.rs; new result types DataPutResult, DataPutPublicResult, FilePutResult,
FilePutPublicResult; PutResult retained for chunk_put only.

REST + gRPC method renames:
  data_put_private  -> data_put          (POST /v1/data)
  data_get_private  -> data_get          (POST /v1/data/get)
  file_upload_public -> file_put_public  (POST /v1/files/public)
  file_download_public -> file_get_public (POST /v1/files/public/get)
NEW: file_put (POST /v1/files), file_get (POST /v1/files/get)

payment_mode: PaymentMode is now REQUIRED on data_put, data_put_public,
data_cost, file_put, file_put_public, file_cost in both transports
(was previously Option<&str> for REST and hardcoded "" on gRPC).

All 56 unit + 1 doctest pass; cargo clippy --all-targets clean.
ant dev example all -l rust passes against the renamed antd daemon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…est)

Same template as antd-go #116 / antd-rust #118 / G1 #117. New PaymentMode
enum (Auto/Merkle/Single) with ToWire() extension; new result records
DataPutResult, DataPutPublicResult, FilePutResult, FilePutPublicResult;
PutResult kept for ChunkPut only; FileUploadResult removed.

REST + gRPC method renames:
  DataPutPrivateAsync   -> DataPutAsync          (POST /v1/data)
  DataGetPrivateAsync   -> DataGetAsync          (POST /v1/data/get)
  FileUploadPublicAsync -> FilePutPublicAsync    (POST /v1/files/public)
  FileDownloadPublicAsync -> FileGetPublicAsync  (POST /v1/files/public/get)
NEW: FilePutAsync (POST /v1/files), FileGetAsync (POST /v1/files/get)

paymentMode: PaymentMode parameter added to DataPutAsync, DataPutPublicAsync,
DataCostAsync, FilePutAsync, FilePutPublicAsync, FileCostAsync on both
REST and gRPC transports (kwarg with PaymentMode.Auto default; was
stringly typed Option<string?> on REST and hardcoded on gRPC).

Proto stubs regenerate via grpc-tools at dotnet build time.

dotnet build clean; dotnet test 32/32 pass.
ant dev example all -l csharp passes against the renamed antd daemon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 / G1 #117.

- New PaymentMode enum (AUTO/MERKLE/SINGLE) with wireValue() in models.
- New result records: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunkPut only; FileUploadResult
  removed.
- REST + gRPC method renames on AntdClient, AsyncAntdClient, GrpcAntdClient:
    dataPutPrivate     -> dataPut          (POST /v1/data)
    dataGetPrivate     -> dataGet          (POST /v1/data/get)
    fileUploadPublic   -> filePutPublic    (POST /v1/files/public)
    fileDownloadPublic -> fileGetPublic    (POST /v1/files/public/get)
  NEW: filePut (POST /v1/files), fileGet (POST /v1/files/get)
- paymentMode: PaymentMode parameter added to dataPut, dataPutPublic,
  dataCost, filePut, filePutPublic, fileCost on all three clients
  (REST sync, REST async, gRPC). Overloads provide PaymentMode.AUTO default.
- Proto stubs regenerated via protobuf-gradle-plugin at gradle build time.

gradlew build clean (lib + tests + examples sub-project); 40 tests pass.
ant dev example all -l java passes against the renamed antd daemon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…est/4)

Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 /
antd-java #120 / G1 #117.

- New PaymentMode enum (AUTO/MERKLE/SINGLE) with wire serializer in Models.kt.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunkPut only; FileUploadResult
  removed.
- REST + gRPC method renames on IAntdClient, AntdRestClient, AntdGrpcClient:
    dataPutPrivate     -> dataPut          (POST /v1/data)
    dataGetPrivate     -> dataGet          (POST /v1/data/get)
    fileUploadPublic   -> filePutPublic    (POST /v1/files/public)
    fileDownloadPublic -> fileGetPublic    (POST /v1/files/public/get)
  NEW: filePut (POST /v1/files), fileGet (POST /v1/files/get)
- paymentMode: PaymentMode parameter added to dataPut, dataPutPublic,
  dataCost, filePut, filePutPublic, fileCost on both transports. Default
  arg is PaymentMode.AUTO so callers can omit.
- Proto stubs regenerated via copyProtos -> protobuf-gradle-plugin at
  gradle build time (DataService.{Put,Get,Cost}, FileService.{Put,Get,
  PutPublic,GetPublic,Cost}; PutFileRequest/Response shape).

./gradlew :lib:build passes (25 tests). ./gradlew :examples:installDist
clean. ant dev example all -l kotlin runs all six examples to OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 /
antd-java #120 / antd-kotlin #123 / G1 #117.

- New `antd::PaymentMode` enum (Auto/Merkle/Single) with
  `payment_mode_wire()` helper in models.hpp.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunk_put only;
  FileUploadResult removed.
- REST + gRPC method renames on Client (REST sync), AsyncClient, GrpcClient:
    data_put_private     -> data_put          (POST /v1/data)
    data_get_private     -> data_get          (POST /v1/data/get)
    file_upload_public   -> file_put_public   (POST /v1/files/public)
    file_download_public -> file_get_public   (POST /v1/files/public/get)
  NEW: file_put (POST /v1/files), file_get (POST /v1/files/get)
- PaymentMode parameter added (defaulting to PaymentMode::Auto) to
  data_put, data_put_public, data_cost, file_put, file_put_public,
  file_cost on all three transports.
- gRPC client adjusted to the new proto RPC names: DataService.{Put,Get,
  Cost} and FileService.{Put,Get,PutPublic,GetPublic,Cost}; PutFileRequest /
  Put{File,FilePublic}Response field shape; PutPublicDataRequest +
  PutDataRequest now carry payment_mode. Dropped the broken
  `antd/v1/graph.grpc.pb.h` include + graph_stub field (the proto was
  removed pre-v1.0; this code never compiled).

cmake -B build && cmake --build build  -> all targets clean.
ctest --test-dir build                 -> 2/2 pass.
ant dev example all -l cpp             -> all five examples OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
… PaymentMode on REST SDKs (G4)

Final fan-out tranche — the four REST-only SDKs that have no proto/gRPC
work to do. Same naming + paymentMode semantics as the typed SDKs (#116,
#117, #118, #119, #120, #121, #122, #123, #124).

Per-SDK summary:

- antd-js: new `PaymentMode` const + types `DataPutResult`,
  `DataPutPublicResult`, `FilePutResult`, `FilePutPublicResult`
  (`FileUploadResult` removed; `PutResult` kept for `chunkPut`).
  Method renames on `RestClient`: `dataPutPrivate` -> `dataPut`,
  `dataGetPrivate` -> `dataGet`, `fileUploadPublic` -> `filePutPublic`,
  `fileDownloadPublic` -> `fileGetPublic`. NEW: `filePut` + `fileGet`.
  `paymentMode` option added to data/file put + cost. package-lock.json
  refresh picks up the existing `ethers` devDep that example 07 imports.

- antd-php: new `PaymentMode` backed enum + readonly result classes; same
  method renames on `AntdClient` (sync + async variants).

- antd-zig: new `PaymentMode` enum with `.wire()`; result-type rename mirrors
  the others; `dataGet` switches to POST /v1/data/get with `data_map` body
  (replaces the old GET-with-querystring path).

- antd-lua: new `models.PaymentMode` table of wire strings; method renames
  on `Client`; `data_get` / `file_get` / `file_put_public` / `file_get_public`
  go through POST bodies on the new routes.

Validated on dev2:
- antd-js: npm test (63/63 pass) + ant dev example all -l js (all six OK).
- antd-php: phpunit (31/31 pass) + ant dev example all -l php (all OK).
- antd-zig: zig 0.14.1 build test (pass) + ant dev example all -l zig.
- antd-lua: busted (26/26 pass) + ant dev example all -l lua (all OK).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…est) (#119)

Same template as antd-go #116 / antd-rust #118 / G1 #117. New PaymentMode
enum (Auto/Merkle/Single) with ToWire() extension; new result records
DataPutResult, DataPutPublicResult, FilePutResult, FilePutPublicResult;
PutResult kept for ChunkPut only; FileUploadResult removed.

REST + gRPC method renames:
  DataPutPrivateAsync   -> DataPutAsync          (POST /v1/data)
  DataGetPrivateAsync   -> DataGetAsync          (POST /v1/data/get)
  FileUploadPublicAsync -> FilePutPublicAsync    (POST /v1/files/public)
  FileDownloadPublicAsync -> FileGetPublicAsync  (POST /v1/files/public/get)
NEW: FilePutAsync (POST /v1/files), FileGetAsync (POST /v1/files/get)

paymentMode: PaymentMode parameter added to DataPutAsync, DataPutPublicAsync,
DataCostAsync, FilePutAsync, FilePutPublicAsync, FileCostAsync on both
REST and gRPC transports (kwarg with PaymentMode.Auto default; was
stringly typed Option<string?> on REST and hardcoded on gRPC).

Proto stubs regenerate via grpc-tools at dotnet build time.

dotnet build clean; dotnet test 32/32 pass.
ant dev example all -l csharp passes against the renamed antd daemon.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…120)

Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 / G1 #117.

- New PaymentMode enum (AUTO/MERKLE/SINGLE) with wireValue() in models.
- New result records: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunkPut only; FileUploadResult
  removed.
- REST + gRPC method renames on AntdClient, AsyncAntdClient, GrpcAntdClient:
    dataPutPrivate     -> dataPut          (POST /v1/data)
    dataGetPrivate     -> dataGet          (POST /v1/data/get)
    fileUploadPublic   -> filePutPublic    (POST /v1/files/public)
    fileDownloadPublic -> fileGetPublic    (POST /v1/files/public/get)
  NEW: filePut (POST /v1/files), fileGet (POST /v1/files/get)
- paymentMode: PaymentMode parameter added to dataPut, dataPutPublic,
  dataCost, filePut, filePutPublic, fileCost on all three clients
  (REST sync, REST async, gRPC). Overloads provide PaymentMode.AUTO default.
- Proto stubs regenerated via protobuf-gradle-plugin at gradle build time.

gradlew build clean (lib + tests + examples sub-project); 40 tests pass.
ant dev example all -l java passes against the renamed antd daemon.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…est/4) (#123)

Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 /
antd-java #120 / G1 #117.

- New PaymentMode enum (AUTO/MERKLE/SINGLE) with wire serializer in Models.kt.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunkPut only; FileUploadResult
  removed.
- REST + gRPC method renames on IAntdClient, AntdRestClient, AntdGrpcClient:
    dataPutPrivate     -> dataPut          (POST /v1/data)
    dataGetPrivate     -> dataGet          (POST /v1/data/get)
    fileUploadPublic   -> filePutPublic    (POST /v1/files/public)
    fileDownloadPublic -> fileGetPublic    (POST /v1/files/public/get)
  NEW: filePut (POST /v1/files), fileGet (POST /v1/files/get)
- paymentMode: PaymentMode parameter added to dataPut, dataPutPublic,
  dataCost, filePut, filePutPublic, fileCost on both transports. Default
  arg is PaymentMode.AUTO so callers can omit.
- Proto stubs regenerated via copyProtos -> protobuf-gradle-plugin at
  gradle build time (DataService.{Put,Get,Cost}, FileService.{Put,Get,
  PutPublic,GetPublic,Cost}; PutFileRequest/Response shape).

./gradlew :lib:build passes (25 tests). ./gradlew :examples:installDist
clean. ant dev example all -l kotlin runs all six examples to OK.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…/5) (#124)

Same template as antd-go #116 / antd-rust #118 / antd-csharp #119 /
antd-java #120 / antd-kotlin #123 / G1 #117.

- New `antd::PaymentMode` enum (Auto/Merkle/Single) with
  `payment_mode_wire()` helper in models.hpp.
- New result types: DataPutResult, DataPutPublicResult, FilePutResult,
  FilePutPublicResult. PutResult kept for chunk_put only;
  FileUploadResult removed.
- REST + gRPC method renames on Client (REST sync), AsyncClient, GrpcClient:
    data_put_private     -> data_put          (POST /v1/data)
    data_get_private     -> data_get          (POST /v1/data/get)
    file_upload_public   -> file_put_public   (POST /v1/files/public)
    file_download_public -> file_get_public   (POST /v1/files/public/get)
  NEW: file_put (POST /v1/files), file_get (POST /v1/files/get)
- PaymentMode parameter added (defaulting to PaymentMode::Auto) to
  data_put, data_put_public, data_cost, file_put, file_put_public,
  file_cost on all three transports.
- gRPC client adjusted to the new proto RPC names: DataService.{Put,Get,
  Cost} and FileService.{Put,Get,PutPublic,GetPublic,Cost}; PutFileRequest /
  Put{File,FilePublic}Response field shape; PutPublicDataRequest +
  PutDataRequest now carry payment_mode. Dropped the broken
  `antd/v1/graph.grpc.pb.h` include + graph_stub field (the proto was
  removed pre-v1.0; this code never compiled).

cmake -B build && cmake --build build  -> all targets clean.
ctest --test-dir build                 -> 2/2 pass.
ant dev example all -l cpp             -> all five examples OK.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
… PaymentMode on REST SDKs (G4) (#125)

Final fan-out tranche — the four REST-only SDKs that have no proto/gRPC
work to do. Same naming + paymentMode semantics as the typed SDKs (#116,
#117, #118, #119, #120, #121, #122, #123, #124).

Per-SDK summary:

- antd-js: new `PaymentMode` const + types `DataPutResult`,
  `DataPutPublicResult`, `FilePutResult`, `FilePutPublicResult`
  (`FileUploadResult` removed; `PutResult` kept for `chunkPut`).
  Method renames on `RestClient`: `dataPutPrivate` -> `dataPut`,
  `dataGetPrivate` -> `dataGet`, `fileUploadPublic` -> `filePutPublic`,
  `fileDownloadPublic` -> `fileGetPublic`. NEW: `filePut` + `fileGet`.
  `paymentMode` option added to data/file put + cost. package-lock.json
  refresh picks up the existing `ethers` devDep that example 07 imports.

- antd-php: new `PaymentMode` backed enum + readonly result classes; same
  method renames on `AntdClient` (sync + async variants).

- antd-zig: new `PaymentMode` enum with `.wire()`; result-type rename mirrors
  the others; `dataGet` switches to POST /v1/data/get with `data_map` body
  (replaces the old GET-with-querystring path).

- antd-lua: new `models.PaymentMode` table of wire strings; method renames
  on `Client`; `data_get` / `file_get` / `file_put_public` / `file_get_public`
  go through POST bodies on the new routes.

Validated on dev2:
- antd-js: npm test (63/63 pass) + ant dev example all -l js (all six OK).
- antd-php: phpunit (31/31 pass) + ant dev example all -l php (all OK).
- antd-zig: zig 0.14.1 build test (pass) + ant dev example all -l zig.
- antd-lua: busted (26/26 pass) + ant dev example all -l lua (all OK).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…118)

* feat(antd-rust)!: adopt PaymentMode enum + put/get convention (G2 typed-static)

Same template as antd-go #116 and G1 (#117). PaymentMode enum (Auto/Merkle/Single)
in models.rs; new result types DataPutResult, DataPutPublicResult, FilePutResult,
FilePutPublicResult; PutResult retained for chunk_put only.

REST + gRPC method renames:
  data_put_private  -> data_put          (POST /v1/data)
  data_get_private  -> data_get          (POST /v1/data/get)
  file_upload_public -> file_put_public  (POST /v1/files/public)
  file_download_public -> file_get_public (POST /v1/files/public/get)
NEW: file_put (POST /v1/files), file_get (POST /v1/files/get)

payment_mode: PaymentMode is now REQUIRED on data_put, data_put_public,
data_cost, file_put, file_put_public, file_cost in both transports
(was previously Option<&str> for REST and hardcoded "" on gRPC).

All 56 unit + 1 doctest pass; cargo clippy --all-targets clean.
ant dev example all -l rust passes against the renamed antd daemon.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(antd-rust): cargo fmt after stable Rust 1.95 formatter update

Same family of formatter drift the antd workspace hit. The single-line
fn signatures for file_get_public and the test bodies needed reformatting
under stable rustfmt 1.95. Pure formatting -- no semantic change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nic-dorman added a commit that referenced this pull request May 21, 2026
…return types, fix Quick Start .cost reads

Follow-up to 4935d8a. The earlier polish caught the put/get renames but
missed the *additions* introduced by V2-340 plus the return-type rename
on DataPutResult / DataPutPublicResult.

Per-SDK README changes across all 14 non-antd-go SDKs:
- Files API tables now list both private (file_put / file_get) and public
  (file_put_public / file_get_public) variants. Private = caller-held DataMap
  (NOT stored on-network); public = DataMap stored on-network at the
  returned address.
- Quick Start snippets stop reading result.cost on DataPutPublicResult.
  The field no longer exists (DataPutPublicResult has address,
  chunks_stored, payment_mode_used); examples now show chunks_stored
  instead. Same bug class as antd-mcp fixed.
- Data + Files signatures show the payment_mode kwarg/parameter that all
  put and cost methods accept.
- Return types corrected: DataPutResult / DataPutPublicResult / FilePutResult /
  FilePutPublicResult instead of the stale PutResult.
- Models tables (where present — py, csharp, js, zig memory-notes) list the
  new typed results and PutResult is annotated as chunk_put only.

antd-go README is updated in #116 directly and already had this content
on its branch; no change here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman deleted the nic/antd-go-payment-mode-rename branch May 21, 2026 16:02
Nic-dorman added a commit that referenced this pull request May 21, 2026
Cuts v0.8.0 atop v0.7.1. Substantial breaking-change roll-up of the
put/get rename, the private-file PUT/GET gap close, and several minor
surface cleanups -- bundled here so the v1.0 cut can ship stable on top.

## Breaking (antd daemon)

- feat(antd)!: bind to 127.0.0.1 by default on REST and gRPC (#107).
  Previously bound 0.0.0.0; use --bind-rest / --bind-grpc to override.
- chore: remove dead graph_entry surface from antd proto + 5 SDKs (#92).
  GraphService and its 4 RPCs are gone; REST mounts dropped.
- chore: remove dir_upload_public / dir_download_public surface (#95).
  Use file_put_public on a directory path instead; the daemon recurses.
- feat(antd)!: normalize put/get convention + close private-file PUT and
  GET gaps (#115). Method renames across proto + REST + SDKs:
    data_put_private    -> data_put
    data_get_private    -> data_get
    file_upload_public  -> file_put_public
    file_download_public -> file_get_public
  New: file_put / file_get for the private file path (previously only
  the public variant existed). New typed results: DataPutResult,
  DataPutPublicResult, FilePutResult, FilePutPublicResult; PutResult
  is now annotated as chunk_put only.

## Additive

- feat(antd): honor payment_mode on gRPC put/cost paths and REST cost
  endpoints (#114). Optional kwarg threaded through every put/cost
  signature; empty/omitted maps to "auto" so older clients keep working.
- feat: external-signer public uploads + single-chunk prepare/finalize
  across 15 SDKs (#90).
- docs+spec: openapi.yaml refreshed for the v1.0 surface, including
  POST /v1/chunks/prepare and /v1/chunks/finalize for single-chunk
  external-signer publish (#126).

## SDK fan-out (PaymentMode + put/get convention, all 15)

#116 antd-go, #117 antd-py/ruby/elixir, #118 antd-rust, #119 antd-csharp,
#120 antd-java, #121 antd-swift, #122 antd-dart, #123 antd-kotlin,
#124 antd-cpp, #125 antd-js/php/zig/lua, #127 antd-mcp.

## SDK example + build fixes

- fix(antd-go): make 03-files example self-contained and runnable (#91)
- fix(examples): make 04-files runnable across cpp/rust/elixir/lua/php/ruby/zig (#93)
- fix(examples): runnable dart 04_files + java Example03Files; add java Example03Chunks (#94)
- feat: gRPC transport example for antd-py and antd-rust (#113)
- feat(antd-py): 07_external_signer example + ant-dev dispatcher entry (#98)
- feat(antd-js): 07-external-signer example + antd-py empty-payments fix (#99)
- feat(rust/go): 07-external-signer examples (#100)
- feat(antd-csharp): 07_external_signer example (#101)
- feat(antd-java): 07_external_signer example (#102)
- feat(antd-kotlin): 07_external_signer example (#103)
- feat(antd-dart): 07_external_signer example (#104)
- feat(antd-ruby): 07_external_signer example (#105)
- feat(antd-php): 07_external_signer example (#106)
- chore(antd-kotlin): drop stale GraphDescendant from local proto copy (#108)

## Docs / infra

- docs: external-signer flow reference + ABI + python smoke test (#97)
- docs: add SECURITY.md with threat model and disclosure policy (#109)
- docs!: refresh per-SDK READMEs + llms-full.txt + openapi.yaml for v1.0 surface (#126)
- ci: add Go lint + test + vuln scanning for antd-go (#112)
- ci: extend antd-rust to sibling-repo parity (fmt + clippy + audit + doc) (#111)
- ci: skip antd/openapi.yaml and llms-full.txt from triggering CI (#128)
- chore(scripts): add full-stack + integration sweep helpers (#96)
- fix(antd-rust): regenerate Cargo.lock to unbreak --locked CI (#110)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant