pub struct PrivValidatorKey {
pub address: Id,
pub pub_key: PublicKey,
pub priv_key: PrivateKey,
}
Expand description
Validator private key
Fields§
§address: Id
Address
pub_key: PublicKey
Public key
priv_key: PrivateKey
Private key
Implementations§
Source§impl PrivValidatorKey
impl PrivValidatorKey
Sourcepub fn parse_json<T: AsRef<str>>(json_string: T) -> Result<Self, Error>
pub fn parse_json<T: AsRef<str>>(json_string: T) -> Result<Self, Error>
Parse priv_validator_key.json
Sourcepub fn load_json_file<P>(path: &P) -> Result<Self, Error>
pub fn load_json_file<P>(path: &P) -> Result<Self, Error>
Load node_key.json
from a file
Sourcepub fn consensus_pubkey(&self) -> TendermintKey
pub fn consensus_pubkey(&self) -> TendermintKey
Get the consensus public key for this validator private key
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PrivValidatorKey
impl<'de> Deserialize<'de> for PrivValidatorKey
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
Auto Trait Implementations§
impl Freeze for PrivValidatorKey
impl RefUnwindSafe for PrivValidatorKey
impl Send for PrivValidatorKey
impl Sync for PrivValidatorKey
impl Unpin for PrivValidatorKey
impl UnwindSafe for PrivValidatorKey
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