Author

Topic: Writing/Running scripts by pressing buttons in a friendly GUI (Read 330 times)

legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I can port this to Electron/NodeJS where it will run on any platform without the need for emulators (like Wine) or VMs. The best part is I can even deploy it as a web app.
This project is old and kind of obsolete, so I never got around to fixing its bugs and adding the missing parts. However migration of this project is one of those items in my very long to-do list. I recently finished the transaction verification part but haven't started working on the "script playground" part. The migration fixes the bugs and will cover every script that exists in Bitcoin protocol and the software can run on any operating system.
Here is an issue to track this #2.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
I did some search and it seems like Wine has some known bugs related to WPF (GUI that is used in this project). I won't spend any time on fixing this because there is a much better way of solving the issue and that would be using a cross-platform GUI so that you don't need Wine, you simply run it as you run any other application in another OS (Windows, Linux, Mac,...).

I can port this to Electron/NodeJS where it will run on any platform without the need for emulators (like Wine) or VMs. The best part is I can even deploy it as a web app.

^^ yes I see the thread creation date.
full member
Activity: 161
Merit: 168
Your tool is great. I work with it :-)
Please, please, I urgently need it in the testnet!
In the test network you work much more with such things.
It would be great, if it would go in the testnet too.
copper member
Activity: 85
Merit: 5
I'm always a fan of simplifying things and building GUIs and ever since I saw the Miniscript project I wanted to make that happen. Since I recently resumed working on one of my oldest projects (Bitcoin Transaction Tool) I decided to add it as a new feature to that project, for writing and running scripts at the same time.

It can be found under Tools > Script builder (or press F3). It currently supports all OP codes except the disabled ones (for obvious reasons) and *checksig OPs (since to support them I had to copy about 6000 lines of code into this project) and 2 locktime related OPs and CodeSeparator (because I haven't had time to understand how they work!). OPs are also categorized and can be filtered by using the ComboBox on top for ease of finding them.
Writing the script will also run it, the result of it is shown in a text box and the "box" at the bottom right is a list representing the "stack".

I plan on working on it and add more more features such as adding pre-defined script that only need filling up the data part. But before that I wanted to get some feedback about what you think about something like this, how can I improve it,...

Here is a preview:

nice. I suggest you use dropdown and a RUN button for OP section  Smiley
sr. member
Activity: 377
Merit: 282
Finis coronat opus
Hello, and why is disabled OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY? The second one is very useful for creating bitcoin-testament smart conract, for example.

It is because I am not sure how to implement these two as an IOperation.

Understood. Maybe it will be enough to ad them and they will return only "true" doesn't matter what block height or time have been pushed to stack?

It's sound logical, for me.

User interface is enough friendly, at least for me.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
Hello, and why is disabled OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY? The second one is very useful for creating bitcoin-testament smart conract, for example.

It is because I am not sure how to implement these two as an IOperation. In the near future I will add these OPs and also eventually will release my Cryptocurrency.Net library which would also mean additional features including signing, verification and communication with nodes.

In this topic I was hoping for some ideas on how to improve the user interface. For instance how would you like to create such smart contracts?
sr. member
Activity: 377
Merit: 282
Finis coronat opus
Quote
What are the "obvious" reasons for disabling some scripts?
You have to look at the buttons that are disabled for it to become obvious. These are a bunch of OP codes (such as OP_CAT, OP_Multiply,...) that were removed/disabled a long time ago. Since their names still exist in the source code and documentation, I also have them here as disabled buttons.

Hello, and why is disabled OP_CHECKLOCKTIMEVERIFY and OP_CHECKSEQUENCEVERIFY? The second one is very useful for creating bitcoin-testament smart conract, for example.
I will be appreciated for your answer.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I tried it and works without any problem on Windows 10. It doesn't work on Wine (default configuration) though.
I did some search and it seems like Wine has some known bugs related to WPF (GUI that is used in this project). I won't spend any time on fixing this because there is a much better way of solving the issue and that would be using a cross-platform GUI so that you don't need Wine, you simply run it as you run any other application in another OS (Windows, Linux, Mac,...).
Currently there are a couple of them that I'm aware of. The one that I feel comfortable with (also used by Wsabi wallet) is called Avalonia, but since it is in beta, it lacks a lot of functionality or to do certain things you have to bend over backwards (like the grid-like lists where you enter addresses and the list containing UTXOs with categorization and headers).
The migration is in my "roadmap" which would make it easy to run it under any other OS without needing anything else. Meanwhile if someone is familiar with Xaml and Avalonia feel free to contribute...

I've heard https://www.monodevelop.com/ allows you to create/port C# and .NET software into multiple OS.
You probably already know about it though.
That is an IDE (development environment, ie. where you write code and compile), what is needed here is a GUI that is a graphical user interface that doesn't require windows APIs (like WPF does) to run.


I've released a new version and added description to each button in script writer window explaining what they do. Also the QR window now lets you choose the encoding you want to use (eg. Electrum uses Base43 to encode raw unsigned transactions).
https://github.com/Coding-Enthusiast/BitcoinTransactionTool/releases/tag/0.10.1.0
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
No, I hope you understand the joke :-)
I played around with it. Works very well.

