frontend

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminBackend

type AdminBackend interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
}

type AdminFrontend

type AdminFrontend struct {
	Supervisor Backend
}

func (*AdminFrontend) Start

func (a *AdminFrontend) Start(ctx context.Context) error

Start starts the service, if it was previously stopped.

func (*AdminFrontend) Stop

func (a *AdminFrontend) Stop(ctx context.Context) error

Stop stops the service, if it was previously started.

type Backend

type Backend interface {
	AdminBackend
	QueryBackend
}

type QueryBackend

type QueryBackend interface {
	CheckMessage(identifier types.Identifier, payloadHash common.Hash) (types.SafetyLevel, error)
	CheckBlock(chainID *hexutil.U256, blockHash common.Hash, blockNumber hexutil.Uint64) (types.SafetyLevel, error)
}

type QueryFrontend

type QueryFrontend struct {
	Supervisor QueryBackend
}

func (*QueryFrontend) CheckBlock

func (q *QueryFrontend) CheckBlock(chainID *hexutil.U256, blockHash common.Hash, blockNumber hexutil.Uint64) (types.SafetyLevel, error)

CheckBlock checks the safety-level of an L2 block as a whole.

func (*QueryFrontend) CheckMessage

func (q *QueryFrontend) CheckMessage(identifier types.Identifier, payloadHash common.Hash) (types.SafetyLevel, error)

CheckMessage checks the safety-level of an individual message. The payloadHash references the hash of the message-payload of the message.

Jump to

Keyboard shortcuts

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