goat-systems / go-tezos

Go Tezos Is a Go library that exposes and builds upon the Tezos RPC.
MIT License
71 stars 43 forks source link

Using alphanet faucet with CreateWallet() #27

Closed utdrmac closed 5 years ago

utdrmac commented 5 years ago

This is a documentation contribution "issue". When you use the alphanet faucet (for testing), the .json contains the 15 mnemonic words, a password, and email address. If you want to import this address using CreateWallet, the "password" is actually the email and password concatenated together.

Example:

mnemonic := "normal dash crumble neutral reflect parrot know stairs culture fault check whale flock dog scout"
email := "vksbjweo.qsrgfvbw@tezos.example.org"
password := "PYh8nXDQLB"
bakerWallet, err := gt.CreateWallet(mnemonic, email+password)
fmt.Println("- Address:", bakerWallet.Address) -- tz1Qny7jVMGiwRrP9FikRK95jTNbJcffTpx1

When using this function to create a new wallet, you can use whatever you'd like as the password. There are no restrictions on requiring an email address to be part of the password.