Exemple #1
0
        private void MakeTx(object param)
        {
            // param is of type System.Windows.Controls.SelectedItemCollection
            IList utxo = (IList)param;

            //RawTx = Transaction.CreateRawTx(utxo.Cast<UTXO>().ToList(), ReceiveList.ToList(), LockTime, SelectedWalletType);
            RawTx = TxService.CreateRawTx(TxVersion, utxo.Cast <UTXO>().ToList(), ReceiveList.ToList(), LockTime, SelectedWalletType);
        }
 /// <summary>
 /// Converts Raw Transaction hex into a JSON string representation of the transaction.
 /// </summary>
 private void SetJson()
 {
     try
     {
         TxModel btx = TxService.DecodeRawTx(rawTx);
         TxJson = JsonConvert.SerializeObject(btx, Formatting.Indented);
     }
     catch (Exception ex)
     {
         TxJson = "Not a Valid Transaction hex" + Environment.NewLine + ex.ToString();
     }
 }
Exemple #3
0
 private void DecodeTx()
 {
     try
     {
         Trx         = TxService.DecodeRawTx(rawTx);
         ReceiveList = new BindingList <ReceivingAddress>(Trx.TxOutList.Select(x => new ReceivingAddress()
         {
             Address = x.PkScript, Payment = x.Amount
         }).ToArray());
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }