LtbLightning / bdk-flutter

Bitcoin Development Kit - Flutter Package
MIT License
60 stars 27 forks source link

feat: getInternalAddress method #73

Closed sergdeus closed 1 year ago

sergdeus commented 1 year ago

Added getInternalAddress method, that uses Rust method

//Return a derived address using the internal descriptor,
pub fn get_internal_address(
    wallet: RustOpaque<WalletInstance>,
    address_index: AddressIndex,
) -> anyhow::Result<AddressInfo, anyhow::Error> {
    match wallet.get_internal_address(address_index) {
        Ok(e) => Ok(e),
        Err(e) => anyhow::bail!("{:?}", e),
    }
}
BitcoinZavior commented 1 year ago

@sergdeus Thanks for the PR, this will be a nice addition!

BitcoinZavior commented 1 year ago

Other than the style being changed I don't really have any other comments. Can we maintain the same style, please?

sergdeus commented 1 year ago

Other than the style being changed I don't really have any other comments. Can we maintain the same style, please?

Yep, sorry for the styles. I've applied flutter format . command. Is it ok? In this way, it is possible to keep the same styles despite on IDE lint setting.

BitcoinZavior commented 1 year ago

Other than the style being changed I don't really have any other comments. Can we maintain the same style, please?

Yep, sorry for the styles. I've applied flutter format . command. Is it ok? In this way, it is possible to keep the same styles despite on IDE lint setting.

Perfect, thanks!