Documentation
¶
Index ¶
- Constants
- func EIP712HashingTypedMessage(tm TypedMessage, chainId *big.Int) ([]byte, error)
- func GetDomain(cpcAddr common.Address, chainId *big.Int) apitypes.TypedDataDomain
- func GetDomainTypes() []apitypes.Type
- func VerifySignature(expectedAddress common.Address, tm TypedMessage, r, s [32]byte, v uint8, ...) (match bool, recoveredAddress common.Address, err error)
- type TypedMessage
Constants ¶
View Source
const PrimaryTypeNameEIP712Domain = "EIP712Domain"
Variables ¶
This section is empty.
Functions ¶
func EIP712HashingTypedMessage ¶
func EIP712HashingTypedMessage(tm TypedMessage, chainId *big.Int) ([]byte, error)
func GetDomainTypes ¶
GetDomainTypes returns domain types for EIP712Domain.
func VerifySignature ¶
func VerifySignature( expectedAddress common.Address, tm TypedMessage, r, s [32]byte, v uint8, chainId *big.Int, ) (match bool, recoveredAddress common.Address, err error)
VerifySignature verifies the signature of the given typed message. The signature is verified by recovering the public key from the given signature and comparing it with the expected address.
Types ¶
Click to show internal directories.
Click to hide internal directories.