Skip to content
No description, website, or topics provided.
Python
Branch: master
Clone or download
Latest commit a73bc91 Jan 14, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows use ubuntu for testing Dec 2, 2019
atomic_swaps -made test file cleaner and added concurrent swaps test Dec 11, 2019
authorised_payees Remove detritus Dec 19, 2019
docs
multisig Add comments. Nov 26, 2019
rate_limit missing return Dec 4, 2019
recoverable_wallet updates blockchain scanner to walk thru chain instead of relying on a… Dec 4, 2019
standard_wallet -swapped to F-strings and Chialisp 0.3 Dec 13, 2019
tests -made test file cleaner and added concurrent swaps test Dec 11, 2019
utilities -initial commit Dec 5, 2019
.gitignore
LICENSE proposed structure again Nov 19, 2019
README.md Update README.md Dec 4, 2019
requirements.txt Specify library versions by commit hash. Dec 12, 2019
setup.py Use setuptools_scm. Dec 12, 2019

README.md

Chia Wallets

The Chia Wallets are designed to show off Chia's approach to transactions, and our new language ChiaLisp. At the moment this project is uses a local server which simulates the full network. This allows us to test the wallet functionality in isolation.

The local server which handles transactions in Chia is called ledger_sim.

We have a tutorial for writing smart transactions, and other documentation available here.

Setup

To install this repository, and all requirements, clone this repository and then run:

$ python3 -m venv .venv
$ . .venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .

(Note: at the moment blspy may require you to have CMake installed as well, though this dependency should be temporary)

QR Code Setup

To use the QR codes you will also need to support pyzbar.

On Windows this requires no extra effort.

On Linux, run:

$ sudo apt-get install libzbar0
$ pip install pyzbar[scripts]

On Mac, run:

$ brew install zbar
$ pip install pyzbar[scripts]

The Standard Wallet

The standard command-line wallet contains the default functionality for a wallet. It can send and receive transactions as well as generate QR codes and a few other 'smart' features.

Using the Command-line Interface

How to launch

In a terminal window, run:

$ . .venv/bin/activate

And then launch an instance of ledger-sim with:

$ ledger-sim

Then to start a new standard wallet, in a new terminal window, run:

$ . .venv/bin/activate

And then launch the standard wallet with:

$ wallet

Feel free to run more than one instance of the wallet to test sending money between them.

The Menu

The options available in a standard wallet are:

  • Make Payment - This will take ask you for an amount to send, and a string of wallet information to generate the address.
  • Get Update - This will poll the ledger_sim network and find out if there have been any new transactions that concern your wallet.
  • Commit Block / Get Money - This will create a new block, therefore committing all the pending transactions and also giving your wallet 1000000000 Chia.
  • Print My Details - This will output a string of information that another wallet can use to send money to you.
  • Set Wallet Name - This will change how your wallet self-identifies when communicating with other wallets.
  • Make Smart Contract - This will allow you to communicate with the Authorised Payees wallet, and send a coin that can only be spent in approved ways. For more information read the documentation here.
  • Make QR code - This will create a QR code image in the installed folder.
  • Payment to QR code - This acts the same way as 'Make Payment' but instead of a string storing the information, it reads in a QR image.
  • Quit - Closes the wallet program.

Smart Wallets

The Smart Transactions currently available are:

  • Atomic Swaps - $ as_wallet - guide
  • Authorised Payees - $ ap_wallet - guide
  • Recoverable Wallets - $ recoverable_wallet - guide
  • Multi-sig Wallet - $ multisig_wallet - guide
  • Rate-Limited Wallet - $ rl_wallet - guide

For more information about the smart wallets, check out our docs.

Tests

Firstly, make sure pytest is installed with

$ pip install pytest

Then you can run our tests with

$ py.test tests
You can’t perform that action at this time.