* PoC bitcoin-s-cli * Add CLI, Server sbt projects, remove Ammonite In this commit we set up sbt configuration for CLI, Server (in-work-name) and corresponding test projects. We also remove Ammonite shell from sbt, as that isn't really being used. bloop console offers the same functionality way more ergonimic. * Move BitcoinSAppConfig into new server project Server project depends on node, chain wand wallet so this is a good time for introducing this class into main sources. We also introduce BitcoinSTestAppConfig in testkit, to replace the functionality in BitcoinSAppConfig related to tests. * Type chain in blockchainresult * MVP server setup for node, chain and wallet * Extremely dirty CLI for interacting with server * initial attempt at mimicking Bitcoin Core API * WalletStorage: add method for checking for seed existance * Check for seed existance on wallet startup * Fix bug where MnemonicNotFound was not an error * Segregate confirmed and unconfirmed balance methods * Add error handling, improve formatting of CLI output * Tweak build Bump Sttp version, downgrade to uPickle 2.11 compat, skip publish in cli-test and server-test * Add CLI, server and picklers to root project |
||
---|---|---|
.. | ||
src | ||
README.md |
Philosphy of testkit
The high level of of the bitcoin-s testkit is to mimic provide functionality to test 3rd party applications.
There are other examples of these in the Scala ecosystem like the akka-testkit
and slick-testkit
.
We use this testkit to test bitcoin-s it self. For instance, our BitcoindRpcClient is tested with the functionality provided in the testkit. A quick example of a useful utility method is BitcoindRpcTestUtil.startedBitcoindRpcClient(). This spins up a bitcoind regtest instance on machine and generates 101 blocks on that node. This gives you the abililty to start spending money immediately with that bitcoind node.
We have similar utility methods for eclair.
Property based testing
There is also a robust set of generators available in the org.bitcoins.testkit.gen package. This allows you to integrate property based testing into your library and feel confident about implementing your application specific logic correctly.
You can see examples of us using these generators inside of testkit in our Private Key test cases