https://github.com/vulpemventures/gdk-ocean
https://github.com/vulpemventures/gdk-ocean
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vulpemventures/gdk-ocean
- Owner: vulpemventures
- License: mit
- Created: 2022-02-04T16:39:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-20T10:05:57.000Z (over 3 years ago)
- Last Synced: 2025-06-30T15:57:01.070Z (12 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gdk-ocean
gdk-ocean is a Liquid wallet running on a gRPC server. It implements the [ocean API](https://github.com/vulpemventures/ocean)
# Usage
## Run gdk-ocean locally
The current version of gdk-ocean uses Python 3.9
__the first time you run the program, you have to set up the virtual env with all dependencies.__
Init the submodules:
```
git submodule update --init --recursive
```
And copy the stubs:
```
make stubs
```
Create virtual env (it needs Python 3.9 installed)
```
make env
```
Then, activate the env and install the `requirements.txt` deps.
```
source venv/bin/activate
make deps
```
At any moment, you can leave the venv with `deactivate`.
Now you can run the server in any Python 3.9 environmnent:
```
make run
```
By default, the server is running on port 50051.
## Run gdk-ocean in a Docker container
Init the submodules and copy the proto stubs:
```
git submodule update --init --recursive
make stubs
```
Build the image:
```bash
docker build -t gdk-ocean . # -t is the image name
```
Run a container:
```bash
docker run gdk-ocean
```
Once the container is running, you can request it via the exposed port 50051.
## CLI
You can communicate with gdk-ocean using the `cli.py` script. It must be run by python3.9.
In your virtual enviroment, install the CLI dependencies:
```bash
pip install -r requirements_cli.txt
```
> if you are running the server in a container or if u don't want to mix CLI & server env, you can create venv with: `python3.9 -m venv venv_cli`
The CLI can connect to a gdk-ocean server using `--host` and `--port` options
```bash
python cli.py --address 0.0.0.0:8080
python cli.py # if not set, cli.py requests localhost:50051 by default
```
Try to create your wallet using the cli:
```bash
python cli.py genseed # write down your secret words!
python cli.py create -m "" -p ""
```
You can print the list of commands by running `python cli.py --help`. Any command help message can be printed by running `python cli.py --help`.