Skip to main content

DeriveScripts

Trait DeriveScripts 

Source
pub trait DeriveScripts: Derive<DerivedScript> {
    // Provided methods
    fn derive_address(
        &self,
        network: AddressNetwork,
        keychain: impl Into<Keychain>,
        index: impl Into<NormalIndex>,
    ) -> impl Iterator<Item = Address> { ... }
    fn derive_address_range(
        &self,
        network: AddressNetwork,
        keychain: impl Into<Keychain>,
        from: impl Into<NormalIndex>,
        to: impl Into<NormalIndex>,
    ) -> impl Iterator<Item = Address> { ... }
}

Provided Methods§

Source

fn derive_address( &self, network: AddressNetwork, keychain: impl Into<Keychain>, index: impl Into<NormalIndex>, ) -> impl Iterator<Item = Address>

Derives addresses for a given index.

If the descriptor is not representable in form of an address (uses non-standard script etc), returns an empty iterator.

Source

fn derive_address_range( &self, network: AddressNetwork, keychain: impl Into<Keychain>, from: impl Into<NormalIndex>, to: impl Into<NormalIndex>, ) -> impl Iterator<Item = Address>

Derives addresses for a range of indexes.

If the descriptor is not representable in form of an address (uses non-standard script etc), returns an empty iterator.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§