Bitcoin Forum
April 23, 2024, 05:38:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there a script or online API to sign/send transactions without bitcoind?  (Read 1627 times)
Kazimir (OP)
Legendary
*
Offline Offline

Activity: 1176
Merit: 1001



View Profile
October 30, 2012, 03:24:16 PM
 #1

Suppose I've got a private key (and its address), and some random webserver on which I cannot run bitcoind.

I want to sign and send a transaction from this address to some other address. But I don't have any wallet or account or installed client software whatsoever.

Now, I can do this manually, for example by creating a new (temporary) blockchain.info wallet, importing the private key, making the transaction, and optionally discarding the wallet (or forget its password or whatever).

Is there a script or library (preferably PHP) or some API perhaps, which allows me to do this automatically?

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713893931
Hero Member
*
Offline Offline

Posts: 1713893931

View Profile Personal Message (Offline)

Ignore
1713893931
Reply with quote  #2

1713893931
Report to moderator
1713893931
Hero Member
*
Offline Offline

Posts: 1713893931

View Profile Personal Message (Offline)

Ignore
1713893931
Reply with quote  #2

1713893931
Report to moderator
1713893931
Hero Member
*
Offline Offline

Posts: 1713893931

View Profile Personal Message (Offline)

Ignore
1713893931
Reply with quote  #2

1713893931
Report to moderator
mskwik
Full Member
***
Offline Offline

Activity: 125
Merit: 100


View Profile
October 30, 2012, 04:03:01 PM
 #2

The maketx tool in the subvertx package will let you generate raw transactions given just the inputs and private keys to sign them.

flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1011

760930


View Profile
October 30, 2012, 04:30:46 PM
 #3

Electrum has some scriptable python functions that will do this. Look into the mktx and sendtx commands!
Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
October 30, 2012, 05:50:18 PM
 #4

Is there a script or library (preferably PHP) or some API perhaps, which allows me to do this automatically?

Also, the Javascript from Brainwallet.org will let you do this:
 - http://brainwallet.org/#tx

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1024



View Profile
October 30, 2012, 08:23:54 PM
 #5

If you've got a toolset that can do EC math, the signature isn't hard.  I would even say that following the rules to correctly reduce the input to the signable version is harder than calculating the signature.

Oh, and it shouldn't be hard to run a disconnected walletless node on a webserver just to take advantage of the RPC functions built in.  Without the block chain and network traffic, bitcoind doesn't need a lot of resources.

Hmm.  Maybe someone should add a config parameter to make bitcoind run in RPC-only mode.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
nibor
Sr. Member
****
Offline Offline

Activity: 438
Merit: 291


View Profile
October 30, 2012, 08:32:02 PM
 #6

I would avoid it!

Use a payment provider.
e.g. www.bitcoin247.com

They charge very little (there are others that are free).

You just make 2 http requests to send coins. Also to receive coins make one http request to get the address. Display this to user - the user pays that address - and bitcoin247 call you back on a specific URL when the coins are received. If you like in the callback handler you can automatically forward the coins to your offline wallet so if bitcoin247 go bust you only lose what is "in flight".

We use them for https://bitcoinvanity.appspot.com.
Works perfectly. Only issue I have is that they only call back after 6 confirmations. I would like to get a callback as soon as they get the transaction and again at block 1 and again at block 6, but this is not possible.

As you can see from the web address this is running on google app engine, so as restricted an environment as you can get.
piuk
Hero Member
*****
expert
Offline Offline

Activity: 910
Merit: 1005



View Profile WWW
October 30, 2012, 09:37:11 PM
 #7

I have been meaning to add this ability to the blockchain.info API for a while. You can now replace the guid in the send api (https://blockchain.info/api/api_send) with a Hex encoded private key.

https://blockchain.info/merchant/4d6c9dff493fcd2da9508e01c8b13461d37e3d8b6df1732942d3257874051362/payment?to=$address&amount=$amount

$address = destination bitcoin address.
$amount = amount to send in satoshi.



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!