Yemel Jardi
10 years ago
committed by
Esteban Ordano
17 changed files with 386 additions and 21 deletions
@ -0,0 +1,6 @@ |
|||
{ |
|||
"useSideMenu": true, |
|||
"lineBreaks": "gfm", |
|||
"additionalFooterText": "Bitcore™ © 2013-2014 BitPay, Inc. Bitcore is released under the MIT license. ", |
|||
"anchorCharacter": "#" |
|||
} |
@ -0,0 +1,43 @@ |
|||
# Examples |
|||
|
|||
## Create a private key |
|||
|
|||
``` |
|||
var privKey = new bitcore.PrivateKey(); |
|||
``` |
|||
|
|||
## Create an Address |
|||
``` |
|||
var privKey = new bitcore.PrivateKey(); |
|||
var address = privKey.toAddress(); |
|||
``` |
|||
|
|||
## Create a Multisig Address |
|||
``` |
|||
??? |
|||
``` |
|||
|
|||
## Request a Payment |
|||
``` |
|||
var paymentInfo = { |
|||
address: '1DNtTk4PUCGAdiNETAzQFWZiy2fCHtGnPx', |
|||
amount: 120000 //satoshis |
|||
}; |
|||
var uri = new bitcore.URI(paymentInfo).toString(); |
|||
``` |
|||
|
|||
## Create a transaction |
|||
``` |
|||
??? |
|||
``` |
|||
|
|||
## Connect to the network |
|||
``` |
|||
var peer = new Peer('5.9.85.34'); |
|||
|
|||
peer.on('inv', function(message) { |
|||
// new invetory |
|||
}); |
|||
|
|||
peer.connect(); |
|||
``` |
@ -1,23 +1,25 @@ |
|||
# Crypto |
|||
# > `bitcore.crypto` |
|||
|
|||
## 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. |
|||
|
|||
## random |
|||
## Random |
|||
|
|||
The `bitcore.Crypto.Random` namespace contains a single function, named `getRandomBuffer(size)` that returns a `Buffer` instance with random bytes. It may not work depending on the engine that bitcore is running on (doesn't work with IE versions lesser than 11). |
|||
The `bitcore.crypto.Random` namespace contains a single function, named `getRandomBuffer(size)` that returns a `Buffer` instance with random bytes. It may not work depending on the engine that bitcore is running on (doesn't work with IE versions lesser than 11). |
|||
|
|||
## bn |
|||
## BN |
|||
|
|||
The `bitcore.Crypto.BN` class contains a wrapper around [bn.js](https://github.com/indutny/bn.js), the bignum library used internally in bitcore. |
|||
|
|||
## point |
|||
## Point |
|||
|
|||
The `bitcore.Crypto.Point` class contains a wrapper around the class Point of [elliptic.js](https://github.com/indutny/elliptic.js), the elliptic curve library used internally in bitcore. |
|||
|
|||
## hash |
|||
## Hash |
|||
|
|||
The `bitcore.Crypto.Hash` namespace contains a set of hashes and utilities. These are either the native `crypto` hash functions from `node.js` or their respective browser shims as provided by the `browserify` library. |
|||
|
|||
## ecdsa |
|||
## ECDSA |
|||
|
|||
`bitcore.Crypto.ECDSA` contains a pure javascript implementation of the elliptic curve DSA signature scheme. |
@ -1,8 +1,10 @@ |
|||
# Encoding |
|||
# > `bitcore.encoding` |
|||
|
|||
## Description |
|||
|
|||
The `bitcore.Encoding` namespace contains utilities for encoding information in common formats in the bitcoin ecosystem. |
|||
|
|||
## Base58 |
|||
## Base58 & Base58Check |
|||
|
|||
Two classes are provided: `Base58` and `Base58Check`. The first one merely encodes/decodes a set of bytes in base58 format. The second one will also take the double `sha256` hash of the information and append the last 4 bytes of the hash as a checksum when encoding, and check this checksum when decoding. |
|||
|
@ -1,4 +1,6 @@ |
|||
# Networks |
|||
# > `bitcore.Networks` |
|||
|
|||
## Description |
|||
|
|||
Bitcore provides support for both the main bitcoin network as well as for `testnet3`, the current test blockchain. We encourage the use of `Networks.livenet` and `Networks.testnet` as constants. Note that the library sometimes may check for equality against this object. Avoid creating a deep copy of this object and using that. |
|||
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@ |
|||
# Bitcore v0.8 |
|||
|
|||
## Description |
|||
|
|||
A pure, powerful core for your bitcoin project. |
|||
|
|||
Bitcore is a complete, native interface to the bitcoin network, and provides the core functionality needed to develop apps for bitcoin. |
|||
|
|||
## Main Features |
|||
|
|||
* Cross platform |
|||
* All core bitcoin functionality |
|||
* Open-source |
|||
* Payment protocol support |
|||
* Private and public key management |
|||
|
|||
|
|||
## Get Started |
|||
|
|||
Use it on `Node.js`: |
|||
|
|||
``` |
|||
npm install bitcore |
|||
``` |
|||
|
|||
Use it client side on the browser: |
|||
|
|||
``` |
|||
bower install bitcore |
|||
``` |
|||
|
|||
|
|||
## Projects using Bitcore |
|||
|
|||
* Copay |
|||
* Insight |
|||
* enBitcoins |
|||
* BitBox |
|||
* Multi-signature Paper Wallet |
@ -1,4 +1,6 @@ |
|||
# Address |
|||
# > `bitcore.Address` |
|||
|
|||
## Description |
|||
|
|||
Represents a bitcoin Address. Addresses became the most popular way to make bitcoin transactions. See [the official Bitcoin Wiki](https://en.bitcoin.it/wiki/Address) for more information. |
|||
|
@ -1,4 +1,6 @@ |
|||
# Block |
|||
# > `bitcore.Block` |
|||
|
|||
## Description |
|||
|
|||
A Block instance represents the information on a block in the bitcoin network. Given a hexa or base64 string representation of the serialization of a block with its transactions, you can instantiate a Block instance. Methods are provided to calculate and check the merkle root hash (if enough data is provided), but transactions won't necessarily be valid spends, and this class won't validate them. A binary representation as a `Buffer` instance is also valid input for a Block's constructor. |
|||
|
@ -1,4 +1,6 @@ |
|||
# Hierarichically Derived Keys |
|||
# > `bitcore.HDKeys` |
|||
|
|||
## Hierarichically Derived Keys |
|||
|
|||
Bitcore provides full support for [BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki), allowing for many key management schemas that benefit from this property. Please be sure to read and understand the basic concepts and the warnings on that BIP before using these classes. |
|||
|
@ -1,4 +1,6 @@ |
|||
# Private Key |
|||
# > `bitcore.PrivateKey` |
|||
|
|||
## Description |
|||
|
|||
Represents a bitcoin private key and is needed to be able to spend bitcoin and sign transactions. See the official [Bitcoin Wiki](https://en.bitcoin.it/wiki/Private_key) for more information about private keys. A PrivateKey in Bitcore is an immutable object that has methods to import and export into a variety of formats including [Wallet Import Format](https://en.bitcoin.it/wiki/Wallet_import_format). |
|||
|
@ -1,4 +1,6 @@ |
|||
# Script |
|||
# > `bitcore.Script` |
|||
|
|||
## Description |
|||
|
|||
All bitcoin transactions have scripts embedded into its inputs and outputs. The scripts use a very simple programming language, which is evaluated from left to right using a stack. The language is designed such that it guarantees all scripts will execute in a limited amount of time (it is not Turing-Complete). |
|||
|
@ -1,4 +1,6 @@ |
|||
# Transaction |
|||
# > `bitcore.Transaction` |
|||
|
|||
## 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. |
|||
|
@ -0,0 +1,22 @@ |
|||
# Bitcore |
|||
|
|||
[About](index.md) |
|||
[Models]() |
|||
|
|||
* [Address](models/Address.md) |
|||
* [Block](models/Block.md) |
|||
* [Hierarchical](models/Hierarchical.md) |
|||
* [Peer](models/Peer.md) |
|||
* [Private Key](models/Privatekey.md) |
|||
* [Script](models/Script.md) |
|||
* [Transaction](models/Transaction.md) |
|||
|
|||
[Helpers]() |
|||
|
|||
* [Crypto](helpers/Crypto.md) |
|||
* [Encoding](helpers/Encoding.md) |
|||
* [Networks](helpers/Networks.md) |
|||
* [Unit](helpers/Unit.md) |
|||
* [URI](helpers/URI.md) |
|||
|
|||
[Examples](examples.md) |
Loading…
Reference in new issue