Update index for the documentation
This commit is contained in:
parent
048bad86fc
commit
6be0c047b7
@ -1,3 +1,5 @@
|
|||||||
|
# > `bitcore.PaymentProtocol`
|
||||||
|
|
||||||
# Payment Protocol
|
# Payment Protocol
|
||||||
|
|
||||||
`PaymentProtocol` and associated functions and methods will serialize, deserialize, sign and verify payment protocol messages both in Node.js and web browsers. Both X.509 and [bitcoin identity protocol](https://en.bitcoin.it/wiki/Identity_protocol_v1) are supported. For detailed technical information, please view [BIP70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki).
|
`PaymentProtocol` and associated functions and methods will serialize, deserialize, sign and verify payment protocol messages both in Node.js and web browsers. Both X.509 and [bitcoin identity protocol](https://en.bitcoin.it/wiki/Identity_protocol_v1) are supported. For detailed technical information, please view [BIP70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki).
|
||||||
@ -176,4 +178,4 @@ var payment = new PaymentProtocol().makePayment(decodedPayment);
|
|||||||
var tx = payment.message.transactions[0];
|
var tx = payment.message.transactions[0];
|
||||||
```
|
```
|
||||||
|
|
||||||
For detailed diagram of the exchange of messages, please see the [Protocol section of BIP70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki#protocol).
|
For detailed diagram of the exchange of messages, please see the [Protocol section of BIP70](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki#protocol).
|
||||||
212
docs/index.html
212
docs/index.html
File diff suppressed because one or more lines are too long
@ -1,39 +1,28 @@
|
|||||||
# Bitcore v0.8
|
# Bitcore v0.8
|
||||||
|
|
||||||
## Description
|
## Addresses and Key Management
|
||||||
|
|
||||||
A pure, powerful core for your bitcoin project.
|
* [Addresses](models/Address.md)
|
||||||
|
* [Using different networks](helpers/Networks.md)
|
||||||
|
* [Private Keys](models/PrivateKey.md) and [Public Keys](models/PublicKey.md)
|
||||||
|
* [Hierarchically-derived Private and Public Keys](models/Hierarchical.md)
|
||||||
|
|
||||||
Bitcore is a complete, native interface to the bitcoin network, and provides the core functionality needed to develop apps for bitcoin.
|
## Payment handling
|
||||||
|
* [Using different Units](helpers/Unit.md)
|
||||||
|
* [Acknowledging and Requesting payments: Bitcoin URIs](helpers/URI.md)
|
||||||
|
* [Payment Protocol Support](helpers/PaymentProtocol.md)
|
||||||
|
* [The Transaction Class](models/Transaction.md)
|
||||||
|
|
||||||
## Main Features
|
## Bitcoin internals
|
||||||
|
* [Scripts](models/Script.md)
|
||||||
|
* [Block](models/Block.md)
|
||||||
|
|
||||||
* Cross platform
|
## Networking
|
||||||
* All core bitcoin functionality
|
* [Interface to the Bitcoin P2P network](networking/Peer.md)
|
||||||
* Open-source
|
* [Managing a pool of peers](networking/Pool.md)
|
||||||
* Payment protocol support
|
* [Connecting to a bitcoind instance through JSON-RPC](networking/JSONRPC.md)
|
||||||
* Private and public key management
|
|
||||||
|
|
||||||
|
## Extra
|
||||||
## Get Started
|
* [Crypto](helpers/Crypto.md)
|
||||||
|
* [Encoding](helpers/Encoding.md)
|
||||||
Use it on `Node.js`:
|
* [ECIES](helpers/ECIES.md)
|
||||||
|
|
||||||
```
|
|
||||||
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 @@
|
|||||||
# Public Key
|
# > `bitcore.PublicKey`
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
Represents a bitcoin public key and is needed to be able to receive bitcoin, as is usually represented as a bitcoin [Address](Address.md), see the official [Bitcoin Wiki](https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses). A PublicKey in Bitcore is an immutable object and can be instantiated from a [Point](Crypto.md), string, [PrivateKey](PrivateKey.md), Buffer and a [BN](Crypto.md).
|
Represents a bitcoin public key and is needed to be able to receive bitcoin, as is usually represented as a bitcoin [Address](Address.md), see the official [Bitcoin Wiki](https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses). A PublicKey in Bitcore is an immutable object and can be instantiated from a [Point](Crypto.md), string, [PrivateKey](PrivateKey.md), Buffer and a [BN](Crypto.md).
|
||||||
|
|
||||||
@ -28,4 +30,4 @@ if (PublicKey.isValid('02a1633cafcc01ebfb6d78e39f687a1f0995c62fc95f51ead10a02ee0
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: It's important to note that there are two possible ways to represent public key, the standard is *compressed* and includes the x value and parity (as represented above in the documentation). There is also a longer version that is *uncompressed* which includes both x and y values, and using this can generate a different bitcoin address, so it's important to note this possibility, however it's discouraged to be used.
|
Note: It's important to note that there are two possible ways to represent public key, the standard is *compressed* and includes the x value and parity (as represented above in the documentation). There is also a longer version that is *uncompressed* which includes both x and y values, and using this can generate a different bitcoin address, so it's important to note this possibility, however it's discouraged to be used.
|
||||||
@ -1,13 +1,14 @@
|
|||||||
# Bitcore
|
# Bitcore
|
||||||
|
|
||||||
[About](index.md)
|
[Index](index.md)
|
||||||
|
|
||||||
[Models]()
|
[Models]()
|
||||||
|
|
||||||
* [Address](models/Address.md)
|
* [Address](models/Address.md)
|
||||||
* [Block](models/Block.md)
|
* [Block](models/Block.md)
|
||||||
* [Hierarchical](models/Hierarchical.md)
|
* [Hierarchical](models/Hierarchical.md)
|
||||||
* [Peer](models/Peer.md)
|
|
||||||
* [Private Key](models/Privatekey.md)
|
* [Private Key](models/Privatekey.md)
|
||||||
|
* [Public Key](models/Publickey.md)
|
||||||
* [Script](models/Script.md)
|
* [Script](models/Script.md)
|
||||||
* [Transaction](models/Transaction.md)
|
* [Transaction](models/Transaction.md)
|
||||||
|
|
||||||
@ -15,8 +16,15 @@
|
|||||||
|
|
||||||
* [Crypto](helpers/Crypto.md)
|
* [Crypto](helpers/Crypto.md)
|
||||||
* [Encoding](helpers/Encoding.md)
|
* [Encoding](helpers/Encoding.md)
|
||||||
|
* [Payment Protocol](helpers/PaymentProtocol.md)
|
||||||
* [Networks](helpers/Networks.md)
|
* [Networks](helpers/Networks.md)
|
||||||
* [Unit](helpers/Unit.md)
|
* [Unit](helpers/Unit.md)
|
||||||
* [URI](helpers/URI.md)
|
* [URI](helpers/URI.md)
|
||||||
|
|
||||||
|
[Networking]()
|
||||||
|
|
||||||
|
* [Peer](networking/Peer.md)
|
||||||
|
* [Pool](networking/Pool.md)
|
||||||
|
* [JSON-RPC](networking/JSONRPC.md)
|
||||||
|
|
||||||
[Examples](examples.md)
|
[Examples](examples.md)
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
# Pool
|
# > `bitcore.transport.Pool`
|
||||||
|
|
||||||
|
## Pool
|
||||||
|
|
||||||
A pool maintains a connection of [Peers](Peer.md). A pool will discover peers via DNS seeds, as well as when peer addresses are announced through the network.
|
A pool maintains a connection of [Peers](Peer.md). A pool will discover peers via DNS seeds, as well as when peer addresses are announced through the network.
|
||||||
|
|
||||||
@ -25,4 +27,4 @@ pool.disconnect()
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
For more information about Peer events, please read the [Peer](Peer.md) documentation. Peer events are relayed to the pool, a peer event `inv` in the pool would be `peerinv`. When a peer is disconnected the pool will try to connect to the list of known addresses to maintain connection.
|
For more information about Peer events, please read the [Peer](Peer.md) documentation. Peer events are relayed to the pool, a peer event `inv` in the pool would be `peerinv`. When a peer is disconnected the pool will try to connect to the list of known addresses to maintain connection.
|
||||||
@ -520,7 +520,7 @@ Transaction.prototype.sign = function(privateKey, sigtype) {
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
Transaction.prototype._getPrivateKeySignatures = function(privKey, sigtype) {
|
Transaction.prototype.getSignatures = function(privKey, sigtype) {
|
||||||
privKey = new PrivateKey(privKey);
|
privKey = new PrivateKey(privKey);
|
||||||
sigtype = sigtype || Signature.SIGHASH_ALL;
|
sigtype = sigtype || Signature.SIGHASH_ALL;
|
||||||
var transaction = this;
|
var transaction = this;
|
||||||
@ -549,10 +549,6 @@ Transaction.prototype.applySignature = function(signature) {
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
Transaction.prototype.getSignatures = function(privKey, sigtype) {
|
|
||||||
return this._getPrivateKeySignatures(privKey, sigtype);
|
|
||||||
};
|
|
||||||
|
|
||||||
Transaction.prototype.isFullySigned = function() {
|
Transaction.prototype.isFullySigned = function() {
|
||||||
return _.all(_.map(this.inputs, function(input) {
|
return _.all(_.map(this.inputs, function(input) {
|
||||||
return input.isFullySigned();
|
return input.isFullySigned();
|
||||||
@ -571,7 +567,6 @@ Transaction.prototype.verifySignature = function(sig, pubkey, nin, subscript) {
|
|||||||
return Sighash.verify(this, sig, pubkey, nin, subscript);
|
return Sighash.verify(this, sig, pubkey, nin, subscript);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check that a transaction passes basic sanity tests. If not, return a string
|
* Check that a transaction passes basic sanity tests. If not, return a string
|
||||||
* describing the error. This function contains the same logic as
|
* describing the error. This function contains the same logic as
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user