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

[multikey] Add multikey support #26

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Conversation

gregnazario
Copy link
Contributor

Description

Add multikey support, and deprecate JSON payloads. They're obsolete with BCS payloads.

Test Plan

See example

Related Links

Add multikey support, and deprecate JSON payloads.  They're obsolete
with BCS payloads.
Copy link
Contributor

@davidiw davidiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I spent more of my time writing the multi ed.

Do we not have any serialized byte examples anywhere? Would love a unit test...

aptos_sdk/asymmetric_crypto_wrapper.py Show resolved Hide resolved
aptos_sdk/async_client.py Outdated Show resolved Hide resolved
aptos_sdk/async_client.py Outdated Show resolved Hide resolved
@gregnazario
Copy link
Contributor Author

I guess I spent more of my time writing the multi ed.

Do we not have any serialized byte examples anywhere? Would love a unit test...

I'm going to come back with some specs to verify the serialized byte examples. We unfortunately don't really have any / I need to make some

data, signature
), "Unable to verify signature"

except Exception:
Copy link
Contributor

@fishronsage fishronsage Aug 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't catch the exception here, otherwise the assert above will have no effect (don't know what happened)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from MultiEd25519, it's definitely not a great pattern to use. Will follow up with a PR afterwards to move this and MultiEd25519 into a two step process:

  1. One function to verify the signature and throw exceptions
  2. One function that wraps it and returns true or false

@gregnazario gregnazario merged commit 515be2c into main Aug 26, 2024
5 checks passed
@gregnazario gregnazario deleted the update-multikey-support branch August 26, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants