func EncodeForSigning(typedData *TypedData) ([]byte, error) {
	domainSeparator, err := typedData.HashStruct("EIP712Domain", typedData.Domain.Map())
	if err != nil {
		return nil, err
	}

	typedDataHash, err := typedData.HashStruct(typedData.PrimaryType, typedData.Message)
	if err != nil {
		return nil, err
	}

	rawData := []byte(fmt.Sprintf("\x19\x01%s%s", string(domainSeparator), string(typedDataHash)))
	return rawData, nil
}
// EncodeForSigning encodes the hash that will be signed for the given EIP712 data
EncodeForSigning encodes the hash that will be signed for the given EIP712 data
// EncodeForSigning encodes the hash that will be signed for the given EIP712 data
func EncodeForSigning(typedData *TypedData) ([]byte, error) {
	domainSeparator, err := typedData.HashStruct("EIP712Domain", typedData.Domain.Map())
	if err != nil {
		return nil, err
	}
	typedDataHash, err := typedData.HashStruct(typedData.PrimaryType, typedData.Message)
	if err != nil {
		return nil, err
	}
	rawData := []byte(fmt.Sprintf("\x19\x01%s%s", string(domainSeparator), string(typedDataHash)))
	return rawData, nil
}
func EncodeForSigning ( typedData * TypedData ) ( [ ] byte , error ) { domainSeparator , err := typedData . HashStruct ( " " , typedData . Domain . Map ( ) ) if err != nil { return nil , err } typedDataHash , err := typedData . HashStruct ( typedData . PrimaryType , typedData . Message ) if err != nil { return nil , err } rawData := [ ] byte ( fmt . Sprintf ( " \x19 \x01 " , string ( domainSeparator ) , string ( typedDataHash ) ) ) return rawData , nil }
EncodeForSigning encodes the hash that will be signed for the given EIP712 data
EncodeForSigning encodes the hash that will be signed for the given EIP712 data