testnet extended keys/watch only testing?
Im unable to get testnet extended key (tpriv and tpub), only xpriv and xpub. Is this by design or am I missing something?
let keychain = mnemonic.keychain.bitcoinTestnet.derivedKeychain(withPath: "m/44'/0'/0'/0") let xpub = keychain?.bitcoinTestnet.extendedPublicKey let xpriv = keychain?.bitcoinTestnet.extendedPrivateKey
Thanks in advanced. I am trying to test that the xpriv receiving funds from watch only addresses actually receive the funds, without using real Bitcoin. It is proving a challenge. Any tips would be greatly appreciated.
Uh-oh, seems like it's a bug. I looked in the code and there are at least couple of places where we should set correct .network property on a keychain. Meanwhile, you can workaround the issue by setting keychain.network = BTCNetwork.testnet after you've derived your keychain. When these bugs are fixed, that would be an unnecessary no-op.
Ho Oleg,
Just fyi.
Thanks for that advice, I tried to declare keychain.network = BTCNetwork.testnet but xcode gives use of unresolved identifier 'BTCNetwork' error.
I have tried inputting the testnet parameter everywhere I can but never get the tpriv.
Any updates on this? Using this library again for seed creation/derivation and need to test with tpub and still have the same issue. Have to hardcode a tpub for now which is not great.