-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
210 lines (193 loc) · 7.88 KB
/
index.html
File metadata and controls
210 lines (193 loc) · 7.88 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE HTML>
<html ng-app="handShakeApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/angular.js"></script>
<script type="text/javascript" src="js/angular-route.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<script type="text/javascript" src="js/grid.js"></script>
<script type="text/javascript" src="js/version.js"></script>
<script type="text/javascript" src="js/detector.js"></script>
<script type="text/javascript" src="js/formatinf.js"></script>
<script type="text/javascript" src="js/errorlevel.js"></script>
<script type="text/javascript" src="js/bitmat.js"></script>
<script type="text/javascript" src="js/datablock.js"></script>
<script type="text/javascript" src="js/bmparser.js"></script>
<script type="text/javascript" src="js/datamask.js"></script>
<script type="text/javascript" src="js/rsdecoder.js"></script>
<script type="text/javascript" src="js/gf256poly.js"></script>
<script type="text/javascript" src="js/gf256.js"></script>
<script type="text/javascript" src="js/decoder.js"></script>
<script type="text/javascript" src="js/qrcode(1).js"></script>
<script type="text/javascript" src="js/findpat.js"></script>
<script type="text/javascript" src="js/alignpat.js"></script>
<script type="text/javascript" src="js/databr.js"></script>
<script type="text/javascript" src="js/webqr.js"></script>
<script type="text/javascript" src="js/bitcoinjs-min.js"></script>
<script type="text/javascript" src="js/helloblock-js.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<link rel="stylesheet" type="text/css" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="text-center">
<h1>Handshake</h1>
<div id="qrs" class="container">
<div ng-view>Loading...</div>
</div>
</div>
<script type="text/ng-template" id="page1">
<h3>Please select mobile device</h3>
<div class="form-group">
<a href="#/page2" class="btn btn-primary btn-lg">
<h2>Offline</h2>
This device is not connected to the internet. It will be holding cold-storage private key and signing a trasaction.
</a>
</div>
<div class="form-group">
<a href="#/page4" class="btn btn-primary btn-lg">
<h2>Online</h2>
This device is connected to the internet. It will be creating a transaction.
</a>
</div>
</script>
<script type="text/ng-template" id="page2">
<h3>Offline Device</h3>
<div class="form-group">
<label for="input_page_2">Enter a private key or scan from QR</label>
<div class="input-group">
<input type="text" ng-model="root.privateKey" class="form-control qr" id="input_page_2" placeholder="Private key">
<span class="input-group-addon" ng-click="scanQR('input_page_2')"><i class="glyphicon glyphicon-qrcode"></i></span>
</div>
<div id="cam"></div>
<canvas id="qr-canvas"></canvas>
</div>
<div class="form-group">
<a href="#/page3" class="btn btn-primary form-control" ng-click="root.createPublicKey()">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page3">
<h3>Offline Device</h3>
Your bitcoin address is: {{ root.publicKey }}
<h4>Please scan QR with the online device</h4>
<div id="qrcode_write" class="qr">
<!--canvas width="256" height="256"></canvas>
<img alt="Scan me!" style="display: none;"-->
</div>
<div class="form-group">
<a href="#/page7" class="btn btn-primary form-control">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page4">
<h3>Online Device</h3>
<div class="form-group">
<label for="input_page_4">Enter your cold-store address or scan from QR</label>
<div class="input-group">
<input type="text" ng-model="root.publicColdStorageKey" class="form-control qr" id="input_page_4" placeholder="Cold-store address">
<span class="input-group-addon"><i class="glyphicon glyphicon-qrcode" ng-click="scanQR('input_page_4')"></i></span>
</div>
<div id="cam"></div>
<canvas id="qr-canvas"></canvas>
</div>
<div class="form-group">
<a href="#/page5" class="btn btn-primary form-control" ng-click="insertPublicColdStorageKey()">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page5">
<h3>Online Device</h3>
<div class="form-group">
<label for="input_page_5_1">1. Enter the address to send bitcoins to or scan from QR</label>
<div class="input-group">
<input type="text" ng-model="root.publicKey" class="form-control qr" id="input_page_5_1" placeholder="Bitcoin address">
<span class="input-group-addon" ng-click="scanQR('input_page_5_1')"><i class="glyphicon glyphicon-qrcode"></i></span>
</div>
<div id="cam"></div>
<canvas id="qr-canvas"></canvas>
</div>
</div>
<div class="form-group">
<label for="input_page_5_2">2. Enter the amount of bitcoins to send</label>
<div class="input-group">
<input type="text" ng-model="root.amount" class="form-control" id="input_page_5_2" placeholder="Amount">
<span class="input-group-addon">฿</span>
</div>
</div>
<div class="form-group">
<a href="#/page6" class="btn btn-primary form-control" ng-click="insertTargetAddressAndAmount()">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page6">
<h4>This is your unsigned transaction from the online device</h4>
<div id="qrcode_write" class="qr">
<!--canvas width="256" height="256"></canvas>
<img alt="Scan me!" style="display: none;"-->
</div>
<div class="form-group">
<a href="#/page9" class="btn btn-primary form-control">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page7">
<div class="form-group">
<label for="input_page_7">Please scan the unsigned transaction from the online device</label>
<div class="input-group">
<textarea ng-model="root.unsignedTransactionData" class="form-control custom-control" rows="3" id="input_page_7" placeholder="Private key" style="resize:none"></textarea>
<span class="input-group-addon" ng-click="scanQR('input_page_7')"><i class="glyphicon glyphicon-qrcode"></i></span>
</div>
<div id="cam"></div>
<canvas id="qr-canvas"></canvas>
</div>
<div class="form-group">
<a href="#/page8" class="btn btn-primary form-control" ng-click="root.insertUnsignedTransactionData()">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page8">
<h4>This is your signed transaction. Please scan QR with the online device</h4>
<div id="qrcode_write" class="qr">
<!--canvas width="256" height="256"></canvas>
<img alt="Scan me!" style="display: none;"-->
</div>
</script>
<script type="text/ng-template" id="page9">
<div class="form-group">
<label for="input_page_9">Please scan the signed transaction from the offline device</label>
<div class="input-group">
<textarea ng-model="root.signedTransactionData" class="form-control custom-control" rows="3" id="input_page_9" placeholder="Signed transaction" style="resize:none"></textarea>
<span class="input-group-addon" ng-click="scanQR('input_page_9')"><i class="glyphicon glyphicon-qrcode"></i></span>
</div>
<div id="cam"></div>
<canvas id="qr-canvas"></canvas>
</div>
<div class="form-group">
<a href="#/page10" class="btn btn-primary form-control" ng-click="root.insertSignedTransactionData()">
next
</a>
</div>
</script>
<script type="text/ng-template" id="page10">
<h4>Your transaction is sent</h4>
<br>
<h5>From address:</h5>
{{ root.publicColdStorageKey }}
<br>
<h5>To address:</h5>
{{ root.publicKey }}
<br>
<h5>Amount:</h5>
{{ root.amount }}BTC
</script>
</body>
</html>