Beispiel #1
0
func ecbalance(addr string) error {
	if Utility.IsValidAddress(addr) && strings.HasPrefix(addr, "FA") {
		fmt.Println("Not a valid Entry Credit Address")
		return fmt.Errorf("Not a valid Entry Credit Address")
	}
	if b, err := factom.ECBalance(addr); err != nil {
		fmt.Println("Address undefined or invalid")
		return err
	} else {
		fmt.Println("Balance of ", addr, " = ", b)
	}

	return nil
}
func GetAddressInformationFromFactom(address string) error {
	ecBalance, err := factom.ECBalance(address)
	if err != nil {
		fmt.Printf("GetAddressInformationFromFactom 1 - %v\n", err)
	} else {
		fmt.Printf("ECBalance - %v\n", ecBalance)
	}
	fctBalance, err := factom.FctBalance(address)
	if err != nil {
		fmt.Printf("GetAddressInformationFromFactom 2 - %v\n", err)
	} else {
		fmt.Printf("FctBalance - %v\n", fctBalance)
	}

	return nil
}