Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement parsing and serialization of Unified Addresses #371

Closed
str4d opened this issue Apr 14, 2021 · 2 comments
Closed

Implement parsing and serialization of Unified Addresses #371

str4d opened this issue Apr 14, 2021 · 2 comments
Labels
S-committed Status: Planned work in a sprint

Comments

@str4d
Copy link
Contributor

str4d commented Apr 14, 2021

We need a way to represent a parsed Unified Address in memory, such that:

  • It is round-trip serializable.
    • Unknown receivers are cached in memory.
    • Receiver ordering is preserved.
  • It can be converted into a form that senders can use to create transactions. This could take two approaches:
    • Map the entire UA to the sender's types (so e.g. if the sender only supports transparent and Sapling, an Orchard address would be dropped, but otherwise the sender would see a Vec<Receiver>).
      • This would be a simple API that directly shows the sender's wallet the set of common supported receivers, which may make it easier to implement sender preference logic (e.g. no-transparent).
      • It would leave each wallet to implement the preference logic (e.g. preferring Orchard over Sapling).
    • Build the receiver preference logic into the conversion: the sender gets the best receiver that their sending logic supports.
      • This would help to provide consistency across multiple wallet implementations.
      • If we wanted to provide sender-preference logic (not just sender-supports logic) then we'd need to expand the API to accept the set of receiver types the sender is willing to use.

This will very likely be part of the zcash_address crate in #352.

@str4d
Copy link
Contributor Author

str4d commented Jul 30, 2021

This was implemented in #352, #407, and #416.

@str4d
Copy link
Contributor Author

str4d commented Jul 30, 2021

Oh wait, we still have to implement #418.

@str4d str4d reopened this Jul 30, 2021
@str4d str4d added S-committed Status: Planned work in a sprint and removed S-committed Status: Planned work in a sprint labels Jul 30, 2021
@r3ld3v r3ld3v closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-committed Status: Planned work in a sprint
Projects
None yet
Development

No branches or pull requests

2 participants