Struct frame_system::offchain::Signer[][src]

pub struct Signer<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X = ForAny> { /* fields omitted */ }

Provides an implementation for signing transaction payloads.

Keys used for signing are defined when instantiating the signer object. Signing can be done using:

The signer is then able to:

Implementations

impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X> Signer<T, C, X>[src]

pub fn all_accounts() -> Signer<T, C, ForAll>[src]

Use all available keys for signing.

pub fn any_account() -> Signer<T, C, ForAny>[src]

Use any of the available keys for signing.

pub fn with_filter(self, accounts: Vec<T::Public>) -> Self[src]

Use provided accounts for signing.

Note that not all keys will be necessarily used. The provided vector of accounts will be intersected with the supported keys in the keystore and the resulting list will be used for signing.

pub fn can_sign(&self) -> bool[src]

Check if there are any keys that could be used for signing.

Trait Implementations

impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X> Debug for Signer<T, C, X> where
    T: Debug,
    C: Debug,
    X: Debug
[src]

impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>, X> Default for Signer<T, C, X>[src]

impl<T: CreateSignedTransaction<LocalCall> + SigningTypes, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendSignedTransaction<T, C, LocalCall> for Signer<T, C, ForAny>[src]

type Result = Option<(Account<T>, Result<(), ()>)>

A submission result. Read more

impl<T: SigningTypes + CreateSignedTransaction<LocalCall>, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendSignedTransaction<T, C, LocalCall> for Signer<T, C, ForAll>[src]

type Result = Vec<(Account<T>, Result<(), ()>)>

A submission result. Read more

impl<T: SigningTypes + SendTransactionTypes<LocalCall>, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendUnsignedTransaction<T, LocalCall> for Signer<T, C, ForAny>[src]

type Result = Option<(Account<T>, Result<(), ()>)>

A submission result. Read more

impl<T: SigningTypes + SendTransactionTypes<LocalCall>, C: AppCrypto<T::Public, T::Signature>, LocalCall> SendUnsignedTransaction<T, LocalCall> for Signer<T, C, ForAll>[src]

type Result = Vec<(Account<T>, Result<(), ()>)>

A submission result. Read more

impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>> SignMessage<T> for Signer<T, C, ForAll>[src]

type SignatureData = Vec<(Account<T>, T::Signature)>

A signature data. Read more

impl<T: SigningTypes, C: AppCrypto<T::Public, T::Signature>> SignMessage<T> for Signer<T, C, ForAny>[src]

type SignatureData = Option<(Account<T>, T::Signature)>

A signature data. Read more

Auto Trait Implementations

impl<T, C, X> RefUnwindSafe for Signer<T, C, X> where
    C: RefUnwindSafe,
    X: RefUnwindSafe,
    <T as SigningTypes>::Public: RefUnwindSafe

impl<T, C, X> Send for Signer<T, C, X> where
    C: Send,
    X: Send,
    <T as SigningTypes>::Public: Send

impl<T, C, X> Sync for Signer<T, C, X> where
    C: Sync,
    X: Sync,
    <T as SigningTypes>::Public: Sync

impl<T, C, X> Unpin for Signer<T, C, X> where
    C: Unpin,
    X: Unpin,
    <T as SigningTypes>::Public: Unpin

impl<T, C, X> UnwindSafe for Signer<T, C, X> where
    C: UnwindSafe,
    X: UnwindSafe,
    <T as SigningTypes>::Public: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

pub fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

pub fn from_mut(outer: &mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeDebug for T where
    T: Debug
[src]

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]