logo
pub struct NodeKeypairs { /* private fields */ }
Expand description

This is used at a network node for holding the obligatory Ed25519 keypair needed as Adult, and then a BLS keypair share when being promoted to Elder. (Also the corresponding public keys). The Ed25519 is kept as Elder, in case it is demoted.

Implementations

Constructs a NodeKeypairs with a random Ed25519 keypair and no BLS keys.

Constructs a NodeKeypairs whose name is in the interval [start, end] (both endpoints inclusive).

Returns the BLS if any, else the Ed25519.

Returns the BLS public key set if any.

Signs with the BLS if any, else the Ed25519.

Creates a detached Ed25519 signature of data.

Creates a detached BLS signature share of data if the self holds a BLS keypair share.

Sets the NodeKeypairs’s BLS keypair share using the provided BLS secret key share.

Clears the NodeKeypairs’s BLS keypair share, i.e. sets it to None.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more