Bitcoin Forum
November 23, 2017, 08:47:10 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How to Verify and Validate Bitcoin Transactions of Other Users ??  (Read 4297 times)
danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
September 24, 2013, 08:49:07 PM
 #1

Pedro sends from [Pedro's Btc Address] X amount of Bitcoins to Carmen with [Y Btc Address]
 

Carmen says she did not received the Bitcoins.

I can review Pedro's and Carmen Addresses in Blockexplorer.com

Is there an API or  an API Call  from bitcoin so that I can verify this information without blockexplorer.com ??
1511470030
Hero Member
*
Offline Offline

Posts: 1511470030

View Profile Personal Message (Offline)

Ignore
1511470030
Reply with quote  #2

1511470030
Report to moderator
1511470030
Hero Member
*
Offline Offline

Posts: 1511470030

View Profile Personal Message (Offline)

Ignore
1511470030
Reply with quote  #2

1511470030
Report to moderator
1511470030
Hero Member
*
Offline Offline

Posts: 1511470030

View Profile Personal Message (Offline)

Ignore
1511470030
Reply with quote  #2

1511470030
Report to moderator
Join ICO Now A blockchain platform for effective freelancing
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511470030
Hero Member
*
Offline Offline

Posts: 1511470030

View Profile Personal Message (Offline)

Ignore
1511470030
Reply with quote  #2

1511470030
Report to moderator
1511470030
Hero Member
*
Offline Offline

Posts: 1511470030

View Profile Personal Message (Offline)

Ignore
1511470030
Reply with quote  #2

1511470030
Report to moderator
DannyHamilton
Legendary
*
Online Online

Activity: 1988



View Profile
September 25, 2013, 06:41:06 PM
 #2

Code:
getrawtransaction

and

Code:
decoderawtransaction

come to mind.

dudeami
Full Member
***
Offline Offline

Activity: 126



View Profile
September 26, 2013, 03:18:43 AM
 #3

As Danny said, getrawtransaction and decoderawtransaction is the easiest way to go.

If you checking transactions not related to your wallet, you need to enable the transaction index. Bitcoin uses another method since some version (forget which), due to the tx index being more resource intensive.

To do this, just add:

Code:
txindex=1

to your config, shut down bitcoin-qt or bitcoind (if already up), and run

Code:
bitcoind -reindex

This will take some time, as it has to go through all 10GB of data to make the tx index. In a production environment this can be seen as unacceptable, but easy enough to get around.

Put your heart on the line, it determines your fate.
BTC: 1DUDEAMiV54PFJFSe5fen3wr1e71unkaGj
danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
September 27, 2013, 05:57:36 AM
 #4

thanks for the answer

txindex = 1    ; is running

------------------------
however I'm still missing something very important

I have not been able to understand this, here I describe :

decoderawtransaction <hex string>    <<------- I only know the address of the user, I do not know how to obtain the <hex string> needed
getrawtransaction <txid> [verbose=0]  <<----- How can I get the <txid> of the transaction if I only know both of the user's address ?

I have not been able to figure this out
DannyHamilton
Legendary
*
Online Online

Activity: 1988



View Profile
September 27, 2013, 06:05:12 AM
 #5

thanks for the answer

txindex = 1    ; is running

------------------------
however I'm still missing something very important

I have not been able to understand this, here I describe :

decoderawtransaction <hex string>    <<------- I only know the address of the user, I do not know how to obtain the <hex string> needed
getrawtransaction <txid> [verbose=0]  <<----- How can I get the <txid> of the transaction if I only know both of the user's address ?

I have not been able to figure this out

I assumed that when Carmen claimed that she didn't receive the bitcoins, Pedro provided you with the transaction ID.

danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
September 27, 2013, 06:10:31 AM
 #6

Oh I see,
So I have to ask Pedro for the transaction ID ?

Because as of today I am using Blockexplorer.com 
example: http://blockexplorer.com/address/1CdBBMyK9jdBP9jqCRpgBWB5uyMdx3L3Ci

From here I can see, but if I do it with an application I would have to get the page source and with code search for the corresponding string to find the senders or receivers address and verify and validate with regular expressions  or string functions. But if done this way the transaction ID is not needed.

The code returned from Blockexplorer didn't needed the txid
DannyHamilton
Legendary
*
Online Online

Activity: 1988



View Profile
September 27, 2013, 02:59:01 PM
 #7

Oh I see,
So I have to ask Pedro for the transaction ID ?

Because as of today I am using Blockexplorer.com  
example: http://blockexplorer.com/address/1CdBBMyK9jdBP9jqCRpgBWB5uyMdx3L3Ci

From here I can see, but if I do it with an application I would have to get the page source and with code search for the corresponding string to find the senders or receivers address and verify and validate with regular expressions  or string functions. But if done this way the transaction ID is not needed.

The code returned from Blockexplorer didn't needed the txid

Pedro shouldn't be providing a bitcoin address.  A transaction can have multiple inputs coming from multiple addresses, and there could potentially be multiple transactions between Carmen and Pedro.  Pedro should be providing a transaction ID.

Carmen could provide a bitcoin address, but I don't think monitoring a bitcoin address that doesn't belong to the Bitcoin-Qt wallet is a feature in Bitcoin-Qt.  You'd probably have to dump the entire blockchain and search through all of its contents for all transactions that use Carmen's address as an output.  Then you'd have to look at the inputs of each of those transactions and see how many of them refer to transactions that had Pedro's address as an output.  Then you'd have to figure out if any of those possibly multiple transactions are the specific one you are concerned about.

Abdussamad
Legendary
*
Offline Offline

Activity: 1568



View Profile WWW
September 28, 2013, 11:17:01 AM
 #8

Oh I see,
So I have to ask Pedro for the transaction ID ?

Because as of today I am using Blockexplorer.com 
example: http://blockexplorer.com/address/1CdBBMyK9jdBP9jqCRpgBWB5uyMdx3L3Ci

From here I can see, but if I do it with an application I would have to get the page source and with code search for the corresponding string to find the senders or receivers address and verify and validate with regular expressions  or string functions. But if done this way the transaction ID is not needed.

The code returned from Blockexplorer didn't needed the txid

blockchain.info( bci) provides an API to look up this sort of stuff in a machine friendly format:

http://blockchain.info/q
http://blockchain.info/api/blockchain_api

They have a bunch of different APIs and you would do well to bookmark this page on their site for future reference:

http://blockchain.info/api/

danystatic
Full Member
***
Offline Offline

Activity: 234


View Profile
November 24, 2013, 06:32:40 PM
 #9

I was relying on Blockchain but its time to improve this.

Note: This is using my own wallet in my system

I am receiving BTC from couple of friends now !! Smiley looking to do a  btc-startup

please some advice or help...

Note: using jsonRPCClient and PHP (the basic process could be similar to others lang..  I believe)

The website asks them to POST their address before sending, because I am not able to extract automatically the Senders Address.

1.  Create a new address for each sender, using ->getnewaddress('payments');

2.  Then I listen for payment with -->getreceivedbyaddress()
     This way I do not obtain any information about the Tx

3. Find the txid  ?? how?

4. While a better method is found, using ->listtransactions() to read a received tx

5. I can see the senders address is inside this array, How can I be sure I extract the "correct" senders address without comparing it with the one POSTed via the website?
Abdussamad
Legendary
*
Offline Offline

Activity: 1568



View Profile WWW
November 24, 2013, 09:07:56 PM
 #10

danystatic take a closer look at the documentation of bitcoind. IT is possible to configure it so that it runs a command when it sees a transaction. So you can have it GET your script each time that happens. Of course you need to put it some authentication system in place to ensure your script is not being called by an outside user pretending to be bitcoind.

Pages: [1]
  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!