Git Product home page Git Product logo

chialisp-wallets's Introduction

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

chialisp-wallets's People

Contributors

matt-o-how avatar richardkiss avatar ronanlong avatar wbendick avatar yostra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.