Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: sbtctalk on December 17, 2015, 05:59:06 AM



Title: A script to forward btc to a consolidated address?
Post by: sbtctalk on December 17, 2015, 05:59:06 AM
I currently have 3 addresses that is receiving payment for mining and cloud mining. I used 3 addresses so i could monitor if payment comes through. I hold the private keys for these addresses.

I am thinking of writing a script to auto forward all payments received to a single address every X hours.

Can any pros give ideas how should I begin? What should I read up on? Any specific api?

I have IT background and some development background which I neglected in recent years. It has become a side hobby rather than a profession.


Title: Re: A script to forward btc to a consolidated address?
Post by: Soros Shorts on December 17, 2015, 07:19:43 AM
If you are using the bitcoin core wallet there is the JSON API that you can use from almost any language.

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

https://bitcoin.org/en/developer-reference


Title: Re: A script to forward btc to a consolidated address?
Post by: sbtctalk on December 17, 2015, 08:50:47 AM
If you are using the bitcoin core wallet there is the JSON API that you can use from almost any language.

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

https://bitcoin.org/en/developer-reference

Thanks. So its inevitable i have to run a bitcoind and host a node?


Title: Re: A script to forward btc to a consolidated address?
Post by: DannyHamilton on December 17, 2015, 11:48:32 AM
Thanks. So its inevitable i have to run a bitcoind and host a node?

No.  There are services such as blockchain.info and coinbase.com that provide an API interface as well.

I suppose the real question is, why bother forwarding the bitcoins to a separate address?  What are you trying to accomplish?  Why not simply leave the bitcoins where you receive them until you are ready to spend them?


Title: Re: A script to forward btc to a consolidated address?
Post by: defaced on December 18, 2015, 01:31:14 AM
Seems like he wants to make a hotwallet -> cold wallet automated.


Title: Re: A script to forward btc to a consolidated address?
Post by: sbtctalk on December 18, 2015, 04:57:41 AM
Hi experts.

Yes. One reason is to build an offline address or cold wallet. But this may not the best approach.

Another reason is to find a reason to fire up my IDE again. Lol :)

I will read the api over the weekend.


Title: Re: A script to forward btc to a consolidated address?
Post by: elbandi on December 21, 2015, 01:59:37 PM
If you know java, you can write an own forwarder.
here is a starting point:
https://github.com/bitcoinj/bitcoinj/blob/master/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java


Title: Re: A script to forward btc to a consolidated address?
Post by: sbtctalk on December 23, 2015, 01:21:13 PM
If you know java, you can write an own forwarder.
here is a starting point:
https://github.com/bitcoinj/bitcoinj/blob/master/examples/src/main/java/org/bitcoinj/examples/ForwardingService.java


Great! Thank you!

:)