-
Notifications
You must be signed in to change notification settings - Fork 1
/
Web3PopupTikz.tex
86 lines (79 loc) · 2.49 KB
/
Web3PopupTikz.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
\begin{figure*}[!htb]
\centering
\tikzset{
state/.style={
rectangle,
rounded corners,
draw=black, very thick,
minimum height=2em,
inner sep=2pt,
text centered,
},
}
\begin{tikzpicture}[->,>=stealth']
% Position of QUERY
% Use previously defined 'state' as layout (see above)
% use tabular for content to get columns/rows
% parbox to limit width of the listing
\node[state,
anchor=center] (DATA WALLET)
{\begin{tabular}{l}
\textbf{Data Wallet Client}\\
\parbox{7cm}{
Web3 Invitation Popup Protocol
\begin{enumerate}
\item Detect Environment State Change
\item Scan for contract address tag
\item Read URIs from contract
\item Assert tag/URI agreement
\item Trigger Invitation on successful assert
\end{enumerate}
}\\[5em]
\end{tabular}};
% State: ENV with different content
\node[state, % layout (defined above)
text width=7.5cm, % max text width
above of=DATA WALLET, % Position is to the right of QUERY
node distance=6.5cm, % distance to QUERY
] (ENV) % position relative to the center of the 'box'
{%
\begin{tabular}{l} % content
\textbf{Environment State (Off-Chain)}\\
\parbox{7.5cm}{
Contract tag examples:
\begin{itemize}
\item TXT Record (web/mobile browser env)
\item Meta tag (web/mobile browser env)
\item hidden file (native app env)
\item application event (native/browser env)
\end{itemize}
}
\end{tabular}
};
% STATE CONTRACT
\node[state,
right of=DATA WALLET,
node distance=9.5cm,
text width=6cm] (CONTRACT)
{%
\begin{tabular}{l}
\textbf{Consent Registry (On-Chain)}\\
\parbox{6cm}{
On-Chain URI examples:
\begin{itemize}
\item Web URL
\item application signature
\end{itemize}
}
\end{tabular}
};
% draw the paths and and print some Text below/above the graph
\path (DATA WALLET) edge[bend left=20] node[anchor=west,left]{$1$} (ENV)
(ENV) edge[bend left=20] node[anchor=east,right]{$2$} (DATA WALLET)
(DATA WALLET) edge[bend left=20] node[anchor=north,above]{$3$} (CONTRACT)
(CONTRACT) edge[bend left=20] node[anchor=south,below]{$4$} (DATA WALLET)
(DATA WALLET) edge[bend right=30] node[anchor=east,right]{$5$} (ENV);
\end{tikzpicture}
\caption{Actor model of the tamper-resistant web3 invitation popup protocol.}
\label{fig:PopupProtocol}
\end{figure*}