Documentation ¶
Index ¶
- func HashTypedDataV4(typedData signercore.TypedData, chain *big.Int) (common.Hash, error)
- func Sign(typed TypedData, prv *ecdsa.PrivateKey, chain *big.Int) ([]byte, error)
- func SignTypedDataV4(typedData signercore.TypedData, prv *ecdsa.PrivateKey, chain *big.Int) (hexutil.Bytes, error)
- func ValidateAndHash(typed TypedData, chain *big.Int) (common.Hash, error)
- type Field
- type TypedData
- type Types
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashTypedDataV4 ¶ added in v0.76.4
func Sign ¶
Sign TypedData with a given private key. Verify that chainId in the typed data matches currently selected chain.
func SignTypedDataV4 ¶ added in v0.76.4
func SignTypedDataV4(typedData signercore.TypedData, prv *ecdsa.PrivateKey, chain *big.Int) (hexutil.Bytes, error)
Types ¶
type TypedData ¶
type TypedData struct { Types Types `json:"types"` PrimaryType string `json:"primaryType"` Domain map[string]json.RawMessage `json:"domain"` Message map[string]json.RawMessage `json:"message"` }
TypedData defines typed data according to eip-712.
Click to show internal directories.
Click to hide internal directories.