Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resurrect full-service command-line interface. #673

Merged
merged 9 commits into from
Jan 25, 2023
65 changes: 65 additions & 0 deletions python/OLD_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# MobileCoin command-line interface
Command line interface and client library for MobileCoin full-service node.


## Install Python3 and Pip

Ubuntu:
```shell
sudo apt install python3-pip
```

Mac:
```shell
brew install python3
```

## Install mobcli

```shell
pip3 install .
```

Check that it is installed.
```shell
mobcli -h
```

## Configure mobcli

Copy the config file to your home directory.
```shell
cp mc_env.sh ~/.mc_env.sh
```

Add the following lines to your .bashrc:
```shell
if [ -f "$HOME/.mc_env.sh" ]; then
source "$HOME/.mc_env.sh"
fi
```

The CLI sends its requests to the wallet service executable. Download it from https://github.com/mobilecoinofficial/full-service/releases. Copy the file to the correct location.

```shell
cp full-service ~/.mobilecoin/testnet/full-service-testnet
```

The environment variables file specifies to connect to the test network by default, but
you can change it to connect to the main network if you know what you're doing, and are
confident you will not lose actual funds.


## Start the server

```shell
mobcli start
```

## Including the client library in packages

In order to reference the full-service Python client library for package dependencies, it is necessary to install via git, because it is not listed on PyPI. The pip install line for it is:

```
git+https://github.com/mobilecoinofficial/full-service.git#subdirectory=cli
```
Empty file added python/README.md
Empty file.
3 changes: 3 additions & 0 deletions python/bin/mob
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /usr/bin/env python3
from mobilecoin import CommandLineInterface
christian-oudard marked this conversation as resolved.
Show resolved Hide resolved
CommandLineInterface().main()
7 changes: 7 additions & 0 deletions python/mobilecoin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from mobilecoin.cli import CommandLineInterface
from mobilecoin.client import (
Client,
WalletAPIError,
mob2pmob,
pmob2mob,
)
Loading