Fix typos in documentation

This commit is contained in:
Rob Riddle 2015-10-22 18:34:31 +03:00
parent 4f8a744521
commit 5b08d72876
8 changed files with 14 additions and 14 deletions

View File

@ -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`

View File

@ -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 `<Transaction 000...000>`, that only shows the serialized value of the transaction.
- `inspect`: Returns a string with some information about the transaction (currently a string formatted as `<Transaction 000...000>`, 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.

View File

@ -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 '<BlockHeader ' + this.id + '>';

View File

@ -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

View File

@ -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
*/

View File

@ -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());

View File

@ -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() {

View File

@ -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