Fixes#393
Smarter identification of auth type (usernamePassword/cookie); if using cookie auth, watch cookie file for changes and, if seen, reload and attempt rpc reconnect
For a while this project used a fork of ruimarinho/bitcoin-core (the Bitcoin RPC project recommended on an old wiki: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)). Our fork had some minor lint cleanup and updates to some very old dependencies. The upstream project is barely maintained and continues to depend on other libraries with known vulnerabilities. Rather than try to update the fork, this change switches to the jayson RPC library, which is general-purpose rather than bitcoin-specific, is more widely deployed, is better maintained, and lacks vulnerable, old dependencies.
I'll clean this up later, but I wanted v1.0 live for my favorite Bitcoin Holiday on 5-22...
Show a banner on the homepage when "today" is a Bitcoin Holiday. Also show the full curated list at /holidays. This list began as an adaptation of the data on bitcoin.holiday.
-load difficulty history at startup, and store ath for use on hp
-hp: display ath data next to difficulty; add some clickthrough icons next to items in network summary
-move difficulty history logic to coreApi (was in internalApiRouter)
-clean up deprecated "new Buffer()" (use Buffer.from() instead)
-versioning support for utils.fileCache (old versions will be deleted automatically)
-include line breaks in utils.fileCache json output
-change icon for diff history
-switch from fontawesome to bootstrap icons (FA is too heavy)
-url change: /mining-template -> /next-block
-/node-details: split out interfaces into separate section; split out upload/download
-new fun item: value burned in OP_RETURN output
-reorganize img files
-minor ui/text tweaks
-support for accessing resources via a configurable CDN (probably cloudfront, backed by S3, as I plan to use for the public demo site)
-move resource integrity hashes into a single file (generated by "npm run integrity") for easier maintenance
-cleanup some startup logic
-more updated dependencies
By default, we'll use the browser's timezone offset. On the first page load of a session, we'll render any dates on the page with UTC but then refresh dynamically once we get the browser's offset. Subsequent page loads will not need this dynamic refresh because the browser default will be stored in the session for future use.
Users can also set a custom offset, which is helpful in situations where the browser offset is incorrect (like in Firefox with resistFingerprinting=true).
- Updated dependencies, including removing "bitcoin-core" in favor of a self-maintained fork "btc-rpc-client" (forked from bitcoin-core v3.0) which fixes a dependency-based security vulnerability there; the bitcoin-core-v3.0 bump changes the callback structure of the library so changes have been made adding "await" for rpc-client calls
- Fix some parameter-parsing problems with /rpc-browser and /rpc-terminal tools