Your Ledger companion.

Overview

Brought to you by

Bacca

Your Ledger companion.

WARNING: this is alpha software. Only use for testing.

A minimalistic software to install and upgrade the Bitcoin application on Ledger Nano S, S plus and X.

Why?

Ledger makes great hardware. However their software is lacking.

The Ledger Nano S plus and X are secure, user-friendly and up to date with the latest Bitcoin technologies. They are securely accessible to beginners, while letting their users benefit from advancements and newer standards.

Ledger Live is a cluttered software to manage your device where development resources are allocated toward scammy altcoins instead of making a decent Bitcoin wallet. The trajectory taken by Ledger Live has become increasingly worrying to me and other users of Liana: will my beneficiaries at all be able to navigate through the nudges toward Ponzi schemes and go through the unnecessary complicated procedure of setting up their device to be used with a Bitcoin wallet?

This software offers a simple, straight-to-the-point, alternative.

The state of this project is nowhere near the point where it can stably replace Ledger Live for non tech-savvy bitcoiners, yet. That said we hope to start pulling some of the functionalities into Liana.

Usage

This is a PoC. Use at your own risk.

This software can be used:

  1. Through a Graphical User Interface
  2. Through a Command Line Interface
  3. Through a Rust library for other projects to integrate some of the functionalities

GUI

The recommended way to use this software is through the GUI. Simply connect your Ledger Nano S, S plus or X to the USB port and run:

cargo run -p ledger_manager_gui

We plan on releasing binaries in the future.

CLI

Another way of using this is the CLI, which directly hooks up into the functionalities offered by the Rust crate. The CLI will talk to a Ledger device connected by USB. The commands are communicated using an environment variable, LEDGER_COMMAND. Another env var lets you switch to testnet (for instance to install the test app), simply set LEDGER_TESTNET to any value.

For now those commands are implemented:

  • getinfo: get information (such as the list of installed apps) for your device
  • genuinecheck: check your Ledger device is genuine
  • installapp: install the Bitcoin app on your device
  • updateapp: update the Bitcoin app on your device
  • openapp: open the Bitcoin app on your device

Examples

Checking your Ledger is genuine

LEDGER_COMMAND=genuinecheck cargo run -p ledger_manager_cli
Querying Ledger's remote HSM to perform the genuine check. You might have to confirm the operation on your device.
Success. Your Ledger is genuine.

Installing the Bitcoin Test app on your Ledger

LEDGER_TESTNET=1 LEDGER_COMMAND=installapp cargo run -p ledger_manager_cli
Querying installed applications from your Ledger. You might have to confirm on your device.
Querying Ledger's remote HSM to install the app. You might have to confirm the operation on your device.
Successfully installed the app.

Future

We are looking into people to help test this and confirm it works in as many scenarii as possible.

We are probably going to have to introduce an upgradefirmware command.

Contributions welcome! If you are interested, get in touch on the Liana Discord.

NOTE: i am not interested in supporting altcoins. If you want to add support for one, feel free to fork the project.

