referrerpolicy=no-referrer-when-downgrade
sc_network::config

Type Alias Ed25519Secret

Source
pub type Ed25519Secret = Secret<SecretKey>;
Expand description

The options for obtaining a Ed25519 secret key.

Aliased Type§

enum Ed25519Secret {
    Input(SecretKey),
    File(PathBuf),
    New,
}

Variants§

§

Input(SecretKey)

Use the given secret key K.

§

File(PathBuf)

Read the secret key from a file. If the file does not exist, it is created with a newly generated secret key K. The format of the file is determined by K:

  • ed25519::SecretKey: An unencoded 32 bytes Ed25519 secret key.
§

New

Always generate a new secret key K.

Trait Implementations

Source§

impl<K: Clone> Clone for Secret<K>

Source§

fn clone(&self) -> Secret<K>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K> Debug for Secret<K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more