tapassets: add caller-funded asset batch anchors - #1178
Conversation
05763ee to
30134ea
Compare
30134ea to
5f10a19
Compare
d7b4852 to
6fbb09a
Compare
Return the untweaked aggregate key and sweep leaf with the batch output. Callers use them to populate BIP-371 output metadata and add an asset commitment.
Share the attempt and sealed-package state machine between tree node commits and batch-anchor commits. Require a sealed package before an attempt is considered complete.
Expose commitment previews and finalized-transfer publishing through the internal driver. Keep the logical and virtual packet fields needed to reconstruct per-issuance proof paths from sealed packages.
6fbb09a to
8703a68
Compare
Derive asset-aware batch scripts before Bitcoin funding, then commit and validate the funded anchor through tap-sdk. Persist sealed packages so completed attempts can be replayed safely. Keep one root proof path per issuance and bind merged inputs to ordered co-input paths.
8703a68 to
364f037
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8703a68438
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| anchorTx := anchor.UnsignedTx | ||
|
|
||
| internalKey, err := tree.ComputeInternalKey(req.Cosigners) |
There was a problem hiding this comment.
Deduplicate cosigners before computing the batch key
When req.Cosigners repeats a key—for example, when one client owns multiple VTXO leaves—this derives the batch script from the duplicated MuSig2 list, while BuildAssetTree normalizes the root signer set with tree.UniqueCosigners. The anchor commit can therefore succeed, but tree materialization later fails in boundFinalKey because the deduplicated root key cannot reproduce the committed batch script. Normalize the list before ComputeInternalKey (and reject nil entries) so batch derivation matches the tree signer invariant.
Useful? React with 👍 / 👎.
Summary
Grouped asset references can combine several proven issuances in one batch output, providing the batch-anchor primitive for multi-tranche onboarding.