Go to file
Ryan X. Charles 65ab3a663a fix string/buffer sjcl issue
...by using sjcl.mode.cbc.encrypt/decrypt rather than sjcl.encrypt/decrypt. The
difference is that the sjcl.encrypt/decrypt functions are really convenience
methods designed to encrypt and decrypt strings, but don't play nice with
binary data, as revealed in the tests in this commit and the previous commit.
Basically, if you use them to encrypt and decrypt binary data as a string, it
will return the wrong result or an error.

The solution is to use the block cipher directly, in this case sjcl.mode.cbc.
This also has the advantage of fewer format conversions - no converting to
base64 and JSON strings. This makes things faster. Also, it is actually correct
unlike the previous method.
2014-07-09 16:25:48 -07:00
browser up version to 0.1.26 2014-07-07 20:55:21 -07:00
examples ran js-beautify on all bitcore source 2014-06-23 10:57:02 -07:00
lib fix string/buffer sjcl issue 2014-07-09 16:25:48 -07:00
patches Cleanup main directory. 2014-04-13 13:14:27 -07:00
src Merge branch 'bip39' 2014-06-20 19:35:24 -07:00
test fix string/buffer sjcl issue 2014-07-09 16:25:48 -07:00
util ran js-beautify on all bitcore source 2014-06-23 10:57:02 -07:00
.coveralls.yml add coveralls 2014-06-05 16:43:07 -03:00
.gitattributes sets browser bundle a binary file 2014-05-13 10:50:38 -03:00
.gitignore add "real" 0.1.24 and 0.1.25, and... 2014-07-07 19:50:57 -07:00
.jshintrc tests work in browser and node 2014-02-04 16:37:34 -03:00
.travis.yml fix indentation 2014-06-19 15:32:58 -03:00
CONTRIBUTING.md add contributing.mdwq 2014-05-06 15:27:40 -03:00
Gruntfile.js add contributing.mdwq 2014-05-06 15:27:40 -03:00
LICENSE Update LICENSE 2014-02-07 21:08:22 -05:00
README.md modify README and commit examples.md 2014-07-07 16:26:41 -07:00
binding.gyp remove unbuilding c code, and ... 2014-06-20 19:09:21 -07:00
bitcore.js add BIP70 protobuf features in new PayPro lib file 2014-07-02 11:39:21 -07:00
bower.json up version to 0.1.26 2014-07-07 20:55:21 -07:00
buildsjcl.sh fix sjcl issue on npm install 2014-06-06 11:49:58 -07:00
config.js fix logger variable name 2014-01-14 15:59:38 -03:00
const.js ran js-beautify on all bitcore source 2014-06-23 10:57:02 -07:00
examples.md modify README and commit examples.md 2014-07-07 16:26:41 -07:00
gulpfile.js Added gulp task to concat /examples/*.js into ./examples.md 2014-06-25 22:30:29 +08:00
networks.js ran js-beautify on all bitcore source 2014-06-23 10:57:02 -07:00
package.json up version to 0.1.26 2014-07-07 20:55:21 -07:00

README.md

Bitcore

Build Status Coverage Status

A pure, powerful core for your bitcoin project.

Bitcore is a complete, native interface to the Bitcoin network, and provides the core functionality needed to develop apps for bitcoin.

#Principles

Bitcoin is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Bitcoin network allows for highly resilient bitcoin infrastructure, and the developer community needs reliable, open-source tools to implement bitcoin apps and services.

Bitcore unchains developers from fallible, centralized APIs, and provides the tools to interact with the real Bitcoin network.

#Get Started

Bitcore runs on node, and can be installed via npm:

npm install bitcore

It is a collection of objects useful to bitcoin applications; class-like idioms are enabled via Soop. In most cases, a developer will require the object's class directly. For instance:

var bitcore = require('bitcore');
var Address = bitcore.Address;
var Transaction = bitcore.Transaction;
var PeerManager = bitcore.PeerManager;

#Examples

Examples are provided here Build the examples by installing and running gulp:

npm install -g gulp
gulp

Javascript files available at /examples folder.

#Security

Please use at your own risk.

Bitcore is still under heavy development and not quite ready for "drop-in" production use. If you find a security issue, please email security@bitcore.io.

#Contributing

Bitcore needs some developer love. Please send pull requests for bug fixes, code optimization, and ideas for improvement.

#Browser support

Building the browser bundle

To build bitcore full bundle for the browser (this is automatically executed after you run npm install):

node browser/build.js -a

This will generate a browser/bundle.js file which you can include in your HTML to use bitcore in the browser.

##Example browser usage

From example/simple.html

<!DOCTYPE html>
<html>
  <body>
    <script src="../browser/bundle.js"></script>
    <script>
      var bitcore = require('bitcore');
      var Address = bitcore.Address;
      var a = new Address('1KerhGhLn3SYBEQwby7VyVMWf16fXQUj5d');
      console.log('1KerhGhLn3SYBEQwby7VyVMWf16fXQUj5d is valid? '+a.isValid());
    </script>
  </body>
</html>

You can check a more complex usage example at examples/example.html.

Generating a customized browser bundle

To build the main bitcore bundle, run:

node browser/build.js -m

To build all features into the bitcore bundle (which will lead to a large filesize), run:

node browser/build.js -a

To generate a customized bitcore bundle, you can specify which submodules you want to include in it with the -s option:

node browser/build.js -s Transaction,Address

This will generate a browser/bundle.js containing only the Transaction and Address class, with all their dependencies. Use this option if you are not using the whole bitcore library, to optimize the bundle size, script loading time, and general resource usage.

Tests

Run tests in node:

mocha

Or generate tests in the browser:

grunt shell

And then open test/index.html in your browser.

To run the code coverage report:

npm run-script coverage

And then open coverage/lcov-report/index.html in your browser.

#License

Code released under the MIT license.

Copyright 2013-2014 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.

Bitdeli Badge