This communicates with the Ledger over TCP, which is what the ledger
emulator requires.
To use, specify:
--hw-device LedgerTCP --hw-device-address localhost:9999
to the wallet command-line arguments.
- Clean up a bunch of not very nice C and older C++ code in the
`device/` tree.
- Rename device/device_io_* source files to io_*, and remove their `_io`
suffix from the class names (since they are *already* inside an `io`
namespace).
The public rpc port code from Monero is not used on Oxen (we have no
ability to enable it because we didn't want it), but still carried
around and printed pointlessly. This removes it entirely.
Along the way I ran into some really nasty p2p code using templates for
absolutely no reason at all, so I fixed that crap, and moved some p2p
serialization out of headers into a .cpp file. (This only scratches the
surface, but as we're going to replace the p2p code entirely eventually
I don't want to waste time trying to polish a turd).
Updates GET_PEER_LIST to new RPC.
Removes GET_PUBLIC_NODES because we don't use this option at all in
oxend. (At the point where we need a decentralized public node
repository we'll almost certainly want to use the service node network
to do it, not the p2p layer).
We have no need for any of this, so just remove it rather than convert
it.
(This doesn't drop block generation support, which we can still do via
start/stop mining calls, but rather just the ability to hook up an
external miner, which we are unlikely to ever need again).
This endpoint has bizarre inputs and outputs, so this breaks
compatibility to make them sane.
Old:
"height": [h]
where h must be exactly 1 height (yes, that 1 single height must be in a
list), and output is the raw hash as a string (no dict, etc. around it).
New in:
"heights": [123, 456, ...]
Result:
{
"123": "hash123",
"456": "hash456",
"status": "OK"
}
- Rename endpoint from "send_raw_transaction" to "submit_transaction"
and rename the RPC struct similarly.
- Rename tx_as_hex to just tx, and start accepting it as hex, base64, or
raw bytes. (Transactions formats are consistent enough that we can
easily tell which one we have from the first couple bytes).
- Drop `do_not_relay` parameter as I can see no purpose to ever
submitting a transaction to a daemon that shouldn't be relayed. (The
only use I can see would be to try to exploit a PoW network with
double-spends).
- Drop `do_sanity_checks` parameter; the checks done here should be (and
are!) done by the wallet, not the oxend receiving the completed
transaction.