   `(defn ~name ~(get-description name) 
      ([~@args] (btc-rpc ~(str name) ~@args))
      ([~@(butlast args)] (btc-rpc ~(str name) ~@(butlast args)))
-     )) 
+     ))
+(defmacro def-rpc-all-opt [name & args]
+  `(defn ~name ~(get-description name) 
+     ([~@args] (btc-rpc ~(str name) ~@args))
+     ([] (btc-rpc ~(str name)))
+     ))
 
 ;;--------RPC calls-----------
 

;listreceivedbyaddress ( minconf include_empty include_watchonly)
;listsinceblock ( "blockhash" target_confirmations include_watchonly)
;listtransactions ( "account" count skip include_watchonly)
;listunspent ( minconf maxconf  ["addresses",...] [include_unsafe] )
;lockunspent unlock ([{"txid":"txid","vout":n},...])
;move "fromaccount" "toaccount" amount ( minconf "comment" )
(def-rpc removeprunedfunds txid)


(s/fdef getblockhash
  :args ::height      
  :ret ::hex-string)
(def-rpc getblockhash height)

(s/fdef getblockheader 
  :args (s/alt :verbose (s/cat :hash string?), :choice (s/cat :hash string?, :verbose boolean?))
  :ret map?)
(def-rpc-opt getblockheader hash verbose)

(s/fdef getchaintips :ret vector?) 
