Bitcoin Forum
June 23, 2024, 07:51:09 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sendfromaddress method?  (Read 1326 times)
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 23, 2012, 01:44:56 AM
 #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.

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
Severian
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
September 23, 2012, 02:49:51 AM
 #2

Have you taken a look at this?:

http://brainwallet.org/#tx
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 23, 2012, 03:59:53 AM
 #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?

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 23, 2012, 04: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)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 23, 2012, 04:33:22 AM
 #5

Hmm.. seems cumbersome to have to do it like that but maybe I should get programming.. lol

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
CIYAM
Legendary
*
Offline Offline

Activity: 1890
Merit: 1078


Ian Knowles - CIYAM Lead Developer


View Profile WWW
September 23, 2012, 04: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.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 23, 2012, 04:55:36 AM
 #7

Yea, seems I'm learning that is the case. You're right, not very intuitive at all.

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
Severian
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250



View Profile
September 23, 2012, 05: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.
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 23, 2012, 06: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.

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
Pieter Wuille
Legendary
*
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
September 23, 2012, 04: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).

I do Bitcoin stuff.
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 24, 2012, 02:16:13 PM
 #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

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
phelix
Legendary
*
Offline Offline

Activity: 1708
Merit: 1020



View Profile
December 21, 2012, 08:22:48 AM
 #12

https://bitcointalk.org/index.php?topic=24784  (Patching The Bitcoin Client To Make It More Anonymous)
Pages: [1]
  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!