eip712

package
v0.0.0-...-f1447cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DomainDefaultName    = `zkSync`
	DomainDefaultVersion = `2`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	Name              string          `json:"name"`              // Name of the domain.
	Version           string          `json:"version"`           // Version of the domain.
	ChainId           *big.Int        `json:"chainId"`           // Chain ID associated with the domain.
	VerifyingContract *common.Address `json:"verifyingContract"` // Address of the verifying contract for the domain.
}

Domain represents the domain parameters used for EIP-712 signing.

func ZkSyncEraEIP712Domain

func ZkSyncEraEIP712Domain(chainId int64) *Domain

func (*Domain) EIP712Domain

func (d *Domain) EIP712Domain() apitypes.TypedDataDomain

func (*Domain) EIP712Type

func (d *Domain) EIP712Type() string

func (*Domain) EIP712Types

func (d *Domain) EIP712Types() []apitypes.Type

type TypedData

type TypedData interface {
	// EIP712Type returns the EIP-712 type.
	EIP712Type() string
	// EIP712Types return the supported types.
	EIP712Types() []apitypes.Type
	// EIP712Message returns the EIP-712 message.
	EIP712Message() (apitypes.TypedDataMessage, error)
}

TypedData represents typed data as defined by EIP-712.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL