10

If I install the bitcoin command line client for linux, can I use just a public and private key to send coins from an address? I don't want to add it to my wallet file, I just want to move coins out of an address.


Update: After reading some of the answers I realize that I should have been more clear about my purposes. This is for more of a computer controlled money system. I want to be able to create addresses, and move money between them, and be able to move money out of addresses to other public addresses. I wanted it to be super light weight and not have to download the whole block-chain to achieve anything, and I don't want it to use wallets because they don't conform very well to what I am doing.

I want to be able to be given a private key and public address of a source, and a public address of a destination, to be able to send coins from one to another, and do it by just sending a message to the network. I want to be able to do it with only 10-20 MB of storage, and be able to do it by only connecting to a few nodes. Confirmations & balances will just be handled by hitting up some public resource like blockchain explorer.

Note: if it is not possible to do without the blockchain handy, then that can be accommodated for (though it throws in the need for a server for me rather than being purely client based.).

5

EDIT: I recalled that Wiki: Sweepprivkey proposal, is actually exactly what you are asking for, bitcointalk.org: Proposed RPC command: sweepprivkey. The latest news about the work in progress from jarpiain, dated October 15.

This is functional in the sense that I tested it succesfully on the real block chain. It's not yet robust enough for serious use. In particular, there are race conditions for accessing addrblock.dat.

I'm going to implement some of the sweepprivkey options and copy the transaction fee logic from CWallet::CreateTransaction() this weekend (I think it's best to keep the fee setting in one place, the -paytxfee option).

MtGox has the option to fund account with private key, and it understands several different formats, not only the standart one, e.g. it accepts mini format used by Casascius physical coins, MtGox adds redeemer for private keys including Casascius Physical Bitcoins

But if you want to send the transaction from your own computer then you need a software that would create a proper transaction using the public and private key, bitcoin or bitcoind can't do that without importing keys into wallet first, importing could be done with Pywallet or hopefully soon-to-be-official wallet export/import bitcoin patch, but make sure to backup your wallet first.

2

You can create a new wallet that has just the one keypair you need, move the coins, and then restore your old wallet file.

  • 1
    hm, your answer made me speculate that the purpose of this question is to move stolen coins without leaving too much footprint, but of course that's just speculation. – Serith Oct 26 '11 at 18:18
  • 1
    It could also be that someone wants to get rid of their old address that someone associated with their identity while keeping the coins in their new address. – ThePiachu Oct 26 '11 at 18:50
0

This API will push your transaction into the network if you have your $priv_key

https://blockchain.info/merchant/$priv_key/payment?to=$recipient_address&amount=$amount_satoshi&fee=50000

But in order to inject this transaction onto the network for you, they require a minimum fee of 50000 Satoshi (0.0005 BTC) whether you specify a fee or not. For more details, see:

https://blockchain.info/api/api_send

But that fee (about $0.30) might seem a little too generous. Does anyone know of a way to do this for a smaller fee?

  • i cant find any info about blockchain.info API supporting sending bitcoins just using private key .. any more reference would be great. thanks – AMB Jul 22 '17 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.