Struct terra_rust_api::PrivateKey [−][src]
pub struct PrivateKey { pub account: u32, pub index: u32, pub coin_type: u32, // some fields omitted }
The Private key structure that is used to generate signatures and public keys WARNING: No Security Audit has been performed
Fields
account: u32
index: u32
coin_type: u32
Implementations
impl PrivateKey
[src]
impl PrivateKey
[src]pub fn new<'a>(secp: &Secp256k1<All>) -> Result<PrivateKey>
[src]
Generate a new private key
pub fn new_seed<'a>(
secp: &Secp256k1<All>,
seed_phrase: &str
) -> Result<PrivateKey>
[src]
secp: &Secp256k1<All>,
seed_phrase: &str
) -> Result<PrivateKey>
generate a new private key with a seed phrase
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]
secp: &Secp256k1<All>,
words: &str,
seed_pass: &str
) -> Result<PrivateKey>
for private key recovery with seed phrase
pub fn public_key(&self, secp: &Secp256k1<All>) -> PublicKey
[src]
generate the public key for this private key
pub fn words(&self) -> Option<&str>
[src]
the words used to generate this private key
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 RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self