feat(antd-go): PrepareUploadPublic + DataMapAddress#58
Merged
Conversation
2 tasks
…al-signer public uploads Mirrors the wire shape landed in antd 0.6.1 (#57): - New method PrepareUploadPublic(ctx, path) — POSTs visibility:"public" to /v1/upload/prepare. The daemon bundles the serialized DataMap as one extra chunk in the same PreparedUpload payment batch, so the external signer signs ONE EVM transaction covering chunks + DataMap. - New field DataMapAddress on FinalizeUploadResult, populated from the daemon's response when the upload was prepared with visibility:"public". - Existing PrepareUpload / FinalizeUpload signatures unchanged. Old daemons (pre-0.6.1) don't return data_map_address, so the new field is empty for callers talking to those — backward compatible. Tests verify: - PrepareUploadPublic actually sends visibility:"public" in the request. - FinalizeUpload surfaces data_map_address when the daemon returns it. - FinalizeUpload leaves DataMapAddress empty for old daemons that don't emit the field (wire-compat). Requires antd >= 0.6.1 to take effect; calls against older daemons silently degrade to the private path (the visibility field is ignored upstream and DataMapAddress stays empty). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9479369 to
26d382c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the antd-go consumer for the visibility/data_map_address wire shape landed in antd 0.6.1 (#57). This is indelible's migration target for the bundled atomic external-signer public upload.
Change
PrepareUploadPublic(ctx, path) (*PrepareUploadResult, error)— POSTsvisibility:"public"to/v1/upload/prepare. The daemon bundles the serialized DataMap as one extra chunk in the samePreparedUploadpayment batch, so the external signer signs ONE EVM tx covering chunks + DataMap.DataMapAddress stringonFinalizeUploadResult, populated from the daemon'sdata_map_addressresponse field when the upload was prepared withvisibility:"public".PrepareUpload/FinalizeUploadsignatures unchanged. Old daemons (pre-0.6.1) don't returndata_map_address, so the new field is empty for callers talking to them — backward compatible.Wire-compat
PrepareUploadPublicDataMapAddresspopulated on finalizePrepareUploadPublicvisibilityfield, returns private prepare;DataMapAddressstays "" on finalizePrepareUpload(old method)DataMapAddressstays ""Test plan
go test ./...— 4 new test cases pass alongside existing suite:TestPrepareUploadPublicSendsVisibility— verifies the request body containsvisibility:"public"TestFinalizeUploadSurfacesDataMapAddress— verifies the new field is extracted from the responseTestFinalizeUploadOmitsDataMapAddressForPrivate— verifies wire-compat with daemons that don't emit the fielddata_map_address, download_public round-tripped byte-for-byte. See feat(antd): wire visibility through /v1/upload/prepare #57 for the on-chain artifacts.Next
antd-go/v0.6.1tag for indelible to consume.🤖 Generated with Claude Code