Struct terra_rust_api::PublicKey[][src]

pub struct PublicKey {
    pub raw_pub_key: Option<Vec<u8>>,
    pub raw_address: Option<Vec<u8>>,
}

The public key we used to generate the cosmos/tendermind/terrad addresses

Fields

raw_pub_key: Option<Vec<u8>>

This is optional as we can generate non-pub keys without

raw_address: Option<Vec<u8>>

The raw bytes used to generate non-pub keys

Implementations

impl PublicKey[src]

pub fn from_bitcoin_public_key(bpub: &PublicKey) -> PublicKey[src]

Generate a Cosmos/Tendermint/Terrad Public Key

pub fn from_public_key(bpub: &[u8]) -> PublicKey[src]

Generate from Cosmos/Tendermint/Terrad Public Key

pub fn from_account(acc_address: &str) -> Result<PublicKey>[src]

Generate a Cosmos/Tendermint/Terrad Account

pub fn from_operator_address(valoper_address: &str) -> Result<PublicKey>[src]

Generate a Operator address for this public key (used by the validator)

pub fn from_raw_address(raw_address: &str) -> Result<PublicKey>[src]

Generate Public key from raw address

pub fn pubkey_from_public_key(public_key: &[u8]) -> Vec<u8>[src]

Gets a bech32-words pubkey from a compressed bytes public key.

@param publicKey raw public key

pub fn address_from_public_key(public_key: &[u8]) -> Vec<u8>[src]

Gets a raw address from a compressed bytes public key.

@param publicKey raw public key

pub fn account(&self) -> Result<String>[src]

The main account used in most things

pub fn operator_address(&self) -> Result<String>[src]

The operator address used for validators

pub fn TerraPub(&self) -> Result<String>[src]

pub fn TerraValOperPub(&self) -> Result<String>[src]

pub fn ValConsAddress(&self) -> Result<String>[src]

pub fn ValConsPub(&self) -> Result<String>[src]

Trait Implementations

impl Debug for PublicKey[src]

impl<'de> Deserialize<'de> for PublicKey[src]

impl Serialize for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.