rollups

package
v0.0.0-...-3acd70f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvanceInput

type AdvanceInput struct {
	Metadata *Metadata
	Payload  []byte
}

Represent an advance input from finish.

type FinishStatus

type FinishStatus int

Status when finishing a rollups request.

const (
	FinishStatusAccept FinishStatus = iota
	FinishStatusReject
)

func (FinishStatus) String

func (status FinishStatus) String() string

type InspectInput

type InspectInput struct {
	Payload []byte
}

Represent an inspect input from finish.

type Metadata

type Metadata struct {
	InputIndex     int
	Sender         common.Address
	BlockNumber    int64
	BlockTimestamp int64
}

Metadata from the input.

type RollupsHTTP

type RollupsHTTP struct {
	// contains filtered or unexported fields
}

Implement the Rollups API using the Rollups HTTP server.

func NewRollupsHTTP

func NewRollupsHTTP() *RollupsHTTP

Create a new Rollups HTTP client. Load the ROLLUP_HTTP_SERVER_URL from an environment variable.

func (*RollupsHTTP) Finish

func (r *RollupsHTTP) Finish(status FinishStatus) (any, error)

Send a finish request to the Rollups API. If there is no error, return an AdvanceInput or an InspectInput.

func (*RollupsHTTP) SendNotice

func (r *RollupsHTTP) SendNotice(payload []byte) (int, error)

Send a notice to the Rollups API. Return the notice index.

func (*RollupsHTTP) SendReport

func (r *RollupsHTTP) SendReport(payload []byte) error

Send a report to the Rollups API.

func (*RollupsHTTP) SendVoucher

func (r *RollupsHTTP) SendVoucher(destination common.Address, payload []byte) (int, error)

Send a voucher to the Rollups API. Return the voucher index.

Jump to

Keyboard shortcuts

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