2026-06-28 20:38:43 -07:00
2022-04-19 17:49:49 +02:00
2026-06-02 11:03:58 -07:00
2022-11-25 05:01:30 +08:00
2024-09-28 03:41:25 -07:00
2022-09-01 02:26:55 +08:00
2022-09-01 02:26:55 +08:00
2026-06-28 20:38:44 -07:00

ledger

Ledger Lux

License GithubActions

Overview

This repository contains the Go client library for interacting with Lux apps on Ledger hardware wallets.

This is a Go-first repository with the following structure:

  • Top level: Go client library (github.com/luxfi/ledger)
  • /rust/: Rust implementation and Ledger app source
  • /go-docs/: Additional Go documentation

Installation

go get github.com/luxfi/ledger

Usage

import "github.com/luxfi/ledger"

// Example usage
app, err := ledger.FindLedgerLuxUserApp()
if err != nil {
    log.Fatal(err)
}
defer app.Close()

version, err := app.GetVersion()
if err != nil {
    log.Fatal(err)
}

fmt.Printf("App Version: %s\n", version)

Features

  • BIP32/BIP44 key derivation
  • P2PKH address generation
  • Transaction signing
  • Message signing
  • Multi-signature support
  • Multi-chain: one Ledger app signs for Lux, Hanzo, Zoo, and Pars

Chains

Chain SLIP-0044 EIP-155 chain_id CLA Notes
Lux 9000 96369 0x80 Native P/X chains + EVM C-Chain
Hanzo 60 36963 0xE0 EVM-compat
Zoo 60 200200 0xE0 EVM-compat
Pars 60 7777 0xE0 EVM-compat

EVM-compat chains share derivation path m/44'/60'/... so a single hardware key roams across the family; EIP-155 chain_id provides replay protection. See docs/CHAIN_PATHS.md for the full path map.

path, err := ledger.BIP44PathForName("hanzo", 0, 0, 0)
// path == "m/44'/60'/0'/0/0"

Testing

Tests require a physical Ledger device with the Lux app installed:

go test ./...

Development

Ledger App Development

The Ledger app source code is located in the /rust/ directory. See /rust/README.md for build instructions.

Go Library Development

The Go client library is at the repository root. Standard Go development practices apply:

go mod tidy
go test ./...
go build ./...

License

Apache 2.0 - See LICENSE file for details.

S
Description
▼ LUX Ledger app.
Readme Apache-2.0
2.5 MiB
Languages
Rust 78.1%
TypeScript 9%
Go 5.9%
C 4.6%
Makefile 1.7%
Other 0.6%