Repository navigation
wallet: set the asset version of interactive transfer outputs - #200
Merged
Merged
Conversation
InteractiveTxBuilder.SetAssetVersion selects the asset version of the receiver's output. The default is V0. Execute rejects an unknown version with ErrInvalidAssetVersion.
TestInteractiveTxBuilderAssetVersion sends an interactive transfer with a V1 receiver output. Bob imports the proof and lists the asset as V1. The default flow asserts a V0 output.
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.
InteractiveTxBuildercreates the receiver's output at asset version V0, whatever the version of the asset it spends.SetAssetVersionselects V0 or V1 for that output. V0 stays the default, andExecuterejects any other value withErrInvalidAssetVersion.A V1 output matters for the custom-anchor flow.
customanchor.ProofPathaccepts an unconfirmed step only on a V1 base asset, so an asset received through an interactive transfer at V0 cannot start one. The embedded engine itests in #198 receive their asset this way and skip the proof-path check for it.