diff --git a/btc.js b/btc.js index 7167d40..4cea30b 100644 --- a/btc.js +++ b/btc.js @@ -10,7 +10,8 @@ const BTC_TXFEE = 30 class BTC { constructor (privateKey) { - if (!ticc.is_seckey(privateKey)) throw new Error('Invalid PrivateKey') + if (!ticc.is_seckey({ seckey: privateKey })) + throw new Error('Invalid PrivateKey') var publicKey = ticc.seckey_to_pubkey(privateKey) Object.defineProperties(this, { privateKey: { diff --git a/tic.js b/tic.js index 5f7bd98..396bc0a 100644 --- a/tic.js +++ b/tic.js @@ -8,7 +8,7 @@ const TIC_NODE = require('./netConfig').TIC_NODE class TIC { constructor (seckey, option = {}) { - if (!seckey || !ticc.is_seckey(seckey)) throw 'ERROR:Invalid Seckey' + if (!seckey || !ticc.is_seckey({ seckey })) throw 'ERROR:Invalid Seckey' Object.defineProperties(this, { seckey: { value: seckey,