From 99ea30b626a7858446f4c6210b5812e78b8a0331 Mon Sep 17 00:00:00 2001 From: Tom Wang Date: Fri, 21 Aug 2020 12:04:40 +0800 Subject: [PATCH] mod: params name --- README.md | 4 ++-- README_CN.md | 12 ++++++------ lib/base/address.class.js | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 450cbfb..31a6208 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,9 @@ let hd = hdAddress.HD(base58,hdAddress.keyType.base58) hd.BTC.getCoinKeyPair(index, account, change) hd.ETH.getCoinAddressKeyPair(index, account, change) hd.TRX.getAddress(index, account, change) -hd.LTC.getAddressByPath(hdPath) // m/account'/change/address_index +hd.LTC.getAddressByPath(hdPath) hd.BCH.getAddressByPrivateKey(privateKey) -hd.BTC_TEST.getAddressByPublicKey(privateKey) +hd.BTC_TEST.getAddressByPublicKey(publicKey) ``` ## Example ### Initialization diff --git a/README_CN.md b/README_CN.md index 2dc8d34..ded4fb3 100644 --- a/README_CN.md +++ b/README_CN.md @@ -52,12 +52,12 @@ let hd = hdAddress.HD(seed,hdAddress.keyType.seed) let hd = hdAddress.HD(base58,hdAddress.keyType.base58) // 获得 HD钱包的对应的币种地址信息 -hd.BTC.getCoinKeyPair(index, account, change) -hd.ETH.getCoinAddressKeyPair(index, account, change) -hd.TRX.getAddress(index, account, change) -hd.LTC.getAddressByPath(hdPath) // m/account'/change/address_index -hd.BCH.getAddressByPrivateKey(privateKey) -hd.BTC_TEST.getAddressByPublicKey(privateKey) +hd.BTC.getCoinKeyPair(index, account, change) //获取私钥信息 +hd.ETH.getCoinAddressKeyPair(index, account, change) //获取私钥信息,地址信息 +hd.TRX.getAddress(index, account, change) // 索引生成地址 +hd.LTC.getAddressByPath(hdPath) // 路径生成地址 +hd.BCH.getAddressByPrivateKey(privateKey) // 私钥生成地址 +hd.BTC_TEST.getAddressByPublicKey(publicKey) // 公钥生成地址 ``` ## Example ### 初始化 diff --git a/lib/base/address.class.js b/lib/base/address.class.js index 4f7d728..f745580 100644 --- a/lib/base/address.class.js +++ b/lib/base/address.class.js @@ -31,7 +31,7 @@ module.exports = class Address { console.log(this.coin, "Please implement getAddressByPrivateKey method") } - getAddressByPublicKey(privateKey) { + getAddressByPublicKey(publicKey) { console.log(this.coin, "Please implement getAddressByPublicKey method") }