I created a tool called Kiosk that allows one to play with ErgoScript using a basic web-based UI. In particular, we can do the following:
- Define boxes with arbitrary ErgoScript code and register values
- Create transaction outputting some predefined boxes
Kiosk requires a fully configured Ergo node running and by default assumes that its REST API is available at http://localhost:9052. This can be changed by calling the method
org.sh.kiosk.ergo.ErgoAPI.setUrl from the web-UI.
A precompiled jar is available here, which can be run using
java -jar <jarfile>.
You can generate the jar from sources by issuing the command
Use it as follows:
- Set the environment to use in ErgoScript. This is a map of (key, value) pairs where keys will be referenced within ErgoScript code and also for setting registers of boxes. See the first image.
- Define one or more boxes using ErgoScript code and some registers if needed. See the second image.
- Create and send a transaction with some given boxes defined earlier in Step 2. See the third image.
The final output will be txid of the transaction along with the request that was made to the Ergo node’s API.
Please provide suggestions for improvement and feel free to contribute.