mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-31 02:45:20 +00:00
15 lines
290 B
Clojure
15 lines
290 B
Clojure
(ns utils.validators)
|
|
|
|
(defn valid-public-key?
|
|
[s]
|
|
(and (string? s)
|
|
(not-empty s)
|
|
(boolean (re-matches #"0x04[0-9a-f]{128}" s))))
|
|
|
|
(defn valid-compressed-key?
|
|
[s]
|
|
(and (string? s)
|
|
(not-empty s)
|
|
(boolean (re-matches #"^zQ3[0-9A-HJ-NP-Za-km-z]{46}" s))))
|
|
|