Metadata-Version: 2.3
Name: acqua
Version: 0.1.1
Author-email: Sitt Guruvanich <aekasitt.g+github@siamintech.co.th>
License-Expression: MIT
License-File: LICENSE
Keywords: anonymous,bitcoin,cli,lightning,terminal,tui,ui,user-interface
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: MacOS :: MacOS 9
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Other/Nonlisted Topic
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Requires-Dist: apscheduler>=3.10.4
Requires-Dist: blessed>=1.20.0
Requires-Dist: click>=8.1.7
Requires-Dist: docker>=6.1.3
Requires-Dist: numpy>=2.0.2
Requires-Dist: pydantic>=2.5.2
Requires-Dist: pygame>=2.6.1
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: rich>=13.7.0
Description-Content-Type: text/markdown

# Acqua 

[![Docker](https://img.shields.io/badge/docker-2496ED?&logo=docker&logoColor=white)](https://hub.docker.com)
[![Top](https://img.shields.io/github/languages/top/aekasitt/acqua)](https://github.com/aekasitt/acqua)
[![Languages](https://img.shields.io/github/languages/count/aekasitt/acqua)](https://github.com/aekasitt/acqua)
[![Size](https://img.shields.io/github/repo-size/aekasitt/acqua)](https://github.com/aekasitt/acqua)
[![Last commit](https://img.shields.io/github/last-commit/aekasitt/acqua/master)](https://github.com/aekasitt/acqua)

[![Acqua Banner](static/acqua-banner.svg)](https://github.com/aekasitt/acqua/blob/master/static/acqua-banner.svg)

## Getting started

You can use `acqua` simply by installing via `pip` on your Terminal.

```sh
pip install acqua
```

  
 Sample output when running install command 

![Sample Pip Install](https://github.com/aekasitt/acqua/blob/master/static/pip-install.gif)

And build required images with `build` command. The following shows you how to build a `Testnet`
Sui Validator node with one-command.

```sh
acqua build --mainnet
```


 Sample output when running build command 

![Sample Acqua Build](https://github.com/aekasitt/acqua/blob/master/static/acqua-build.gif)

The initial build may take some time as it is downloading source codes from different repositories
and interfacing with `Docker Daemon` to build according to flagged requirements. Once the build process
completes, you can begin deploying local network with peripherals as such:

```sh
acqua deploy --mainnet --with-postgres
```


Sample output when running deploy command

![Sample Acqua Deploy](https://github.com/aekasitt/acqua/blob/master/static/acqua-deploy.gif)

You will have docker containers running in the backend, ready to be interfaced by your local
environment applications you are developing.

## Dashboard

Acqua not only facilitates the deployment of [Bitcoin](https://twentyone.world) services
such as the [Sui](https://sui.io) Validator node with a PoW relay, but allows you to view
Node's Blockchain Information, Mempool Information, Peripheral Details and etc.

In order to view relevant metrics, launch the dashboard using the following command.

```sh
acqua dashboard
```


 Sample output when running dashboard command 

![Sample Acqua Dashboard](https://github.com/aekasitt/acqua/blob/master/static/acqua-dashboard.gif)

## Contributions

### Prerequisites

* [python](https://www.python.org) version 3.8 and above
* [uv](https://docs.astral.sh/uv)
* [docker](https://www.docker.com)

### Set up local environment

The following guide walks through setting up your local working environment using `pyenv`
as Python version manager and `uv` as Python package manager. If you do not have `pyenv`
installed, run the following command.

 Install using Homebrew (Darwin) 
  
  ```sh
  brew install pyenv --head
  ```


 Install using standalone installer (Darwin and Linux) 
  
  ```sh
  curl https://pyenv.run | bash
  ```


If you do not have `uv` installed, run the following command.

 Install using Homebrew (Darwin) 

  ```sh
  brew install uv
  ```


 Install using standalone installer (Darwin and Linux) 

  ```sh
  curl -LsSf https://astral.sh/uv/install.sh | sh
  ```


Once you have `pyenv` Python version manager installed, you can
install any version of Python above version 3.8 for this project.
The following commands help you set up and activate a Python virtual
environment where `uv` can download project dependencies from the `PyPI`
open-sourced registry defined under `pyproject.toml` file.

 Set up environment and synchronize project dependencies 

  ```sh
  pyenv shell 3.11.9
  uv venv  --python-preference system
  source .venv/bin/activate
  uv sync --dev
  ```


Now you have the entire project set-up and ready to be tinkered with. Try out the
standard `acqua` command which brings up a help menu.

 Launch Acqua Help 

  ```sh
  $ acqua
  >  Usage: acqua [OPTIONS] COMMAND [ARGS]...
  > 
  >  acqua 
  > 
  > Options:
  >   --help  Show this message and exit.
  > 
  > Commands:
  >   auth       Persist authentications in desired run-control file.
  >   build      Build peripheral images for the desired cluster.
  >   clean      Remove all active "acqua-*" containers, drop network.
  >   dashboard  Dashboard for checking current state of images deployed.
  >   deploy     Deploy cluster.
  >   pull       Pull core and peripheral images from GitHub container registry
  ```


### Known issues

You may run into this setback when first running this project. This is a
[docker-py](https://github.com/docker/docker-py/issues/3059) issue widely known as of October 2022.

```python
docker.errors.DockerException:
  Error while fetching server API version: (
    'Connection aborted.', FileNotFoundError(
      2, 'No such file or directory'
    )
  )
```

See the following issue for Mac OSX troubleshooting.
[docker from_env and pull is broken on mac](https://github.com/docker/docker-py/issues/3059#issuecomment-1294369344)
Recommended fix is to run the following command:

```sh
sudo ln -s "$HOME/.docker/run/docker.sock" /var/run/docker.sock
```

## License

This project is licensed under the terms of the MIT license.

