b44c7af53d
WIP: Refactoring EclairTestUtil to use Futures Finished refactor EclairTestUtil to use futures Address code review fix async bug in chan opening Change snapshot version to something that should compile |
||
---|---|---|
bench | ||
core | ||
core-test | ||
doc | ||
eclair-rpc | ||
project | ||
rpc | ||
secp256k1@2e16ac7d6c | ||
secp256k1jni | ||
testkit | ||
zmq/src | ||
.gitignore | ||
.gitmodules | ||
.scalafmt.conf | ||
build.sbt | ||
CONTRIBUTING.md | ||
inThisBuild.sbt | ||
LICENSE | ||
README.md |
Bitcoin-S
Design Principles
- Immutable data structures everywhere
- Algebraic Data Types to allow the compiler to check for exhaustiveness on match statements
- Using property based testing to test robustness of code
- Minimize dependencies to reduce attack surface
Projects
-
core
- this is where protocol data structures live, like Transactions, Blocks, or PrivateKeys. For more info readcore/README.md
-
core-test
- this is where all test cases for thecore
project live -
rpc
- this is a RPC client implementation forbitcoind
. For more info readrpc/README.md
-
eclair-rpc
- this is a RPC client implementation for Eclair, which is a Lightning Network implementation. For more information please readeclair-rpc/README.md
-
bench
- benchmarks for Bitcoin-S. For more information please readbench/README.md
-
testkit
- This is a useful testkit for testing Bitcoin related applications. You can spin up Bitcoin and Lightning nodes arbitrarily and set them in specific states. For more information please readtestkit/README.md
-
zmq
-bitcoind
has a setting that publishes information about the state of the network over ZMQ. This project implements a subscriber that allows you to read and parse that information. For more information seezmq/README.md
as well as the official Bitcoin Core ZMQ documentation
Artifacts
You need to add the Bitcoin-S Bintray to your resolvers to be able to access published artifacts.
sbt
With sbt, this can be done like this:
resolvers += Resolver.bintrayRepo("bitcoin-s", "bitcoin-s-core"),
Now you should be able to add Bitcoin-S artifacts like this:
"org.bitcoins" % "bitcoin-s-secp256k1jni" % "0.0.3"
"org.bitcoins" %% "bitcoin-s-core" % "0.0.3" withSources() withJavadoc()
"org.bitcoins" %% "bitcoin-s-bitcoind-rpc" % "0.0.3" withSources() withJavadoc()
"org.bitcoins" %% "bitcoin-s-eclair-rpc" % "0.0.3" withSources() withJavadoc()
"org.bitcoins" %% "bitcoin-s-testkit" % "0.0.3" withSources() withJavadoc()
"org.bitcoins" %% "bitcoin-s-zmq" % "0.0.3" withSources() withJavadoc()
Ammonite
Ammonite is (among other things) a modernized Scala REPL with syntax highlighting, multi-line editing, the ability to load artifacts directly in the REPL, and many other quality-of-life improvements missing in the default Scala REPL.
Ammonite is a project by Li Haoyi, and you can get it at ammonite.io
With Ammonite, this can be done like this:
@ import coursier.MavenRepository
import coursier.MavenRepository
@ interp.repositories() ++= Seq(MavenRepository("https://dl.bintray.com/bitcoin-s/bitcoin-s-core"))
@ import $ivy.`org.bitcoins::bitcoin-s-core:0.0.3`
import $ivy.$
@ import org.bitcoins.core.currency.Bitcoins
import org.bitcoins.core.currency.Bitcoins
@ Bitcoins(10)
res0: Bitcoins = BitcoinsImpl(10) // 🎉
This is only necessary one time, Ammonite remembers your resolvers across sessions.
Published artifacts
Versioned artifacts are available online.
Snapshots (not necessarily stable, use for local development) are available at JFrog.
Tagged versions are available at Bintray.