NBitcoin the right way to ship a transaction?


The verification handed. However nothing occur after that. The steadiness in each accounts stay the identical.

Something unsuitable in the best way that I construct my transaction?

var fpk = new BitcoinSecret("<my personal key>", Community.TestNet);
var fspk = fpk.GetAddress(ScriptPubKeyType.Legacy);
var api = new QBitNinjaClient("http://tapi.qbit.ninja/", fpk.Community);
var fbal = await api.GetBalance(fspk, true);
var fcoin = new Record<ICoin>();
foreach (var o in fbal.Operations)
    if (o.Confirmations < 2) proceed; // 2 confirmations

var builder = fpk.Community.CreateTransactionBuilder();
var tx = builder
    .Ship(new BitcoinPubKeyAddress("<To deal with>", fpk.Community), Cash.Cash(0.001))


Supply hyperlink

Leave a reply