2024-08-27 16:09:44 +02:00
|
|
|
use napi_derive::napi;
|
|
|
|
|
2024-09-27 23:34:48 +02:00
|
|
|
/// Hash function
|
2024-08-27 16:09:44 +02:00
|
|
|
#[napi(js_name = "hash")]
|
2024-09-25 22:56:07 +02:00
|
|
|
pub fn js_hash(data: String) -> i64 {
|
2024-10-01 00:42:57 +02:00
|
|
|
crate::ext::hash(data)
|
2024-08-27 16:09:44 +02:00
|
|
|
}
|
2024-09-25 14:09:24 +02:00
|
|
|
|
2024-09-27 23:34:48 +02:00
|
|
|
/// Get the current version of the client
|
2024-09-25 14:09:24 +02:00
|
|
|
#[napi(js_name = "version")]
|
2024-09-25 22:56:07 +02:00
|
|
|
pub fn js_version() -> String {
|
2024-10-12 22:14:17 +02:00
|
|
|
crate::version().to_string()
|
2024-09-25 22:56:07 +02:00
|
|
|
}
|