Skip to content

Conversation

@MHHukiewitz
Copy link
Member

BaseAccount.sign_raw() accepts raw bytes and outputs a signature as a string in the preferred encoding.

This allows signing of arbitrary data besides Aleph messages, making it a useful tool in dApp development.

@MHHukiewitz
Copy link
Member Author

Relies on #49

@hoh
Copy link
Member

hoh commented Aug 16, 2023

The diff looks good to me. Do we have any test on the new sign_raw method ?

@hoh
Copy link
Member

hoh commented Aug 16, 2023

Relies on #49

Squashed and pushed on master. Can you rebase on it ?

@hoh
Copy link
Member

hoh commented Aug 17, 2023

As discussed, sign_raw should return Bytes. The rest looks good to me.

@MHHukiewitz
Copy link
Member Author

After suggestion by @hoh I changed the signature of sign_raw(buffer: bytes) -> str: to sign_raw(buffer: bytes) -> bytes:.

As this involves a bit more invasive refactoring, I decided that it would only make sense to add more unit tests, especially to the non-existent Cosmos and Substrate (Polkadot) tests.

@odesenfans odesenfans merged commit 3b9885a into main Sep 6, 2023
@MHHukiewitz MHHukiewitz deleted the mhh-sign-raw branch September 6, 2023 13:39
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.

4 participants