String hexSerializedTx = "4F2B...."; // Initializes the PeerGroup NetworkParameters params = TestNet3Params.get(); Context context = new Context(params); PeerGroup pg = new PeerGroup(context); pg.start();
// Deserialize the tx Transaction tx = new Transaction(params, Hex.decode(hexSerializedTx)); // Broadcast the tx TransactionBroadcast tb = pg.broadcastTransaction(tx); // Wait the tx to be broadcasted tb.future().get(); On Tue, Dec 27, 2016 at 2:54 AM, <[email protected]> wrote: > > Hi BitcoinJ Devs > > Q1: How do I send or broadcast a raw transaction string using Bitcoinj? > Q2: Can you give me a simple code snippet for reference? > > Thanks :) > > -- > You received this message because you are subscribed to the Google Groups > "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- Oscar Guindzberg -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
