Pages:
Author

Topic: [PHP] Generate a sendmany with multiple outputs to the same address - page 2. (Read 4311 times)

legendary
Activity: 952
Merit: 1000
Bitcoin classes doesn't have a sendtomany function, but if you want to do sendtomany with a jsonRPCClient then you just need an array that is setup like $array("address"=>amount); or $array['address']=amount;

Cause you it will have to be ran thru json_encode to get it to the correct format.

I didn't realize he's using "Bitcoin Classes".
I'm using jsonRPCClient to connect with bitcoind.

I'm doing this:

$to=Array(
    "1address" => 1,
    "1address" => 2
);
sendmany("from", $to);

It will only send one payment to "1address".

The problem is that it has a duplicated key, so it's impossible to send multiple payments to the same address in the same transaction using this method.
blockchain.info allows us to do this, but I don't know how they do it.
legendary
Activity: 1498
Merit: 1000
Bitcoin classes doesn't have a sendtomany function, but if you want to do sendtomany with a jsonRPCClient then you just need an array that is setup like $array("address"=>amount); or $array['address']=amount;

Cause you it will have to be ran thru json_encode to get it to the correct format.
legendary
Activity: 952
Merit: 1000
legendary
Activity: 1400
Merit: 1005
I am utilizing the "Bitcoin Classes" by Mike Gogulski and theymos in some PHP code I am playing with.  As I understand it, the format for a sendmany is as follows:

$array[address[amount]]

Well, I can't send multiple times to the same address in the same sendmany in this format, since the address would be non-unique.  So, what would be the proper array format to sendmany to the same address multiple times?
Pages:
Jump to: