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

feat: Ledger sign message support #1267

Merged
merged 7 commits into from
Jan 24, 2025

Conversation

JordiParraCrespo
Copy link
Contributor

@JordiParraCrespo JordiParraCrespo commented Dec 11, 2024

Ledger sign message support

This PR adds support for message signing using Ledger hardware wallet.

Key Changes:

  • Added signMessage and signDelegateAction methods to the ledger-client.
  • Optimized CHUNK_SIZE to reduce the number of communication calls to the Ledger device.
  • Integrated signMessage into the ledger class.
  • Added unit tests to cover the new message signing functionality.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Type of change.

  • FIX - a PR of this type patches a bug.
  • FEATURE - a PR of this type introduces a new feature.
  • BUILD - a PR of this type introduces build changes.
  • CI - a PR of this type introduces CI changes.
  • DOCS - a PR of this type introduces DOCS improvement.
  • STYLE - a PR of this type introduces style changes.
  • REFACTOR - a PR of this type introduces refactoring.
  • PERFORMANCE - a PR of this type introduces performance changes.
  • TEST - a PR of this type adds more tests.
  • CHORE - a PR introduces other changes than the specified above.

@github-actions github-actions bot changed the title Ledger/feat/sign message feat: Ledger/feat/sign message Dec 11, 2024
@JordiParraCrespo JordiParraCrespo changed the title feat: Ledger/feat/sign message feat: Ledger sing message support Dec 11, 2024
@JordiParraCrespo JordiParraCrespo changed the title feat: Ledger sing message support feat: Ledger sign message support Dec 19, 2024
@trechriron
Copy link
Collaborator

@JordiParraCrespo - How did you test this?

@JordiParraCrespo
Copy link
Contributor Author

JordiParraCrespo commented Jan 24, 2025

I test it in the address-book by running: yarn nx serve react

  • Example of sign message:

image

  • Example of sign tx:

image

Copy link
Collaborator

@trechriron trechriron left a comment

Choose a reason for hiding this comment

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

LGTM, will test further in dev branch.

@trechriron trechriron merged commit 9c95789 into near:dev Jan 24, 2025
5 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