From ed9a9f6da9c4eb65e361ea327d3eaec27e238ef1 Mon Sep 17 00:00:00 2001 From: Esteban Ordano Date: Tue, 16 Dec 2014 03:29:52 -0300 Subject: [PATCH] Fix wrong jsdocs --- gulpfile.js | 8 ++++++-- lib/publickey.js | 2 +- lib/script.js | 4 ++-- lib/transaction/input/publickeyhash.js | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f42ec6e..297e0b8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -78,10 +78,14 @@ gulp.task('coverage', shell.task(['istanbul cover _mocha -- --recursive'])); gulp.task('jsdoc', function() { return gulp.src(files.concat([jsdocReadme])) - .pipe(jsdoc.parser()) + .pipe(jsdoc.parser({ + name: 'bitcore', + version: '0.8.0', + description: 'API Reference for the bitcore bitcoin javascript library' + })) .pipe(jsdoc.generator('./apiref', { path: 'ink-docstrap', - theme: 'flatly', + theme: 'journal' })); }); diff --git a/lib/publickey.js b/lib/publickey.js index 87ce266..58e51b7 100644 --- a/lib/publickey.js +++ b/lib/publickey.js @@ -262,7 +262,7 @@ PublicKey.fromDER = PublicKey.fromBuffer = function(buf, strict) { * Instantiate a PublicKey from a Point * * @param {Point} point - A Point instance - * @param {boolean=true} compressed - whether to store this public key as compressed format + * @param {boolean=} compressed - whether to store this public key as compressed format * @returns {PublicKey} A new valid instance of PublicKey */ PublicKey.fromPoint = function(point, compressed) { diff --git a/lib/script.js b/lib/script.js index 073be1d..27ea4b8 100644 --- a/lib/script.js +++ b/lib/script.js @@ -551,7 +551,7 @@ Script.buildMultisigOut = function(pubkeys, m, opts) { * @param {number} threshold amount of required signatures to spend the output * @param {Array} signatures signatures to append to the script * @param {Object=} opts - * @param {boolean=false} opts.noSorting don't sort the given public keys before creating the script + * @param {boolean=} opts.noSorting don't sort the given public keys before creating the script (false by default) * @param {Script=} opts.cachedMultisig don't recalculate the redeemScript * * @returns Script @@ -632,7 +632,7 @@ Script.buildScriptHashOut = function(script) { * * @param {Buffer|string|PublicKey} publicKey * @param {Buffer} signature - the signature in DER cannonical encoding - * @param {number=1} sigtype - the type of the signature (defaults to SIGHASH_ALL) + * @param {number=} sigtype - the type of the signature (defaults to SIGHASH_ALL) */ Script.buildPublicKeyHashIn = function(publicKey, signature, sigtype) { var script = new Script() diff --git a/lib/transaction/input/publickeyhash.js b/lib/transaction/input/publickeyhash.js index f43400a..e177391 100644 --- a/lib/transaction/input/publickeyhash.js +++ b/lib/transaction/input/publickeyhash.js @@ -25,7 +25,7 @@ inherits(PublicKeyHashInput, Input); * @param {Transaction} transaction - the transaction to be signed * @param {PrivateKey} privateKey - the private key with which to sign the transaction * @param {number} index - the index of the input in the transaction input vector - * @param {number=Singature.SIGHASH_ALL} sigtype - the type of signature + * @param {number=} sigtype - the type of signature, defaults to Signature.SIGHASH_ALL * @param {Buffer=} hashData - the precalculated hash of the public key associated with the privateKey provided * @return {Array} of objects that can be */ @@ -54,7 +54,7 @@ PublicKeyHashInput.prototype.getSignatures = function(transaction, privateKey, i * @param {Object} signature * @param {PublicKey} signature.publicKey * @param {Signature} signature.signature - * @param {number=Signature.SIGHASH_ALL} signature.sigtype + * @param {number=} signature.sigtype * @return {PublicKeyHashInput} this, for chaining */ PublicKeyHashInput.prototype.addSignature = function(transaction, signature) {