pub struct InMemorySigner(/* private fields */);Expand description
In-memory signer.
Implementations§
Source§impl InMemorySigner
impl InMemorySigner
Sourcepub fn new(prng_seed: Option<u64>) -> Self
pub fn new(prng_seed: Option<u64>) -> Self
Creates a new InMemorySigner seeded with prng_seed.
If prng_seed is None, an OsRng will be used.
Sourcepub fn generate_new(&mut self) -> AccountPublicKey
pub fn generate_new(&mut self) -> AccountPublicKey
Generates a new key pair from Signer’s RNG. Use with care.
Trait Implementations§
Source§impl Clone for InMemorySigner
impl Clone for InMemorySigner
Source§fn clone(&self) -> InMemorySigner
fn clone(&self) -> InMemorySigner
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for InMemorySigner
impl<'de> Deserialize<'de> for InMemorySigner
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromIterator<(AccountOwner, AccountSecretKey)> for InMemorySigner
impl FromIterator<(AccountOwner, AccountSecretKey)> for InMemorySigner
Source§impl Serialize for InMemorySigner
impl Serialize for InMemorySigner
Source§impl Signer for InMemorySigner
impl Signer for InMemorySigner
Source§async fn sign(
&self,
owner: &AccountOwner,
value: &CryptoHash,
) -> Result<AccountSignature, Error>
async fn sign( &self, owner: &AccountOwner, value: &CryptoHash, ) -> Result<AccountSignature, Error>
Creates a signature for the given value using the provided owner.
Source§async fn contains_key(&self, owner: &AccountOwner) -> Result<bool, Error>
async fn contains_key(&self, owner: &AccountOwner) -> Result<bool, Error>
Returns whether the given owner is a known signer.
Auto Trait Implementations§
impl Freeze for InMemorySigner
impl RefUnwindSafe for InMemorySigner
impl Send for InMemorySigner
impl Sync for InMemorySigner
impl Unpin for InMemorySigner
impl UnwindSafe for InMemorySigner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.