Author

Topic: Create and send transactions in PHP (Read 889 times)

legendary
Activity: 2618
Merit: 1007
February 26, 2013, 07:31:57 AM
#6
BIP32 (https://en.bitcoin.it/wiki/BIP_0032) sounds nice...

You'd generate new addresses on the fly and don't need to send the coins elsewhere.

If you want to _send_ payments though (to customers, not yourself) then you need something else, for _receiving_, BIP32 it is probably.
donator
Activity: 848
Merit: 1078
February 24, 2013, 02:38:21 PM
#5
I am pretty sure this isn't possible, just cause at some point you need to sign the inputs to prove they are owned by you, and that would require a wallet with the able to sign a raw tx.

Braiinwallet does this in Javascript, but you need the transaction hash (and index) for each coin that you are spending -- that would be the service provided by the bitcoin.org clieint or other client that you would need to re-implement.

 - http://brainwallet.org/#tx

The only external call would be the broadcast of the transaction.

 - https://blockchain.info/pushtx
 - signrawtransaction and sendrawtransaction from http://en.bitcoin.it/wiki/Raw_Transactions

Seems like I've underestimated the complexity of the task. I assumed wrongly that if i had the private key it would be a simple task.

I was working on a online payment system that would take any coins paid into a certain address and redirect them straight to a more secure vault address (where the private key would not be on the server).

How do other sites accept payments and produce 'hot wallet' payments? Are they all running the daemon?
legendary
Activity: 2506
Merit: 1010
February 24, 2013, 02:18:59 PM
#4
I am pretty sure this isn't possible, just cause at some point you need to sign the inputs to prove they are owned by you, and that would require a wallet with the able to sign a raw tx.

Braiinwallet does this in Javascript, but you need the transaction hash (and index) for each coin that you are spending -- that would be the service provided by the bitcoin.org clieint or other client that you would need to re-implement.

 - http://brainwallet.org/#tx

The only external call would be the broadcast of the transaction.

 - https://blockchain.info/pushtx
 - signrawtransaction and sendrawtransaction from http://en.bitcoin.it/wiki/Raw_Transactions
legendary
Activity: 1498
Merit: 1000
February 24, 2013, 01:52:18 PM
#3
I am pretty sure this isn't possible, just cause at some point you need to sign the inputs to prove they are owned by you, and that would require a wallet with the able to sign a raw tx.
hero member
Activity: 728
Merit: 500
In cryptography we trust
February 24, 2013, 01:43:41 PM
#2
Not sure what you mean with 'piggybacking off other clients'

Maybe this suits your needs. It seems to be under active development, but it does need a daemon:

PHP Bitcoin Development Kit | Alpha Release candidate v0.0.43 | BitcoinDevKit.com
https://bitcointalksearch.org/topic/php-bitcoin-development-kit-v0046pre15-alpha-bitcoindevkitcom-123586

You can also use the blockchain.info API for sending and receiving payments without running a local daemon:
https://blockchain.info/api
donator
Activity: 848
Merit: 1078
February 24, 2013, 01:15:23 PM
#1
I'm looking for two things:

1. A way of creating transactions in PHP
2. Any supported API to broadcast the transactions mentioned above

Does a set of classes / api exist for this already?

Appreciate a link if this topic already exists (i couldnt find it though).

Edit: I should add, I do not want to use any daemons to do this or by piggybacking off other clients. This needs to be done within PHP in its entirety. The only external call would be the broadcast of the transaction.
Jump to: