GithubHelp home page GithubHelp logo

virtool's Introduction

Virtool: Virto tools CLI

Toolkit to prove the usability of tools behind Virto Network's framework. It uses libwallet and sube to work.

Getting Started

Requisites

Rust

Since under the hood, sube uses some unstable features (like async_traits), you'll need to install the latest version from the nightly channel.

Here you can find the instructions on how you can install Rust toolchain. After doing so, update to the latest version on nightly, running:

rustup update nightly

After that, you'll need to add ~/.cargo/bin to the session PATH.

# If you use bash
echo "export PATH=$PATH:$HOME/.cargo/bin" >> ~/.bashrc
# If you use zsh
echo "export PATH=$PATH:$HOME/.cargo/bin" >> ~/.zshrc

Dependencies

For this specific proof of concept, the tool uses the following dependencies:

prs We use it as a storage backend for your accounts (see src/vault/pass.rs on libwallet to get more details).

To install a pretty handful CLI to manage your accounts run:

cargo install prs-cli

The Westend chain

Even though you can change it to use any other chain (see cmd/balance.rs:15 and cmd/transfer.rs:19 to change them).

Installing from source

Download the source repository

git clone https://github.com/pandres95/virtool.git
cd virtool

Update the dependencies on your local machine:

cargo update

To build and install:

cargo +nightly install --path .

Setting up your account

First, you'll need to specify the name you'll use for storing your account locally. Let's say it's acct.

If you previously have a mnemonic seed to setup your account, you can add it using prs CLI:

prs add libwallet_accounts/acct

Otherwise, go to the next section.

Usage

When running virtool, the program shows the following help:

virtool 1.0.0

USAGE:
    virtool --uname <uname> <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -u, --uname <uname>

SUBCOMMANDS:
    balance
    help        Prints this message or the help of the given subcommand(s)
    transfer

Get your balance

To find the balance for you acct account, run:

virtool -u acct balance

Make a transfer

To make a transfer from you acct account to another account, run:

virtool -u acct transfer --dest <dest> --value <value>

Where:

  • dest is the address for the destination account. This can be either in SS58 format or in Public Key Hex (0x) format.
  • value is the amount to transfer in the smallest unit (e.g. Westend's smallest unit is 10-12 WND).

virtool's People

Contributors

pandres95 avatar

Stargazers

 avatar  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.