crypto_wallet_gen/wallets/
bitcoin.rs

1use anyhow::Result;
2
3use super::Wallet;
4use crate::bip32::HDPrivKey;
5
6pub struct BitcoinWallet {
7    private_key: HDPrivKey,
8}
9
10impl BitcoinWallet {
11    pub fn private_key(&self) -> String {
12        self.private_key.to_base58()
13    }
14}
15
16impl Wallet for BitcoinWallet {
17    fn from_hd_key(private_key: HDPrivKey) -> Result<Self> {
18        Ok(Self { private_key })
19    }
20}