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

Murisi/borsh schemas #71

Merged
merged 3 commits into from
Mar 8, 2024
Merged

Murisi/borsh schemas #71

merged 3 commits into from
Mar 8, 2024

Conversation

murisi
Copy link
Contributor

@murisi murisi commented Feb 19, 2024

Created Borsh schemas for Transactions, Builders, and their subcomponents in order to facilitate their parsing by hardware wallets. More specifically, the changes are as follows:

  • Altered the BorshSerialize and BorshDeserialize of ValueSum to match its encoding in Transaction
  • Implemented the BorshSchema trait for Transaction, Builder, and their subcomponents.
  • Implemented BorshSerialize and BorshDeserialize for most of the structures that now have a BorshSchema. This was done by calling their pre-existing read and write methods. Hence:
    • The (de)serialization of all structures remains unchanged
    • Each structure has exactly one possible serialization
  • Fixed the deserialization of Sapling bundles in the case when there are convert descriptions but no spends or outputs
  • Fixed the serialization of Sapling bundles in the case when there are no spend, convert, and output descriptions

@murisi murisi requested review from grarco and cwgoes February 22, 2024 06:09
@murisi murisi merged commit 6cbc8bd into main Mar 8, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants