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

Improve signTypedData return type #915

Open
avarobinson opened this issue Aug 12, 2024 · 0 comments
Open

Improve signTypedData return type #915

avarobinson opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@avarobinson
Copy link
Collaborator

Thanks for filling out this bug report. Please provide as much detail as possible.

If your issue is with our RPC APIs and not the SDK please report your issue on (discord)[https://alchemy.com/discord].

[REQUIRED] Environment

  • Browser version:
  • AA SDK version:
  • Package:

[REQUIRED] Describe the problem

The return type of signTypedData is a Promise<Hash>, where Hash is the type defined by viem. https://accountkit.alchemy.com/packages/aa-accounts/light-account/signTypedData#promisehash

Naming wise, this is misleading, because the return value is actually the signature itself, not the hash that is being signed over. A better return type would be Hex. Technically both Hash and Hex are implemented as the template literal type 0x{string} , but their naming carries additional connotation.

How to reproduce:

Relevant code or sample repro:

@avarobinson avarobinson added the bug Something isn't working label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant