Liking cljdoc? Tell your friends :D

district.server.web3-events


dispatchcljs

(dispatch err {:keys [:contract :event] :as evt})

load-checkpoint-from-filecljs

(load-checkpoint-from-file file-path callback)

register-after-past-events-dispatched-callback!cljs

(register-after-past-events-dispatched-callback! callback)

register-callback!cljs

(register-callback! event-key callback & [callback-id])

save-checkpoint-to-filecljs

(save-checkpoint-to-file file-path new-state)

startcljs

(start {:keys [:events :skip-past-events-replay? :from-block :block-step
               :checkpoint-file :crash-on-event-fail? :save-checkpoint
               :load-checkpoint :callback-after-past-events :backtrack]
        :as opts
        :or {block-step 1
             backtrack 0
             save-checkpoint (partial save-checkpoint-to-file
                                      (:checkpoint-file opts))
             load-checkpoint (partial load-checkpoint-from-file
                                      (:checkpoint-file opts))
             callback-after-past-events start-dispatching-latest-events!}})

When :skip-past-events-replay? is false, will obtain the last processed block via fn provided by load-checkpoint When stopped will save last processed block using save-checkpoint

If :checkpoint-file is provided (and no function passed via <load/save>-checkpoint), will default to writing to the file specified by :checkpoint-file

Arguments: (save-checkpoint {:last-processed-block 123 :processed-log-indexes [1, 2, 3]} callback-fn-when-done) (load-checkpoint callback-fn-when-with-checkpoint-data)

When :skip-past-events-replay? is false, will obtain the last processed block
via fn provided by load-checkpoint
When stopped will save last processed block using save-checkpoint

If :checkpoint-file is provided (and no function passed via <load/save>-checkpoint),
will default to writing to the file specified by :checkpoint-file

Arguments:
  (save-checkpoint {:last-processed-block 123
                    :processed-log-indexes [1, 2, 3]}
                   callback-fn-when-done)
  (load-checkpoint callback-fn-when-with-checkpoint-data)
raw docstring

stopcljs

(stop web3-events)

unregister-callbacks!cljs

(unregister-callbacks! callback-ids)

update-checkpoint-atom!cljs

(update-checkpoint-atom! block-number tx log-index)

web3-eventscljs


wrap-callback-checkpoint-middlewarecljs

(wrap-callback-checkpoint-middleware callback)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close