Bitcoin Forum
December 09, 2016, 09:50:05 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]
  Print  
Author Topic: RPC for Send Address  (Read 886 times)
sjk
Newbie
*
Offline Offline

Activity: 10


View Profile
May 06, 2011, 01:19:28 PM
 #1

Looking over the API, it is not immediately clear if there is a way to list information about a transaction. What I would like to do is basically say, in this receiving address, give me the address, time and amount that was sent.

Is this information available from the api from somehow?

1HV2wPKG4TQpLs7N4QsCHQr9Q2FjmFzCNw
1481277005
Hero Member
*
Offline Offline

Posts: 1481277005

View Profile Personal Message (Offline)

Ignore
1481277005
Reply with quote  #2

1481277005
Report to moderator
1481277005
Hero Member
*
Offline Offline

Posts: 1481277005

View Profile Personal Message (Offline)

Ignore
1481277005
Reply with quote  #2

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

Posts: 1481277005

View Profile Personal Message (Offline)

Ignore
1481277005
Reply with quote  #2

1481277005
Report to moderator
1481277005
Hero Member
*
Offline Offline

Posts: 1481277005

View Profile Personal Message (Offline)

Ignore
1481277005
Reply with quote  #2

1481277005
Report to moderator
1481277005
Hero Member
*
Offline Offline

Posts: 1481277005

View Profile Personal Message (Offline)

Ignore
1481277005
Reply with quote  #2

1481277005
Report to moderator
BitterTea
Sr. Member
****
Offline Offline

Activity: 294



View Profile
May 06, 2011, 01:28:12 PM
 #2

listtranasctions <account> [count=10]

Where <account> is an optional account name (not address), and count is an optional parameter specifying how many record to return, defaulting to 10.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
May 06, 2011, 01:32:21 PM
 #3

If you want each receiving address treated as its own account, you can:
setaccount <address> <address>
... and then use <address> as the name of the account.

And validateaddress will tell you what account is associated with an address.


How often do you get the chance to work on a potentially world-changing project?
sjk
Newbie
*
Offline Offline

Activity: 10


View Profile
May 06, 2011, 01:46:37 PM
 #4

listtranasctions <account> [count=10]

Where <account> is an optional account name (not address), and count is an optional parameter specifying how many record to return, defaulting to 10.

This almost seems like what I need.

When I make that RPC call for my wallet, I see that someone sent me 1 BTC and it provides the time as well. However, it seems like what is missing is the address of the person who sent me 1 BTC. However, it does provide me with a txid and if I search for that on blockexplorer it shows the from address and the to address.

Is that information available from the client? I would prefer not to scrape block explorer if at all possible

1HV2wPKG4TQpLs7N4QsCHQr9Q2FjmFzCNw
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
May 06, 2011, 01:56:03 PM
 #5

In general, bitcoin transactions do not have a "from" address. A transaction could be originating from one or from many addresses, or even from none at all, theoretically. What blockexplorer shows you is just the address the previous output was sent to, but you shouldn't rely on this information.

If you want to distinguish transactions from eachother, the advised way is to use a separate to address for each. In the future, it may be possible to add a memo field to a transaction output as well, but this is still being discussed.

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
May 06, 2011, 01:56:42 PM
 #6

No, the send-from address is not available, for a couple of reasons:

1)  When people using a shared wallet service like MyBitcoin or MtGox send payments the "from address" could belong to any of the other users of the service (or could be a "change" address that doesn't belong to anybody).  It is a bad idea to think that "address == person".

2) If more complicated transaction types are ever "turned on" in bitcoin, there might be more than one "from address".   Satoshi designed-in support for complicated transactions like "this payment can only be spent if 2 of these 3 keys sign the transaction".   In that case, there would be two "from addresses".

If you need this to refund coins, you'll need to ask the customer for a refund address.

How often do you get the chance to work on a potentially world-changing project?
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!