Author

Topic: how to SendCoin using single bitcoin address to multi recipient (Read 1155 times)

newbie
Activity: 5
Merit: 0
Hi,

I need to send coins to multiple recipients from single bitcoin address. If i create multiple but individual request to send coin to multiple recipients, i am getting following error.

Exception in thread "AWT-EventQueue-0" org.bitcoinj.core.Wallet$DustySendRequested
   at org.bitcoinj.core.Wallet.completeTx(Wallet.java:3646)
   at org.bitcoinj.core.Wallet.sendCoinsOffline(Wallet.java:3471)
   at org.bitcoinj.core.Wallet.sendCoins(Wallet.java:3536)
   at org.bitcoinj.core.Wallet.sendCoins(Wallet.java:3506)....


Here is code snippet:

                                
WalletAppKit kit = new WalletAppKit(...);
                                kit.startAsync();
                                kit.awaitRunning();

                                Kit.WalletListener wListener = new Kit.WalletListener();
                                kit.wallet().addEventListener(wListener);
                                
                                Float balnc = Float.parseFloat(kit.wallet().getBalance(BalanceType.AVAILABLE).toString());
                                balnc = balnc / 100000000;

                                availableBalance = balnc * Float.parseFloat(usd_v);
                                
                                if (availableBalance > listingItemPrice) {
                                    
                                    Wallet.SendResult request = kit.wallet().sendCoins(kit.peerGroup(), sellerAddress, sellerShare);
                                    request = kit.wallet().sendCoins(kit.peerGroup(), sellerReferrerAddress, sellerReferrerShare);
                                    request = kit.wallet().sendCoins(kit.peerGroup(), buyerReferrerAddress, buyerReferrerShare);
                                }
                                 
                                kit.stopAsync();
                                kit.awaitTerminated();


Your help would be highly appriciated.
Jump to: