Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bip44-constants #19

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules/
.DS_Store

.DS_Store
npm-debug.log
3 changes: 0 additions & 3 deletions .npmignore

This file was deleted.

13 changes: 5 additions & 8 deletions lib/coins/blk.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/*
info from:
https://github.com/rat4/blackcoin/blob/master/src/chainparams.cpp
*/

var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

// https://github.com/rat4/blackcoin/blob/master/src/chainparams.cpp

var common = {
name: 'BlackCoin',
name: 'Blackcoin',
per1: 1e8,
unit: 'BLK'
}
Expand All @@ -30,8 +28,7 @@ var main = assign({}, {
private: 0x0488ade4,
public: 0x0488b21e
},
// http://doc.satoshilabs.com/slips/slip-0044.html
bip44: 0xa,
bip44: bip44Constants.Blackcoin - 0x80000000,
private: 0x99,
public: 0x19,
scripthash: 0x55
Expand Down
8 changes: 4 additions & 4 deletions lib/coins/btc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

var common = {
name: 'Bitcoin',
Expand Down Expand Up @@ -34,8 +35,7 @@ var main = assign({}, {
private: 0x0488ade4,
public: 0x0488b21e
},
// http://doc.satoshilabs.com/slips/slip-0044.html
bip44: 0,
bip44: bip44Constants.Bitcoin - 0x80000000,
private: 0x80,
public: 0x00,
scripthash: 0x05
Expand All @@ -59,7 +59,7 @@ var test = assign({}, {
private: 0x04358394,
public: 0x043587cf
},
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
Expand All @@ -78,7 +78,7 @@ var regtest = assign({}, {
private: 0x04358394,
public: 0x043587cf
},
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
Expand Down
12 changes: 5 additions & 7 deletions lib/coins/dash.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/*
info from:
https://github.com/dashpay/dash/blob/master/src/chainparams.cpp
*/

var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

// https://github.com/dashpay/dash/blob/master/src/chainparams.cpp

var common = {
name: 'Dash',
Expand Down Expand Up @@ -31,7 +29,7 @@ var main = assign({}, {
private: 0x02FE52CC,
public: 0x02FE52F8
},
bip44: 5,
bip44: bip44Constants.Dash - 0x80000000,
private: 0xcc,
public: 0x4c,
scripthash: 0x10
Expand All @@ -54,7 +52,7 @@ var test = assign({}, {
private: 0x3a805837,
public: 0x3a8061a0
},
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xef,
public: 0x8b,
scripthash: 0x13
Expand Down
5 changes: 3 additions & 2 deletions lib/coins/doge.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

// https://github.com/dogecoin/dogecoin/blob/master/src/chainparams.cpp

Expand All @@ -23,7 +24,7 @@ var main = assign({}, {
private: 0x02fac398,
public: 0x02facafd
},
bip44: 3,
bip44: bip44Constants.Dogecoin - 0x80000000,
private: 0x9e,
public: 0x1e,
scripthash: 0x16
Expand All @@ -32,7 +33,7 @@ var main = assign({}, {

var test = assign({}, {
versions: {
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xf1,
public: 0x71,
scripthash: 0xc4
Expand Down
5 changes: 3 additions & 2 deletions lib/coins/ltc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

// https://github.com/litecoin-project/litecoin/blob/master-0.10/src/chainparams.cpp

Expand All @@ -24,7 +25,7 @@ var main = assign({}, {
private: 0x019d9cfe,
public: 0x019da462
},
bip44: 2,
bip44: bip44Constants.Litecoin - 0x80000000,
private: 0xb0,
public: 0x30,
scripthash: 0x05
Expand All @@ -33,7 +34,7 @@ var main = assign({}, {

var test = assign({}, {
versions: {
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
Expand Down
3 changes: 2 additions & 1 deletion lib/coins/nbt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

var common = {
name: 'NuBits',
Expand All @@ -23,7 +24,7 @@ var main = assign({}, {
private: 0x0488ade4,
public: 0x0488b21e
},
bip44: 12,
bip44: bip44Constants.NuBits - 0x80000000,
private: 0x96,
public: 0x19,
scripthash: 0x1a
Expand Down
4 changes: 2 additions & 2 deletions lib/coins/nmc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

var common = {
name: 'Namecoin',
Expand All @@ -7,8 +8,7 @@ var common = {

var main = assign({}, {
versions: {
// http://doc.satoshilabs.com/slips/slip-0044.html
bip44: 7,
bip44: bip44Constants.Namecoin - 0x80000000,
private: 0xb4,
public: 0x34,
scripthash: 0x05
Expand Down
3 changes: 2 additions & 1 deletion lib/coins/ppc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

var common = {
name: 'Peercoin',
Expand All @@ -7,7 +8,7 @@ var common = {

var main = assign({}, {
versions: {
bip44: 6,
bip44: bip44Constants.Peercoin - 0x80000000,
private: 0xc4,
public: 0x44,
scripthash: 0x05
Expand Down
7 changes: 4 additions & 3 deletions lib/coins/rdd.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
var assign = require('object-assign')
var bip44Constants = require('bip44-constants')

var common = {
name: 'ReddCoin',
name: 'Reddcoin',
unit: 'RDD'
}

var main = assign({}, {
versions: {
bip44: 4,
bip44: bip44Constants.Reddcoin - 0x80000000,
private: 0xbd,
public: 0x3d,
scripthash: 0x05
Expand All @@ -16,7 +17,7 @@ var main = assign({}, {

var test = assign({}, {
versions: {
bip44: 1,
bip44: bip44Constants.Testnet - 0x80000000,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
"type": "git"
},
"main": "./lib/coininfo.js",
"files": [
"lib"
],
"scripts": {
"lint": "standard",
"test": "npm run lint && npm run unit",
"unit": "mocha"
},
"dependencies": {
"bip44-constants": "^2.1.0",
"object-assign": "^4.0.1"
}
}