Expand description
darkfid JSON-RPC related methods
Structs§
- Darkfid
RpcClient - Structure to hold a JSON-RPC client and its config, so we can recreate it in case of an error.
- Scan
Cache - Auxiliary structure holding various in memory caches to use during scan
Functions§
- subscribe_
blocks - Subscribes to darkfid’s JSON-RPC notification endpoint that serves new confirmed blocks. Upon receiving them, all the transactions are scanned and we check if any of them call the money contract, and if the payments are intended for us. If so, we decrypt them and append the metadata to our wallet. If a reorg block is received, we revert to its previous height and then scan it. We assume that the blocks up to that point are unchanged, since darkfid will just broadcast the sequence after the reorg.