From 86819a8f6d433b4f6e50547133504e0a7906b50a Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 19 Jan 2015 16:57:48 -0500 Subject: [PATCH 1/3] Moved documentation from docs/guide to docs directory, in preparation for combined submodule documentation. --- docs/README.md | 4 --- docs/{guide => }/address.md | 0 docs/api/index.md | 56 ------------------------------- docs/{guide => }/block.md | 0 docs/{guide => }/browser.md | 0 docs/{guide => }/crypto.md | 0 docs/{guide => }/encoding.md | 0 docs/{guide => }/hierarchical.md | 0 docs/{guide => }/index.md | 0 docs/{guide => }/networks.md | 0 docs/{guide => }/privatekey.md | 0 docs/{guide => }/publickey.md | 0 docs/{guide => }/script.md | 0 docs/{guide => }/transaction.md | 0 docs/{guide => }/unit.md | 0 docs/{guide => }/unspentoutput.md | 0 docs/{guide => }/uri.md | 0 17 files changed, 60 deletions(-) delete mode 100644 docs/README.md rename docs/{guide => }/address.md (100%) delete mode 100644 docs/api/index.md rename docs/{guide => }/block.md (100%) rename docs/{guide => }/browser.md (100%) rename docs/{guide => }/crypto.md (100%) rename docs/{guide => }/encoding.md (100%) rename docs/{guide => }/hierarchical.md (100%) rename docs/{guide => }/index.md (100%) rename docs/{guide => }/networks.md (100%) rename docs/{guide => }/privatekey.md (100%) rename docs/{guide => }/publickey.md (100%) rename docs/{guide => }/script.md (100%) rename docs/{guide => }/transaction.md (100%) rename docs/{guide => }/unit.md (100%) rename docs/{guide => }/unspentoutput.md (100%) rename docs/{guide => }/uri.md (100%) diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 297420d..0000000 --- a/docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Bitcore API Reference -======= - -This site contains the reference docs for the bitcore library. diff --git a/docs/guide/address.md b/docs/address.md similarity index 100% rename from docs/guide/address.md rename to docs/address.md diff --git a/docs/api/index.md b/docs/api/index.md deleted file mode 100644 index 1988787..0000000 --- a/docs/api/index.md +++ /dev/null @@ -1,56 +0,0 @@ -title: Bitcore Examples -description: Sample code for the most common task in any bitcoin application. ---- -# Examples - -## Create a Private Key - -```javascript -var privKey = new bitcore.PrivateKey(); -``` - -## Create an Address - -```javascript -var privKey = new bitcore.PrivateKey(); -var address = privKey.toAddress(); -``` - -## Create a Multisig Address - -```javascript -// Build a 2-of-3 address from public keys -var P2SHAddress = new bitcore.Address([publicKey1, publicKey2, publicKey3], 2); -``` - -## Request a Payment - -```javascript -var paymentInfo = { - address: '1DNtTk4PUCGAdiNETAzQFWZiy2fCHtGnPx', - amount: 120000 //satoshis -}; -var uri = new bitcore.URI(paymentInfo).toString(); -``` - -## Create a Transaction - -```javascript -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 - -```javascript -var peer = new Peer('5.9.85.34'); - -peer.on('inv', function(message) { - // new invetory -}); - -peer.connect(); -``` diff --git a/docs/guide/block.md b/docs/block.md similarity index 100% rename from docs/guide/block.md rename to docs/block.md diff --git a/docs/guide/browser.md b/docs/browser.md similarity index 100% rename from docs/guide/browser.md rename to docs/browser.md diff --git a/docs/guide/crypto.md b/docs/crypto.md similarity index 100% rename from docs/guide/crypto.md rename to docs/crypto.md diff --git a/docs/guide/encoding.md b/docs/encoding.md similarity index 100% rename from docs/guide/encoding.md rename to docs/encoding.md diff --git a/docs/guide/hierarchical.md b/docs/hierarchical.md similarity index 100% rename from docs/guide/hierarchical.md rename to docs/hierarchical.md diff --git a/docs/guide/index.md b/docs/index.md similarity index 100% rename from docs/guide/index.md rename to docs/index.md diff --git a/docs/guide/networks.md b/docs/networks.md similarity index 100% rename from docs/guide/networks.md rename to docs/networks.md diff --git a/docs/guide/privatekey.md b/docs/privatekey.md similarity index 100% rename from docs/guide/privatekey.md rename to docs/privatekey.md diff --git a/docs/guide/publickey.md b/docs/publickey.md similarity index 100% rename from docs/guide/publickey.md rename to docs/publickey.md diff --git a/docs/guide/script.md b/docs/script.md similarity index 100% rename from docs/guide/script.md rename to docs/script.md diff --git a/docs/guide/transaction.md b/docs/transaction.md similarity index 100% rename from docs/guide/transaction.md rename to docs/transaction.md diff --git a/docs/guide/unit.md b/docs/unit.md similarity index 100% rename from docs/guide/unit.md rename to docs/unit.md diff --git a/docs/guide/unspentoutput.md b/docs/unspentoutput.md similarity index 100% rename from docs/guide/unspentoutput.md rename to docs/unspentoutput.md diff --git a/docs/guide/uri.md b/docs/uri.md similarity index 100% rename from docs/guide/uri.md rename to docs/uri.md From a81546e631aebf0f25c71f576b006c41fe0427bb Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 20 Jan 2015 17:27:20 -0500 Subject: [PATCH 2/3] Fixed formatting issue with yaml in docs. --- docs/address.md | 1 + docs/block.md | 1 + docs/browser.md | 1 + docs/crypto.md | 1 + docs/encoding.md | 1 + docs/hierarchical.md | 1 + docs/networks.md | 1 + docs/privatekey.md | 1 + docs/publickey.md | 1 + docs/script.md | 1 + docs/transaction.md | 1 + docs/unit.md | 1 + docs/unspentoutput.md | 1 + docs/uri.md | 1 + 14 files changed, 14 insertions(+) diff --git a/docs/address.md b/docs/address.md index 9718790..fb1d942 100644 --- a/docs/address.md +++ b/docs/address.md @@ -1,3 +1,4 @@ +--- title: Address description: A simple interface to generate and validate a bitcoin address. --- diff --git a/docs/block.md b/docs/block.md index 2bcec98..dfe5859 100644 --- a/docs/block.md +++ b/docs/block.md @@ -1,3 +1,4 @@ +--- title: Block description: A simple interface to parse and validate a bitcoin blocks. --- diff --git a/docs/browser.md b/docs/browser.md index 59d9d50..9db540a 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -1,3 +1,4 @@ +--- title: Browser Builds description: Guide to writing modules and optimizing browser bundles. --- diff --git a/docs/crypto.md b/docs/crypto.md index 14925e7..9e872ef 100644 --- a/docs/crypto.md +++ b/docs/crypto.md @@ -1,3 +1,4 @@ +--- title: Crypto description: Primitives and tools to deal with bitcoin cryptography. --- diff --git a/docs/encoding.md b/docs/encoding.md index a2d0d00..e58ff01 100644 --- a/docs/encoding.md +++ b/docs/encoding.md @@ -1,3 +1,4 @@ +--- title: Encoding description: Utilities for encoding information in bitcoin standard formats. --- diff --git a/docs/hierarchical.md b/docs/hierarchical.md index fa62370..9c0ebd8 100644 --- a/docs/hierarchical.md +++ b/docs/hierarchical.md @@ -1,3 +1,4 @@ +--- title: HDKeys description: Lets you create and derive extended public and private keys according to the BIP32 standard for Hierarchical Deterministic (HD) keys. --- diff --git a/docs/networks.md b/docs/networks.md index 905d805..bada23c 100644 --- a/docs/networks.md +++ b/docs/networks.md @@ -1,3 +1,4 @@ +--- title: Networks description: A simple interface to handle livenet and testnet bitcoin networks. --- diff --git a/docs/privatekey.md b/docs/privatekey.md index d8cdfe0..3b52b0e 100644 --- a/docs/privatekey.md +++ b/docs/privatekey.md @@ -1,3 +1,4 @@ +--- title: Private Key description: A simple interface to generate, import and handle private keys. --- diff --git a/docs/publickey.md b/docs/publickey.md index 983120f..03f43db 100644 --- a/docs/publickey.md +++ b/docs/publickey.md @@ -1,3 +1,4 @@ +--- title: Public Key description: A simple interface for handling private keys. --- diff --git a/docs/script.md b/docs/script.md index 5c6facd..c7929c1 100644 --- a/docs/script.md +++ b/docs/script.md @@ -1,3 +1,4 @@ +--- title: Script description: A powerful interface to create, parse and validate bitcoin scripts. --- diff --git a/docs/transaction.md b/docs/transaction.md index a655ff5..ed3ba50 100644 --- a/docs/transaction.md +++ b/docs/transaction.md @@ -1,3 +1,4 @@ +--- title: Transaction description: A robust interface to create, parse and validate bitcoin transactions. --- diff --git a/docs/unit.md b/docs/unit.md index d13c2ef..dd03c89 100644 --- a/docs/unit.md +++ b/docs/unit.md @@ -1,3 +1,4 @@ +--- title: Bitcoin Units description: Utility to easily convert between bitcoin units. --- diff --git a/docs/unspentoutput.md b/docs/unspentoutput.md index 20b9b05..ec605d1 100644 --- a/docs/unspentoutput.md +++ b/docs/unspentoutput.md @@ -1,3 +1,4 @@ +--- title: UnspentOutput description: A stateless model to represent an unspent output and associated information. --- diff --git a/docs/uri.md b/docs/uri.md index e679e12..5b9d57b 100644 --- a/docs/uri.md +++ b/docs/uri.md @@ -1,3 +1,4 @@ +--- title: Bitcoin URIs description: Utility to parse and create standard bitcoin URIs. --- From 78b81673ae0c2ec3bbfc1d7a6c8cec606ec6a159 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Wed, 21 Jan 2015 09:00:01 -0500 Subject: [PATCH 3/3] Fixed submodule link --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index d3853a2..6f41d23 100644 --- a/docs/index.md +++ b/docs/index.md @@ -36,7 +36,7 @@ To get started, just `npm install bitcore` or `bower install bitcore`. Some functionality is implemented as a module that can be installed seperately: * [Payment Protocol Support](https://github.com/bitpay/bitcore-payment-protocol) -* [Peer to Peer Networking](https://github.com/bitpay/bitcore-payment-protocol) +* [Peer to Peer Networking](https://github.com/bitpay/bitcore-p2p) * [Bitcoin Core JSON-RPC](https://github.com/bitpay/bitcoind-rpc) * [Payment Channels](https://github.com/bitpay/bitcore-channel) * [Mnemonics](https://github.com/bitpay/bitcore-mnemonic)