Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 09, 2011, 01:40:16 PM Last edit: November 09, 2011, 02:51:25 PM by Jaagu |
|
Address is: EDIT: deleted
And Opera Javacript errors are:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
JavaScript - file://localhost/D:/tmp2/offlineTransaction.html Event thread: click Error: name: ReferenceError message: Statement on line 180: Undefined variable: JSON Backtrace: Line 180 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseTxs var tmp = JSON.parse(data); Line 140 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseFormData var result = parseTxs(form.transactions.value,ownAddress); // {balance:<balance>, unspenttxs:{ "<hash>": { <output index>: { amount:<amount>, script:<script> }}}} Line 1 of function script parseFormData(this.form) ... stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace' JavaScript - file://localhost/D:/tmp2/offlineTransaction.html Event thread: click Error: name: ReferenceError message: Statement on line 180: Undefined variable: JSON Backtrace: Line 180 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseTxs var tmp = JSON.parse(data); Line 140 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseFormData var result = parseTxs(form.transactions.value,ownAddress); // {balance:<balance>, unspenttxs:{ "<hash>": { <output index>: { amount:<amount>, script:<script> }}}} Line 1 of function script parseFormData(this.form) ... stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace' JavaScript - file://localhost/D:/tmp2/offlineTransaction.html Event thread: click Error: name: ReferenceError message: Statement on line 180: Undefined variable: JSON Backtrace: Line 180 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseTxs var tmp = JSON.parse(data); Line 140 of linked script file://localhost/D:/tmp2/offlineTransaction.js: In function parseFormData var result = parseTxs(form.transactions.value,ownAddress); // {balance:<balance>, unspenttxs:{ "<hash>": { <output index>: { amount:<amount>, script:<script> }}}} Line 1 of function script parseFormData(this.form) ... stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 09, 2011, 01:44:49 PM Last edit: November 09, 2011, 02:03:29 PM by Jaagu |
|
And here is error in OperaTor Javascript console:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
JavaScript - ./offlineTransaction.htm Inline script compilation Syntax error while loading: line 209 of linked script at ./offlineTransaction.js : Expected identifier for (var b in tx.in ) { ---------------------^
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
BTCurious
|
|
November 09, 2011, 02:20:55 PM |
|
The opera problem is not too hard to fix. Apparently the older operas don't have a native JSON parser, I didn't know that. Download this new offlineTransaction.html and overwrite the old one: http://ge.tt/9k6qyk9And put this file in the lib directory: http://ge.tt/88MLyk9And if you download this offlineTransaction.js and overwrite the old one, the OperaTor problem should be gone too: http://ge.tt/9jstkk9Internet explorer is a bit harder to fix though… it does some weird things and there's no decent debugger…
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 09, 2011, 02:46:19 PM Last edit: November 09, 2011, 03:44:41 PM by Jaagu |
|
Thank you for your efforts, but my Opera 9.63 still heralds errors: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JavaScript - file://localhost/D:/tmp2/offlineTransaction.html Inline script compilation Syntax error while loading: line 1 of linked script at file://localhost/D:/tmp2/lib/json2.js : Expected statement <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> -^=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Address is being parsed, balance remains unknown. ---------------- EDIT: It was my fault. I did not download the right json2.js file (If you'd uploaded *.zip file, there wouldn't been any error). Now it's working in Opera!
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 11, 2011, 11:29:56 PM |
|
I tried using the offline transaction generator. Two things-- It doesn't seem to work in IE (but does in Firefox), and it doesn't seem to work when you add a transaction fee (but does if you leave it at 0).
BTCurious, is it really so? Transaction fee > 0 does not work? Can it be fixed?
|
|
|
|
kano
Legendary
Offline
Activity: 4620
Merit: 1851
Linux since 1997 RedHat 4
|
|
November 12, 2011, 10:19:56 AM |
|
Um, sorry, gotta ask the obvious question: Why would anyone want to past their private key anywhere ... ever ...
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 12, 2011, 11:15:10 AM Last edit: November 12, 2011, 03:16:01 PM by Jaagu |
|
Um, sorry, gotta ask the obvious question: Why would anyone want to past their private key anywhere ... ever ...
1) Nibor's webpage is downloaded into one's own computer before usage. 2) It's javascript page, therefore computations are made in one's own computer, not on the server side.
|
|
|
|
BTCurious
|
|
November 12, 2011, 02:16:21 PM |
|
I tried using the offline transaction generator. Two things-- It doesn't seem to work in IE (but does in Firefox), and it doesn't seem to work when you add a transaction fee (but does if you leave it at 0).
BTCurious, is it really so? Transaction fee > 0 does not work? Can it be fixed? Is it really so? Uh, not sure? I haven't noticed it during development, but I'll check it after this weekend (not on my main PC now). If anyone wants to investigate before that, please check what "doesn't seem to work" means. Doesn't show anything? Does give a transaction, but the transaction has no fee? Any different interpretation? Can it be fixed? Yes, trivially, once I know what exactly is wrong.
|
|
|
|
BTCurious
|
|
November 14, 2011, 12:40:58 PM |
|
Strange, I tried sending a transaction with a fee via nibor's site, and it didn't get broadcast. Then I sent one via my custom script, and it worked fine. So I figured it was nibor's fault. But now I tried via nibor again, and now it works
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 14, 2011, 09:52:02 PM |
|
Strange, I tried sending a transaction with a fee via nibor's site, and it didn't get broadcast. Then I sent one via my custom script, and it worked fine. So I figured it was nibor's fault. But now I tried via nibor again, and now it works Could it be, that those transactions take some time? ... But by definition transaction fee should force tx-s getting through almost immediately? Maybe you ask nibor, maybe he changed in the meantime he's code? (I am very much interested that your cooperative pages work!)
|
|
|
|
BTCurious
|
|
November 14, 2011, 10:07:54 PM |
|
Could it be, that those transactions take some time? No, I usually check if I see any unverified transactions on for example bitcoincharts.org (but the original client shows them too), but even after a longer time it didn't work. Maybe you ask nibor, maybe he changed in the meantime he's code? (I am very much interested that your cooperative pages work!) Could be, not sure. Maybe btc_novice could try again now? He originally stated that fees didn't work… What do you mean our cooperative pages?
|
|
|
|
Jaagu
Member
Offline
Activity: 62
Merit: 10
|
|
November 15, 2011, 01:37:20 AM |
|
What do you mean our cooperative pages?
I use your page together with nibor's page. One for creating tx and another for uploading/broadcasting.
|
|
|
|
Achim
Newbie
Offline
Activity: 4
Merit: 0
|
|
November 16, 2011, 08:38:48 AM |
|
Hi BTCurious, Your script to generate offline transactions is a very very helpfull idea, much better than the import of my private key to my wallet e.g with the script pywallet. I've used your script and nibor's broadcasting page many times. At most cases I've got success but some times I've got no success. May be the following observation can help you for debugging: At all cases I filled my offline address with a small balance by a single transmission. At all cases I spend no fee for the back transmission by your sript. The success depends on the amount for the back transmission. At all cases I spend the entire balance as amount the transmission succeeded. But all times I spend only a part of the balance and the transmission generates a change I found no broadcasting. May be it is not valid to give back the change to the spend address by a single transmission. Please compare with the discussion on http://bitcoin.stackexchange.com/questions/1629/why-does-bitcoin-send-the-change-to-a-different-address
|
|
|
|
Achim
Newbie
Offline
Activity: 4
Merit: 0
|
|
November 22, 2011, 04:19:31 PM |
|
Today I've succeeded an offline transaction with BTCurious's Tx generation script and nibor's new broadcasting page. My spending amount wars smaller than my balance and so I've got back the change BTC's to the spending address. May be my observations posted above are only an unfortunate fortuitousness caused by overloading nibor's broadcasting service. Again I can confirm that the Tx generation script will work excellent.
|
|
|
|
dogisland (OP)
|
|
November 22, 2011, 04:34:13 PM |
|
Today I've succeeded an offline transaction with BTCurious's Tx generation script and nibor's new broadcasting page. My spending amount wars smaller than my balance and so I've got back the change BTC's to the spending address. May be my observations posted above are only an unfortunate fortuitousness caused by overloading nibor's broadcasting service. Again I can confirm that the Tx generation script will work excellent.
If you see issues I'm willing to bet you're sending 2 transactions form 1 private key in quick succession. This won't work as the the logic will pick the same TX out each time. You'll need to wait for each transaction to be picked up in a block then retrieve the TX outs agian from blockexplorer.
|
|
|
|
Achim
Newbie
Offline
Activity: 4
Merit: 0
|
|
November 23, 2011, 07:16:28 AM |
|
@dogisland. Thank you for your advise. I understand this problem with quick succession. But no, at my unsuccessful broadcastings I've really observed that there wars no transactions broadcasted. For my tests I've send the BTC's from my offline wallet to my own wallet address handled by the running standard bitcoin client. If broadcasting is done I can see with a small delay for the network distribution the transactions with zero confirmations also before the transaction is bound into the block chain. But anyway I'm sure the Tx creation is correct and I will use now offline wallets with higher balances to store my Coins. The only risk for me is the private service from nibor. I can't estimate that he is willing to hold this service available for all time due to the hosting costs and due to the small donations therefore. May be a more official bitcoin page will double this service.
|
|
|
|
xDan
|
|
April 04, 2013, 11:58:03 AM |
|
Hello, can anyone help me with a problem? I'm getting this error when trying to use this: Cannot read property "amount" of undefined offlineTransaction.js line 220 // if this came from a transaction to our address... if (lilendHash in unspenttxs) { unspenttx = unspenttxs[lilendHash]; // remove from unspent transactions, and deduce the amount from the balance balance = balance.subtract(unspenttx[p.n].amount); <-- line 220 delete unspenttx[p.n] if (isEmpty(unspenttx)) { delete unspenttxs[lilendHash] } } So unspenttx[p.n] is undefined for some reason. The correct address is deduced from the private key but the balance remains zero and I get this error. This worked fine the first time I used it, just now it doesn't seem to... Something in the changed output from blockexplorer is causing it to fail...
|
HODLing for the longest time. Skippin fast right around the moon. On a rocketship straight to mars. Up, up and away with my beautiful, my beautiful Bitcoin~
|
|
|
Financisto
|
|
May 29, 2013, 04:39:30 AM |
|
Any chance in creating something similiar for Litecoin - LTC?
|
|
|
|
|