pub fn sign_typed_data(
        private_key: &K256PrivateKey,
        domain: &Eip712Domain,
        typed_struct: &impl EIP712TypedStructure,
    ) -> Result<PackedEthSignature, ParityCryptoError> {
        let signed_bytes = H256::from(Self::typed_data_to_signed_bytes(domain, typed_struct).0);
        let signature = sign(private_key, &signed_bytes)?;
        Ok(PackedEthSignature(signature))
    }
Signs typed struct using Ethereum private key by EIP-712 signature standard.
Result of this function is the equivalent of RPC calling `eth_signTypedData`.
core/lib/crypto_primitives/src/packed_eth_signature.rs