signing

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EIP712Domain

type EIP712Domain struct {
	Name              string   `json:"name"`
	Version           string   `json:"version"`
	VerifyingContract string   `json:"verifyingContract"`
	ChainId           *big.Int `json:"chainId"`
	Salt              []byte   `json:"salt"`
}

type EIP712MessageBuilder

type EIP712MessageBuilder[T any] struct {
	Types       map[string][]*EIP712Type
	PrimaryType string
	Domain      *EIP712Domain
}

func NewEIP712MessageBuilder

func NewEIP712MessageBuilder[T any](domain *EIP712Domain) *EIP712MessageBuilder[T]

func (*EIP712MessageBuilder[T]) Build

func (e *EIP712MessageBuilder[T]) Build(obj *T) *EIP712TypedData

func (*EIP712MessageBuilder[T]) GetEncodedType

func (e *EIP712MessageBuilder[T]) GetEncodedType() string

type EIP712Type

type EIP712Type struct {
	Name string
	Type string
}

type EIP712TypedData

type EIP712TypedData struct {
	Types       map[string][]*EIP712Type `json:"types"`
	PrimaryType string                   `json:"primaryType"`
	Domain      *EIP712Domain            `json:"domain"`
	Message     map[string]interface{}   `json:"message"`
}

func (*EIP712TypedData) Hash

func (t *EIP712TypedData) Hash() ([]byte, error)

Jump to

Keyboard shortcuts

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