Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
03d48a0
add pre-commit and linter
mruiz-ledger Feb 4, 2025
10e7047
format: ruff format ledgerblue/ doc/
mruiz-ledger Feb 4, 2025
7aba908
add git-blame-ignore for formatting commit
mruiz-ledger Feb 4, 2025
ccfe8ca
update upload-artifact action cause v3 is deprecated
mruiz-ledger Feb 4, 2025
d453c78
Merge pull request #141 from LedgerHQ/mru-lint
mruiz-ledger Feb 6, 2025
15c255a
[ci][clean] Removing useless push to 'test.pypi.org'
Leereen Feb 27, 2025
6c87036
[ci][add] Push on Artifactory Python registry
Leereen Feb 27, 2025
c3609d5
Merge pull request #145 from LedgerHQ/jfrog
Leereen Feb 27, 2025
adbe45b
fix: update aes init with iv
mruiz-ledger Feb 6, 2025
8a8b4c8
ruff: fixes on syntax
mruiz-ledger Feb 6, 2025
b908bc3
add ruff commits to git-blame-ignore
mruiz-ledger Feb 6, 2025
824d6c2
Merge pull request #142 from LedgerHQ/mru-fix-aes-init
mruiz-ledger Mar 3, 2025
6746574
[ci][fix] Reducing specific permission to the targeted job, + adding …
Leereen Mar 6, 2025
950ddf5
style: ruff linting
mruiz-ledger Feb 19, 2025
59e130f
feature(usb): usb env var to select specific port
mruiz-ledger Feb 19, 2025
43f9e65
fix(ble): apdu through ble
mruiz-ledger Jul 7, 2025
109fd5c
Merge pull request #147 from LedgerHQ/mru-minor-fixes
mruiz-ledger Jul 21, 2025
4d2fafc
Merge pull request #146 from LedgerHQ/fix/ci
mruiz-ledger Jul 21, 2025
8ddedd3
Fix support for PCSC smartcard readers
yrichard-ledger Jul 21, 2025
65c2710
Update documentation
yrichard-ledger Jul 22, 2025
bb83a0e
Merge pull request #148 from LedgerHQ/nfc-pcsc
yrichard-ledger Jul 22, 2025
119b92f
Fix PCSC reader detection
yrichard-ledger Jul 22, 2025
8607c1d
Merge pull request #149 Fix pcsc reader detection logic
yrichard-ledger Jul 22, 2025
f26f358
Fix issue when a LP have a .hex with several areas
dmorais-ledger Jul 30, 2025
6a39324
Merge pull request #150 from LedgerHQ/fix_lp_64k
dmorais-ledger Jul 30, 2025
be96966
Add support for Apex BLE
yrichard-ledger Aug 27, 2025
0f2e44e
Merge pull request #152 from LedgerHQ/add_apex_uuid
yrichard-ledger Aug 27, 2025
faa20c0
replace deploy job with reusable workflow
mbrousset-ledger Jan 14, 2026
a897370
Merge pull request #155 from LedgerHQ/mbr/deploy-rwf
mbrousset-ledger Jan 15, 2026
b8b35f3
add actionlint + remove runners instance
mbrousset-ledger Jan 15, 2026
7d426c8
Merge pull request #156 from LedgerHQ/mbr/actionlint
mbrousset-ledger Jan 15, 2026
e448c46
feat: rename distributeFirmware11_scan into distributeFirmware
edelanghe-ledger Feb 23, 2026
f4aca23
Merge pull request #154 from LedgerHQ/feat/rename_distribute_firmware
edelanghe-ledger Feb 23, 2026
f1dfdb2
Bump protobuf version to match ledgerctl
mruiz-ledger Feb 24, 2026
f9b7add
Merge pull request #157 from LedgerHQ/bump-protobuf-reqs
mruiz-ledger Feb 24, 2026
13cc1ca
Enable BLS12-377 and ZIP32 derivations in parameters installation
srasoamiaramanana-ledger Mar 4, 2026
1fdec31
Merge pull request #158 from LedgerHQ/enable-derivation-modes
srasoamiaramanana-ledger Mar 4, 2026
32cec42
add debugApp script to capture app PRINTF output over USB CDC
tdejoigny-ledger Apr 2, 2026
2b8d175
scan until Ledger CDC port to appear (connection & disconnection) and…
tdejoigny-ledger Apr 3, 2026
5ada735
Merge pull request #159 from LedgerHQ/tdj/debug_over_usb
tdejoigny-ledger Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Run this command to always ignore formatting commits in `git blame`
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# Formatting commit
10e7047631b5807a951676eab6ede37200011283
8a8b4c89769dcd2ee4c890c14518759aa4e62394
76 changes: 12 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
pull_request:
branches:
- master
- develop

