Ledger SDK Rust
A modular Rust SDK for communicating with Ledger hardware wallets, featuring comprehensive Ethereum app support including EIP-712 typed data signing.
Features
- Modular Architecture: Clean separation of concerns across multiple crates
- Ethereum Support: Full Ethereum app integration with EIP-712 typed data signing
- Transport Abstraction: Support for multiple transport layers (HID, etc.)
- Type Safety: Strongly typed APIs with comprehensive error handling
- Async Support: Built on async/await for modern Rust applications
Crates
| Crate | Description | Version |
|---|---|---|
ledger-apdu |
APDU types and helpers | |
ledger-transport |
Transport abstraction layer | |
ledger-transport-hid |
HID transport implementation | |
ledger-device-base |
Device and app information helpers | |
ledger-eth-app |
Ethereum app with EIP-712 support |
Installation
Add the desired crates to your Cargo.toml:
[]
= "0.0.1"
= "0.0.1"
Quick Start
Basic Ethereum Operations
use EthApp;
use TransportNativeHID;
use BipPath;
async
EIP-712 Typed Data Signing
use EthApp;
use SignEip712TypedData;
use json;
async
Building
# Build all crates
# Run tests
# Run examples
Examples
Check the examples/ directory for more comprehensive usage examples:
basic_test.rs- Basic Ethereum operationsusdc_permit_example.rs- USDC permit signing with EIP-712
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Attribution
Portions of this code are derived from the Zondax ledger-rs project (Apache-2.0). See NOTICE for details.