diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/doom/config.org | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/doom/config.org b/config/doom/config.org index b867722..6caedcb 100644 --- a/config/doom/config.org +++ b/config/doom/config.org @@ -563,7 +563,31 @@ Emacs mode for managing ledger text files #+end_src #+begin_src emacs-lisp (use-package! json-rpc) + +(use-package! btc-explorer + :load-path "~/dev/emacs-lisp/btc-explorer/" + :commands (on/bitcoin-rpc-connect) + :config + (defun on/bitcoin-rpc-connect () + (interactive) + (let* ((networks '(:mainnet 8332 + :testnet 18332 + :regtest 18443)) + (host "localhost") + (user "crazy") + (port (plist-get networks + (intern (completing-read "Pick network: " networks)))) + (secret (-some-> + (auth-source-search :host host) + (car) + (plist-get :secret)))) + (when (and btc-explorer-bitcoind + (json-rpc-live-p btc-explorer-bitcoind)) + (json-rpc-close btc-explorer-bitcoind)) + (setq btc-explorer-bitcoind + (json-rpc-connect host port user (funcall secret)))))) #+end_src + #+begin_src emacs-lisp (use-package! shepherd :load-path "~/dev/dotfiles/elisp/" |