Trait frame_system::offchain::SignMessage[][src]

pub trait SignMessage<T: SigningTypes> {
    type SignatureData;
    fn sign_message(&self, message: &[u8]) -> Self::SignatureData;
fn sign<TPayload, F>(&self, f: F) -> Self::SignatureData
    where
        F: Fn(&Account<T>) -> TPayload,
        TPayload: SignedPayload<T>
; }

A message signer.

Associated Types

type SignatureData[src]

A signature data.

May contain account used for signing and the Signature itself.

Loading content...

Required methods

fn sign_message(&self, message: &[u8]) -> Self::SignatureData[src]

Sign a message.

Implementation of this method should return a result containing the signature.

fn sign<TPayload, F>(&self, f: F) -> Self::SignatureData where
    F: Fn(&Account<T>) -> TPayload,
    TPayload: SignedPayload<T>, 
[src]

Construct and sign given payload.

This method expects f to return a SignedPayload object which is then used for signing.

Loading content...

Implementors

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

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

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

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

Loading content...