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 signer support #605

Merged
merged 1 commit into from
Jun 19, 2024
Merged

feat: ledger signer support #605

merged 1 commit into from
Jun 19, 2024

Conversation

xJonathanLEI
Copy link
Owner

@xJonathanLEI xJonathanLEI commented Jun 18, 2024

The very first attempt at adding Ledger support. The Ledger support is feature-gated by a ledger feature on both the starknet-signers and starknet crates. It's turned off by default.

The current Ledger app for Starknet is quite limited: it only supports blind signing. Nevertheless, it's a huge step forward compared to software keystores.

This PR adds 2 examples that work as long as you have Ledger plugged in, unlocked, and the Starknet app open. Test with:

cargo run --example ledger_public_key
cargo run --example deploy_account_with_ledger

Major caveats of the current implementation:

  1. Confirming the public key on the device's screen is not supported;
  2. Higher-level types like Account and AccountFactory still hold the assumption that all signers are non-interactive, and would request signatures even just for fee estimation; this results in excessive signing prompts on the Ledger device; (update: implemented in feat: signer interactivity #617)
  3. The EIP-2645 path is difficult to write correctly without copy pasting; maybe we should add a type that encapsulates this and converts into DerivationPath.

That said, if anyone wants to start using it from this PR, they totally can and it's 100% functional :)

@xJonathanLEI xJonathanLEI force-pushed the dev/ledger branch 2 times, most recently from 921e402 to 26419b9 Compare June 19, 2024 05:38
@xJonathanLEI
Copy link
Owner Author

Pathfinder bug is causing test failures: eqlabs/pathfinder#2085

@xJonathanLEI xJonathanLEI merged commit 1a28e95 into master Jun 19, 2024
26 checks passed
@xJonathanLEI xJonathanLEI deleted the dev/ledger branch June 19, 2024 23:53
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.

1 participant