-
Notifications
You must be signed in to change notification settings - Fork 26
/
vicky.html
104 lines (101 loc) · 6.01 KB
/
vicky.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no" />
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="https://bundle.run/noble-secp256k1@1.2.14"></script>
<script src="https://unpkg.com/@cmdcode/tapscript@1.4.1"></script>
<script src="scripts/utils.js"></script>
<script src="scripts/network.js"></script>
<script src="scripts/vm.js"></script>
<script src="scripts/init.js"></script>
<script src="scripts/circuit.js"></script>
<script src="scripts/circuits/bristol.js"></script>
<script src="scripts/circuits/bristol_zero_checker.js"></script>
<script src="scripts/circuits/bristol_size_checker.js"></script>
<script src="scripts/circuits/bristol_addition.js"></script>
<script src="scripts/circuits/bristol_adder_8bit.js"></script>
<script src="scripts/circuits/bristol_shifter.js"></script>
<script src="scripts/circuits/bristol_sha256.js"></script>
<script src="scripts/circuits/bristol_8bit_cpu_64_cycles.js"></script>
</head>
<body>
<div id="uploader_div">
<h1>Upload Paul's promise file</h1>
<p>Here is your public key: <span class="vicky_key"></span></p>
<p>Paul will shortly send you a "promise file." Upload it here.</p>
<form method="post" class="box">
<div class="box__input">
<svg class="box__icon" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43"
onclick='document.getElementById( "file_label" ).click();'>
<path
d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
</svg>
<input type="file" name="files[]" id="file" class="box__file"
data-multiple-caption="{count} files selected" multiple style="display: none;"
onchange="if ( this.files[ 0 ].size < 100000000 ) {getFile(this);} else {alert( 'File too large, make sure it is less than 100 kilobytes' ); this.value = null;}" />
<label for="file" id="file_label"><strong>Choose a file</strong><span class="box__dragndrop"> or drag it
here</span></label>
<button type="submit" class="box__button">Upload</button>
</div>
<div class="box__uploading">Uploading…</div>
<div class="box__success">Done!</div>
<div class="box__error">Error! <span></span>. <a class="box__restart" role="button">Try again!</a></div>
</form>
</div>
<div class="address_verification_div hidden">
<p>
Time to validate that you and Paul generated the same bitcoin addresses. Do all of these match what Paul
got? (Note: don't send any money to them yet)
</p>
<div class="address_validation">loading...</div>
<p><button class="address_verification_done">Yes, they match</button> <button
class="address_verification_reset">No, they don't match</button></p>
</div>
<div class="wait_for_sigs_div hidden">
<p>
Enter the bitcoin address where you want Paul's money to go if he breaks his promise:
</p>
<p><input class="vickys_bitcoin_address"></p>
<p>Hint: if you don't have a testnet wallet, you can just send it to a testnet faucet at this address:</p>
<p>tb1q349k20q0yft6knyss5cdpcrgmg30taxyt5ggse</p>
<p>
Paul will shortly send you a "results" file. Upload it here when he does.
</p>
<form method="post" class="box">
<div class="box__input">
<svg class="box__icon" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43"
onclick='document.getElementById( "file_label_2" ).click();'>
<path
d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
</svg>
<input type="file" name="files[]" id="file" class="box__file"
data-multiple-caption="{count} files selected" multiple style="display: none;"
onchange="if ( this.files[ 0 ].size < 100000000 ) {getFile(this);} else {alert( 'File too large, make sure it is less than 100 kilobytes' ); this.value = null;}" />
<label for="file" id="file_label_2"><strong>Choose a file</strong><span class="box__dragndrop"> or drag
it here</span></label>
<button type="submit" class="box__button">Upload</button>
</div>
<div class="box__uploading">Uploading…</div>
<div class="box__success">Done!</div>
<div class="box__error">Error! <span></span>. <a class="box__restart" role="button">Try again!</a></div>
</form>
</div>
<script src="scripts/view/vicky.js"></script>
<script src="scripts/view/zero_checker.js"></script>
<script src="scripts/view/size_checker.js"></script>
<script src="scripts/view/addition.js"></script>
<script src="scripts/view/adder_8bit.js"></script>
<script src="scripts/view/shifter.js"></script>
<script src="scripts/view/sha256.js"></script>
<script src="scripts/view/8bit_cpu_64_cycles.js"></script>
<script>
initVicky();
handleUploader();
</script>
<div id="black-bg" onclick="modalVanish();"></div>
<div id="modal"></div>
<div id="extra_info" style="margin-top: 20px;"></div>
</body>
</html>