pub struct DescriptorScriptPubKeyMan { /* private fields */ }
Expand description

Implementations§

source§

impl DescriptorScriptPubKeyMan

source

pub fn new_with_descriptor( storage: &mut dyn WalletStorage, descriptor: &mut WalletDescriptor ) -> Self

source

pub fn new<'a>(storage: &'a mut dyn WalletStorage) -> Self

source

pub fn setup_descriptor(&mut self, desc: Box<dyn Descriptor>) -> bool

| Provide a descriptor at setup time | | Returns false if already setup or setup | fails, true if setup is successful |

source

pub fn is_mine(&self, script: &Script) -> IsMineType

source

pub fn check_decryption_key( &mut self, master_key: &KeyingMaterial, accept_no_keys: Option<bool> ) -> bool

source

pub fn encrypt( &mut self, master_key: &KeyingMaterial, batch: *mut WalletBatch ) -> bool

source

pub fn get_reserved_destination( &mut self, ty: OutputType, internal: bool, address: &mut TxDestination, index: &mut i64, keypool: &mut KeyPool, error: &mut BilingualStr ) -> bool

source

pub fn return_destination( &mut self, index: i64, internal: bool, addr: &TxDestination )

source

pub fn get_keys(&self) -> HashMap<KeyID, Key>

source

pub fn top_up(&mut self, size: Option<u32>) -> bool

| Tops up the descriptor cache and | m_map_script_pub_keys. The cache is stored | in the wallet file and is used to expand | the descriptor in | GetNewDestination. DescriptorScriptPubKeyMan | relies more on ephemeral data than | LegacyScriptPubKeyMan. For wallets using | unhardened derivation (with or without | private keys), the “keypool” is a single | xpub.

source

pub fn mark_unused_addresses(&mut self, script: &Script)

source

pub fn add_descriptor_key(&mut self, key: &Key, pubkey: &PubKey)

source

pub fn add_descriptor_key_withdb( &mut self, batch: &mut WalletBatch, key: &Key, pubkey: &PubKey ) -> bool

source

pub fn setup_descriptor_generation( &mut self, master_key: &ExtKey, addr_type: OutputType, internal: bool ) -> bool

| Setup descriptors based on the given | Extkey |

source

pub fn is_hd_enabled(&self) -> bool

source

pub fn can_get_addresses(&self, internal: Option<bool>) -> bool

source

pub fn have_private_keys(&self) -> bool

source

pub fn get_oldest_key_pool_time(&self) -> i64

source

pub fn get_key_pool_size(&self) -> u32

source

pub fn get_time_first_key(&self) -> i64

source

pub fn get_signing_provider_with_script( &self, script: &Script, include_private: Option<bool> ) -> Box<FlatSigningProvider>

| Fetch the SigningProvider for the given | script and optionally include private | keys |

source

pub fn get_signing_provider_with_pubkey( &self, pubkey: &PubKey ) -> Box<FlatSigningProvider>

| Fetch the SigningProvider for the given | pubkey and always include private keys. | This should only be called by signing | code. |

source

pub fn get_signing_provider_with_index( &self, index: i32, include_private: Option<bool> ) -> Box<FlatSigningProvider>

| Fetch the SigningProvider for a given index | and optionally include private keys. Called | by the above functions. |

source

pub fn get_solving_provider(&self, script: &Script) -> Box<SigningProvider>

source

pub fn can_provide( &mut self, script: &Script, sigdata: &mut SignatureData ) -> bool

source

pub fn sign_transaction( &self, tx: &mut MutableTransaction, coins: &HashMap<OutPoint, Coin>, sighash: i32, input_errors: &mut HashMap<i32, BilingualStr> ) -> bool

source

pub fn sign_message( &self, message: &String, pkhash: &PKHash, str_sig: &mut String ) -> SigningResult

source

pub fn fillpsbt( &self, psbtx: &mut PartiallySignedTransaction, txdata: &PrecomputedTransactionData, sighash_type: Option<i32>, sign: Option<bool>, bip_32derivs: Option<bool>, n_signed: *mut i32 ) -> TransactionError

source

pub fn get_metadata(&self, dest: &TxDestination) -> Box<KeyMetadata>

source

pub fn getid(&self) -> u256

source

pub fn set_cache(&mut self, cache: &DescriptorCache)

source

pub fn add_key(&mut self, key_id: &KeyID, key: &Key) -> bool

source

pub fn add_crypted_key( &mut self, key_id: &KeyID, pubkey: &PubKey, crypted_key: &Vec<u8> ) -> bool

source

pub fn has_wallet_descriptor(&self, desc: &WalletDescriptor) -> bool

source

pub fn write_descriptor(&mut self)

source

pub fn get_wallet_descriptor(&self) -> WalletDescriptor

source

pub fn get_script_pub_keys(&self) -> Vec<Script>

source

pub fn get_descriptor_string(&self, out: &mut String, priv_: bool) -> bool

source

pub fn upgrade_descriptor_cache(&mut self)

source

pub fn update_wallet_descriptor(&mut self, descriptor: &mut WalletDescriptor)

source

pub fn can_update_to_wallet_descriptor( &mut self, descriptor: &WalletDescriptor, error: &mut String ) -> bool

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V