diff --git a/index.html b/index.html
index 89f6abec..2c0f8962 100644
--- a/index.html
+++ b/index.html
@@ -1314,8 +1314,9 @@
Settings making coinb.in even better!
Select which network you'd like to use for key pair generation.
@@ -1388,6 +1390,7 @@ Settings making coinb.in even better!
diff --git a/js/coinbin.js b/js/coinbin.js
index efeb75dc..18d56c6d 100644
--- a/js/coinbin.js
+++ b/js/coinbin.js
@@ -846,6 +846,8 @@ $(document).ready(function() {
if(host=='chain.so_litecoin'){
listUnspentChainso_Litecoin(redeem);
+ } else if(host=='digiexplorer.info'){
+ listUnspentDigiExplorer(redeem);
} else if(host=='chain.so_dogecoin'){
listUnspentChainso_Dogecoin(redeem);
} else if(host=='cryptoid.info_carboncoin'){
@@ -1049,6 +1051,38 @@ $(document).ready(function() {
}
+ /* retrieve unspent data from digiexplorer.info for digibyte */
+ function listUnspentDigiExplorer(redeem){
+ $.ajax ({
+ type: "GET",
+ url: "https://digiexplorer.info/api/addr/"+redeem.addr+"/utxo",
+ dataType: "json",
+ error: function(data) {
+ $("#redeemFromStatus").removeClass('hidden').html(' Unexpected error, unable to retrieve unspent outputs!');
+ },
+ success: function(data) {
+ if(data && data.length){
+ $("#redeemFromAddress").removeClass('hidden').html(
+ ' Retrieved unspent inputs from address '+redeem.addr+'');
+ for(var i in data){
+ var o = data[i];
+ var tx = o.txid;
+ var n = o.vout;
+ var script = (redeem.isMultisig==true) ? $("#redeemFrom").val() : o.scriptPubKey;
+ var amount = o.amount;
+ addOutput(tx, n, script, amount);
+ }
+ } else {
+ $("#redeemFromStatus").removeClass('hidden').html(' Unexpected error, unable to retrieve unspent outputs.');
+ }
+ },
+ complete: function(data, status) {
+ $("#redeemFromBtn").html("Load").attr('disabled',false);
+ totalInputAmount();
+ }
+ });
+ }
+
/* retrieve unspent data from chain.so for dogecoin */
function listUnspentChainso_Dogecoin(redeem){
$.ajax ({
@@ -1286,6 +1320,35 @@ $(document).ready(function() {
});
}
+ function rawSubmitDigiExplorer(thisbtn){
+ $(thisbtn).val('Please wait, loading...').attr('disabled',true);
+ $.ajax ({
+ type: "POST",
+ url: "https://digiexplorer.info/api/tx/send",
+ data: JSON.stringify({ "rawtx": $("#rawTransaction").val() }),
+ dataType : "json",
+ contentType: "application/json",
+ error: function(data) {
+ var obj = data.responseText;
+ var r = ' ';
+ r += (obj) ? ' '+obj : '';
+ r = (r!='') ? r : ' Failed to broadcast'; // build response
+ $("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').removeClass("hidden").html(r).prepend('');
+ },
+ success: function(data) {
+ if(data){
+ $("#rawTransactionStatus").addClass('alert-success').removeClass('alert-danger').removeClass("hidden").html(' Txid: ' + data.txid);
+ } else {
+ $("#rawTransactionStatus").addClass('alert-danger').removeClass('alert-success').removeClass("hidden").html(' Unexpected error, please try again').prepend('');
+ }
+ },
+ complete: function(data, status) {
+ $("#rawTransactionStatus").fadeOut().fadeIn();
+ $(thisbtn).val('Submit').attr('disabled',false);
+ }
+ });
+ }
+
@@ -1778,6 +1841,10 @@ $(document).ready(function() {
$("#rawSubmitBtn").click(function(){
rawSubmitChainso_BitcoinMainnet(this);
});
+ } else if(host=="digiexplorer.info"){
+ $("#rawSubmitBtn").click(function(){
+ rawSubmitDigiExplorer(this);
+ });
} else if(host=="chain.so_dogecoin"){
$("#rawSubmitBtn").click(function(){
rawSubmitchainso_dogecoin(this);