After signing the transaction and calling the build function on TransactionBuilder. It is not broadcasting to the blockchain network. How to solve this? Please help. Do I need to perform any extra steps for broadcast?
NetworkType versacoin = new NetworkType(
messagePrefix: '\x19VersaCoin Signed Message:\n',
bech32: 'go',
bip32: new Bip32Type(public: 0x0488B21E, private: 0x0488ADE4),
pubKeyHash: 0x46, // 70 in decimal, V in prefix symbol
scriptHash: 0x05, // 5 in decimal, 3 in prefix symbol
wif: 0xc6, // 198 in decimal, 2 in prefix symbol
);
final alice = ECPair.fromWIF(privateKey, network: versacoin);
final txb = new TransactionBuilder(network: versacoin);
final p2wpkh = new P2WPKH(data: new PaymentData(pubkey: alice.publicKey), network: versacoin).data;
txb.addInput(versaCoinGetAddressResponse.lastTxs[i].addresses, 0, null, p2wpkh.output);
txb.addOutput(toAddress, 1000000);
txb.sign(vin: 0, keyPair: alice, witnessValue: 2500);
// prepare for broadcast to the Bitcoin network, see 'can broadcast a Transaction' below
String txHash = txb.build().toHex();
After signing the transaction and calling the build function on TransactionBuilder. It is not broadcasting to the blockchain network. How to solve this? Please help. Do I need to perform any extra steps for broadcast?