commit b4312e588a438ba1651e5a82e048bf85958a0c72
parent c0d52466e179fc95681cb5c109a2f1d9ba95150e
Author: Iván Ávalos <avalos@disroot.org>
Date: Mon, 3 Jun 2024 13:38:31 -0600
Initial COSIN wallet dev guide
Diffstat:
2 files changed, 371 insertions(+), 2 deletions(-)
diff --git a/workshops/taler-macros.tex b/workshops/taler-macros.tex
@@ -41,13 +41,14 @@
\begin{beamercolorbox}[wd=.68\paperwidth]{frametitle}
\usebeamerfont{framesubtitle}%
\strut\insertframesubtitle\strut\par%
- \end{beamercolorbox}
+ \end{beamercolorbox}
\fi
}
\makeatother
\usepackage{tikz}
-\usetikzlibrary{calc,intersections,positioning,fadings,through}
+\usetikzlibrary{calc,intersections,positioning,fadings,through,fit}
+\tikzset{frame/.style={inner xsep=4mm, inner ysep=4mm}}
% footline
\setbeamertemplate{navigation symbols}{}
diff --git a/workshops/wallet.tex b/workshops/wallet.tex
@@ -0,0 +1,368 @@
+\documentclass[aspectratio=169,t]{beamer}
+\input taler-macros
+
+\newcommand{\TITLE}{NEXT \\ GENERATION \\ INTERNET}
+\newcommand{\SUB}{GNU Taler for Developers}
+\newcommand{\AUTHOR}{Christian Grothoff}
+\newcommand{\SPEAKER}{Christian Grothoff}
+\newcommand{\INST}{Bern University of Applied Sciences}
+\newcommand{\DATE}{COSIN'24}
+
+% Do not edit this part
+\title{\TITLE}
+\subtitle{\SUB}
+\date{\DATE}
+\author[\SPEAKER]{\AUTHOR}
+\institute{\INST}
+
+\begin{document}
+
+\begin{frame}[plain]
+\maketitle
+\end{frame}
+
+
+\begin{frame}{What is Taler?}
+ \framesubtitle{\url{https://taler.net/en/features.html}}
+ \noindent
+Taler is
+ \vfill
+ \begin{itemize}
+ \item a Free/Libre software \emph{payment system} infrastructure project
+ \item ... with a surrounding software ecosystem
+ \item ... and a company (Taler Systems S.A.) and community that wants to deploy it
+ as widely as possible.
+ \end{itemize}
+ \vfill
+\noindent
+However, Taler is
+ \begin{itemize}
+ \item \emph{not} a currency
+ \item \emph{not} a long-term store of value
+ \item \emph{not} a network or instance of a system
+ \item \emph{not} decentralized
+ \item \emph{not} based on proof-of-work or proof-of-stake
+ \item \emph{not} a speculative asset / ``get-rich-quick scheme''
+ \end{itemize}
+ \vfill
+\end{frame}
+
+
+\begin{frame}{Taler overview}
+\begin{center}
+\begin{tikzpicture}
+ \tikzstyle{def} = [node distance= 4em and 7em, inner sep=1em, outer sep=.3em];
+ \node (origin) at (0,0) {};
+ \node (exchange) [def,above=of origin,draw]{Exchange};
+ \node (customer) [def, draw, below left=of origin] {Customer};
+ \node (merchant) [def, draw, below right=of origin] {Merchant};
+ \node (auditor) [def, draw, above right=of origin]{Auditor};
+ \tikzstyle{C} = [color=black, line width=1pt]
+ \draw [<-, C] (customer) -- (exchange) node [midway, above, sloped] (TextNode) {withdraw coins};
+ \draw [<-, C] (exchange) -- (merchant) node [midway, above, sloped] (TextNode) {deposit coins};
+ \draw [<-, C] (merchant) -- (customer) node [midway, above, sloped] (TextNode) {spend coins};
+ \draw [<-, C] (exchange) -- (auditor) node [midway, above, sloped] (TextNode) {verify};
+\end{tikzpicture}
+\end{center}
+\end{frame}
+
+
+\begin{frame}{Architecture of Taler}
+\begin{center}
+ \includegraphics[width=0.8\textwidth]{operations.png}
+\end{center}
+\end{frame}
+
+
+\begin{frame}{Wallet architecture}
+\begin{center}
+\begin{tikzpicture}
+ \tikzstyle{def} = [node distance= 3.5em and 2em, inner sep=1em, outer sep=.3em];
+ \node (android) [def,draw]{Android};
+ \node (ios) [def,right=of android,draw]{iOS};
+ \node (webex) [def,right=of ios,draw]{WebEx};
+ \node (wcore)[def,below=of ios,draw]{wallet-core};
+ \node (db)[def,right=2cm of wcore,draw]{DB};
+ \node (exchange)[def,below=of wcore,draw]{Exchange};
+ \node [draw,frame,fit=(wcore)(db),label={[xshift=2cm]above:{qtart/browser}}] {};
+ \tikzstyle{C} = [color=black, line width=1pt];
+ \draw [<->, C] (android) -- (wcore) node [midway,left,xshift=-1cm] (TextNode) {wallet-core API};
+ \draw [<->, C] (ios) -- (wcore) node (TextNode) {};
+ \draw [<->, C] (webex) -- (wcore) node (TextNode) {};
+ \draw [<->, C] (wcore) -- (db) node [midway,above] (TextNode) {sqlite3};
+ \draw [<->, C] (wcore) -- (exchange) node [midway,left] (TextNode) {HTTP};
+\end{tikzpicture}
+\end{center}
+\end{frame}
+
+
+\begin{frame}[fragile]{GNU Taler wallet}{Android installation}
+ For Android, there are three main installation methods:
+ \begin{itemize}
+ \item Build from source code (with Android Studio)
+ \item Install from store
+ \begin {itemize}
+ \item From Google Play Store
+ \item From F-Droid (stable)
+ \item From F-Droid (nightly)
+ \end{itemize}
+ \item Manually install APK (\url{https://wallet.taler.net})
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{iOS installation}
+ For iOS, there are three main installation methods:
+ \begin{itemize}
+ \item Build from source code (with Xcode)
+ \item Install from the App Store
+ \item Install from TestFlight (beta)
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{WebEx installation}
+ For the web extension, there are three installation methods:
+ \begin{itemize}
+ \item Build from source code (with pnpm)
+ \item Install from \url{https://addons.mozilla.org}
+ \item Install from \url{https://wallet.taler.net/}
+ \end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{Building wallet-core}
+ \begin{enumerate}
+ \item Install Python, Node.js, NPM and pnPM (\url{https://pnpm.io/})
+ \item Clone the Git repository (\url{https://git.taler.net/wallet-core.git})
+ \item Run the bootstrap script
+\begin{verbatim}
+$ ./bootstrap
+\end{verbatim}
+ \item Run the configuration script
+\begin{verbatim}
+$ ./configure
+\end{verbatim}
+ \item Build all the components!
+\begin{verbatim}
+$ make
+\end{verbatim}
+ \end{enumerate}
+
+ \textbf{Note:} the relevant \texttt{.mjs} file for building qtart will be
+ created under \texttt{packages/taler-wallet-embedded/dist/taler-wallet-core-qjs.mjs}.
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{Building qtart (Android)}
+ \begin{enumerate}
+ \item Install Docker and Docker Compose
+ \item Clone the Git repository (\url{https://git.taler.net/quickjs-tart.git})
+ \item Copy into the root the \texttt{.mjs} file produced when building wallet-core.
+ \item Descend into the \texttt{docker-android} directory.
+ \item Create an empty \texttt{.env} file.
+ \item Run the following command:
+\begin{verbatim}
+$ docker-compose run --rm quickjs
+\end{verbatim}
+ \end{enumerate}
+
+ A local Maven repository will be created under the \texttt{.m2/repository}
+ directory relative to the Git repository root. The absolute path to this
+ directory should be added as a URL to the project-level
+ \texttt{build.gradle} file of the Android app, under
+ \texttt{allprojects/repositories}.
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{Building Android app}
+ \begin{enumerate}
+ \item Install Android Studio.
+ \item Clone the Git repository (\url{https://git.taler.net/taler-android.git}).
+ \item Open the project with Android Studio.
+ \item Build qtart from source (optional).
+ \begin {itemize}
+ \item Build wallet-core from source.
+ \item Copy the resulting \texttt{.mjs} file to qtart.
+ \item Run the dockerized qtart build.
+ \item Add local Maven repository to the Android project.
+ \end {itemize}
+ \item Build and run the Android app.
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{Building iOS app}
+ \begin{enumerate}
+ \item Install Xcode (in macOS).
+ \item Under the same directory:
+ \begin{itemize}
+ \item Clone the iOS app Git repository (\url{https://git.taler.net/taler-ios.git})
+ \item Clone the qtart Git repository (\url{https://git.taler.net/quickjs-tart.git})
+ \end{itemize}
+ \item Build wallet-core from source.
+ \item Copy the resulting \texttt{.mjs} file to qtart.
+ \item Open the iOS project with Xcode.
+ \item Build and run the iOS app.
+ \end{enumerate}
+\end{frame}
+
+\begin{frame}[fragile]{GNU Taler wallet}{Building web extension}
+\end{frame}
+
+\begin{frame}{Wallet-core API}{Introduction}
+ \begin{center}
+ \begin{tikzpicture}
+ \tikzstyle{def} = [node distance= 3.5em and 10em, inner sep=1em, outer sep=.3em];
+ \node (wallet) [def,draw] {Wallet};
+ \node (wcore) [def,draw,right=of wallet] {wallet-core};
+ \tikzstyle{C} = [color=black, line width=1pt];
+ \draw [->,C,bend left](wallet) to node [above] {request (JSON)} (wcore);
+ \draw [->,C] (wcore) to node [below] {response (JSON)} (wallet);
+ \draw [->,C,bend left,dashed] (wcore) to node [below] {notifications (JSON)} (wallet);
+ \end{tikzpicture}
+ \end{center}
+
+ \begin{itemize}
+ \item Documentation: \url{https://docs.taler.net/wallet/wallet-core.html}
+ \end{itemize}
+
+\end{frame}
+
+\begin{frame}[fragile]{Wallet-core API}{Request structure}
+ \begin{center}
+ \begin{tabular}{c c c}
+ \hline
+ Field & Type & Description \\
+ \hline
+ \texttt{id} & integer & request ID \\
+ \texttt{operation} & string & API operation \\
+ \texttt{args} & object & request arguments \\
+ \end{tabular}
+ \end{center}
+
+ Example
+
+\begin{verbatim}
+{
+ "id": 0,
+ "operation": "init",
+ "args": {
+ "logLevel": "INFO"
+ }
+}
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]{Wallet-core API}{Response structure}
+ \begin{center}
+ \begin{tabular}{c c c}
+ \hline
+ Field & Type & Description \\
+ \hline
+ \texttt{type} & string & either \texttt{response} or \texttt{error} \\
+ \texttt{id} & integer & request ID \\
+ \texttt{operation} & string & API operation \\
+ \texttt{result} & object & response data \\
+ \end{tabular}
+ \end{center}
+
+ Example
+
+\begin{verbatim}
+{
+ "type": "response",
+ "id": 0,
+ "operation": "init",
+ "result": {...}
+}
+\end{verbatim}
+\end{frame}
+
+\begin{frame}[fragile]{Wallet-core API}{Notification structure}
+ \begin{center}
+ \begin{tabular}{c c c}
+ \hline
+ Field & Type & Description \\
+ \hline
+ \texttt{type} & string & will be \texttt{notification} \\
+ \texttt{payload} & object & notification data \\
+ \end{tabular}
+ \end{center}
+
+ Example
+
+\begin{verbatim}
+{
+ "type": "notification",
+ "payload": {
+ "type": "task-observability-event"
+ }
+}
+\end{verbatim}
+\end{frame}
+
+\begin{frame}{Wallet-core CLI}
+\end{frame}
+
+\begin{frame}{Other components}
+ \begin{itemize}
+ \item Merchant
+ \item Auditor
+ \item Challenger
+ \item Sync
+ \item GNU Anastasis
+ \item Twister
+ \item libeufin
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}{Tutorials}
+ \begin{itemize}
+ \item Merchant payment processing: \url{https://docs.taler.net/taler-merchant-api-tutorial.html}
+ \item Regional/event currency setup: \url{https://docs.taler.net/libeufin/regional-automated-manual.html}
+ \item Video tutorials: \url{https://tutorials.taler.net/}
+ \item Support forum: \url{https://ich.taler.net/}
+ \end{itemize}
+\end{frame}
+
+
+\begin{frame}{Funding}
+ \vfill
+ \begin{center}
+ \url{https://nlnet.nl/propose}
+ \end{center}
+ \vfill
+ Candidates that passed 1st round from April 1st submission proposed:
+ \begin{itemize}
+ \item Some more integrations (frameworks, ERP)
+ \item Merchant implementation (?)
+ \item Improvements to wallet usability
+ \end{itemize}
+ \vfill
+\end{frame}
+
+
+% This should be last...
+\begin{frame}{Acknowledgements}
+
+ \begin{minipage}{0.45\textwidth} \ \\
+ {\tiny Funded by the European Union (Project 101135475).}
+
+ \begin{center}
+ \includegraphics[width=0.5\textwidth]{bandera.jpg}
+ \end{center}
+ \end{minipage}
+ \hfill
+ \begin{minipage}{0.45\textwidth}
+ {\tiny Funded by SERI (HEU-Projekt 101135475-TALER).}
+
+ \begin{center}
+ \includegraphics[width=0.65\textwidth]{sbfi.jpg}
+ \end{center}
+ \end{minipage}
+
+ \vfill
+
+ {\tiny Views and opinions expressed are however those of the author(s) only
+ and do not necessarily reflect those of the European Union. Neither the
+ European Union nor the granting authority can be held responsible for
+ them.}
+\end{frame}
+
+\end{document}