From 2126bed3e3df789428b255b8275b6b3e700d22ec Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 02:27:44 +0200 Subject: [PATCH 01/25] Edit for testnet. --- images/coinbin.gif | Bin 3683 -> 6188 bytes index.html | 89 +++++++++++++++++++++++---------------------- js/coin.js | 8 ++-- 3 files changed, 50 insertions(+), 47 deletions(-) diff --git a/images/coinbin.gif b/images/coinbin.gif index 5e627a308b695d2b3eb08fcee1e8290b7ee46614..956acc7249e704978f136dd55ba64ba2a8fb332f 100644 GIT binary patch literal 6188 zcmZu#XH=70vwqV%c>^H|qJ~}+3010w4uXiFCDvBnpK>qtO@)28+ewa5y|3PaqIPL_~;0A_#&c5=m54R7^~aOeTwqi&H3+ z9XodH+__UiLPAnfa@Ve1Qc_a8ckkY_XV2cfd#O~aw6wI0jEt4qoZ^1;6Yto zT|GTL0|Ns?Lqj7YqeF)d9X@=RPNy3i8=IJzn3|fJnVFfJn_E~|SXx?ISy@?ITOT=c z#Ky+P*4Fmu(W7>DcE^q#v$wZDe*CzDgM*`^Q(F4{K{{A3b_hS6BD=@#7~?o;-c}w7$N+p`oF%vGLinXH88_&CSg%EiKQVKNkvx zt*xzXZEfxC?HwH*ot>RsU0p9;yy))k?&<02?d|RB>+A3D9~c-I92^`P8X6uR9vK-K z9UUDT8yg=VpO~1KoSc05^5xXj)T>voUcY`lJw5&A&6}B-nc3Odxw*Od`T2!~g~i3i zrKP3i<>i%?mA7x-zI*rX{rmSHK79E2@#CjYpFV&7{N>A+uV25euCA`Ft*x)GfBW|B z`}gmE{PD++A3uKn{JF8QvAMbVpPl~yDCuAD|DgMS>)&SrKyLx77%3|OzcmpprsCQy zC}~dxWsekFJuL0a*r~~W)BUjQMK;wmUCO$)yeC)5@s4XxZAITTnrCmZ^`pvxBHhrB zZ+afx9=b(O#O^*)S2a>*m8;^`TUR}H8)p<8tx<7jqUQ7?_Drw#KJvcoH^#edetI`a z0i$=^`kvgIe#%*@{4soQss7|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Gwallet.online @@ -51,7 +51,7 @@ - +
-
-

Wallet

-

Quick access to an online wallet where only you have access to your own private keys!

-
+ + + +

Addresses

@@ -129,7 +129,7 @@

Addresses

Development

-

Use what we've built to write your own projects! See our documention (coming soon), or contribute at github.

+

Use what we've built to write your own projects! See our documention (coming soon), or contribute at github.

@@ -375,9 +375,9 @@

New Multisig Address Secure multisig address

Enter the public keys of all the participants, to create a multi signature address. Maximum of 15 allowed. Compressed and uncompressed public keys are accepted.

- + + +
@@ -964,8 +964,8 @@

Keys

-

Sign Transaction once a transaction has been verified

-

Once you have verified a transaction you can sign and then broadcast it into the network.

+ +
@@ -1055,7 +1055,7 @@

Development Javascript framework, API and more

About open source bitcoin wallet

Version 1.3

Compatible with bitcoin-qt

-

Github https://github.com/OutCast3k/coinbin/

+

Github https://github.com/poolgold/coinbin/

TOR 4zpinp6gdkjfplhk.onion

What is Bitcoin?

Bitcoin is a type of digital currency in which encryption techniques are used to regulate the generation of units of currency and verify the transfer of funds, operating independently of a central bank. See weusecoins.com for more information.

@@ -1132,20 +1132,20 @@

Settings making coinb.in even better!


-
-
- Broadcast:
-

Select the network you wish to broadcast the transaction via

- -
-
- + + + + + + + + + + + + + +
@@ -1171,7 +1171,7 @@

Settings making coinb.in even better!


-

This page uses javascript to generate your addresses and sign your transactions within your browser, this means we never receive your private keys, this can be independently verified by reviewing the source code on github. You can even download this page and host it yourself or run it offline!

+

This page uses javascript to generate your addresses and sign your transactions within your browser, this means we never receive your private keys, this can be independently verified by reviewing the source code on github. You can even download this page and host it yourself or run it offline!


@@ -1179,8 +1179,11 @@

Settings making coinb.in even better!

diff --git a/js/coin.js b/js/coin.js index 84362e51..52fc340f 100644 --- a/js/coin.js +++ b/js/coin.js @@ -10,10 +10,10 @@ var coinjs = window.coinjs = function () { }; /* public vars */ - coinjs.pub = 0x00; - coinjs.priv = 0x80; - coinjs.multisig = 0x05; - coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; + coinjs.pub = 0x6f; + coinjs.priv = 0xef; + coinjs.multisig = 0xc4; + coinjs.hdkey = {'prv':0x04358394, 'pub':0x043587cf}; coinjs.compressed = false; From c665862e83b6ad2bd9ed5fa797fcab2717bd69ce Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 02:39:55 +0200 Subject: [PATCH 02/25] Added settings for mailjet --- index.html | 2 +- js/coin.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 08248bf4..4b58982d 100644 --- a/index.html +++ b/index.html @@ -265,7 +265,7 @@

Open Wallet browser based bitcoin wallet

New Address create a new address

-

Any keys used you will need to manually store safely as they will be needed later to redeem the bitcoins.

+

Any keys used you will need to manually store safely as they will be needed later to redeem the bitcoin gold.

diff --git a/js/coin.js b/js/coin.js index 52fc340f..ded4480a 100644 --- a/js/coin.js +++ b/js/coin.js @@ -10,15 +10,15 @@ var coinjs = window.coinjs = function () { }; /* public vars */ - coinjs.pub = 0x6f; - coinjs.priv = 0xef; - coinjs.multisig = 0xc4; - coinjs.hdkey = {'prv':0x04358394, 'pub':0x043587cf}; + coinjs.pub = 0x26; + coinjs.priv = 0x80; + coinjs.multisig = 0x17; + coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; coinjs.compressed = false; /* other vars */ - coinjs.developer = '1CWHWkTWaq1K5hevimJia3cyinQsrgXUvg'; // bitcoin + coinjs.developer = 'GHri78iH9CfBbm79rfdXtCqjsiFhbKMwZd'; // bitcoin gold /* bit(coinb.in) api vars */ coinjs.host = ('https:'==document.location.protocol?'https://':'http://')+'coinb.in/api/'; From ad20be41f3c38fd76465d17471f4babfb0f164a2 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 13:24:42 +0200 Subject: [PATCH 03/25] Update README.md --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 995ce989..e72aba1e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,23 @@ coinbin ======= +##Tasks: + +- [x] Change wallet symbols for making it compatible to BTG + +- [x] Rebrand the UX + +- [ ] Add transaction signing with replay protection + +- [ ] Add beaming raw transaction to node + +- [ ] Uncomment and improve existion features + A Open Source Browser Based Bitcoin Wallet. Version 1.3 beta by OutCast3k -Live version available at http://coinb.in/ or http://4zpinp6gdkjfplhk.onion +Live version available at http://btgwallet.online -Github URL: https://github.com/OutCast3k/coinbin/ +Github URL: https://github.com/poolgold/coinbin Coinb.in supports a number of key features such as: From b339544b6fc0007236142605d37989727a31be48 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 13:25:44 +0200 Subject: [PATCH 04/25] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e72aba1e..a3c6acff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ coinbin ======= -##Tasks: +## Tasks: - [x] Change wallet symbols for making it compatible to BTG From 3e2d5c7bafd96786a663e68648917e06858142c6 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 19 Nov 2017 18:27:31 +0200 Subject: [PATCH 05/25] Added disclaimer in the readme. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a3c6acff..19f96ec4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ coinbin ======= +### None of the developers bare responsibility if a user got scammed. By using this software you are agreeing to bare all the responsibility if you lose funds. The code is open source and can be checked each time when you open a site using this code. We do suggest you to do so! + ## Tasks: - [x] Change wallet symbols for making it compatible to BTG From cc176b7d473d3d0a9bd060469d4d68c26262b39b Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 19 Nov 2017 18:34:16 +0200 Subject: [PATCH 06/25] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 4b58982d..b2f9c470 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - + From 6b8adda4b0a97b6ff33f7641693472f64d852315 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 19 Nov 2017 18:48:58 +0200 Subject: [PATCH 07/25] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b2f9c470..b64eb8e2 100644 --- a/index.html +++ b/index.html @@ -94,7 +94,7 @@

Welcome to the Blockchain

Online wallet creator

Bitcoin Gold Edition. All the data is stored only on your browser. Don't forget to write down your keys before exit.

- +

By using this product you agree that none of the developers or providers bare responsibility for your funds. The product is open source and you are suggested to check the code on the page and on github. »


From 7ce847124ed8172264f3d13ed84c10f9444a9ac6 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 19 Nov 2017 18:53:00 +0200 Subject: [PATCH 08/25] Update index.html --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b64eb8e2..4c6321a4 100644 --- a/index.html +++ b/index.html @@ -94,7 +94,7 @@

Welcome to the Blockchain


