|
| 1 | +% using the PGF/TikZ package with pdflatex |
| 2 | +\documentclass{standalone} |
| 3 | +\usepackage[utf8]{inputenc} |
| 4 | +\usepackage[T1]{fontenc} |
| 5 | +%~ \usepackage[english]{babel} |
| 6 | +\usepackage[none]{hyphenat}% prevent hyphenation |
| 7 | +\usepackage{lmodern} |
| 8 | +\renewcommand*\familydefault{\sfdefault} |
| 9 | +\usepackage{tikz} |
| 10 | +\usetikzlibrary{shapes,arrows} |
| 11 | +\tikzset{>=latex} |
| 12 | +%\pgfdeclarelayer{bg} % declare background layer |
| 13 | +%\pgfsetlayers{bg,main} % set order of layers |
| 14 | +\newcommand{\h}{\hspace{1em}} |
| 15 | +\begin{document} |
| 16 | +% \sffamily{} |
| 17 | + \tikzstyle{block_center} = |
| 18 | + [rectangle, draw=black, thick, fill=white, |
| 19 | + text width=10.5em, text centered, |
| 20 | + minimum height=1em] |
| 21 | + \tikzstyle{block_rounded} = [rectangle, |
| 22 | + draw=black, thick, fill=white, |
| 23 | + text width=8em, text centered, |
| 24 | + minimum height=5em, |
| 25 | + rounded corners] |
| 26 | + \begin{tikzpicture}[auto] |
| 27 | + % outlining the flowchart on a grid |
| 28 | + \matrix[column sep=3ex,row sep=2.5ex]{ |
| 29 | + \h & |
| 30 | + \node [block_center] (R1) |
| 31 | + {Alice, Bob and Carol |
| 32 | + wish to spend from a |
| 33 | + 2-of-3 Multisig.}; |
| 34 | + & \h \\ |
| 35 | + \h & |
| 36 | + \node [block_center] (R2) |
| 37 | + {Alice uses a full node |
| 38 | + to create a PSBT with |
| 39 | + all input UTXOs filled in.}; |
| 40 | + & \h \\ |
| 41 | + \h & |
| 42 | + \node [block_center] (R3) |
| 43 | + {PSBT distributed.}; |
| 44 | + & \h \\ |
| 45 | + \node [block_center] (R4C1) |
| 46 | + {Alice signs the |
| 47 | + PSBT with her wallet.}; |
| 48 | + & |
| 49 | + \node [block_center] (R4C2) |
| 50 | + {Bob signs the PSBT |
| 51 | + with his SPV wallet.}; |
| 52 | + & |
| 53 | + \node [block_center] (R4C3) |
| 54 | + {Carol signs the PSBT |
| 55 | + with a completely |
| 56 | + offline signing machine.}; |
| 57 | + \\ |
| 58 | + %~ \h & \node (blind) & \h \\ |
| 59 | + \h & |
| 60 | + \node [block_center] (R5) |
| 61 | + {PSBTs are returned |
| 62 | + to Alice.}; |
| 63 | + & \h \\ |
| 64 | + \h & |
| 65 | + \node [block_center] (R6) |
| 66 | + {Alices combines the |
| 67 | + PSBTs. All inputs now |
| 68 | + have 3 signatures.}; |
| 69 | + & \h \\ |
| 70 | + \h & |
| 71 | + \node [block_center] (R7) |
| 72 | + {Alice finalizes the PSBT |
| 73 | + by creating each input's |
| 74 | + final scriptSig. One signature |
| 75 | + for each input is dropped.}; |
| 76 | + & \h \\ |
| 77 | + \h & |
| 78 | + \node [block_rounded] (stop) |
| 79 | + {Alice extracts the network |
| 80 | + serialized transaction and |
| 81 | + broadcasts it to the network.}; |
| 82 | + & \h \\ |
| 83 | + };% end matrix |
| 84 | + % connecting nodes with paths |
| 85 | +% \begin{pgfonlayer}{bg} |
| 86 | + \draw[line width = 1pt, ->] |
| 87 | + (R1) edge (R2) |
| 88 | + (R2) edge (R3) |
| 89 | + (R3) -| (R4C1) |
| 90 | + (R3) edge (R4C2) |
| 91 | + (R5) edge (R6) |
| 92 | + (R6) edge (R7) |
| 93 | + (R7) edge (stop); |
| 94 | + % circumvent missing arrow |
| 95 | + \draw[line width = 1pt, ->] |
| 96 | + (R4C1) |-+(0,-2.2em)-| (R5) |
| 97 | + (R4C2) edge (R5) |
| 98 | + (R4C3) |-+(0,-2.2em)-| (R5) |
| 99 | + (R3) -| (R4C3); |
| 100 | +% \end{pgfonlayer} |
| 101 | + \end{tikzpicture} |
| 102 | +\end{document} |
0 commit comments