yenom / BitcoinKit

Bitcoin protocol toolkit for Swift
MIT License
841 stars 261 forks source link

Why the WalletExample Wallet.swift is different from the Bitcoinkit's Wallet.swift #180

Open Li-Qun opened 5 years ago

Li-Qun commented 5 years ago

I want to fetch the BTC wallet Balance , eg the test BTC address " mxHyCHjomPgZCReghohxtZYCrZCGcvZiMj". https://test-insight.bitpay.com/address/mxHyCHjomPgZCReghohxtZYCrZCGcvZiMj It owning some bitcoins. But use the WalletExample Wallet.swift "reloadBalance" func couldn't fetch the real balance just 0. The I try to use pod install the sdk. But I find that there isn't any reloadBalance func in Wallet.swift.

Dear writter, what should I do to fetch the btc cold wallt balance by using the bitcoinkit or some suggestions? Thanks a lot .

usatie commented 5 years ago

Hi @Li-Qun . Wallet consists of several components. UtxoProvider is one of dependency, by default, BitcoinComUtxoProvider is set. BitcoinComUtxoProvider is a wrapper for Bitcoin.com API which is compatible with only BCH.

So you need to implement UtxoProvider for BTC.