Skip to content

Commit b1bb901

Browse files
committed
made parameters in bitcore-lib optional to prevent typescript import errors
1 parent a99f167 commit b1bb901

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/bitcore-lib/lib/address.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ Address.getValidationError = function(data, network, type) {
593593
*
594594
* @param {string} data - The encoded data
595595
* @param {String|Network} network - either a Network instance, 'livenet', or 'testnet'
596-
* @param {string} type - The type of address: 'script' or 'pubkey'
596+
* @param {string} [type] - The type of address: 'script' or 'pubkey'
597597
* @returns {boolean} The corresponding error message
598598
*/
599599
Address.isValid = function(data, network, type) {

packages/bitcore-lib/lib/privatekey.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const TaggedHash = require('./crypto/taggedhash');
3030
* var imported = PrivateKey.fromWIF(exported);
3131
* ```
3232
*
33-
* @param {string} data - The encoded data in various formats
34-
* @param {Network|string=} network - a {@link Network} object, or a string with the network name
33+
* @param {string} [data] - The encoded data in various formats
34+
* @param {Network|string=} [network] - a {@link Network} object, or a string with the network name
3535
* @returns {PrivateKey} A new valid instance of an PrivateKey
3636
* @constructor
3737
*/

packages/bitcore-lib/lib/publickey.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ const TaggedHash = require('./crypto/taggedhash');
2727
* var imported = PublicKey.fromString(exported);
2828
* ```
2929
*
30-
* @param {string} data - The encoded data in various formats
31-
* @param {Object} extra - additional options
30+
* @param {string|PrivateKey} [data] - The encoded data in various formats
31+
* @param {Object} [extra] - additional options
3232
* @param {Network=} extra.network - Which network should the address for this public key be for
3333
* @param {String=} extra.compressed - If the public key is compressed
3434
* @returns {PublicKey} A new valid instance of an PublicKey

0 commit comments

Comments
 (0)