From 17b32b414b07c468fbafbf1e00218bfcb9b65286 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Thu, 12 Dec 2024 15:56:35 -0500 Subject: [PATCH] update --- ethcoder/typed_data.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ethcoder/typed_data.go b/ethcoder/typed_data.go index 10266ba..d8427b5 100644 --- a/ethcoder/typed_data.go +++ b/ethcoder/typed_data.go @@ -194,12 +194,11 @@ func (t *TypedData) encodeData(primaryType string, data map[string]interface{}) return encodedData, nil } -// EncodeDigest returns the digest of the typed data and the fully encoded -// EIP712 message. +// Encode returns the digest of the typed data and the fully encoded EIP712 typed data message. // // NOTE: // * the digest is the hash of the fully encoded EIP712 message -// * the encoded message is the fully encoded EIP712 message +// * the encoded message is the fully encoded EIP712 message (0x1901 + domain + hashStruct(message)) func (t *TypedData) Encode() ([]byte, []byte, error) { EIP191_HEADER := "0x1901" // EIP191 for typed data eip191Header, err := HexDecode(EIP191_HEADER)