Struct deep_space::public_key::PublicKey
source · [−]pub struct PublicKey { /* private fields */ }Expand description
Represents a public key of a given private key in the Cosmos Network.
Implementations
In cases where it’s impossible to know the Bech32 prefix we fall back to this value
Create a public key using a slice of bytes
pub fn from_bytes<T: Into<String>>(
bytes: [u8; 33],
prefix: T
) -> Result<PublicKey, PublicKeyError>
pub fn from_bytes<T: Into<String>>(
bytes: [u8; 33],
prefix: T
) -> Result<PublicKey, PublicKeyError>
Create a public key using an array of bytes
Returns bytes of a given public key as a slice of bytes
Create an address object using a given public key.
Create an address object using a given public key with the given prefix
provided as a utility for one step creation and change of prefix if the conventions
in to_address() are incorrect
Creates amino representation of a given public key.
It is used internally for bech32 encoding.
Create a bech32 encoded public key with an arbitrary prefix
hrp- A prefix for a bech32 encoding. By a convention Cosmos Network usescosmospubas a prefix for encoding public keys.
Parse a bech32 encoded public key
s- A bech32 encoded public key
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
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