jobs:
build_install:
Expand All @@ -33,68 +34,15 @@
pip install -U pip
pip install -U .

package-deploy:
name: Build the Python package, and deploy if needed
runs-on: ubuntu-latest
deploy:
name: Build and deploy ledgerblue package
needs: build_install
steps:
- name: Clone
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install dependencies
run: |
# Needed to workaround this bug https://github.com/pypa/setuptools/issues/4759
# To be removed when it's fixed
pip install -U packaging

python -m pip install pip --upgrade
pip install build twine

- name: Build the Python package
run: |
python -m build
twine check dist/*
echo "TAG_VERSION=$(python -c 'from ledgerblue import __version__; print(__version__)')" >> "$GITHUB_ENV"

- name: Display current status
run: |
echo "Current status is:"
if [[ ${{ github.ref }} == "refs/tags/"* ]];
then
echo "- Triggered from tag, will be deployed on pypi.org";
else
echo "- Not triggered from tag, will be deployed on test.pypi.org";
fi
echo "- Tag version: ${{ env.TAG_VERSION }}";

- name: Publish Python package on test.pypi.org
if: success() && github.event_name == 'push'
run: python -m twine upload --repository testpypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PUBLIC_API_TOKEN }}
TWINE_NON_INTERACTIVE: 1

- name: Publish Python package on pypi.org
if: success() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}
TWINE_NON_INTERACTIVE: 1

- name: Publish a release on the repo
if: |
success() &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/')
uses: "marvinpinto/action-automatic-releases@latest"
with:
automatic_release_tag: "v${{ env.TAG_VERSION }}"
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE
dist/
uses: LedgerHQ/ledger-app-workflows/.github/workflows/reusable_pypi_deployment.yml@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
package_name: ledgerblue
jfrog_deployment: true
release: true
publish: true
secrets:
pypi_token: ${{ secrets.PYPI_PUBLIC_API_TOKEN }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Comment thread
tdejoigny-ledger marked this conversation as resolved.
Dismissed
3 changes: 2 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
pull_request:
branches:
- master
- develop

jobs:
generate:
Expand All @@ -26,7 +27,7 @@ jobs:
- name: Generate the documentation
run: (cd doc && make html)
- name: Upload documentation bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: doc/build/html/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ build/
dist/
ledgerblue.egg-info/
__pycache__
.python-version

__version__.py
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
hooks:
- id: actionlint
files: ^\.github/workflows/.*\.ya?ml$
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ Use the following Target IDs (--targetId option) when running commands directly:
| `Ledger Blue v2` | 2.1.x | `0x31010004` |


## PCSC support

This package can optionally work with PCSC readers for NFC communication with Ledger devices

Installation instructions on linux:
```
apt install libpcsclite-dev
pip3 install pyscard
```

Usage:
If the environment variable `PCSC=1` is defined, ledgerblue tools will communicate through the first PCSC interface with a detected NFC tag

## Ledgerblue documentation

You can generate the Ledgerblue documentation locally.
Expand Down
22 changes: 12 additions & 10 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,37 @@

from ledgerblue.__version__ import __version__


def setup(app):
app.add_css_file('theme_overrides.css') # Override wide tables in RTD theme
app.add_css_file("theme_overrides.css") # Override wide tables in RTD theme


# General Configuration
# =====================

extensions = []

source_suffix = ['.rst']
source_suffix = [".rst"]

master_doc = 'index'
master_doc = "index"

project = u'BOLOS Python Loader'
copyright = u'2017, Ledger Team'
author = u'Ledger Team'
project = "BOLOS Python Loader"
copyright = "2017, Ledger Team"
author = "Ledger Team"

version = __version__
release = __version__

pygments_style = 'sphinx'
pygments_style = "sphinx"

# Options for HTML Output
# =======================

html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

html_static_path = ['_static']
html_static_path = ["_static"]

# sphinxarg
# =========

extensions += ['sphinxarg.ext']
extensions += ["sphinxarg.ext"]
10 changes: 10 additions & 0 deletions doc/source/script_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ checkGenuine.py
:func: get_argparser
:prog: python -m ledgerblue.checkGenuine

.. _debugApp.py:

debugApp.py
-----------

.. argparse::
:module: ledgerblue.debugApp
:func: get_argparser
:prog: python -m ledgerblue.debugApp

.. _deleteApp.py:

deleteApp.py
Expand Down
Loading
Loading