@@ -102,7 +102,7 @@

Online wallet creator

Open Source

-

Coinbin is an open source web based wallet written in javascript and released under the MIT license which means it's free to use and edit.

+

Coinbin is an open source web based wallet written in javascript and released under the MIT license which means it's free to use and edit. None of the providers and developers bare responsibility if a user get scammed. By using this software you are agreeing that it has no warranty.

From e10c66ab500fbfa7719109af59ea6419f17dadf3 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 19 Nov 2017 22:12:55 +0200 Subject: [PATCH 09/25] Update index.html --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 4c6321a4..5abc4ce6 100644 --- a/index.html +++ b/index.html @@ -93,7 +93,7 @@

Welcome to the Blockchain

Online wallet creator

-

Bitcoin Gold Edition. All the data is stored only on your browser. Don't forget to write down your keys before exit.

+

Bitcoin Gold Edition. All the data is stored only on your browser. Don't forget to write down your keys before exit. Based on coinb.in

Learn more »

@@ -102,7 +102,7 @@

Online wallet creator

Open Source

-

Coinbin is an open source web based wallet written in javascript and released under the MIT license which means it's free to use and edit. None of the providers and developers bare responsibility if a user get scammed. By using this software you are agreeing that it has no warranty.

+

btgwallet.online and Coinbin are an open source web based wallets written in javascript and released under the MIT license which means it's free to use and edit. None of the providers and developers bare responsibility if a user get scammed. By using this software you are agreeing that it has no warranty.

From 9d8d8b1135d6308c36342ff70ff67b35d480e6ee Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Sat, 9 Dec 2017 09:56:06 +0000 Subject: [PATCH 10/25] added segwit redeemscript to wallet, fixed typo, added links --- index.html | 10 ++++++++-- js/coinbin.js | 4 ++++ sha1sum | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 5abc4ce6..d6a74dd0 100644 --- a/index.html +++ b/index.html @@ -207,6 +207,12 @@

Open Wallet browser based bitcoin wallet

+ + +
@@ -1064,9 +1070,9 @@

Information

Coinb.in is a free and open source project released under the MIT license, originally by OutCast3k in 2013. Discussion of the project can be found at bitcointalk.org during its early testing stages when its primary focus was to develop a proof of concept multisig solution in javascript.

Coinb.in is run and funded by the generosity of others in terms of development and hosting.

Privacy

-

Coinb.in beleives strongly in privacy, not only do we support the use of TOR, the site does not collect and store IP or transaction data via our servers nor do we store your bitcoins private key. We do route traffic via cloudflare using an SSL certificate.

+

Coinb.in believes strongly in privacy, not only do we support the use of TOR, the site does not collect and store IP or transaction data via our servers nor do we store your bitcoins private key. We do route traffic via cloudflare using an SSL certificate.

Support

-

We recommend that you first check our service status page, if the problem persists you can contact us by emailing support{at}coinb.in.

+

We recommend that you first check our service status page and then blog page which has multiple guides. However if the problem persists you can contact us by emailing support{at}coinb.in.

Donate

Please donate to 1CWHWkTWaq1K5hevimJia3cyinQsrgXUvg if you found this project useful or want to see more features!

