1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00
bitcoin-bips/bip-0174/multisig-workflow.tex
katesalazar 3248581928 Bring back transparent background to figures
Black arrows are visible only in light theme (unless white background
for dark theme). Two-color arrows are visible in light theme and in
dark theme.
2022-05-22 10:38:46 +02:00

116 lines
3.1 KiB
TeX

% using the PGF/TikZ package with pdflatex
\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%~ \usepackage[english]{babel}
\usepackage[none]{hyphenat}% prevent hyphenation
\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows.meta}
\tikzset{>=latex}
%\pgfdeclarelayer{bg} % declare background layer
%\pgfsetlayers{bg,main} % set order of layers
\newcommand{\h}{\hspace{1em}}
\begin{document}
% \sffamily{}
\tikzstyle{block_center} =
[rectangle, draw=black, thick, fill=white,
text width=10.5em, text centered,
minimum height=1em]
\tikzstyle{block_rounded} = [rectangle,
draw=black, thick, fill=white,
text width=8em, text centered,
minimum height=5em,
rounded corners]
\begin{tikzpicture}[auto]
% outlining the flowchart on a grid
\matrix[column sep=3ex,row sep=2.5ex]{
\h &
\node [block_center] (R1)
{Alice, Bob and Carol
wish to spend from a
2-of-3 Multisig.};
& \h \\
\h &
\node [block_center] (R2)
{Alice uses a full node
to create a PSBT with
all input UTXOs filled in.};
& \h \\
\h &
\node [block_center] (R3)
{PSBT distributed.};
& \h \\
\node [block_center] (R4C1)
{Alice signs the
PSBT with her wallet.};
&
\node [block_center] (R4C2)
{Bob signs the PSBT
with his SPV wallet.};
&
\node [block_center] (R4C3)
{Carol signs the PSBT
with a completely
offline signing machine.};
\\
%~ \h & \node (blind) & \h \\
\h &
\node [block_center] (R5)
{PSBTs are returned
to Alice.};
& \h \\
\h &
\node [block_center] (R6)
{Alices combines the
PSBTs. All inputs now
have 3 signatures.};
& \h \\
\h &
\node [block_center] (R7)
{Alice finalizes the PSBT
by creating each input's
final scriptSig. One signature
for each input is dropped.};
& \h \\
\h &
\node [block_rounded] (stop)
{Alice extracts the network
serialized transaction and
broadcasts it to the network.};
& \h \\
};% end matrix
% connecting nodes with paths
% \begin{pgfonlayer}{bg}
\draw [ultra thick, draw=black, -{Stealth[length=8pt]}]
(R1) edge (R2)
(R2) edge (R3)
(R3) -| (R4C1)
(R3) edge (R4C2)
(R5) edge (R6)
(R6) edge (R7)
(R7) edge (stop);
\draw [thin, white, -{Stealth[color=black, fill=white, length=8pt]}]
(R1) edge (R2)
(R2) edge (R3)
(R3) -| (R4C1)
(R3) edge (R4C2)
(R5) edge (R6)
(R6) edge (R7)
(R7) edge (stop);
% circumvent missing arrow
\draw [ultra thick, draw=black, -{Stealth[length=8pt]}]
(R4C1) |-+(0,-2.2em)-| (R5)
(R4C2) edge (R5)
(R4C3) |-+(0,-2.2em)-| (R5)
(R3) -| (R4C3);
\draw [thin, white, -{Stealth[color=black, fill=white, length=8pt]}]
(R4C1) |-+(0,-2.2em)-| (R5)
(R4C2) edge (R5)
(R4C3) |-+(0,-2.2em)-| (R5)
(R3) -| (R4C3);
% \end{pgfonlayer}
\end{tikzpicture}
\end{document}