Struct iop_keyvault::secp256k1::SecpKeyId[][src]

pub struct SecpKeyId(_);

Implementation of Secp256k1::KeyId

Implementations

impl SecpKeyId[src]

pub fn to_bytes(&self) -> Vec<u8>[src]

The key id serialized in a format that can be fed to from_bytes

pub fn from_bytes<D: AsRef<[u8]>>(bytes: D) -> Result<Self>[src]

Creates a key id from a byte slice possibly returned by the to_bytes method.

Error

If bytes is not KEY_ID_SIZE long

pub fn to_p2pkh_addr(&self, prefix: &[u8; 1]) -> String[src]

Serializes the key identifier as a p2pkh bitcoin address

Panics

If internal invariants of the key id format are not maintained because of a bug

pub fn from_p2pkh_addr(
    addr: &str,
    network: &dyn Network<Suite = Secp256k1>
) -> Result<Self>
[src]

Deserializes the key identifier from a p2pkh bitcoin address

pub fn from_ark_pk(pk: &SecpPublicKey) -> Self[src]

ARK uses a non-standard hashing of the compressed public key.

Trait Implementations

impl Clone for SecpKeyId[src]

impl Debug for SecpKeyId[src]

impl Eq for SecpKeyId[src]

impl From<&'_ SecpPublicKey> for SecpKeyId[src]

impl From<SecpKeyId> for MKeyId[src]

impl Hash for SecpKeyId[src]

impl Ord for SecpKeyId[src]

impl PartialEq<SecpKeyId> for SecpKeyId[src]

impl PartialOrd<SecpKeyId> for SecpKeyId[src]

impl StructuralEq for SecpKeyId[src]

impl StructuralPartialEq for SecpKeyId[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> From<T> 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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,