pub trait PublicKey: Clone + Debug + Display + FromStr + Send + Sync + 'static + Sized {
    type SecretKey;
    type Address: Address;
    type Format: Format;

    // Required methods
    fn from_secret_key(secret_key: &Self::SecretKey) -> Self;
    fn to_address(
        &self,
        format: &Self::Format
    ) -> Result<Self::Address, AddressError>;
}
Expand description

The interface for a generic public key.

Required Associated Types§

Required Methods§

source

fn from_secret_key(secret_key: &Self::SecretKey) -> Self

Returns the address corresponding to the given public key.

source

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

Returns the address of the corresponding private key.

Implementors§