Skip to content

customanchor: preview output commitments#166

Open
darioAnongba wants to merge 1 commit into
mainfrom
issue-165-output-preview
Open

customanchor: preview output commitments#166
darioAnongba wants to merge 1 commit into
mainfrom
issue-165-output-preview

Conversation

@darioAnongba

@darioAnongba darioAnongba commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose a read-only output commitment preview on CustomAnchorPlan
  • derive exact Taproot Asset and Taproot merkle roots without signing, committing, or mutating the plan
  • cover caller-witness and backend-signer plans, split outputs, deterministic repeated previews, and index-sensitive rebuilds
  • assert preview/sealed-root parity in the existing real-tapd script-path integration test

Motivation

Hosts that embed Taproot Asset outputs in a larger transaction need the final Taproot Asset pkscripts before they can canonically order equal-value outputs. Split commitments bind the anchor output index, so the host must be able to rebuild and preview until the output permutation stabilizes before committing.

Testing

  • make fmt
  • make unit
  • go test -race . -run TestCustomAnchorOutputCommitmentPreview -count=1
  • go test -tags=itest ./itest -run ^$
  • GOWORK=off go run -modfile=tools/go.mod github.com/golangci/golangci-lint/v2/cmd/golangci-lint run --concurrency=4

Closes #165.

Expose locally derived output commitment roots before virtual packets are committed, including split and backend-signer coverage.

Closes #165.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

customanchor: preview output commitments before commit

1 participant