Trait ExportableSigner

Source
pub trait ExportableSigner: Signer {
    // Required methods
    fn export_private_key_in_hex<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pass: &'life1 str,
        log_n: u8,
    ) -> Pin<Box<dyn Future<Output = Result<(String, bool), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn export_private_key_in_bech32<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pass: &'life1 str,
        log_n: u8,
    ) -> Pin<Box<dyn Future<Output = Result<(String, bool), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Any Signer that allows the secret to be exported (with interior mutability or no mutability necessary)

Required Methods§

Source

fn export_private_key_in_hex<'life0, 'life1, 'async_trait>( &'life0 self, pass: &'life1 str, log_n: u8, ) -> Pin<Box<dyn Future<Output = Result<(String, bool), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export the private key in hex.

This returns a boolean indicating if the key security was downgraded. If it was, the caller should save the new self.encrypted_private_key()

We need the password and log_n parameters to possibly rebuild the EncryptedPrivateKey when downgrading key security

Source

fn export_private_key_in_bech32<'life0, 'life1, 'async_trait>( &'life0 self, pass: &'life1 str, log_n: u8, ) -> Pin<Box<dyn Future<Output = Result<(String, bool), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export the private key in bech32.

This returns a boolean indicating if the key security was downgraded. If it was, the caller should save the new self.encrypted_private_key()

We need the password and log_n parameters to possibly rebuild the EncryptedPrivateKey when downgrading key security

Implementors§