Open
Conversation
b9e9112 to
f4fdf5c
Compare
alexeykoren
reviewed
Nov 11, 2024
alexeykoren
reviewed
Nov 11, 2024
Merged
This PR contains a set of additions/changes that allow ZSA Swaps to be implemented in librustzcash: - Adds Swap BundleType and Flag - Adds AuthorizedWithProof trait that defines proof() method for both Authorized and ActionGroupAuthorized - Adds utility methods e.g. from_parts() for SwapBundle, is_empty() in Builder - Changes visibility of some methods e.g. dummy() for testing in librustzcash - Removes ActionGroup structure
# Conflicts: # src/builder.rs # src/pczt/tx_extractor.rs
9d7d5fb to
874f255
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.
This PR introduces the ability to create
ActionGroupandSwapBundlefor performing asset swaps.This PR modifies the
Builder:reference_noteselement has been added, which contains reference split notes. These notes can be used when creating actions.build_action_groupfunction allows the creation of anActionGroupfrom aBuilder. Like when creating aBundle, theActionGroupwill initially be without proof and signatures. You will need to callcreate_proofandapply_signaturesto add them.This PR creates a new
SwapBundlestructure. ASwapBundleis created from a list ofActionGroups. During this creation, the following operations are performedSwapBundle(by summing the value balances of eachActionGroup).bskof theSwapBundle(by summing thebskof eachActionGroup).SwapBundlewhich is equal to the signature of the SwapBundle SIGHASH with the binding signature keybsk.TODO
ZIP