-
Notifications
You must be signed in to change notification settings - Fork 1
config.go Explained
Alexey Zilber edited this page Oct 17, 2019
·
2 revisions
If you want to add a new coin to Node Noodle, it's very easy, but you must understand the methodology used.
config.go encapsulates a json config. You only need to edit the json part of the config. Saving, and running go test, will automatically verify the json config to make sure it passes a lint test.
The json config is setup to allow the chaining of coin "-cli" commands; grabbing the output of the first, and using it in the inputs of the next command. This allows it the flexibility to work with most Insight, as well as various random API's for block height and status reporting.
- "name": Display name of your coin.
- "tag": The short name of your coin, mostly used by exhanges.
- "binary": The name of the "-cli" binary that's used to communicate with the running coin.
- "cmdchain": The list of commands that get executed is succession to get the final getblockheader line of data.
- ->
%b: Will be substituted with the binary above. - ->
%0: Will be substituted with the output of the previous command. - "blocktime": The coin specific block time that the coin is configured for. This varies by coin.
- "insight": External or Insight server support block
- -> "baseurl": Specify a url for the Insight or External server.
%0is replaced with the contents of the "status" block. - -> "status": The command we send to the Insight/External server.
- -> "format": Output format we expect. Currently json (Insight) is supported as well as text for a raw value.
- -> "key": A json key that contains the current block height. This is ignored if format above is anything other than json
(c) 2021 ConsulTent Pte. Ltd.