public override string ToString() { var total_btc = BitcoinValue.FromSatoshis(this.Transactions .SelectMany(o => o.Outs) .Select(o => o.Value.Satoshis) .Sum()); return(string.Format(CultureInfo.InvariantCulture, "{{{0}: {1} tx ({2})}}", this.Timestamp, this.Transactions.Length, total_btc)); }
public static TransactionOut Parse(byte[] buffer, ref int index) { var res = new TransactionOut(); res.Value = BitcoinValue.Read(buffer, ref index); var script_length = Helper.ReadVariableUInt(buffer, ref index); res.Script = PublicKeyScript.Parse(buffer, ref index, (int)script_length); return(res); }
public override string ToString() { return(string.Format(CultureInfo.InvariantCulture, "{{tx: {0}}}", BitcoinValue.FromSatoshis(this.Outs.Sum(o => o.Value.Satoshis)))); }