rust-bitcoin / rust-wallet

*archived* Library for a Bitcoin Wallet
Apache License 2.0
181 stars 86 forks source link

initial efforts for electrumx client integration #6

Closed evgeniy-scherbina closed 5 years ago

evgeniy-scherbina commented 5 years ago

In this PR I've added electrumx mode for wallet also I've splitted wallet on WalletLibrary struct(that know nothing about blockchain communication) and WalletWithTrustedFullNode, ElectrumxWallet structs that aggregate WalletLibrary and add some blockchain communication functionality.

I think this separation will be useful when we'll add spv(BIP 157, 158) mode to wallet.

In the future I'll plan to move WalletWithTrustedFullNode, ElectrumxWallet structs in separate crates to reduce number of dependencies(means WalletLibrary should not pull electrumx_wallet json-rpc client).