Of course I recognize my own UTXO anywhere!
Try checking the script window and play around with that too and let me know what you think. I'll try to add more to it this week.
full member
Activity: 161
Merit: 168
I created a Tx with it:

"0100000001902dbe4ae9a20b85f53cb6813396e6aae272ee4e3b699e8c2498d2ce8f5833ee00000 00000ffffffff01c0270900000000001976a91415dee4a950952a3a5aa198543e37d310b6b7402f 88ac00000000"

Just how do I get the now signed?

No, I hope you understand the joke :-)

I played around with it. Works very well.
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
One should not really download and run .exe and since until now nobody had requested compiled version I've never thought about it. In any case I published it using ClickOnce, more info can be found here: https://github.com/Coding-Enthusiast/BitcoinTransactionTool/releases/tag/0.10.0.0

I've tried migrating to Avalonia (a multi platform GUI) but it lacks a lot of functionality specially when it comes to lists, so for the time being this project will remain only for windows. I'll try looking into other alternatives to migrate to .net core entirely which would make publishing and compiling easier too.
full member
Activity: 161
Merit: 168
Yes, I mean a compiled version as .exe, or is that unusual?
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
That can be very useful. I will test it as soon as it gets published.
It is already on GitHub https://github.com/Coding-Enthusiast/BitcoinTransactionTool
Do you mean publishing the compiled binaries?

Quote
What are the "obvious" reasons for disabling some scripts?
You have to look at the buttons that are disabled for it to become obvious. These are a bunch of OP codes (such as OP_CAT, OP_Multiply,...) that were removed/disabled a long time ago. Since their names still exist in the source code and documentation, I also have them here as disabled buttons.
full member
Activity: 161
Merit: 168
That can be very useful. I will test it as soon as it gets published.
What are the "obvious" reasons for disabling some scripts?
legendary
Activity: 1042
Merit: 2805
Bitcoin and C♯ Enthusiast
I'm always a fan of simplifying things and building GUIs and ever since I saw the Miniscript project I wanted to make that happen. Since I recently resumed working on one of my oldest projects (Bitcoin Transaction Tool) I decided to add it as a new feature to that project, for writing and running scripts at the same time.

It can be found under Tools > Script builder (or press F3). It currently supports all OP codes except the disabled ones (for obvious reasons) and *checksig OPs (since to support them I had to copy about 6000 lines of code into this project) and 2 locktime related OPs and CodeSeparator (because I haven't had time to understand how they work!). OPs are also categorized and can be filtered by using the ComboBox on top for ease of finding them.
Writing the script will also run it, the result of it is shown in a text box and the "box" at the bottom right is a list representing the "stack".

I plan on working on it and add more more features such as adding pre-defined script that only need filling up the data part. But before that I wanted to get some feedback about what you think about something like this, how can I improve it,...

Here is a preview:
Jump to: