Add get_pairing_process_id()
This commit is contained in:
parent
d99d4f0067
commit
e92384fc93
@ -524,6 +524,15 @@ pub fn set_shared_secrets(secrets: String) -> ApiResult<()>{
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn get_pairing_process_id() -> ApiResult<String> {
|
||||||
|
let local_device = lock_local_device()?;
|
||||||
|
|
||||||
|
let pairing_commitment = local_device.get_pairing_commitment().ok_or(ApiError::new("Device is not paired".to_owned()))?;
|
||||||
|
|
||||||
|
Ok(pairing_commitment.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn dump_device() -> ApiResult<String> {
|
pub fn dump_device() -> ApiResult<String> {
|
||||||
let local_device = lock_local_device()?;
|
let local_device = lock_local_device()?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user