Skip to content

Commit

Permalink
deploy: 928ce2b
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger committed Apr 12, 2024
1 parent 9a95000 commit f297d69
Show file tree
Hide file tree
Showing 24 changed files with 1,613 additions and 1,590 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 9a847e787c87d25fecb74762ddeb0bde
config: 0fe551ef3ac1c186009c56b337ac4aad
tags: 645f666f9bcd5a90fca523b33c5a78b7
2,342 changes: 1,187 additions & 1,155 deletions _images/classes_generated_ragger_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
608 changes: 307 additions & 301 deletions _images/packages_generated_ragger_architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions _sources/glossary.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Glossary
integrated into the C SDK managing the UI of the NanoS, NanoX and NanoS+
devices. It is embedded into the :term:`SDK`

Its equivalent for :term:`Stax` device is :term:`NBGL`.

BOLOS
**BOLOS** is `the operating system running on all Ledger hardware wallets
<https://www.ledger.com/introducing-bolos-blockchain-open-ledger-operating-system>`_.
Expand Down Expand Up @@ -85,6 +83,9 @@ Glossary
:term:`BAGL` for more recent devices such as :term:`Stax`. It is embedded
into the :term:`SDK`.

It has also been back-ported to older devices such as NanoS+ and NanoX (but
not NanoS) to ease interface flow development.

Page
In the :term:`Stax` SDK, a **Page** refers to a specific displayed Stax
screen.A welcome page, a setting page are example of Pages. This name is
Expand Down Expand Up @@ -131,8 +132,8 @@ Glossary
allowing to easily control and communicate with said emulator.

Stax
**Stax** is the latest Ledger device which, in a programmatic point of
view, mostly differs from previous devices by its richer UI and a touch
**Stax** is the most premium Ledger device which, in a programmatic point
of view, mostly differs from previous devices by its richer UI and a touch
screen, justifying the usage of the new graphic library, :term:`NBGL`.

Use Case
Expand Down
2 changes: 1 addition & 1 deletion _sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The Ragger framework

``Ragger`` is a Python framework which aims at simplifying the test and overall
automatic manipulation of applications running on Ledger devices: NanoS, NanoS+,
NanoX and Stax (sometimes referred as Fatstacks in the sources).
NanoX, Stax and Flex.

It is composed of a tiny wrapper around other Ledger's libraries which abstract
and/or provide access to Ledger's cold wallet, and higher-level classes allowing
Expand Down
26 changes: 13 additions & 13 deletions _sources/rationale.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,24 @@ it helps a lot to write code which on the first hand manipulate high-level
concept as validating a transaction, and on the other hand deal with low-level
details such as crafting an :term:`APDU` and click on a button at the right time.

Stax screen management
----------------------
Touch screen management
-----------------------

Dealing with UI and user interaction is never simple. Nano devices has only two
user physical inputs, through the two buttons, which already allows some
elaborate combinations that could be challenging to test automatically.

With the Stax device and its touchable screen, the number of possibilities
With the touchable screens of Stax or Flex devices, the number of possibilities
drastically increases.

``Ragger`` embeds tools allowing to ease the development and the maintenance of
UI clients. this tools mainly consist of 3 components:

- the :py:class:`layout classes <ragger.firmware.stax.layouts>`, representing
- the :py:class:`layout classes <ragger.firmware.touch.layouts>`, representing
the layouts proposed in the NBGL section of the C SDK,
- the :py:class:`use cases classes <ragger.firmware.stax.use_cases>`,
- the :py:class:`use cases classes <ragger.firmware.touch.use_cases>`,
representing the use cases proposed in the NBGL section of the C SDK,
- the :py:mod:`screen module <ragger.firmware.stax.screen>`, allowing to nest
- the :py:mod:`screen module <ragger.firmware.touch.screen>`, allowing to nest
the previous components in a single, centralized object.

.. note::
Expand All @@ -127,7 +127,7 @@ These components bring multiple benefits:

- these abstractions prevent to directly use ``(X, Y)`` coordinates to interact
with the screen and propose higher-level methods (for instance, when using the
:py:class:`UseCaseHome <ragger.firmware.stax.use_cases.UseCaseHome>` use case,
:py:class:`UseCaseHome <ragger.firmware.touch.use_cases.UseCaseHome>` use case,
going to the settings is triggered with the method ``UseCaseHome.settings()``
instead of touching the screen at ``(342, 55)``). The client's code is
meaningful.
Expand All @@ -137,14 +137,14 @@ These components bring multiple benefits:
- the :term:`layouts <Layout>` and :term:`use cases <Use Case>` mimic the
:term:`NBGL` capabilities, so that the ``Ragger`` client screen architecture
is close to the application one.
- the :py:class:`FullScreen <ragger.firmware.stax.screen.FullScreen>` class
embeds every existing :py:class:`layout <ragger.firmware.stax.layouts>` and
:py:class:`use case <ragger.firmware.stax.use_cases>` in a single class,
- the :py:class:`FullScreen <ragger.firmware.touch.screen.FullScreen>` class
embeds every existing :py:class:`layout <ragger.firmware.touch.layouts>` and
:py:class:`use case <ragger.firmware.touch.use_cases>` in a single class,
providing a fast way of testing an interface without any other configuration.
- the :py:class:`MetaScreen <ragger.firmware.stax.screen.MetaScreen>` metaclass
- the :py:class:`MetaScreen <ragger.firmware.touch.screen.MetaScreen>` metaclass
allows to build custom screen classes nesting the
:py:class:`layouts <ragger.firmware.stax.layouts>` and the
:py:class:`use cases <ragger.firmware.stax.use_cases>` of your choosing,
:py:class:`layouts <ragger.firmware.touch.layouts>` and the
:py:class:`use cases <ragger.firmware.touch.use_cases>` of your choosing,
creating a convenient and meaningful screen object where all UI interactions
are centralized.

Expand Down
16 changes: 9 additions & 7 deletions _sources/source.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,29 @@ should expect. This is declared with this class:

.. autoattribute:: STAX

.. autoattribute:: FLEX

``ragger.firmware.stax``

``ragger.firmware.touch``
++++++++++++++++++++++++

``ragger.firmware.stax.screen``
``ragger.firmware.touch.screen``
'''''''''''''''''''''''''''''''

.. automodule:: ragger.firmware.stax.screen
.. automodule:: ragger.firmware.touch.screen
:members:

``ragger.firmware.stax.layouts``
``ragger.firmware.touch.layouts``
'''''''''''''''''''''''''''''''''

.. automodule:: ragger.firmware.stax.layouts
.. automodule:: ragger.firmware.touch.layouts
:members:
:undoc-members:

``ragger.firmware.stax.use_cases``
``ragger.firmware.touch.use_cases``
''''''''''''''''''''''''''''''''''

.. automodule:: ragger.firmware.stax.use_cases
.. automodule:: ragger.firmware.touch.use_cases
:members:
:undoc-members:

Expand Down
30 changes: 15 additions & 15 deletions _sources/tutorial_screen.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _tutorial_screen:

Complex UI management - Stax
============================
Complex UI management - Flex / Stax
===================================

