flo comment write and fetch functions complete in flosend.html

This commit is contained in:
Abhishek Sinha 2018-10-22 14:04:39 +05:30
parent dfb0297929
commit 6989c93717

View File

@ -19,8 +19,8 @@
<input type="text" id="prevTrxHash">
<label>Index</label>
<input type="text" id="index">
<label>Script</label>
<input type="text" id="script">
<label>ScriptPubKey</label>
<input type="text" id="scriptPubKey">
<h2>Outputs</h2>
<label>Address</label>
@ -2980,14 +2980,14 @@
btrx.floData = ""; //flochange .. look at this
btrx.addinput = function (txid, index, script, sequence) {
btrx.addinput = function (txid, index, scriptPubKey, sequence) {
var o = {};
o.outpoint = {
'hash': txid,
'index': index
};
//o.script = []; Signature and Public Key should be added after singning
o.script = Crypto.util.hexToBytes(script); //push previous output pubkey script
o.script = Crypto.util.hexToBytes(scriptPubKey); //push previous output pubkey script
o.sequence = sequence || ((btrx.locktime == 0) ? 4294967295 : 0);
return this.inputs.push(o);
}
@ -3439,8 +3439,8 @@
var trx = bitjs.transaction();
var txid = document.getElementById("prevTrxHash").value;
var index = document.getElementById("index").value;
var script = document.getElementById("script").value;
trx.addinput(txid, index, script);
var scriptPubKey = document.getElementById("scriptPubKey").value;
trx.addinput(txid, index, scriptPubKey);
var address = document.getElementById("address1").value;
var value = document.getElementById("value1").value;
trx.addoutput(address, value);