Bitcoin Forum
June 28, 2024, 08:59:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to SendCoin using single bitcoin address to multi recipient  (Read 1165 times)
rashidmdk (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 11, 2016, 12:33:50 PM
 #1

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.
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!