status-react/src/status_im/native_module/core.cljs

84 lines
2.2 KiB
Plaintext
Raw Normal View History

2017-09-05 14:14:45 +00:00
(ns status-im.native-module.core
2018-07-30 03:47:08 +00:00
(:require [status-im.native-module.impl.module :as native-module]))
2017-09-05 14:14:45 +00:00
(def adjust-resize 16)
(defn start-node [config]
(native-module/start-node config))
(def node-started (atom false))
(defn node-ready []
(reset! node-started true)
(native-module/node-ready))
(defn stop-node []
(reset! node-started false)
2018-07-30 03:47:08 +00:00
(native-module/stop-node))
2017-09-05 14:14:45 +00:00
(defn create-account [password callback]
2018-07-30 03:47:08 +00:00
(native-module/create-account password callback))
2017-09-05 14:14:45 +00:00
(defn recover-account [passphrase password callback]
2018-07-30 03:47:08 +00:00
(native-module/recover-account passphrase password callback))
2017-09-05 14:14:45 +00:00
(defn login [address password callback]
2018-07-30 03:47:08 +00:00
(native-module/login address password callback))
2017-09-05 14:14:45 +00:00
(defn verify [address password callback]
(native-module/verify address password callback))
2017-09-05 14:14:45 +00:00
(defn set-soft-input-mode [mode]
2018-07-30 03:47:08 +00:00
(native-module/set-soft-input-mode mode))
2017-09-05 14:14:45 +00:00
(defn clear-web-data []
2018-07-30 03:47:08 +00:00
(native-module/clear-web-data))
2017-09-05 14:14:45 +00:00
(defn call-rpc [payload callback]
(when @node-started
(native-module/call-rpc payload callback)))
2017-09-05 14:14:45 +00:00
(defn call-private-rpc [payload callback]
(when @node-started
(native-module/call-private-rpc payload callback)))
(defn sign-message [rpcParams callback]
(native-module/sign-message rpcParams callback))
(defn send-transaction [rpcParams password callback]
(native-module/send-transaction rpcParams password callback))
2017-09-05 14:14:45 +00:00
(defn module-initialized! []
2018-07-30 03:47:08 +00:00
(native-module/module-initialized!))
2017-09-05 14:14:45 +00:00
2018-07-30 03:47:08 +00:00
(defn notify-users [m callback]
(native-module/notify-users m callback))
(defn add-peer [enode callback]
2018-07-30 03:47:08 +00:00
(native-module/add-peer enode callback))
(defn close-application []
2018-07-30 03:47:08 +00:00
(native-module/close-application))
(defn connection-change [data]
2018-07-30 03:47:08 +00:00
(native-module/connection-change data))
(defn app-state-change [state]
2018-07-30 03:47:08 +00:00
(native-module/app-state-change state))
2018-05-01 10:27:04 +00:00
(defn get-device-UUID [callback]
2018-07-30 03:47:08 +00:00
(native-module/get-device-UUID callback))
(defn is24Hour []
(native-module/is24Hour))
(def extract-group-membership-signatures native-module/extract-group-membership-signatures)
(def sign-group-membership native-module/sign-group-membership)
(def enable-installation native-module/enable-installation)
(def disable-installation native-module/disable-installation)
(def update-mailservers native-module/update-mailservers)