Interacting programmatically with an application tends to be a non-trivial
thing, as complex processes (like performing a complete transaction) have to be
Expand All @@ -16,8 +16,8 @@ specifically about the UI, we saw :ref:`previously
to cope with simple physical interactions (like on the Nano devices: only two
buttons). But what to do with more complex interfaces?

In particular, interacting with the Stax screen can be bothersome. It is hard to
track of button positions, pages layouts and such.
In particular, interacting with the touch screen devices (Stax or Flex) can be
bothersome. It is hard to track of button positions, pages layouts and such.

Study case
----------
Expand Down Expand Up @@ -66,26 +66,26 @@ to change some button position, or if higher-level graphic objects (such as
the "info" button to the top left -, all this code becomes deprecated.


That's why ``Ragger`` mimics the Stax SDK graphics library and provides
That's why ``Ragger`` mimics the Flex/Stax SDK graphics library and provides
:term:`Layout` and :term:`Use Case` (:term:`Page` will also come soon) classes
that keep track of every interactive screen elements and expose meaningful
methods to interact with them.

Layouts
'''''''

``Ragger``'s :mod:`Layouts <ragger.firmware.stax.layouts>` and
:mod:`UseCases <ragger.firmware.stax.use_cases>` allows to quickly describe an
``Ragger``'s :mod:`Layouts <ragger.firmware.touch.layouts>` and
:mod:`UseCases <ragger.firmware.touch.use_cases>` allows to quickly describe an
application screens and its attached behavior in a purely declarative way,
thanks to the :class:`MetaScreen <ragger.firmware.stax.screen.MetaScreen>`
thanks to the :class:`MetaScreen <ragger.firmware.touch.screen.MetaScreen>`
metaclass. For instance, with the previously described application:

.. code-block:: python
:linenos:
from ragger.firmware.stax.screen import MetaScreen
from ragger.firmware.stax.layouts import CancelFooter, ExitFooter, InfoHeader
from ragger.firmware.touch.screen import MetaScreen
from ragger.firmware.touch.layouts import CancelFooter, ExitFooter, InfoHeader
class RecoveryAppScreen(metaclass=MetaScreen)
layout_quit = ExitFooter
Expand Down Expand Up @@ -131,7 +131,7 @@ way than if positions were still necessary:
First of all, the buttons may be at the same place, but they don't carry the
same purpose, and it is a good idea to reflect that on the code.

Second, if in a future version the Stax design changes and one of these
Second, if in a future version the Flex/Stax design changes and one of these
button moves somewhere else on the screen's footer, **the layouts will be
updated accordingly** in ``Ragger``, and the ``CancelFooter`` or ``ExitFooter``
will still be valid, hence all code using this class remains valid too.
Expand Down Expand Up @@ -163,8 +163,8 @@ and start with ``use_case_``:
.. code-block:: python
:linenos:
from ragger.firmware.stax.screen import MetaScreen
from ragger.firmware.stax.use_case import UseCaseHome, UseCaseSettings
from ragger.firmware.touch.screen import MetaScreen
from ragger.firmware.touch.use_case import UseCaseHome, UseCaseSettings
class RecoveryAppScreen(metaclass=MetaScreen)
use_case_welcome = UseCaseHome
Expand Down Expand Up @@ -198,7 +198,7 @@ All-in-one solution: the ``FullScreen``
All these classes helps you tailoring a fairly elegant and straight-forward
client with meaningful and easy to write screen controls. However if you don't
feel like crafting you own screen representation, ``Ragger`` comes with a
:class:`FullScreen <ragger.firmware.stax.screen.FullScreen>` class
:class:`FullScreen <ragger.firmware.touch.screen.FullScreen>` class
which embeds every existing :term:`Layout` and :term:`Use Case`.

It can be used to quickly instantiate a screen which could work with any
Expand All @@ -209,7 +209,7 @@ application screen, as declared button can be totally fictional.
.. code-block:: python
:linenos:
from ragger.firmware.stax.screen import FullScreen
from ragger.firmware.touch.screen import FullScreen
screen = FullScreen(backend, firmware)
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.17.0',
VERSION: '1.17.1.dev10',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
10 changes: 5 additions & 5 deletions architecture.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Architecture &mdash; Ragger 1.17.0 documentation</title>
<title>Architecture &mdash; Ragger 1.17.1.dev10 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
Expand All @@ -29,7 +29,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Code documentation" href="source.html" />
<link rel="prev" title="Complex UI management - Stax" href="tutorial_screen.html" />
<link rel="prev" title="Complex UI management - Flex / Stax" href="tutorial_screen.html" />
<link href="_static/layout.css" rel="stylesheet" type="text/css">

</head>
Expand Down Expand Up @@ -95,7 +95,7 @@
<h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this heading"></a></h1>
<figure class="">
<a
data-lightbox="group-103343d3-a1d9-4b34-9cc4-66bfe23951f3"
data-lightbox="group-f9aeaed8-4bff-44bd-be0a-5f01dc62a328"
href="_images/packages_generated_ragger_architecture.svg"
title="Package relations"
data-title="Package relations"
Expand All @@ -108,7 +108,7 @@ <h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to t
</a><figcaption>Package relations</figcaption>
</figure><figure class="">
<a
data-lightbox="group-a58e71cb-a3be-4163-8dfc-85934a76080e"
data-lightbox="group-8d5a2bef-df17-4878-bccd-390bb563393e"
href="_images/classes_generated_ragger_architecture.svg"
title="Class relations"
data-title="Class relations"
Expand All @@ -125,7 +125,7 @@ <h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to t
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="tutorial_screen.html" class="btn btn-neutral float-left" title="Complex UI management - Stax" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="tutorial_screen.html" class="btn btn-neutral float-left" title="Complex UI management - Flex / Stax" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="source.html" class="btn btn-neutral float-right" title="Code documentation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Frequently Asked Questions &mdash; Ragger 1.17.0 documentation</title>
<title>Frequently Asked Questions &mdash; Ragger 1.17.1.dev10 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
Expand Down
17 changes: 4 additions & 13 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; Ragger 1.17.0 documentation</title>
<title>Index &mdash; Ragger 1.17.1.dev10 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
Expand Down Expand Up @@ -99,7 +99,6 @@ <h1 id="index">Index</h1>
| <a href="#E"><strong>E</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#H"><strong>H</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#L"><strong>L</strong></a>
| <a href="#N"><strong>N</strong></a>
Expand Down Expand Up @@ -169,24 +168,16 @@ <h2 id="F">F</h2>
</li>
</ul></li>
</ul></td>
</tr></table>

<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="glossary.html#term-Golden-snapshot"><strong>Golden snapshot</strong></a>
<li><a href="source.html#ragger.firmware.Firmware.FLEX">FLEX (ragger.firmware.Firmware attribute)</a>
</li>
</ul></td>
</tr></table>

<h2 id="H">H</h2>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="source.html#ragger.firmware.Firmware.has_bagl">has_bagl (ragger.firmware.Firmware property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="source.html#ragger.firmware.Firmware.has_nbgl">has_nbgl (ragger.firmware.Firmware property)</a>
<li><a href="glossary.html#term-Golden-snapshot"><strong>Golden snapshot</strong></a>
</li>
</ul></td>
</tr></table>
Expand Down
9 changes: 5 additions & 4 deletions glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Glossary &mdash; Ragger 1.17.0 documentation</title>
<title>Glossary &mdash; Ragger 1.17.1.dev10 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
Expand Down Expand Up @@ -110,7 +110,6 @@
<dt id="term-BAGL">BAGL<a class="headerlink" href="#term-BAGL" title="Permalink to this term"></a></dt><dd><p><strong>BAGL</strong> stands for “BOLOS Application Graphics Library”, and is a library
integrated into the C SDK managing the UI of the NanoS, NanoX and NanoS+
devices. It is embedded into the <a class="reference internal" href="#term-SDK"><span class="xref std std-term">SDK</span></a></p>
<p>Its equivalent for <a class="reference internal" href="#term-Stax"><span class="xref std std-term">Stax</span></a> device is <a class="reference internal" href="#term-NBGL"><span class="xref std std-term">NBGL</span></a>.</p>
</dd>
<dt id="term-BOLOS">BOLOS<a class="headerlink" href="#term-BOLOS" title="Permalink to this term"></a></dt><dd><p><strong>BOLOS</strong> is <a class="reference external" href="https://www.ledger.com/introducing-bolos-blockchain-open-ledger-operating-system">the operating system running on all Ledger hardware wallets</a>.
Its code is not open-source. Its capabilities can be used through the
Expand Down Expand Up @@ -154,6 +153,8 @@
<dt id="term-NBGL">NBGL<a class="headerlink" href="#term-NBGL" title="Permalink to this term"></a></dt><dd><p><strong>NBGL</strong> stands for “New BOLOS Graphic Library”, and is the successor of
<a class="reference internal" href="#term-BAGL"><span class="xref std std-term">BAGL</span></a> for more recent devices such as <a class="reference internal" href="#term-Stax"><span class="xref std std-term">Stax</span></a>. It is embedded
into the <a class="reference internal" href="#term-SDK"><span class="xref std std-term">SDK</span></a>.</p>
<p>It has also been back-ported to older devices such as NanoS+ and NanoX (but
not NanoS) to ease interface flow development.</p>
</dd>
<dt id="term-Page">Page<a class="headerlink" href="#term-Page" title="Permalink to this term"></a></dt><dd><p>In the <a class="reference internal" href="#term-Stax"><span class="xref std std-term">Stax</span></a> SDK, a <strong>Page</strong> refers to a specific displayed Stax
screen.A welcome page, a setting page are example of Pages. This name is
Expand Down Expand Up @@ -187,8 +188,8 @@
<p>It is composed of the emulator itself, and a HTTP client-server module
allowing to easily control and communicate with said emulator.</p>
</dd>
<dt id="term-Stax">Stax<a class="headerlink" href="#term-Stax" title="Permalink to this term"></a></dt><dd><p><strong>Stax</strong> is the latest Ledger device which, in a programmatic point of
view, mostly differs from previous devices by its richer UI and a touch
<dt id="term-Stax">Stax<a class="headerlink" href="#term-Stax" title="Permalink to this term"></a></dt><dd><p><strong>Stax</strong> is the most premium Ledger device which, in a programmatic point
of view, mostly differs from previous devices by its richer UI and a touch
screen, justifying the usage of the new graphic library, <a class="reference internal" href="#term-NBGL"><span class="xref std std-term">NBGL</span></a>.</p>
</dd>
<dt id="term-Use-Case">Use Case<a class="headerlink" href="#term-Use-Case" title="Permalink to this term"></a></dt><dd><p>In the <a class="reference internal" href="#term-Stax"><span class="xref std std-term">Stax</span></a> SDK, a <strong>Use Case</strong> refers to a pre-designed
Expand Down
Loading

0 comments on commit f297d69

Please sign in to comment.