Bitcoin Forum
November 06, 2024, 02:46:20 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [ANN] Bitcoin Transaction Split Script using BlockChain.info API  (Read 1929 times)
Initscri (OP)
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
May 22, 2014, 05:55:40 AM
 #1

Bitcoin Transaction Splitting Script

I recently created a script for the splitting of Bitcoin transactions based off the BlockChain.info API for cooldgamer (https://bitcointalk.org/index.php?action=profile;u=79720).

Within the middle of the messages, he requested and asked if the script could be licensed as open source; and as such, here we are! Thank you to cooldgamer for providing the bounty.

This script uses the BlockChain.info API to split Bitcoin Transactions to a Bitcoin Address based off a certain percentage.

For example, you can send 1 Bitcoin to ADDRESS1
and you can have it setup to split the transaction to send:
.4 Bitcoins to ADDRESS2 (40%)
.2 Bitcoins to ADDRESS3 (20%)
.05 Bitcoins to ADDRESS4 (5%)
.35 Bitcoins to ADDRESS5 (35%)

It works with any amount of outputs and includes fee calculation (w/ custom fee (optional)).

Obviously, a fair warning: This script is a tad bit messy. It works, but I recommend testing the script on a smaller scale before production use. It has and is being used within production for certain users already.
I am not responsible for any lost funds or any loss whatsoever by the use of this script whether in production or development.

The script is located on Github.


Read readme.md for installation and setup instructions.

If you wish to be so kind to donate, you can send donations to :
16E4K1oDxefRAbLGS2Fh42C4SXgZMjeL3i

Thank you,
Initscri

----------------------------------
Web Developer. PM for details.
----------------------------------
Initscri (OP)
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
May 29, 2014, 12:31:27 AM
 #2

Also, to note. It is better to utilize allow_url_fopen within your php.ini configuration.

The script does support curl but is untested.

----------------------------------
Web Developer. PM for details.
----------------------------------
BitCoinDream
Legendary
*
Offline Offline

Activity: 2394
Merit: 1216

The revolution will be digital


View Profile
July 06, 2014, 10:04:34 AM
 #3

Does not blockchain.info directly offer this API for multi-send ?

1000000
Full Member
***
Offline Offline

Activity: 151
Merit: 100



View Profile
July 07, 2014, 07:37:07 PM
 #4

Does not blockchain.info directly offer this API for multi-send ?
My thoughts exactly, what's wrong with just using the API directly?
Code:
https://blockchain.info/merchant/$guid/sendmany?password=$main_password&second_password=$second_password&recipients=$recipients&shared=$shared&fee=$fee

“The Times 03/Jan/2009 Chancellor on brink of second bailout for banks”
Initscri (OP)
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
July 07, 2014, 08:09:56 PM
 #5

Does not blockchain.info directly offer this API for multi-send ?
My thoughts exactly, what's wrong with just using the API directly?
Code:
https://blockchain.info/merchant/$guid/sendmany?password=$main_password&second_password=$second_password&recipients=$recipients&shared=$shared&fee=$fee

This script is intended to be used for callbacks.

The specific use case for the client who requested this script was to make a forwarding address. Specifically, where when a specific address receives a transaction, the amount is split and sent to multiple other addresses based on a percentage value. This whole process happening automatically and without delay (with the availability for confirmation delay).

----------------------------------
Web Developer. PM for details.
----------------------------------
BelieveTheHype
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
July 09, 2014, 03:16:00 AM
 #6

Does not blockchain.info directly offer this API for multi-send ?
My thoughts exactly, what's wrong with just using the API directly?
Code:
https://blockchain.info/merchant/$guid/sendmany?password=$main_password&second_password=$second_password&recipients=$recipients&shared=$shared&fee=$fee

This script is intended to be used for callbacks.

The specific use case for the client who requested this script was to make a forwarding address. Specifically, where when a specific address receives a transaction, the amount is split and sent to multiple other addresses based on a percentage value. This whole process happening automatically and without delay (with the availability for confirmation delay).

Hi Initscri. I recently started a project that will most probably involve using this code you have put up. If I am able to bring my project to life successfully, I shall certainly donate for your addition to the community. I also wanted to see if needed, you might have to time to help a bit more on the project itself. I am not sure as of right now if additional help is needed as I'm waiting for my developer to figure out how large scale the project will be.

Thanks
A Believer

Initscri (OP)
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
July 09, 2014, 03:18:53 AM
 #7

Does not blockchain.info directly offer this API for multi-send ?
My thoughts exactly, what's wrong with just using the API directly?
Code:
https://blockchain.info/merchant/$guid/sendmany?password=$main_password&second_password=$second_password&recipients=$recipients&shared=$shared&fee=$fee

This script is intended to be used for callbacks.

The specific use case for the client who requested this script was to make a forwarding address. Specifically, where when a specific address receives a transaction, the amount is split and sent to multiple other addresses based on a percentage value. This whole process happening automatically and without delay (with the availability for confirmation delay).

Hi Initscri. I recently started a project that will most probably involve using this code you have put up. If I am able to bring my project to life successfully, I shall certainly donate for your addition to the community. I also wanted to see if needed, you might have to time to help a bit more on the project itself. I am not sure as of right now if additional help is needed as I'm waiting for my developer to figure out how large scale the project will be.

Thanks
A Believer



Hi,

Awesome. I'm glad to hear it is being put to good use. As for the employment opportunity (freelance), I would happy to help. Just PM me the specifics and details of the project when you have a better understanding of the scale of the project.

Thanks,

----------------------------------
Web Developer. PM for details.
----------------------------------
BelieveTheHype
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
July 09, 2014, 03:35:17 AM
 #8

awesome.. Will def. keep you up to date.
Question. Did we figure out if there is a limit to the amount of addresses you can send it to? I heard someone mention 30, but then also read its being used in production by a few entities. So I figured I would just ask you.

-A
Initscri (OP)
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
July 09, 2014, 03:58:44 AM
 #9

awesome.. Will def. keep you up to date.
Question. Did we figure out if there is a limit to the amount of addresses you can send it to? I heard someone mention 30, but then also read its being used in production by a few entities. So I figured I would just ask you.

-A

I have only tested up to 15 with this script. However, the script can support as many as BlockChain.info's sendmany API will allow (which I think may be unlimited).

I'd recommend you test the script before production with an estimate of the amount of addresses you require.

----------------------------------
Web Developer. PM for details.
----------------------------------
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!