aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/doom/config.org25
-rw-r--r--config/shepherd/init.d/cardano.scm15
2 files changed, 34 insertions, 6 deletions
diff --git a/config/doom/config.org b/config/doom/config.org
index bca39c4..4708246 100644
--- a/config/doom/config.org
+++ b/config/doom/config.org
@@ -421,30 +421,43 @@ Emacs mode for managing ledger text files
** Crypto
#+begin_src emacs-lisp
(use-package! cardano-tx
- :commands (cardano-tx-new cardano-cli-tip)
+ :commands (cardano-tx-new cardano-tx-cli-tip)
:load-path "~/dev/cardano/emacs-wallet"
:init
(defun on/cardano-set-network ()
(interactive)
(let* ((networks '((:mainnet "/tmp/alinamn.socket" "http://localhost:8090" "--mainnet")
(:testnet "/tmp/alinatn.socket" "http://localhost:8091" "--testnet-magic" "1097911063")
+ (:vasil "/home/titan/test-cardano/dev-vasil/bp-vasil.socket" "http://localhost:8093" "--testnet-magic" "9")
))
(pick
(alist-get
(completing-read "Pick network" networks)
networks nil nil #'string=)))
- (setq cardano-cli-node-socket (expand-file-name (car pick))
+ (setq cardano-tx-cli-node-socket (expand-file-name (car pick))
cardano-wallet-url (cadr pick)
- cardano-cli-network-args (cddr pick))))
+ cardano-tx-cli-network-args (cddr pick))))
:config
- (setq cardano-log-level 'debug)
- (setq cardano-cli-command (expand-file-name "~/dev/cardano/cardano-node/cli"))
- (setq cardano-db-keyring-dir "~/dev/cardano/emacs-wallet/keys/demo"))
+ (add-hook! 'doom-real-buffer-functions
+ (defun cardano-interesting-buffer (b)
+ "Whether the current buffer's major-mode is a cardano mode."
+ (with-current-buffer b
+ (memq major-mode '(cardano-db-addresses-mode
+ cardano-db-files-mode
+ cardano-tx-mode
+ cardano-wallet-tx-log-mode)))))
+ (setq cardano-tx-log-level 'debug)
+ ;; (setq cardano-cli-command (expand-file-name "~/dev/cardano/cardano-node/cli"))
+ (setq cardano-tx-cli-command "/home/titan/dev/cardano/cardano-node/dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-cli-1.35.0/x/cardano-cli/build/cardano-cli/cardano-cli")
+ (setq cardano-tx-db-keyring-dir "~/dev/cardano/emacs-wallet/keys/demo"))
(use-package! cardano-wallet
:commands (cardano-wallet-balances)
:load-path "~/dev/cardano/emacs-wallet")
#+end_src
+
+#+RESULTS:
+
* Books
#+begin_src emacs-lisp :tangle "packages.el"
(package! nov)
diff --git a/config/shepherd/init.d/cardano.scm b/config/shepherd/init.d/cardano.scm
index 0cdbb06..3c891b8 100644
--- a/config/shepherd/init.d/cardano.scm
+++ b/config/shepherd/init.d/cardano.scm
@@ -136,6 +136,21 @@
(register-services
(make <service>
+ #:docstring "Cardano Vasil cncli sync"
+ #:provides '(vasil-cncli-sync)
+ #:start (make-forkexec-constructor
+ (list "cncli"
+ "sync" "--host" "127.0.0.1" "--port" "3005"
+ "--network-magic" "9"
+ "--db" (string-append (getenv "HOME") "/test-cardano/dev-vasil/blocklog.db")
+ )
+ #:log-file (string-append (getenv "HOME") "/test-cardano/dev-vasil/log/cncli.log"))
+
+ #:stop (make-kill-destructor 2) ;; 2 is SIGINT - interupt process stream, ctrl-C
+ #:requires '(vasil-bp)))
+
+(register-services
+ (make <service>
#:docstring "Cardano Vasil wallet"
#:provides '(vasil-wallet)
#:start (make-forkexec-constructor