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

Issue with BTCTestnet #5

Open
AlessandroSechi opened this issue May 31, 2020 · 0 comments
Open

Issue with BTCTestnet #5

AlessandroSechi opened this issue May 31, 2020 · 0 comments

Comments

@AlessandroSechi
Copy link

Following the example in readme,

var (
	mnemonic = "range sheriff try enroll deer over ten level bring display stamp recycle"
   )

   func main() {
	master, err := hdwallet.NewKey(
		hdwallet.Mnemonic(mnemonic),
	)
	if err != nil {
		panic(err)
	}
	wallet, _ := master.GetWallet(hdwallet.CoinType(hdwallet.BTCTestnet), hdwallet.AddressIndex(0))
	address, _ := wallet.GetAddress()
	addressP2WPKH, _ := wallet.GetKey().AddressP2WPKH()
	addressP2WPKHInP2SH, _ := wallet.GetKey().AddressP2WPKHInP2SH()
	fmt.Println("BTC: ", address, addressP2WPKH, addressP2WPKHInP2SH)
   }

outputs
BTC: mz5otQWaaPmWEydGw9gjfaHxSKhHX6Fgj5 tb1qew503ut4u9xpe6gu0md2ymfa4nzx5s4uw7zm4v 2MzibkYjFqqAu9TYtK3SraqQTo226vrLD6L

but it seems wrong, as creating a BTCTestnet transaction (TX ID: 0ae7c88251d0a8bed462141fc1d4605370367069ccb27b77b970c51e1103f68d) doesn't show up in wallet generated with the previous mnemonic seed

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

1 participant