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 99% rename from docs/guide/address.md rename to docs/address.md index 9718790..fb1d942 100644 --- a/docs/guide/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/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 99% rename from docs/guide/block.md rename to docs/block.md index 2bcec98..dfe5859 100644 --- a/docs/guide/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/guide/browser.md b/docs/browser.md similarity index 99% rename from docs/guide/browser.md rename to docs/browser.md index 59d9d50..9db540a 100644 --- a/docs/guide/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/guide/crypto.md b/docs/crypto.md similarity index 99% rename from docs/guide/crypto.md rename to docs/crypto.md index 14925e7..9e872ef 100644 --- a/docs/guide/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/guide/encoding.md b/docs/encoding.md similarity index 99% rename from docs/guide/encoding.md rename to docs/encoding.md index a2d0d00..e58ff01 100644 --- a/docs/guide/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/guide/hierarchical.md b/docs/hierarchical.md similarity index 99% rename from docs/guide/hierarchical.md rename to docs/hierarchical.md index fa62370..9c0ebd8 100644 --- a/docs/guide/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/guide/index.md b/docs/index.md similarity index 97% rename from docs/guide/index.md rename to docs/index.md index d3853a2..6f41d23 100644 --- a/docs/guide/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) diff --git a/docs/guide/networks.md b/docs/networks.md similarity index 99% rename from docs/guide/networks.md rename to docs/networks.md index 905d805..bada23c 100644 --- a/docs/guide/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/guide/privatekey.md b/docs/privatekey.md similarity index 99% rename from docs/guide/privatekey.md rename to docs/privatekey.md index d8cdfe0..3b52b0e 100644 --- a/docs/guide/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/guide/publickey.md b/docs/publickey.md similarity index 99% rename from docs/guide/publickey.md rename to docs/publickey.md index 983120f..03f43db 100644 --- a/docs/guide/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/guide/script.md b/docs/script.md similarity index 99% rename from docs/guide/script.md rename to docs/script.md index 5c6facd..c7929c1 100644 --- a/docs/guide/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/guide/transaction.md b/docs/transaction.md similarity index 99% rename from docs/guide/transaction.md rename to docs/transaction.md index a655ff5..ed3ba50 100644 --- a/docs/guide/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/guide/unit.md b/docs/unit.md similarity index 99% rename from docs/guide/unit.md rename to docs/unit.md index d13c2ef..dd03c89 100644 --- a/docs/guide/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/guide/unspentoutput.md b/docs/unspentoutput.md similarity index 99% rename from docs/guide/unspentoutput.md rename to docs/unspentoutput.md index 20b9b05..ec605d1 100644 --- a/docs/guide/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/guide/uri.md b/docs/uri.md similarity index 99% rename from docs/guide/uri.md rename to docs/uri.md index e679e12..5b9d57b 100644 --- a/docs/guide/uri.md +++ b/docs/uri.md @@ -1,3 +1,4 @@ +--- title: Bitcoin URIs description: Utility to parse and create standard bitcoin URIs. ---