psrgbt

Trait PsbtConstructor

Source
pub trait PsbtConstructor {
    type Key;
    type Descr: Descriptor<Self::Key>;

    // Required methods
    fn descriptor(&self) -> &Self::Descr;
    fn utxo(&self, outpoint: Outpoint) -> Option<Utxo>;
    fn network(&self) -> Network;
    fn next_derivation_index(
        &mut self,
        keychain: impl Into<Keychain>,
        shift: bool,
    ) -> NormalIndex;

    // Provided method
    fn construct_psbt<'a, 'b>(
        &mut self,
        coins: impl IntoIterator<Item = Outpoint>,
        beneficiaries: impl IntoIterator<Item = &'b Beneficiary>,
        params: TxParams,
    ) -> Result<(Psbt, PsbtMeta), ConstructionError> { ... }
}

Required Associated Types§

Required Methods§

Source

fn descriptor(&self) -> &Self::Descr

Source

fn utxo(&self, outpoint: Outpoint) -> Option<Utxo>

Source

fn network(&self) -> Network

Source

fn next_derivation_index( &mut self, keychain: impl Into<Keychain>, shift: bool, ) -> NormalIndex

Provided Methods§

Source

fn construct_psbt<'a, 'b>( &mut self, coins: impl IntoIterator<Item = Outpoint>, beneficiaries: impl IntoIterator<Item = &'b Beneficiary>, params: TxParams, ) -> Result<(Psbt, PsbtMeta), ConstructionError>

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.

Implementors§