Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Dec 12, 2024
1 parent 67c0d82 commit 17b32b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ethcoder/typed_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17b32b4

Please sign in to comment.