diff --git a/docs/examples.md b/docs/examples.md index 2e659c5..e774f4b 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -14,7 +14,8 @@ var address = privKey.toAddress(); ## Create a Multisig Address ``` -??? +// Build a 2-of-3 address from public keys +var P2SHAddress = new bitcore.Address([publicKey1, publicKey2, publicKey3], 2); ``` ## Request a Payment @@ -28,7 +29,11 @@ var uri = new bitcore.URI(paymentInfo).toString(); ## Create a transaction ``` -??? +var transaction = new Transaction() + .from(utxos) // Feed information about what unspend outputs one can use + .to(address, amount) // Add an output with the given amount of satoshis + .change(address) // Sets up a change address where the rest of the funds will go + .sign(privkeySet) // Signs all the inputs it can ``` ## Connect to the network diff --git a/docs/helpers/Crypto.md b/docs/helpers/Crypto.md index 858e769..8dee79c 100644 --- a/docs/helpers/Crypto.md +++ b/docs/helpers/Crypto.md @@ -2,7 +2,7 @@ ## Description -The cryptographic primitives (ECDSA and HMAC) implementations in this package have been audited bythe BitPay engineering team. More review and certifications are always welcomed. +The cryptographic primitives (ECDSA and HMAC) implementations in this package have been reviewed by the BitPay engineering team. More audits and reviews are welcomed. ## Random diff --git a/docs/helpers/URI.md b/docs/helpers/URI.md index 33c03a0..719d51e 100644 --- a/docs/helpers/URI.md +++ b/docs/helpers/URI.md @@ -30,7 +30,7 @@ See [the official BIP21 spec](https://github.com/bitcoin/bips/blob/master/bip-00 ## Create URI -Another important usecase for the `URI` class is creating a bitcoin URI for sharing a payment request. That can be acomplished by using a dictionary to create an instance of URI. +Another important use case for the `URI` class is creating a bitcoin URI for sharing a payment request. That can be accomplished by using a dictionary to create an instance of URI. The code for creating an URI from an Object looks like this: ```javascript diff --git a/docs/helpers/Unit.md b/docs/helpers/Unit.md index 05d4ea9..b6684d2 100644 --- a/docs/helpers/Unit.md +++ b/docs/helpers/Unit.md @@ -18,7 +18,7 @@ var satsCode = Unit.satoshis; ## Creating units -There are two ways for creating a unit instance. You can instanciate the class using a value and a unit code; alternatively if the unit it's fixed you could you some of the static methods. Check some examples below: +There are two ways for creating a unit instance. You can instantiate the class using a value and a unit code; alternatively if the unit it's fixed you could you some of the static methods. Check some examples below: ```javascript var unit; diff --git a/docs/models/Transaction.md b/docs/models/Transaction.md index b85cc24..3869bc3 100644 --- a/docs/models/Transaction.md +++ b/docs/models/Transaction.md @@ -2,7 +2,7 @@ ## Description -Bitcore provides a very simple API for creating transactions. We expect this API to be accessible for developers without knowing the working internals of bitcoin in deep. What follows is a small introduction to transactions with some basic knowledge required to use this API. +Bitcore provides a very simple API for creating transactions. We expect this API to be accessible for developers without knowing the working internals of bitcoin in deep detail. What follows is a small introduction to transactions with some basic knowledge required to use this API. A Transaction contains a set of inputs and a set of outputs. Each input contains a reference to another transaction's output, and a signature that allows the value referenced in that ouput to be used in this transaction.