示例#1
0
        /// <summary>
        /// Gets transactions details and inclusion states by bundle hash
        /// </summary>
        /// <param name="bundleHash"></param>
        /// <returns></returns>
        public async Task <TransactionItem[]> GetBundleTransactionItems(string bundleHash)
        {
            var transactionHashes = await iriApi.FindTransactions(null, null, null, new string[] { bundleHash });

            var transactionItems = await GetTransactionItems(transactionHashes);

            return(transactionItems);
        }
示例#2
0
        /// <summary>
        /// Gets transactions details and inclusion states by bundle hash
        /// </summary>
        /// <param name="bundleHash"></param>
        /// <returns></returns>
        public async Task <APIResult <TransactionItem[]> > GetBundleTransactionItems(string bundleHash)
        {
            var transactionHashes = await iriApi.FindTransactions(null, null, null, new string[] { bundleHash });

            if (transactionHashes.Successful)
            {
                var transactionItems = await GetTransactionItems(transactionHashes.Result);

                return(transactionItems);
            }
            else
            {
                return(transactionHashes.RePackage(r => new TransactionItem[0]));
            }
        }