From 86819a8f6d433b4f6e50547133504e0a7906b50a Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Mon, 19 Jan 2015 16:57:48 -0500 Subject: [PATCH] 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