Bitcoin Forum
December 05, 2016, 10:38:44 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: Getting unspent outs for arbitrary addresses from BlockExplorer. (Bounty 20BTC)  (Read 7841 times)
Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 09, 2011, 01:40:16 PM
 #21

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'


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1480934324
Hero Member
*
Offline Offline

Posts: 1480934324

View Profile Personal Message (Offline)

Ignore
1480934324
Reply with quote  #2

1480934324
Report to moderator
1480934324
Hero Member
*
Offline Offline

Posts: 1480934324

View Profile Personal Message (Offline)

Ignore
1480934324
Reply with quote  #2

1480934324
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 09, 2011, 01:44:49 PM
 #22

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
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 09, 2011, 02:20:55 PM
 #23

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/9k6qyk9
And put this file in the lib directory: http://ge.tt/88MLyk9

And if you download this offlineTransaction.js and overwrite the old one, the OperaTor problem should be gone too: http://ge.tt/9jstkk9

Internet explorer is a bit harder to fix though… it does some weird things and there's no decent debugger…

Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 09, 2011, 02:46:19 PM
 #24

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.  Sad

----------------

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!  Cheesy

Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 11, 2011, 11:29:56 PM
 #25

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 Offline

Activity: 1918


Linux since 1997 RedHat 4


View Profile
November 12, 2011, 10:19:56 AM
 #26

Um, sorry, gotta ask the obvious question:
Why would anyone want to past their private key anywhere ... ever ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 12, 2011, 11:15:10 AM
 #27

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
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 12, 2011, 02:16:21 PM
 #28

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
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 14, 2011, 12:40:58 PM
 #29

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 Huh

Jaagu
Member
**
Offline Offline

Activity: 62



View Profile
November 14, 2011, 09:52:02 PM
 #30

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 Huh

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
Hero Member
*****
Offline Offline

Activity: 714


^SEM img of Si wafer edge, scanned 2012-3-12.


View Profile
November 14, 2011, 10:07:54 PM
 #31

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 Offline

Activity: 62



View Profile
November 15, 2011, 01:37:20 AM
 #32

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 Offline

Activity: 4


View Profile
November 16, 2011, 08:38:48 AM
 #33

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 Offline

Activity: 4


View Profile
November 22, 2011, 04:19:31 PM
 #34

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
Sr. Member
****
Offline Offline

Activity: 261



View Profile
November 22, 2011, 04:34:13 PM
 #35

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 Offline

Activity: 4


View Profile
November 23, 2011, 07:16:28 AM
 #36

@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
Hero Member
*****
Offline Offline

Activity: 662

ヽ( ㅇㅅㅇ)ノ ~!!


View Profile
April 04, 2013, 11:58:03 AM
 #37

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

Code:
// 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
Sr. Member
****
Offline Offline

Activity: 463

★BFG★


View Profile
May 29, 2013, 04:39:30 AM
 #38

Any chance in creating something similiar for Litecoin - LTC?  Wink

Compilation of Brainwallet & Paper wallet generators Blockchain Financial Group Blokĉeno Financa Grupo
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!