Struct terra_rust_api::PrivateKey [−][src]
pub struct PrivateKey {
pub account: u32,
pub index: u32,
pub coin_type: u32,
// some fields omitted
}Expand description
The Private key structure that is used to generate signatures and public keys WARNING: No Security Audit has been performed
Fields
account: u32index: u32coin_type: u32Implementations
impl PrivateKey[src]
impl PrivateKey[src]pub fn new(secp: &Secp256k1<All>) -> Result<PrivateKey>[src]
pub fn new(secp: &Secp256k1<All>) -> Result<PrivateKey>[src]Generate a new private key
pub fn new_seed(secp: &Secp256k1<All>, seed_phrase: &str) -> Result<PrivateKey>[src]
pub fn new_seed(secp: &Secp256k1<All>, seed_phrase: &str) -> Result<PrivateKey>[src]generate a new private key with a seed phrase
pub fn from_words(secp: &Secp256k1<All>, words: &str) -> Result<PrivateKey>[src]
pub fn from_words(secp: &Secp256k1<All>, words: &str) -> Result<PrivateKey>[src]for private key recovery. This is also used by wallet routines to re-hydrate the structure
pub fn from_words_seed(
secp: &Secp256k1<All>,
words: &str,
seed_pass: &str
) -> Result<PrivateKey>[src]
pub fn from_words_seed(
secp: &Secp256k1<All>,
words: &str,
seed_pass: &str
) -> Result<PrivateKey>[src]for private key recovery with seed phrase
pub fn public_key(&self, secp: &Secp256k1<All>) -> PublicKey[src]
pub fn public_key(&self, secp: &Secp256k1<All>) -> PublicKey[src]generate the public key for this private key
pub fn sign(&self, secp: &Secp256k1<All>, blob: &str) -> Result<StdSignature>[src]
pub fn sign(&self, secp: &Secp256k1<All>, blob: &str) -> Result<StdSignature>[src]signs a blob of data and returns a StdSignature
Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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> Instrument for T[src]
impl<T> Instrument for T[src]fn instrument(self, span: Span) -> Instrumented<Self>[src]
fn instrument(self, span: Span) -> Instrumented<Self>[src]Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>[src]
fn in_current_span(self) -> Instrumented<Self>[src]impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
type Output = TShould 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>,