Bitcoin Forum
May 04, 2024, 04:51:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Getting unspent outs for arbitrary addresses from BlockExplorer. (Bounty 20BTC)  (Read 8642 times)
Jaagu
Member
**
Offline Offline

Activity: 62
Merit: 10



View Profile
November 09, 2011, 01:40:16 PM
Last edit: November 09, 2011, 02:51:25 PM by Jaagu
 #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'


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
1714798304
Hero Member
*
Offline Offline

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

1714798304
Report to moderator
1714798304
Hero Member
*
Offline Offline

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

1714798304
Report to moderator
1714798304
Hero Member
*
Offline Offline

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

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

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

1714798304
Report to moderator
1714798304
Hero Member
*
Offline Offline

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

1714798304
Report to moderator
1714798304
Hero Member
*
Offline Offline

Posts: 1714798304

View Profile Personal Message (Offline)

Ignore
1714798304
Reply with quote  #2

1714798304
Report to moderator
Jaagu
Member
**
Offline Offline

Activity: 62
Merit: 10



View Profile
November 09, 2011, 01:44:49 PM
Last edit: November 09, 2011, 02:03:29 PM by Jaagu
 #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
Merit: 504


^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
Merit: 10



View Profile
November 09, 2011, 02:46:19 PM
Last edit: November 09, 2011, 03:44:41 PM by Jaagu
 #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
Merit: 10



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: 4480
Merit: 1800


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 - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
Jaagu
Member
**
Offline Offline

Activity: 62
Merit: 10



View Profile
November 12, 2011, 11:15:10 AM
Last edit: November 12, 2011, 03:16:01 PM by Jaagu
 #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
Merit: 504


^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
Merit: 504


^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
Merit: 10



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
Merit: 504


^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
Merit: 10



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
Merit: 0


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
Merit: 0


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

Activity: 262
Merit: 250



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
Merit: 0


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: 688
Merit: 500

ヽ( ㅇㅅㅇ)ノ ~!!


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

Activity: 632
Merit: 768

BTC⇆⚡⇄BTC


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

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

LIST • ESCROW providers • Ranking & Scores available!LIST • FOSS BrainwalletsBTC ⇆⚡⇄ BTCBTC aka BTC: 16MBvhaJoRBxW3Vk6apnvz3UYT9HAgraVS ⚡ PGP: 2680207AA9A1B69FE7A033D80DE0F221074384C4 ⚡ If you think freedom matters, please support the development of these privacy projects→DONATE some sats: TailsQubes OSWhonixVeraCryptPicocryptKryptorSimpleX Chat
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!