Skip to content

Commit

Permalink
Add Groestlcoin (GRS) (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
HashEngineering authored and junderw committed Jan 6, 2020
1 parent dc3e6cc commit 8ef3560
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/coininfo.js
Expand Up @@ -10,6 +10,7 @@ var coins = [
require('./coins/dcr'),
require('./coins/dgb'),
require('./coins/doge'),
require('./coins/grs'),
require('./coins/ltc'),
require('./coins/via'),
require('./coins/mona'),
Expand Down
92 changes: 92 additions & 0 deletions lib/coins/grs.js
@@ -0,0 +1,92 @@
/*
info from:
https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp
*/

var common = {
name: 'Groestlcoin',
per1: 1e8,
unit: 'GRS',
messagePrefix: '\x1CGroestlCoin Signed Message:\n'
}

var main = Object.assign({}, {
hashGenesisBlock: '00000ac5927c594d49cc0bdb81759d0da8297eb614683d3acb62f0703b639023',
// nDefaultPort
port: 1331,
portRpc: 1441,
protocol: {
// pchMessageStart
magic: 0xd4b4bef9 // careful, sent over wire as little endian
},
bech32: 'grs',
// vSeeds
seedsDns: [
'dnsseed1.groestlcoin.org',
'dnsseed2.groestlcoin.org',
'dnsseed3.groestlcoin.org',
'dnsseed4.groestlcoin.org'
],
// base58Prefixes
versions: {
bip32: {
private: 0x0488ade4,
public: 0x0488b21e
},
bip44: 17,
private: 0x80,
public: 0x24,
scripthash: 0x05
}
}, common)

var test = Object.assign({}, {
hashGenesisBlock: '0x000000ffbb50fc9898cdd36ec163e6ba23230164c0052a28876255b7dcf2cd36',
port: 17777,
portRpc: 17766,
protocol: {
magic: 0x0709110b
},
bech32: 'tgrs',
seedsDns: [
'testnet-seed1.groestlcoin.org',
'testnet-seed2.groestlcoin.org'
],
versions: {
bip32: {
private: 0x04358394,
public: 0x043587cf
},
bip44: 1,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
}
}, common)

var regtest = Object.assign({}, {
hashGenesisBlock: '0x000000ffbb50fc9898cdd36ec163e6ba23230164c0052a28876255b7dcf2cd36',
port: 18888,
portRpc: 18443,
protocol: {
magic: 0xdab5bffa
},
bech32: 'grsrt',
seedsDns: [],
versions: {
bip32: {
private: 0x04358394,
public: 0x043587cf
},
bip44: 1,
private: 0xef,
public: 0x6f,
scripthash: 0xc4
}
}, common)

module.exports = {
main: main,
test: test,
regtest: regtest
}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -11,6 +11,7 @@
"bitcoin gold",
"litecoin",
"viacoin",
"groestlcoin",
"elliptic",
"curve",
"dogecoin",
Expand Down
1 change: 1 addition & 0 deletions test/coininfo.test.js
Expand Up @@ -10,6 +10,7 @@ test('+ coininfo()', function (t) {
'doge', 'doge-test',
'ltc', 'ltc-test',
'via', 'via-test',
'grs', 'grs-test',
'nbt',
'nmc',
'ppc',
Expand Down

0 comments on commit 8ef3560

Please sign in to comment.