coinb.in now has an advanced features drop down menu. "nlocktime" has been added with more to come!

This commit is contained in:
OutCast3k 2014-12-15 12:15:28 +00:00
parent 6664586568
commit 529a2193d8
3 changed files with 39 additions and 5 deletions

View file

@ -289,15 +289,32 @@
</span>
</div>
<div class="checkbox">
<label><input type="checkbox" id="clearInputsOnLoad" class="checkbox-inline" checked> Clear existing inputs when new inputs are loaded</label>
</div>
<br>
<div class="hidden alert alert-danger" id="redeemFromStatus"></div>
<div class="hidden alert alert-info" id="redeemFromAddress"></div>
<div>
<a href="javascript:;" id="optionsCollapse"><div class="well well-sm"><span class="glyphicon glyphicon-collapse-down" id="glyphcollapse"></span> Advanced Options</div></a>
<div class="hidden" id="optionsAdvanced">
<label>Clear Inputs</label>
<p class="checkbox">
<label><input type="checkbox" id="clearInputsOnLoad" class="checkbox-inline" checked> Clear existing inputs when new inputs are loaded.</label>
</p>
<hr>
<label>Lock Time</label>
<p>The <a href="https://bitcoin.org/en/developer-guide#locktime-and-sequence-number">locktime</a> indicates the earliest time a transaction can be added to the block chain.</p>
<input type="text" class="form-control" value="0" id="nLockTime">
<hr>
</div>
</div>
<ul class="nav nav-tabs" id="putTabs">
<li class="active"><a href="#txoutputs" data-toggle="tab">Outputs (<span id="totalOutput">0.0000</span>)</a></li>
<li><a href="#txinputs" data-toggle="tab">Inputs (<span id="totalInput">0.0000</span>)</a></li>

View file

@ -711,7 +711,7 @@
});
}
obj.locktime = readAsInt(4);
obj.lock_time = readAsInt(4);
return obj;
}

View file

@ -349,6 +349,12 @@ $(document).ready(function() {
$("#transactionBtn").click(function(){
var tx = coinjs.transaction();
if(($("#nLockTime").val()).match(/^[0-9]+$/g)){
tx.lock_time = $("#nLockTime").val()*1;
}
$.each($("#inputs .row"), function(i,o){
if($(".txId",o).val()!="" && $(".txIdN",o).val()!=""){
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val());
@ -486,6 +492,16 @@ $(document).ready(function() {
$("#transactionFee").val((fee>0)?fee:'0.00');
}
$("#optionsCollapse").click(function(){
if($("#optionsAdvanced").hasClass('hidden')){
$("#glyphcollapse").removeClass('glyphicon-collapse-down').addClass('glyphicon-collapse-up');
$("#optionsAdvanced").removeClass("hidden");
} else {
$("#glyphcollapse").removeClass('glyphicon-collapse-up').addClass('glyphicon-collapse-down');
$("#optionsAdvanced").addClass("hidden");
}
});
/* broadcast a transaction */
$("#rawSubmitBtn").click(function(){
@ -543,6 +559,7 @@ $(document).ready(function() {
var tx = coinjs.transaction();
try {
var decode = tx.deserialize($("#verifyScript").val());
// console.log(decode);
$("#verifyTransactionData .transactionVersion").html(decode['version']);
$("#verifyTransactionData .transactionSize").html(decode.size()+' <i>bytes</i>');
$("#verifyTransactionData .transactionLockTime").html(decode['lock_time']);