BitcoinLib.Services.CoinService.LockUnspent C# (CSharp) Method

LockUnspent() public method

public LockUnspent ( bool unlock, IList listUnspentResponses ) : bool
unlock bool
listUnspentResponses IList
return bool
        public bool LockUnspent(bool unlock, IList<ListUnspentResponse> listUnspentResponses)
        {
            IList<object> transactions = new List<object>();

            foreach (var listUnspentResponse in listUnspentResponses)
            {
                transactions.Add(new
                {
                    txid = listUnspentResponse.TxId, listUnspentResponse.Vout
                });
            }

            return _rpcConnector.MakeRequest<bool>(RpcMethods.lockunspent, unlock, transactions.ToArray());
        }