把大多数ticc方法的参数类型统一为 { ... } 对象
This commit is contained in:
3
btc.js
3
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: {
|
||||
|
||||
Reference in New Issue
Block a user