Comments
  • Revamp gui

    Revamp gui

    This PR introduce a new structure of the GUI:

    • a85663a98289337c653245b7d565c891b18f412b split bitcoin_app() in 2 function: get_latests_app() and bitcoin_latest_app(), so the GUI can get both version in a single API call
    • 805d7b841f80f4e3a6b60f6b8499930d46c29380 fix an error issued if we want to list apps and no app installed on device.
    • 64e8af4135fc4b5d829ae13df3c1eb7fa9e81a4a introduce the new GUI structure itself, the genuine check is now doable only once per launch and add the update feature.

    image

    opened by pythcoiner 16
  • Update to fit lib.rs changes

    Update to fit lib.rs changes

    • [x] ledger_service.rs::check_apps_installed() now use the 'new' list_installed_apps()
    • [x] remove get_app_version() as its not used anymore by check_apps_installed()
    • [x] get the actual installed app version
    opened by pythcoiner 5
  • Genuine check feature

    Genuine check feature

    This PR add a feature for check if the ledger device is genuine.

    I just have concern about how to detect if Ledger API NACK that the device is genuine? or they never NACK? if so we cannot hint the user that his device is not genuine... (or i miss something)

    opened by pythcoiner 2
  • Gui

    Gui

    This PR Introduce a new binary: 'Baaca - Your ledger Bitcoin companion' baaca is a tool that let user install firmware on a ledger device (S/S+/X). i've only test against S/S+ as i don't have a x in hand.

    image

    this application is separated in 2 parts:

    • The Iced(12.1) front-end that run in the main thread:
      • The GUI implementation is contained in src/baaca/gui.rs
      • The GUI used the Liana theme that have been cloned in src/baaca/theme.
    • Ledger backend that run in its own separated thread, communicate to gui thread via message through async-channels

    Fews comments about this implementation (that is still alpha):

    • Update of firmware is deactivated (uncommenting here, here and here.
    • The ledger thread try to connect to ledger devices every 2 seconds and stop when it get connected ( i let it poll continuously while idle before, but have sometimes weird behaviour )
    • I do not try the behaviour if 2 ledger devices connected
    • We rely on a patched minreq as dependency.
    • For both fetching the firmware and determine the app version installed(w/ app not opened) we have to connect to the Ledger API, that can be at the moment very slow (i sometime experience 40 seconds wait, not sure if it is about ledger API side or a minreq issue)
    • Wording and sequence of info messages passed to user can be improved a lot (i'm very bad at wording :smile: )
    • The binary have been tested only under linux at the moment
    opened by pythcoiner 2
  • reinstate container default theme

    reinstate container default theme

    in 0b29e5a8b41b3914c07477bda8e004e75927de7f i've unintentionally changed the default theme for Container leading to #12 , this PR reinstate former default.

    Fixes #12

    opened by pythcoiner 0
  • Add udev update instructions to the documentation

    Add udev update instructions to the documentation

    I was giving a try to Bacca and launching the GUI I got the following message:

    image

    The device was actually connected and unlocked but apparently it was not detected. Below you can find the log from the polling:

    [2024-06-06 14:43:36][ledger_manager_gui::ledger_service][INFO] LedgerService::send_to_gui(Connected(None, None))

    I solved it by running the following commands: https://github.com/LedgerHQ/udev-rules/blob/master/add_udev_rules.sh

    It could be helpful to add such indications in the documentation.

    opened by nondiremanuel 0
  • Try to make a genuine test fail

    Try to make a genuine test fail

              > or i miss something
    

    Yes. :) If the device fails the check, the Ledger API would return an error (well, i hope, i guess we could test this by messing with the data transmitted) and query_via_websocket would propagate this error: https://github.com/darosior/ledger_installer/blob/7be54a592540bf42ee1ef83b58882f136f63bf2b/ledger_manager/src/lib.rs#L370-L375

    Originally posted by @darosior in https://github.com/darosior/ledger_installer/issues/5#issuecomment-2097768124

    opened by pythcoiner 4
Owner
Antoine Poinsot
590B 7292 695A FFA5 B672 CBB2 E13F C145 CD3F 4304
Antoine Poinsot
Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

BPNS 1 May 2, 2022
deductive verification of Rust code. (semi) automatically prove your code satisfies your specifications!

Le marteau-pilon, forges et aciéries de Saint-Chamond, Joseph-Fortuné LAYRAUD, 1889 About Creusot is a tool for deductive verification of Rust code. I

Xavier Denis 609 Dec 28, 2022
Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic

Nethoscope Employ your built-in wetware pattern recognition and signal processing facilities to understand your network traffic. Check video on how it

Vesa Vilhonen 86 Dec 5, 2022
Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer of security for your most sensitive files.

Koofr Vault https://vault.koofr.net Koofr Vault is an open-source, client-side encrypted folder for your Koofr cloud storage offering an extra layer o

Koofr 12 Dec 30, 2022
a Solana program for granting friends permissions on your account without revealing your private key.

Delegatooooor Granting Permission: An account holder (the delegator) decides to grant permission to a delegate. They create and sign a transaction tha

0xGhostMac 3 Apr 3, 2024
Temporary edit external crates that your project depends on

rhack You want to quickly put a sneaky macro kind of like dbg! into external crates to find out how some internal data structure works? If so rhack is

Ryo Nakao 119 Nov 3, 2022
Daemon and tools to control your ASUS ROG laptop. Supersedes rog-core.

asusctl for ASUS ROG - Asus Linux Website asusd is a utility for Linux to control many aspects of various ASUS laptops but can also be used with non-a

Luke Jones 46 Jan 8, 2023
secret folders generator to hide hentais in your computer

hentai dream 95 secret folders generator to hide hentais in your computer, but its really old way as **** used techniquee one injection technique from

jumango pussu 7 Jul 8, 2021
use your GitHub SSH keys to authenticate to sshd

aeneid If you squint, GitHub is basically a free, zero-ops IdP that provides SSH public keys. Let's use it to authenticate to OpenSSH! What / How? The

Nikhil Jha 21 Dec 6, 2022
A Dashboard for your Lab

Veza - A Dashboard for your Lab Veza is an browser based application that displays any live data in a well-organized way. It aims to be a freely confi

Daniel Hartig 5 Dec 3, 2021
A lightweight and flexible framework to build your tailored blockchain applications.

TRINCI Blockchain Core A lightweight and flexible framework to build your tailored blockchain applications. Requirements The required dependencies to

Affidaty S.p.A. 11 Sep 26, 2022
Decrypt your LUKS partition using a FIDO2 compatible authenticator

fido2luks This will allow you to unlock your LUKS encrypted disk with an FIDO2 compatible key. Note: This has only been tested under Fedora 31, Ubuntu

null 118 Dec 24, 2022
Vanitygen-bip39 - Generate vanity / gas efficient Ethereum addresses for your hdwallet (bip39 12 or 24 words)

vanitygen-bip39 Generate Ethereum gas efficient addresses with leading zeros https://medium.com/coinmonks/on-efficient-ethereum-addresses-3fef0596e263

iam4x 9 Jul 2, 2022
A library to help you sew up your Ethereum project with Rust and just like develop in a common backend

SewUp Secondstate EWasm Utility Program, a library helps you sew up your Ethereum project with Rust and just like development in a common backend. The

Second State 48 Dec 18, 2022
Create your personal token with rust smart contracts

Solana Rust Token ?? This application written Rust using Anchor ⚓

Ritesh 6 Nov 22, 2022
Encrypt your files in cow language 🐄

Cow-encryptor Encrypt your files in cow language ?? Installation ?? Arch Linux ?? cow-encryptor is in the AUR yay -S cow-encryptor Other ?? ?? With ma

Skwal 2 Sep 19, 2022
Deploy your Solana programs during high load.

solana-deployer IMPORTANT: There is a known bug with the current program that will be fixed soon. In the meantime you should deploy from Solana Playgr

acheron 34 Nov 7, 2022
Safeguard your financial privacy with zero-knowledge proofs.

Spinner The Spinner project (https://spinner.cash) takes a privacy first approach to protect users crypto assets. It is a layer-2 protocol built on th

Spinner 21 Dec 28, 2022
A PackageJson struct for your rust code.

??️ package_json_schema Load a package.json file as a PackageJson struct. Why? You want to load a package.json file and interact with it as a struct.

Ifiok Jr. 3 Oct 13, 2022