diff --git a/js/coinbin.js b/js/coinbin.js index c07170ad..e07ef056 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -35,9 +35,13 @@ $(document).ready(function() { var pubkey = keys.pubkey; var privkeyaes = CryptoJS.AES.encrypt(keys.wif, pass); + $("#walletKeys .walletSegWitRS").addClass("hidden"); if($("#walletSegwit").is(":checked")){ var sw = coinjs.segwitAddress(pubkey); address = sw.address; + + $("#walletKeys .walletSegWitRS").removeClass("hidden"); + $("#walletKeys .walletSegWitRS input:text").val(sw.redeemscript); } $("#walletAddress").html(address); diff --git a/sha1sum b/sha1sum index ae427aca..e31f3f5e 100644 --- a/sha1sum +++ b/sha1sum @@ -1,8 +1,8 @@ ----- Version 1.3 2017.10.04 ---- +---- Version 1.3 2017.12.09 --- 77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js 3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js 253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js -8e9b7114276b56d1073698f025f707523d53631b ./js/coinbin.js +934f5330156c159378c370f14b46862d54ff5b35 ./js/coinbin.js 31fbebf65d9cae8f26761cb057c4fb1b97339d08 ./js/coin.js 988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js 9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js @@ -30,7 +30,7 @@ de51a8494180a6db074af2dee2383f0a363c5b08 ./fonts/glyphicons-halflings-regular.s 278e49a86e634da6f2a02f3b47dd9d2a8f26210f ./fonts/glyphicons-halflings-regular.woff 44bc1850f570972267b169ae18f1cb06b611ffa2 ./fonts/glyphicons-halflings-regular.ttf d8a324a13501cd5705dc26b945fc8088f00907ae ./README.md -fa37c3b94927a222abf589a1c16129a3a3f4b4ab ./index.html +4b0ef8c0520f45540f142b562e9fbf00145f219c ./index.html From 22c513234b2f5b86690a1de8a9389f2c70fd8d4a Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Mon, 1 Jan 2018 18:53:23 +0000 Subject: [PATCH 11/25] added new #fee section to coinb.in --- images/btc32x.png | Bin 0 -> 1413 bytes index.html | 196 +++++++++++++++++++++++++++++-- js/coinbin.js | 290 +++++++++++++++++++++++++++++++++++++++++++++- sha1sum | 8 +- 4 files changed, 473 insertions(+), 21 deletions(-) create mode 100644 images/btc32x.png diff --git a/images/btc32x.png b/images/btc32x.png new file mode 100644 index 0000000000000000000000000000000000000000..442dcaad0db90a802220c7f837ea46e7852584f6 GIT binary patch literal 1413 zcmV;01$z34P)Px)FG)l}R9M5US6ggVMHC&1(1JqSnR7uAQpBo_F%taI z1e8d`4~_b#pMEKc(N7-{p*%{T_dH7!%K<57$b$CJPK5x(khfk zUv@9E&)nwpan9|bVUo!`=gyp2d(U2b?HM6rHWU}+U~6IpJoORTs)cOTPL}$cY}G}M zI!=!IhFtX_d5PuZ7G{gP)u<}>A*wc#J0E)a*ZVH z+{IG{h7eig%C+Pfz1Wrjstv$W@jB1lmH>atYe0x;cjoox{6*xdgV>(X-o*tT-}&3^ z3Eq(dR4y0B^L&dcB2RVr+nEu-0Lrt0idmBz(vSdEt8qv!Hk^#;gO=cz(12=}~MOeaenMMDI*DK$vdeHxsB zZe0cXuj{dvH-LTb0M(0tWM0Vk>7B6D5fqE8iQb!Xy&rQc0^FGoeEAAc_ZYBQ01Z#T zZ|B;8jRLrOLcecc22{?D-Z|z(Qhq!x)$$6+QT^~DKH^w6J+A=ZU9chx{q$%CxP8>0%i9AmWYx2osYHsJs_gCxE?c zf-xo~X9|yntyjxokb9Vb=VHli`AlHv>QV70;BbjHqG2h}v_ zAJF=i4vn3NV}LpjH$%bU*t57e_X9Ua#lQJA9d{;QT@i44Z!k7^Q`ZUBgbbCEOnH_$ z@I7jb=z_Dg0I=r)yIu+a26}pW-?4HL{f8rjo9@vaBxGoF=6e-C9N4FAqtJZ z`iIPgvve^^%KFG+#EbA&atZD^r3u#ZI&kqwnh!UEdN4c$bp8l5KBINRGNOx-C2N9e zSeba3Ts0V(4V(p^KbwyKAz-ZlI)2da{QtHmfiG49pFX7xX7<|=;I85`;sC7NC1cM7 zNmUwoAmIgfzNpoWW9u%^;MY2|aXikQ4@H~K(gs*;e4hnPv0{M9F<8KMV%QIUX| zr%y%4n}9-6m-+XD0fc z-HzT9+3<{V^3;H@l-?cQi1cNoj~rFX{F?gZ)Rm8ur&8pq9zQIp1pL~;-r4ES&o${W z-fl;AlV{YyQ$=_0mh8&8R4rGNqe{q;ZDh&6$dUtox8)`OKUZz>=TxXUao7DHfAdKf TINcB<00000NkvXXu0mjf+U=-D literal 0 HcmV?d00001 diff --git a/index.html b/index.html index d6a74dd0..2b4c0ce2 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Bitcoin Gold Wallet by BTGwallet.online - + @@ -74,6 +74,7 @@ +
@@ -117,10 +118,10 @@

MultiSig

- - - - +
+

Wallet

+

Quick access to an online wallet where only you have access to your own private keys & can calculate your own fee!

+

Addresses

@@ -199,6 +200,12 @@

Open Wallet browser based bitcoin wallet

@@ -246,7 +248,7 @@

Open Wallet browser based bitcoin wallet

- +
@@ -708,7 +710,7 @@

Transaction Create a new transaction

- +
@@ -733,6 +735,176 @@

Transaction Create a new transaction


+ +
+

Bitcoin Fee Calculator

+

This page will give you a guide on the lowest fee to use to get your transaction included within the next few blocks. It works by predicting the size of a transaction and comparing it to another transaction in a recent block to determine an appropriate fee.

+ +
+

Recommended Fee: 0.00000000 BTC
for a transaction of 0 bytes

+ ? Sat/Byte +
+ +
+
+ +
0
Inputs
+
+
+ 0 Bytes +
+ +

Regular Compressed + 1 + 148 bytes + +

+ + +

SegWit + 0 + 0 bytes + +

+ + +

MultiSig + 0 + 0 bytes + +

+ + +

Hodl Time Locked + 0 + 0 bytes + +

+ + +

Unknown + 0 + 0 bytes + +

+ + +
+
+ +
+ +
0
Outputs
+
+
+ 0 Bytes +
+ +

Regular p2pkh (1...) + 2 + 68 bytes + +

+ + +

Regular p2sh (3...) + 0 + 0 bytes + +

+ + +
+
+
+ +
+ +
+
+
Chargable Transaction Size: 0 bytes
+
+
+ +
+ +
+ +
+ +
+ + + + +
+

Verify transactions and other scripts

diff --git a/js/coinbin.js b/js/coinbin.js index e07ef056..547572b5 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -635,21 +635,84 @@ $(document).ready(function() { if(!$("#recipients .row, #inputs .row").hasClass('has-error')){ + $("#transactionCreate textarea").val(tx.serialize()); $("#transactionCreate .txSize").html(tx.size()); - $("#transactionCreate").removeClass("hidden"); + if($("#feesestnewtx").attr('est')=='y'){ + $("#fees .txhex").val($("#transactionCreate textarea").val()); + $("#analyseBtn").click(); + $("#fees .txhex").val(""); + window.location = "#fees"; + } else { + + $("#transactionCreate").removeClass("hidden"); - // Check fee against hard 0.01 as well as fluid 200 satoshis per byte calculation. - if($("#transactionFee").val()>=0.01 || $("#transactionFee").val()>= estimatedTxSize * 200 * 1e-8){ - $("#modalWarningFeeAmount").html($("#transactionFee").val()); - $("#modalWarningFee").modal("show"); + // Check fee against hard 0.01 as well as fluid 200 satoshis per byte calculation. + if($("#transactionFee").val()>=0.01 || $("#transactionFee").val()>= estimatedTxSize * 200 * 1e-8){ + $("#modalWarningFeeAmount").html($("#transactionFee").val()); + $("#modalWarningFee").modal("show"); + } } + $("#feesestnewtx").attr('est',''); } else { $("#transactionCreateStatus").removeClass("hidden").html("One or more input or output is invalid").fadeOut().fadeIn(); } }); + $("#feesestnewtx").click(function(){ + $(this).attr('est','y'); + $("#transactionBtn").click(); + }); + + $("#feesestwallet").click(function(){ + $(this).attr('est','y'); + var outputs = $("#walletSpendTo .output").length; + + $("#fees .inputno, #fees .outputno, #fees .bytes").html(0); + $("#fees .slider").val(0); + + var tx = coinjs.transaction(); + tx.listUnspent($("#walletAddress").html(), function(data){ + var inputs = $(data).find("unspent").children().length; + if($("#walletSegwit").is(":checked")){ + $("#fees .txi_segwit").val(inputs); + $("#fees .txi_segwit").change(); + } else { + $("#fees .txi_regular").val(inputs); + $("#fees .txi_regular").change(); + } + + $.each($("#walletSpendTo .output"), function(i,o){ + var addr = $('.addressTo',o); + var ad = coinjs.addressDecode(addr.val()); + if (ad.version == coinjs.multisig){ // p2sh + $("#fees .txo_p2sh").val(($("#fees .txo_p2sh").val()*1)+1); + $("#fees .txo_p2sh").change(); + } else { // p2pkh + $("#fees .txo_p2pkh").val(($("#fees .txo_p2pkh").val()*1)+1); + $("#fees .txo_p2pkh").change(); + } + }); + + if(($("#developerDonation").val()*1)>0){ + var addr = coinjs.developer; + var ad = coinjs.addressDecode(addr); + if (ad.version == coinjs.multisig){ // p2sh + $("#fees .txo_p2sh").val(($("#fees .txo_p2sh").val()*1)+1); + $("#fees .txo_p2sh").change(); + } else { // p2pkh + $("#fees .txo_p2pkh").val(($("#fees .txo_p2pkh").val()*1)+1); + $("#fees .txo_p2pkh").change(); + } + } + + }); + + //feeStats(); + window.location = "#fees"; + }); + $(".txidClear").click(function(){ $("#inputs .row:first input").attr('disabled',false); $("#inputs .row:first input").val(""); @@ -1549,6 +1612,12 @@ $(document).ready(function() { window.location.hash = "#verify"; } + $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { + if(e.target.hash == "#fees"){ + feeStats(); + } + }) + $(".qrcodeBtn").click(function(){ $("#qrcode").html(""); var thisbtn = $(this).parent().parent(); @@ -1719,6 +1788,216 @@ $(document).ready(function() { $("#redeemFromBtn").attr('rel',$("#coinjs_utxo option:selected").val()); } + + /* fees page code */ + + $("#fees .slider").change(function(){ + $('.'+$(this).attr('rel')+' .inputno, .'+$(this).attr('rel')+' .outputno',$(this).parent()).html($(this).val()); + $('.'+$(this).attr('rel')+' .estimate',$(this).parent()).removeClass('hidden'); + }); + + $("#fees .txo_p2pkh").change(function(){ + var outputno = $('.'+$(this).attr('rel')+' .outputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((outputno*$("#est_txo_p2pkh").val())+(outputno*9)); + mathFees(); + }); + + $("#fees .txo_p2sh").change(function(){ + var outputno = $('.'+$(this).attr('rel')+' .outputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((outputno*$("#est_txo_p2sh").val())+(outputno*9)); + mathFees(); + }); + + $("#fees .txi_regular").change(function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_regular").val())+(inputno*41)); + mathFees(); + }); + + $("#fees .txi_segwit").change(function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + var bytes = 0; + if(inputno >= 1){ + bytes = 2; + bytes += (inputno*32); + bytes += (inputno*$("#est_txi_segwit").val()); + bytes += (inputno*(41)) + } + + bytes = bytes.toFixed(0); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html(bytes); + mathFees(); + }); + + $("#fees .txi_multisig").change(function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_multisig").val())+(inputno*41)); + mathFees(); + }); + + $("#fees .txi_hodl").change(function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_hodl").val())+(inputno*41)); + mathFees(); + }); + + $("#fees .txi_unknown").change(function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_unknown").val())+(inputno*41)); + mathFees(); + }); + + $("#advancedFeesCollapse").click(function(){ + if($("#advancedFees").hasClass('hidden')){ + $("span",this).removeClass('glyphicon-collapse-down').addClass('glyphicon-collapse-up'); + $("#advancedFees").removeClass("hidden"); + } else { + $("span",this).removeClass('glyphicon-collapse-up').addClass('glyphicon-collapse-down'); + $("#advancedFees").addClass("hidden"); + } + }); + + $("#analyseBtn").click(function(){ + if(!$("#fees .txhex").val().match(/^[a-f0-9]+$/ig)){ + alert('You must provide a hex encoded transaction'); + return; + } + + var tx = coinjs.transaction(); + var deserialized = tx.deserialize($("#fees .txhex").val()); + + $("#fees .txoutputs .outputno, #fees .txinputs .inputno").html("0"); + $("#fees .txoutputs .bytes, #fees .txinputs .bytes").html("0"); + $("#fees .slider").val(0); + + for(var i = 0; i < deserialized.ins.length; i++){ + var script = deserialized.extractScriptKey(i); + var size = 41; + if(script.type == 'segwit'){ + if(deserialized.witness[i]){ + size += deserialized.ins[i].script.buffer.length / 2; + for(w in deserialized.witness[i]){ + size += (deserialized.witness[i][w].length / 2) /4; + } + } else { + size += $("#est_txi_segwit").val()*1; + } + size = size.toFixed(0); + $("#fees .segwit .inputno").html(($("#fees .segwit .inputno").html()*1)+1); + $("#fees .txi_segwit").val(($("#fees .txi_segwit").val()*1)+1); + $("#fees .segwit .bytes").html(size); + + } else if(script.type == 'multisig'){ + var s = coinjs.script(); + var rs = s.decodeRedeemScript(script.script); + size += 4 + ((script.script.length / 2) + (73 * rs.signaturesRequired)); + $("#fees .multisig .inputno").html(($("#fees .multisig .inputno").html()*1)+1); + $("#fees .txi_multisig").val(($("#fees .txi_multisig").val()*1)+1); + $("#fees .multisig .bytes").html(size); + + } else if(script.type == 'hodl'){ + size += 78; + $("#fees .hodl .inputno").html(($("#fees .hodl .inputno").html()*1)+1); + $("#fees .hodl .bytes").html(size); + $("#fees .txi_hodl").val(($("#fees .txi_hodl").val()*1)+1); + + } else if(script.type == 'empty' || script.type == 'scriptpubkey'){ + if(script.signatures == 1){ + size += script.script.length / 2; + } else { + size += $("#est_txi_regular").val()*1; + } + + $("#fees .regular .inputno").html(($("#fees .regular .inputno").html()*1)+1); + $("#fees .txi_regular").val(($("#fees .txi_regular").val()*1)+1); + $("#fees .regular .bytes").html(($("#fees .regular .bytes").html()*1)+size); + + } else if(script.type == 'unknown'){ + size += script.script.length / 2; + $("#fees .unknown .inputno").html(($("#fees .unknown .inputno").html()*1)+1); + $("#fees .txi_unknown").val(($("#fees .txi_unknown").val()*1)+1); + $("#fees .unknown .bytes").html(($("#fees .unknown .bytes").html()*1)+size); + } + } + + for(var i = 0; i < deserialized.outs.length; i++){ + if(deserialized.outs[i].script.buffer[0]==118){ + $("#fees .txoutputs .p2pkh .outputno").html(($("#fees .txoutputs .p2pkh .outputno").html()*1)+1); + $("#fees .txoutputs .p2pkh .bytes").html(($("#fees .txoutputs .p2pkh .bytes").html()*1)+34); + $("#fees .txo_p2pkh").val(($("#fees .txo_p2pkh").val()*1)+1); + } else if (deserialized.outs[i].script.buffer[0]==169){ + $("#fees .txoutputs .p2sh .outputno").html(($("#fees .txoutputs .p2sh .outputno").html()*1)+1); + $("#fees .txoutputs .p2sh .bytes").html(($("#fees .txoutputs .p2sh .bytes").html()*1)+32); + $("#fees .txo_p2sh").val(($("#fees .txo_p2sh").val()*1)+1); + } + } + + //feeStats(); + }); + + $("#feeStatsReload").click(function(){ + feeStats(); + }); + + function mathFees(){ + + var inputsTotal = 0; + var inputsBytes = 0; + $.each($(".inputno"), function(i,o){ + inputsTotal += ($(o).html()*1); + inputsBytes += ($(".bytes",$(o).parent()).html()*1); + }); + + $("#fees .txinputs .txsize").html(inputsBytes.toFixed(0)); + $("#fees .txinputs .txtotal").html(inputsTotal.toFixed(0)); + + var outputsTotal = 0; + var outputsBytes = 0; + $.each($(".outputno"), function(i,o){ + outputsTotal += ($(o).html()*1); + outputsBytes += ($(".bytes",$(o).parent()).html()*1); + }); + + $("#fees .txoutputs .txsize").html(outputsBytes.toFixed(0)); + $("#fees .txoutputs .txtotal").html(outputsTotal.toFixed(0)); + + var totalBytes = 10 + outputsBytes + inputsBytes; + if((!isNaN($("#fees .feeSatByte:first").html())) && totalBytes > 10){ + var recommendedFee = ((totalBytes * $(".feeSatByte").html())/100000000).toFixed(8); + $(".recommendedFee").html(recommendedFee); + $(".feeTxSize").html(totalBytes); + } else { + $(".recommendedFee").html((0).toFixed(8)); + $(".feeTxSize").html(0); + } + }; + + function feeStats(){ + $("#feeStatsReload").attr('disabled',true); + $.ajax ({ + type: "GET", + url: "https://coinb.in/api/?uid=1&key=12345678901234567890123456789012&setmodule=fees&request=stats", + dataType: "xml", + error: function(data) { + }, + success: function(data) { + $("#fees .recommended .blockHeight").html(''+$(data).find("height").text()+''); + $("#fees .recommended .blockHash").html($(data).find("block").text()); + $("#fees .recommended .blockTime").html($(data).find("timestamp").text()); + $("#fees .recommended .blockDateTime").html(unescape($(data).find("datetime").text()).replace(/\+/g,' ')); + $("#fees .recommended .txId").html(''+$(data).find("txid").text()+''); + $("#fees .recommended .txSize").html($(data).find("txsize").text()); + $("#fees .recommended .txFee").html($(data).find("txfee").text()); + $("#fees .feeSatByte").html($(data).find("satbyte").text()); + + mathFees(); + }, + complete: function(data, status){ + $("#feeStatsReload").attr('disabled', false); + } + }); + } + /* capture mouse movement to add entropy */ var IE = document.all?true:false // Boolean, is browser IE? if (!IE) document.captureEvents(Event.MOUSEMOVE) @@ -1750,4 +2029,5 @@ $(document).ready(function() { return true; }; + }); diff --git a/sha1sum b/sha1sum index e31f3f5e..9dfaa212 100644 --- a/sha1sum +++ b/sha1sum @@ -1,8 +1,8 @@ ----- Version 1.3 2017.12.09 --- +---- Version 1.3 2018.01.01 --- 77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js 3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js 253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js -934f5330156c159378c370f14b46862d54ff5b35 ./js/coinbin.js +acd94783bcf56758633af126fc6742fe08db9f93 ./js/coinbin.js 31fbebf65d9cae8f26761cb057c4fb1b97339d08 ./js/coin.js 988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js 9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js @@ -22,6 +22,7 @@ ad038e1f39646b68ae666324ed4c2882a8c42474 ./js/qrcode.js ed29315e0ffb3f14382431f2724235bf67f44eb3 ./css/bootstrap.min.css fc6b4268fbd57ad95d2b41a1d4d6866f222fbdb2 ./css/bootstrap-theme.min.css 4198ed869836ea5727ad6b80bf2df0a9c1a83244 ./css/style.css +2e3217a3f3b7c2fb30562ab9a4ef9a407ae81897 ./images/btc32x.png 8ac24915d59cef71c542e7cb7d7e153f560cba1f ./images/coinbin.gif f2af060f1cadbc9065c8c465c648dc01be67cc12 ./images/loader.gif 86b6f62b7853e67d3e635f6512a5a5efc58ea3c3 ./fonts/glyphicons-halflings-regular.eot @@ -30,7 +31,6 @@ de51a8494180a6db074af2dee2383f0a363c5b08 ./fonts/glyphicons-halflings-regular.s 278e49a86e634da6f2a02f3b47dd9d2a8f26210f ./fonts/glyphicons-halflings-regular.woff 44bc1850f570972267b169ae18f1cb06b611ffa2 ./fonts/glyphicons-halflings-regular.ttf d8a324a13501cd5705dc26b945fc8088f00907ae ./README.md -4b0ef8c0520f45540f142b562e9fbf00145f219c ./index.html - +bb129ea3d4df64994fa40a143791304f5cc2fc74 ./index.html From 7915f9d2c6fa125065f6fa540b6d47c88e42c9df Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Mon, 1 Jan 2018 18:58:33 +0000 Subject: [PATCH 12/25] added css changes --- css/style.css | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++ sha1sum | 2 +- 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index e7195607..b8c44b5b 100644 --- a/css/style.css +++ b/css/style.css @@ -32,3 +32,81 @@ body { text-overflow: ellipsis; display: block; } + +#fees .txi_regular { + background: #d3d3d3; +} + +#fees .txi_segwit { + background: #bae1ff; +} + +#fees .txi_multisig { + background: #baffc9; +} + +#fees .txi_hodl { + background: #ffdfba; +} + +#fees .txi_unknown { + background: #ffb3ba; +} + +#fees .txo_p2pkh { + background: #E679C8; +} + +#fees .txo_p2sh { + background: #FAFE92; +} + +#fees .txinputs { +} + +#fees .txoutputs { +} + +.hideOverflow { + overflow:hidden; + white-space:nowrap; + text-overflow:ellipsis; +} + +#fees .slider { + -webkit-appearance: none; + appearance: none; + width: 100%; + height: 25px; + outline: none; + opacity: 0.7; + -webkit-transition: .2s; + transition: opacity .2s; + border: 2px dotted #c3c3c3; +} + +#fees .slider:hover { + opacity: 1; +} + +#fees .slider::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 32px; + height: 32px; + border: 0; + background: url('https://coinb.in/images/btc32x.png'); + cursor: pointer; +} + +#fees .slider::-moz-range-thumb { + width: 32px; + height: 32px; + border: 0; + background: url('https://coinb.in/images/btc32x.png'); + cursor: pointer; +} + +#fees .total { + font-size: 100px; +} diff --git a/sha1sum b/sha1sum index 9dfaa212..e3f4a367 100644 --- a/sha1sum +++ b/sha1sum @@ -21,7 +21,7 @@ ad038e1f39646b68ae666324ed4c2882a8c42474 ./js/qrcode.js 255c58c17e63eb54adb3cd02b5c06224c67fc364 ./css/bootstrap-datetimepicker.min.css ed29315e0ffb3f14382431f2724235bf67f44eb3 ./css/bootstrap.min.css fc6b4268fbd57ad95d2b41a1d4d6866f222fbdb2 ./css/bootstrap-theme.min.css -4198ed869836ea5727ad6b80bf2df0a9c1a83244 ./css/style.css +81ac9c92e1826f817d780818594a9dd5612ef831 ./css/style.css 2e3217a3f3b7c2fb30562ab9a4ef9a407ae81897 ./images/btc32x.png 8ac24915d59cef71c542e7cb7d7e153f560cba1f ./images/coinbin.gif f2af060f1cadbc9065c8c465c648dc01be67cc12 ./images/loader.gif From 10e5af5c7856bc278c8621ee81af79c585df8754 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Wed, 3 Jan 2018 19:27:53 +0000 Subject: [PATCH 13/25] various tweaks made to the #fees page --- index.html | 53 ++++++++++++++++++++++++++++++++++-------- js/coinbin.js | 64 ++++++++++++++++++++++++++++++++------------------- sha1sum | 7 +++--- 3 files changed, 87 insertions(+), 37 deletions(-) diff --git a/index.html b/index.html index 2b4c0ce2..068c46c4 100644 --- a/index.html +++ b/index.html @@ -759,35 +759,60 @@

148 bytes

- + +
+ + + +

SegWit 0 0 bytes

- + +
+ + + +

MultiSig 0 0 bytes

- + +
+ + + +

Hodl Time Locked 0 0 bytes

- + +
+ + + +

Unknown 0 0 bytes

- + +
+ + + +

@@ -805,15 +830,25 @@

68 bytes

- + +
+ + + +

Regular p2sh (3...) 0 0 bytes

- - + +
+ + + +
+
@@ -833,7 +868,7 @@

-

This is based on us comparing your transaction agianst the last transaction found in the last block

+

This is based on us comparing your transaction against a very recent transaction found in a very recent block

Block Height: ?

Block #: ?

Block Time: ?

diff --git a/js/coinbin.js b/js/coinbin.js index 547572b5..eca361d7 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -1791,31 +1791,31 @@ $(document).ready(function() { /* fees page code */ - $("#fees .slider").change(function(){ - $('.'+$(this).attr('rel')+' .inputno, .'+$(this).attr('rel')+' .outputno',$(this).parent()).html($(this).val()); - $('.'+$(this).attr('rel')+' .estimate',$(this).parent()).removeClass('hidden'); + $("#fees .slider").on('input', function(){ + $('.'+$(this).attr('rel')+' .inputno, .'+$(this).attr('rel')+' .outputno',$("#fees")).html($(this).val()); + $('.'+$(this).attr('rel')+' .estimate',$("#fees")).removeClass('hidden'); }); - $("#fees .txo_p2pkh").change(function(){ - var outputno = $('.'+$(this).attr('rel')+' .outputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((outputno*$("#est_txo_p2pkh").val())+(outputno*9)); + $("#fees .txo_p2pkh").on('input', function(){ + var outputno = $('.'+$(this).attr('rel')+' .outputno',$("#fees .txoutputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txoutputs")).html((outputno*$("#est_txo_p2pkh").val())+(outputno*9)); mathFees(); }); - $("#fees .txo_p2sh").change(function(){ - var outputno = $('.'+$(this).attr('rel')+' .outputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((outputno*$("#est_txo_p2sh").val())+(outputno*9)); + $("#fees .txo_p2sh").on('input', function(){ + var outputno = $('.'+$(this).attr('rel')+' .outputno',$("#fees .txoutputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txoutputs")).html((outputno*$("#est_txo_p2sh").val())+(outputno*9)); mathFees(); }); - $("#fees .txi_regular").change(function(){ - var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_regular").val())+(inputno*41)); + $("#fees .txi_regular").on('input', function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$("#fees .txinputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txinputs")).html((inputno*$("#est_txi_regular").val())+(inputno*41)); mathFees(); }); - $("#fees .txi_segwit").change(function(){ - var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); + $("#fees .txi_segwit").on('input', function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$("#fees .txinputs")).html(); var bytes = 0; if(inputno >= 1){ bytes = 2; @@ -1825,28 +1825,44 @@ $(document).ready(function() { } bytes = bytes.toFixed(0); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html(bytes); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txinputs")).html(bytes); mathFees(); }); - $("#fees .txi_multisig").change(function(){ - var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_multisig").val())+(inputno*41)); + $("#fees .txi_multisig").on('input', function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$("#fees .txinputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txinputs")).html((inputno*$("#est_txi_multisig").val())+(inputno*41)); mathFees(); }); - $("#fees .txi_hodl").change(function(){ - var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_hodl").val())+(inputno*41)); + $("#fees .txi_hodl").on('input', function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$("#fees .txinputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txinputs")).html((inputno*$("#est_txi_hodl").val())+(inputno*41)); mathFees(); }); - $("#fees .txi_unknown").change(function(){ - var inputno = $('.'+$(this).attr('rel')+' .inputno',$(this).parent()).html(); - $('.'+$(this).attr('rel')+' .bytes',$(this).parent()).html((inputno*$("#est_txi_unknown").val())+(inputno*41)); + $("#fees .txi_unknown").on('input', function(){ + var inputno = $('.'+$(this).attr('rel')+' .inputno',$("#fees .txinputs")).html(); + $('.'+$(this).attr('rel')+' .bytes',$("#fees .txinputs")).html((inputno*$("#est_txi_unknown").val())+(inputno*41)); mathFees(); }); + $("#fees .sliderbtn.down").click(function(){ + var val = $(".slider",$(this).parent().parent()).val()*1; + if(val>($(".slider",$(this).parent().parent()).attr('min')*1)){ + $(".slider",$(this).parent().parent()).val(val-1); + $(".slider",$(this).parent().parent()).trigger('input'); + } + }); + + $("#fees .sliderbtn.up").click(function(){ + var val = $(".slider",$(this).parent().parent()).val()*1; + if(val<($(".slider",$(this).parent().parent()).attr('max')*1)){ + $(".slider",$(this).parent().parent()).val(val+1); + $(".slider",$(this).parent().parent()).trigger('input'); + } + }); + $("#advancedFeesCollapse").click(function(){ if($("#advancedFees").hasClass('hidden')){ $("span",this).removeClass('glyphicon-collapse-down').addClass('glyphicon-collapse-up'); diff --git a/sha1sum b/sha1sum index e3f4a367..8556fd8c 100644 --- a/sha1sum +++ b/sha1sum @@ -1,8 +1,8 @@ ----- Version 1.3 2018.01.01 --- +---- Version 1.3 2018.01.03 --- 77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js 3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js 253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js -acd94783bcf56758633af126fc6742fe08db9f93 ./js/coinbin.js +f43691b7db457598283d3b146f8b8545b2aa21a1 ./js/coinbin.js 31fbebf65d9cae8f26761cb057c4fb1b97339d08 ./js/coin.js 988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js 9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js @@ -31,6 +31,5 @@ de51a8494180a6db074af2dee2383f0a363c5b08 ./fonts/glyphicons-halflings-regular.s 278e49a86e634da6f2a02f3b47dd9d2a8f26210f ./fonts/glyphicons-halflings-regular.woff 44bc1850f570972267b169ae18f1cb06b611ffa2 ./fonts/glyphicons-halflings-regular.ttf d8a324a13501cd5705dc26b945fc8088f00907ae ./README.md -bb129ea3d4df64994fa40a143791304f5cc2fc74 ./index.html - +4cd31f66eafbf86e98def4db6ff1b13ba5dcf01a ./index.html From 19f693b2ab76a23114e5bfa35608ff32ee26d11a Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Wed, 3 Jan 2018 19:30:36 +0000 Subject: [PATCH 14/25] add css changes --- css/style.css | 10 +++++++++- sha1sum | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/css/style.css b/css/style.css index b8c44b5b..5504b845 100644 --- a/css/style.css +++ b/css/style.css @@ -77,7 +77,7 @@ body { -webkit-appearance: none; appearance: none; width: 100%; - height: 25px; + height: 30px; outline: none; opacity: 0.7; -webkit-transition: .2s; @@ -85,6 +85,14 @@ body { border: 2px dotted #c3c3c3; } +#fees .sliderbtn { + height: 30px; + width: 30px; + padding: 0px; + margin: 0px; + border: 0px; +} + #fees .slider:hover { opacity: 1; } diff --git a/sha1sum b/sha1sum index 8556fd8c..93de7aca 100644 --- a/sha1sum +++ b/sha1sum @@ -21,7 +21,7 @@ ad038e1f39646b68ae666324ed4c2882a8c42474 ./js/qrcode.js 255c58c17e63eb54adb3cd02b5c06224c67fc364 ./css/bootstrap-datetimepicker.min.css ed29315e0ffb3f14382431f2724235bf67f44eb3 ./css/bootstrap.min.css fc6b4268fbd57ad95d2b41a1d4d6866f222fbdb2 ./css/bootstrap-theme.min.css -81ac9c92e1826f817d780818594a9dd5612ef831 ./css/style.css +eb54f374256b75a17f274847b4ca9985fd046f9f ./css/style.css 2e3217a3f3b7c2fb30562ab9a4ef9a407ae81897 ./images/btc32x.png 8ac24915d59cef71c542e7cb7d7e153f560cba1f ./images/coinbin.gif f2af060f1cadbc9065c8c465c648dc01be67cc12 ./images/loader.gif From 2154a991f6455365e5f97a36ba593dbe213a1094 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Thu, 4 Jan 2018 10:42:45 +0000 Subject: [PATCH 15/25] small bugfix so that the #wallet inputs/outputs are properly set on the #fees page --- js/coinbin.js | 12 ++++++------ sha1sum | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index eca361d7..df60b70f 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -677,10 +677,10 @@ $(document).ready(function() { var inputs = $(data).find("unspent").children().length; if($("#walletSegwit").is(":checked")){ $("#fees .txi_segwit").val(inputs); - $("#fees .txi_segwit").change(); + $("#fees .txi_segwit").trigger('input'); } else { $("#fees .txi_regular").val(inputs); - $("#fees .txi_regular").change(); + $("#fees .txi_regular").trigger('input'); } $.each($("#walletSpendTo .output"), function(i,o){ @@ -688,10 +688,10 @@ $(document).ready(function() { var ad = coinjs.addressDecode(addr.val()); if (ad.version == coinjs.multisig){ // p2sh $("#fees .txo_p2sh").val(($("#fees .txo_p2sh").val()*1)+1); - $("#fees .txo_p2sh").change(); + $("#fees .txo_p2sh").trigger('input'); } else { // p2pkh $("#fees .txo_p2pkh").val(($("#fees .txo_p2pkh").val()*1)+1); - $("#fees .txo_p2pkh").change(); + $("#fees .txo_p2pkh").trigger('input'); } }); @@ -700,10 +700,10 @@ $(document).ready(function() { var ad = coinjs.addressDecode(addr); if (ad.version == coinjs.multisig){ // p2sh $("#fees .txo_p2sh").val(($("#fees .txo_p2sh").val()*1)+1); - $("#fees .txo_p2sh").change(); + $("#fees .txo_p2sh").trigger('input'); } else { // p2pkh $("#fees .txo_p2pkh").val(($("#fees .txo_p2pkh").val()*1)+1); - $("#fees .txo_p2pkh").change(); + $("#fees .txo_p2pkh").trigger('input'); } } diff --git a/sha1sum b/sha1sum index 93de7aca..ae4115d1 100644 --- a/sha1sum +++ b/sha1sum @@ -1,8 +1,8 @@ ----- Version 1.3 2018.01.03 --- +---- Version 1.3 2018.01.04 --- 77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js 3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js 253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js -f43691b7db457598283d3b146f8b8545b2aa21a1 ./js/coinbin.js +c23f25f218ed8a05376c2f7d98d7056ee9738c74 ./js/coinbin.js 31fbebf65d9cae8f26761cb057c4fb1b97339d08 ./js/coin.js 988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js 9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js From 103b9f8efd36cc84bea0fc31f25f3f7500e9ac89 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Sat, 6 Jan 2018 16:11:20 +0000 Subject: [PATCH 16/25] few minor changes, plus the wallet now enables rbf by default --- index.html | 10 +++++++++- js/coin.js | 5 +++-- js/coinbin.js | 10 +++++++++- sha1sum | 9 ++++----- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 068c46c4..cd299c88 100644 --- a/index.html +++ b/index.html @@ -159,6 +159,11 @@

Open Wallet browser based bitcoin wallet

+ + +

+ +

@@ -1077,7 +1082,10 @@

WIF key


+
+
+ +
+
+
+
Advanced Options
@@ -1313,7 +1323,9 @@

Settings making coinb.in even better!

Network:

Select which network you'd like to use for key pair generation.

-
+
HD Priv:
+ +
+ Fork ID:
+ +

@@ -1364,21 +1381,20 @@

Settings making coinb.in even better!


- - - - - - - - - - - - - - - +
+
+ Broadcast:
+

Select the network you wish to broadcast the transaction via

+ +
+

@@ -1390,6 +1406,7 @@

Settings making coinb.in even better!

+
diff --git a/js/coin.js b/js/coin.js index 807bf67d..7973b352 100644 --- a/js/coin.js +++ b/js/coin.js @@ -14,6 +14,8 @@ coinjs.priv = 0x80; coinjs.multisig = 0x17; coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; + coinjs.useForkId = false; + coinjs.forkId = 0; coinjs.compressed = false; @@ -803,11 +805,13 @@ r.block = null; /* add an input to a transaction */ - r.addinput = function(txid, index, script, sequence){ + r.addinput = function(txid, index, script, sequence, value){ var o = {}; o.outpoint = {'hash':txid, 'index':index}; o.script = coinjs.script(script||[]); o.sequence = sequence || ((r.lock_time==0) ? 4294967295 : 0); + console.assert(value, 'Missing input value'); + o.value = value; return this.ins.push(o); } @@ -908,19 +912,9 @@ var n = u.getElementsByTagName("tx_output_n")[0].childNodes[0].nodeValue; var scr = script || u.getElementsByTagName("script")[0].childNodes[0].nodeValue; - if(segwit){ - /* this is a small hack to include the value with the redeemscript to make the signing procedure smoother. - It is not standard and removed during the signing procedure. */ - - s = coinjs.script(); - s.writeBytes(Crypto.util.hexToBytes(script)); - s.writeOp(0); - s.writeBytes(coinjs.numToBytes(u.getElementsByTagName("value")[0].childNodes[0].nodeValue*1, 8)); - scr = Crypto.util.bytesToHex(s.buffer); - } - var seq = sequence || false; - self.addinput(txhash, n, scr, seq); + var value = u.getElementsByTagName("value")[0].childNodes[0].nodeValue*1; + self.addinput(txhash, n, scr, seq, value); value += u.getElementsByTagName("value")[0].childNodes[0].nodeValue*1; total++; } @@ -950,7 +944,14 @@ /* generate the transaction hash to sign from a transaction input */ r.transactionHash = function(index, sigHashType) { - + if (coinjs.useForkId) { + var witnessSigHash = this.transactionHashSegWitV0(index, sigHashType); + if (witnessSigHash['result'] == 1) { + return witnessSigHash['hash']; + } else { + return false; + } + } var clone = coinjs.clone(this); var shType = sigHashType || 1; @@ -1030,22 +1031,23 @@ /* generate a segwit transaction hash to sign from a transaction input */ r.transactionHashSegWitV0 = function(index, sigHashType){ - /* - Notice: coinb.in by default, deals with segwit transactions in a non-standard way. - Segwit transactions require that input values are included in the transaction hash. - To save wasting resources and potentially slowing down this service, we include the amount with the - redeem script to generate the transaction hash and remove it after its signed. - */ - // start redeem script check var extract = this.extractScriptKey(index); - if(extract['type'] != 'segwit'){ - return {'result':0, 'fail':'redeemscript', 'response':'redeemscript missing or not valid for segwit'}; + if(!coinjs.useForkId && extract['type'] != 'segwit'){ + return {'result':0, 'fail':'txtype', 'response':'sighash-witnessv0 is only for sigwit when forkid is not enabled'}; } var scriptcode = Crypto.util.hexToBytes(extract['script']); - if(scriptcode[0] != 0){ - return {'result':0, 'fail':'scriptcode', 'response':'redeemscript is not valid'}; + if(extract['type'] == 'sigwit') { + if(scriptcode[0] != 0){ + return {'result':0, 'fail':'scriptcode', 'response':'redeemscript is not valid'}; + } + scriptcode = scriptcode.slice(1); + scriptcode.unshift(25, 118, 169); + scriptcode.push(136, 172); + } else { + var sz = coinjs.numToVarInt(scriptcode.length); + scriptcode = sz.concat(scriptcode); } if(extract['value'] == -1){ @@ -1054,10 +1056,6 @@ // end of redeem script check - scriptcode = scriptcode.slice(1); - scriptcode.unshift(25, 118, 169); - scriptcode.push(136, 172); - var value = coinjs.numToBytes(extract['value'], 8); // start @@ -1104,6 +1102,10 @@ } var locktime = coinjs.numToBytes(this.lock_time, 4); + if (coinjs.useForkId) { + sigHashType |= 0x40; + sigHashType |= (coinjs.forkId << 8); + } var sighash = coinjs.numToBytes(sigHashType, 4); var buffer = []; @@ -1125,39 +1127,40 @@ /* extract the scriptSig, used in the transactionHash() function */ r.extractScriptKey = function(index) { if(this.ins[index]){ + var value = -1; + if ('value' in this.ins[index]) { + value = this.ins[index].value; + } if((this.ins[index].script.chunks.length==5) && this.ins[index].script.chunks[4]==172 && coinjs.isArray(this.ins[index].script.chunks[2])){ //OP_CHECKSIG // regular scriptPubkey (not signed) - return {'type':'scriptpubkey', 'signed':'false', 'signatures':0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer)}; + return {'type':'scriptpubkey', 'signed':'false', 'signatures':0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; } else if((this.ins[index].script.chunks.length==2) && this.ins[index].script.chunks[0][0]==48 && this.ins[index].script.chunks[1].length == 5 && this.ins[index].script.chunks[1][1]==177){//OP_CHECKLOCKTIMEVERIFY // hodl script (signed) - return {'type':'hodl', 'signed':'true', 'signatures':1, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer)}; + return {'type':'hodl', 'signed':'true', 'signatures':1, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; } else if((this.ins[index].script.chunks.length==2) && this.ins[index].script.chunks[0][0]==48){ // regular scriptPubkey (probably signed) - return {'type':'scriptpubkey', 'signed':'true', 'signatures':1, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer)}; + return {'type':'scriptpubkey', 'signed':'true', 'signatures':1, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; } else if(this.ins[index].script.chunks.length == 5 && this.ins[index].script.chunks[1] == 177){//OP_CHECKLOCKTIMEVERIFY // hodl script (not signed) - return {'type':'hodl', 'signed':'false', 'signatures': 0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer)}; - } else if((this.ins[index].script.chunks.length <= 3 && this.ins[index].script.chunks.length > 0) && this.ins[index].script.chunks[0].length == 22 && this.ins[index].script.chunks[0][0] == 0){ + return {'type':'hodl', 'signed':'false', 'signatures': 0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; + } else if((this.ins[index].script.chunks.length <= 3 && this.ins[index].script.chunks.length > 0) && this.ins[index].script.buffer.length == 22 && this.ins[index].script.chunks[0] == 0){ // segwit script var signed = ((this.witness[index]) && this.witness[index].length==2) ? 'true' : 'false'; var sigs = (signed == 'true') ? 1 : 0; - var value = -1; // no value found - if((this.ins[index].script.chunks[2]) && this.ins[index].script.chunks[2].length==8){ - value = coinjs.bytesToNum(this.ins[index].script.chunks[2]); // value found encoded in transaction (THIS IS NON STANDARD) - } - return {'type':'segwit', 'signed':signed, 'signatures': sigs, 'script': Crypto.util.bytesToHex(this.ins[index].script.chunks[0]), 'value': value}; + return {'type':'segwit', 'signed':signed, 'signatures': sigs, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; // **** correct? } else if (this.ins[index].script.chunks[0]==0 && this.ins[index].script.chunks[this.ins[index].script.chunks.length-1][this.ins[index].script.chunks[this.ins[index].script.chunks.length-1].length-1]==174) { // OP_CHECKMULTISIG // multisig script, with signature(s) included - return {'type':'multisig', 'signed':'true', 'signatures':this.ins[index].script.chunks.length-2, 'script': Crypto.util.bytesToHex(this.ins[index].script.chunks[this.ins[index].script.chunks.length-1])}; + return {'type':'multisig', 'signed':'true', 'signatures':this.ins[index].script.chunks.length-2, 'script': Crypto.util.bytesToHex(this.ins[index].script.chunks[this.ins[index].script.chunks.length-1]), + 'value': value}; } else if (this.ins[index].script.chunks[0]>=80 && this.ins[index].script.chunks[this.ins[index].script.chunks.length-1]==174) { // OP_CHECKMULTISIG // multisig script, without signature! - return {'type':'multisig', 'signed':'false', 'signatures':0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer)}; + return {'type':'multisig', 'signed':'false', 'signatures':0, 'script': Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; } else if (this.ins[index].script.chunks.length==0) { // empty - return {'type':'empty', 'signed':'false', 'signatures':0, 'script': ''}; + return {'type':'empty', 'signed':'false', 'signatures':0, 'script': '', 'value': value}; } else { // something else - return {'type':'unknown', 'signed':'false', 'signatures':0, 'script':Crypto.util.bytesToHex(this.ins[index].script.buffer)}; + return {'type':'unknown', 'signed':'false', 'signatures':0, 'script':Crypto.util.bytesToHex(this.ins[index].script.buffer), 'value': value}; } } else { return false; @@ -1187,6 +1190,9 @@ } var shType = sigHashType || 1; + if (coinjs.useForkId) { + shType |= 0x40; + } var hash = txhash || Crypto.util.hexToBytes(this.transactionHash(index, shType)); if(hash){ @@ -1368,16 +1374,11 @@ var wif2 = coinjs.wif2pubkey(wif); var segwit = coinjs.segwitAddress(wif2['pubkey']); - if(segwit['redeemscript'] == Crypto.util.bytesToHex(this.ins[index].script.chunks[0])){ + if(segwit['redeemscript'] == Crypto.util.bytesToHex(this.ins[index].script.buffer)){ var txhash = this.transactionHashSegWitV0(index, shType); if(txhash.result == 1){ var segwitHash = Crypto.util.hexToBytes(txhash.hash); var signature = this.transactionSig(index, wif, shType, segwitHash); - - // remove any non standard data we store, i.e. input value - var script = coinjs.script(); - script.writeBytes(this.ins[index].script.chunks[0]); - this.ins[index].script = script; if(!coinjs.isArray(this.witness)){ this.witness = []; @@ -1396,7 +1397,7 @@ for(var y = 0; y < this.witness.length; y++){ if(!witness_used.includes(y)){ var sw = coinjs.segwitAddress(this.witness[y][1]); - if(sw['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.chunks[0])){ + if(sw['redeemscript'] == Crypto.util.bytesToHex(this.ins[i].script.buffer)){ witness_order.push(this.witness[y]); witness_used.push(y); break; @@ -1564,6 +1565,42 @@ return obj; } + r.coreInputObject = function() { + var inputs = []; + for (var i = 0; i < this.ins.length; i++) { + var cvin = this.ins[i]; + var vin = {}; + vin.txid = cvin.outpoint.hash; + vin.vout = parseInt(cvin.outpoint.index); + // vin.scriptPubKey = ''; + // vin.redeemScript = ''; + vin.script = Crypto.util.bytesToHex(cvin.script.buffer); + vin.amount = cvin.value; + inputs.push(vin); + } + return inputs; + } + + r.completeInputValues = function(txinputs){ + function vinOutpoint(vin) { return vin.txid + ':' + vin.vout; } + function cbvinOutpoint(cvin) { return cvin.outpoint.hash + ':' + cvin.outpoint.index; } + var inputMap = {}; + for (var i = 0; i < txinputs.length; i++) { + var vin = txinputs[i]; + inputMap[vinOutpoint(vin)] = vin; + } + for (var i = 0; i < this.ins.length; i++) { + var cvin = this.ins[i]; + var outpoint = cbvinOutpoint(cvin); + if (outpoint in inputMap) { + var vin = inputMap[outpoint]; + cvin.value = vin.amount; + cvin.script = coinjs.script(Crypto.util.hexToBytes(vin.script)); + } + } + console.log(this.ins); + }; + r.size = function(){ return ((this.serialize()).length/2).toFixed(0); } diff --git a/js/coinbin.js b/js/coinbin.js index efeb75dc..27339291 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -610,7 +610,8 @@ $(document).ready(function() { estimatedTxSize += 147 } - tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val(), seq); + var value = parseInt($(".txIdAmount", o).val() * 1e8); + tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val(), seq, value); } else { $('#putTabs a[href="#txinputs"]').attr('style','color:#a94442;'); } @@ -640,12 +641,14 @@ $(document).ready(function() { if(!$("#recipients .row, #inputs .row").hasClass('has-error')){ - - $("#transactionCreate textarea").val(tx.serialize()); + var txhex = tx.serialize(); + var txinputs = JSON.stringify(tx.coreInputObject()); + $("#transactionCreate textarea.transactionHex").val(txhex); + $("#transactionCreate textarea.transactionInputs").val(txinputs); $("#transactionCreate .txSize").html(tx.size()); if($("#feesestnewtx").attr('est')=='y'){ - $("#fees .txhex").val($("#transactionCreate textarea").val()); + $("#fees .txhex").val(txhex); $("#feesAnalyseBtn").click(); $("#fees .txhex").val(""); window.location = "#fees"; @@ -665,6 +668,14 @@ $(document).ready(function() { } }); + $("#transactionToSignBtn").click(function(){ + var txhex = $("#transactionCreate textarea.transactionHex").val(); + var txinputs = $("#transactionCreate textarea.transactionInputs").val(); + $("#signTransaction").val(txhex); + $("#signTransactionInputs").val(txinputs); + window.location.hash = "#sign"; + }); + $("#feesestnewtx").click(function(){ $(this).attr('est','y'); $("#transactionBtn").click(); @@ -850,6 +861,10 @@ $(document).ready(function() { listUnspentChainso_Dogecoin(redeem); } else if(host=='cryptoid.info_carboncoin'){ listUnspentCryptoidinfo_Carboncoin(redeem); + } else if(host=='bitcoingold.org_bgoldmainnet'){ + listUnspentBitcoingoldorg_BitcoinGold(redeem, true); + } else if(host=='bitcoingold.org_bgoldtestnet'){ + listUnspentBitcoingoldorg_BitcoinGold(redeem, false); } else { listUnspentDefault(redeem); } @@ -1083,6 +1098,45 @@ $(document).ready(function() { }); } + function listUnspentBitcoingoldorg_BitcoinGold(redeem, mainnet) { + $.ajax ({ + type: "GET", + url: "https://explorer.bitcoingold.org/insight-api/addr/"+redeem.addr+"/utxo", + dataType: "json", + crossDomain: true, + contentType: 'text/plain', + xhrFields: { + withCredentials: false + }, + error: function(data) { + $("#redeemFromStatus").removeClass('hidden').html(' Unexpected error, unable to retrieve unspent outputs!'); + }, + success: function(data) { + if(data instanceof Array){ + $("#redeemFromAddress").removeClass('hidden').html( + ' Retrieved unspent inputs from address '+redeem.addr+''); + for(var i=0; i Unexpected error, unable to retrieve unspent outputs.'); + } + }, + complete: function(data, status) { + $("#redeemFromBtn").html("Load").attr('disabled',false); + totalInputAmount(); + } + }); + } + /* math to calculate the inputs and outputs */ function totalInputAmount(){ @@ -1197,6 +1251,33 @@ $(document).ready(function() { }); } + // broadcast transaction via bitcoingold.org + function rawSubmitBitcoingoldorg_BitcoinGold(thisbtn, mainnet) { + $(thisbtn).val('Please wait, loading...').attr('disabled',true); + $.ajax ({ + type: "POST", + url: "https://explorer.bitcoingold.org/insight-api/tx/send", + data: "rawtx: " + $("#rawTransaction").val(), + dataType: "json", + error: function(data) { + $("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').removeClass("hidden").html(" There was an error submitting your request, please try again").prepend(''); + }, + success: function(data) { + $("#rawTransactionStatus").html("Successful").removeClass('hidden'); + if(data.txid) { + $("#rawTransactionStatus").addClass('alert-success').removeClass('alert-danger'); + $("#rawTransactionStatus").html('txid: '+data.txid); + } else { + $("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').prepend(' '); + } + }, + complete: function(data, status) { + $("#rawTransactionStatus").fadeOut().fadeIn(); + $(thisbtn).val('Submit').attr('disabled',false); + } + }); + } + // broadcast transaction via chain.so (mainnet) function rawSubmitChainso_BitcoinMainnet(thisbtn){ $(thisbtn).val('Please wait, loading...').attr('disabled',true); @@ -1548,6 +1629,7 @@ $(document).ready(function() { $("#signBtn").click(function(){ var wifkey = $("#signPrivateKey"); var script = $("#signTransaction"); + var txinputs = $("#signTransactionInputs"); if(coinjs.addressDecode(wifkey.val())){ $(wifkey).parent().removeClass('has-error'); @@ -1561,11 +1643,26 @@ $(document).ready(function() { $(script).parent().addClass('has-error'); } + var txinputsObj = null; + if (txinputs.val().trim()) { + try { + txinputsObj = JSON.parse(txinputs.val()); + $(txinputs).parent().removeClass('has-error'); + } catch(e) { + $(txinputs).parent().addClass('has-error'); + } + } else { + $(script).parent().removeClass('has-error'); + } + if($("#sign .has-error").length==0){ $("#signedDataError").addClass('hidden'); try { var tx = coinjs.transaction(); var t = tx.deserialize(script.val()); + if (txinputsObj) { + t.completeInputValues(txinputsObj); + } var signed = t.sign(wifkey.val(), $("#sighashType option:selected").val()); $("#signedData textarea").val(signed); @@ -1711,7 +1808,8 @@ $(document).ready(function() { $("#settings .has-error").removeClass("has-error"); $.each($(".coinjssetting"),function(i, o){ - if(!$(o).val().match(/^0x[0-9a-f]+$/)){ + // allow hex, dec, or empty. + if(!$(o).val().match(/^0x[0-9a-f]+|[0-9]+|$/)){ $(o).parent().addClass("has-error"); } }); @@ -1721,6 +1819,14 @@ $(document).ready(function() { coinjs.pub = $("#coinjs_pub").val()*1; coinjs.priv = $("#coinjs_priv").val()*1; coinjs.multisig = $("#coinjs_multisig").val()*1; + var forkIdVal = $("#coinjs_forkid").val(); + if (!isNaN(forkIdVal) && forkIdVal*1 >= 0) { + coinjs.useForkId = true; + coinjs.forkId = forkIdVal*1; + } else { + coinjs.useForkId = false; + coinjs.forkId = 0; + } coinjs.hdkey.pub = $("#coinjs_hdpub").val()*1; coinjs.hdkey.prv = $("#coinjs_hdprv").val()*1; @@ -1763,6 +1869,12 @@ $(document).ready(function() { $("#coinjs_hdpub").val(o[3]); $("#coinjs_hdprv").val(o[4]); + if(o.length >= 8) { + $("#coinjs_forkid").val(o[7]); + } else { + $("#coinjs_forkid").val(""); + } + // hide/show custom screen if($("option:selected",this).val()=="custom"){ $("#settingsCustom").removeClass("hidden"); @@ -1790,6 +1902,14 @@ $(document).ready(function() { $("#rawSubmitBtn").click(function(){ rawSubmitcryptoid_Carboncoin(this); }); + } else if(host=="bitcoingold.org_bgoldmainnet"){ + $("#rawSubmitBtn").click(function(){ + rawSubmitBitcoingoldorg_BitcoinGold(this, true); + }); + } else if(host=="bitcoingold.org_bgoldtestnet"){ + $("#rawSubmitBtn").click(function(){ + rawSubmitBitcoingoldorg_BitcoinGold(this, false); + }); } else { $("#rawSubmitBtn").click(function(){ rawSubmitDefault(this); // revert to default From 15eb0660b6dcfe557e7e35c022ca8f92da84f05b Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 02:27:44 +0200 Subject: [PATCH 21/25] Edit for testnet. --- index.html | 31 +++++++++++++++++++++++++------ js/coin.js | 10 ++++------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 611cddb1..7319accd 100644 --- a/index.html +++ b/index.html @@ -94,8 +94,9 @@

Welcome to the Blockchain

Online wallet creator

-

Bitcoin Gold Edition. All the data is stored only on your browser. Don't forget to write down your keys before exit. Based on coinb.in

-

Learn more »

+ +

Bitcoin Gold Edition. All the data is stored only on your browser. Don't forget to write down your keys before exit.

+

@@ -118,10 +119,10 @@

MultiSig

-
-

Wallet

-

Quick access to an online wallet where only you have access to your own private keys & can calculate your own fee!

-
+ + + +

Addresses

@@ -1381,6 +1382,7 @@

Settings making coinb.in even better!


+<<<<<<< HEAD
Broadcast:
@@ -1395,6 +1397,23 @@

Settings making coinb.in even better!

+======= + + + + + + + + + + + + + + + +>>>>>>> Edit for testnet.
diff --git a/js/coin.js b/js/coin.js index 7973b352..72edaab8 100644 --- a/js/coin.js +++ b/js/coin.js @@ -10,12 +10,10 @@ var coinjs = window.coinjs = function () { }; /* public vars */ - coinjs.pub = 0x26; - coinjs.priv = 0x80; - coinjs.multisig = 0x17; - coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; - coinjs.useForkId = false; - coinjs.forkId = 0; + coinjs.pub = 0x6f; + coinjs.priv = 0xef; + coinjs.multisig = 0xc4; + coinjs.hdkey = {'prv':0x04358394, 'pub':0x043587cf}; coinjs.compressed = false; From ee6b6b8adaf0d40f181ca958de8681bc0a245cbf Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Fri, 10 Nov 2017 02:39:55 +0200 Subject: [PATCH 22/25] Added settings for mailjet --- js/coin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/coin.js b/js/coin.js index 72edaab8..a93006b4 100644 --- a/js/coin.js +++ b/js/coin.js @@ -10,10 +10,10 @@ var coinjs = window.coinjs = function () { }; /* public vars */ - coinjs.pub = 0x6f; - coinjs.priv = 0xef; - coinjs.multisig = 0xc4; - coinjs.hdkey = {'prv':0x04358394, 'pub':0x043587cf}; + coinjs.pub = 0x26; + coinjs.priv = 0x80; + coinjs.multisig = 0x17; + coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; coinjs.compressed = false; From ac2b727d82f12bff72da62661526916d50a8d22a Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 4 Mar 2018 19:48:34 +0200 Subject: [PATCH 23/25] Added again the transaction --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 7319accd..01cc17b5 100644 --- a/index.html +++ b/index.html @@ -63,8 +63,8 @@
  • MultiSig Address
  • Time Locked Address
  • HD Address
  • - - +
  • +
  • Transaction
  • Verify
  • @@ -112,10 +112,10 @@

    MultiSig

    We offer a fully transparent multisig solution which works seamlessly offline and with other bitcoin clients.

    - - - - +
    +

    Raw Transactions

    +

    Create, verify, sign and broadcast custom raw transactions online with advanced features and minimal effort!

    +
    From fb2fae3f76c678519c6f29d70d6177005789f026 Mon Sep 17 00:00:00 2001 From: Martin Kuvandzhiev Date: Sun, 4 Mar 2018 23:57:49 +0200 Subject: [PATCH 24/25] WIP transaction signing --- index.html | 24 +++--------------------- js/coin.js | 3 ++- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/index.html b/index.html index 01cc17b5..81c3c4f4 100644 --- a/index.html +++ b/index.html @@ -69,7 +69,7 @@
  • Verify
  • Sign
  • - +
  • Broadcast
  • @@ -1201,8 +1201,8 @@

    Keys

    - - +

    Sign Transaction once a transaction has been verified

    +

    Once you have verified a transaction you can sign and then broadcast it into the network.

    @@ -1382,7 +1382,6 @@

    Settings making coinb.in even better!


    -<<<<<<< HEAD
    Broadcast:
    @@ -1397,23 +1396,6 @@

    Settings making coinb.in even better!

    -======= - - - - - - - - - - - - - - - ->>>>>>> Edit for testnet.
    diff --git a/js/coin.js b/js/coin.js index a93006b4..20a75b56 100644 --- a/js/coin.js +++ b/js/coin.js @@ -14,7 +14,8 @@ coinjs.priv = 0x80; coinjs.multisig = 0x17; coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; - + coinjs.useForkId = true; + coinjs.forkId = 0x79; coinjs.compressed = false; /* other vars */ From 8c01b306a6521da221c653fc80197ebe44d49e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Nov=C3=BD?= Date: Thu, 22 Mar 2018 09:46:15 +0100 Subject: [PATCH 25/25] Jesus fscking crust I don't even... this crap took me like 5 hours... --- js/coin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/coin.js b/js/coin.js index 20a75b56..b0c4b61e 100644 --- a/js/coin.js +++ b/js/coin.js @@ -15,7 +15,7 @@ coinjs.multisig = 0x17; coinjs.hdkey = {'prv':0x0488ade4, 'pub':0x0488b21e}; coinjs.useForkId = true; - coinjs.forkId = 0x79; + coinjs.forkId = 79; coinjs.compressed = false; /* other vars */