MCPcopy Index your code
hub / github.com/HcashOrg/hcd

github.com/HcashOrg/hcd @2.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.2.0 ↗ · + Follow
5,150 symbols 17,973 edges 472 files 4,442 documented · 86%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

hcd

ISC License

What is HyperCash(HC)?

hcd is a Hc full node implementation written in Go (golang).

This acts as a chain daemon for the Hc cryptocurrency. hcd maintains the entire past transactional ledger of Hc and allows relaying of quantum resistant transactions to other Hc nodes across the world.

Note: To send or receive funds and join Proof-of-Stake mining, you will also need hcwallet.

HC is forked from Decred and btcd which are full node implementations written in Go. Both projects are ongoing and under active development. Since hcd is synced and will merge with upstream commits from hcd and btcd, it will get the benefit of both hcd and btcd's ongoing upgrades to staking, voting, peer and connection handling, database optimization and other blockchain related technology improvements. Advances made by hcd can also be pulled back upstream to hcd and btcd including quantum resistant signature schemes and more.

Development Process

The master branch is regularly built and tested, but is not guaranteed to be completely stable. Tags are created regularly to indicate new official, stable release versions of hcd.

Requirements

Go 1.7 or newer.

Getting Started

  • hcd (and utilities) will now be installed in either $GOROOT/bin or $GOPATH/bin depending on your configuration. If you did not already add the bin directory to your system path during Go installation, we recommend you do so now.

Installing

Build from Source

  • Dep

Dep is used to manage project dependencies and provide reproducible builds. To install:

go get -u github.com/golang/dep/cmd/dep

Unfortunately, the use of dep prevents a handy tool such as go get from automatically downloading, building, and installing the source in a single command. Instead, the latest project and dependency sources must be first obtained manually with git and dep, and then go is used to build and install the project.

Getting the source:

For a first time installation, the project and dependency sources can be obtained manually with git and dep (create directories as needed):

git clone https://github.com/HcashOrg/hcd $GOPATH/src/github.com/HcashOrg/hcd
cd $GOPATH/src/github.com/HcashOrg/hcd
dep ensure
go install . ./cmd/...

To update an existing source tree, pull the latest changes and install the matching dependencies:

cd $GOPATH/src/github.com/HcashOrg/hcd
git pull
dep ensure -update
go install . ./cmd/...

Running

Make sure you are working the correct GOPATH and run the following in your terminal:

hcd -u YOURUNIQUERPCUSERNAME -P YOURUNIQUERPCPASSWORD --testnet

To use your node for mining add the miningaddr flag when running hcd:

hcd -u YOURUNIQUERPCUSERNAME -P YOURUNIQUERPCPASSWORD --testnet --miningaddr=YOURTESTNETADDRESS

To generate a testnet mining address you must install hcwallet

To begin CPU mining after hcd is already running you can run the following in your terminal:

hcctl -u YOURUNIQUEUSERNAME -P YOURUNIQUEPASSWORD --testnet setgenerate true

REINSTALL

Linux

$ rm -rf $HOME/.hcd
$ rm -rf $HOME/.hcwallet
$ cd $HOME/go/src/github.com/HcashOrg/hcd
$ git pull
$ go install $(glide nv)

Mac/OSX

$ rm -rf $HOME/Library/Application\ Support/Hcwallet
$ rm -rf $HOME/Library/Application\ Support/Hcd
$ cd $HOME/go/src/github.com/HcashOrg/hcd
$ git pull
$ go install $(glide nv)

Issue Tracker

The integrated github issue tracker is used for this project.

Documentation

The documentation is a work-in-progress. It is located in the docs folder.

License

hcd is licensed under the copyfree ISC License.

Extension points exported contracts — how you extend this code

Message (Interface)
Message is an interface that describes a HC message. A type that implements Message has complete control over the repre [25 …
wire/message.go
Address (Interface)
Address is an interface type for any type of destination a transaction output may spend to. This includes pay-to-pubkey [7 …
hcutil/address.go
TreapForEacher (Interface)
TreapForEacher is an interface which allows iteration of a treap in ascending order using a user-supplied callback for e [5 …
database/ffldb/dbcache.go
TestInstance (Interface)
TestInstance is an interface that describes a specific test instance returned by the tests generated in this package. I [5 …
blockchain/fullblocktests/generate.go
IndexManager (Interface)
IndexManager provides a generic interface that the is called when blocks are connected and disconnected to and from the [4 …
blockchain/chain.go
CoinSelector (Interface)
CoinSelector is an interface that wraps the CoinSelect method. CoinSelect will attempt to select a subset of the coins [4 …
hcutil/coinset/coins.go
Indexer (Interface)
Indexer provides a generic interface for an indexer that is managed by an index manager such as the Manager type provide [3 …
blockchain/indexers/common.go
Signature (Interface)
Signature is an interface representing a signature and its associated functions. [3 implementers]
chaincfg/chainec/chainec.go

Core symbols most depended-on inside this repo

MustRegisterCmd
called by 272
hcjson/register.go
Square
called by 260
hcec/secp256k1/field.go
Hash
called by 256
hcutil/coinset/coins.go
MsgTx
called by 229
hcutil/tx.go
String
called by 224
hcutil/address.go
Add
called by 198
chaincfg/chainec/chainec.go
ruleError
called by 168
blockchain/error.go
NextBlock
called by 163
blockchain/chaingen/generator.go

Shape

Function 2,360
Method 1,812
Struct 828
TypeAlias 103
Interface 31
FuncType 16

Languages

Go100%
Python1%

Modules by API surface

hcjson/ominicmds.go185 symbols
rpcserver.go144 symbols
rpcwebsocket.go111 symbols
txscript/opcode.go100 symbols
blockmanager.go96 symbols
server.go95 symbols
hcjson/chainsvrcmds.go95 symbols
hcutil/address.go85 symbols
blockchain/chaingen/generator.go83 symbols
hcjson/ominiresults.go80 symbols
database/ffldb/db.go79 symbols
blockchain/chainio.go75 symbols

For agents

$ claude mcp add hcd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact