func ReadWallet() (localWallet, error) {
	data, err := ioutil.ReadFile(FILENAME)
	if err != nil {
		data = createWalletFile()
	}
	if strings.HasPrefix(string(data), "AESENCRYPT") {
		data, err = AESDecrypt(data, password)
		if err != nil {
			return nil, fmt.Errorf("invalid password, please run the auth command to set it")
		}
	}

	var wallet localWallet
	if err = yaml.Unmarshal(data, &wallet); err != nil {
		return nil, fmt.Errorf("corrupt or malformed file")
	}
	return wallet, nil
}
// ReadWallet reads the localWallet from disk
ReadWallet reads the localWallet from disk
// ReadWallet reads the localWallet from disk
func ReadWallet() (localWallet, error) {
	data, err := ioutil.ReadFile(FILENAME)
	if err != nil {
		data = createWalletFile()
	}
	if strings.HasPrefix(string(data), "AESENCRYPT") {
		data, err = AESDecrypt(data, password)
		if err != nil {
			return nil, fmt.Errorf("invalid password, please run the auth command to set it")
		}
	}
	var wallet localWallet
	if err = yaml.Unmarshal(data, &wallet); err != nil {
		return nil, fmt.Errorf("corrupt or malformed file")
	}
	return wallet, nil
}
func ReadWallet ( ) ( localWallet , error ) { data , err := ioutil . ReadFile ( FILENAME ) if err != nil { data = createWalletFile ( ) } if strings . HasPrefix ( string ( data ) , " " ) { data , err = AESDecrypt ( data , password ) if err != nil { return nil , fmt . Errorf ( " " ) } } var wallet localWallet if err = yaml . Unmarshal ( data , & wallet ) ; err != nil { return nil , fmt . Errorf ( " " ) } return wallet , nil }
ReadWallet reads the localWallet from disk
ReadWallet reads the localWallet from disk