Skip to content

feat: merkle batch payment external signer support - #18

Merged
Nic-dorman merged 1 commit into
feat/deep-review-fixesfrom
feat-merkle-external-signer-sdk
Apr 6, 2026
Merged

feat: merkle batch payment external signer support#18
Nic-dorman merged 1 commit into
feat/deep-review-fixesfrom
feat-merkle-external-signer-sdk

Conversation

@Nic-dorman

Copy link
Copy Markdown
Collaborator

Summary

  • Extends the two-phase upload flow (prepare/finalize) to support merkle batch payments for large files (>= 64 chunks), following the ant-client PR feat: merkle batch payment external signer support ant-client#12
  • The daemon auto-selects between wave_batch and merkle based on chunk count, returning a payment_type discriminator in the prepare response
  • All 16 SDK language bindings updated with new types, parsing, finalize_merkle_upload method, and backward compatibility
  • OpenAPI spec, llms.txt, llms-full.txt, and skill.md updated

Daemon changes

  • PrepareUploadResponse gains payment_type field ("wave_batch" | "merkle")
  • Merkle responses include depth, pool_commitments, merkle_payment_timestamp, merkle_payments_address
  • FinalizeUploadRequest accepts either tx_hashes (wave) or winner_pool_hash (merkle)
  • ant-core dependency updated to include merged PR Add wallet balance and address REST endpoints #12, evmlib bumped to 0.8.0

SDK changes (all 16 languages)

  • New model types: PoolCommitmentEntry, CandidateNodeEntry
  • Updated PrepareUploadResult with merkle fields
  • New finalize_merkle_upload method
  • Backward-compat: payment_type defaults to "wave_batch" when absent

Tests added

Go (4), Python (3), JS/TS (6), Rust (3), C# (3), C++ (4), Java (3), Ruby (3), Lua (3), Elixir (7)

Test plan

  • cargo test — 6/6 daemon tests pass
  • go test ./... — 43/43 Go SDK tests pass
  • pytest — 17/17 Python tests pass
  • npm test — 44/44 JS/TS tests pass
  • cargo test --lib — 53/53 Rust SDK tests pass
  • dotnet test — 24/24 C# tests pass
  • ./gradlew test — Java tests pass
  • ruby test/test_client.rb — 24/24 Ruby tests pass
  • E2E: prepare merkle upload → payForMerkleTree → finalize on devnet

🤖 Generated with Claude Code

…all SDKs

Extends the two-phase upload (prepare/finalize) flow to support merkle
batch payments for large files (>= 64 chunks). The daemon now auto-selects
between wave_batch and merkle based on chunk count, returning a
payment_type discriminator in the prepare response.

Daemon (antd):
- PrepareUploadResponse gains payment_type field ("wave_batch" | "merkle")
- Merkle responses include depth, pool_commitments, merkle_payment_timestamp,
  and merkle_payments_address for the payForMerkleTree() contract call
- FinalizeUploadRequest accepts either tx_hashes (wave) or winner_pool_hash (merkle)
- Handler validates request fields match the stored payment variant
- 6 unit tests for serialization/deserialization of both variants
- Updated ant-core to include merged PR #12, evmlib bumped to 0.8.0

All 16 SDK language bindings updated:
- Go, Python, JS/TS, Rust, C#, C++, Java, Kotlin, Swift, Ruby, Dart,
  Lua, Elixir, MCP — new types, updated prepare parsing, finalize_merkle_upload
  method, backward-compat default (payment_type defaults to wave_batch)
- Tests added for Go (4), Python (3), JS/TS (6), Rust (3), C# (3),
  C++ (4), Java (3), Ruby (3), Lua (3), Elixir (7)

Docs: openapi.yaml, llms.txt, llms-full.txt, skill.md updated with
both payment variants and new finalize_merkle_upload flow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Nic-dorman
Nic-dorman merged commit 5988ad6 into feat/deep-review-fixes Apr 6, 2026
@Nic-dorman
Nic-dorman deleted the feat-merkle-external-signer-sdk branch April 7, 2026 17:44
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