add support for EXT coin
This commit is contained in:
parent
4f23d79919
commit
45f748afb6
10
index.js
10
index.js
@ -27,7 +27,7 @@ my.OUTPUT_LIST = ['hex', 'latin1', 'base64'] // or 'buf' to Buffer explicitly
|
|||||||
my.INPUT = 'utf8' // 默认的加密方法的明文格式。utf8 能够兼容 latin1, ascii 的情形
|
my.INPUT = 'utf8' // 默认的加密方法的明文格式。utf8 能够兼容 latin1, ascii 的情形
|
||||||
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', 'EXT', 'BTC', 'ETH']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -432,6 +432,9 @@ class TICrypto {
|
|||||||
case 'ETH':
|
case 'ETH':
|
||||||
key = hdmaster.derive("m/44'/60'/0'/0/0")
|
key = hdmaster.derive("m/44'/60'/0'/0/0")
|
||||||
break
|
break
|
||||||
|
case 'EXT':
|
||||||
|
key = hdmaster.derive("m/44'/60398'/0'/0/0")
|
||||||
|
break
|
||||||
case 'TIC':
|
case 'TIC':
|
||||||
default:
|
default:
|
||||||
key = hdmaster.derive("m/44'/60000'/0'/0/0")
|
key = hdmaster.derive("m/44'/60000'/0'/0/0")
|
||||||
@ -478,10 +481,11 @@ class TICrypto {
|
|||||||
return `m/44'/0'/${path}`
|
return `m/44'/0'/${path}`
|
||||||
case 'ETH':
|
case 'ETH':
|
||||||
return `m/44'/60'/${path}`
|
return `m/44'/60'/${path}`
|
||||||
|
case 'EXT':
|
||||||
|
return `m/44'/60398'/${path}`
|
||||||
case 'TIC':
|
case 'TIC':
|
||||||
return `m/44'/60000'/${path}`
|
|
||||||
default:
|
default:
|
||||||
return ''
|
return `m/44'/60000'/${path}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user