bitcoin-client
bitcoin client library for price ticker and wallet
git clone https://9o.is/git/bitcoin-client.git
commit d8fbb9eed1ae939f7cd7496c584a19daca38f6a8 parent f042b3eea5c2b6a69da036675b67493e8dfe245e Author: Jul <jul@9o.is> Date: Tue, 18 Nov 2014 07:06:06 +0000 README.md edited online with Bitbucket Diffstat:
| M | README.md | | | 89 | ++++++++++++++++++++++++++++++++++++++++--------------------------------------- |
1 file changed, 45 insertions(+), 44 deletions(-)
diff --git a/README.md b/README.md @@ -1,44 +1,45 @@ -# Bitcoin Client Library - -Provides several client-side bitcoin services such as price ticker and wallet. - ----- -## usage examples - -Retrieve bitcoin address balance using Blockchain service. - - import akka.actor._ - import akka.pattern._ - import com.typesafe.config._ - import scala.concurrent.duration._ - import inc.pyc.bitcoin._, BitcoinJsonRPC._ - - val props = BitcoinService.props(BitcoinService.BlockChain) - val system = ActorSystem("sys", ConfigFactory.load(ConfigFactory.parseString(""" - bitcoin.blockchain { - wallet-uri = "https://rpc.blockchain.info" - rpc-user = "<blockchain wallet identifier>" - rpc-pass = "<blockchain password>" - wallet-pass = "<blockchain second password>" - } - """))) - - import system.dispatcher - val wallet = system.actorOf(props) - val balance = wallet.ask(GetBalance)(5 seconds).mapTo[String] - balance.foreach(println) - -Retrieve bitcoin price using BitStamp service. - - import akka.actor._ - import akka.pattern._ - import scala.concurrent.duration._ - import inc.pyc.bitcoin._ - - val props = BitcoinService.props(BitcoinService.BitStamp) - val system = ActorSystem("sys") - - import system.dispatcher - val ticker = system.actorOf(props) - val price = ticker.ask(Tick)(5 seconds).mapTo[Price] - price.foreach(p => println(p.format)) +# Bitcoin Client Library + +Provides several client-side bitcoin services such as price ticker and wallet. + +---- +## usage examples + +Retrieve bitcoin price using BitStamp service. + + import akka.actor._ + import akka.pattern._ + import scala.concurrent.duration._ + import inc.pyc.bitcoin._ + + val props = BitcoinService.props(BitcoinService.BitStamp) + val system = ActorSystem("sys") + + import system.dispatcher + val ticker = system.actorOf(props) + val price = ticker.ask(Tick)(5 seconds).mapTo[Price] + price.foreach(p => println(p.format)) + + +Retrieve bitcoin address balance using Blockchain service. + + import akka.actor._ + import akka.pattern._ + import com.typesafe.config._ + import scala.concurrent.duration._ + import inc.pyc.bitcoin._, BitcoinJsonRPC._ + + val props = BitcoinService.props(BitcoinService.BlockChain) + val system = ActorSystem("sys", ConfigFactory.load(ConfigFactory.parseString(""" + bitcoin.blockchain { + wallet-uri = "https://rpc.blockchain.info" + rpc-user = "<blockchain wallet identifier>" + rpc-pass = "<blockchain password>" + wallet-pass = "<blockchain second password>" + } + """))) + + import system.dispatcher + val wallet = system.actorOf(props) + val balance = wallet.ask(GetBalance)(5 seconds).mapTo[String] + balance.foreach(println)