pub struct DescriptorSecretKey(/* private fields */);Expand description
A descriptor containing secret data.
Implementations§
Source§impl DescriptorSecretKey
impl DescriptorSecretKey
Sourcepub fn new(
network: Network,
mnemonic: &Mnemonic,
password: Option<String>,
) -> Self
pub fn new( network: Network, mnemonic: &Mnemonic, password: Option<String>, ) -> Self
Construct a secret descriptor using a mnemonic.
Sourcepub fn from_string(private_key: String) -> Result<Self, DescriptorKeyError>
pub fn from_string(private_key: String) -> Result<Self, DescriptorKeyError>
Attempt to parse a string as a descriptor secret key.
Sourcepub fn derive(
&self,
path: &DerivationPath,
) -> Result<Arc<Self>, DescriptorKeyError>
pub fn derive( &self, path: &DerivationPath, ) -> Result<Arc<Self>, DescriptorKeyError>
Derive a descriptor secret key at a given derivation path.
Sourcepub fn extend(
&self,
path: &DerivationPath,
) -> Result<Arc<Self>, DescriptorKeyError>
pub fn extend( &self, path: &DerivationPath, ) -> Result<Arc<Self>, DescriptorKeyError>
Extend the descriptor secret key by the derivation path.
Sourcepub fn as_public(&self) -> Arc<DescriptorPublicKey>
pub fn as_public(&self) -> Arc<DescriptorPublicKey>
Return the descriptor public key corresponding to this secret.
Sourcepub fn secret_bytes(&self) -> Vec<u8> ⓘ
pub fn secret_bytes(&self) -> Vec<u8> ⓘ
Return the bytes of this descriptor secret key.
Trait Implementations§
Source§impl Debug for DescriptorSecretKey
impl Debug for DescriptorSecretKey
Source§impl Display for DescriptorSecretKey
impl Display for DescriptorSecretKey
Source§impl<UT> LiftRef<UT> for DescriptorSecretKey
impl<UT> LiftRef<UT> for DescriptorSecretKey
type LiftType = Arc<DescriptorSecretKey>
Source§impl<UT> LowerError<UT> for DescriptorSecretKey
impl<UT> LowerError<UT> for DescriptorSecretKey
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for DescriptorSecretKey
impl<UT> LowerReturn<UT> for DescriptorSecretKey
Source§type ReturnType = <Arc<DescriptorSecretKey> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<DescriptorSecretKey> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl<UT> TypeId<UT> for DescriptorSecretKey
impl<UT> TypeId<UT> for DescriptorSecretKey
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for DescriptorSecretKey
impl RefUnwindSafe for DescriptorSecretKey
impl Send for DescriptorSecretKey
impl Sync for DescriptorSecretKey
impl Unpin for DescriptorSecretKey
impl UnwindSafe for DescriptorSecretKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more