marketing

Marketing materials (presentations, posters, flyers)
Log | Files | Refs

commit c2737b007e64def9d838fad0f7b34479d8778af5
parent 95ca3c932fdbcac169b8e419d611e61e15811744
Author: Iván Ávalos <avalos@disroot.org>
Date:   Fri, 28 Jun 2024 09:13:20 -0600

Refinements to wallet.tex

Diffstat:
Mworkshops/wallet.tex | 281++++++++++++++++++++++++++++++++++++++++++-------------------------------------
1 file changed, 150 insertions(+), 131 deletions(-)

diff --git a/workshops/wallet.tex b/workshops/wallet.tex @@ -4,7 +4,7 @@ \newcommand{\TITLE}{NEXT \\ GENERATION \\ INTERNET} \newcommand{\SUB}{GNU Taler for Developers} \newcommand{\AUTHOR}{Iván Ávalos} -\newcommand{\SPEAKER}{Christian Grothoff} +\newcommand{\SPEAKER}{Florian Dold} \newcommand{\INST}{Bern University of Applied Sciences} \newcommand{\DATE}{COSIN'24} @@ -18,7 +18,7 @@ \begin{document} \begin{frame}[plain] -\maketitle + \maketitle \end{frame} @@ -75,24 +75,28 @@ However, Taler is \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} + \vfill + \begin{center} + {\footnotesize + \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} + \vfill \end{frame} @@ -136,6 +140,124 @@ However, Taler is \end{itemize} \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}[fragile]{Wallet-core API}{Error structure} + An error can be contained inside a response or a notification, and includes + the following data, in some cases along with extra fields: + + \begin{center} + \begin{tabular}{c c c} + \hline + Field & Type & Description \\ + \hline + \texttt{code} & integer & GANA error code \\ + \texttt{when} & timestamp? & time when it occurred \\ + \texttt{hint} & string? & error message \\ + \end{tabular} + \end{center} + + Example + +\begin{verbatim} +{ "code": 7001, + "hint": "could not resolve host: demo.taler.net", + "when": { "t_ms": 1718726899827 } } +\end{verbatim} +\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/}) @@ -257,120 +379,17 @@ $ taler-wallet-cli run-until-done # run until all work is done \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}[fragile]{Wallet-core API}{Error structure} - An error can be contained inside a response or a notification, and includes - the following data, in some cases along with extra fields: - - \begin{center} - \begin{tabular}{c c c} - \hline - Field & Type & Description \\ - \hline - \texttt{code} & integer & GANA error code \\ - \texttt{when} & timestamp? & time when it occurred \\ - \texttt{hint} & string? & error message \\ - \end{tabular} - \end{center} - - Example +\begin{frame}[fragile]{Wallet-core CLI} + \vfill + It is also possible to call wallet-core API requests directly from the + CLI, even when there is not a command for it: \begin{verbatim} -{ "code": 7001, - "hint": "could not resolve host: demo.taler.net", - "when": { "t_ms": 1718726899827 } } +$ taler-wallet-cli api getWithdrawalDetailsForAmount \ + '{"exchangeBaseUrl":"https://exchange.demo.taler.net/", + "amount":"KUDOS:10"}' \end{verbatim} + \vfill \end{frame}