Skip to content
Browse files

intial commit

  • Loading branch information...
0 parents commit 4f25eeb3bd996d3be39cc809fe3380b22e0f189b @jprichardson jprichardson committed
Showing with 96 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +5 −0 .npmignore
  3. +53 −0 README.md
  4. +26 −0 lib/address.js
  5. +7 −0 test/address.test.js
  6. +3 −0 test/mocha.opts
2 .gitignore
@@ -0,0 +1,2 @@
+node_modules/
+.DS_Store
5 .npmignore
@@ -0,0 +1,5 @@
+.gitignore
+test/
+.DS_Store
+component.json
+bower.json
53 README.md
@@ -0,0 +1,53 @@
+Bitcoin Address
+===============
+
+JavaScript component to handle Bitcoin addresses.
+
+AMD/CommonJS compatible.
+
+See this article for more details: [bitcoin address](http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript).
+
+
+Install
+-------
+
+### Node.js/Browserify
+
+ npm install --save cryptocoin-address-btc
+
+### Component
+
+ component install cryptocoinjs/address-btc
+
+
+### Bower
+
+ bower install cryptocoin-address-btc
+
+
+### Script
+
+```html
+<script src="/path/to/address-btc.js"></script>
+```
+
+
+Usage
+-----
+
+http://procbits.com/2013/08/27/generating-a-bitcoin-address-with-javascript
+
+
+Credits
+-------
+
+Most of the code from Stefan Thomas in https://github.com/bitcoinjs/bitcoinjs-lib with modifications from Roman Shtylman
+
+
+License
+-------
+
+(MIT License)
+
+Copyright 2013, JP Richardson <jprichardson@gmail.com>
+
26 lib/address.js
@@ -0,0 +1,26 @@
+!function(globals) {
+'use strict'
+
+
+//*** UMD BEGIN
+if (typeof define !== 'undefined' && define.amd) { //require.js / AMD
+ define(['cryptocoin-bigint'], function(_BigInteger) {
+ BigInteger = _BigInteger
+ return base58
+ })
+} else if (typeof module !== 'undefined' && module.exports) { //CommonJS
+ try { //Node.js
+ BigInteger = require('cryptocoin-bigint')
+ } catch (e) { //Component
+ BigInteger = require('bigint')
+ }
+ module.exports = base58
+} else {
+ BigInteger = globals.BigInteger
+ globals.base58 = base58
+}
+//*** UMD END
+
+
+
+}(this);
7 test/address.test.js
@@ -0,0 +1,7 @@
+
+
+require('terst')
+
+
+
+
3 test/mocha.opts
@@ -0,0 +1,3 @@
+--ui bdd
+--reporter spec
+--timeout 2000

0 comments on commit 4f25eeb

Please sign in to comment.
Something went wrong with that request. Please try again.