[][src]Trait sunshine_core::ChainSigner

pub trait ChainSigner<T> where
    T: Runtime
{ fn account_id(&self) -> &<T as System>::AccountId;
fn nonce(&self) -> Option<<T as System>::Index>;
fn sign(
        &self,
        extrinsic: SignedPayload<Encoded, <<T as Runtime>::Extra as SignedExtra<T>>::Extra>
    ) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<<T as System>::Address, Encoded, <T as Runtime>::Signature, <<T as Runtime>::Extra as SignedExtra<T>>::Extra>, String>> + 'static + Sync + Send>>; }

Extrinsic signer.

Required methods

fn account_id(&self) -> &<T as System>::AccountId

Returns the account id.

fn nonce(&self) -> Option<<T as System>::Index>

Optionally returns a nonce.

fn sign(
    &self,
    extrinsic: SignedPayload<Encoded, <<T as Runtime>::Extra as SignedExtra<T>>::Extra>
) -> Pin<Box<dyn Future<Output = Result<UncheckedExtrinsic<<T as System>::Address, Encoded, <T as Runtime>::Signature, <<T as Runtime>::Extra as SignedExtra<T>>::Extra>, String>> + 'static + Sync + Send>>

Takes an unsigned extrinsic and returns a signed extrinsic.

Some signers may fail, for instance because the hardware on which the keys are located has refused the operation.

Loading content...

Implementations on Foreign Types

impl<T, P> Signer<T> for PairSigner<T, P> where
    P: Pair + 'static,
    T: Runtime,
    <T as System>::AccountId: Into<<T as System>::Address>,
    <T as System>::AccountId: 'static,
    <<<T as Runtime>::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Send,
    <<<T as Runtime>::Extra as SignedExtra<T>>::Extra as SignedExtension>::AdditionalSigned: Sync,
    <P as Pair>::Signature: Into<<T as Runtime>::Signature>,
    <P as Pair>::Signature: 'static, 
[src]

Loading content...

Implementors

Loading content...