0.0.5 • Published 9 years ago

bitcoin-mock v0.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
9 years ago

bitcoin-mock

A simple nodejs library for mocking bitcoin.

Usage

var bitcoinMock = require('bitcoin-mock');
var client = new bitcoinMock.Client();

client.getBalance('*', 6, function(err, reply) {
  console.log(reply); // 0
});

Supported commands

  • getbalance
  • gettransaction
  • getblock
  • importprivkey
  • setaccount
  • sendmany
  • sendtoaddress

Additional commands

  • pushTransaction(account, confirmations, category, amount)

Creates a new transaction.

  • pushBlock(confirmations, txids)

Creates a new block.

  • flush()

Flush everything.

  • _transactions, _blocks, _accounts

Objects used to store information. By quering them you can check if your code works as expected.

What's missing

  • All unsupported commands
  • Some commands don't support optional parameters
0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago