darkfid: Move misc RPC methods to separate module.

This commit is contained in:
x
2026-01-01 15:50:45 +00:00
parent 874d8dcf1a
commit 0d455a405a
4 changed files with 106 additions and 78 deletions

View File

@@ -19,8 +19,9 @@ all: $(JSONRPC)
$(DARKFID_JSONRPC):
@echo "# darkfid JSON-RPC API" > $@
./build_jsonrpc.py ../bin/darkfid/src/rpc/mod.rs >> $@
for i in blockchain stratum tx xmr; do \
@echo "## Methods" >> $@
@echo "<!-- toc -->" >> $@
for i in blockchain tx stratum xmr misc; do \
echo "## $$i methods" >> $@ ;\
./build_jsonrpc.py ../bin/darkfid/src/rpc/$$i.rs >> $@ ;\
done

View File

@@ -106,7 +106,7 @@ def main(path):
"response": json.dumps(parsed_res, indent=2),
"line": start_line
})
for m in methods:
anchor = m["method"].replace(".", "").replace("/", "").lower()
print(f"### `{m['method']}`\n")