[][src]Function sr25519::public_from_secret_key

pub fn public_from_secret_key(secret_key: PrivKey) -> PyResult<PubKey>

Returns the corresponding public key for the given secret key.

Arguments

  • secret_key - The sr25519 secret key, comprised of the 32 byte scalar and 32 byte nonce.

Returns

The 32-byte public key corresponding to the provided secret key.

Raises

  • ValueError - If the provided secret key is invalid.