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

101 lines
2.8 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))
(defn login-with-keycard
[{:keys [whisper-private-key encryption-public-key on-result]}]
(native-module/login-with-keycard whisper-private-key encryption-public-key on-result))
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 sign-typed-data [data password callback]
(native-module/sign-typed-data data password callback))
(defn send-transaction [rpcParams password callback]
(native-module/send-transaction rpcParams password callback))
(defn hash-transaction [rpcParams callback]
(native-module/hash-transaction rpcParams callback))
(defn send-transaction-with-signature [rpcParams sig callback]
(native-module/send-transaction-with-signature rpcParams sig callback))
(defn send-data-notification [m callback]
(native-module/send-data-notification m callback))
(defn send-logs [dbJson]
(native-module/send-logs dbJson))
(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)
(def rooted-device? native-module/rooted-device?)
(def chaos-mode-update native-module/chaos-mode-update)