-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
255 lines (221 loc) · 14.6 KB
/
index.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
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!DOCTYPE html>
<html lang="en">
<head>
<title>Unconfirmed Bitcoin Transaction Adjustment Tool</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="keywords" content="bitcoin, transaction, adjust, revert, modify, address, browser, segwit, javascript, js, script, online, tool, change, replace, fee, bumping, unconfirmed, incorrectly, incorrect, accidentally, sent, github, blockchain" />
<meta name="description" content="A tool for adjusting unconfirmed Bitcoin transactions." />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://bootswatch.com/4/cyborg/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<style>body{font-family:"Lucida Console", Monaco, monospace;color:#fff !important}body h1,h2,h3,h4,h5,h6,p{color:#f2f2f2;font-family:"Lucida Console", Monaco, monospace}a.anchor{display:block;position:relative;top:-250px;visibility:hidden}#unconfirmedTXsTable{font-size:13px !important}ul{padding-inline-start:20px !important}.cntr{width:60%;margin:0 auto}#InsnOutsDiv .form-control:disabled,#InsnOutsDiv .form-control[readonly],#newFeeBTCField[readonly],#newFeeUSDField[readonly]{background-color:#e1e1e1}</style>
<script type="text/javascript" src="js/moment.min.js"></script>
<script type="text/javascript" src="js/transition.js"></script>
<script type="text/javascript" src="js/collapse.js"></script>
<script type="text/javascript" src="js/crypto-min.js"></script>
<script type="text/javascript" src="js/crypto-sha256.js"></script>
<script type="text/javascript" src="js/crypto-sha256-hmac.js"></script>
<script type="text/javascript" src="js/sha512.js"></script>
<script type="text/javascript" src="js/ripemd160.js"></script>
<script type="text/javascript" src="js/aes.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<script type="text/javascript" src="js/qcode-decoder.min.js"></script>
<script type="text/javascript" src="js/jsbn.js"></script>
<script type="text/javascript" src="js/ellipticcurve.js"></script>
<script type="text/javascript" src="js/coin.js"></script>
<script type="text/javascript" src="js/coinbin.js"></script>
<script src="main.js"></script>
<link rel="apple-touch-icon" sizes="57x57" href="img/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="img/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="img/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="img/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="img/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
<link rel="manifest" href="img/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="img/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body onload="onLoad()">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav mr-auto">
<li class="nav-item active" id="homeAnchorLi">
<a class="nav-link" href="#home">Home</a>
</li>
<li class="nav-item" id="aboutAnchorLi">
<a class="nav-link" href="#about">About</a>
</li>
<li class="nav-item" id="resourcesAnchorLi">
<a class="nav-link" href="#resources">Resources</a>
</li>
</ul>
</div>
</nav>
<div class="container" style="max-width: 75%; margin-top: 80px;">
<a class="anchor" id="home"></a>
<center>
<img src="img/transaction.png" width="200px" class="mb-4" />
<h3>Unconfirmed Bitcoin Transaction Adjustment Tool</h3>
</center>
<a class="anchor" id="step1"></a>
<div class="alert alert-dismissible alert-secondary mt-4">
<strong>Disclaimer!</strong> The purpose of this tool is to avoid loss of funds due to incorrectly entered address. It's functionality is limited, i.e. only one output address is allowed in a new transaction.
</div>
<div class="alert alert-dismissible alert-warning mt-2">
<strong>Attention!</strong> This is a beta version. Always check the transaction before signing and broadcasting.
<ul>
<li><a href="https://live.blockcypher.com/btc/decodetx/">BlockCypher - Decode A Transaction</a></li>
<li><a href="https://coinb.in/#verify">Coinb.in - Verify transactions and other scripts</a></li>
</ul>
</div>
<ul class="mt-5">
<li>Firstly, search for unconfirmed transactions.<br>Enter your sending address and select the transaction you want to adjust:</li>
</ul>
<div class="cntr">
<form onsubmit="event.preventDefault(); fetchTXs();" class="form-inline mt-1 ml-4">
<div class="form-group mb-2">
<input id="redeemFrom" class="form-control" type="text" name="redeemFrom" autocomplete="on" pattern="^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$" placeholder="Sending Address" size="30" required="" autofocus="" />
</div>
<div class="form-group mx-sm-3 mb-2">
<button id="submBtn" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
<div id="addressAlertBox"></div>
<div id="unconfirmedTXsTableDiv" class="mt-4"></div>
<div id="unconfirmedTXProperties"></div>
<div id="unconfirmedTXTableDiv" class="mt-4" style="display: none;">
<h5>Inputs</h5>
<table id="inputsTable" class="table table-sm table-striped table-hover">
<thead>
<tr>
<th>Transaction ID</th>
<th>Index</th>
<th>Script</th>
</tr>
</thead>
<tbody id="inputsTableBody"></tbody>
</table>
<h5 class="mt-4">Outputs</h5>
<table id="outputsTable" class="table table-sm table-striped table-hover">
<thead>
<tr>
<th>Address</th>
<th>Amount, BTC</th>
</tr>
</thead>
<tbody id="outputsTableBody"></tbody>
</table>
</div>
<div id="newTXDiv" style="display: none;" class="mt-4">
<h4>New transaction</h4>
<form onsubmit="event.preventDefault(); genTX();" class="mt-1 ml-4">
<div class="form-group mb-4">
<h5>Recipient address</h5>
<input id="newRecipientAddress" class="form-control" type="text" autocomplete="on" pattern="^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$" placeholder="Recipient address" required="" autofocus="" />
</div>
<div class="form-group mb-4">
<h5>Fee</h5>
<div class="alert alert-dismissible alert-secondary">
<strong>Attention!</strong> In order to outrun the old transaction, it is recommended to increase the fee several-fold. By default, it is increased x5.
</div>
<div class="form-inline">
<div class="input-group-prepend">
<span class="input-group-text">BTC</span>
</div>
<input type="text" class="form-control mr-2" id="newFeeBTCField" readonly="" required="" pattern="^[0-9\.]*$">
<div class="input-group-prepend">
<span class="input-group-text">$</span>
</div>
<input type="text" class="form-control" id="newFeeUSDField" readonly="">
</div>
<input type="range" class="custom-range" id="newFeeSlider" min="1" max="150">
<div id="lowFeeAlertBox" style='display: none;' class="mt-3">
<div class="alert alert-dismissible alert-danger">
<strong>Warning!</strong> In order to outrun the old transaction, the fee should be <b>higher than <span id="lowFeeAlertBox-OldFeeField"></span></b>. Otherwise, the new transaction will not be confirmed.
</div>
</div>
</div>
<button id="genBtn" class="btn btn-primary btn-lg btn-block">Generate</button>
</form>
</div>
<div id="newTransactionDiv" style="display: none;" class="mt-4">
<a class="anchor" id="doneTransaction"></a>
<h4>Transaction</h4>
<p>The transaction below has been generated and encoded. It can be broadcasted once it has been signed. You can check its contents here: <a href="https://coinb.in/#verify">Coinb.in - Verify transactions and other scripts</a></p>
<div class="alert alert-dark">
<br>
<textarea id="transactionHexField" class="form-control" style="height:150px;" readonly=""></textarea>
<p class="text-muted">Size: <span id="txSize">0</span> <i>bytes</i></p>
</div>
<div id="signDiv" class="mt-4">
<h4>Signing the transaction</h4>
<p>The transaction above should be signed and broadcasted in order to be accepted and outrun the old one. Below are the ways of doing it.</p>
<ul>
<li>If you have the private key of the address:
<ul>
<li>Use <a href="https://coinb.in/#sign">coinb.in signing tool</a> OR</li>
<li>Sign it using your wallet (next is how to do it in Electrum)</li>
<ul>
<li>Tools -> Load transaction -> From text -> Load transaction -> Sign</li>
</ul>
</ul>
</li>
<li>
If you <strong>don't</strong> have the private key of the address (e.g. using a hardware wallet):
<ul>
<li>Use software suitable for your hardware wallet</li>
</ul>
</li>
</ul>
<div id="broadcastDiv" class="mt-4">
<h4>Broadcasting the transaction</h4>
<p>Once signed, the new transaction should be broadcasted in order to appear in mempool and be accepted. Below are suitable tools.</p>
<ul>
<li><a href="https://coinb.in/#broadcast">Coinb.in - Broadcast Transaction into the bitcoin network</a></li>
<li><a href="https://www.viabtc.com/tools/broadcast">ViaBTC - Transaction Broadcast</a></li>
<li><a href="https://www.blockchain.com/btc/pushtx">Blockchain.info - Broadcast Transaction</a></li>
</ul>
<p>Additionally, once a transaction has been broadcasted, it is possible to use a transaction accelerator in order to get faster confirmation.
<li><a href="https://bitaccelerate.com/">BitAccelerate.com</a></li>
<li><a href="https://www.viabtc.com/tools/txaccelerator">ViaBTC - Transaction Accelerator</a></li>
</p>
</div>
</div>
</div>
<a class="anchor mt-4" id="about"></a>
<div>
<h4>About</h4>
<p>- <strong>What can this tool do?</strong><br>- It allows to adjust unconfirmed Bitcoin transactions.</p>
<p>- <strong>How can it help me?</strong><br>- In a situation where you accidentally sent your bitcoins to a wrong address. Using this tool you can generate a new transaction with different output address and higher fee. As a result you will be able to outpace the old transaction.</p>
<p>- <strong>What fee should I set?</strong><br>- It definitely must be higher than the old one and the higher, the better. By default is it set to x5.</p>
<p>- <strong>Can I trust this service?</strong><br>- Don't trust. Verify. This tool works on pure JavaScript and is running on your computer. You sign the transaction yourself, so this tool doesn't have access to your private keys.</p>
</div>
<a class="anchor mt-4" id="resources"></a>
<div>
<h4>Resources</h4>
<p>Tools and services used on this page</p>
<ul>
<li><a href="https://coinb.in">Coinb.in</a> — Transaction decoding and generation</li>
<li><a href="https://blockchain.info">BlockChain.info</a> — Bitcoin price</li>
<li><a href="https://blockcypher.com">BlockCypher.com</a> — Address and transaction info</li>
<li><a href="https://blockstream.info">BlockStream.info</a> — Address and transaction info</li>
<li><a href="https://bitcoinexplorer.org">bitcoinexplorer.org</a> — Bitcoin explorer</li>
</ul>
</div>
</div>
</body>
</html>