Function get_private_key_from_nep2

Source
pub fn get_private_key_from_nep2(
    nep2: &str,
    passphrase: &str,
) -> Result<Vec<u8>, ProviderError>
Expand description

Decrypts a NEP2-formatted string to retrieve the original private key.

§Arguments

  • nep2 - The NEP2-formatted string containing the encrypted key
  • passphrase - The password used for encryption

§Returns

The decrypted private key as bytes, or an error if decryption fails