pub struct UnlockRequest {}Expand description
UnlockRequest requests the device to start the unlock procedure. This request is async, potentially returning a response only after confirming with the app.
It will trigger sending a RelayArkToAppRequest with the request content:
- method: “unlock”
- params: []
The request expects a RelayAppToArkResponse with the response content:
If approved: - result = key: [u8; 32] // Shared secret from the pairing protocol - err_code: 0 - err_str: “”
If denied: - result = key = [0u8; 32] // All zeroes (signals a denial) - err_code: 0 // No error, deny is valid user choice - err_str: “” // No error, deny is valid user choice
where:
- key: Symmetric key for accessing the storage partition
Note, relayed messages are encrypted and authenticated on the timestamp and request/response id, so there’s no need for further complications.
Trait Implementations§
Source§impl Clone for UnlockRequest
impl Clone for UnlockRequest
Source§fn clone(&self) -> UnlockRequest
fn clone(&self) -> UnlockRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for UnlockRequest
Source§impl Debug for UnlockRequest
impl Debug for UnlockRequest
Source§impl Default for UnlockRequest
impl Default for UnlockRequest
impl Eq for UnlockRequest
Source§impl From<UnlockRequest> for Message
impl From<UnlockRequest> for Message
Source§fn from(message: UnlockRequest) -> Self
fn from(message: UnlockRequest) -> Self
Wraps a concrete payload in its corresponding message variant.
Source§impl Hash for UnlockRequest
impl Hash for UnlockRequest
Source§impl Message for UnlockRequest
impl Message for UnlockRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.