rename seckey_to_pubkey to prikey_to_pubkey
This commit is contained in:
6
btc.js
6
btc.js
@@ -10,9 +10,9 @@ const BTC_TXFEE = 30
|
||||
|
||||
class BTC {
|
||||
constructor (privateKey) {
|
||||
if (!ticc.is_seckey({ prikey: privateKey }))
|
||||
if (!ticc.is_prikey({ prikey: privateKey }))
|
||||
throw new Error('Invalid PrivateKey')
|
||||
var publicKey = ticc.seckey_to_pubkey(privateKey)
|
||||
var publicKey = ticc.prikey_to_pubkey(privateKey)
|
||||
Object.defineProperties(this, {
|
||||
privateKey: {
|
||||
enumerable: true,
|
||||
@@ -22,7 +22,7 @@ class BTC {
|
||||
publicKey: {
|
||||
enumerable: true,
|
||||
writable: false,
|
||||
value: ticc.seckey_to_pubkey({ prikey: privateKey, coin: 'BTC' })
|
||||
value: ticc.prikey_to_pubkey({ prikey: privateKey, coin: 'BTC' })
|
||||
},
|
||||
address: {
|
||||
enumerable: true,
|
||||
|
||||
Reference in New Issue
Block a user