Struct diem_types::validator_signer::ValidatorSigner [−][src]
pub struct ValidatorSigner { /* fields omitted */ }
Expand description
ValidatorSigner associates an author with public and private keys with helpers for signing and validating. This struct can be used for all signing operations including block and network signing, respectively.
Implementations
impl ValidatorSigner
[src]
impl ValidatorSigner
[src]pub fn new(author: AccountAddress, private_key: Ed25519PrivateKey) -> Self
[src]
pub fn sign<T: Serialize + CryptoHash>(&self, message: &T) -> Ed25519Signature
[src]
pub fn sign<T: Serialize + CryptoHash>(&self, message: &T) -> Ed25519Signature
[src]Constructs a signature for message
using private_key
.
pub fn author(&self) -> AccountAddress
[src]
pub fn author(&self) -> AccountAddress
[src]Returns the author associated with this signer.
pub fn public_key(&self) -> Ed25519PublicKey
[src]
pub fn public_key(&self) -> Ed25519PublicKey
[src]Returns the public key associated with this signer.
impl ValidatorSigner
[src]
impl ValidatorSigner
[src]Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ValidatorSigner
impl Send for ValidatorSigner
impl Sync for ValidatorSigner
impl Unpin for ValidatorSigner
impl UnwindSafe for ValidatorSigner
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,