Pandacash CLI
When developing applications for Bitcoin Cash, it is important that its functionality is well-tested, as the app can potentially be dealing with large amounts of money. For testing purposes, there is a public Bitcoin Cash testnet, but this testnet can not be used without an internet connection, and obtaining larger amounts of BCH can be cumbersome. Finally, in earlier stages of development, many developers would rather not be using a public network already, and would rather develop locally until development has furthered.
This is where pandacash-cli
comes in. pandacash-cli
is a one-click Bitcoin Cash blockchain with pre-funded BCH addresses, enabling developers to quickly start working with BCH without any hassle. pandacash-cli
is similar to ganache-cli
, but for Bitcoin Cash. pandacash-cli
is a wrapper around pandacash-core.
Prerequisites
To run pandacash-cli
, make sure that Node.js is installed.
On macOS these tools can be installed through Homebrew.
brew install node
Installation
npm install --global pandacash-cli
Usage
After installing pandacash-cli
, it can be used as a command-line tool to quickly spin up a local development BCH blockchain with a single command. The local blockchain comes with ten pre-funded BCH addresses, which can be used in the local development process.
Command Line
$ pandacash-cli <options>
Options:
-a
or--accounts
: Specify the number of accounts to generate at startup.-m
or--mnemonic
: bip39 mnemonic phrase for generating a PRNG seed, which is in turn used for hierarchical deterministic (HD) account generation.--debug
: Show debug output from the bitcoin node.
____ _ ____ _ | _ \ __ _ _ __ __| | __ _ / ___| __ _ ___ | |__ | |_) | / _` | | '_ \ / _` | / _` | | | / _` | / __| | '_ \ | __/ |
More usage options - pandacash-core
In order to use pandacash in your tests or as a server, use pandacash-core
.
Under the hood
PandaCash consists of the following components:
- bcash implementation of bitcoin cash node in regtest mode
- Doesn't sync with other Bitcoin nodes, and immediately creates new blocks on every transaction.
- Prefunded addresses
- 10 addresses with spendable BCH each, generated from a random mnemonic.
Contributors
- Adrian Barwicki
- Rosco Kalis
Licence
Copyright 2018 Panda Suite
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.