code: func (api *SignerAPI) SignTypedData(ctx context.Context, addr common.MixedcaseAddress, typedData TypedData) (hexutil.Bytes, 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)))
  	sighash := crypto.Keccak256(rawData)
  	message := typedData.Format()
  	req := &SignDataRequest{ContentType: DataTyped.Mime, Rawdata: rawData, Message: message, Hash: sighash}
  	signature, err := api.sign(addr, req, true)
  	if err != nil {
  		api.UI.ShowError(err.Error())
  		return nil, err
  	}
  	return signature, nil
  }
docs: // SignTypedData signs EIP-712 conformant typed data
  // hash = keccak256("\x19${byteVersion}${domainSeparator}${hashStruct(message)}")