From 5b08d728763ed967ef08ec8ba3c6d787d00407d1 Mon Sep 17 00:00:00 2001 From: Rob Riddle Date: Thu, 22 Oct 2015 18:34:31 +0300 Subject: [PATCH] Fix typos in documentation --- CONTRIBUTING.md | 2 +- docs/transaction.md | 4 ++-- lib/block/blockheader.js | 2 +- lib/hdprivatekey.js | 2 +- lib/script/script.js | 12 ++++++------ lib/transaction/transaction.js | 2 +- lib/transaction/unspentoutput.js | 2 +- lib/uri.js | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5bdadfe..b550cd9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,7 +97,7 @@ When possible, bitcore objects should have standard methods on an instance proto * `toBuffer` - A hex Buffer These should have a matching static method that can be used for instantiation: -* `fromObject` - Should be able to instatiate with the output from `toObject/toJSON` +* `fromObject` - Should be able to instantiate with the output from `toObject/toJSON` * `fromString` - Should be able to instantiate with output from `toString` * `fromBuffer` - Should likewise be able to instantiate from output from `toBuffer` diff --git a/docs/transaction.md b/docs/transaction.md index 9fb7833..91c5db7 100644 --- a/docs/transaction.md +++ b/docs/transaction.md @@ -131,7 +131,7 @@ There are a series of methods used for serialization: - `toJSON`: Will be called when using `JSON.stringify` to return JSON-encoded string using the output from `toObject`. - `toString` or `uncheckedSerialize`: Returns an hexadecimal serialization of the transaction, in the [serialization format for bitcoin](https://bitcoin.org/en/developer-reference#raw-transaction-format). - `serialize`: Does a series of checks before serializing the transaction -- `inspect`: Returns a string with some information about the transaction (currently a string formated as ``, that only shows the serialized value of the transaction. +- `inspect`: Returns a string with some information about the transaction (currently a string formatted as ``, that only shows the serialized value of the transaction. - `toBuffer`: Serializes the transaction for sending over the wire in the bitcoin network - `toBufferWriter`: Uses an already existing BufferWriter to copy over the serialized transaction @@ -174,4 +174,4 @@ console.log(transaction.getLockTime()); ``` ## Upcoming changes -We're debating an API for Merge Avoidance, CoinJoin, Smart contracts, CoinSwap, and Stealth Addresses. We're expecting to have all of them by some time in 2015. Payment channel creation is avaliable in the [bitcore-channel](https://github.com/bitpay/bitcore-channel) module. +We're debating an API for Merge Avoidance, CoinJoin, Smart contracts, CoinSwap, and Stealth Addresses. We're expecting to have all of them by some time in 2015. Payment channel creation is available in the [bitcore-channel](https://github.com/bitpay/bitcore-channel) module. diff --git a/lib/block/blockheader.js b/lib/block/blockheader.js index 2683ad1..d79a984 100644 --- a/lib/block/blockheader.js +++ b/lib/block/blockheader.js @@ -281,7 +281,7 @@ BlockHeader.prototype.validProofOfWork = function validProofOfWork() { }; /** - * @returns {string} - A string formated for the console + * @returns {string} - A string formatted for the console */ BlockHeader.prototype.inspect = function inspect() { return ''; diff --git a/lib/hdprivatekey.js b/lib/hdprivatekey.js index 6f95211..3826e0b 100644 --- a/lib/hdprivatekey.js +++ b/lib/hdprivatekey.js @@ -128,7 +128,7 @@ HDPrivateKey._getDerivationIndexes = function(path) { }; /** - * Get a derivated child based on a string or number. + * Get a derived child based on a string or number. * * If the first argument is a string, it's parsed as the full path of * derivation. Valid values for this argument include "m" (which returns the diff --git a/lib/script/script.js b/lib/script/script.js index 07a2746..f6b8edb 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -538,7 +538,7 @@ Script.prototype.isStandard = function() { /** * Adds a script element at the start of the script. - * @param {*} obj a string, number, Opcode, Bufer, or object to add + * @param {*} obj a string, number, Opcode, Buffer, or object to add * @returns {Script} this script instance */ Script.prototype.prepend = function(obj) { @@ -571,7 +571,7 @@ Script.prototype.equals = function(script) { /** * Adds a script element to the end of the script. * - * @param {*} obj a string, number, Opcode, Bufer, or object to add + * @param {*} obj a string, number, Opcode, Buffer, or object to add * @returns {Script} this script instance * */ @@ -788,7 +788,7 @@ Script.buildScriptHashOut = function(script) { /** * Builds a scriptSig (a script for an input) that signs a public key output script. * - * @param {Signature|Buffer} signature - a Signature object, or the signature in DER cannonical encoding + * @param {Signature|Buffer} signature - a Signature object, or the signature in DER canonical encoding * @param {number=} sigtype - the type of the signature (defaults to SIGHASH_ALL) */ Script.buildPublicKeyIn = function(signature, sigtype) { @@ -810,7 +810,7 @@ Script.buildPublicKeyIn = function(signature, sigtype) { * output script. * * @param {Buffer|string|PublicKey} publicKey - * @param {Signature|Buffer} signature - a Signature object, or the signature in DER cannonical encoding + * @param {Signature|Buffer} signature - a Signature object, or the signature in DER canonical encoding * @param {number=} sigtype - the type of the signature (defaults to SIGHASH_ALL) */ Script.buildPublicKeyHashIn = function(publicKey, signature, sigtype) { @@ -927,7 +927,7 @@ Script.prototype.toAddress = function(network) { }; /** - * Analagous to bitcoind's FindAndDelete. Find and delete equivalent chunks, + * Analogous to bitcoind's FindAndDelete. Find and delete equivalent chunks, * typically used with push data chunks. Note that this will find and delete * not just the same data, but the same data with the same push data op as * produced by default. i.e., if a pushdata in a tx does not use the minimal @@ -984,7 +984,7 @@ Script.prototype.checkMinimalPush = function(i) { }; /** - * Comes from bitcoind's script DecodOP_N function + * Comes from bitcoind's script DecodeOP_N function * @param {number} opcode * @returns {number} numeric value in range of 0 to 16 */ diff --git a/lib/transaction/transaction.js b/lib/transaction/transaction.js index e5feb6f..03875b7 100644 --- a/lib/transaction/transaction.js +++ b/lib/transaction/transaction.js @@ -1180,7 +1180,7 @@ Transaction.prototype.verify = function() { }; /** - * Analagous to bitcoind's IsCoinBase function in transaction.h + * Analogous to bitcoind's IsCoinBase function in transaction.h */ Transaction.prototype.isCoinbase = function() { return (this.inputs.length === 1 && this.inputs[0].isNull()); diff --git a/lib/transaction/unspentoutput.js b/lib/transaction/unspentoutput.js index 8ccbc98..801a8fc 100644 --- a/lib/transaction/unspentoutput.js +++ b/lib/transaction/unspentoutput.js @@ -84,7 +84,7 @@ UnspentOutput.fromObject = function(data) { }; /** - * Returns a plain object (no prototype or methods) with the associated infor for this output + * Returns a plain object (no prototype or methods) with the associated info for this output * @return {object} */ UnspentOutput.prototype.toObject = UnspentOutput.prototype.toJSON = function toObject() { diff --git a/lib/uri.js b/lib/uri.js index 8dc59c0..912a0c3 100644 --- a/lib/uri.js +++ b/lib/uri.js @@ -11,7 +11,7 @@ var Unit = require('./unit'); * * Instantiate an URI from a bitcoin URI String or an Object. An URI instance * can be created with a bitcoin uri string or an object. All instances of - * URI are valid, the static method isValid allows checking before instanciation. + * URI are valid, the static method isValid allows checking before instantiation. * * All standard parameters can be found as members of the class, the address * is represented using an {Address} instance and the amount is represented in