This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Node Rest API Guide
Gary Yu edited this page Sep 12, 2019
·
1 revision
$ curl -0 -XGET -u gotts:`cat ~/.gotts/floo/.api_secret` http://127.0.0.1:13513/v1/
[
"get blocks",
"get headers",
"get chain",
"get chain/outputs/byids?id=xxx,yyy,zzz",
"get chain/kernels/byids?id=xxx,yyy,zzz",
"get chain/kernel/XXX?min_height=YYY&max_height=ZZZ",
"get status",
"get txhashset/roots",
"get txhashset/lastoutputs?n=10",
"get txhashset/lastrangeproofs",
"get txhashset/lastkernels",
"get txhashset/outputs?start_index=1&max=100",
"get txhashset/merkleproof?id=xxx",
"get pool",
"post pool/push_tx",
"post peers/a.b.c.d:p/ban",
"post peers/a.b.c.d:p/unban",
"get peers/all",
"get peers/connected",
"get peers/a.b.c.d",
"get version"
]
$ curl -0 -XGET -u gotts:`cat ~/.gotts/floo/.api_secret` http://127.0.0.1:13513/v1/version
{
"node_version": "0.0.2",
"block_header_version": 1
}
$ curl -0 -XGET -u gotts:`cat ~/.gotts/floo/.api_secret` http://127.0.0.1:13513/v1/status
{
"protocol_version": 1,
"user_agent": "MW/Gotts 0.0.1",
"connections": 1,
"tip": {
"height": 1507,
"last_block_pushed": "013c9d17bcd4860c9cc57ac31c873500096977dff96d2493d8d4b6803c17c533",
"prev_block_to_last": "1753499e5ad601b74c9c80bb5829a08eb9093fd6243a08b76247e35b40f4ef39",
"total_difficulty": 104615170
}
}