Welcome to Sentz!
Learn more here.

Python CLI

Python API and command line interface, MobileCoin command-line interface and command line interface and client library for MobileCoin full-service node.


$ pip install mobilecoin

This will install the Python package mobilecoin, and also put the mob command line tool at ~/.local/bin/mob.

CLI usage

First, you should have an instance of the full-service wallet running on your local machine. Setup instructions are at https://github.com/mobilecoinofficial/full-service.

$ cd full-service
$ ./tools/run-fs.sh test

See the full-service README for more details.

Check that your CLI is correctly configured by running the status command:

$ mob status
Connected to MobileCoin network.
All accounts synced, 1421264 blocks.

Total balance for all accounts:
  0 MOB

Transaction Fees:
  0.0004 MOB
  0.00256 eUSD

Create an account.

$ mob create
Created a new account.

See it in the account list.

$ mob list

d7efc1 (synced)
  0 MOB

Get at least 1 MOB on testnet in order to run unitests, then export your wallet so the unittests can use it. Store this file in a safe location.

$ mob export d7
You are about to export the secret entropy mnemonic for this account:

d7efc1 (synced)
  1.0000 MOB

Keep the exported entropy file safe and private! Anyone who has access to the entropy can spend all the funds in the account.
Really write account entropy mnemonic to a file? (Y/N) Y
Wrote mobilecoin_secret_mnemonic_d7efc1.json.

$ mv mobilecoin_secret_mnemonic_d7efc1.json /path/to/safe/location

Install the Poetry tool.

Follow the instructions at https://python-poetry.org/.

Run unittests and integration tests.

Set an environment variable to tell the unittests where your wallet export file is.

$ export MC_WALLET_FILE='/path/to/safe/location/mobilecoin_secret_mnemonic_d7efc1.json'

Optionally set environment variables to run fog tests.

$ export MC_FOG_REPORT_URL='fog://fog.test.mobilecoin.com'
$ export

With full-service running, start the integration tests.

$ poetry install
$ poetry run pytest -v