Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update docs for versioned modules. #1391

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 66 additions & 31 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
5. [Developer Resources](#DeveloperResources)
1. [Code Contribution Guidelines](#ContributionGuidelines)
2. [JSON-RPC Reference](#JSONRPCReference)
3. [The Decred-related Go Packages](#GoPackages)
3. [Go Modules](#GoModules)
4. [Module Hierarchy](#ModuleHierarchy)

<a name="About" />

Expand Down Expand Up @@ -191,40 +192,74 @@ information.

<a name="ContributionGuidelines" />

**5.1 Code Contribution Guidelines**

* [Code Contribution Guidelines](https://github.com/decred/dcrd/tree/master/docs/code_contribution_guidelines.md)

<a name="JSONRPCReference" />

**5.2 JSON-RPC Reference**

* [JSON-RPC Reference](https://github.com/decred/dcrd/tree/master/docs/json_rpc_api.md)
* [RPC Examples](https://github.com/decred/dcrd/tree/master/docs/json_rpc_api.md#ExampleCode)
<a name="GoPackages" />

* The Decred-related Go Packages:
* [rpcclient](https://github.com/decred/dcrd/tree/master/rpcclient) - Implements a
robust and easy to use Websocket-enabled Decred JSON-RPC client
* [dcrjson](https://github.com/decred/dcrd/tree/master/dcrjson) - Provides an extensive API
for the underlying JSON-RPC command and return values
* [wire](https://github.com/decred/dcrd/tree/master/wire) - Implements the
Decred wire protocol
* [peer](https://github.com/decred/dcrd/tree/master/peer) -
Provides a common base for creating and managing Decred network peers.
* [blockchain](https://github.com/decred/dcrd/tree/master/blockchain) -
Implements Decred block handling and chain selection rules
* [blockchain/fullblocktests](https://github.com/decred/dcrd/tree/master/blockchain/fullblocktests) -
Provides a set of block tests for testing the consensus validation rules
* [txscript](https://github.com/decred/dcrd/tree/master/txscript) -
Implements the Decred transaction scripting language
* [dcrec](https://github.com/decred/dcrd/tree/master/dcrec) - Implements
support for the elliptic curve cryptographic functions needed for the
Decred scripts
* [database](https://github.com/decred/dcrd/tree/master/database) -
Provides a database interface for the Decred block chain
* [mempool](https://github.com/decred/dcrd/tree/master/mempool) -
Package mempool provides a policy-enforced pool of unmined decred
transactions.
* [dcrutil](https://github.com/decred/dcrd/tree/master/dcrutil) - Provides
Decred-specific convenience functions and types

<a name="GoModules" />

**5.3 Go Modules**

The following versioned modules are provided by dcrd repository:

* [rpcclient](https://github.com/decred/dcrd/tree/master/rpcclient) - Implements
a robust and easy to use Websocket-enabled Decred JSON-RPC client
* [dcrjson](https://github.com/decred/dcrd/tree/master/dcrjson) - Provides an
extensive API for the underlying JSON-RPC command and return values
* [wire](https://github.com/decred/dcrd/tree/master/wire) - Implements the
Decred wire protocol
* [peer](https://github.com/decred/dcrd/tree/master/peer) - Provides a common
base for creating and managing Decred network peers
* [blockchain](https://github.com/decred/dcrd/tree/master/blockchain) -
Implements Decred block handling and chain selection rules
* [stake](https://github.com/decred/dcrd/tree/master/blockchain/stake) -
Provides an API for working with stake transactions and other portions
related to the Proof-of-Stake (PoS) system
* [txscript](https://github.com/decred/dcrd/tree/master/txscript) -
Implements the Decred transaction scripting language
* [dcrec](https://github.com/decred/dcrd/tree/master/dcrec) - Provides constants
for the supported cryptographic signatures supported by Decred scripts
* [secp256k1](https://github.com/decred/dcrd/tree/master/dcrec/secp256k1) -
Implements the secp256k1 elliptic curve
* [edwards](https://github.com/decred/dcrd/tree/master/dcrec/edwards) -
Implements the edwards25519 twisted Edwards curve
* [database](https://github.com/decred/dcrd/tree/master/database) -
Provides a database interface for the Decred block chain
* [mempool](https://github.com/decred/dcrd/tree/master/mempool) - Provides a
policy-enforced pool of unmined Decred transactions
* [dcrutil](https://github.com/decred/dcrd/tree/master/dcrutil) - Provides
Decred-specific convenience functions and types
* [chaincfg](https://github.com/decred/dcrd/tree/master/chaincfg) - Defines
chain configuration parameters for the standard Decred networks and allows
callers to define their own custom Decred networks for testing puproses
* [chainhash](https://github.com/decred/dcrd/tree/master/chaincfg/chainhash) -
Provides a generic hash type and associated functions that allows the
specific hash algorithm to be abstracted.
* [connmgr](https://github.com/decred/dcrd/tree/master/connmgr) -
Package connmgr implements a generic Decred network connection manager.
specific hash algorithm to be abstracted
* [certgen](https://github.com/decred/dcrd/tree/master/certgen) - Provides a
function for creating a new TLS certificate key pair, typically used for
encrypting RPC and websocket communications
* [addrmgr](https://github.com/decred/dcrd/tree/master/addrmgr) - Provides a
concurrency safe Decred network address manager
* [connmgr](https://github.com/decred/dcrd/tree/master/connmgr) - Implements a
generic Decred network connection manager
* [hdkeychain](https://github.com/decred/dcrd/tree/master/hdkeychain) - Provides
an API for working with Decred hierarchical deterministic extended keys
* [gcs](https://github.com/decred/dcrd/tree/master/gcs) - Provides an API for
building and using Golomb-coded set filters useful for light clients such as
SPV wallets

<a name="ModuleHierarchy" />

**5.4 Module Hierarchy**

The following diagram shows an overview of the hierarchy for the modules
provided by the dcrd repository.

![Module Hierarchy](./assets/module_hierarchy.svg)
61 changes: 61 additions & 0 deletions docs/assets/module_hierarchy.gv
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
digraph {
graph [splines=ortho colorscheme=svg label=<<u>Module Hierarchy</u>> labelloc=t fontsize=18.0]
node [shape=box style="filled, rounded"]

certgen [label="certgen" fillcolor=darkkhaki]
chainhash [label="chaincfg/chainhash" fillcolor=aquamarine]
dcrjson [label="dcrjson" fillcolor=indianred]
wire [label="wire" fillcolor=coral]
addrmgr [label="addrmgr" fillcolor=lightsalmon]
chaincfg [label="chaincfg" fillcolor=cadetblue]
connmgr [label="connmgr" fillcolor=mistyrose]
dcrec [label="dcrec" fillcolor=mediumpurple]
edwards [label="dcrec/edwards" fillcolor=lightseagreen]
secp256k1 [label="dcrec/secp256k1" fillcolor=mediumvioletred]
dcrutil [label="dcrutil" fillcolor=burlywood]
database [label="database" fillcolor=dodgerblue]
hdkeychain [label="hdkeychain" fillcolor=deepskyblue]
txscript [label="txscript" fillcolor=mediumspringgreen]
stake [label="blockchain/stake" fillcolor=bisque]
gcs [label="gcs" fillcolor=gold]
blockchain [label="blockchain" fillcolor=orchid]
mempool [label="mempool" fillcolor=slategray]
mining [label="mining" fillcolor=chartreuse]
peer [label="peer" fillcolor=khaki]
rpcclient [label="rpcclient" fillcolor=mediumseagreen]
dcrd [label="dcrd" fillcolor=chocolate]

{rank=same connmgr addrmgr hdkeychain peer rpcclient mempool}

certgen
chainhash -> dcrjson [dir=back color=aquamarine]
chainhash -> wire [dir=back color=aquamarine]
wire -> addrmgr [dir=back color=coral]
wire -> chaincfg [dir=back color=coral]
chaincfg -> connmgr [dir=back color=cadetblue]
chainhash -> secp256k1 [dir=back color=aquamarine]
chaincfg -> dcrutil [dir=back color=cadetblue]
dcrec -> dcrutil [dir=back color=mediumpurple]
edwards -> dcrutil [dir=back color=lightseagreen]
secp256k1 -> dcrutil [dir=back color=mediumvioletred]
dcrutil -> database [dir=back color=burlywood]
dcrutil -> hdkeychain [dir=back color=burlywood]
dcrutil -> txscript [dir=back color=burlywood]
database -> stake [dir=back color=dodgerblue]
txscript -> stake [dir=back color=mediumspringgreen]
stake -> gcs [dir=back color=bisque]
dcrjson -> blockchain [dir=back color=indianred]
gcs -> blockchain [dir=back color=gold]
blockchain -> mining [dir=back color=orchid]
mining -> mempool [dir=back color=chartreuse]
blockchain -> peer [dir=back color=orchid]
blockchain -> rpcclient [dir=back color=orchid]

mempool -> dcrd [dir=back color=slategray]
certgen -> dcrd [dir=back color=darkkhaki]
addrmgr -> dcrd [dir=back color=lightsalmon]
hdkeychain -> dcrd [dir=back color=deepskyblue]
connmgr -> dcrd [dir=back color=mistyrose]
rpcclient -> dcrd [dir=back color=mediumseagreen]
peer -> dcrd [dir=back color=khaki]
}
Loading