networks: s/magicPrefix/messagePrefix, adds magic constant
This commit is contained in:
parent
886d38ebee
commit
6a551d9e1e
1 changed files with 19 additions and 9 deletions
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
var networks = {
|
var networks = {
|
||||||
bitcoin: {
|
bitcoin: {
|
||||||
magicPrefix: '\x18Bitcoin Signed Message:\n',
|
magic: 0xd9b4bef9,
|
||||||
|
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
|
@ -16,7 +17,8 @@ var networks = {
|
||||||
estimateFee: estimateFee('bitcoin')
|
estimateFee: estimateFee('bitcoin')
|
||||||
},
|
},
|
||||||
testnet: {
|
testnet: {
|
||||||
magicPrefix: '\x18Bitcoin Signed Message:\n',
|
magic: 0xd9b4bef9,
|
||||||
|
messagePrefix: '\x18Bitcoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587cf,
|
public: 0x043587cf,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
|
@ -29,7 +31,8 @@ var networks = {
|
||||||
estimateFee: estimateFee('testnet')
|
estimateFee: estimateFee('testnet')
|
||||||
},
|
},
|
||||||
litecoin: {
|
litecoin: {
|
||||||
magicPrefix: '\x19Litecoin Signed Message:\n',
|
magic: 0xd9b4bef9,
|
||||||
|
messagePrefix: '\x19Litecoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x019da462,
|
public: 0x019da462,
|
||||||
private: 0x019d9cfe
|
private: 0x019d9cfe
|
||||||
|
@ -43,7 +46,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('litecoin')
|
estimateFee: estimateFee('litecoin')
|
||||||
},
|
},
|
||||||
dogecoin: {
|
dogecoin: {
|
||||||
magicPrefix: '\x19Dogecoin Signed Message:\n',
|
messagePrefix: '\x19Dogecoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x02facafd,
|
public: 0x02facafd,
|
||||||
private: 0x02fac398
|
private: 0x02fac398
|
||||||
|
@ -57,7 +60,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('dogecoin')
|
estimateFee: estimateFee('dogecoin')
|
||||||
},
|
},
|
||||||
viacoin: {
|
viacoin: {
|
||||||
magicPrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
|
@ -71,7 +74,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('viacoin')
|
estimateFee: estimateFee('viacoin')
|
||||||
},
|
},
|
||||||
viacointestnet: {
|
viacointestnet: {
|
||||||
magicPrefix: '\x18Viacoin Signed Message:\n',
|
messagePrefix: '\x18Viacoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x043587cf,
|
public: 0x043587cf,
|
||||||
private: 0x04358394
|
private: 0x04358394
|
||||||
|
@ -85,7 +88,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('viacointestnet')
|
estimateFee: estimateFee('viacointestnet')
|
||||||
},
|
},
|
||||||
gamerscoin: {
|
gamerscoin: {
|
||||||
magicPrefix: '\x19Gamerscoin Signed Message:\n',
|
messagePrefix: '\x19Gamerscoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x019da462,
|
public: 0x019da462,
|
||||||
private: 0x019d9cfe
|
private: 0x019d9cfe
|
||||||
|
@ -99,7 +102,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('gamerscoin')
|
estimateFee: estimateFee('gamerscoin')
|
||||||
},
|
},
|
||||||
jumbucks: {
|
jumbucks: {
|
||||||
magicPrefix: '\x19Jumbucks Signed Message:\n',
|
messagePrefix: '\x19Jumbucks Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x037a689a,
|
public: 0x037a689a,
|
||||||
private: 0x037a6460
|
private: 0x037a6460
|
||||||
|
@ -113,7 +116,7 @@ var networks = {
|
||||||
estimateFee: estimateFee('jumbucks')
|
estimateFee: estimateFee('jumbucks')
|
||||||
},
|
},
|
||||||
zetacoin: {
|
zetacoin: {
|
||||||
magicPrefix: '\x18Zetacoin Signed Message:\n',
|
messagePrefix: '\x18Zetacoin Signed Message:\n',
|
||||||
bip32: {
|
bip32: {
|
||||||
public: 0x0488b21e,
|
public: 0x0488b21e,
|
||||||
private: 0x0488ade4
|
private: 0x0488ade4
|
||||||
|
@ -146,4 +149,11 @@ function estimateFee (type) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: 1.5.3 compatibility patch(s)
|
||||||
|
for (var networkName in networks) {
|
||||||
|
var network = networks[networkName]
|
||||||
|
|
||||||
|
network.magicPrefix = network.messagePrefix
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = networks
|
module.exports = networks
|
||||||
|
|
Loading…
Reference in a new issue