Struct iop_keyvault::secp256k1::SecpKeyId [−][src]
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]
addr: &str,
network: &dyn Network<Suite = Secp256k1>
) -> Result<Self>
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]
fn from(pk: &SecpPublicKey) -> Self
[src]
impl From<SecpKeyId> for MKeyId
[src]
impl Hash for SecpKeyId
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for SecpKeyId
[src]
fn cmp(&self, other: &SecpKeyId) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<SecpKeyId> for SecpKeyId
[src]
impl PartialOrd<SecpKeyId> for SecpKeyId
[src]
fn partial_cmp(&self, other: &SecpKeyId) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for SecpKeyId
[src]
impl StructuralPartialEq for SecpKeyId
[src]
Auto Trait Implementations
impl RefUnwindSafe for SecpKeyId
impl Send for SecpKeyId
impl Sync for SecpKeyId
impl Unpin for SecpKeyId
impl UnwindSafe for SecpKeyId
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,