pub struct Key(pub PublicKey);
Expand description

Represents “k256::PublicKey” and “k256::ecdsa::VerifyingKey”.

Tuple Fields§

§0: PublicKey

Implementations§

Decodes compressed or uncompressed public key bytes with Elliptic-Curve-Point-to-Octet-String encoding described in SEC 1: Elliptic Curve Cryptography (Version 2.0) section 2.3.3 (page 10). ref. http://www.secg.org/sec1-v2.pdf

Decodes ASN.1 DER-encoded public key bytes.

Loads the public key from a message and its recoverable signature. ref. “fx.SECPFactory.RecoverHashPublicKey”

Verifies the message and the validity of its signature with recoverable code.

Converts the public key to compressed bytes.

Converts the public key to uncompressed bytes.

“hashing.PubkeyBytesToAddress”

ref. “pk.PublicKey().Address().Bytes()”

ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/utils/hashing#PubkeyBytesToAddress

“hashing.PubkeyBytesToAddress” and “ids.ToShortID”

ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/utils/hashing#PubkeyBytesToAddress

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Implements “crypto.PublicKeySECP256K1R.Address()” and “formatting.FormatAddress”. “human readable part” (hrp) must be valid output from “constants.GetHRP(networkID)”. ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/utils/constants

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
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Converts to this type from a reference to the input type.
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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Wrap the input message T in a tonic::Request
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
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