hsd
requires Node.js v14 or higher.
Every verifying process described below will need project maintainer keys. You can get keys following Security document.
git clone --depth 1 --branch latest https://github.com/handshake-org/hsd.git
cd hsd
npm install --omit=dev
# run full node in foreground with default configuration
./bin/hsd
Note that node-gyp
must be installed. See the
node-gyp documentation for more
information.
Note this does not verify dependencies,
they are downloaded from the npm
.
cd hsd
git verify-tag latest
It is not recommended to install hsd
from npm's repositories
but it is still possible to install with npm
using a remote
git
repository.
$ npm install -g https://github.com/handshake-org/hsd.git
A git
ref can be used to install a particular version by appending
a #
and the name of the git
ref to the URL. For example,
https://github.com/handshake-org/hsd.git#latest
. It is recommended
to use the latest tagged release.
If adding hsd
as a dependency to a project, use the command:
$ npm install --save https://github.com/handshake-org/hsd.git
Not supported.
hsd
is available via Homebrew. This
will install all required dependencies as well as unbound
.
$ brew install hsd
Not supported.
To build a Docker image with the name hsd:<version>-<commit>
, run:
$ VERSION=$(cat package.json | grep version | sed 's/.*"\([0-9]*\.[0-9]*\.[0-9]*\)".*/\1/')
$ COMMIT=$(git rev-parse --short HEAD)
$ docker build -t hsd:$VERSION-$COMMIT .
Baked images are available here.
docker pull ghcr.io/handshake-org/hsd:latest
To start a container named hsd
on main
network with an exposed
node API server, run:
$ docker run --name hsd \
--publish 12037:12037 \
--volume $HOME/.hsd:/root/.hsd \
hsd:$VERSION-$COMMIT \
--http-host 0.0.0.0 \
--api-key=foo
To test connectivity, curl the info endpoint:
$ curl http://x:foo@localhost:12037/
Note: by default, none of the container's ports are exposed. Depending on the network used for your node, you will need to expose the correct ports for the node's various services (node http api, wallet http api, recursive name server, authoritative name server, p2p protocol, encrypted p2p protocol). The default ports can be found here. The DNS servers must also expose a UDP port. The syntax is different from TCP and can be found here.
To stop a container named hsd
, run:
$ docker stop hsd