Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Sythic on December 18, 2013, 06:31:57 PM



Title: Fastest way to execute a transaction?
Post by: Sythic on December 18, 2013, 06:31:57 PM
I'm looking to create a service  which can execute transactions when given a private key. i dont however want to store that key in my wallet. is there anyway to execute a transaction instantly with only a key?


Title: Re: Fastest way to execute a transaction?
Post by: StarfishPrime on December 18, 2013, 07:27:01 PM
You'll still need access to the blockchain, either directly (to a local node) or using a remote API like blockchain.info etc.

A private key will allow you to sign the tx inputs, but you'll still need to get those specific outputs from the blockchain to use as inputs in the transaction you are planning to create and transmit. This can be done quite quickly (milliseconds): For example even the Blockchain Android/IOS app creates tx's using the remote API to the blockchain very quickly (a few seconds).



Title: Re: Fastest way to execute a transaction?
Post by: Sythic on December 18, 2013, 07:35:04 PM
Ok, I figured that would be the case. So basically I just use an API and once I know all the inputs/outputs, I would generate a raw transaction using that via RPC to bitcoind?

Thanks for the help :)


Title: Re: Fastest way to execute a transaction?
Post by: grue on December 18, 2013, 07:44:47 PM
You'll still need access to the blockchain, either directly (to a local node) or using a remote API like blockchain.info etc.

A private key will allow you to sign the tx inputs, but you'll still need to get those specific outputs from the blockchain to use as inputs in the transaction you are planning to create and transmit. This can be done quite quickly (milliseconds): For example even the Blockchain Android/IOS app creates tx's using the remote API to the blockchain very quickly (a few seconds).
actually, if you have private keys to all the inputs you're spending, you can do the signing entirely off line.


Title: Re: Fastest way to execute a transaction?
Post by: sidazhang on December 20, 2013, 03:25:16 AM
actually, if you have private keys to all the inputs you're spending, you can do the signing entirely off line.

That's correct and to add a bit more details to this answer, you can sign all the inputs offline and serialize the transaction into hex and then push the transaction through an API like https://blockchain.info/pushtx (a post request sends the raw transaction) or send it through the bitcoind JSON RPC "sendrawtransaction" (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list)


Title: Re: Fastest way to execute a transaction?
Post by: piuk on December 20, 2013, 04:05:39 AM
You can use the blockchain wallet api:

Quote
https://blockchain.info/merchant/$private_key/payment?to=$address&amount=$amount


Title: Re: Fastest way to execute a transaction?
Post by: StarfishPrime on December 21, 2013, 04:12:30 PM
You can use the blockchain wallet api:

Quote
https://blockchain.info/merchant/$private_key/payment?to=$address&amount=$amount


Great feature. BIP38 decode support would be a very useful addition to the merchant API too - most POS terminal hardware is painfully slow at scrypt. Since BIP38 support has now been added to the Android app can we expect to see it anytime soon for the merchant API?


Title: Re: Fastest way to execute a transaction?
Post by: thonglor on February 23, 2014, 09:59:04 PM
Hi all,

I'm trying to implement the Blockchain API. On their website https://blockchain.info/api/api_receive when I enter a Receiving Address and a Callback URL and then "Fire Test Callback" there always comes the red error mesage "Error Input String May Contain HTML". Why is that or what am I doing wrong?

Thanks for help!


Title: Re: Fastest way to execute a transaction?
Post by: williamj2543 on March 21, 2014, 01:57:23 PM
Hi all,

I'm trying to implement the Blockchain API. On their website https://blockchain.info/api/api_receive when I enter a Receiving Address and a Callback URL and then "Fire Test Callback" there always comes the red error mesage "Error Input String May Contain HTML". Why is that or what am I doing wrong?

Thanks for help!

Gettin that also


Title: Re: Fastest way to execute a transaction?
Post by: embargar on March 22, 2014, 06:54:15 PM
a service which can execute transactions when given a private key will be very needed!


Title: Re: Fastest way to execute a transaction?
Post by: wheatstone on March 22, 2014, 07:25:16 PM
a service which can execute transactions when given a private key will be very needed!

What?

Keep your private keys private (hence the name).


Title: Re: Fastest way to execute a transaction?
Post by: thonglor on March 22, 2014, 07:37:53 PM
Hello all,

does anyone have an answer to that problem:

I'm trying to implement the Blockchain API. On their website https://blockchain.info/api/api_receive when I enter a Receiving Address and a Callback URL and then "Fire Test Callback" there always comes the red error mesage "Error Input String May Contain HTML". Why is that or what am I doing wrong?

Thanks for help!


Title: Re: Fastest way to execute a transaction?
Post by: williamj2543 on March 23, 2014, 11:21:55 PM
Hello all,

does anyone have an answer to that problem:

I'm trying to implement the Blockchain API. On their website https://blockchain.info/api/api_receive when I enter a Receiving Address and a Callback URL and then "Fire Test Callback" there always comes the red error mesage "Error Input String May Contain HTML". Why is that or what am I doing wrong?

Thanks for help!

Me too, I really need help on this. From what I understand there is something wrong with the code,


Title: Re: Fastest way to execute a transaction?
Post by: thonglor on March 28, 2014, 04:12:37 PM
For this "simulation testing" on their website there are no fees involved.

Does anyone else observe this phenomenon and has a solution?

 


Title: Re: Fastest way to execute a transaction?
Post by: WWWarrior on March 30, 2014, 04:21:12 PM
You will still need access to the blockchain, will not you?


Title: Re: Fastest way to execute a transaction?
Post by: williamj2543 on March 31, 2014, 06:36:52 PM
Found the solution, the code is simply not working. No really main reason, just check your code for any errors, run the script it is calling into, in the browser, and see if you get any errors, then fix them. Also I think my script still worked after it said that error, it still calls. Hope I could be of some help