[][src]Trait wagyu_model::public_key::PublicKey

pub trait PublicKey: Clone + Debug + Display + FromStr + Send + Sync + 'static + Eq + Sized {
    type Address: Address;
    type Format;
    type PrivateKey: PrivateKey;
    fn from_private_key(private_key: &Self::PrivateKey) -> Self;
fn to_address(
        &self,
        format: &Self::Format
    ) -> Result<Self::Address, AddressError>; }

The interface for a generic public key.

Associated Types

Loading content...

Required methods

fn from_private_key(private_key: &Self::PrivateKey) -> Self

Returns the address corresponding to the given public key.

fn to_address(
    &self,
    format: &Self::Format
) -> Result<Self::Address, AddressError>

Returns the address of the corresponding private key.

Loading content...

Implementors

Loading content...