Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testnet extended keys/watch only testing? #110

Open
Fonta1n3 opened this issue Jun 13, 2018 · 3 comments
Open

testnet extended keys/watch only testing? #110

Fonta1n3 opened this issue Jun 13, 2018 · 3 comments

Comments

@Fonta1n3
Copy link

Fonta1n3 commented Jun 13, 2018

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.

@Fonta1n3 Fonta1n3 changed the title testnet extended keys? testnet extended keys/watch only testing? Jun 13, 2018
@oleganza
Copy link
Owner

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.

@Fonta1n3
Copy link
Author

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.

@Fonta1n3
Copy link
Author

Fonta1n3 commented Dec 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants