public override void ReadWriteCore(BitcoinStream stream) { _uTxOutputs = new UTxOutputs(); stream.ReadWrite(ref _uTxOutputs); }
/// <summary> /// Gets unspect outputs. /// </summary> /// <param name="outPoints">The out points identifiers (TxIn-N).</param> /// <param name="checkMempool">if set to <c>true</c> [check mempool].</param> /// <returns>The unspent transaction outputs (UTXO) for the given outPoints.</returns> /// <exception cref="System.ArgumentNullException">outPoints cannot be null.</exception> public async Task<UTxOutputs> GetUnspentOutputsAsync(IEnumerable<OutPoint> outPoints, bool checkMempool) { if(outPoints == null) throw new ArgumentNullException("outPoints"); var ids = from op in outPoints select op.ToString(); var result = await SendRequestAsync("getutxos" + (checkMempool ? "/checkmempool" : ""), _format, ids.ToArray()).ConfigureAwait(false); var mem = new MemoryStream(result); var utxos = new UTxOutputs(); var stream = new BitcoinStream(mem, false); stream.ReadWrite(utxos); return utxos; }