pub trait PsbtConstructor {
type Key;
type Descr: Descriptor<Self::Key>;
// Required methods
fn descriptor(&self) -> &Self::Descr;
fn utxo(&self, outpoint: Outpoint) -> Option<(Utxo, ScriptPubkey)>;
fn network(&self) -> Network;
fn next_derivation_index(
&mut self,
keychain: impl Into<Keychain>,
shift: bool,
) -> NormalIndex;
// Provided methods
fn construct_psbt(
&mut self,
coins: impl IntoIterator<Item = Outpoint>,
beneficiaries: impl IntoIterator<Item = Beneficiary>,
params: TxParams,
) -> Result<(Psbt, PsbtMeta), ConstructionError> { ... }
fn after_construct_psbt(&mut self, _psbt: &Psbt, _meta: &PsbtMeta) { ... }
}Required Associated Types§
Required Methods§
fn descriptor(&self) -> &Self::Descr
fn utxo(&self, outpoint: Outpoint) -> Option<(Utxo, ScriptPubkey)>
fn network(&self) -> Network
fn next_derivation_index( &mut self, keychain: impl Into<Keychain>, shift: bool, ) -> NormalIndex
Provided Methods§
fn construct_psbt( &mut self, coins: impl IntoIterator<Item = Outpoint>, beneficiaries: impl IntoIterator<Item = Beneficiary>, params: TxParams, ) -> Result<(Psbt, PsbtMeta), ConstructionError>
Sourcefn after_construct_psbt(&mut self, _psbt: &Psbt, _meta: &PsbtMeta)
fn after_construct_psbt(&mut self, _psbt: &Psbt, _meta: &PsbtMeta)
A hook which is called by the default Self::construct_psbt before returning the newly
constructed PSBT to the caller.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.