Struct bitcoin_signingprovider::DescriptorImpl
source · pub struct DescriptorImpl { /* private fields */ }
Expand description
| Base class for all Descriptor implementations. |
Implementations§
source§impl DescriptorImpl
impl DescriptorImpl
pub fn new(pubkeys: Vec<Box<PubkeyProvider>>, name: &String) -> Self
pub fn new_with_script( pubkeys: Vec<Box<PubkeyProvider>>, script: Box<DescriptorImpl>, name: &String ) -> Self
pub fn new_with_scripts( pubkeys: Vec<Box<PubkeyProvider>>, scripts: Vec<Box<DescriptorImpl>>, name: &String ) -> Self
pub fn to_string_helper( &self, arg: *const SigningProvider, out: &mut String, ty: DescriptorImplStringType, cache: Option<*const DescriptorCache> ) -> bool
pub fn expand_helper( &self, pos: i32, arg: &SigningProvider, read_cache: *const DescriptorCache, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider, write_cache: *mut DescriptorCache ) -> bool
Trait Implementations§
source§impl Expand for DescriptorImpl
impl Expand for DescriptorImpl
source§fn expand(
&self,
pos: i32,
provider: &SigningProvider,
output_scripts: &mut Vec<Script>,
out: &mut FlatSigningProvider,
write_cache: Option<*mut DescriptorCache>
) -> bool
fn expand( &self, pos: i32, provider: &SigningProvider, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider, write_cache: Option<*mut DescriptorCache> ) -> bool
| Expand a descriptor at a specified position.
|
| ———–
| @param[in] pos
|
| The position at which to expand the descriptor.
| If IsRange() is false, this is ignored.
| –––––
| @param[in] provider
|
| The provider to query for private keys
| in case of hardened derivation.
| –––––
| @param[out] output_scripts
|
| The expanded scriptPubKeys.
| –––––
| @param[out] out
|
| Scripts and public keys necessary for
| solving the expanded scriptPubKeys
| (may be equal to
provider
).
| –––––
| @param[out] write_cache
|
| Cache data necessary to evaluate the
| descriptor at this point without access
| to private keys.
|source§impl ExpandFromCache for DescriptorImpl
impl ExpandFromCache for DescriptorImpl
source§fn expand_from_cache(
&self,
pos: i32,
read_cache: &DescriptorCache,
output_scripts: &mut Vec<Script>,
out: &mut FlatSigningProvider
) -> bool
fn expand_from_cache( &self, pos: i32, read_cache: &DescriptorCache, output_scripts: &mut Vec<Script>, out: &mut FlatSigningProvider ) -> bool
| Expand a descriptor at a specified position
| using cached expansion data.
|
| ———–
| @param[in] pos
|
| The position at which to expand the descriptor.
| If IsRange() is false, this is ignored.
| –––––
| @param[in] read_cache
|
| Cached expansion data.
| –––––
| @param[out] output_scripts
|
| The expanded scriptPubKeys.
| –––––
| @param[out] out
|
| Scripts and public keys necessary for
| solving the expanded scriptPubKeys
| (may be equal to
provider
).
|source§impl ExpandPrivate for DescriptorImpl
impl ExpandPrivate for DescriptorImpl
source§fn expand_private(
&self,
pos: i32,
provider: &SigningProvider,
out: &mut FlatSigningProvider
)
fn expand_private( &self, pos: i32, provider: &SigningProvider, out: &mut FlatSigningProvider )
| Expand the private key for a descriptor
| at a specified position, if possible.
|
| ———–
| @param[in] pos
|
| The position at which to expand the descriptor.
| If IsRange() is false, this is ignored.
| –––––
| @param[in] provider
|
| The provider to query for the private
| keys.
| –––––
| @param[out] out
|
| Any private keys available for the specified
|
pos
.
|source§impl GetOutputType for DescriptorImpl
impl GetOutputType for DescriptorImpl
source§fn get_output_type(&self) -> Option<OutputType>
fn get_output_type(&self) -> Option<OutputType>
| @return
|
| The OutputType of the scriptPubKey(s)
| produced by this descriptor. Or nullopt
| if indeterminate (multiple or none)
|
source§impl IsSolvable for DescriptorImpl
impl IsSolvable for DescriptorImpl
fn is_solvable(&self) -> bool
source§impl ToNormalizedString for DescriptorImpl
impl ToNormalizedString for DescriptorImpl
source§fn to_normalized_string(
&self,
arg: &SigningProvider,
out: &mut String,
cache: *const DescriptorCache
) -> bool
fn to_normalized_string( &self, arg: &SigningProvider, out: &mut String, cache: *const DescriptorCache ) -> bool
| Convert the descriptor to a normalized
| string. Normalized descriptors have
| the xpub at the last hardened step. This
| fails if the provided provider does
| not have the private keys to derive that
| xpub.
| Read more
source§impl ToPrivateString for DescriptorImpl
impl ToPrivateString for DescriptorImpl
source§fn to_private_string(&self, arg: &SigningProvider, out: &mut String) -> bool
fn to_private_string(&self, arg: &SigningProvider, out: &mut String) -> bool
| Convert the descriptor to a private
| string. This fails if the provided provider
| does not have the relevant private keys.
| Read more
source§impl ToStringExtra for DescriptorImpl
impl ToStringExtra for DescriptorImpl
source§fn to_string_extra(&self) -> String
fn to_string_extra(&self) -> String
| Return a serialization of anything | except pubkey and script arguments, | to be prepended to those. |
source§impl ToStringSubScriptHelper for DescriptorImpl
impl ToStringSubScriptHelper for DescriptorImpl
fn to_string_subscript_helper( &self, arg: *const SigningProvider, ret: &mut String, ty: DescriptorImplStringType, cache: Option<*const DescriptorCache> ) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for DescriptorImpl
impl Send for DescriptorImpl
impl Sync for DescriptorImpl
impl Unpin for DescriptorImpl
impl UnwindSafe for DescriptorImpl
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more