Author

Topic: sendfromaddress method? (Read 1332 times)

legendary
Activity: 1708
Merit: 1020
December 21, 2012, 04:22:48 AM
#12
https://bitcointalksearch.org/topic/--24784  (Patching The Bitcoin Client To Make It More Anonymous)
full member
Activity: 163
Merit: 100
September 24, 2012, 10:16:13 AM
#11
The accounts/labels in the (non-raw) bitcoin API do not have anything to do with coin selection. It's simply in order to keep separate balances for accounts in a shared wallet. The actual coins are shared, but transactions to certain addresses will credit the account they belong to, and sendfrom will deduct its balance from the given account.

If you need control over the coin selection process, use the raw transaction API, or separate wallets (zhich is, right now, mostly a pain, but we at least plan to add support for multiple wallets in some future version).

Good to know, thank you. It's taking me a bit of understanding to learn how bitcoin operates instead of  using an online wallet. I've been feeling I should probably be looking after my own coins
legendary
Activity: 1072
Merit: 1181
September 23, 2012, 12:51:51 PM
#10
The accounts/labels in the (non-raw) bitcoin API do not have anything to do with coin selection. It's simply in order to keep separate balances for accounts in a shared wallet. The actual coins are shared, but transactions to certain addresses will credit the account they belong to, and sendfrom will deduct its balance from the given account.

If you need control over the coin selection process, use the raw transaction API, or separate wallets (zhich is, right now, mostly a pain, but we at least plan to add support for multiple wallets in some future version).
full member
Activity: 163
Merit: 100
September 23, 2012, 02:57:21 AM
#9
Yea, good idea about simply downloading it. In looking over the source of the pages it certainly seems non-trivial to replicate it any time soon though I had started looking over the JSON-API-PHP project. I am a big fan of using PHP for my software projects both at work and privately.

Anyway, I appreciate the replies and insight from both of you.
sr. member
Activity: 476
Merit: 250
September 23, 2012, 01:29:51 AM
#8
Looks interesting. Not sure I'd want to divulge my private key to a website though.

Download the site and use it offline. It's clientside javascript. You can create a raw transaction and then send it through RPC via the sendrawtransaction command using the hex result.

Quote
Shouldn't the main/official bitcoin client support this?

It mostly does through the RPC console.
full member
Activity: 163
Merit: 100
September 23, 2012, 12:55:36 AM
#7
Yea, seems I'm learning that is the case. You're right, not very intuitive at all.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
September 23, 2012, 12:50:39 AM
#6
Unfortunately it is very "low level" and so will take a bit of working out but if you want complete control over tx's it is the only way you are going to get it (the other patches that have been done aren't nearly as comprehensive as this raw approach is).

The accounts are very unintuitive - you tie one to an address via setaccount but actually that is only being done for the purposes of tracking incoming tx's. Outgoing tx's get their account label from the account label provided when you send (having nothing to do with any address you may have have "tagged" with setaccount).

So an account is not an address but instead a label applied to a tx. The design is for dividing a wallet up into separate user accounts as say an exchange might do and is most useful for the case of transferring bitcoin between such accounts without having to actually perform a real tx.
full member
Activity: 163
Merit: 100
September 23, 2012, 12:33:22 AM
#5
Hmm.. seems cumbersome to have to do it like that but maybe I should get programming.. lol
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
September 23, 2012, 12:25:02 AM
#4
What you want to look into is this: https://en.bitcoin.it/wiki/Raw_Transactions

(you get complete control of a tx using these RPC calls)
full member
Activity: 163
Merit: 100
September 22, 2012, 11:59:53 PM
#3
Looks interesting. Not sure I'd want to divulge my private key to a website though.

Shouldn't the main/official bitcoin client support this?
sr. member
Activity: 476
Merit: 250
September 22, 2012, 10:49:51 PM
#2
Have you taken a look at this?:

http://brainwallet.org/#tx
full member
Activity: 163
Merit: 100
September 22, 2012, 09:44:56 PM
#1
I have been tinkering with managing my own bitcoind installations and have tried sending from a few accounts. I noticed that the bitcoind will simply pick whatever address it wants to send them from instead of the address of the account given. Is this by design? Seems odd.

In looking for answers I noticed someone had a patch for adding a sendfromaddress method to the client. I have not tried that yet since it looks like it was for an older source tree.

Is the sendfromaddress method going to be added some time? I would certainly simplify managing accounts. For example, I sent coins from one account to the satoshi dice thing, and it chose the address on another account and so the winnings went back to that one! Weird

I tried it again and it then chose an address that wasn't even associated with an account so the 'return address' wasn't even one my bitcoind recognized or something since I've not seen any return coins, even the 1 satoshi you get on losing.
Jump to: