/*TestBlockFromJson*/ public void TestBlockFromJson() { Console.WriteLine("********************************"); Console.WriteLine("BlockFromJson"); var getBlock = rpcClient.GetBlockAsync("2000").Result.ToJson(); var block = Utility.BlockFromJson(getBlock).ToJson(); Console.WriteLine("result: " + block); Console.WriteLine("********************************"); Console.WriteLine(); }
/*WaitTransaction*/ public void WaitTransaction() { WalletAPI walletAPI = new WalletAPI(rpcClient); Console.WriteLine("********************************"); Console.WriteLine("WaitTransaction"); var sendFromResult = rpcClient.SendFromAsync("0x254b9decd76080ef368e7a6b0a065938dfbc31cf", "NLtDqwnj9s7wQVyaiD5ohjV3e9fUVkZxDp", "NedjwsfAJYFas9rn8UHWQftTW4oKAQyW9h", "2").Result; Console.WriteLine("send: " + sendFromResult.ToString()); Transaction tx = Utility.TransactionFromJson(sendFromResult); var waitTx = walletAPI.WaitTransactionAsync(tx).Result.ToJson(); Console.WriteLine(); Console.WriteLine("confirmed: " + waitTx); Console.WriteLine("********************************"); Console.WriteLine(); }