Trait bdk::wallet::address_validator::AddressValidator[][src]

pub trait AddressValidator: Send + Sync + Debug {
    fn validate(
        &self,
        keychain: KeychainKind,
        hd_keypaths: &HdKeyPaths,
        script: &Script
    ) -> Result<(), AddressValidatorError>; }
Expand description

Trait to build address validators

All the address validators attached to a wallet with Wallet::add_address_validator will be polled every time an address (external or internal) is generated by the wallet. Errors returned in the validator will be propagated up to the original caller that triggered the address generation.

For a usage example see this module’s documentation.

Required methods

Validate or inspect an address

Implementors