This repository contains Metahash Fullnode Client's source code written in C++.
There are 2 ways to build MetaHash client you may choose from:
- build docker container from Dockerfile, see Create-docker-file,
- build from source code, see Building section below.
For more details about Metahash fullnode client capabilities, installation and usage see wiki.
sudo apt install rapidjson-dev libgmp-dev libcurl4-gnutls-dev
cd /tmp/
git clone https://github.com/metahashorg/metahash-fullnode-client
cd metahash-fullnode-client/
mkdir build
cd build
cmake ..
make
Note: if you receive error like "Command 'cmake' not found." you need to install cmake:
sudo apt install cmake
run --help what would see allowed options
run --request what would will see description for requests
{"id":decimal, "version":"2.0","method":"generate", "params":{"password":"str"}}
You don't need to enter the password in this version.
{"id":decimal, "version":"2.0","method":"fetch-balance", "params":{"address":"hexstr"}}
{"id":decimal, "version":"2.0","method":"fetch-history", "params":{"address":"hexstr"}}
{"id":decimal, "version":"2.0","method":"create-tx", "params":{"address":"hexstr", "password":"str", "to":"hexstr", "value":"decimal/all", "fee":"decimal", "nonce":"decimal", "data": "str"}}
You don't need to enter the password in this version.
{"id":decimal, "version":"2.0","method":"send-tx", "params":{"address":"hexstr", "password":"str", "to":"hexstr", "value":"decimal/all", "fee":"decimal", "nonce":"decimal", "data": "str"}}
You may not provide nonce, in this case it will be calculated automatically. You don't need to enter the password in this version.
{"id":1, "version":"2.0", "method":"get-count-blocks"}
{"id":1, "version":"2.0", "method":"get-last-txs"}
{"id":1, "version":"2.0", "method":"get-block-by-hash", "params":{"hash":"str"}}
If the block is state-block then probably it will rejected
{"id":1, "version":"2.0", "method":"get-block-by-number", "params":{"number":decimal}}
If the block is state-block then probably it will rejected
{"id":1, "version":"2.0", "method":"get-blocks", "params":{"countBlocks":decimal, "beginBlock":decimal}}
{"id":1, "version":"2.0", "method":"get-dump-block-by-number", "params":{"number":decimal}}
{"id":1, "version":"2.0", "method":"get-dump-block-by-hash", "params":{"hash":"str"}}
{"id":1, "version":"2.0", "method":"get-tx", "params":{"hash":"str"}}
{"id":1, "version":"2.0", "method":"status", "params":{"cmd":"str"}}
Params are optional. Also you can get it by GET request.