A comprehensive monorepo for Ledger's Web3 integration components, providing seamless hardware wallet connectivity for web applications.
Ledger Wallet Provider is a modern monorepo built with Nx, pnpm, and TypeScript that provides:
- Web Components for easy integration into any web framework
- Core SDK for advanced wallet management and transaction signing
- Test DApp for development and testing
- Framework-agnostic design with support for React, Angular, Vue, and vanilla JavaScript
| Package | Description | Version |
|---|---|---|
@ledgerhq/ledger-wallet-provider |
Main Web Component library with UI components | 1.0.0-rc.5 |
@ledgerhq/ledger-wallet-provider-core |
Core SDK for wallet management and transaction signing | 1.0.0-rc.5 |
| Application | Description |
|---|---|
test-dapp |
Next.js test application for development and testing |
- Monorepo Management: Nx
- Package Manager: pnpm with workspace support
- Toolchain Management: prototools for development environment setup
- Build System: Vite for fast builds
- Testing: Vitest for unit tests, Playwright for E2E
- UI Framework: Lit for Web Components
- Styling: Tailwind CSS with CVA
- TypeScript: 5.8.3 with strict configuration
- Linting: ESLint with TypeScript support
- Documentation: Storybook for component documentation
- Node.js: 18+ (recommended: 20+)
- pnpm: Latest version
For an easier setup, install prototools. Once installed, the prerequisite tools can be easily installed using:
cd ledger-wallet-provider
proto useThe command proto use will look into the .prototools file and install the required version of the tools needed (node, pnpm). For more information, see the prototools documentation.
# Clone the repository
git clone https://github.com/LedgerHQ/ledger-button.git ledger-wallet-provider
cd ledger-wallet-provider
# Install dependencies
pnpm install# Build the main package
pnpm nx build ledger-wallet-provider
# Start the test DApp
pnpm nx dev test-dapp
# Run Storybook for component documentation
pnpm nx storybook ledger-wallet-provider# Package-specific commands
pnpm nx <command> ledger-wallet-provider # Run commands for @ledgerhq/ledger-wallet-provider
pnpm nx <command> ledger-wallet-provider-core # Run commands for @ledgerhq/ledger-wallet-provider-core
pnpm nx <command> test-dapp # Run commands for test-dapp# Build all packages
pnpm nx run-many -t build
# Run tests
pnpm nx run-many -t test
# Run linting
pnpm nx run-many -t lint
# Run typecheck
pnpm nx run-many -t typecheck# Version management
pnpm version:patch # Patch version bump
pnpm version:minor # Minor version bump
pnpm version:major # Major version bump
pnpm version:prerelease # Prerelease version
# Release
pnpm release # Publish packagesledger-wallet-provider/
βββ packages/ # Published packages
β βββ ledger-button/ # Main Web Component library
β βββ ledger-button-core/ # Core SDK
βββ apps/ # Applications
β βββ test-dapp/ # Next.js test application
βββ tools/ # Development tools
βββ danger/ # Danger.js configuration
graph TD
A[ledger-wallet-provider] --> B[ledger-wallet-provider-core]
C[test-dapp] --> A
# Generate a new library
pnpm nx g @nx/js:lib packages/my-new-lib --publishable --importPath=@ledgerhq/my-new-lib
# Generate a new application
pnpm nx g @nx/next:app apps/my-new-appThe project uses several tools to maintain code quality:
- ESLint: Code linting with TypeScript support
- Prettier: Code formatting
- Danger.js: Automated code review
- Conventional Commits: Standardized commit messages
- Gitmoji: Emoji-based commit messages
- Unit Tests: Vitest for fast unit testing
- Component Tests: Storybook test runner
- E2E Tests: Playwright for end-to-end testing
- Visual Regression: Storybook visual testing
- Component Documentation: Storybook
- API Documentation: Generated from TypeScript definitions
- Examples: Available in the test-dapp application
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'β¨ Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project uses Conventional Commits with Gitmoji:
β¨ Add new feature
π Fix bug
π Update documentation
π¨ Improve code structureThis project is licensed under the APACHE 2.0 License - see the LICENSE file for details.
- Nx Documentation: nx.dev
- pnpm Documentation: pnpm.io
- prototools Documentation: moonrepo.dev
- Lit Documentation: lit.dev
- Tailwind CSS: tailwindcss.com
For support and questions:
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with β€οΈ by the Ledger team