Skip to content

Balzac is a domain-specific language to write Bitcoin transactions.

License

Notifications You must be signed in to change notification settings

AIBlockOfficial/balzac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status Donate with Bitcoin

Balzac

A domain-specific language to write Bitcoin transactions, based on the paper A formal model of Bitcoin transactions presented at Financial Cryptography and Data Security 2018.

Online editor: balzac-lang.xyz

Documentation: docs.balzac-lang.xyz

Quickstart

docker pull balzaclang/balzac:latest
docker run --rm -p 8080:8080 --name balzac balzaclang/balzac:latest

Setup

Execute the script install-deps.sh or alternatively follow these steps:

Install a customized version of BitcoinJ

echo "Cloning https://github.com/natzei/bitcoinj.git"
git -C $HOME clone https://github.com/natzei/bitcoinj.git
git -C $HOME/bitcoinj checkout lib
gradle -p $HOME/bitcoinj install -x test

Compare versions

Install

export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED"
mvn -f xyz.balzaclang.balzac.parent/ -U clean install

Run Balzac

In order to run Balzac locally you can

  • build on your machine and run using Maven + Jetty
  • build on your machine and load the war (saved into xyz.balzaclang.balzac.web/target/) inside any web container (e.g. Tomcat)
  • build on your machine and run in Docker (see docker/Dockerfile-slim to create the image)
  • download from DockerHub and run in Docker

The following commands assume this variable has been set:

export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED"

Build a WAR package

mvn -f xyz.balzaclang.balzac.web/ package

The WAR package is saved in xyz.balzaclang.balzac.web/target/.

Run with Maven + Jetty

mvn -f xyz.balzaclang.balzac.web/ jetty:run

Or alternatively

mvn -f xyz.balzaclang.balzac.web/ jetty:run-war

Build Docker image

Assuming the WAR package is saved in xyz.balzaclang.balzac.web/target/, you can generate the Docker image by executing:

docker build -t balzaclang/balzac:latest .

You can specify a custom war file by using the build-arg war=<path> parameter.

Prebuilt image

DockerHub: balzaclang/balzac

docker pull balzaclang/balzac:latest

Balzac is available for the following architectures:

- linux/amd64
- linux/arm/v7
- linux/arm64

Docker run

docker run --rm -p 8080:8080 --name balzac balzaclang/balzac:latest

Development

The project is currently developed using Eclipse IDE for Java and DSL Developers (generally the latest version). Install it using the Eclipse installer.

Dependencies

Donate

Donate with Bitcoin

About

Balzac is a domain-specific language to write Bitcoin transactions.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Java 57.1%
  • Xtend 34.9%
  • HTML 6.3%
  • CSS 0.7%
  • Shell 0.4%
  • Dockerfile 0.3%
  • JavaScript 0.3%