Skip to content

Commit

Permalink
feat: expose verify fn for public address
Browse files Browse the repository at this point in the history
  • Loading branch information
oetyng committed Apr 12, 2023
1 parent a94a0ef commit 23c2a8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dbc_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ impl PublicAddress {
Self(public_key)
}

/// Verify that the signature is valid for the message.
pub fn verify(&self, sig: &blsttc::Signature, msg: &[u8]) -> bool {
self.0.verify(sig, msg)
}

/// A random derivation index and the public address.
/// The random index will be used to derive a DbcId out of the public address.
pub fn random_dbc_id_src(&self, rng: &mut impl RngCore) -> DbcIdSource {
Expand Down

0 comments on commit 23c2a8c

Please sign in to comment.