espresso

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HARDHAT         = 31337
	PURPOSE_INDEX   = 44
	COIN_TYPE_INDEX = 60
)

Variables

This section is empty.

Functions

func ExtractSigAndData

func ExtractSigAndData(raw string) (common.Address, apitypes.TypedData, error)

Types

type EIP712Domain

type EIP712Domain struct {
	Name              string `json:"name"`
	Version           string `json:"version"`
	ChainId           uint32 `json:"chainId"`
	VerifyingContract string `json:"verifyingContract"`
}

type EspressoClient

type EspressoClient struct {
	EspressoUrl string
	GraphQLUrl  string
}

func (*EspressoClient) SendInput

func (e *EspressoClient) SendInput(payload string, namespace int)

type EspressoData

type EspressoData struct {
	Account     string          `json:"account"`
	Domain      EIP712Domain    `json:"domain"`
	Types       Types           `json:"types"`
	PrimaryType string          `json:"primaryType"`
	Message     EspressoMessage `json:"message"`
}

type EspressoListener

type EspressoListener struct {
	InputRepository *cRepos.InputRepository

	InputterWorker *inputter.InputterWorker
	// contains filtered or unexported fields
}

func NewEspressoListener

func NewEspressoListener(espressoUrl string, namespace uint64, repository *cRepos.InputRepository, fromBlock uint64, w *inputter.InputterWorker) *EspressoListener

func (EspressoListener) Start

func (e EspressoListener) Start(ctx context.Context, ready chan<- struct{}) error

func (EspressoListener) String

func (e EspressoListener) String() string

type EspressoMessage

type EspressoMessage struct {
	Nonce   uint64 `json:"nonce"`
	Payload string `json:"payload"`
}

type GraphQLQuery

type GraphQLQuery struct {
	Query string `json:"query"`
}

type GraphQLResponse

type GraphQLResponse struct {
	Data struct {
		Inputs struct {
			TotalCount int `json:"totalCount"`
		} `json:"inputs"`
	} `json:"data"`
}

type SigAndData

type SigAndData struct {
	Signature string `json:"signature"`
	TypedData string `json:"typedData"`
}

type TypeDetail

type TypeDetail struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type Types

type Types struct {
	EIP712Domain    []TypeDetail `json:"EIP712Domain"`
	EspressoMessage []TypeDetail `json:"EspressoMessage"`
}

Jump to

Keyboard shortcuts

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