coinables / buidljs

A wrapper for bitcoinjs-lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requesting Full Signed Transaction Value

doswelleth-zz opened this issue · comments

Hey man

Cool lib! Would love a full dump of the signed tx when buidl.createTransaction() is ready to hash. I am having an issue decoding it in Coinb.in. Took me a second to realize that ellipses and subsequent alphanumeric value was the rest of the hash. The copy paste was confusing because the drop down opens whenever you click on it. Convenient but threw me off.

e.g.
{signedtx: 010000000113f86a01005681e427828aa8c51351bc3a159287...1b2b47e8c2abbd51f9dc52fa278849429b0d6108700000000}

click on signedtx field

signedtx: 010000000113f86a01005681e427828aa8c51351bc3a15928741756031e98e5dbb1ee5df53010000006b483045022100bd18a84db91cc55b17b2ff7f77afadf8ad71d9xc971b

I assume the 1b2b47e... is the predicate. However I still cannot decode it in Coinb.in

That part may be on my end based on how I created the transaction. I'll try again to confirm.

Are you sure that was output from createTransaction(); function? There definitely shouldn't be an "x" in a transaction hash, since it's hex, 0-9,a-g. Perhaps you copy/pasted the wrong string from the console? The ellipses thing is annoying, but that's the browser console doing that because the string is so long, not the buidljs wrapper. Try outputting the hash to html like a div or textarea, instead of the console, see if that helps.

let t = buidl.createTransaction('3', 'b31c9...etc');
let h = t.signedtx;
document.getElementById("mydiv").innerHTML = h;

Are you sure that was output from createTransaction(); function? There definitely shouldn't be an "x" in a transaction hash

No. I changed the value out of habit as I was dealing with real bitcoins. Yeah, no "x" was rendered ha ha. Will update. Far as the ellipses, it's mostly a non-issue but I cannot submit PRs obviously for now.

Will keep playing around with this. I have an idea for a project and this is a great start to get me back on the raw transaction horse.