Permalink
Browse files

Updating the readme.

  • Loading branch information...
1 parent 0d84f24 commit 9744770bc874238a0a24b41702718cd3553aedde @travist committed Mar 4, 2014
Showing with 12 additions and 5 deletions.
  1. +12 −5 README.md
View
@@ -37,17 +37,24 @@ void main() {
"pass": "123123123123"
});
- // Get work from the client.
+ // Get work from the bitcoind.
bitcoin.getwork().then((Map<String, String> work) {
+ // Work.
+ print(work);
+
// Create the miner.
- Miner miner = new Miner(work);
+ Miner miner = new Miner.fromJSON(work);
// Mine for gold!
- List<int> result = miner.mine();
+ Map<String, String> result = miner.mine();
- // Print the result!
- print(result);
+ // If the result isn't null, then
+ if (result != null) {
+ print('Gold!');
+ print(result);
+ bitcoin.getwork(params: [result['data']]);
+ }
});
}
```

0 comments on commit 9744770

Please sign in to comment.