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 signMessage on Solana TurnkeySigner #202

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Conversation

montycheese
Copy link
Contributor

Summary & Motivation

  • Give sign message functionality to solana turnkey wallets

How I Tested These Changes

  • Manually tested using the unit test and hard coded api keys

Did you add a changeset?

  • yes
    If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

Copy link

codesandbox-ci bot commented Jan 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@r-n-o r-n-o self-requested a review January 22, 2024 22:49
@montycheese montycheese force-pushed the montana/sol-signmessage branch from ed1fca1 to 0ddd1cb Compare January 22, 2024 22:53
"Hello world",
turnkeySolAddress
);
expect(signature).toBeDefined();
Copy link
Collaborator

Choose a reason for hiding this comment

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

it would be great to be able to verify the signature on the spot

Copy link
Collaborator

@andrewkmin andrewkmin left a comment

Choose a reason for hiding this comment

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

lgtm! thanks for making this PR 🙏

one tiny thing to call out is that some signMessages implementations (e.g. on solana web3) are expected to return bytes/Uint8Array

@montycheese
Copy link
Contributor Author

lgtm! thanks for making this PR 🙏

one tiny thing to call out is that some signMessages implementations (e.g. on solana web3) are expected to return bytes/Uint8Array

I can return a byte array instead of string to be more generic?

@r-n-o
Copy link
Contributor

r-n-o commented Jan 23, 2024

lgtm! thanks for making this PR 🙏
one tiny thing to call out is that some signMessages implementations (e.g. on solana web3) are expected to return bytes/Uint8Array

I can return a byte array instead of string to be more generic?

Yup! That'd be perfect. Also, if we make this change, then I believe the signMessage function should accept bytes as input rather than string? If you want to keep the convenience of signing utf8-strings then maybe a separate signText function would make sense?

@montycheese montycheese force-pushed the montana/sol-signmessage branch 6 times, most recently from cbe7b90 to e478380 Compare January 23, 2024 18:36
@montycheese montycheese force-pushed the montana/sol-signmessage branch 2 times, most recently from f74ff66 to cbbfc96 Compare January 23, 2024 18:45
@montycheese montycheese force-pushed the montana/sol-signmessage branch from cbbfc96 to 3232aae Compare January 23, 2024 18:45
@r-n-o r-n-o merged commit 8061386 into main Jan 23, 2024
4 checks passed
@r-n-o r-n-o deleted the montana/sol-signmessage branch January 23, 2024 18:50
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.

3 participants