#wallet #command #json-file #address #generate #label #polkadot-substrate

app subwallet

CLI Wallet for Polkadot/Substrate

1 unstable release

0.1.0 Jun 9, 2020

#89 in #label

MIT license

32KB
798 lines

subwallet

A simple Command Line Interface Wallet for Polkadot/Substrate.

Downloads

Usage

$ ./subwallet -h
subwallet 0.1.0
yxf <yxf4559@gmail.com>
A simple Command Line Interface wallet for Polkadot/Substrate.

USAGE:
    subwallet [SUBCOMMAND]

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

SUBCOMMANDS:
    backup           Backup specified address to local json file
    getnewaddress    Generate a new address associated with label, deafult cryptography is sr25519
    help             Prints this message or the help of the given subcommand(s)
    listaddresses    Prints the list of addresses
    restore          Restore address from json file

Subcommands

./subwallet help [SUBCOMMAND] to prints help information of subcommand.

getnewaddress

Generate a new random address

Example:

$ ./subwallet getnewaddress demo
1c1AVSCrrhtakya7LSm2hXHJUmBFdXV2KmCgEgDDaTWUQK3

listaddresses

List all generated addresses

Example:

$ ./subwallet listaddresses
ec              1EE8Q6nt4x3x3Cm9eevvtCBesEUfwTJ4bw4ocQUkNrd42Z1j        ecdsa
demo            15FarxkDPL7LPvBPd1RDMGugGFs8be2ijuHEuLJd9z67PdNm        sr25519
ed              16Q55taKB1ggt3VgQ8EFTRkmYTgtNKb9xka8hqMqXMPLCNxU        ed25519

restore

Restore address from json file. It is compatible with keystore file generated on https://polkadot.js.org/apps.

Example:

./subwallet restore ~/1EE8Q6nt4x3x3Cm9eevvtCBesEUfwTJ4bw4ocQUkNrd42Z1j.json
Password: #Type password to decode seed
1EE8Q6nt4x3x3Cm9eevvtCBesEUfwTJ4bw4ocQUkNrd42Z1j is restored

backup

Backup address to local json file. The backed file can be restored on https://polkadot.js.org/apps.

Example:

./subwallet backup demo ~/demo.json
Type password to encrypt seed: # password
Address `15FarxkDPL7LPvBPd1RDMGugGFs8be2ijuHEuLJd9z67PdNm` is backed up to file `~/demo.json`

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yxf/subwallet

License

MIT

Dependencies

~9–20MB
~304K SLoC