Discover Packages
github.com/status-im/status-go
services
typeddata
package
Version:
v0.48.8
Opens a new window with list of versions in this module.
Published: Mar 11, 2020
License: MPL-2.0
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Sign TypedData with a given private key. Verify that chainId in the typed data matches currently selected chain.
ValidateAndHash generates a hash of TypedData and verifies that chainId in the typed data matches currently selected chain.
type Field struct {
Name string `json:"name"`
Type string `json:"type"`
}
Field stores name and solidity type of the field.
Validate checks that both name and type are not empty.
TypedData defines typed data according to eip-712.
Validate that required fields are defined.
This method doesn't check if dependencies of the main type are defined, it will be validated
when type string is computed.
ValidateChainID accept chain as big integer and verifies if typed data belongs to the same chain.
Types define fields for each composite type.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.