move a couple functions to BtcWallet