[index.js] set BTC address type default to mainnet
This commit is contained in:
parent
d3277971ad
commit
2b86f3721d
3
index.js
3
index.js
@ -22,6 +22,7 @@ my.INPUT='utf8' // 默认的加密方法的明文格式。utf8 能够兼容 lati
|
|||||||
my.INPUT_LIST=['utf8', 'ascii', 'latin1'] // ignored for Buffer/TypedArray/DataView
|
my.INPUT_LIST=['utf8', 'ascii', 'latin1'] // ignored for Buffer/TypedArray/DataView
|
||||||
my.COIN='TIC' // 默认的币种
|
my.COIN='TIC' // 默认的币种
|
||||||
my.COIN_LIST=['TIC','BTC','ETH']
|
my.COIN_LIST=['TIC','BTC','ETH']
|
||||||
|
my.CHAINNET='mainnet' // 默认的链网
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
hash:function(data, option){ // data can be anything, but converts to string or remains be Buffer/TypedArray/DataView
|
hash:function(data, option){ // data can be anything, but converts to string or remains be Buffer/TypedArray/DataView
|
||||||
@ -272,7 +273,7 @@ module.exports = {
|
|||||||
case 'mainnet': prefix='00'; break; // 1
|
case 'mainnet': prefix='00'; break; // 1
|
||||||
case 'testnet': prefix='6f'; break; // m or n
|
case 'testnet': prefix='6f'; break; // m or n
|
||||||
case 'p2sh': prefix='05'; break; // 3
|
case 'p2sh': prefix='05'; break; // 3
|
||||||
default: prefix='6f'
|
default: prefix='00'
|
||||||
}
|
}
|
||||||
}else { // 目前不支持 ETH或其他币种 地址转换,因为这会大量增加前端打包的js。
|
}else { // 目前不支持 ETH或其他币种 地址转换,因为这会大量增加前端打包的js。
|
||||||
return null
|
return null
|
||||||
|
Loading…
Reference in New Issue
Block a user