Skip to content

Commit

Permalink
Remove decode_scan_pubkey function
Browse files Browse the repository at this point in the history
  • Loading branch information
cygnet3 committed Sep 17, 2023
1 parent daa411c commit 36d28c0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions src/sending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,23 +200,3 @@ pub fn generate_recipient_pubkey(
.next()
.expect("Vec should always be of length 1"))
}

/// Helper function to retrieve the scanning public key from a bech32m-encoded silent payment address.
///
/// # Arguments
///
/// * `silent_payment_address` - The bech32m-encoded silent payment address to be decoded.
///
/// # Returns
///
/// If successful, the function returns a `Result` wrapping a `PublicKey`, the scanning public key.
///
/// # Errors
///
/// This function will return an error if:
///
/// * The silent payment address has an incorrent format.
pub fn decode_scan_pubkey(silent_payment_address: &str) -> Result<PublicKey> {
let address: SilentPaymentAddress = silent_payment_address.try_into()?;
Ok(address.scan_pubkey)
}
2 changes: 1 addition & 1 deletion tests/vector_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod common;
#[cfg(test)]
mod tests {
use std::{
collections::{HashMap, HashSet},
collections::HashSet,
str::FromStr,
};

Expand Down

0 comments on commit 36d28c0

Please sign in to comment.