Skip to main content

HostRequest

Enum HostRequest 

Source
pub enum HostRequest {
Show 21 variants Handshake { version: u8, }, GetNonProductAccounts, FeatureSupported { feature_data: Vec<u8>, }, LocalStorageRead { key: String, }, LocalStorageWrite { key: String, value: Vec<u8>, }, LocalStorageClear { key: String, }, SignPayload { public_key: Vec<u8>, payload: Vec<u8>, }, SignRaw { public_key: Vec<u8>, data: Vec<u8>, }, CreateTransaction { payload: Vec<u8>, }, NavigateTo { url: String, }, PushNotification { text: String, deeplink: Option<String>, }, AccountConnectionStatusStart, JsonRpcSend { data: Vec<u8>, }, JsonRpcSubscribeStart { data: Vec<u8>, }, ChainHeadFollowStart { genesis_hash: Vec<u8>, with_runtime: bool, }, ChainHeadRequest { tag: u8, genesis_hash: Vec<u8>, follow_sub_id: String, data: Value, }, ChainSpecRequest { tag: u8, genesis_hash: Vec<u8>, }, ChainTxBroadcast { genesis_hash: Vec<u8>, transaction: Vec<u8>, }, ChainTxStop { genesis_hash: Vec<u8>, operation_id: String, }, Unimplemented { tag: u8, }, Unknown { tag: u8, },
}
Expand description

Decoded incoming request from the app.

Variants§

§

Handshake

Fields

§version: u8
§

GetNonProductAccounts

§

FeatureSupported

Fields

§feature_data: Vec<u8>
§

LocalStorageRead

Fields

§

LocalStorageWrite

Fields

§value: Vec<u8>
§

LocalStorageClear

Fields

§

SignPayload

Fields

§public_key: Vec<u8>
§payload: Vec<u8>
§

SignRaw

Fields

§public_key: Vec<u8>
§data: Vec<u8>
§

CreateTransaction

Fields

§payload: Vec<u8>
§

NavigateTo

Fields

§

PushNotification

Fields

§text: String
§deeplink: Option<String>
§

AccountConnectionStatusStart

§

JsonRpcSend

Fields

§data: Vec<u8>
§

JsonRpcSubscribeStart

Fields

§data: Vec<u8>
§

ChainHeadFollowStart

chainHead_v1_follow start: genesis hash + withRuntime flag

Fields

§genesis_hash: Vec<u8>
§with_runtime: bool
§

ChainHeadRequest

chainHead request with genesis hash, follow subscription ID, and block hash. Used for header (tag 80), body (82), unpin (88 - hashes instead of hash).

Fields

§tag: u8
§genesis_hash: Vec<u8>
§follow_sub_id: String
§data: Value
§

ChainSpecRequest

chainSpec request with just genesis hash (tags 94, 96, 98).

Fields

§tag: u8
§genesis_hash: Vec<u8>
§

ChainTxBroadcast

Transaction broadcast (tag 100): genesis hash + transaction hex bytes.

Fields

§genesis_hash: Vec<u8>
§transaction: Vec<u8>
§

ChainTxStop

Transaction stop (tag 102): genesis hash + operation ID.

Fields

§genesis_hash: Vec<u8>
§operation_id: String
§

Unimplemented

A request we recognize by tag but don’t handle yet.

Fields

§tag: u8
§

Unknown

A tag we don’t recognize at all.

Fields

§tag: u8

Trait Implementations§

Source§

impl Debug for HostRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.