Delightful JSON-RPC 2.0 client for Clojure(Script).
;; Choose from HTTP[S], WebSocket and UNIX socket
(def url ^:private ^:const "http://localhost:8545")
(def url ^:private ^:const "wss://localhost:8546")
(def url ^:private ^:const "unix:///var/run/geth.ipc")
(def connection ^:private ^:const (json-rpc/connect url))
(json-rpc/send! connection "eth_blockNumber" ["latest"])
@(json-rpc/send! connection "eth_blockNumber" ["latest"])
;; Like send! but accepts a variable number of arguments
(json-rpc/send!* connection "eth_blockNumber" "latest")
@(json-rpc/send!* connection "eth_blockNumber" "latest")
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close