A pure, powerful core for your groestlcoin project.
Groestlcore is a complete, native interface to the Groestlcoin network, and provides the core functionality needed to develop apps for groestlcoin.
#Principles
Groestlcoin is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Groestlcoin network allows for highly resilient groestlcoin infrastructure, and the developer community needs reliable, open-source tools to implement groestlcoin apps and services.
Groestlcore unchains developers from fallible, centralized APIs, and provides the tools to interact with the real Groestlcoin network.
#Get Started
Groestlcore runs on node, and can be installed via npm:
It is a collection of objects useful to groestlcoin 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('groestlcore'); 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:
Javascript files available at /examples folder.
#Security
Please use at your own risk.
Groestlcore is still under heavy development and not quite ready for "drop-in" production use. If you find a security issue, please email security@groestlcore.io.
#Contributing
Groestlcore 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 groestlcore full bundle for the browser (this is automatically executed after you run npm install):
This will generate a browser/bundle.js file which you can include in your HTML to use groestlcore in the browser.
##Example browser usage
From example/simple.html
<!DOCTYPE html> <html> <body> <script src="../browser/bundle.js"></script> <script> var bitcore = require('groestlcore'); 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 groestlcore bundle, run:
To build all features into the groestlcore bundle (which will lead to a large filesize), run:
To generate a customized groestlcore bundle, you can specify which submodules you want to include in it with the -s option:
node browser/build.js -s lib/Transaction,lib/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 groestlcore library, to optimize the bundle size, script loading time, and general resource usage.
Tests
Run tests in node:
Or generate tests in the browser:
And then open test/index.html in your browser.
To run the code coverage report:
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.
