Updates to documentation for bitcore.io website.
This commit is contained in:
parent
68b0120319
commit
f337622790
|
@ -1,4 +1,8 @@
|
|||
## Build & Install
|
||||
---
|
||||
title: Build & Install
|
||||
description: Build & installation instructions for Bitcore Node
|
||||
---
|
||||
# Build & Install
|
||||
|
||||
This includes a detailed instructions for compiling. There are two main parts of the build, compiling Bitcoin Core as a static library and the Node.js bindings.
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Bus
|
||||
description: An event emitter for node events
|
||||
---
|
||||
# Bus
|
||||
|
||||
The bus provides a way to subscribe to events from any of the services running. It's implemented abstract from transport specific implementation. The primary use of the bus in Bitcore Node is for subscribing to events via a web socket.
|
||||
|
@ -29,4 +33,3 @@ bus.subscribe('address/transaction', ['13FMwCYz3hUhwPcaWuD2M1U2KzfTtvLM89']);
|
|||
// unsubscribe
|
||||
bus.unsubscribe('transaction');
|
||||
```
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Errors
|
||||
description: Errors for Bitcore Node
|
||||
---
|
||||
# Errors
|
||||
|
||||
Many times there are cases where an error condition can be gracefully handled depending on a particular use. To assist in better error handling, errors will have different types so that it's possible to determine the type of error and handle appropriatly.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Node
|
||||
description: A collection of services run as node.
|
||||
---
|
||||
# Node
|
||||
|
||||
A node represents a collection of services that are loaded together. For more information about services, please see the [Services Documentation](services.md).
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Bitcoin Core Patch
|
||||
description: Description of the patch applied to Bitcoin Core to compile as a static library
|
||||
---
|
||||
# Static Library Patch
|
||||
|
||||
To provide native bindings to JavaScript *(or any other language for that matter)*, Bitcoin code, itself, must be linkable. Currently, Bitcoin Core provides a JSON RPC interface to bitcoind as well as a shared library for script validation *(and hopefully more)* called libbitcoinconsensus. There is a node module, [node-libbitcoinconsensus](https://github.com/bitpay/node-libbitcoinconsensus), that exposes these methods. While these interfaces are useful for several use cases, there are additional use cases that are not fulfilled, and being able to implement customized interfaces is necessary. To be able to do this a few simple changes need to be made to Bitcoin Core to compile as a static library.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Release Process
|
||||
description: Description to verify releases
|
||||
---
|
||||
# Release Process
|
||||
|
||||
Binaries for the C++ binding file (which includes libbitcoind statically linked in) are distributed for convenience. The binary binding file `bitcoind.node` is signed and published to S3 for later download and installation. Source files can also be built if binaries are not desired.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Scaffolding
|
||||
description: Description of functions for Bitcore Node configuration
|
||||
---
|
||||
# Scaffold
|
||||
|
||||
A collection of functions for creating, managing, starting, stopping and interacting with a Bitcore Node.
|
||||
|
@ -29,4 +33,3 @@ This function will remove a service from a node by uninstalling the necessary de
|
|||
## Call Method
|
||||
|
||||
This function will call an API method on a node via the JSON-RPC interface.
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
---
|
||||
title: Services
|
||||
description: Overview of Bitcore Node services architecture.
|
||||
---
|
||||
# Services
|
||||
|
||||
## Available Services
|
||||
|
||||
- [Bitcoin Daemon](services/bitcoind.md)
|
||||
- [DB](services/db.md)
|
||||
- [Address](services/address.md)
|
||||
|
||||
## Overview
|
||||
|
||||
Bitcore Node has a service module system that can start up additional services that can include additional:
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Address Service
|
||||
description: Overview of the Address Service for Bitcore Node
|
||||
---
|
||||
# Address Service
|
||||
|
||||
The address service builds on the [Bitcoin Service](bitcoind.md) and the [Database Service](db.md) to add additional functionality for querying and subscribing to information based on bitcoin addresses. This will typically represent the core functionality for wallet applications.
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
title: Bitcoin Service
|
||||
description: Overview of the Bitcoin Service for Bitcore Node
|
||||
---
|
||||
# Bitcoin Service
|
||||
|
||||
The Bitcoin Service adds a native Node.js interface to Bitcoin Core for querying information about the Bitcoin blockchain. Bindings are linked to Bitcoin Core compiled as a static library.
|
||||
The Bitcoin Service adds a native [Node.js](https://nodejs.org) interface to [Bitcoin Core](https://github.com/bitcoin/bitcoin) for querying information about the Bitcoin blockchain. Bindings are linked to Bitcoin Core compiled as a static library.
|
||||
|
||||
## API Documentation
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Database Service
|
||||
description: Overview of the Database Service for Bitcore Node
|
||||
---
|
||||
# Database Service
|
||||
|
||||
This service synchronizes a leveldb database with the [Bitcoin Service](bitcoind.md) block chain by connecting and disconnecting blocks to build new indexes that can be queried. Other services can extend the data that is indexed by implementing a `blockHandler` method, similar to the built-in [Address Service](address.md).
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
title: Web Service
|
||||
description: Overview of the Web Service for Bitcore Node
|
||||
---
|
||||
# Web Service
|
||||
|
||||
The web service creates an express app which can be used by services for setting up web routes for API's, static content, web applications, etc. This allows users to interact with various bitcore node services over one http or https port.
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
## Development & Testing
|
||||
---
|
||||
title: Development & Testing
|
||||
description: Notes for development and debugging Bitcore Node
|
||||
---
|
||||
# Development & Testing
|
||||
|
||||
To run all of the JavaScript tests:
|
||||
|
||||
|
|
|
@ -18,11 +18,13 @@ var errors = require('./errors');
|
|||
* properties that can be shared across services, such as network settings.
|
||||
*
|
||||
* The array of services should have the format:
|
||||
* ```js
|
||||
* {
|
||||
* name: 'bitcoind',
|
||||
* config: {}, // options to pass into constructor
|
||||
* module: <serviceConstructor>
|
||||
* module: ServiceConstructor
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @param {Object} config - The configuration of the node
|
||||
* @param {Array} config.services - The array of services
|
||||
|
|
|
@ -22,8 +22,9 @@ var AddressHistory = require('./history');
|
|||
* functionality for getting information by base58check encoded addresses. This includes getting the
|
||||
* balance for an address, the history for a collection of addresses, and unspent outputs for
|
||||
* contstructing transactions. This is typically the core functionality for building a wallet.
|
||||
* @param {Node} node - An instance of the node
|
||||
* @param {String} [name] - An optional name of the service
|
||||
* @param {Object} options
|
||||
* @param {Node} options.node - An instance of the node
|
||||
* @param {String} options.name - An optional name of the service
|
||||
*/
|
||||
var AddressService = function(options) {
|
||||
BaseService.call(this, options);
|
||||
|
|
|
@ -11,8 +11,8 @@ var log = index.log;
|
|||
var Service = require('../service');
|
||||
|
||||
/**
|
||||
* Provides an interface to native bindings to Bitcoin Core compiled as a static library.
|
||||
* The C++ bindings can be found at src/libbitcoind.cc
|
||||
* Provides an interface to native bindings to [Bitcoin Core](https://github.com/bitcoin/bitcoin)
|
||||
* compiled as a static library. The C++ bindings can be found at `src/libbitcoind.cc`
|
||||
* @param {Object} options
|
||||
* @param {Node} options.node - A reference to the node
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue